Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
print_limbo_keywords.php
1 <?php
2  require_once dirname(__FILE__).'/../../../../../core/include/init.inc';
3 
4  require_once SQ_SYSTEM_ROOT.'/core/lib/html_form/html_form.inc';
5 ?>
6 
7 <html>
8  <head>
9  <title>Simple Keyword Replacements</title>
10  </head>
11 
12  <body>
13  <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
14  <?php
15  require_once SQ_SYSTEM_ROOT.'/core/include/backend_outputter.inc';
16  require_once SQ_SYSTEM_ROOT.'/core/include/asset_edit_interface.inc';
17 
18  $o = new Backend_Outputter();
19 
20  $o->openSection('Keyword List for Simple Edit Keywords');
21 
22  $type_list = Array();
23  $asset_type_list = $GLOBALS['SQ_SYSTEM']->am->getAssetTypes();
24  foreach ($asset_type_list as $key => $value) {
25  if ($value['instantiable'] == 1) {
26  $type_list[] = $key;
27  }
28  }
29 
30  $asset_types = Array();
31 
32  foreach ($type_list as $asset_type) {
33  $type_info = $GLOBALS['SQ_SYSTEM']->am->getTypeInfo($asset_type);
34  $asset_types[$asset_type] = $type_info['name'];
35  }
36  asort($asset_types);
37 
38  $o->openField('&nbsp;');
39  echo '<p>Select your asset type: ';
40  if (isset($_REQUEST['asset_type']))
41  {
42  combo_box('asset_type', $asset_types, FALSE, $_REQUEST['asset_type']);
43  } else {
44  combo_box('asset_type', $asset_types);
45  }
46  echo '&nbsp;';
47  submit_button('limbo_keywords_submit', 'Get Simple Edit Keywords');
48  echo '</p>';
49  $o->closeField();
50  $o->closeSection();
51 
52  if (isset($_REQUEST['asset_type']))
53  {
54  $asset_type = $_REQUEST['asset_type'];
55  $ei= new Asset_Edit_Interface($asset_type);
56  $ei->getSimpleEditKeywords($asset_type, $o);
57  }
58  $o->openSection('&nbsp;');
59  $o->openField('&nbsp;');
60  $o->openField('', 'commit');
61  normal_button('cancel', 'Close Window', 'window.close()');
62  $o->closeSection();
63  $o->paint();
64 
65 ?>
66 </form>
67  </body>
68 </html>