- Timestamp:
- Dec 16, 2007 7:21:57 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/form_template.cli.php
r270 r295 62 62 if (preg_match('/.*_id$/i', $field)) { 63 63 $output[$field] = <<<E_O_F 64 65 <label for="$field"<\x3fphp \$fv->err('$field') \x3f>><\x3fphp echo _("$title"); \x3f></label> 66 <select name="$field" id="$field" class="sc-small"><\x3fphp printSelectForm('__///___tbl', "CONCAT(__///___id, '—', __///__)", '$field', \$frm['$field'], true, 'ORDER BY $field ASC'); \x3f></select> 67 <span class="commanditem commandtext"><a href="<\x3fphp echo \$app->oHREF('__///__.php?op=add&boomerang=true'); \x3f>" onclick"javascript:return confirm('<\x3fphp echo _("Notice: You are about to leave this form page and any changes you may have made without saving will be lost."); \x3f>')"><\x3fphp echo _("Add __///__") \x3f></a></span> 64 65 <div class="sc-form-row<\x3fphp \$fv->err('$field'); \x3f>"> 66 <label for="$field"><\x3fphp echo _("$title"); \x3f></label> 67 <select name="$field" id="$field" class="sc-small"><\x3fphp printSelectForm('__///___tbl', "CONCAT(__///___id, '—', __///__)", '$field', \$frm['$field'], true, 'ORDER BY $field ASC'); \x3f></select> 68 <span class="commanditem commandtext"><a href="<\x3fphp echo \$app->oHREF('__///__.php?op=add&boomerang=true'); \x3f>" onclick="javascript:return confirm('<\x3fphp echo _("Notice: You are about to leave this form page and any changes you may have made without saving will be lost."); \x3f>');"><\x3fphp echo _("Add __///__") \x3f></a></span> 68 69 <\x3fphp if ('' != \$frm['__///___id']) { \x3f> 69 <span class="commanditem commandtext"><a href="<\x3fphp echo \$app->oHREF('__///__.php?op=edit&boomerang=true&__///___id=' . \$frm['__///___id']); \x3f>" onclick"javascript:return confirm('<\x3fphp echo _("Notice: You are about to leave this form page and any changes you may have made without saving will be lost."); \x3f>')"><\x3fphp echo sprintf(_("Edit __///__ <em>%s</em>"), \$frm['__///__']) \x3f></a></span>70 <span class="commanditem commandtext"><a href="<\x3fphp echo \$app->oHREF('__///__.php?op=edit&boomerang=true&__///___id=' . \$frm['__///___id']); \x3f>" onclick="javascript:return confirm('<\x3fphp echo _("Notice: You are about to leave this form page and any changes you may have made without saving will be lost."); \x3f>');"><\x3fphp echo sprintf(_("Edit __///__ <em>%s</em>"), \$frm['__///__']) \x3f></a></span> 70 71 <\x3fphp } \x3f> 72 </div> 71 73 E_O_F; 72 74 continue; … … 77 79 $output[$field] = <<<E_O_F 78 80 79 <label for="$field"<\x3fphp \$fv->err('$field') \x3f>><\x3fphp echo _("$title"); \x3f></label> 80 <input type="file" name="$field" id="$field" /> 81 <div class="sc-form-row<\x3fphp \$fv->err('$field'); \x3f>"> 82 <label for="$field"><\x3fphp echo _("$title"); \x3f></label> 83 <input type="file" name="$field" id="$field" /> 81 84 <\x3fphp if ('' != \$upload->getFilenameGlob(getFormData('$primary_key') . '_*') && getFormData('op') == 'edit' || getFormData('op') == 'update') { \x3f> 82 <div class="sc-help"><\x3fphp printf(_("The current file <a href=\"%s/%2\\\$s\"><strong>%2\\\$s</strong></a> will be deleted if a new file is selected for upload."), '/_db_files/__///__', \$upload->getFilenameGlob(getFormData('$primary_key') . '_*')) \x3f></div>85 <div class="sc-help"><\x3fphp printf(_("The current file <a href=\"%s/%2\\\$s\"><strong>%2\\\$s</strong></a> will be deleted if a new file is selected for upload."), '/_db_files/__///__', \$upload->getFilenameGlob(getFormData('$primary_key') . '_*')) \x3f></div> 83 86 <\x3fphp } \x3f> 84 87 <div class="sc-help"><\x3fphp printf(_("File to upload must have one of the following file-name extensions: %s."), join(', ', \$upload->getParam('valid_file_extensions'))) \x3f></div> 88 </div> 85 89 E_O_F; 86 90 continue; … … 91 95 $output[$field] = <<<E_O_F 92 96 93 <label for="$field"<\x3fphp \$fv->err('$field') \x3f>><\x3fphp echo _("$title"); \x3f></label> 94 <input type="password" class="sc-medium" size="50" name="$field" id="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" /> 97 <div class="sc-form-row<\x3fphp \$fv->err('$field'); \x3f>"> 98 <label for="$field"><\x3fphp echo _("$title"); \x3f></label> 99 <input type="password" name="$field" id="$field" class="sc-medium" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" /> 100 </div> 95 101 E_O_F; 96 102 continue; … … 103 109 $output[$field] = <<<E_O_F 104 110 105 <label for="$field"<\x3fphp \$fv->err('$field') \x3f>><\x3fphp echo _("$title"); \x3f></label> 106 <select name="$field" id="$field"><\x3fphp printSetSelectForm('$db_tbl', '$field', \$frm['$field'], true); \x3f></select> 111 <div class="sc-form-row<\x3fphp \$fv->err('$field'); \x3f>"> 112 <label for="$field"><\x3fphp echo _("$title"); \x3f></label> 113 <select name="$field" id="$field"><\x3fphp printSetSelectForm('$db_tbl', '$field', \$frm['$field'], true); \x3f></select> 114 </div> 107 115 E_O_F; 108 116 break; … … 112 120 $output[$field] = <<<E_O_F 113 121 114 <label for="$field"<\x3fphp \$fv->err('$field') \x3f>><\x3fphp echo _("$title"); \x3f></label> 115 <\x3fphp printSetCheckboxes('$db_tbl', '$field', \$frm['$field'], 1) \x3f> 122 <div class="sc-form-row<\x3fphp \$fv->err('$field'); \x3f>"> 123 <label for="$field"><\x3fphp echo _("$title"); \x3f></label> 124 <\x3fphp printSetCheckboxes('$db_tbl', '$field', \$frm['$field'], 1) \x3f> 125 </div> 116 126 E_O_F; 117 127 break; … … 121 131 $output[$field] = <<<E_O_F 122 132 123 <label for="$field"<\x3fphp \$fv->err('$field') \x3f>><\x3fphp echo _("$title"); \x3f></label> 124 <input type="checkbox" name="$field" id="$field" <\x3fphp frmChecked(!empty(\$frm['$field'])) \x3f> /><label class="left"><\x3fphp echo _("Check this box to $title"); \x3f></label> 133 <div class="sc-form-row<\x3fphp \$fv->err('$field'); \x3f>"> 134 <label for="$field"><\x3fphp echo _("$title"); \x3f></label> 135 <label><input type="checkbox" name="$field" id="$field" <\x3fphp frmChecked(!empty(\$frm['$field'])) \x3f> /><\x3fphp echo _("Check this box to $title"); \x3f></label> 136 </div> 125 137 E_O_F; 126 138 break; … … 132 144 $output[$field] = <<<E_O_F 133 145 134 <label for="$field"<\x3fphp \$fv->err('$field') \x3f>><\x3fphp echo _("$title"); \x3f></label> 135 <textarea class="sc-large sc-short" cols="75" rows="4" name="$field" id="$field"><\x3fphp echo oTxt(\$frm['$field']); \x3f></textarea> 146 <div class="sc-form-row<\x3fphp \$fv->err('$field'); \x3f>"> 147 <label for="$field"><\x3fphp echo _("$title"); \x3f></label> 148 <textarea name="$field" id="$field" rows="8" cols="40" class="sc-short sc-medium"><\x3fphp echo oTxt(\$frm['$field']); \x3f></textarea> 149 </div> 136 150 E_O_F; 137 151 break; … … 144 158 $output[$field] = <<<E_O_F 145 159 146 <label for="$field"<\x3fphp \$fv->err('$field') \x3f>><\x3fphp echo _("$title"); \x3f></label> 147 <textarea class="sc-large sc-tall" cols="75" rows="4" name="$field" id="$field"><\x3fphp echo oTxt(\$frm['$field']); \x3f></textarea> 160 <div class="sc-form-row<\x3fphp \$fv->err('$field'); \x3f>"> 161 <label for="$field"><\x3fphp echo _("$title"); \x3f></label> 162 <textarea name="$field" id="$field" rows="8" cols="40" class="sc-short sc-medium"><\x3fphp echo oTxt(\$frm['$field']); \x3f></textarea> 163 </div> 148 164 E_O_F; 149 165 break; … … 170 186 $output[$field] = <<<E_O_F 171 187 172 <label for="$field"<\x3fphp \$fv->err('$field') \x3f>><\x3fphp echo _("$title"); \x3f></label> 173 <input type="text" class="sc-tiny" size="12" name="$field" id="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" /> 188 <div class="sc-form-row<\x3fphp \$fv->err('$field'); \x3f>"> 189 <label for="$field"><\x3fphp echo _("$title"); \x3f></label> 190 <input type="text" name="$field" id="$field" class="sc-tiny" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" /> 191 </div> 174 192 E_O_F; 175 193 break; … … 184 202 $output[$field] = <<<E_O_F 185 203 186 <label for="$field"<\x3fphp \$fv->err('$field') \x3f>><\x3fphp echo _("$title"); \x3f></label> 187 <input type="text" class="sc-medium" size="25" name="$field" id="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" /> 204 <div class="sc-form-row<\x3fphp \$fv->err('$field'); \x3f>"> 205 <label for="$field"><\x3fphp echo _("$title"); \x3f></label> 206 <input type="text" name="$field" id="$field" class="sc-small" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" /> 207 </div> 188 208 E_O_F; 189 209 break; … … 197 217 $output[$field] = <<<E_O_F 198 218 199 <label for="$field"<\x3fphp \$fv->err('$field') \x3f>><\x3fphp echo _("$title"); \x3f></label> 200 <input type="text" class="sc-medium" size="50" name="$field" id="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" /> 219 <div class="sc-form-row<\x3fphp \$fv->err('$field'); \x3f>"> 220 <label for="$field"><\x3fphp echo _("$title"); \x3f></label> 221 <input type="text" name="$field" id="$field" class="sc-medium" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" /> 222 </div> 201 223 E_O_F; 202 224 break; -
trunk/bin/module_maker/list_template.cli.php
r270 r295 90 90 $listrows[] = "<\x3fphp printf('$%01.2f', \$list[\$i]['$field']); \x3f>"; 91 91 } else if (preg_match('/(added_by_user_id)/i', $field)) { 92 $listrows[] = "<\x3fphp echo oTxt(\$list[\$i]['added_ admin_username']); \x3f>";92 $listrows[] = "<\x3fphp echo oTxt(\$list[\$i]['added_by_username']); \x3f>"; 93 93 } else if (preg_match('/(modified_by_user_id)/i', $field)) { 94 $listrows[] = "<\x3fphp echo oTxt(\$list[\$i]['modified_ admin_username']); \x3f>";94 $listrows[] = "<\x3fphp echo oTxt(\$list[\$i]['modified_by_username']); \x3f>"; 95 95 } else if ('rank' == $field) { 96 96 $listrows[] = "<input type=\"text\" name=\"rank[<\x3fphp echo \$list[\$i]['$primary_key']; \x3f>]\" value=\"<\x3fphp echo \$list[\$i]['rank']; \x3f>\" size=\"5\" />"; … … 164 164 165 165 echo isset($op) ? '' : <<<E_O_F 166 <td class="sc-nowrap" align="right"><a title="<\x3fphp printf(_("Delete %s"), oTxt(\$list[\$i]['__///__'])) \x3f>" href="<\x3fphp echo \$app->oHREF(\$_SERVER['PHP_SELF'] . "?op=del&$primary_key=" . \$list[\$i]['$primary_key']); \x3f>" onclick"javascript:return confirm('<\x3fphp printf(_("Are you sure you want to delete the record %s? This action is permanent and cannot be undone."), oTxt(\$list[\$i]['__///__'])) \x3f>') "><img src="/admin/_widgets/delete.gif" alt="Delete" width="16" height="17" border="0" /></a> </td>166 <td class="sc-nowrap" align="right"><a title="<\x3fphp printf(_("Delete %s"), oTxt(\$list[\$i]['__///__'])) \x3f>" href="<\x3fphp echo \$app->oHREF(\$_SERVER['PHP_SELF'] . "?op=del&$primary_key=" . \$list[\$i]['$primary_key']); \x3f>" onclick"javascript:return confirm('<\x3fphp printf(_("Are you sure you want to delete the record %s? This action is permanent and cannot be undone."), oTxt(\$list[\$i]['__///__'])) \x3f>');"><img src="/admin/_widgets/delete.gif" alt="Delete" width="16" height="17" border="0" /></a> </td> 167 167 </tr> 168 168 <\x3fphp } \x3f> -
trunk/bin/module_maker/module.cli.php
r259 r295 137 137 138 138 // Make sure requested table is in database. 139 if (!isset($tables)) { 140 die(sprintf("%s Warning: %s does not exist in database %s. No DB tables found!", basename($_SERVER['argv'][0]), $db_tbl, $app->getParam('db_name'))); 141 } 139 142 if (!in_array($db_tbl, $tables)) { 140 143 die(sprintf("%s Warning: %s does not exist in database %s. Please select one of: \n\n%s\n\n", basename($_SERVER['argv'][0]), $db_tbl, $app->getParam('db_name'), join("\n", $tables))); … … 207 210 208 211 $search['admin_form_tag_init'] = '/%ADMIN_FORM_TAG_INIT%/'; 209 $replace['admin_form_tag_init'] = '<form method="post" action="<\x3fphp echo \$_SERVER[\'PHP_SELF\']; \x3f>" class="sc-form">';212 $replace['admin_form_tag_init'] = "<form method=\"post\" action=\"<\x3fphp echo oTxt(\$_SERVER['PHP_SELF']); \x3f>\" class=\"sc-form\">"; 210 213 $search['admin_upload_include'] = '/%ADMIN_UPLOAD_INCLUDE%/'; 211 214 $replace['admin_upload_include'] = ''; -
trunk/bin/module_maker/skel/adm_form.ihtml
r136 r295 6 6 <input type="hidden" name="%PRIMARY_KEY%" value="<?php echo $frm['%PRIMARY_KEY%']; ?>" /> 7 7 8 <?php printSubmitButtons($frm['submit_buttons']); ?> 8 <div class="sc-form-row sc-submit-buttons"> 9 <?php printSubmitButtons($frm['submit_buttons']); ?> 10 </div> 9 11 10 12 %ADM_FORM_TABLE_ROWS% 11 13 12 <?php printSubmitButtons($frm['submit_buttons']); ?> 14 <div class="sc-form-row sc-submit-buttons"> 15 <?php printSubmitButtons($frm['submit_buttons']); ?> 16 </div> 13 17 </form> -
trunk/bin/module_maker/skel/adm_list.ihtml
r270 r295 3 3 4 4 <div id="commandbox"> 5 <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get">6 <?php $app->printHiddenSession(false); ?>7 5 <span class="sc-nowrap commandtext"><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=add'); ?>"><?php echo _("Add %ITEM_TITLE%"); ?></a></span> 8 < br />9 10 <input type="text" class="sc-small" size="20" name="search_query" value="<?php echo getFormData('search_query'); ?>" title="<?php echo oTxt(_("Fields searched: __///__ %SEARCH_FIELDS%.")); ?>" />11 <select name="filter___///__">12 <?php // printSelectForm('__///___tbl', "CONCAT(__///___id, '—', city, '—', title)", '__///___id', getFormData('filter___///__'), array('Any __///__'), 'ORDER BY __///__ ASC'); ?>13 </select>14 <input type="submit" value="<?php echo _("Search"); ?>" />15 </form>6 <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get" class="sc-form"> 7 <?php $app->printHiddenSession(false); ?> 8 <input type="text" class="sc-small" size="20" name="search_query" value="<?php echo getFormData('search_query'); ?>" title="<?php echo oTxt(_("Fields searched: __///__ %SEARCH_FIELDS%.")); ?>" /> 9 <select name="filter___///__" class="sc-small"> 10 <?php // printSelectForm('__///___tbl', "CONCAT(__///___id, '—', city, '—', title)", '__///___id', getFormData('filter___///__'), array('Any __///__'), 'ORDER BY __///__ ASC'); ?> 11 </select> 12 <input type="submit" value="<?php echo _("Filter"); ?>" /> 13 </form> 16 14 </div> 17 15 … … 31 29 <td class="sc-padleft sc-nowrap"><a title="<?php printf(_("Versions of %s"), oTxt($list[$i]['__///__'])) ?>" href="<?php echo $app->oHREF('/admin/versions.php?record_table=%DB_TBL%&record_key=%PRIMARY_KEY%&boomerang=true&record_val=' . $list[$i]['%PRIMARY_KEY%']); ?>"><img src="/admin/_widgets/subcategory.gif" alt="" width="18" height="14" border="0" /></a> </td> 32 30 %ADM_LIST_ROWS% 33 <td class="sc-padleft sc-nowrap" align="right"><a title="<?php printf(_("Delete %s"), oTxt($list[$i]['__///__'])) ?>" href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . "?op=del&%PRIMARY_KEY%=" . $list[$i]['%PRIMARY_KEY%']); ?>" onclick"javascript:return confirm('<?php printf(_("Are you sure you want to delete the record %s? This action is permanent and cannot be undone."), oTxt($list[$i]['__///__'])) ?>') "><img src="/admin/_widgets/delete.gif" alt="Delete" width="16" height="17" border="0" /></a> </td>31 <td class="sc-padleft sc-nowrap" align="right"><a title="<?php printf(_("Delete %s"), oTxt($list[$i]['__///__'])) ?>" href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . "?op=del&%PRIMARY_KEY%=" . $list[$i]['%PRIMARY_KEY%']); ?>" onclick"javascript:return confirm('<?php printf(_("Are you sure you want to delete the record %s? This action is permanent and cannot be undone."), oTxt($list[$i]['__///__'])) ?>');"><img src="/admin/_widgets/delete.gif" alt="Delete" width="16" height="17" border="0" /></a> </td> 34 32 </tr> 35 33 <?php } ?> -
trunk/bin/module_maker/skel/admin.php
r202 r295 203 203 'new_op' => 'insert', 204 204 'submit_buttons' => array( 205 'submit' => _("Add %ITEM_TITLE%"),206 'repeat' => _("Add & repeat"),207 'cancel' => _("Cancel"),205 array('name' => 'submit', 'value' => _("Add %ITEM_TITLE%"), 'accesskey' => 's'), 206 array('name' => 'repeat', 'value' => _("Add & repeat"), 'accesskey' => 'r'), 207 array('name' => 'cancel', 'value' => _("Cancel"), 'accesskey' => 'c'), 208 208 ), 209 209 ); … … 216 216 global $lock; 217 217 $db =& DB::getInstance(); 218 $app =& App::getInstance(); 218 219 219 220 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id); … … 242 243 'new_op' => 'update', 243 244 'submit_buttons' => array( 244 'submit' => _("Save changes"),245 'repeat' => _("Save & edit next"),246 'reset' => _("Reset"),247 'cancel' => _("Cancel"),245 array('name' => 'submit', 'value' => _("Save changes"), 'accesskey' => 's'), 246 array('name' => 'repeat', 'value' => _("Save & edit next"), 'accesskey' => 'e'), 247 array('name' => 'reset', 'value' => _("Reset"), 'accesskey' => 'r'), 248 array('name' => 'cancel', 'value' => _("Cancel"), 'accesskey' => 'c'), 248 249 ), 249 250 ), $frm); … … 257 258 global $cache; 258 259 $db =& DB::getInstance(); 260 $app =& App::getInstance(); 259 261 260 262 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id); … … 292 294 global $cache; 293 295 $db =& DB::getInstance(); 296 $app =& App::getInstance(); 294 297 295 298 // Remove any stale cached list data. … … 313 316 global $lock; 314 317 global $cache; 318 $db =& DB::getInstance(); 315 319 $app =& App::getInstance(); 316 320 … … 342 346 global $cache; 343 347 $db =& DB::getInstance(); 348 $app =& App::getInstance(); 344 349 345 350 $where_clause = ''; … … 374 379 SELECT 375 380 %DB_TBL%.*, 376 a1.username AS added_ admin_username,377 a2.username AS modified_ admin_username381 a1.username AS added_by_username, 382 a2.username AS modified_by_username 378 383 FROM %DB_TBL% 379 LEFT JOIN admin_tbl a1 ON (%DB_TBL%.added_by_user_id = a1.admin_id)380 LEFT JOIN admin_tbl a2 ON (%DB_TBL%.modified_by_user_id = a2.admin_id)384 LEFT JOIN user_tbl a1 ON (%DB_TBL%.added_by_user_id = a1.user_id) 385 LEFT JOIN user_tbl a2 ON (%DB_TBL%.modified_by_user_id = a2.user_id) 381 386 $where_clause 382 387 " . $so->getSortOrderSQL() . " … … 398 403 // First try to return from the cache. 399 404 if ($cache->exists('list')) { 400 return $cache->get('list'); 405 $list = $cache->get('list'); 406 return $list; 401 407 } 402 408 … … 419 425 global $cache; 420 426 $db =& DB::getInstance(); 427 $app =& App::getInstance(); 421 428 422 429 if (!is_array($ranks)) { -
trunk/css/admin.inc.css
r273 r295 138 138 margin-left: 9em; 139 139 border-left: 1px solid gray; 140 padding: 0.75em 0.5em 15px0.5em;140 padding: 0.75em 0.5em 2em 0.5em; 141 141 background-color: #FFF; 142 142 } -
trunk/css/codebase.inc.css
r274 r295 11 11 /* App.inc.php ------------------------------------------------------ */ 12 12 .sc-msg { z-index: 2000000000; } /* Close to the maximum of a 32-bit integer. */ 13 .sc-msg-success, 14 .sc-msg-notice, 13 15 .sc-msg-warning, 14 .sc-msg-error, 15 .sc-msg-success, 16 .sc-msg-notice { 16 .sc-msg-error { 17 17 margin: 0 0 6px 0; 18 18 padding: 5px; … … 23 23 .sc-msg-success { color: #090; border-color: #090; } 24 24 .sc-msg-notice { color: #C60; border-color: #C60; } 25 26 form .sc-msg-success, 27 form .sc-msg-notice, 28 form .sc-msg-warning, 29 form .sc-msg-error { 30 border-style: none; 31 padding: 0; 32 } 25 33 26 34 /* PEdit.inc.php ---------------------------------------------------- */ -
trunk/docs/examples/_config.inc.php
r288 r295 1 1 <?php 2 /** 3 * _config.inc.php lives in the document root of the site/application. It is the beginning of everything. 2 /** * _config.inc.php lives in the document root of the site/application. It is the beginning of everything. 4 3 * 5 4 * Code by Strangecode :: www.strangecode.com :: This document contains copyrighted information. 6 5 * @author Quinn Comendant <quinn@strangecode.com> 7 * @version 1. 26 * @version 1.3 8 7 * @since 03 Dec 2005 19:09:32 9 8 */ 10 9 11 10 // The constant __FILE__ must be an absolute directory path, starting with / on unix or C: on windows. 12 11 // To work around a PHP bug always include this config file with: require_once dirname(__FILE__) . '/_config.inc.php'; … … 19 18 define('COMMON_BASE', realpath(dirname(__FILE__) . '/../')); 20 19 21 // The DocRoot for this application. SITE_BASE is ifferent from $_SERVER['DOCUMENT_ROOT'] because the20 // The DocRoot for this application. SITE_BASE is different from $_SERVER['DOCUMENT_ROOT'] because the 22 21 // latter does not change when using the apache Alias directive or URL Rewriting to define a site. 23 22 define('SITE_BASE', dirname(__FILE__)); 24 23 25 // Set include path for all temp ates.24 // Set include path for all templates. 26 25 ini_set('include_path', join(PATH_SEPARATOR, array( 27 26 COMMON_BASE, … … 32 31 // Include core libraries. 33 32 require_once 'codebase/lib/Utilities.inc.php'; 34 require_once 'codebase/lib/Auth_SQL.inc.php';35 33 require_once 'codebase/lib/App.inc.php'; 36 34 37 35 // Primary application class. 38 $app =& App::getInstance(' example.org');36 $app =& App::getInstance('public'); 39 37 $app->setParam(array( 40 'site_name' => ' My example site',38 'site_name' => 'WWW Public Site', 41 39 'site_email' => 'hello@example.com', 42 40 'redirect_home_url' => '/', … … 47 45 'character_set' => 'utf-8', 48 46 49 'enable_session' => false,47 'enable_session' => true, 50 48 'enable_db_session_handler' => false, 51 49 'session_use_cookies' => true, 50 'session_use_trans_sid' => true, // Disable this for high-security sites where session-ID theft is a risk. 52 51 53 'enable_db' => false, 52 // 'ssl_domain' => 'www.example.com', 53 // 'ssl_enabled' => ($_SERVER['SERVER_NAME'] == 'www.example.com'), 54 55 'enable_db' => true, 54 56 'db_always_debug' => false, 55 57 'db_debug' => true, 56 58 'db_die_on_failure' => true, 57 'db_create_tables' => true, // /Disable after site launch.59 'db_create_tables' => true, // Disable after site launch. 58 60 59 61 'display_errors' => true, … … 65 67 'log_sms_priority' => false, 66 68 'log_screen_priority' => false, 67 'log_to_email_address' => 'log@ example.com',68 'log_to_sms_address' => 'sms @example.com',69 'log_to_email_address' => 'log@strangecode.com', 70 'log_to_sms_address' => 'sms-quinn@strangecode.com', 69 71 )); 70 // DB credentials for command line scripts stored in a file with read rights 71 // given only to the user who will be executing the scripts: -rw------- 72 // This file includes $app-> method calls so must be included after App. 73 // require_once 'global/db_auth.inc.php'; 72 73 if (defined('_CLI')) { 74 // DB credentials for command line scripts stored in a file with read rights 75 // given only to the user who will be executing the scripts: -rw------- 76 // This file includes $app-> method calls so this must be included after App::getInstance(). 77 require_once 'global/db_auth.inc.php'; 78 } 74 79 75 80 // Start application-based functionality: database, session, environment, ini setup, etc. … … 77 82 $app->start(); 78 83 79 // Global DB object. Automatically pre configured by $app->start().84 // Global DB object. Automatically pre-configured by $app->start(). 80 85 $db =& DB::getInstance(); 81 86 82 // User authentication. 83 $auth = new Auth_SQL('user'); 87 // Global Auth object. 88 require_once 'codebase/lib/Auth_SQL.inc.php'; 89 $auth = new Auth_SQL('public'); 84 90 $auth->setParam(array( 85 91 'db_table' => 'user_tbl', 86 92 'db_primary_key' => 'user_id', 87 'login_url' => '/login.php' 93 'login_url' => '/login.php', 94 'login_timeout' => 260000, // 72 hours 95 'idle_timeout' => 86400, // 24 hours 88 96 )); 89 97 90 // Set CSS files. 98 // Load preferences for the user. 99 require_once 'codebase/lib/Prefs.inc.php'; 100 $prefs = new Prefs('permanent'); 101 $prefs->setParam(array( 102 'persistent' => $auth->isLoggedIn(), 103 'user_id' => $auth->get('user_id'), 104 )); 105 $prefs->setDefaults(array( 106 )); 107 $prefs->load(); 108 // Temporary prefs. 109 $tmp_prefs = new Prefs('temporary'); 110 $tmp_prefs->setDefaults(array( 111 )); 112 113 // Global record-locking object. 114 require_once 'codebase/lib/Lock.inc.php'; 115 $lock =& Lock::getInstance($auth); 116 $lock->setParam(array( 117 'timeout' => 0, 118 'auto_timeout' => 1800, 119 'error_url' => '/lock.php', 120 )); 121 122 // Global cache object. 123 require_once 'codebase/lib/Cache.inc.php'; 124 $cache = new Cache('global'); 125 $cache->setParam(array('enabled' => true)); 126 127 // Setup CSS files to include. These will always be available. 91 128 require_once 'codebase/lib/CSS.inc.php'; 92 129 $css = new CSS(); 93 $css->setParam(array('cache_css' => true));130 $css->setParam(array('cache_css' => false)); /// Enable caching after site launch. 94 131 $css->setFile('codebase/css/codebase.inc.css'); 95 132 $css->setFile('codebase/css/utilities.inc.css'); 96 $css->setFile('html/css/screen.inc.css');133 // $css->setFile('html/css/screen.inc.css'); 97 134 98 // Global navigation elements object. 135 // Nav class for titles, breadcrumbs, and page features. 136 // Global navigation titles, breadcrumbs, and page features. 99 137 require_once 'codebase/lib/Navigation.inc.php'; 100 138 $nav = new Navigation(array( … … 103 141 )); 104 142 143 // Global site-specific configuration. 144 // $cfg = array(); 145 // require_once 'global/config.inc.php'; 146 105 147 ?> -
trunk/lib/TemplateGlue.inc.php
r290 r295 62 62 * @param string $db_table database table to lookup 63 63 * @param string $db_col database column to lookup 64 * @param bool $sort Sort the output. 64 65 * @return array Array of the set/enum values on success, false on failure. 65 66 */ 66 function getSetEnumFieldValues($db_table, $db_col )67 function getSetEnumFieldValues($db_table, $db_col, $sort=false) 67 68 { 68 69 $app =& App::getInstance(); … … 73 74 $row = mysql_fetch_row($qid); 74 75 if (preg_match('/^enum|^set/i', $row[1]) && preg_match_all("/'([^']*)'/", $row[1], $enum)) { 75 natsort($enum[1]); 76 if ($sort) { 77 natsort($enum[1]); 78 } 76 79 return $enum[1]; 77 80 } else { … … 87 90 * @param string $db_table database table to lookup 88 91 * @param string $db_col database column to lookup 89 */ 90 function printSetSelectForm($db_table, $db_col, $preselected, $blank=false) 91 { 92 $values = getSetEnumFieldValues($db_table, $db_col); 92 * @param bool $sort Sort the output. 93 */ 94 function printSetSelectForm($db_table, $db_col, $preselected, $blank=false, $sort=false) 95 { 96 $values = getSetEnumFieldValues($db_table, $db_col, $sort); 93 97 if ($values === false) { 94 98 ?><option value=""> </option> … … 121 125 * @param string $db_table database table to lookup 122 126 * @param string $db_col database column to lookup 123 */ 124 function printEnumRadios($name, $db_table, $db_col, $preselected, $blank=false) 125 { 126 $values = getSetEnumFieldValues($db_table, $db_col); 127 * @param bool $sort Sort the output. 128 */ 129 function printEnumRadios($name, $db_table, $db_col, $preselected, $blank=false, $sort=false) 130 { 131 $values = getSetEnumFieldValues($db_table, $db_col, $sort); 127 132 if ($values === false) { 128 133 return false; … … 145 150 * @param int $columns number of table columns to print 146 151 * @param int $flag set to 'allone' for name of input fields to all be the same of a multidimentional array. 147 */ 148 function printSetCheckboxes($db_table, $db_col, $preselected, $columns=1, $flag=null) 152 * @param bool $sort Sort the output. 153 */ 154 function printSetCheckboxes($db_table, $db_col, $preselected, $columns=1, $flag=null, $sort) 149 155 { 150 156 ?> … … 166 172 167 173 // Retreive values of a Set or ENUM database column. 168 $values = getSetEnumFieldValues($db_table, $db_col );174 $values = getSetEnumFieldValues($db_table, $db_col, $sort); 169 175 170 176 // Initialize the HTML table generation vars. … … 222 228 * @param array $preselected array of preselected values (matching the values in $db_col) 223 229 * @param int $columns number of table columns to print 224 * @param int $flag set to 'allone' for name of input fields to all be the same of a multidimentional array.225 */ 226 function printSetRadios($db_table, $db_col, $preselected, $columns=1, $ flag=null)230 * @param bool $sort Sort the output. 231 */ 232 function printSetRadios($db_table, $db_col, $preselected, $columns=1, $sort=false) 227 233 { 228 234 ?> … … 244 250 245 251 // Retreive values of a Set or ENUM database column. 246 $values = getSetEnumFieldValues($db_table, $db_col );252 $values = getSetEnumFieldValues($db_table, $db_col, $sort); 247 253 248 254 // Initialize the HTML table generation vars. -
trunk/services/admins.php
r266 r295 39 39 40 40 // Instantiate a sorting object with the default sort and order. Add SQL for each column. 41 $so = new SortOrder('admin_ tbl.admin_id', 'DESC');42 $so->setColumn('admin_ tbl.admin_id', 'admin_tbl.admin_id ASC', 'admin_tbl.admin_idDESC');43 $so->setColumn(' admin_tbl.username', 'admin_tbl.username ASC', 'admin_tbl.usernameDESC');44 $so->setColumn(' admin_tbl.userpass', 'admin_tbl.userpass ASC', 'admin_tbl.userpass DESC');45 $so->setColumn(' admin_tbl.first_name', 'admin_tbl.first_name ASC', 'admin_tbl.first_name DESC');46 $so->setColumn(' admin_tbl.last_name', 'admin_tbl.last_name ASC', 'admin_tbl.last_name DESC');47 $so->setColumn(' admin_tbl.email', 'admin_tbl.email ASC', 'admin_tbl.email DESC');48 $so->setColumn(' admin_tbl.user_type', 'admin_tbl.user_type ASC', 'admin_tbl.user_type DESC');49 $so->setColumn(' admin_tbl.seconds_online', 'admin_tbl.seconds_online ASC', 'admin_tbl.seconds_online DESC');50 $so->setColumn(' admin_tbl.last_login_datetime', 'admin_tbl.last_login_datetime ASC', 'admin_tbl.last_login_datetime DESC');51 $so->setColumn(' admin_tbl.last_access_datetime', 'admin_tbl.last_access_datetime ASC', 'admin_tbl.last_access_datetime DESC');52 $so->setColumn(' admin_tbl.last_login_ip', 'admin_tbl.last_login_ip ASC', 'admin_tbl.last_login_ip DESC');53 $so->setColumn('ad min_tbl.added_by_user_id', 'admin_tbl.added_by_user_id ASC', 'admin_tbl.added_by_user_id DESC');54 $so->setColumn(' admin_tbl.modified_by_user_id', 'admin_tbl.modified_by_user_id ASC', 'admin_tbl.modified_by_user_id DESC');55 $so->setColumn('ad min_tbl.added_datetime', 'admin_tbl.added_datetime ASC', 'admin_tbl.added_datetime DESC');56 $so->setColumn(' admin_tbl.modified_datetime', 'admin_tbl.modified_datetime ASC', 'admin_tbl.modified_datetime DESC');41 $so = new SortOrder('admin_id', 'DESC'); 42 $so->setColumn('admin_id', $auth->getParam('db_primary_key') . ' ASC', $auth->getParam('db_primary_key') . ' DESC'); 43 $so->setColumn('username', $auth->getParam('db_username_column') . ' ASC', $auth->getParam('db_username_column') . ' DESC'); 44 $so->setColumn('userpass', $auth->getParam('db_table') . '.userpass ASC', $auth->getParam('db_table') . '.userpass DESC'); 45 $so->setColumn('first_name', $auth->getParam('db_table') . '.first_name ASC', $auth->getParam('db_table') . '.first_name DESC'); 46 $so->setColumn('last_name', $auth->getParam('db_table') . '.last_name ASC', $auth->getParam('db_table') . '.last_name DESC'); 47 $so->setColumn('email', $auth->getParam('db_table') . '.email ASC', $auth->getParam('db_table') . '.email DESC'); 48 $so->setColumn('user_type', $auth->getParam('db_table') . '.user_type ASC', $auth->getParam('db_table') . '.user_type DESC'); 49 $so->setColumn('seconds_online', $auth->getParam('db_table') . '.seconds_online ASC', $auth->getParam('db_table') . '.seconds_online DESC'); 50 $so->setColumn('last_login_datetime', $auth->getParam('db_table') . '.last_login_datetime ASC', $auth->getParam('db_table') . '.last_login_datetime DESC'); 51 $so->setColumn('last_access_datetime', $auth->getParam('db_table') . '.last_access_datetime ASC', $auth->getParam('db_table') . '.last_access_datetime DESC'); 52 $so->setColumn('last_login_ip', $auth->getParam('db_table') . '.last_login_ip ASC', $auth->getParam('db_table') . '.last_login_ip DESC'); 53 $so->setColumn('added_by_user_id', $auth->getParam('db_table') . '.added_by_user_id ASC', $auth->getParam('db_table') . '.added_by_user_id DESC'); 54 $so->setColumn('modified_by_user_id', $auth->getParam('db_table') . '.modified_by_user_id ASC', $auth->getParam('db_table') . '.modified_by_user_id DESC'); 55 $so->setColumn('added_datetime', $auth->getParam('db_table') . '.added_datetime ASC', $auth->getParam('db_table') . '.added_datetime DESC'); 56 $so->setColumn('modified_datetime', $auth->getParam('db_table') . '.modified_datetime ASC', $auth->getParam('db_table') . '.modified_datetime DESC'); 57 57 58 58 // Instantiate page numbers. Total items are set and calculation is done in the getRecordList function. … … 143 143 if (getFormdata('cancel', false)) { 144 144 // Remove lock 145 $lock->select( 'admin_tbl', 'admin_id', getFormData('admin_id'));145 $lock->select($auth->getParam('db_table'), $auth->getParam('db_primary_key'), getFormData('admin_id')); 146 146 $lock->remove(); 147 147 if ($app->validBoomerangURL('admins')) { … … 162 162 if (getFormdata('repeat', false)) { 163 163 // Display edit function with next available ID. 164 $qid = $db->query("SELECT admin_id FROM admin_tbl WHERE admin_id > '" . $db->escapeString(getFormData('admin_id')) . "' ORDER BY admin_idASC LIMIT 1");164 $qid = $db->query("SELECT " . $auth->getParam('db_primary_key') . " FROM " . $auth->getParam('db_table') . " WHERE " . $auth->getParam('db_primary_key') . " > '" . $db->escapeString(getFormData('admin_id')) . "' ORDER BY " . $auth->getParam('db_primary_key') . " ASC LIMIT 1"); 165 165 if (list($next_id) = mysql_fetch_row($qid)) { 166 166 $app->dieURL($_SERVER['PHP_SELF'] . '?op=edit&admin_id=' . $next_id); … … 265 265 function &editRecordForm($id) 266 266 { 267 global $auth; 267 268 global $lock; 268 269 $app =& App::getInstance(); 269 270 $db =& DB::getInstance(); 270 271 271 $lock->select( 'admin_tbl', 'admin_id', $id);272 $lock->select($auth->getParam('db_table'), $auth->getParam('db_primary_key'), $id); 272 273 if ($lock->isLocked() && !$lock->isMine()) { 273 274 $lock->dieErrorPage(); … … 276 277 // Get the information for the form. 277 278 $qid = $db->query(" 278 SELECT * 279 FROM admin_tbl 280 WHERE admin_id = '" . $db->escapeString($id) . "' 279 SELECT *, 280 " . $auth->getParam('db_primary_key') . " AS admin_id 281 FROM " . $auth->getParam('db_table') . " 282 WHERE " . $auth->getParam('db_primary_key') . " = '" . $db->escapeString($id) . "' 281 283 "); 282 284 if (!$frm = mysql_fetch_assoc($qid)) { … … 287 289 288 290 // Lock this record. 289 $lock->set( 'admin_tbl', 'admin_id', $id, $frm['username']);291 $lock->set($auth->getParam('db_table'), $auth->getParam('db_primary_key'), $id, $frm['username']); 290 292 291 293 // Set misc values for the form. … … 328 330 $db =& DB::getInstance(); 329 331 330 $lock->select( 'admin_tbl', 'admin_id', $id);332 $lock->select($auth->getParam('db_table'), $auth->getParam('db_primary_key'), $id); 331 333 if ($lock->isLocked() && !$lock->isMine()) { 332 334 $lock->dieErrorPage(); … … 338 340 // Get the information for this object. 339 341 $qid = $db->query(" 340 SELECT username, user_type from admin_tbl341 WHERE admin_id= '" . $db->escapeString($id) . "'342 SELECT " . $auth->getParam('db_username_column') . ", user_type from " . $auth->getParam('db_table') . " 343 WHERE " . $auth->getParam('db_primary_key') . " = '" . $db->escapeString($id) . "' 342 344 "); 343 345 if (! list($name, $user_type) = mysql_fetch_row($qid)) { … … 348 350 349 351 // Get the information for this object. 350 $qid = $db->query("SELECT COUNT(*) from admin_tbl");352 $qid = $db->query("SELECT COUNT(*) from " . $auth->getParam('db_table') . ""); 351 353 list($num_admins) = mysql_fetch_row($qid); 352 354 if ('root' == $user_type && 'root' != $auth->get('user_type')) { … … 361 363 } else { 362 364 // Delete the record. 363 $db->query("DELETE FROM admin_tbl WHERE admin_id= '" . $db->escapeString($id) . "'");365 $db->query("DELETE FROM " . $auth->getParam('db_table') . " WHERE " . $auth->getParam('db_primary_key') . " = '" . $db->escapeString($id) . "'"); 364 366 $app->raiseMsg(sprintf(_("The admin <em>%s</em> has been deleted."), $name), MSG_SUCCESS, __FILE__, __LINE__); 365 367 } … … 381 383 // Insert record data. 382 384 $db->query(" 383 INSERT INTO admin_tbl(384 username,385 INSERT INTO " . $auth->getParam('db_table') . " ( 386 " . $auth->getParam('db_username_column') . ", 385 387 first_name, 386 388 last_name, … … 406 408 // Create version. 407 409 $version = Version::getInstance($auth); 408 $version->create( 'admin_tbl', 'admin_id', $last_insert_id, $frm['username']);410 $version->create($auth->getParam('db_table'), $auth->getParam('db_primary_key'), $last_insert_id, $frm['username']); 409 411 410 412 $app->raiseMsg(sprintf(_("The Administrator <em>%s</em> has been added."), $frm['username']), MSG_SUCCESS, __FILE__, __LINE__); … … 421 423 $db =& DB::getInstance(); 422 424 423 $lock->select( 'admin_tbl', 'admin_id', $frm['admin_id']);425 $lock->select($auth->getParam('db_table'), $auth->getParam('db_primary_key'), $frm['admin_id']); 424 426 if ($lock->isLocked() && !$lock->isMine()) { 425 427 $lock->dieErrorPage(); … … 437 439 // Update record data. 438 440 $db->query(" 439 UPDATE admin_tblSET440 username= '" . $db->escapeString($frm['username']) . "',441 UPDATE " . $auth->getParam('db_table') . " SET 442 " . $auth->getParam('db_username_column') . " = '" . $db->escapeString($frm['username']) . "', 441 443 first_name = '" . $db->escapeString($frm['first_name']) . "', 442 444 last_name = '" . $db->escapeString($frm['last_name']) . "', … … 445 447 modified_by_user_id = '" . $db->escapeString($auth->get('user_id')) . "', 446 448 modified_datetime = NOW() 447 WHERE admin_id= '" . $db->escapeString($frm['admin_id']) . "'449 WHERE " . $auth->getParam('db_primary_key') . " = '" . $db->escapeString($frm['admin_id']) . "' 448 450 "); 449 451 450 452 // Create version. 451 453 $version = Version::getInstance($auth); 452 $version->create( 'admin_tbl', 'admin_id', $frm['admin_id'], $frm['username']);454 $version->create($auth->getParam('db_table'), $auth->getParam('db_primary_key'), $frm['admin_id'], $frm['username']); 453 455 454 456 $app->raiseMsg(sprintf(_("The Administrator <em>%s</em> has been updated."), $frm['username']), MSG_SUCCESS, __FILE__, __LINE__); … … 464 466 global $tmp_prefs; 465 467 global $cache; 468 global $auth; 466 469 $db =& DB::getInstance(); 467 470 … … 474 477 $where_clause .= (empty($where_clause) ? 'WHERE' : 'AND') . " 475 478 ( 476 admin_tbl.usernameLIKE '%" . $db->escapeString($qry_words[$i]) . "%'477 OR admin_tbl.first_name LIKE '%" . $db->escapeString($qry_words[$i]) . "%'478 OR admin_tbl.last_name LIKE '%" . $db->escapeString($qry_words[$i]) . "%'479 OR admin_tbl.email LIKE '%" . $db->escapeString($qry_words[$i]) . "%'479 " . $auth->getParam('db_table') . "." . $auth->getParam('db_username_column') . " LIKE '%" . $db->escapeString($qry_words[$i]) . "%' 480 OR " . $auth->getParam('db_table') . ".first_name LIKE '%" . $db->escapeString($qry_words[$i]) . "%' 481 OR " . $auth->getParam('db_table') . ".last_name LIKE '%" . $db->escapeString($qry_words[$i]) . "%' 482 OR " . $auth->getParam('db_table') . ".email LIKE '%" . $db->escapeString($qry_words[$i]) . "%' 480 483 ) 481 484 "; … … 486 489 $qid = $db->query(" 487 490 SELECT COUNT(*) 488 FROM admin_tbl491 FROM " . $auth->getParam('db_table') . " 489 492 $where_clause 490 493 "); … … 498 501 $sql = " 499 502 SELECT 500 admin_tbl.*, 501 a1.username AS added_admin_username, 502 a2.username AS modified_admin_username 503 FROM admin_tbl 504 LEFT JOIN admin_tbl a1 ON (admin_tbl.added_by_user_id = a1.admin_id) 505 LEFT JOIN admin_tbl a2 ON (admin_tbl.modified_by_user_id = a2.admin_id) 503 " . $auth->getParam('db_table') . ".*, 504 " . $auth->getParam('db_table') . "." . $auth->getParam('db_primary_key') . " AS admin_id, 505 a1." . $auth->getParam('db_username_column') . " AS added_admin_username, 506 a2." . $auth->getParam('db_username_column') . " AS modified_admin_username 507 FROM " . $auth->getParam('db_table') . " 508 LEFT JOIN " . $auth->getParam('db_table') . " a1 ON (" . $auth->getParam('db_table') . ".added_by_user_id = a1." . $auth->getParam('db_primary_key') . ") 509 LEFT JOIN " . $auth->getParam('db_table') . " a2 ON (" . $auth->getParam('db_table') . ".modified_by_user_id = a2." . $auth->getParam('db_primary_key') . ") 506 510 $where_clause 507 511 " . $so->getSortOrderSQL() . " -
trunk/services/templates/admin_form.ihtml
r235 r295 1 1 <?php $fv->printErrorMessages(); ?> 2 2 3 <form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" >3 <form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" class="sc-form"> 4 4 <?php $app->printHiddenSession(); ?> 5 5 <input type="hidden" name="op" value="<?php echo $frm['new_op']; ?>" /> … … 46 46 <td> 47 47 <select name="user_type" class="sc-small"> 48 <?php printSetSelectForm('admin_tbl', 'user_type', $frm['user_type'], true); ?>48 <?php printSetSelectForm($auth->getParam('db_table'), 'user_type', $frm['user_type'], true); ?> 49 49 </select> 50 50 </td> -
trunk/services/templates/admin_list.ihtml
r270 r295 1 1 2 2 <?php $fv->printErrorMessages(); ?> 3 <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get"> 4 <?php $app->printHiddenSession(false); ?> 3 5 4 <div id="commandbox"> 6 <span class="sc-nowrap commanditem"><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=add'); ?>"><?php echo _("Add administrator"); ?></a></span>7 8 <div class="form">5 <span class="sc-nowrap commanditem"><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=add'); ?>"><?php echo _("Add Administrator"); ?></a></span> 6 <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get" class="sc-form"> 7 <?php $app->printHiddenSession(false); ?> 9 8 <input type="text" class="sc-small" size="20" name="search_query" value="<?php echo getFormData('search_query'); ?>" title="<?php echo oTxt(_("Fields searched: Admin id, Username, Userpass, First name, Last name, Email.")); ?>" /> 10 9 <input type="submit" value="<?php echo _("Search"); ?>" /> 11 </ div>10 </form> 12 11 </div> 13 12 14 13 <?php include 'list_info.ihtml'; ?> 15 14 15 <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get" class="sc-form"> 16 16 <table class="list"> 17 17 <tr> … … 33 33 <tr> 34 34 <td class="sc-padleft sc-nowrap"><a title="<?php printf(_("Edit %s"), oTxt($list[$i]['username'])) ?>" href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?op=edit&admin_id=' . $list[$i]['admin_id']); ?>"><img src="/admin/_widgets/edit.gif" alt="Edit" width="14" height="18" border="0" /></a> </td> 35 <td class="sc-padleft sc-nowrap"><a title="<?php printf(_("Versions of %s"), oTxt($list[$i]['username'])) ?>" href="<?php echo $app->oHREF( '/admin/versions.php?record_table=admin_tbl&record_key=admin_id&boomerang=true&record_val=' . $list[$i]['admin_id']); ?>"><img src="/admin/_widgets/subcategory.gif" alt="" width="18" height="14" border="0" /></a> </td>35 <td class="sc-padleft sc-nowrap"><a title="<?php printf(_("Versions of %s"), oTxt($list[$i]['username'])) ?>" href="<?php echo $app->oHREF(sprintf('/admin/versions.php?record_table=%s&record_key=%s&record_val=%s&boomerang=true', $auth->getParam('db_table'), $auth->getParam('db_primary_key'), $list[$i]['admin_id'])); ?>"><img src="/admin/_widgets/subcategory.gif" alt="" width="18" height="14" border="0" /></a> </td> 36 36 <td class="sc-nowrap"><?php echo oTxt($list[$i]['admin_id'], true); ?> </td> 37 37 <td class="sc-nowrap"><?php echo oTxt($list[$i]['username'], true); ?> </td> -
trunk/services/templates/lock.ihtml
r185 r295 4 4 } 5 5 ?> 6 <form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" >6 <form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" class="sc-form"> 7 7 <?php $app->printHiddenSession() ?> 8 8 <input type="hidden" name="lock_id" value="<?php echo $lock->getID(); ?>" /> -
trunk/services/templates/log_list.ihtml
r270 r295 1 <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get" >1 <form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get" class="sc-form"> 2 2 <?php $app->printHiddenSession(false); ?> 3 3 <div id="commandbox"> -
trunk/services/templates/login_form.ihtml
r291 r295 1 <form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" >1 <form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" class="sc-form"> 2 2 <?php $app->printHiddenSession() ?> 3 3 <table> -
trunk/services/templates/password.ihtml
r235 r295 1 1 <?php $fv->printErrorMessages(); ?> 2 2 3 <form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" >3 <form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" class="sc-form"> 4 4 <?php $app->printHiddenSession() ?> 5 5 <input type="hidden" name="op" value="update_password" /> -
trunk/services/templates/versions_list.ihtml
r270 r295 1 <form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" >1 <form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" class="sc-form"> 2 2 <?php $app->printHiddenSession() ?> 3 3 <input type="submit" name="op" value="<?php echo _("Cancel"); ?>" />
Note: See TracChangeset
for help on using the changeset viewer.