Changeset 510 for trunk/admin
- Timestamp:
- Feb 15, 2013, 11:02:13 PM (12 years ago)
- Location:
- trunk/admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/admin/UpdateTrace.php ¶
r508 r510 2395 2395 } 2396 2396 2397 function UpdateTo510($Manager) 2398 { 2399 global $System; 2400 2401 $Manager->Execute('ALTER TABLE `News` ADD `Title` VARCHAR( 255 ) NOT NULL AFTER `Time`'); 2402 $Manager->Execute('UPDATE `News` SET `Title` = (SELECT `Name` FROM `User` AS `T` WHERE `T`.`ID` = `User`)'); 2403 } 2404 2397 2405 $Updates = array( 2398 2406 498 => array('Revision' => 506, 'Function' => 'UpdateTo506'), 2407 506 => array('Revision' => 510, 'Function' => 'UpdateTo510'), 2399 2408 ); 2400 2409 -
TabularUnified trunk/admin/index.php ¶
r504 r510 31 31 32 32 $Output = '<form action="?action=addnew" method="POST">'. 33 'Uživatel: '.$User->Name.'('.$User->Id.')<br/> '. 33 'Uživatel: '.$User->Name.'('.$User->Id.')<br/> '. 34 'Nadpis: <input type="text" name="title" size="40"/><br/>'. 35 'Obsah: <textarea rows="8" cols="40" onkeydown="ResizeTextArea(this)" class="textedit" id="Text" name="text"></textarea><br/>'. 34 36 '<input type="submit" value="Uložit"/><br/>'. 35 '<textarea rows="8" cols="40" onkeydown="ResizeTextArea(this)" class="textedit" id="Text" name="text"></textarea>'.36 37 '</form>'; 37 38 return($Output); … … 42 43 global $System, $Config, $User; 43 44 44 if(array_key_exists('text', $_POST) )45 if(array_key_exists('text', $_POST) and array_key_exists('title', $_POST)) 45 46 { 46 $querty = 'INSERT INTO `News` ( `Time` ,`User` ,`Text`) VALUES ( NOW( ) , '.$User->Id.', "'.$_POST['text'].'")'; 47 $querty = 'INSERT INTO `News` (`Title`, `Time` ,`User` ,`Text`) VALUES ( "'.$_POST['title'].'", NOW( ) , '. 48 $User->Id.', "'.$_POST['text'].'")'; 47 49 $System->Database->query($querty); 48 50 $Output = ShowMessage('Aktualita uložena.'); -
TabularUnified trunk/admin/install.php ¶
r507 r510 3 3 $StopAfterUpdateManager = true; 4 4 include_once('../includes/global.php'); 5 include_once(' ../sql/UpdateTrace.php');5 include_once('UpdateTrace.php'); 6 6 $UpdateManager->Trace = $Updates; 7 7 $UpdateManager->InstallMethod = 'FullInstall';
Note:
See TracChangeset
for help on using the changeset viewer.