Changeset 288
- Timestamp:
- Dec 22, 2009, 1:10:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/TranslationList.php
r287 r288 97 97 } 98 98 99 echo('<table class="BaseTable"><tr> 100 <th><a href="?group='.$GroupId.'&action='.$address.'&order=ID&desc='.$desc.'">Pořadové číslo</a></th> 101 <th><a href="?group='.$GroupId.'&action='.$address.'&order=entry&desc='.$desc.'">Identifikační číslo</a></th> 102 <th><a href="?group='.$GroupId.'&action='.$address.'&order='.$TranslationTree[$GroupId]['Items'][0]['Column'].'&desc='.$desc.'">Název</a></th> 103 <th>Verze</th>'); 104 if ($address == 'selection') echo('<th><a href="?group='.$GroupId.'&action='.$address.'&order=CountQuests&desc='.$desc.'">Výskyt</a></th>'); 105 else if ($address == 'connexion') echo ('<th>Již přeložil</th>'); 106 else if($address <> 'notran') echo('<th><a href="?group='.$GroupId.'&action='.$address.'&order=user&desc='.$desc.'">Uživatel</a></th>'); 107 echo('</tr>'); 99 $TableColumns = array( 100 array('Name' => 'ID', 'Title' => 'Pořadové číslo'), 101 array('Name' => 'entry', 'Title' => 'Identifikační číslo'), 102 array('Name' => $TranslationTree[$GroupId]['Items'][0]['Column'], 'Title' => 'Název'), 103 array('Name' => 'VersionStart', 'Title' => 'Verze'), 104 ); 105 if($address == 'selection') $TableColumns[] = array('Name' => 'CountQuests', 'Title' => 'Výskyt'); 106 else if($address == 'connexion') $TableColumns[] = array('Name' => '', 'Title' => 'Již přeložil'); 107 else if($address <> 'notran') $TableColumns[] = array('Name' => 'User', 'Title' => 'Překladatel'); 108 109 $Order = GetOrderTableHeader($TableColumns, 'ID'); 110 echo('<table class="BaseTable">'); 111 echo($Order['Output']); 108 112 109 113 //print_r($TranslationTree[$GroupId]['Items']); 110 $ID = $Database->SQLCommand($sql.' '.$ order.' '.$desc.' '.$limit);114 $ID = $Database->SQLCommand($sql.' '.$Order['SQL'].' '.$limit); 111 115 while($Line = mysql_fetch_assoc($ID)) 112 116 { -
trunk/dictionary.php
r287 r288 223 223 $PageList = GetPageList($DbRow[0]); 224 224 225 $sql_page = $sql.' '.$PageList['SQLLimit'];226 227 225 echo($PageList['Output']); 228 echo('<table width="98%" class="BaseTable"> 229 <tr><th>Angličtina</th> 230 <th>'.$LanguageList[$_SESSION['language']]['Name'].'</th> 231 <th>Popis</th><th>Překladatel</th>'); 232 if(Licence(LICENCE_USER)) echo('<th>Akce</th>'); 233 echo('</tr>'); 226 227 $TableColumns = array( 228 array('Name' => 'Original', 'Title' => 'Angličtina'), 229 array('Name' => 'Translated', 'Title' => $LanguageList[$_SESSION['language']]['Name']), 230 array('Name' => 'Description', 'Title' => 'Popis'), 231 array('Name' => 'UserName', 'Title' => 'Překladatel'), 232 ); 233 if(Licence(LICENCE_USER)) $TableColumns[] = array('Name' => '', 'Title' => 'Akce'); 234 $Order = GetOrderTableHeader($TableColumns, 'Original'); 235 echo('<table width="98%" class="BaseTable">'); 236 echo($Order['Output']); 237 238 $sql_page = $sql.$Order['SQL'].$PageList['SQLLimit']; 234 239 $ID = $Database->SQLCommand($sql_page); 235 240 while($Line = mysql_fetch_assoc($ID)) -
trunk/includes/error.php
r205 r288 5 5 global $Config; 6 6 7 $Date = date('Y-m-d H:i:s'); 7 $Date = date('Y-m-d H:i:s'); // časové razítko položky 8 8 $ErrorType = array 9 9 ( … … 36 36 foreach($Backtrace as $Item) 37 37 { 38 print_r($Item); 38 39 $Error .= ' '.$Item['file'].'('.$Item['line'].")\t".$Item['function']; 39 40 $Arguments = ''; … … 51 52 //if($Config['Web']['ErrorLogFile'] != '') 52 53 //error_log($Error, 3, $Config['Web']['ErrorLogFile']); 53 54 // Pošli mi zprávu (pokud je to kritická chyba) 54 55 //mail($Config['Web']['AdminEmail'], $Config['Web']['Title'].' - Chybové hlášení', $Error); 55 56 57 58 56 // Show error message 57 if($Config['Web']['ShowPHPError'] == true) 58 { 59 echo('<?xml version="1.0" encoding="utf-8"?>'."\n". 59 60 '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'. 60 61 '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">'. … … 63 64 '</head><body>'. 64 65 'Došlo k vnitřní chybě!<br /> O chybě byl uvědoměn správce webu a chybu brzy odstraní.<br /><br />'); 65 echo('<pre>'.$Error.'</pre><br />');// V případě ladění chybu i zobraz66 echo('<pre>'.$Error.'</pre><br />'); // V případě ladění chybu i zobraz 66 67 echo('</body></html>'); 67 68 } 68 69 WriteLog($Error, 10); 69 70 if((E_ERROR | E_PARSE) & $Number) die(); -
trunk/includes/global_function.php
r286 r288 87 87 'Output' => $Result, 88 88 )); 89 } 90 91 $OrderDirSQL = array('ASC', 'DESC'); 92 $OrderArrowImage = array('sort_asc.png', 'sort_desc.png'); 93 94 function GetOrderTableHeader($Columns, $DefaultColumn) 95 { 96 global $OrderDirSQL, $OrderArrowImage; 97 98 if(array_key_exists('OrderCol', $_GET)) $_SESSION['OrderCol'] = $_GET['OrderCol']; 99 if(array_key_exists('OrderDir', $_GET)) $_SESSION['OrderDir'] = $_GET['OrderDir']; 100 if(!array_key_exists('OrderCol', $_SESSION)) $_SESSION['OrderCol'] = $DefaultColumn; 101 if(!array_key_exists('OrderDir', $_SESSION)) $_SESSION['OrderDir'] = 0; 102 103 // Check OrderCol 104 $Found = false; 105 foreach($Columns as $Column) 106 { 107 if($Column['Name'] == $_SESSION['OrderCol']) 108 { 109 $Found = true; 110 break; 111 } 112 } 113 if($Found == false) $_SESSION['OrderCol'] = $DefaultColumn; 114 // Check OrderDir 115 if(($_SESSION['OrderDir'] != 0) and ($_SESSION['OrderDir'] != 1)) $_SESSION['OrderDir'] = 0; 116 117 $Result = ''; 118 $QueryItems = GetQueryStringArray($_SERVER['QUERY_STRING']); 119 foreach($Columns as $Index => $Column) 120 { 121 $QueryItems['OrderCol'] = $Column['Name']; 122 $QueryItems['OrderDir'] = 1 - $_SESSION['OrderDir']; 123 if($Column['Name'] == $_SESSION['OrderCol']) $ArrowImage = '<img style="vertical-align: middle; border: 0px;" src="images/'.$OrderArrowImage[$_SESSION['OrderDir']].'" alt="order arrow">'; 124 else $ArrowImage = ''; 125 if($Column['Name'] == '') $Result .= '<th>'.$Column['Title'].'</th>'; 126 else $Result .= '<th><a href="?'.SetQueryStringArray($QueryItems).'">'.$Column['Title'].$ArrowImage.'</a></th>'; 127 } 128 return(array( 129 'SQL' => ' ORDER BY '.$_SESSION['OrderCol'].' '.$OrderDirSQL[$_SESSION['OrderDir']], 130 'Output' => '<tr>'.$Result.'</tr>') 131 ); 89 132 } 90 133 -
trunk/log.php
r285 r288 68 68 $PageList = GetPageList($DbRow[0]); 69 69 70 $sql = 'SELECT *,(SELECT `user`.`user` FROM `user` WHERE `user`.`id` = `log`.`user`) AS `user` FROM `log` '.$Where.' ORDER BY `date` DESC '.$PageList['SQLLimit'];71 72 70 echo($PageList['Output']); 73 echo('<table class="BaseTable"><tr><th>Čas</th><th>Text</th><th>Uživatel</th><th>Adresa</th></tr>'); 74 $ID = $Database->SQLCommand($sql); 71 72 $TableColumns = array( 73 array('Name' => 'date', 'Title' => 'Čas'), 74 array('Name' => 'text', 'Title' => 'Text'), 75 array('Name' => 'user', 'Title' => 'Uživatel'), 76 array('Name' => 'IP', 'Title' => 'Adresa'), 77 ); 78 $Order = GetOrderTableHeader($TableColumns, 'date'); 79 echo('<table width="98%" class="BaseTable">'); 80 echo($Order['Output']); 81 82 $sql = 'SELECT *,(SELECT `user`.`user` FROM `user` WHERE `user`.`id` = `log`.`user`) AS `user` FROM `log` '.$Where.$Order['SQL'].$PageList['SQLLimit']; 83 $ID = $Database->SQLCommand($sql); 75 84 while($Line = mysql_fetch_assoc($ID)) 76 85 { -
trunk/team.php
r284 r288 11 11 echo('<h3>Seznam překladatelských týmů</h3>'); 12 12 13 if(array_key_exists('Order', $_GET)) $_SESSION['Order'] = $_GET['Order'];14 else if(!array_key_exists('Order', $_SESSION)) $_SESSION['Order'] = 'numberuser';15 if(array_key_exists('Desc', $_GET)) $_SESSION['Desc'] = $_GET['Desc'];16 else if(!array_key_exists('Desc', $_SESSION)) $_SESSION['Desc'] = '';17 18 13 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `team`'); 19 14 $DbRow = mysql_fetch_row($DbResult); … … 22 17 echo($PageList['Output']); 23 18 echo('<table class="BaseTable">'); 19 20 $TableColumns = array( 21 array('Name' => 'name', 'Title' => 'Jméno'), 22 array('Name' => 'numberuser', 'Title' => 'Počet členů'), 23 ); 24 if(Licence(LICENCE_USER)) $TableColumns[] = array('Name' => '', 'Title' => 'Uživatelské akce'); 25 26 $Order = GetOrderTableHeader($TableColumns, 'numberuser'); 27 echo($Order['Output']); 24 28 25 29 if(array_key_exists('search', $_GET)) $_SESSION['search'] = ' WHERE `name` LIKE "%'.$_GET['search'].'%" OR `description` LIKE "%'.$_GET['search'].'%"'; … … 39 43 */ 40 44 41 $desc = $_SESSION['Desc']; 42 if($desc == '') $desc = 'DESC'; else $desc = ''; 43 44 //ochrana proti špatným údajům v session z jiných tabulek 45 if(($_SESSION['Order'] <> 'name') and ($_SESSION['Order'] <> 'numberuser') and ($_SESSION['Order'] <> 'description')) 46 $_SESSION['Order'] = 'numberuser'; 47 /* 48 49 <th><a href="?Order=NumberTranslate&Desc='.$desc.'" title="Počet přeložených textů">Přeložených</a></th> 50 <th><a href="?Order=XP&Desc='.$desc.'">Úroveň</a></th> 51 */ 52 echo('<tr><th><a href="?Order=name&Desc='.$desc.'">Jméno</a></th>'. 53 '<th><a href="?Order=numberuser&Desc='.$desc.'">Počet členů</a></th>'); 54 if(Licence(LICENCE_USER)) echo('<th>Uživatelské akce</th>'); 55 echo('</tr>'); 56 57 $ID = $Database->SQLCommand('SELECT *, (SELECT COUNT(*) FROM user WHERE user.team = team.ID) AS numberuser FROM team '.$_SESSION['search'].' ORDER BY '.$_SESSION['Order'].' '.$_SESSION['Desc'].' '.$PageList['SQLLimit']); 45 $ID = $Database->SQLCommand('SELECT *, (SELECT COUNT(*) FROM user WHERE user.team = team.ID) AS numberuser FROM team '.$_SESSION['search'].$Order['SQL'].$PageList['SQLLimit']); 58 46 while($Line = mysql_fetch_assoc($ID)) 59 47 { -
trunk/userlist.php
r284 r288 8 8 9 9 echo('<h3>Seznam uživatelů</h3>'); 10 if(array_key_exists('Order', $_GET)) $_SESSION['Order'] = $_GET['Order'];11 else if(!array_key_exists('Order', $_SESSION)) $_SESSION['Order'] = 'NumberTranslate';12 if(array_key_exists('Desc', $_GET)) $_SESSION['Desc'] = $_GET['Desc'];13 else if(!array_key_exists('Desc', $_SESSION)) $_SESSION['Desc'] = 'DESC';14 10 15 11 if(array_key_exists('search', $_GET)) … … 37 33 echo('<table class="BaseTable">'); 38 34 39 $desc = $_SESSION['Desc']; 40 if($desc == '') $desc = 'DESC'; else $desc = ''; 41 42 //ochrana proti špatným údajům v session z jiných tabulek 43 if (($_SESSION['Order'] <> 'user') and ($_SESSION['Order'] <> 'XP') and ($_SESSION['Order'] <> 'NumberTranslate') and ($_SESSION['Order'] <> 'GM') and ($_SESSION['Order'] <> 'LastLogin')) 44 $_SESSION['Order'] = 'NumberTranslate'; 45 46 echo('<tr><th><a href="?Order=user&Desc='.$desc.'">Jméno</a></th> 47 <th><a href="?Order=NumberTranslate&Desc='.$desc.'" title="Počet přeložených textů">Přeložených</a></th> 48 <th><a href="?Order=XP&Desc='.$desc.'">Úroveň</a></th> 49 <th><a href="?Order=GM&Desc='.$desc.'">Oprávnění</a></th> 50 <th><a href="?Order=LastLogin&Desc='.$desc.'">Poslední připojení</a></th></tr>'); 35 $TableColumns = array( 36 array('Name' => 'user', 'Title' => 'Jméno'), 37 array('Name' => 'NumberTranslate', 'Title' => 'Přeložených'), 38 array('Name' => 'XP', 'Title' => 'Úroveň'), 39 array('Name' => 'GM', 'Title' => 'Oprávnění'), 40 array('Name' => 'LastLogin', 'Title' => 'Poslední připojení'), 41 ); 42 $Order = GetOrderTableHeader($TableColumns, 'NumberTranslate'); 43 echo($Order['Output']); 51 44 52 45 $Columns = ''; … … 59 52 } 60 53 61 $Query = 'SELECT ID, user.user, LastLogin, GM, ('.substr($Columns, 0, -3).') as NumberTranslate FROM `user`'.$Joins.' '.$_SESSION['Where']. ' ORDER BY '.$_SESSION['Order'].' '.$_SESSION['Desc'].' '.$PageList['SQLLimit'];54 $Query = 'SELECT ID, user.user, LastLogin, GM, ('.substr($Columns, 0, -3).') as NumberTranslate FROM `user`'.$Joins.' '.$_SESSION['Where'].$Order['SQL'].$PageList['SQLLimit']; 62 55 63 56 $ID = $Database->SQLCommand($Query); -
trunk/version.php
r284 r288 11 11 echo('<h3>Verze hry</h3>'); 12 12 echo($PageList['Output']); 13 echo('<table class="BaseTable"><tr><th>Verze</th><th>Sestavení</th><th>Datum uvolnění</th><th>Titulek</th></tr>'); 14 $DbResult = $Database->SQLCommand('SELECT * FROM wow_client_version ORDER BY BuildNumber DESC '.$PageList['SQLLimit']); 13 14 $TableColumns = array( 15 array('Name' => 'Version', 'Title' => 'Verze'), 16 array('Name' => 'BuildNumber', 'Title' => 'Sestavení'), 17 array('Name' => 'ReleaseDate', 'Title' => 'Datum uvolnění'), 18 array('Name' => 'Title', 'Title' => 'Titutek'), 19 ); 20 $Order = GetOrderTableHeader($TableColumns, 'BuildNumber'); 21 echo('<table class="BaseTable">'); 22 echo($Order['Output']); 23 24 $DbResult = $Database->SQLCommand('SELECT * FROM wow_client_version '.$Order['SQL'].$PageList['SQLLimit']); 15 25 while($Version = mysql_fetch_assoc($DbResult)) 16 26 {
Note:
See TracChangeset
for help on using the changeset viewer.