Changeset 22 for trunk/services
- Timestamp:
- Nov 23, 2005 9:29:33 PM (18 years ago)
- Location:
- trunk/services
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/services/admins.php
r21 r22 101 101 case 'insert' : 102 102 if (getFormdata('cancel', false)) { 103 if (App::validBoomerangURL('admins')) { 104 // Display boomerang page. 105 App::dieBoomerangURL('admins'); 106 } 107 // Display default page. 103 108 App::dieURL($_SERVER['PHP_SELF']); 104 109 } … … 130 135 if (getFormdata('cancel', false)) { 131 136 // Remove lock 132 $lock =& RecordLock::getInstance($GLOBALS['auth']);133 137 $lock->select('admin_tbl', 'admin_id', getFormData('admin_id')); 134 138 $lock->remove(); … … 252 256 function &editRecordForm($id) 253 257 { 254 $lock =& RecordLock::getInstance($GLOBALS['auth']); 258 global $lock; 259 255 260 $lock->select('admin_tbl', 'admin_id', $id); 256 261 if ($lock->isLocked() && !$lock->isMine()) { … … 305 310 function deleteRecord($id) 306 311 { 307 global $auth; 308 309 $lock =& RecordLock::getInstance($GLOBALS['auth']); 312 global $auth, $lock; 313 310 314 $lock->select('admin_tbl', 'admin_id', $id); 311 315 if ($lock->isLocked() && !$lock->isMine()) { … … 392 396 function updateRecord($frm) 393 397 { 394 global $auth; 395 396 $lock =& RecordLock::getInstance($GLOBALS['auth']); 398 global $auth, $lock; 399 397 400 $lock->select('admin_tbl', 'admin_id', $frm['admin_id']); 398 401 if ($lock->isLocked() && !$lock->isMine()) { -
trunk/services/lock.php
r21 r22 11 11 App::sslOn(); 12 12 13 if (getFormData('boomerang', false) && isset($_SERVER['HTTP_REFERER'])) {13 if (getFormData('boomerang', false)) { 14 14 // We remember which page we came from so we can go back there. 15 15 $boom_url = strpos(getFormData('boomerang'), '/') !== false ? getFormData('boomerang') : $_SERVER['HTTP_REFERER']; 16 16 App::setBoomerangURL($boom_url, 'lock'); 17 App::setBoomerangURL($_SERVER['HTTP_REFERER'], 'cancel-lock'); 17 18 } 18 19 19 $lock =& RecordLock::getInstance($GLOBALS['auth']); 20 if (!isset($lock) || !is_a($lock, 'RecordLock')) { 21 $lock =& RecordLock::getInstance($auth); 22 } 20 23 $lock->select(getFormData('lock_id')); 21 24 … … 31 34 App::dieBoomerangURL('lock'); 32 35 } else if (getFormData('cancel', false)) { 33 App::dieBoomerangURL('lock'); 36 // Since the boomerang URL will go back to the locked record, and the record was not unlocked, we must delete the boomerang URL otherwise we'll come back here. 37 App::deleteBoomerangURL('lock'); 38 App::dieBoomerangURL('cancel-lock'); 34 39 } 35 40 -
trunk/services/logout.php
r21 r22 8 8 9 9 // Delete this admin's record locks. 10 $lock =& RecordLock::getInstance($GLOBALS['auth']); 10 if (!isset($lock) || !is_a($lock, 'RecordLock')) { 11 $lock =& RecordLock::getInstance($auth); 12 } 11 13 $lock->removeAll($auth->getVal('user_id')); 12 14 -
trunk/services/logs.php
r21 r22 8 8 9 9 $auth->requireLogin(); 10 $auth->requireAccessClearance(ZONE_ADMIN_APPLOG);10 // $auth->requireAccessClearance(ZONE_ADMIN_APPLOG); 11 11 App::sslOn(); 12 12 … … 55 55 switch (getFormData('op')) { 56 56 case 'delete' : 57 $auth->requireAccessClearance(ZONE_ADMIN_APPLOG_FUNC_RESET);57 // $auth->requireAccessClearance(ZONE_ADMIN_APPLOG_FUNC_RESET); 58 58 deleteLog(Prefs::getValue('log_file', 'logs_module')); 59 59 Prefs::setValue('log_file', App::getParam('log_filename'), 'logs_module'); … … 67 67 68 68 case 'clear' : 69 $auth->requireAccessClearance(ZONE_ADMIN_APPLOG_FUNC_RESET);69 // $auth->requireAccessClearance(ZONE_ADMIN_APPLOG_FUNC_RESET); 70 70 clearLog(Prefs::getValue('log_file', 'logs_module')); 71 71 if (App::validBoomerangURL('app_log')) { … … 78 78 79 79 case 'archive' : 80 $auth->requireAccessClearance(ZONE_ADMIN_APPLOG_FUNC_RESET);80 // $auth->requireAccessClearance(ZONE_ADMIN_APPLOG_FUNC_RESET); 81 81 if (archiveLog(Prefs::getValue('log_file', 'logs_module'))) { 82 82 // Now flush current log. -
trunk/services/templates/admin_form.ihtml
r21 r22 10 10 <tr> 11 11 <td> </td> 12 <td valign="top"><?php printSubmitButtons($frm['submit_buttons']); ?></td>12 <td><?php printSubmitButtons($frm['submit_buttons']); ?></td> 13 13 </tr> 14 14 <tr> 15 15 <td class="right"><label for="username"<?php $fv->err('username', ' class="error"') ?>><?php echo _("Username"); ?></label></td> 16 <td valign="top">16 <td> 17 17 <input type="text" class="small" size="50" name="username" value="<?php echo oTxt($frm['username']); ?>" /> 18 18 </td> … … 20 20 <tr> 21 21 <td class="right"><label for="userpass"<?php $fv->err('userpass', ' class="error"') ?>><?php echo _("Password"); ?></label></td> 22 <td valign="top">22 <td> 23 23 <input type="password" class="small" size="50" name="userpass" value="<?php echo oTxt($frm['userpass']); ?>" /> 24 24 </td> … … 26 26 <tr> 27 27 <td class="right"><label for="first_name"<?php $fv->err('first_name', ' class="error"') ?>><?php echo _("First name"); ?></label></td> 28 <td valign="top">28 <td> 29 29 <input type="text" class="small" size="50" name="first_name" value="<?php echo oTxt($frm['first_name']); ?>" /> 30 30 </td> … … 32 32 <tr> 33 33 <td class="right"><label for="last_name"<?php $fv->err('last_name', ' class="error"') ?>><?php echo _("Last name"); ?></label></td> 34 <td valign="top">34 <td> 35 35 <input type="text" class="small" size="50" name="last_name" value="<?php echo oTxt($frm['last_name']); ?>" /> 36 36 </td> … … 38 38 <tr> 39 39 <td class="right"><label for="email"<?php $fv->err('email', ' class="error"') ?>><?php echo _("Email"); ?></label></td> 40 <td valign="top">40 <td> 41 41 <input type="text" class="medium" size="50" name="email" value="<?php echo oTxt($frm['email']); ?>" /> 42 42 </td> … … 44 44 <tr> 45 45 <td class="right"><label for="user_type"<?php $fv->err('user_type', ' class="error"') ?>><?php echo _("User type"); ?></label></td> 46 <td valign="top">46 <td> 47 47 <select name="user_type" class="small"> 48 48 <?php printSetSelectForm('admin_tbl', 'user_type', $frm['user_type'], true); ?> … … 52 52 <tr> 53 53 <td> </td> 54 <td valign="top"><?php printSubmitButtons($frm['submit_buttons']); ?></td>54 <td><?php printSubmitButtons($frm['submit_buttons']); ?></td> 55 55 </tr> 56 56 </table> -
trunk/services/templates/lock.ihtml
r21 r22 1 1 <?php 2 if (!is_a($lock )) {2 if (!is_a($lock, 'RecordLock')) { 3 3 return null; 4 4 } -
trunk/services/templates/login_form.ihtml
r21 r22 4 4 <tr> 5 5 <td class="right"><label for="username"><?php echo _("Username"); ?></label></td> 6 <td valign="top">7 <input type="text" class=" medium" size="20" name="username" value="<?php echo oTxt($frm['username']); ?>" />6 <td> 7 <input type="text" class="small" size="20" name="username" value="<?php echo oTxt($frm['username']); ?>" /> 8 8 </td> 9 9 </tr> 10 10 <tr> 11 11 <td class="right"><label for="password"><?php echo _("Password"); ?></label></td> 12 <td valign="top">13 <input type="password" class=" medium" size="20" name="password" value="<?php echo oTxt($frm['password']); ?>" />12 <td> 13 <input type="password" class="small" size="20" name="password" value="<?php echo oTxt($frm['password']); ?>" /> 14 14 </td> 15 15 </tr> 16 16 <tr> 17 17 <td> </td> 18 <td valign="top"><input type="submit" value="<?php echo _("Login"); ?>" /></td>18 <td><input type="submit" value="<?php echo _("Login"); ?>" /></td> 19 19 </tr> 20 20 </table> -
trunk/services/templates/password.ihtml
r21 r22 7 7 <tr> 8 8 <td class="right"><label for="oldpassword"<?php $fv->err('oldpassword', ' class="error"') ?>><?php echo _("Old password"); ?></label></td> 9 <td valign="top">9 <td> 10 10 <input type="text" class="medium" size="50" name="oldpassword" /> 11 11 </td> … … 13 13 <tr> 14 14 <td class="right"><label for="newpassword"<?php $fv->err('newpassword', ' class="error"') ?>><?php echo _("New password"); ?></label></td> 15 <td valign="top">15 <td> 16 16 <input type="password" class="medium" size="50" name="newpassword" /> 17 17 </td> … … 19 19 <tr> 20 20 <td class="right"><label for="newpassword2"<?php $fv->err('newpassword2', ' class="error"') ?>><?php echo _("New password again"); ?></label></td> 21 <td valign="top">21 <td> 22 22 <input type="password" class="medium" size="50" name="newpassword2" /> 23 23 </td> … … 25 25 <tr> 26 26 <td> </td> 27 <td valign="top"><input type="submit" value="<?php echo _("Change password"); ?>" /></td>27 <td><input type="submit" value="<?php echo _("Change password"); ?>" /></td> 28 28 </tr> 29 29 </table> -
trunk/services/versions.php
r21 r22 75 75 76 76 case 'restore' : 77 $lock =& RecordLock::getInstance($GLOBALS['auth']); 77 if (!isset($lock) || !is_a($lock, 'RecordLock')) { 78 $lock =& RecordLock::getInstance($auth); 79 } 78 80 $lock->select($record_table, $record_key, $record_val); 79 81 if ($lock->isLocked() && !$lock->isMine()) {
Note: See TracChangeset
for help on using the changeset viewer.