Changeset 376 for trunk/admin.php
- Timestamp:
- Mar 11, 2010, 8:40:32 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin.php
r365 r376 30 30 function ShowNewForm() 31 31 { 32 //global $User; 32 global $User; 33 33 34 echo ('<form action="admin.php?action=addnew" method="POST">'. 34 'Uživatel: '.$ _SESSION['User'].'('.$_SESSION['UserID'].')<br/> '.35 'Uživatel: '.$User->Name.'('.$User->Id.')<br/> '. 35 36 '<input type="submit" value="Uložit"/><br/>'. 36 37 '<textarea rows="8" cols="40" onkeydown="ResizeTextArea(this)" class="textedit" id="Text" name="text"></textarea>'. … … 40 41 function SaveNew() 41 42 { 42 global $Database, $Config ;43 global $Database, $Config, $User; 43 44 44 45 if(array_key_exists('text', $_POST)) 45 46 { 46 $querty = 'INSERT INTO `News` ( `Time` ,`User` ,`Text`) VALUES ( NOW( ) , '.$ _SESSION['UserID'].', "'.$_POST['text'].'")';47 $querty = 'INSERT INTO `News` ( `Time` ,`User` ,`Text`) VALUES ( NOW( ) , '.$User->Id.', "'.$_POST['text'].'")'; 47 48 $Database->SQLCommand($querty); 48 49 echo('Aktualita uložena!'); … … 64 65 ' AND (NOT EXISTS (SELECT `ID` FROM `Dictionary` WHERE `User`.`ID` = `Dictionary`.`User`))'. // Without dictionary words 65 66 ' AND (NOT EXISTS (SELECT `Id` FROM `News` WHERE `User`.`ID` = `News`.`User`))'. // Without news 66 ' AND (NOT EXISTS (SELECT `ID` FROM `ShoutBox` WHERE `User`.` User` = `ShoutBox`.`User`))'. // Without shoutbox messages67 ' AND (NOT EXISTS (SELECT `ID` FROM `ShoutBox` WHERE `User`.`Name` = `ShoutBox`.`User`))'. // Without shoutbox messages 67 68 ''; 68 69 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `User`'.$Condition); … … 112 113 } 113 114 114 if( Licence(LICENCE_ADMIN))115 if($User->Licence(LICENCE_ADMIN)) 115 116 { 116 117 if(array_key_exists('action', $_GET))
Note:
See TracChangeset
for help on using the changeset viewer.