Changeset 295 for trunk/action.php
- Timestamp:
- Dec 28, 2009, 10:21:57 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/action.php
r286 r295 1 1 <?php 2 2 3 include('includes/global.php'); 4 5 ShowPage(); 6 7 $GroupId = LoadGroupIdParameter(); 8 $Table = $TranslationTree[$GroupId]['TablePrefix']; 9 if(array_key_exists('action', $_GET)) $Action = $_GET['action']; else $Action = ''; 10 11 if(($Action == 'search')) 12 { 3 include_once('includes/global.php'); 4 5 function Search() 6 { 7 global $Database; 8 13 9 if(array_key_exists('search', $_GET)) $Search = $_GET['search']; 14 10 else $Search = $_POST['search']; … … 43 39 44 40 45 if(($Action == 'dbkit') and Licence(LICENCE_ADMIN)) 46 { 41 function DatabaseKit() 42 { 43 global $Database; 44 45 if(Licence(LICENCE_ADMIN)) 46 { 47 47 echo ('<form action="?action=dbkit" method="post">'); 48 48 echo('Najít: <input type="text" name="find" /><br />'); … … 152 152 } 153 153 } 154 } 155 156 157 if(($Action == 'delete') and Licence(LICENCE_MODERATOR)) 158 { 159 $TextID = $_GET['ID']; 160 $Database->SQLCommand('DELETE FROM '.$Table.' WHERE ID = '.$TextID.' AND Language <> 0'); 161 echo('Překlad byl smazán!'); 162 WriteLog('Překlad byl smazán! <a href="form.php?group='.$GroupID.'&ID='.$TextID.'">'.$TextID.'</a>', 4); 163 } 164 165 if($Action == 'shoutbox') 166 { 154 } 155 } 156 157 158 function Delete() 159 { 160 global $Database; 161 162 if(Licence(LICENCE_MODERATOR)) 163 { 164 $TextID = $_GET['ID']; 165 $Database->SQLCommand('DELETE FROM '.$Table.' WHERE ID = '.$TextID.' AND Language <> 0'); 166 echo('Překlad byl smazán!'); 167 WriteLog('Překlad byl smazán! <a href="form.php?group='.$GroupID.'&ID='.$TextID.'">'.$TextID.'</a>', 4); 168 } 169 } 170 171 function ShoutBox() 172 { 173 global $Database; 174 167 175 if(array_key_exists('shoutbox', $_GET)) $shoutbox = $_GET['shoutbox']; 168 176 else $shoutbox = ''; … … 192 200 } 193 201 202 ShowPage(); 203 204 $GroupId = LoadGroupIdParameter(); 205 $Table = $TranslationTree[$GroupId]['TablePrefix']; 206 if(array_key_exists('action', $_GET)) $Action = $_GET['action']; 207 else $Action = ''; 208 209 if($Action == 'shoutbox') ShoutBox(); 210 else if($Action == 'search') Search(); 211 else if($Action == 'delete') Delete(); 212 else if($Action == 'dbkit') DatabaseKit(); 213 194 214 ShowFooter(); 195 215
Note:
See TracChangeset
for help on using the changeset viewer.