- Timestamp:
- Feb 3, 2009, 7:54:37 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/TranslationList.php
r54 r57 55 55 $limity = $TranslationItemPerPage; 56 56 $limitx = $i * $limity; 57 $Page = $i +1;57 $Page = $i + 1; 58 58 if($_SESSION['limitx'] == $limitx) echo('<strong>'.$Page.'</strong> '); 59 59 else echo('<a href="'.$Address.'&limitx='.$limitx.'&limity='.$limity.'">'.$Page.'</a> '); -
trunk/img_statistic.php
r56 r57 19 19 $Group = $TranslationTree[$_GET['group']]; 20 20 21 $ID = mysql_fetch_row($Database->SQLCommand( "SELECT count(distinct(entry)) FROM ".$Group['TablePrefix']." WHERE Language <> '0' AND Complete = '1'"));21 $ID = mysql_fetch_row($Database->SQLCommand('SELECT count(distinct(entry)) FROM '.$Group['TablePrefix'].' WHERE (Language <> 0) AND (Complete = 1)')); 22 22 $NumberTranslate = $ID[0]; 23 23 24 $ID = mysql_fetch_row($Database->SQLCommand( "SELECT count(*) FROM ".$Group['TablePrefix']." WHERE Language = '0'"));24 $ID = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM '.$Group['TablePrefix'].' WHERE (Language = 0)')); 25 25 $NumberAJ = $ID[0]; 26 26 -
trunk/includes/databaseconection.php
r50 r57 24 24 25 25 $ReturnCommand = mysql_query($Command, $this->id_connection); 26 if((mysql_error() != '') and ($Config['Web']['ShowSQLErrors'])) echo('<div>'.mysql_error().'<br>'.$Command.'</div>'); 26 if((mysql_error() != '') and ($Config['Web']['ShowSQLErrors'] = true)) 27 echo('<div>'.mysql_error().'<br>'.$Command.'</div>'); 27 28 return($ReturnCommand); 28 29 } -
trunk/includes/global.php
r51 r57 69 69 'banners.php' => array(LICENCE_ANONYMOUS, 'Weby odkazující na tento projekt bennerem', 'Odkazují na nás'), 70 70 'javascript:void(0)' => array(LICENCE_ANONYMOUS, 'Slovník wow výrazů', 'Slovníček', 'javascript:window.open(\'dictionary.php\', \'Slovník\', \'width=400, height=412\'); return false;'), 71 'statistic.php' => array(LICENCE_ANONYMOUS, 'Statistika překládání', 'Statistika'), 71 'statistic.php' => array(LICENCE_ANONYMOUS, 'Stav dokončení překládů', 'Stav dokončení'), 72 'userlist.php' => array(LICENCE_ANONYMOUS, 'Seznam registrovaných uživatelů', 'Seznam uživatelů'), 72 73 'download.php' => array(LICENCE_ANONYMOUS, 'Zde si můžete stáhnout přeložené texty', 'Stahování'), 73 74 'registrace.php' => array(LICENCE_ANONYMOUS, 'Registrace uživatele pro překládání', 'Registrace'), -
trunk/includes/global_function.php
r49 r57 106 106 ); 107 107 108 $Moderators = array(' překladatel', 'moderátor', 'administrátor');108 $Moderators = array('Překladatel', 'Moderátor', 'Administrátor'); 109 109 110 110 function WriteLog($Text, $Type) … … 119 119 } 120 120 121 122 121 $client_files = array 123 122 ( … … 131 130 ); 132 131 132 function HumanDate($SQLDateTime) 133 { 134 $DateTimeParts = explode(' ', $SQLDateTime); 135 $DateParts = explode('-', $DateTimeParts[0]); 136 return(($DateParts[2] * 1).'.'.($DateParts[1] * 1).'.'.($DateParts[0] * 1)); 137 } 138 139 133 140 ?> -
trunk/sql/full.sql
r55 r57 1 -- phpMyAdmin SQL Dump2 -- version 3.1.23 -- http://www.phpmyadmin.net4 --5 -- Počítač: localhost6 -- Vygenerováno: Pondělí 02. února 2009, 19:547 -- Verze MySQL: 5.0.678 -- Verze PHP: 5.2.69 10 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";11 12 --13 -- Databáze: `wowpreklad_1`14 --15 16 1 -- -------------------------------------------------------- 17 2 … … 53 38 KEY `Language` (`Language`), 54 39 KEY `User` (`User`), 55 KEY `Take` (`Take`) 40 KEY `Take` (`Take`), 41 KEY `Complete` (`Complete`) 56 42 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=12081 ; 57 43 … … 93 79 KEY `entry` (`entry`), 94 80 KEY `User` (`User`), 95 KEY `Take` (`Take`) 81 KEY `Take` (`Take`), 82 KEY `Complete` (`Complete`), 83 KEY `Language` (`Language`) 96 84 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=26294 ; 97 85 … … 148 136 KEY `entry` (`entry`), 149 137 KEY `User` (`User`), 150 KEY `Take` (`Take`) 138 KEY `Take` (`Take`), 139 KEY `Complete` (`Complete`), 140 KEY `Language` (`Language`) 151 141 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=17823 ; 152 142 … … 177 167 `Name` varchar(255) collate utf8_czech_ci NOT NULL, 178 168 `TablePrefix` varchar(255) collate utf8_czech_ci NOT NULL, 169 `MangosDatabase` varchar(255) collate utf8_czech_ci NOT NULL, 179 170 `MangosTable` varchar(255) collate utf8_czech_ci NOT NULL, 180 171 `MangosTableIndex` varchar(255) collate utf8_czech_ci NOT NULL, 181 172 PRIMARY KEY (`Id`) 182 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 0;173 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=12 ; 183 174 184 175 -- -------------------------------------------------------- … … 195 186 `MangosColumn` varchar(255) collate utf8_czech_ci NOT NULL, 196 187 PRIMARY KEY (`Id`) 197 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT= 38;188 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=42 ; 198 189 199 190 -- -------------------------------------------------------- … … 218 209 KEY `entry` (`entry`), 219 210 KEY `User` (`User`), 220 KEY `Take` (`Take`) 211 KEY `Take` (`Take`), 212 KEY `Complete` (`Complete`), 213 KEY `Language` (`Language`) 221 214 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=31370 ; 222 215 … … 252 245 PRIMARY KEY (`ID`), 253 246 KEY `user` (`user`) 254 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=127 39;247 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=12741 ; 255 248 256 249 -- -------------------------------------------------------- … … 274 267 KEY `entry` (`entry`), 275 268 KEY `User` (`User`), 276 KEY `Take` (`Take`) 269 KEY `Take` (`Take`), 270 KEY `Complete` (`Complete`), 271 KEY `Language` (`Language`) 277 272 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 278 273 … … 313 308 KEY `entry` (`entry`), 314 309 KEY `User` (`User`), 315 KEY `Take` (`Take`) 310 KEY `Take` (`Take`), 311 KEY `Complete` (`Complete`), 312 KEY `Language` (`Language`) 316 313 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=680 ; 317 314 … … 367 364 KEY `entry` (`entry`), 368 365 KEY `User` (`User`), 369 KEY `Take` (`Take`) 366 KEY `Take` (`Take`), 367 KEY `Complete` (`Complete`), 368 KEY `Language` (`Language`) 370 369 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=16779063 ; 371 370 … … 406 405 KEY `entry` (`entry`), 407 406 KEY `User` (`User`), 408 KEY `Take` (`Take`) 407 KEY `Take` (`Take`), 408 KEY `Complete` (`Complete`), 409 KEY `Language` (`Language`) 409 410 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Item System' AUTO_INCREMENT=1737 ; 410 411 … … 453 454 PRIMARY KEY (`ID`), 454 455 KEY `entry` (`entry`), 455 KEY `User` (`User`) 456 KEY `User` (`User`), 457 KEY `Complete` (`Complete`), 458 KEY `Language` (`Language`) 456 459 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10696 ; 457 460 … … 485 488 KEY `IDuser` (`IDuser`) 486 489 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3278 ; 490 491 -- -------------------------------------------------------- 492 493 -- 494 -- Struktura tabulky `sd2_eventai_texts` 495 -- 496 497 CREATE TABLE IF NOT EXISTS `sd2_eventai_texts` ( 498 `ID` int(11) unsigned NOT NULL auto_increment, 499 `entry` int(11) NOT NULL, 500 `content_default` text NOT NULL, 501 `comment` text NOT NULL, 502 `Language` int(11) NOT NULL default '0', 503 `Vote` float NOT NULL, 504 `CountVote` int(11) NOT NULL, 505 `User` int(11) NOT NULL, 506 `Complete` int(11) NOT NULL, 507 `Take` int(11) NOT NULL, 508 `admin_check` int(11) NOT NULL default '0', 509 PRIMARY KEY (`ID`), 510 KEY `entry` (`entry`), 511 KEY `User` (`User`), 512 KEY `Take` (`Take`), 513 KEY `Complete` (`Complete`), 514 KEY `Language` (`Language`) 515 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=380 ; 516 517 -- -------------------------------------------------------- 518 519 -- 520 -- Struktura tabulky `sd2_eventai_texts_vote` 521 -- 522 523 CREATE TABLE IF NOT EXISTS `sd2_eventai_texts_vote` ( 524 `ID` int(11) NOT NULL auto_increment, 525 `TextId` int(11) NOT NULL, 526 `IDuser` int(11) NOT NULL, 527 `vote` int(11) NOT NULL, 528 PRIMARY KEY (`ID`), 529 KEY `IDquest` (`TextId`), 530 KEY `IDuser` (`IDuser`) 531 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 532 533 -- -------------------------------------------------------- 534 535 -- 536 -- Struktura tabulky `sd2_script_texts` 537 -- 538 539 CREATE TABLE IF NOT EXISTS `sd2_script_texts` ( 540 `ID` int(11) unsigned NOT NULL auto_increment, 541 `entry` int(11) NOT NULL, 542 `content_default` text NOT NULL, 543 `comment` text NOT NULL, 544 `Language` int(11) NOT NULL default '0', 545 `Vote` float NOT NULL, 546 `CountVote` int(11) NOT NULL, 547 `User` int(11) NOT NULL, 548 `Complete` int(11) NOT NULL, 549 `Take` int(11) NOT NULL, 550 `admin_check` int(11) NOT NULL default '0', 551 PRIMARY KEY (`ID`), 552 KEY `entry` (`entry`), 553 KEY `User` (`User`), 554 KEY `Take` (`Take`), 555 KEY `Complete` (`Complete`), 556 KEY `Language` (`Language`) 557 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1088 ; 558 559 -- -------------------------------------------------------- 560 561 -- 562 -- Struktura tabulky `sd2_script_texts_vote` 563 -- 564 565 CREATE TABLE IF NOT EXISTS `sd2_script_texts_vote` ( 566 `ID` int(11) NOT NULL auto_increment, 567 `TextId` int(11) NOT NULL, 568 `IDuser` int(11) NOT NULL, 569 `vote` int(11) NOT NULL, 570 PRIMARY KEY (`ID`), 571 KEY `IDquest` (`TextId`), 572 KEY `IDuser` (`IDuser`) 573 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 487 574 488 575 -- -------------------------------------------------------- -
trunk/sql/text_table_init_structure.sql
r49 r57 12 12 KEY `entry` (`entry`), 13 13 KEY `User` (`User`), 14 KEY `Take` (`Take`) 14 KEY `Take` (`Take`), 15 KEY `Language` ( `Language` ), 16 KEY `Complete` ( `Complete` ), 15 17 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 16 18 -
trunk/statistic.php
r56 r57 9 9 10 10 echo('<br /> 11 < b>Statistika v závislosti na čase: </b><a href="http://stat.zdechov.net/game/?Measure=18">Počet přeložených textů</a><br />11 <strong>Celková statistika v závislosti na čase: </strong><a href="http://stat.zdechov.net/game/?Measure=18">Počet přeložených textů</a><br /> 12 12 <br /> 13 Počet stáhnutí přeložených textů v SQL souboru: < b>');13 Počet stáhnutí přeložených textů v SQL souboru: <strong>'); 14 14 15 15 $ID = $Database->SQLCommand("SELECT count(distinct(IP)) FROM log WHERE type = 2"); … … 17 17 echo($Line[0]); 18 18 19 echo('</ b><br />20 Počet stáhnutí CZWoW pro clienta: < b>');19 echo('</strong><br /> 20 Počet stáhnutí CZWoW pro clienta: <strong>'); 21 21 22 22 $ID = $Database->SQLCommand("SELECT count(distinct(IP)) FROM log WHERE type = 0"); … … 24 24 echo($Line[0]); 25 25 26 echo('</b><br /><br /> 27 <b>Seznam uživatelů: </b> 28 <table border="1" cellpadding="2" cellspacing="0">'); 26 echo('</strong>'); 29 27 30 if(array_key_exists('order', $_GET))31 {32 $order = $_GET['order'];33 $desc = $_GET['desc'];34 } else35 {36 $order = 'NumberTranslate';37 $desc = '';38 }39 40 if($desc == '') $desc = 'desc'; else $desc = '';41 42 echo('<tr><th><a href="?order=user&desc='.$desc.'">Jméno</a></th>43 <th><a href="statistic.php?order=NumberTranslate&desc='.$desc.'" title="Počet přeložených textů">Přeložených</a></th>44 <th><a href="statistic.php?order=Vote&desc='.$desc.'" title="Průměrná známka textů">Průměrná známka</a></th>45 <th><a href="statistic.php?order=GM&desc='.$desc.'">Oprávnění</a></th>46 <th><a href="statistic.php?order=LastLogin&desc='.$desc.'">Poslední připojení</a></th></tr>');47 48 $Query = 'SELECT ID,user, LastLogin, GM, (';49 foreach($TranslationTree as $Group)50 if($Group['TablePrefix'] != '')51 $Query .= '(SELECT count(*) FROM `'.$Group['TablePrefix'].'` WHERE User = user.ID AND Complete = 1 AND Language <> 0) + ';52 $Query .= '0) as NumberTranslate, (';53 foreach($TranslationTree as $Group)54 if($Group['TablePrefix'] != '')55 $Query .= 'IFNULL((SELECT sum(Vote) AS Vote FROM `'.$Group['TablePrefix'].'` WHERE User = user.ID AND Complete =1 AND Language <> 0), 0) + ';56 $Query .= '0) / (';57 foreach($TranslationTree as $Group)58 if($Group['TablePrefix'] != '')59 $Query .= '(SELECT count(Vote) AS Vote FROM `'.$Group['TablePrefix'].'` WHERE User = user.ID AND Complete =1 AND Language <> 0) + ';60 $Query .= '0) AS Vote FROM `user` ORDER BY '.$order.' '.$desc;61 $ID = $Database->SQLCommand($Query);62 while($Line = mysql_fetch_array($ID))63 {64 if(Licence(LICENCE_MODERATOR))65 $Name = '<a href="user.php?user='.$Line['ID'].'">'.$Line['user'].'</a>';66 else $Name = $Line['user'];67 68 echo('<tr><td>'.$Name.'</td>69 <td>'.$Line['NumberTranslate'].'</td>70 <td>'.substr($Line['Vote'], 0, 4).'</td>71 <td>'.$Moderators[$Line['GM']].'</td>72 <td>'.$Line['LastLogin'].'</td></tr>');73 }74 echo('</table>');75 76 28 ShowFooter(); 77 29 -
trunk/style.css
r48 r57 63 63 border-width: 0px; 64 64 } 65 66 .BaseTable 67 { 68 border-width: 1px; 69 border-color: black; 70 border-style: solid; 71 border-collapse: collapse; 72 } 73 74 .BaseTable td 75 { 76 border-width: 1px; 77 border-color: black; 78 border-style: solid; 79 padding: 2px; 80 } 81 82 .BaseTable th 83 { 84 border-width: 1px; 85 border-color: black; 86 border-style: solid; 87 padding: 2px; 88 }
Note:
See TracChangeset
for help on using the changeset viewer.