Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
snippet_info_popup.php
1 <?php
26 require_once dirname(__FILE__).'/../../../../core/include/init.inc';
27 if (empty($GLOBALS['SQ_SYSTEM']->user) || !($GLOBALS['SQ_SYSTEM']->user->canAccessBackend() || $GLOBALS['SQ_SYSTEM']->user->type() == 'simple_edit_user')){
28  exit;
29 }
30 
31 ?>
32 <html style="width: 740px; height: 500px;">
33  <head>
34  <title>Global Snippet Keyword Information</title>
35  <style>
36  h1 {font:bold 14pt "Lucida Grande", Tahoma; background: #402F48; color: #FFFFFF; height:30px; text-align:center}
37  div.tip {font:bold 10pt "Lucida Grande", Tahoma; background: #FFFFCC; color:#003366; border:solid 1px #003366; padding-left:5px; padding-right:5px; padding-top:5px; padding-bottom:5px; text-align:justify; margin-top:.5cm; margin-bottom:.5cm}
38  td {font:10pt "Lucida Grande", Tahoma; color:#000000; background:#FFFFFF;}
39  th {font:bold 10pt "Lucida Grande", Tahoma; color:#000000; background:#C0C0C0;}
40  table.visible {border:solid 1px #000000;border-collapse:collapse; width:100%}
41  table.visible td {border:solid 1px #000000;border-collapse:collapse; height: 40px; text-align:justify}
42  table.visible th {border:solid 1px #000000;border-collapse:collapse; height: 30px; text-align:center}
43  table.visible td.icon {text-align:center}
44  </style>
45  </head>
46 
47  <body>
48  <h1>Global Snippet Keyword Information</h1>
49  <div style="padding: 0 10px;">
50  <div class="tip">
51  TIP: The format of a snippet keyword is %globals_snippet_&lt;id&gt;_&lt;name&gt%. <br />
52  Note: The "name" part is optional.
53  </div>
54  <?php
55  $snippets = $GLOBALS['SQ_SYSTEM']->am->getSnippetKeywords(TRUE);
56  ?>
57  <table class="visible" cellpadding="5" cellspacing="0">
58  <thead>
59  <tr>
60  <th>Snippet Name and Keyword</th>
61  <th>Description</th>
62  </tr>
63  </thead>
64  <tbody>
65  <?php
66  foreach ($snippets as $id => $info) {
67  $desc = (isset($info['attr']['desc'])) ? $info['attr']['desc'] : '&nbsp;';
68  ?>
69  <tr>
70  <td nowrap="nowrap">
71  <strong><?php echo $info['name']; ?></strong><br />
72  %globals_snippet_<?php echo $id.'_'.$info['safe_name']; ?>%
73  </td>
74  <td>
75  <?php echo $desc ?>
76  </td>
77  </tr?
78  <?php
79  }
80  ?>
81  </tbody>
82  </table>
83  </div>
84  &nbsp;
85  </body>
86 </html>