Changeset 357 for trunk/admin.php
- Timestamp:
- Mar 5, 2010, 7:42:00 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin.php
r356 r357 1 1 <?php 2 2 3 include ('includes/global.php');3 include_once('includes/global.php'); 4 4 include_once('img_level.php'); 5 5 … … 32 32 //global $User; 33 33 echo ('<form action="admin.php?action=addnew" method="POST">'. 34 'Uživatel: '.$_SESSION['UserID'].'<br> '.35 36 37 34 'Uživatel: '.$_SESSION['User'].'('.$_SESSION['UserID'].')<br/> '. 35 '<input type="submit" value="Uložit"><br>'. 36 '<textarea rows="8" cols="40" onkeydown="ResizeTextArea(this)" class="textedit" id="Text" name="text"></textarea>'. 37 '</form>'); 38 38 39 39 } … … 49 49 50 50 } 51 WriteLog('Vložena nová aktualita', LOG_TYPE_ADMINISTRATION); 51 52 } 52 53 … … 97 98 // Set new leader for teams where old leader went to other team 98 99 $Database->SQLCommand('UPDATE Team SET Leader=(SELECT Id FROM `user` WHERE user.Team=Team.Id ORDER BY user.RegistrationTime LIMIT 1) WHERE Leader NOT IN (SELECT ID FROM user WHERE user.Team=Team.Id);'); 100 101 WriteLog('Smazány staré uživatelské účty', LOG_TYPE_ADMINISTRATION); 102 } 103 104 function DeleteErrorLog() 105 { 106 global $Database; 107 108 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `log` WHERE `type`='.LOG_TYPE_ERROR); 109 $DbRow = mysql_fetch_row($DbResult); 110 $Database->SQLCommand('DELETE FROM `log` WHERE `type`='.LOG_TYPE_ERROR); 111 WriteLog('Vymazány chybové záznamy', LOG_TYPE_ADMINISTRATION); 112 echo('Smazáno všech '.$DbRow[0].' chybových záznamů.<br/>'); 99 113 } 100 114 … … 107 121 ImgLevelShow(); 108 122 } else 109 if($_GET['action'] == 'delerrlog') 123 if($_GET['action'] == 'delerrlog') DeleteErrorLog(); 124 else 125 if($_GET['action'] == 'delolduser') DeleteOldUsers(); 126 else 127 if($_GET['action'] == 'addnew') 110 128 { 111 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `log` WHERE `type`=10');112 $DbRow = mysql_fetch_row($DbResult);113 $Database->SQLCommand('DELETE FROM `log` WHERE `type`=10');114 echo('Smazáno všech '.$DbRow[0].' chybových záznamů.<br/>');115 } else116 if($_GET['action'] == 'delolduser') DeleteOldUsers();117 else118 if ($_GET['action'] == 'addnew') {119 129 SaveNew(); 120 130 ShowNewForm();
Note:
See TracChangeset
for help on using the changeset viewer.