Changeset 539 for trunk/admin
- Timestamp:
- May 15, 2013, 12:44:32 AM (12 years ago)
- Location:
- trunk/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/UpdateTrace.php
r537 r539 2542 2542 } 2543 2543 2544 function UpdateTo539($Manager) 2545 { 2546 $Manager->Execute("CREATE TABLE IF NOT EXISTS `UserTrace` ( 2547 `Id` int(11) NOT NULL AUTO_INCREMENT, 2548 `User` int(11) NOT NULL, 2549 `LastLogin` datetime NOT NULL, 2550 `LastLogout` datetime NOT NULL, 2551 `LastIP` varchar(16) NOT NULL, 2552 `UserAgent` varchar(255) NOT NULL, 2553 PRIMARY KEY (`Id`), 2554 KEY `User` (`User`) 2555 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"); 2556 $Manager->Execute("ALTER TABLE `UserTrace` 2557 ADD CONSTRAINT `UserTrace_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`ID`);"); 2558 $Manager->Execute("INSERT INTO `UserTrace` (". 2559 "SELECT NULL AS `Id` , `User`.`Id` AS `User` , `User`.`LastLogin` AS `LastLogin` , `User`.`LastLogout` AS `LastLogout` , `User`.`LastIP` AS `LastIP` , '' AS `UserAgent` ". 2560 "FROM `User` WHERE 1 ) "); 2561 $Manager->Execute("ALTER TABLE `User` DROP `LastIP`, DROP `LastLogin`, DROP `LastLogout`;"); 2562 } 2563 2544 2564 $Updates = array( 2545 2565 498 => array('Revision' => 506, 'Function' => 'UpdateTo506'), … … 2547 2567 510 => array('Revision' => 524, 'Function' => 'UpdateTo524'), 2548 2568 524 => array('Revision' => 537, 'Function' => 'UpdateTo537'), 2569 537 => array('Revision' => 539, 'Function' => 'UpdateTo539'), 2549 2570 ); 2550 2571 -
trunk/admin/index.php
r538 r539 85 85 } 86 86 87 function ShowPHPInfo() 88 { 89 return(phpinfo()); 90 } 91 87 92 function Testing() 88 93 { 89 94 global $System; 90 95 91 $Output = '<a href="'.$System->Link('/admin/?action=error').'">Testovací chyba</a><br/>'. 96 $Output = '<a href="'.$System->Link('/admin/?action=phpinfo').'">PHP info</a><br/>'. 97 '<small>PHP informace</small><br/><br/>'. 98 '<a href="'.$System->Link('/admin/?action=error').'">Testovací chyba</a><br/>'. 92 99 '<small>Vyvolá testovací chybu</small><br/><br/>'. 93 100 '<a href="'.$System->Link('/admin/?action=exception').'">Testovací výjimka</a><br/>'. … … 109 116 else if($_GET['action'] == 'sqlerror') $Output .= TestSQLError('SELECT dads FROM sdas'); 110 117 else if($_GET['action'] == 'testing') $Output .= Testing(); 118 else if($_GET['action'] == 'phpinfo') $Output .= ShowPHPInfo(); 111 119 else if($_GET['action'] == 'addnew') 112 120 {
Note:
See TracChangeset
for help on using the changeset viewer.