Changeset 510 for trunk/admin/index.php
- Timestamp:
- Feb 15, 2013, 11:02:13 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.');
Note:
See TracChangeset
for help on using the changeset viewer.