- Timestamp:
- Apr 30, 2009, 8:10:25 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 30 added
- 2 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/player.php
r578 r579 365 365 while($row = $sql->fetch_array()) 366 366 { 367 $gender = ($row['gender'] == 0) ? ' m' : 'f';367 $gender = ($row['gender'] == 0) ? '0' : '1'; 368 368 echo('<tr>'. 369 369 '<td align="center">'.$row['name'].'</td>'. 370 370 '<td align="center">'.$this->GetPlayerLvl($row['guid']).'</td>'. 371 '<td align="center"><img src="imgs/icons/'.$ this->GetPlayerRace($row['race']).'-'.$gender.'.gif"></td>'.372 '<td align="center"><img src="imgs/icons/'.$ this->GetPlayerClass($row['class']).'.gif"</td>'.371 '<td align="center"><img src="imgs/icons/'.$row['race'].'-'.$gender.'.gif"></td>'. 372 '<td align="center"><img src="imgs/icons/'.$row['class'].'.gif"</td>'. 373 373 '<td align="center">'.round($row['totaltime'] / 3600).' h</td>'. 374 374 '</tr>'); -
trunk/pages/banacc.php
r561 r579 1 <? 2 include("inc/db.php"); 1 <?php 3 2 4 mysql_connect("$db_server", "$db_user", "$db_pass"); 5 mysql_select_db("$db_realmd"); 3 $db->select_db($Config['Mangos']['DatabaseRealmd']); 6 4 7 if(array_key_exists( "jmeno", $_POST))5 if(array_key_exists('jmeno', $_POST)) 8 6 { 7 $name = $_POST['jmeno']; 9 8 10 $name = addslashes($_POST["jmeno"] ); 9 $str = $db->query('select * from `account` inner join `account_banned` on `account`.`id` = `account_banned`.`id` where `username` = "'.$name.'"'); 10 $str_end = $str->fetch_assoc(); 11 11 12 $str=mysql_query("select * from `account` inner join `account_banned` on `account`.`id` = `account_banned`.`id` where `username` = '$name'"); 13 $str_end=mysql_fetch_array($str); 14 15 if($str_end['id']== ""){ 16 17 echo "<center><font color=\"blue\" face=\"verdana\" size=\"2\">tento ucet <span style=\"color: red\">neni</span> zabanovan</font></center>"; 18 19 } else { 20 21 $reason=$str_end['banreason']; 22 echo "<center><font color=\"blue\" face=\"verdana\" size=\"2\">ucet: <span style=\"color: red\">$name</span> je zabanovan, duvod: <span style=\"color: red\">$reason</span></font></center>"; 23 24 } 12 if($str_end['id'] == '') 13 { 14 echo('<center><font color="blue" face="verdana" size="2">tento účet <span style="color: red">není</span> zabanován</font></center>'); 15 } else 16 { 17 $reason = $str_end['banreason']; 18 echo('<center><font color="blue" face="verdana" size="2">účet: <span style="color: red">'.$name.'</span> je zabanován, důvod: <span style="color: red">'.$reason.'</span></font></center>'); 19 } 25 20 } 26 21 27 mysql_close();28 22 ?> -
trunk/pages/banip.php
r561 r579 1 <? 2 include("inc/db.php"); 1 <?php 3 2 4 mysql_connect("$db_server", "$db_user", "$db_pass"); 5 mysql_select_db("$db_realmd"); 3 $db->select_db($Config['Mangos']['DatabaseRealmd']); 6 4 7 if(array_key_exists( "ip", $_POST))5 if(array_key_exists('ip', $_POST)) 8 6 { 7 $ipcko = $_POST['ip']; 9 8 10 $ipcko = addslashes($_POST["ip"] ); 9 $str = $db->query('select `banreason` from `ip_banned` where `ip` = "'.$ipcko.'"'); 10 $str_end = $str->fetch_assoc(); 11 11 12 $str=mysql_query("select `banreason` from `ip_banned` where `ip` = '$ipcko'"); 13 $str_end=mysql_fetch_array($str); 14 15 if($str_end['banreason']== ""){ 16 17 echo "<center><font color=\"blue\" face=\"verdana\" size=\"2\">tato ip adresa <span style=\"color: red\">neni</span> zabanovana</font></center>"; 18 19 } else { 20 21 $reason=$str_end['banreason']; 22 echo "<center><font color=\"blue\" face=\"verdana\" size=\"2\">ip adresa: <span style=\"color: red\">$ipcko</span> je zabanovana, duvod: <span style=\"color: red\">$reason</span></font></center>"; 23 24 } 12 if($str_end['banreason'] == '') 13 { 14 echo('<center><font color="blue" face="verdana" size="2">tato IP adresa <span style=\"color: red\">neni</span> zabanovaná</font></center>'); 15 } else 16 { 17 $reason = $str_end['banreason']; 18 echo('<center><font color="blue" face="verdana" size="2">IP adresa: <span style="color: red">'.$ipcko.'</span> je zabanovaná, důvod: <span style="color: red">'.$reason.'</span></font></center>'); 19 } 25 20 } 26 21 27 mysql_close();28 22 ?> -
trunk/pages/banlist.php
r561 r579 1 <center><table border="0"> 2 <tr><td><center><font color="green" face="verdana" size="3"><b>Kontrola ip adresy</b></font></center></td></tr> 3 <tr><td><center><font color="blue" face="verdana" size="1">zadejte prosim vasi IP adresu</font></center></td></tr> 1 <?php 2 3 echo('<center><table border="0"> 4 <tr><td><center><font color="green" face="verdana" size="3"><b>Kontrola IP adresy</b></font></center></td></tr> 5 <tr><td><center><font color="blue" face="verdana" size="1">Zadejte prosím vaší IP adresu</font></center></td></tr> 4 6 <tr><td><form action="?page=banip" method="post"><input type="text" name="ip" value="127.0.0.1"><input type="submit" name="odeslat" value="zkontroluj"></form></td></tr> 5 <tr><td><center><? 6 $ipcko = getenv ("REMOTE_ADDR"); 7 if ($ipcko != false) { 8 echo "<font color=\"red\" size=\"1\" face=\"verdana\">Vaše IP adresa je: $ipcko</font>"; 7 <tr><td><center>'); 8 9 $ipcko = getenv('REMOTE_ADDR'); 10 if($ipcko != false) 11 { 12 echo('<font color="red" size="1" face="verdana">Vaše IP adresa je: '.$ipcko.'</font>'); 9 13 } 10 ?></center></td></tr> 14 15 echo('</center></td></tr> 11 16 </table></center> 12 17 <br /> 13 18 <center><table border="0"> 14 <tr><td><center><font color="green" face="verdana" size="3"><b>Kontrola accountu</b></font></center></td></tr>15 <tr><td><center><font color="blue" face="verdana" size="1"> zadejte prosim jmeno accountu</font></center></td></tr>19 <tr><td><center><font color="green" face="verdana" size="3"><b>Kontrola účtu</b></font></center></td></tr> 20 <tr><td><center><font color="blue" face="verdana" size="1">Zadejte prosím jméno účtu</font></center></td></tr> 16 21 <tr><td><form action="?page=banacc" method="post"><input type="text" name="jmeno" value="name"><input type="submit" name="odeslat" value="zkontroluj"></form></td></tr> 17 22 </table></center> 18 <center><font face="verdana" size="1" color="red">vas <span style="color: red">predpokladany</span> account je: 19 <? 23 <center><font face="verdana" size="1" color="red">váš <span style="color: red">předpokládaný</span> účet je:'); 20 24 21 mysql_connect("$db_server","$db_user","$db_pass");22 mysql_select_db("$db_realmd");23 25 24 $str=mysql_query("select * from `account` where `last_ip` = '$ipcko' order by `last_login` desc limit 3"); 25 while($str_end=MySQL_Fetch_Array($str)){ 26 $i=$str_end["username"]; 27 echo "$i, "; 26 $db->select_db($Config['Mangos']['DatabaseRealmd']); 27 28 $DbResult = $db->query('select * from `account` where `last_ip` = "'.$ipcko.'" order by `last_login` desc limit 3'); 29 while($DbRow = $DbResult->fetch_assoc()) 30 { 31 $i = $$DbRow['username']; 32 echo($i.', '); 28 33 } 29 34 30 ?> 31 </font></center> 32 <br><center> 33 <h2>Ban List</h2> 34 <?php 35 mysql_connect("$db_server","$db_user","$db_pass"); 36 mysql_select_db("$db_realmd"); 35 echo('</font></center> 36 <br /><center> 37 <h2>Seznam banů</h2>'); 37 38 38 $sqldata = mysql_query("SELECT `account`.`last_ip`,`ip_banned`.`bandate`,`ip_banned`.`unbandate`,`ip_banned`.`bannedby`,`ip_banned`.`banreason` FROM `account` INNER join `ip_banned` ON `account`.`last_ip`=`ip_banned`.`ip`");39 $sqldata = $db->query('SELECT `account`.`last_ip`,`ip_banned`.`bandate`,`ip_banned`.`unbandate`,`ip_banned`.`bannedby`,`ip_banned`.`banreason` FROM `account` INNER join `ip_banned` ON `account`.`last_ip`=`ip_banned`.`ip`'); 39 40 40 echo "<table border=1>";41 echo "<tr><th>IP</th><th>Od</th><th>Do</th><th>Banoval</th><th>Důvod</th></tr>";41 echo('<table border="1">'); 42 echo('<tr><th>IP</th><th>Od</th><th>Do</th><th>Banoval</th><th>Důvod</th></tr>'); 42 43 43 while($row = mysql_fetch_array($sqldata)) 44 44 while($row = $sqldata->fetch_assoc()) 45 45 { 46 47 $start = Date('d-m-Y H:i:s',$row[bandate]); 48 $end = Date('d-m-Y H:i:s',$row[unbandate]); 46 $start = Date('d-m-Y H:i:s', $row['bandate']); 47 $end = Date('d-m-Y H:i:s', $row['unbandate']); 49 48 50 51 echo "<tr><td>$row[last_ip]</td> <td>$start</td> <td>$end</td> <td>$row[bannedby]</td><td>$row[banreason]</td></tr>"; 52 49 echo('<tr><td>'.$row['last_ip'].'</td><td>'.$start.'</td><td>'.$end.'</td><td>'.$row['bannedby'].'</td><td>'.$row['banreason'].'</td></tr>'); 53 50 } 54 55 echo "</table>"; 51 echo('</table>'); 56 52 57 53 ?> -
trunk/pages/dontwork.php
r405 r579 1 1 <?php 2 2 3 echo "<br /><br /><center><img src=\"imgs/zajic.png\"><br /><font size=\"4\">Stránka mimo provoz , omluvte problémy.</font></center>"; 4 $player -> Recall(2); 3 echo('<br /><br /><center><img src="imgs/zajic.png"><br /><font size="4">Stránka mimo provoz, omluvte problémy.</font></center>'); 4 $player->Recall(2); 5 5 6 ?> -
trunk/pages/guilda.php
r577 r579 54 54 while($member = $members->fetch_row()) 55 55 { 56 $query = $db->query( "SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', ".$Config['Mangos']['CharacterDataOffset']['Level']."+1), ' ', -1) AS level, mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".($Config['Mangos']['CharacterDataOffset']['Gender'] + 1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender FROM `characters` WHERE `guid` = '".$member[0]."' LIMIT 1;");57 $online = $query -> fetch_array();58 $accid = $online[ "account"];59 $llogin = count_days($online[ "logout_time"], time());56 $query = $db->query('SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, " ", '.$Config['Mangos']['CharacterDataOffset']['Level'].' + 1), " ", -1) AS level, mid(lpad( hex( CAST(substring_index(substring_index(data, " ", '.($Config['Mangos']['CharacterDataOffset']['Gender'] + 1).'), " ", -1) as unsigned) ), 8, 0), 4, 1) as gender FROM `characters` WHERE `guid` = '.$member[0].' LIMIT 1;'); 57 $online = $query->fetch_assoc(); 58 $accid = $online['account']; 59 $llogin = count_days($online['logout_time'], time()); 60 60 if($llogin < 1) 61 61 { … … 86 86 $lastlogin = '<font color="#8000FF">'.$llogin.'</font>'; 87 87 } 88 $level = $online[ "level"];88 $level = $online['level']; 89 89 if($level > 0) 90 90 { … … 123 123 $lev = '<font color="#FFF000">'.$level.'</font>'; 124 124 } 125 if ($online[6] == 0) 126 { 127 $gender = "m"; 128 } 129 else 130 { 131 $gender = "f"; 132 } 133 echo " 134 <tr> 135 <td align=\"center\">".$member[2]."</td> 136 <td align=\"center\"><img src=\"imgs/icons/".$player -> GetPlayerRace($online["race"])."-".$gender.".gif\"></td> 137 <td align=\"center\"><img src=\"imgs/icons/".$player -> GetPlayerClass($online["class"]).".gif\"></td> 138 <td align=\"center\">".$lev."</td> 139 <td align=\"center\">".$member[4]." (".$member[1].")</td> 140 <td align=\"center\">".$lastlogin."</td> 141 <td align=\"center\">".(($online["online"]) ? "<img src=\"imgs/inc/on.gif\" alt=\"\" />" : "<img src=\"imgs/inc/off.gif\" alt=\"\" />")."</td> 142 </td> 143 "; 125 if($online[6] == 0) $gender = '0'; 126 else $gender = '1'; 127 echo('<tr>'. 128 '<td align="center">'.$member[2].'</td>'. 129 '<td align="center"><img src="imgs/icons/'.$online['race'].'-'.$gender.'.gif"></td>'. 130 '<td align="center"><img src="imgs/icons/'.$online['class'].'.gif"></td>'. 131 '<td align="center">'.$lev.'</td>'. 132 '<td align="center">'.$member[4].' ('.$member[1].')</td>'. 133 '<td align="center">'.$lastlogin.'</td>'. 134 '<td align="center">'.(($online['online']) ? '<img src="imgs/inc/on.gif" alt="online" />' : '<img src="imgs/inc/off.gif" alt="offline" />').'</td></td>'); 144 135 } 145 136 echo('</table>'); -
trunk/pages/online.php
r577 r579 45 45 $aliance = array(1, 3, 4, 7, 11); 46 46 $frakce = (in_array($row['race'], $aliance)) ? '<img src="imgs/inc/a.gif" alt="aliance"/>' : '<img src="imgs/inc/h.gif" alt="horda" />'; 47 $gender = ($row['gender'] == 0) ? ' m' : 'f';47 $gender = ($row['gender'] == 0) ? '0' : '1'; 48 48 echo('<tr> 49 49 <td align="center">'.$frakce.'</td> 50 50 <td align="center">'.$row['name'].'</td> 51 <td align="center"><img src="imgs/icons/'.$ player->GetPlayerRace($row['race']).'-'.$gender.'.gif" alt="rasa" /></td>52 <td align="center"><img src="imgs/icons/'.$ player->GetPlayerClass($row['class']).'.gif" alt="třída" /></td>51 <td align="center"><img src="imgs/icons/'.$row['race'].'-'.$gender.'.gif" alt="rasa" /></td> 52 <td align="center"><img src="imgs/icons/'.$row['class'].'.gif" alt="třída" /></td> 53 53 <td align="center">'.$row['level'].'</td> 54 54 <td align="center">'.$server->MapName($row['map']).'<br />('.$server->ZoneName($row['zone']).')</td> -
trunk/pages/register.php
r576 r579 8 8 } 9 9 10 if(array_key_exists('account', $_POST)) $account = $_POST['account']; else $account = ''; 11 if(array_key_exists('heslo1', $_POST)) $password1 = $_POST['heslo1']; else $password1 = ''; 12 if(array_key_exists('heslo2', $_POST)) $password2 = $_POST['heslo2']; else $password2 = ''; 13 if(array_key_exists('email', $_POST)) $email = $_POST['email']; else $email = ''; 14 if(array_key_exists('expansion', $_POST)) $expansion = $_POST['expansion']; else $expansion = ''; 15 if(array_key_exists('agree', $_POST)) $agree = $_POST['agree']; else $agree = ''; 16 10 17 echo('<div style="margin-left:auto; margin-right:auto; text-align:center; align: center;">'. 11 18 '<div style="margin-left:auto; margin-right:auto; text-align:center; align: center;">'. … … 13 20 '<form method="post" action="?page=register">'. 14 21 '<table style="margin-left:auto; margin-right:auto; text-align:center;">'. 15 '<tr><td>Účet:</td><td><input type="text" name="account" value="'.$ _POST['account'].'"/></td></tr>'.16 '<tr><td>Heslo:</td><td><input type="password" name="heslo1" value="'.$ _POST['heslo1'].'"/></td></tr>'.17 '<tr><td>Heslo znovu:</td><td><input type="password" name="heslo2" value="'.$ _POST['heslo2'].'"/></td></tr>'.18 '<tr><td>Email:</td><td><input type="text" name="email" value="'.$ _POST['email'].'"/></td></tr>'.19 '<tr><td>Typ účtu:</td><td><select name="expansion" value="'.$ _POST['expansion'].'">'.22 '<tr><td>Účet:</td><td><input type="text" name="account" value="'.$account.'"/></td></tr>'. 23 '<tr><td>Heslo:</td><td><input type="password" name="heslo1" value="'.$password1.'"/></td></tr>'. 24 '<tr><td>Heslo znovu:</td><td><input type="password" name="heslo2" value="'.$password2.'"/></td></tr>'. 25 '<tr><td>Email:</td><td><input type="text" name="email" value="'.$email.'"/></td></tr>'. 26 '<tr><td>Typ účtu:</td><td><select name="expansion" value="'.$expansion.'">'. 20 27 '<option value="">-- vyber typ účtu --</option>'. 21 28 '<option value="0">Klasický</option>'. … … 37 44 { 38 45 echo('<div class="h11">Registrace otevřeny</div>'); 39 40 $account = addslashes($_POST['account']);41 $password1 = addslashes($_POST['heslo1']);42 $password2 = addslashes($_POST['heslo2']);43 $email = addslashes($_POST['email']);44 $expansion = addslashes($_POST['expansion']);45 $agree = addslashes($_POST['agree']);46 47 46 echo('<br />'); 48 47 … … 58 57 $account = strtoupper($account); 59 58 $heslo = sha_password($account, $password); 60 $email = addslashes($_POST['email']);61 $expansion = addslashes($_POST['expansion']);62 59 63 60 $DbResult = $db->query('SELECT `id`, `username`, `sha_pass_hash` FROM `account` WHERE `username`="'.$account.'"'); … … 68 65 { 69 66 $DbResult = $db->query('INSERT INTO `account` (`username`,`sha_pass_hash`,`email`,`expansion`) values ("'.$account.'","'.$heslo.'","'.$email.'","'.$expansion.'")'); 67 echo('INSERT INTO `account` (`username`,`sha_pass_hash`,`email`,`expansion`) values ("'.$account.'","'.$heslo.'","'.$email.'","'.$expansion.'")'); 70 68 echo($db->error); 71 69 echo('<div class="h10">Účet '.$account.' byl vytvořen!</div>'); -
trunk/pages/tickets.php
r407 r579 1 1 <?php 2 echo " 3 <table border=\"1\" width=\"555\">2 3 echo('<table border="1" width="555"> 4 4 <tr> 5 5 <th>Podal</th> … … 7 7 <th>Text</th> 8 8 <th>Spravovat</th> 9 </tr> 10 "; 11 $db -> select_db($db_characters); 12 $load_tickets = $db -> query("SELECT * FROM `character_ticket` ORDER BY `ticket_id` ASC;"); 13 while ($row = $load_tickets -> fetch_array()) 14 { 15 $human_date = $server -> HumanDate ($row["ticket_lastchange"]); 16 $player_name = $player -> GuidToCharName($row["guid"]); 17 echo " 18 <tr> 19 <td align=\"center\">".$player_name."</td> 20 <td align=\"center\">".$human_date."</td> 21 <td><font size=\"2\">".$row["ticket_text"]."</font></td> 22 <td align=\"center\"><a href=\"?ticket=".$row["ticket_id"]."\">Spravovat</a></td> 23 </tr> 24 "; 25 } 26 echo "</table>"; 27 9 </tr>'); 10 11 $db->select_db($Config['Mangos']['DatabaseCharacters']); 12 $load_tickets = $db->query('SELECT * FROM `character_ticket` ORDER BY `ticket_id` ASC'); 13 while($row = $load_tickets->fetch_assoc()) 14 { 15 $human_date = $server->HumanDate($row['ticket_lastchange']); 16 $player_name = $player->GuidToCharName($row['guid']); 17 echo('<tr> 18 <td align="center">'.$player_name.'</td> 19 <td align="center">'.$human_date.'</td> 20 <td><font size="2">'.$row['ticket_text'].'</font></td> 21 <td align="center"><a href="?ticket='.$row['ticket_id'].'">Spravovat</a></td> 22 </tr>'); 23 } 24 echo('</table>'); 28 25 29 26 ?> -
trunk/pages/unstuck.php
r438 r579 1 1 <?php 2 $html -> PrgStart(); 3 if ($player -> Check()) 4 { 5 echo " 6 <a href=\"?page=acc\"><- Zpět do správy účtu</a>2 3 $html->PrgStart(); 4 if($player->Check()) 5 { 6 echo(' <a href="?page=acc"><- Zpět do správy účtu</a> 7 7 <center><h3>Přemístění pozice vaší postavy</h3></center> 8 <form method= \"post\">9 <table align= \"center\">8 <form method="post"> 9 <table align="center"> 10 10 <tr> 11 11 <td> 12 12 Jméno postavy pro přemístění : </td> 13 13 <td> 14 <input type= \"text\" name=\"char\"></td>14 <input type="text" name="char"></td> 15 15 </tr> 16 16 <tr> 17 <td colspan= \"2\" align=\"right\">18 <input type= \"submit\" value=\"Resetovat\" name=\"unstuck\"></td>17 <td colspan="2" align="right"> 18 <input type="submit" value="Resetovat" name="unstuck"></td> 19 19 </tr> 20 20 </table> 21 </form> 22 "; 23 if (isset($_POST["unstuck"]) AND $_POST["char"] != "") 21 </form>'); 22 23 if(isset($_POST['unstuck']) and $_POST['char'] != '') 24 { 25 $guid = $player->CharNameToGuid($_POST['char']); 26 $player->ResetPosition($guid); 27 } 28 } else 24 29 { 25 $guid = $player -> CharNameToGuid($_POST["char"]); 26 $player -> ResetPosition($guid); 30 $player->LoginForm(); 27 31 } 28 } 29 else 30 { 31 $player -> LoginForm(); 32 } 32 $html->PrgStop(); 33 33 34 $html -> PrgStop();35 34 ?> -
trunk/pages/webconfig.php
r405 r579 1 1 <?php 2 $html ->PrgStart();3 echo " <a href=\"?page=acc\"><- Zpět do správy účtu</a>";2 $html->PrgStart(); 3 echo(' <a href="?page=acc"><- Zpět do správy účtu</a>'); 4 4 5 if (isset($_POST["save"]))5 if(isset($_POST['save'])) 6 6 { 7 7 $year = 7 * 24 * 60 * 60; 8 setcookie("hof-random",$_POST["random"],time()+$year); 9 setcookie("hof-widget",$_POST["widget"],time()+$year); 10 setcookie("hof-quick",$_POST["quick"],time()+$year); 11 setcookie("hof-web",$_POST["web"],time()+$year); 12 $msg = "<center><b>Ukládám změny.</b></center><br /> 13 <meta http-equiv=\"refresh\" content=\"1;url=?page=webconfig\">"; 14 } 15 else 8 setcookie('hof-random', $_POST['random'], time() + $year); 9 setcookie('hof-widget', $_POST['widget'], time() + $year); 10 setcookie('hof-quick', $_POST['quick'], time() + $year); 11 setcookie('hof-web', $_POST['web'], time() + $year); 12 $msg = '<center><b>Ukládám změny.</b></center><br /> 13 <meta http-equiv="refresh" content="1;url=?page=webconfig">'; 14 } else 16 15 { 17 $msg = "";16 $msg = ''; 18 17 } 19 18 20 21 function Check ($value,$option) 19 function Check($value, $option) 22 20 { 23 if (!isset($_COOKIE["hof-".$value]) OR $_COOKIE["hof-".$value] == "")21 if(!isset($_COOKIE['hof-'.$value]) or $_COOKIE['hof-'.$value] == '') 24 22 { 25 23 $day_half = 129600; 26 // default 27 switch ($value) 28 { 29 case "random": 30 $default = "yes"; 31 break; 32 case "widget": 33 $default = "wowhead"; 34 break; 35 case "quick": 36 $default = "yes"; 37 break; 38 case "web": 39 $default = "2"; 40 break; 41 } 24 switch($value) 25 { 26 case 'random': 27 $default = 'yes'; 28 break; 29 case 'widget': 30 $default = 'wowhead'; 31 break; 32 case 'quick': 33 $default = 'yes'; 34 break; 35 case 'web': 36 $default = 2; 37 break; 38 } 42 39 $year = 7 * 24 * 60 * 60; 43 setcookie( "hof-".$value,$default,time()+$year);44 $msg = "<center><b>Nahrávám základní nastavení</b></center><br />45 <meta http-equiv= \"refresh\" content=\"1;url=?page=webconfig\">";40 setcookie('hof-'.$value, $default, time() + $year); 41 $msg = '<center><b>Nahrávám základní nastavení</b></center><br /> 42 <meta http-equiv="refresh" content="1;url=?page=webconfig">'; 46 43 } 47 if (isset($_COOKIE["hof-".$value]) AND $_COOKIE["hof-".$value] == $option)44 if(isset($_COOKIE['hof-'.$value]) and $_COOKIE['hof-'.$value] == $option) 48 45 { 49 return " checked=\"checked\" ";46 return('checked="checked" '); 50 47 } 51 48 } 52 echo " 53 <form method=\"post\"> 54 <div align=\"left\"> 49 echo('<form method="post"> 50 <div align="left"> 55 51 <b>Náhodný obrázek v hlavičce stránky.</b><br /> 56 Ano <input type= \"radio\" name=\"random\" value=\"yes\"".Check("random","yes").">57 Ne <input type= \"radio\" name=\"random\" value=\"no\"".Check("random","no").">52 Ano <input type="radio" name="random" value="yes"'.Check('random', 'yes').'> 53 Ne <input type="radio" name="random" value="no"'.Check('random','no').'> 58 54 <br /> 59 55 <b>Preferovaný tooltip</b><br /> 60 Wowhead <input type= \"radio\" name=\"widget\" value=\"wowhead\"".Check("widget","wowhead").">61 Thottbot <input type= \"radio\" name=\"widget\" value=\"thottbot\"".Check("widget","thottbot").">56 Wowhead <input type="radio" name="widget" value="wowhead"'.Check('widget', 'wowhead').'> 57 Thottbot <input type="radio" name="widget" value="thottbot"'.Check('widget', 'thottbot').'> 62 58 <br /> 63 59 <b>Rychlý přehled</b><br /> 64 Ano <input type= \"radio\" name=\"quick\" value=\"yes\"".Check("quick","yes").">65 Ne <input type= \"radio\" name=\"quick\" value=\"no\"".Check("quick","no").">60 Ano <input type="radio" name="quick" value="yes"'.Check('quick', 'yes').'> 61 Ne <input type="radio" name="quick" value="no"'.Check('quick', 'no').'> 66 62 <br /> 67 63 <b>Zobrazovat web</b><br /> 68 Web 1.0 (původní menu vlevo) <input type=\"radio\" name=\"web\" value=\"1\"".Check("web","1")."><br /> 69 Web 2.0 (nový menu vpravo) <input type=\"radio\" name=\"web\" value=\"2\"".Check("web","2")."> 64 Web 1.0 (původní menu vlevo) <input type="radio" name="web" value="1"'.Check('web', 1).'><br /> 65 Web 2.0 (nový menu vpravo) <input type="radio" name="web" value="2"'.Check('web', 2).'> 66 <br /> 67 <input type="submit" value="Uložit" name="save"> 68 </form>'.$msg.'</div>'); 70 69 70 $html->PrgStop(); 71 71 72 73 <br />74 <input type=\"submit\" value=\"Uložit\" name=\"save\">75 </form>76 77 ".$msg."78 </div>79 ";80 81 82 83 84 $html -> PrgStop();85 72 ?> -
trunk/rss.php
r555 r579 1 1 <?php 2 2 3 header( "Content-Type: text/xml");3 header('Content-Type: text/xml'); 4 4 5 5 include('inc/db.php'); … … 29 29 $Config['Web']['Title'] .= ' - žádosti hráčů'; 30 30 $db->select_db($Config['Mangos']['DatabaseCharacters']); 31 $DbResult = $db->query( "SELECT `character_ticket`.`ticket_text` AS `text`, `characters`.`name` AS `name` FROM `character_ticket` JOIN `characters` ON `characters`.`guid` = `character_ticket`.`guid`");31 $DbResult = $db->query('SELECT `character_ticket`.`ticket_text` AS `text`, `characters`.`name` AS `name` FROM `character_ticket` JOIN `characters` ON `characters`.`guid` = `character_ticket`.`guid`'); 32 32 while($Row = $DbResult->fetch_array()) 33 33 { … … 42 42 if($_GET['category'] == 'finance') 43 43 { 44 $OperationType = array('consumption' => 'Spotřeba', 'contribution' => 'Příspěvek', 'buy' => 'Nákup', 'sell' => 'Prodej', 'internet' => 'Internet'); 44 45 $Config['Web']['Title'] .= ' - finanční příspěvky'; 45 46 $DbResult = $db->query('SELECT UNIX_TIMESTAMP(time), operation, description, money FROM finance ORDER BY time DESC LIMIT '.$NewsCount); … … 50 51 'Title' => $OperationType[$Row['operation']].' '.$Row['description'].' ('.$Row['money'].' Kč)', 51 52 'Link' => 'http://'.$_SERVER['SERVER_NAME'].$Config['Web']['BaseURL'].'finance/', 52 'Description' => $OperationType[$Row['operation']].' '.$Row['description']. "<br>".$Row['money']." Kč",53 'Description' => $OperationType[$Row['operation']].' '.$Row['description'].'<br />'.$Row['money'].' Kč', 53 54 'Time' => $Row['UNIX_TIMESTAMP(time)'], 54 55 );
Note:
See TracChangeset
for help on using the changeset viewer.