1 | <?php
|
---|
2 | session_start();
|
---|
3 | include('../../includes/config.php');
|
---|
4 | include('../../includes/databaseconection.php');
|
---|
5 |
|
---|
6 | //připojení do databáze
|
---|
7 | $Database = new Database($Config['Database']['Host'], $Config['Database']['User'], $Config['Database']['Password']);
|
---|
8 | $Database->SQLCommand('SET NAMES '.$Config['Database']['Charset']);
|
---|
9 | $Database->SelectDatabase($Config['Database']['Database']);
|
---|
10 |
|
---|
11 | include ('define.php');
|
---|
12 | $text = '';
|
---|
13 | for ($i=0;$i<count($define_images);++$i) {
|
---|
14 |
|
---|
15 | $TypeTexts = $define_images[$i]["sql"];
|
---|
16 | echo $define_images[$i]["File"];
|
---|
17 |
|
---|
18 | // echo "SELECT count(distinct(entry)) FROM $TypeTexts WHERE Language <> '0' AND Complete = '1'";
|
---|
19 | $ID = mysql_fetch_row($Database->SQLCommand("SELECT count(distinct(entry)) FROM $TypeTexts WHERE ".$define_images[$i]["where"]));
|
---|
20 | $NumberTranslate = $ID[0];
|
---|
21 |
|
---|
22 | $ID = mysql_fetch_row($Database->SQLCommand("SELECT count(*) FROM $TypeTexts WHERE Language = '0'"));
|
---|
23 | $NumberAJ = $ID[0];
|
---|
24 |
|
---|
25 | $Percent = ($NumberTranslate/$NumberAJ)*100;
|
---|
26 | $Percent = substr($Percent, 0, 5);
|
---|
27 |
|
---|
28 | $PercentBar = $Percent*4;
|
---|
29 | $obrazek = imagecreatetruecolor(400,60);
|
---|
30 | $Color1 = imagecolorallocate($obrazek,225,246,247);
|
---|
31 | $Color2 = imagecolorallocate($obrazek,77,225,251);
|
---|
32 | $Color3 = imagecolorallocate($obrazek,2,59,199);
|
---|
33 | imagefilledrectangle($obrazek,0,0,400,59,$Color1);
|
---|
34 | imagefilledrectangle($obrazek,0,0,$PercentBar,59,$Color2);
|
---|
35 | imagestring($obrazek, 10, 120, 15, $NumberTranslate.'/'.$NumberAJ, $Color3);
|
---|
36 | imagestring($obrazek, 3, 300, 15, $TypeTexts, $Color3);
|
---|
37 | imagestring($obrazek, 10, 120, 30, $Percent.' %', $Color3);
|
---|
38 | imagestring($obrazek, 1, 240, 50, 'Aktualizováno: '.date("m.d.y H:i"), $Color3);
|
---|
39 |
|
---|
40 | imagepng($obrazek, 'compile_png/'.$define_images[$i]["File"].'.png');
|
---|
41 | imagedestroy($obrazek);
|
---|
42 | echo ': <b>HOTOVO</b><br />';
|
---|
43 | $text = $text.' - '.$TypeTexts.': '.$Percent.' % '.$NumberTranslate.'/'.$NumberAJ.'<br><br /> ';
|
---|
44 | }
|
---|
45 |
|
---|
46 | echo '<br /><br />
|
---|
47 | <b>verze '.$version.'</b><br><br>
|
---|
48 | =========<br><br>
|
---|
49 | - Zvukové hláky z Warcraft3 (W3WCZ beta 0.5)<br><br>
|
---|
50 | - Přeloená hlavní nabídka ve hře<br><br>
|
---|
51 | - České fonty pro správné zobrozování znaků (diakritiky)<br><br>';
|
---|
52 | echo $text;
|
---|
53 |
|
---|
54 | // echo '<img src="statistic.png">';
|
---|
55 |
|
---|
56 | ?>
|
---|