Changeset 198
- Timestamp:
- Jun 5, 2009, 6:44:57 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dictionary.php
r167 r198 3 3 include('includes/global.php'); 4 4 5 function GetIDbyName($Table) { 5 function GetIDbyName($Table) 6 { 6 7 global $TranslationTree; 7 foreach($TranslationTree as $TableID => $Value) { 8 9 foreach($TranslationTree as $TableID => $Value) 10 { 8 11 //echo $Value['TablePrefix'].'='.$Table.'<br>'; 9 12 if ($Value['TablePrefix'] == $Table) return $TableID; … … 11 14 } 12 15 13 14 function GetTranslatNames($Text) { 15 global $Database,$mode; 16 function GetTranslatNames($Text) 17 { 18 global $Database, $mode; 19 16 20 if ($mode == 0) echo ('..Přesné'); 17 21 if ($mode == 1) echo ('..Všechny přeložené'); … … 19 23 echo('<div style="overflow: auto; width: 100%; height: 345px;"><table width="98%" class="BaseTable">'); 20 24 echo('<tr><th>Originál</th>'.'<th>Překlad</th>'); 21 $TablesColumn = array('gameobject' => 'Name', 22 'creature' => 'name', 23 'item' => 'Name', 24 'transports' => 'Name', 25 'areatrigger_teleport' => 'Name', 26 'areatrigger_tavern' => 'Name',); 25 $TablesColumn = array 26 ( 27 'gameobject' => 'Name', 28 'creature' => 'name', 29 'item' => 'Name', 30 'transports' => 'Name', 31 'areatrigger_teleport' => 'Name', 32 'areatrigger_tavern' => 'Name', 33 ); 27 34 /* $TablesID = array('gameobject' => 5, 28 35 'creature' => 6, … … 32 39 'areatrigger_tavern' => 'Name',); */ 33 40 34 35 36 foreach($TablesColumn as $Table => $Column) { 37 38 $sql = 'SELECT ID,'.$Column.',(SELECT Name FROM '.$Table.' as T WHERE O.entry = T.entry AND Language <> 0 LIMIT 1) as tran 39 FROM '.$Table.' as O WHERE '; 40 $groupby = ' GROUP BY '.$Column; 41 42 $ArrStr = explode(' ', $Text); 43 $where = 'Language = 0 '; 44 if ($mode == 1) $where .= ' AND EXISTS(SELECT 1 FROM '.$Table.' AS sub WHERE (sub.Language <> 0) AND (sub.entry = O.entry))'; 45 if ($mode == 2) $where .= ' AND NOT EXISTS(SELECT 1 FROM '.$Table.' AS sub WHERE (sub.Language <> 0) AND (sub.entry = O.entry))'; 46 $where .= ' AND ('; 47 48 for($i = 0; $i < count($ArrStr); $i++) 49 { 50 if (strpos($ArrStr[$i],'\'s') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-4); 51 if (strpos($ArrStr[$i],',') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-1); 52 if (strpos($ArrStr[$i],'.') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-1); 53 if (strpos($ArrStr[$i],'!') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-1); 54 if (strpos($ArrStr[$i],'?') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-1); 55 56 if (strlen($ArrStr[$i]) > 4) 57 $where .= 'O.'.$Column.' LIKE "%'.addslashes($ArrStr[$i]).'%" OR '; 41 foreach($TablesColumn as $Table => $Column) 42 { 43 $sql = 'SELECT ID,'.$Column.',(SELECT Name FROM '.$Table.' as T WHERE O.entry = T.entry AND Language <> 0 LIMIT 1) as tran FROM '.$Table.' as O WHERE '; 44 $groupby = ' GROUP BY '.$Column; 45 46 $ArrStr = explode(' ', $Text); 47 $where = 'Language = 0 '; 48 if ($mode == 1) $where .= ' AND EXISTS(SELECT 1 FROM '.$Table.' AS sub WHERE (sub.Language <> 0) AND (sub.entry = O.entry))'; 49 if ($mode == 2) $where .= ' AND NOT EXISTS(SELECT 1 FROM '.$Table.' AS sub WHERE (sub.Language <> 0) AND (sub.entry = O.entry))'; 50 $where .= ' AND ('; 51 52 for($i = 0; $i < count($ArrStr); $i++) 53 { 54 if (strpos($ArrStr[$i],'\'s') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-4); 55 if (strpos($ArrStr[$i],',') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-1); 56 if (strpos($ArrStr[$i],'.') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-1); 57 if (strpos($ArrStr[$i],'!') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-1); 58 if (strpos($ArrStr[$i],'?') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-1); 59 60 if (strlen($ArrStr[$i]) > 4) 61 $where .= 'O.'.$Column.' LIKE "%'.addslashes($ArrStr[$i]).'%" OR '; 62 } 63 $where = substr($where,0,strlen($where)-4); 64 $where .= ')'; 65 echo ('</tr>'); 66 67 $ID = $Database->SQLCommand($sql.$where.$groupby); 68 while($Line = mysql_fetch_assoc($ID)) 69 { 70 if ($mode == 0) 71 { 72 if (strpos(strtolower($Text),strtolower($Line[$Column])) > 0) 73 { 74 echo('<tr><td>'.$Line[$Column].'</td>'); 75 if ($Line['tran'] <> '') echo('<td>'.$Line['tran'].'</td></tr>'); 76 else echo('<td><a target="_NEW2" href="form.php?group='.GetIDbyName($Table).'&ID='.$Line['ID'].'">Překládat</a></td></tr>'); 77 } 78 } else 79 { 80 echo('<tr><td>'.$Line[$Column].'</td>'); 81 if ($Line['tran'] <> '') echo('<td>'.$Line['tran'].'</td></tr>'); 82 else echo('<td><a target="_NEW2" href="form.php?group='.GetIDbyName($Table).'&ID='.$Line['ID'].'">Překládat</a></td></tr>'); 83 } 84 } 58 85 } 59 $where = substr($where,0,strlen($where)-4);60 $where .= ')';61 echo ('</tr>');62 63 $ID = $Database->SQLCommand($sql.$where.$groupby);64 while($Line = mysql_fetch_assoc($ID)) {65 if ($mode == 0) {66 if (strpos(strtolower($Text),strtolower($Line[$Column])) > 0) {67 echo('<tr><td>'.$Line[$Column].'</td>');68 if ($Line['tran'] <> '') echo('<td>'.$Line['tran'].'</td></tr>');69 else echo('<td><a target="_NEW2" href="form.php?group='.GetIDbyName($Table).'&ID='.$Line['ID'].'">Překládat</a></td></tr>');70 }71 } else {72 echo('<tr><td>'.$Line[$Column].'</td>');73 if ($Line['tran'] <> '') echo('<td>'.$Line['tran'].'</td></tr>');74 else echo('<td><a target="_NEW2" href="form.php?group='.GetIDbyName($Table).'&ID='.$Line['ID'].'">Překládat</a></td></tr>');75 }76 }77 }78 86 echo('</table></div>'); 79 87 } 80 88 81 82 echo('<?xml version="1.0" encoding="'.$Config['Web']['Charset'].'"?> 83 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 84 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 85 <head> 86 <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 87 <link rel="stylesheet" href="'.$Config['Web']['BaseURL'].'style/style.css" type="text/css" media="all" /> 88 <script type="text/javascript" src="'.$Config['Web']['BaseURL'].'global.js"></script> 89 <link rel="SHORTCUT ICON" href="'.$Config['Web']['BaseURL'].'images/favicon.ico" /> 90 <title>Projekt překládání textů WoW - slovníček</title> 91 </head> 92 <body style="margin: 0px; font-family: Verdana, Arial, Sans-Serif;">'); 93 94 95 96 if (array_key_exists('group',$_GET)) { 97 89 if(array_key_exists('Page', $_GET)) $_SESSION['Page'] = $_GET['Page']; 90 else if(!array_key_exists('Page', $_SESSION)) $_SESSION['Page'] = 1; 91 92 if(!isset($_SESSION['language'])) 93 { 94 if(Licence(LICENCE_USER)) 95 { 96 $DbResult = $Database->SQLCommand('SELECT Language FROM user WHERE ID='.$_SESSION['UserID']); 97 $User = mysql_fetch_assoc($DbResult); 98 $_SESSION['language'] = $User['Language']; 99 } else $_SESSION['language'] = 1; 100 } 101 if(array_key_exists('language', $_GET)) $_SESSION['language'] = $_GET['language']; 102 103 ShowPage(); 104 105 echo('<h3>Slovníček</h3>'); 106 107 if(array_key_exists('group', $_GET)) 108 { 98 109 if(array_key_exists('group', $_GET)) $GroupId = $_GET['group']; else $GroupId = 1; 99 110 if(array_key_exists('mode', $_GET)) $mode = $_GET['mode']; else $mode = 0; //0 = přesné názvy, 1=všechny názvy, 2=nepřeložené 100 111 $Table = $TranslationTree[$GroupId]['TablePrefix']; 101 112 102 if(array_key_exists('ID', $_GET)) { 103 $TextID = $_GET['ID']; 113 if(array_key_exists('ID', $_GET)) 114 { 115 $TextID = $_GET['ID']; 104 116 echo ('Přeložené názvy vztahující se k překladu: <a target="_NEW" href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a><br />'. 105 117 '<a href="?mode=1&group='.$GroupId.'&ID='.$TextID.'" title="Zobrazit všechny podobné výsledky">Všechny</a> '. 106 118 '<a href="?mode=0&group='.$GroupId.'&ID='.$TextID.'" title="Zobrazit pouze přesné výsledky">Přesné</a> '. 107 119 '<a href="?mode=2&group='.$GroupId.'&ID='.$TextID.'" title="Zobrazit všechny nepřeložené">Nepřeložené</a> '); 108 109 120 $Line = mysql_fetch_assoc($Database->SQLCommand('SELECT * FROM '.$Table.' Where ID = '.$TextID)); 121 if(!$Line) die('Překlad nenalezen.'); 110 122 111 123 $Text = ''; … … 114 126 GetTranslatNames($Text); 115 127 } 116 117 } else {118 if(array_key_exists('insert', $_GET))119 {120 echo('<form action="dictionary.php" method="post">121 <input type="text" name="AJWord"> Anglické slovo<br />122 <input type="text" name="CZWord"> České slovo<br />123 <input type="text" name="description"> Popis<br />124 <input type="submit" value="Uložit">125 </form>');126 $WinWidth = 230;127 } else128 {129 $WinWidth = 345;130 if (array_key_exists('AJWord', $_POST))131 {132 $AJWord = $_POST['AJWord'];133 $CZWord = $_POST['CZWord'];134 $description = $_POST['description'];135 $user = @$_SESSION['UserID'];136 $Database->SQLCommand("INSERT INTO `dictionary` ( `AJWord` , `CZWord` , `description` , `user` ) VALUES ('$AJWord', '$CZWord', '$description', '$user');");137 echo('Záznam byl uložen!');138 $WinWidth = 325;139 }140 }141 142 echo('<form action="dictionary.php" method="get" style="margin: 0px; padding: 0px;">143 <table style="width: 100%; height: 100%;">');144 145 if(array_key_exists('search', $_GET))146 {147 $Search = $_GET['search'];148 128 } else 149 { 150 $Search = ''; 151 } 129 { 130 if(array_key_exists('action', $_GET)) 131 { 132 if(($_GET['action'] == 'insert') and Licence(LICENCE_USER)) 133 { 134 echo('<form action="dictionary.php?action=save" method="post">'. 135 '<fieldset><legend>Vložení nového slova</legend>'. 136 '<table><tr><td>'. 137 'Původní anglické slovo:</td><td><input type="text" name="Original" /></td></tr>'. 138 '<tr><td>Přeložené:</td><td><input type="text" name="Translated" /></td></tr>'. 139 '<tr><td>Popis:</td><td><input type="text" name="Description" /></td></tr>'. 140 '<tr><td colspan="2"><input type="submit" value="Uložit" /></td></tr>'. 141 '</td></tr></table>'. 142 '</fieldset>'. 143 '</form>'); 144 } else 145 if(($_GET['action'] == 'save') and Licence(LICENCE_USER)) 146 { 147 $DbResult = $Database->SQLCommand('SELECT * FROM `dictionary` WHERE `Text` = "'.$_POST['Original'].'" AND Language=0'); 148 if(mysql_num_rows($DbResult) > 0) 149 { 150 $DbRow = mysql_fetch_assoc($DbResult); 151 $Entry = $DbRow['Entry']; 152 } else 153 { 154 $DbResult = $Database->SQLCommand('SELECT MAX(Entry) FROM dictionary'); 155 $DbRow = mysql_fetch_row($DbResult); 156 $Entry = $DbRow[0] + 1; 157 $Database->SQLCommand('INSERT INTO `dictionary` ( `Text` , `Entry` , `Description` , `User`, `Language` ) VALUES ("'.$_POST['Original'].'", "'.$Entry.'", "", 0, 0);'); 158 } 159 160 $DbResult = $Database->SQLCommand('SELECT Id FROM `dictionary` WHERE `Entry` = '.$Entry.' AND Language='.$_SESSION['language'].' AND User='.$_SESSION['UserID']); 161 if(mysql_num_rows($DbResult) > 0) 162 { 163 $DbRow = mysql_fetch_assoc($DbResult); 164 $Database->SQLCommand('UPDATE `dictionary` SET `Text`="'.$_POST['Translated'].'", `Description` = "'.$_POST['Description'].'" WHERE Id='.$DbRow['Id']); 165 } else 166 $Database->SQLCommand('INSERT INTO `dictionary` ( `Text` , `Entry` , `Description` , `User`, `Language` ) VALUES ("'.$_POST['Translated'].'", "'.$Entry.'", "'.$_POST['Description'].'", '.$_SESSION['UserID'].', '.$_SESSION['language'].')'); 167 echo('Záznam byl uložen!'); 168 } else 169 if(($_GET['action'] == 'remove') and Licence(LICENCE_USER)) 170 { 171 $Database->SQLCommand('DELETE FROM dictionary WHERE User='.$_SESSION['UserID'].' AND Language='.$_SESSION['language'].' AND Entry='.$_GET['entry']); 172 } else 173 if(($_GET['action'] == 'modify') and Licence(LICENCE_USER)) 174 { 175 $DbResult = $Database->SQLCommand('SELECT * FROM dictionary WHERE User='.$_SESSION['UserID'].' AND Entry='.$_GET['entry'].' AND Language='.$_SESSION['language']); 176 $DbRow = mysql_fetch_assoc($DbResult); 177 $DbResult = $Database->SQLCommand('SELECT * FROM dictionary WHERE User=0 AND Entry='.$_GET['entry'].' AND Language=0'); 178 $DbRow2 = mysql_fetch_assoc($DbResult); 179 echo('<form action="dictionary.php?action=save" method="post">'. 180 '<fieldset><legend>Upravení slova</legend>'. 181 '<table><tr><td>'. 182 'Původní anglické slovo:</td><td><input type="text" name="Original" value="'.$DbRow2['Text'].'" /></td></tr>'. 183 '<tr><td>Přeložené:</td><td><input type="text" name="Translated" value="'.$DbRow['Text'].'" /></td></tr>'. 184 '<tr><td>Popis:</td><td><input type="text" name="Description" value="'.$DbRow['Description'].'" /></td></tr>'. 185 '<tr><td colspan="2"><input type="submit" value="Uložit" /></td></tr>'. 186 '</td></tr></table>'. 187 '</fieldset>'. 188 '</form>'); 189 } 190 } 191 192 echo('<form action="dictionary.php" method="get" style="margin: 0px; padding: 0px;">'. 193 '<table style="width: 100%; height: 100%;">'); 194 195 if(array_key_exists('search', $_GET)) $Search = $_GET['search']; 196 else $Search = ''; 152 197 153 echo('<tr><td> 154 <input type="text" value="'.$Search.'" name="search" size="30" /> 155 <input type="submit" value="Vyhledat" />'); 156 if(Licence(LICENCE_USER)) 157 echo(' <a href="dictionary.php?insert">Vložit slovo</a>'); 198 echo('<tr><td> 199 <input type="text" value="'.$Search.'" name="search" size="30" /> 200 <input type="submit" value="Vyhledat" />'); 201 if(Licence(LICENCE_USER)) echo(' <a href="dictionary.php?action=insert">Vložit slovo</a>'); 158 202 159 echo('</td></tr>'); 160 echo('<tr><td> 161 <div style="overflow: auto; width: 100%; height: '.$WinWidth.'px;">'); 162 //todo select 163 if($Search <> '') 164 { 165 $sql = "SELECT * FROM `dictionary` WHERE LOWER(AJWord) LIKE LOWER('%$Search%') OR LOWER(CZWord) LIKE LOWER('%$Search%') OR LOWER(description) LIKE LOWER('%$Search%')"; 166 } else 167 { 168 $sql = "SELECT * FROM `dictionary`"; 169 } 170 echo('<table width="98%" class="BaseTable"> 171 <tr><th>Eng</th> 172 <th>Cze</th> 173 <th> Popis</th></tr>'); 174 $ID = $Database->SQLCommand($sql); 175 while ($Line = mysql_fetch_array($ID)) 176 { 177 echo('<tr> 178 <td>'.$Line['AJWord'].'</td> 179 <td><strong>'.$Line['CZWord'].'</strong></td> 180 <td>'.$Line['description'].'</td></tr>'); 181 } 182 echo('</table>'); 183 184 echo('</div></td></tr>'); 185 186 echo('</table></form>'); 187 188 } 189 190 echo ('</body></html>'); 203 echo('</td></tr>'); 204 echo('<tr><td>Jazyk: '); 205 foreach($LanguageList as $Language) 206 if($Language['Enabled'] == 1) 207 { 208 if($Language['Id'] == $_SESSION['language']) echo('<strong>'); 209 echo(' <a href="?language='.$Language['Id'].'">'.$Language['Name'].'</a>'); 210 if($Language['Id'] == $_SESSION['language']) echo('</strong>'); 211 } 212 echo('</td></tr>'); 213 echo('<tr><td> 214 <div style="overflow: auto; width: 100%; height: 100%;">'); 215 216 if($Search <> '') 217 { 218 $sql = 'SELECT `user`.`user` AS `UserName`, `user`. `ID` AS `UserID`, `T3`.`Entry`, `T3`.`Original`, `T3`.`Translated`, `T3`.`Description` FROM (SELECT T2.User, `T1`.Language, `T1`.`Text` AS Original, `T2`.`Text` AS `Translated`, `T2`.`Description`, `T1`.`Entry` AS `Entry` FROM `dictionary` AS `T1` JOIN `dictionary` AS `T2` ON `T2`.`Entry` = `T1`.`Entry` AND `T2`.`Language` = '.$_SESSION['language'].' WHERE LOWER(T1.Text) LIKE LOWER("%'.$Search.'%") OR LOWER(T1.Description) LIKE LOWER("%'.$Search.'%") ) AS T3 JOIN `user` ON `user`.`ID` = `T3`.`User` WHERE `T3`.`Language` = 0'; 219 } else $sql = 'SELECT `user`.`user` AS `UserName`, `ID` AS `UserID`, `T3`.`Entry`, `T3`.`Original`, `T3`.`Translated`, `T3`.`Description` FROM (SELECT T2.User, `T1`.Language, `T1`.`Text` AS Original, `T2`.`Text` AS `Translated`, `T2`.`Description`, `T1`.`Entry` AS `Entry` FROM `dictionary` AS `T1` JOIN `dictionary` AS `T2` ON `T2`.`Entry` = `T1`.`Entry` AND `T2`.`Language` = '.$_SESSION['language'].') AS T3 JOIN `user` ON `user`.`ID` = `T3`.`User` WHERE `T3`.`Language` = 0'; 220 $sql .= ' LIMIT '.($_SESSION['Page'] - 1) * $Config['Web']['ItemsPerPage'].','.$Config['Web']['ItemsPerPage']; 221 222 ListPaging('?Page=', '('.$sql.') AS T1', '', $Config['Web']['ItemsPerPage'], $_SESSION['Page']); 223 echo('<table width="98%" class="BaseTable"> 224 <tr><th>'.$LanguageList[0]['Name'].'</th> 225 <th>'.$LanguageList[$_SESSION['language']]['Name'].'</th> 226 <th>Popis</th><th>Překladatel</th>'); 227 if(Licence(LICENCE_USER)) echo('<th>Akce</th>'); 228 echo('</tr>'); 229 $ID = $Database->SQLCommand($sql); 230 while ($Line = mysql_fetch_assoc($ID)) 231 { 232 echo('<tr> 233 <td>'.$Line['Original'].'</td> 234 <td><strong>'.$Line['Translated'].'</strong></td> 235 <td>'.$Line['Description'].'</td> 236 <td>'.$Line['UserName'].'</td>'); 237 if(Licence(LICENCE_USER)) 238 { 239 if($Line['UserID'] == $_SESSION['UserID']) 240 echo('<td><a href="?action=remove&entry='.$Line['Entry'].'">Smazat</a> <a href="?action=modify&entry='.$Line['Entry'].'">Upravit</a></td>'); 241 else echo('<td></td>'); 242 } 243 echo('</tr>'); 244 } 245 echo('</table>'); 246 ListPaging('?Page=', '('.$sql.') AS T1', '', $Config['Web']['ItemsPerPage'], $_SESSION['Page']); 247 echo('</div></td></tr>'); 248 echo('</table></form>'); 249 } 250 251 ShowFooter(); 191 252 192 253 ?> -
trunk/form.php
r164 r198 69 69 if(Licence(LICENCE_USER)) 70 70 { 71 if(($GroupId < 4) or ($GroupId == 10) or ($GroupId == 11)) echo ('<a href=" " onclick="javascript:window.open(\'dictionary.php?group='.$GroupId.'&ID='.$LineAJ['ID'].'\', \'Slovník\', \'width=400, height=390\'); return false;" Title="Zobrazit přeložené názvy věci, postav, a herních objektů k tomuto překladu">Vyhledat v názvech</a>');71 if(($GroupId < 4) or ($GroupId == 10) or ($GroupId == 11)) echo ('<a href="dictionary.php?group='.$GroupId.'&ID='.$LineAJ['ID'].'" target="_blank" title="Zobrazit přeložené názvy věci, postav, a herních objektů k tomuto překladu">Vyhledat v názvech</a>'); 72 72 echo(' <input type="submit" value="Uložit do rozepsaných" name="save" title="Klikněte na uložit pro pozdější dokončení překladu" /> 73 73 <input type="submit" value="Dokončeno" name="End" title="Klikněte na Dokončeno jesli jsou všechny texty hotové a chcete již publikovat" /> '); -
trunk/includes/global.php
r197 r198 36 36 global $Database; 37 37 38 echo('<strong>Shoutbox:</strong><a href="action.php?action=shoutbox">Vložit</a>'. 39 '<div class="box"><table>'); 38 echo('<strong>Shoutbox:</strong>'); 39 if(Licence(LICENCE_USER)) echo(' <a href="action.php?action=shoutbox">Vložit</a>'); 40 echo('<div class="box"><table>'); 40 41 $ID = $Database->SQLCommand('SELECT * FROM shoutbox ORDER BY ID DESC LIMIT 20'); 41 42 while($Line = mysql_fetch_assoc($ID)) … … 92 93 $Config['Web']['BaseURL'].'index.php' => array(LICENCE_ANONYMOUS, 'Hlavní stránka', 'Domů'), 93 94 'http://wow.zdechov.net/forum/viewforum.php?f=22' => array(LICENCE_ANONYMOUS, 'Diskuze na téma překládání', 'Fórum projektu'), 94 'javascript:void(0)' => array(LICENCE_ANONYMOUS, 'Slovník WoW výrazů', 'Slovníček', 'javascript:window.open(\''.$Config['Web']['BaseURL'].'dictionary.php\', \'Slovník\', \'width=400, height=390\'); return false;'),95 $Config['Web']['BaseURL'].'dictionary.php' => array(LICENCE_ANONYMOUS, 'Slovník WoW výrazů', 'Slovníček'), 95 96 $Config['Web']['BaseURL'].'banners.php' => array(LICENCE_ANONYMOUS, 'Weby odkazující na tento projekt bennerem', 'Odkazují na nás'), 96 97 $Config['Web']['BaseURL'].'statistic.php' => array(LICENCE_ANONYMOUS, 'Stav dokončení překládů', 'Stav dokončení'), … … 131 132 132 133 echo('<strong>Překladové skupiny:</strong><br /><div id="TranslationMenu">'); 133 if(Licence(LICENCE_USER)) { 134 echo ('<a title="Všechny překlady, které jste přeložil" href="'.$Config['Web']['BaseURL'].'TranslationList.php?user='.$_SESSION['UserID'].'&action=userall">Všechny moje texty</a><br />'); 135 echo ('<a title="Všechny překlady, které jste rozepsal a nedokončil" href="'.$Config['Web']['BaseURL'].'TranslationList.php?user='.$_SESSION['UserID'].'&not&action=userall">Rozpracované texty</a>'); 136 //TODO: počet nedokončených 137 echo ('<br /><br />'); 134 if(Licence(LICENCE_USER)) 135 { 136 echo ('<a title="Všechny překlady, které jste přeložil" href="'.$Config['Web']['BaseURL'].'TranslationList.php?user='.$_SESSION['UserID'].'&action=userall">Všechny moje texty</a><br />'); 137 echo ('<a title="Všechny překlady, které jste rozepsal a nedokončil" href="'.$Config['Web']['BaseURL'].'TranslationList.php?user='.$_SESSION['UserID'].'&not&action=userall">Rozpracované texty</a>'); 138 //TODO: počet nedokončených 139 echo ('<br /><br />'); 138 140 } 139 141 foreach($TranslationTree as $Group) … … 236 238 if(Licence(0)) $Database->SQLCommand('UPDATE user SET LastIP = "'.$_SERVER['REMOTE_ADDR'].'", LastLogin = NOW() WHERE ID = '.$_SESSION['UserID']); 237 239 238 echo 240 echo('<table class="page"><tr><td class="menu">'); 239 241 ShowMainMenu(); 240 242 -
trunk/includes/global_function.php
r197 r198 31 31 global $Database; 32 32 33 echo('<div style="text-align: center">'); 33 34 $Line = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM '.$Table.' '.$Where)); 34 35 $ItemCount = floor($Line[0] / $ItemsPerPage); … … 42 43 else echo('<a href="'.$Address.$Page.'">'.$Page.'</a> '); 43 44 } 44 echo('< br />');45 echo('</div>'); 45 46 } 46 47 -
trunk/registrace.php
r138 r198 18 18 if($Pass == $Pass2) 19 19 { 20 $Line = mysql_fetch_row($Database->SQLCommand( "SELECT * FROM user WHERE user = '$User'"));20 $Line = mysql_fetch_row($Database->SQLCommand('SELECT * FROM user WHERE user = "'.$User.'"')); 21 21 if(!$Line) 22 22 { … … 30 30 $_SESSION['Pass'] = $Pass; 31 31 32 $Line = mysql_fetch_array($Database->SQLCommand( "SELECT ID FROM user WHERE user = '".$_SESSION['User']."'"));32 $Line = mysql_fetch_array($Database->SQLCommand('SELECT ID FROM user WHERE user = "'.$_SESSION['User'].'"')); 33 33 $_SESSION['UserID'] = $Line['ID']; 34 34 WriteLog('Uživatel se zaregistroval: '.$User, 3); … … 75 75 '); 76 76 $ID = $Database->SQLCommand('SELECT name,ID FROM team'); 77 while($Line = mysql_fetch_assoc($ID)) { 77 while($Line = mysql_fetch_assoc($ID)) 78 { 78 79 echo('<option value="0'.$Line['ID'].'">'.$Line['name'].'</option>'); 79 } 80 81 80 } 82 81 echo('</select></td> 83 82 </tr> -
trunk/style/style.css
r196 r198 11 11 { 12 12 text-align: center; 13 margin: 2px 2px 2px 2px; 13 14 } 14 15 -
trunk/team.php
r158 r198 62 62 } else 63 63 { 64 echo('<a href="?create">Vytvořit překladatelský tým</a><br /><br />'); 65 echo('<strong>Seznam překladatelských týmů:</strong><br />'); 64 echo('<h3>Seznam překladatelských týmů</h3>'); 66 65 67 66 if(array_key_exists('Page', $_GET)) $_SESSION['Page'] = $_GET['Page']; … … 111 110 112 111 ListPaging('?Page=', 'team', '', $Config['Web']['ItemsPerPage'], $_SESSION['Page']); 112 echo('<br /><div style="text-align: center;"><a href="?create">Vytvořit překladatelský tým</a></div>'); 113 113 } 114 114 } -
trunk/userlist.php
r158 r198 7 7 include('img_level.php'); 8 8 9 echo('< strong>Seznam uživatelů:</strong><br />');9 echo('<h3>Seznam uživatelů</h3>'); 10 10 if(array_key_exists('Page', $_GET)) $_SESSION['Page'] = $_GET['Page']; 11 11 else if(!array_key_exists('Page', $_SESSION)) $_SESSION['Page'] = 1;
Note:
See TracChangeset
for help on using the changeset viewer.