Changeset 556
- Timestamp:
- Mar 29, 2009, 6:45:56 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gh_system/conn_sample.php
r409 r556 1 <? 1 <?php 2 2 3 $SQL_Server = "localhost"; 3 4 $SQL_Uzivatel = "jméno"; … … 9 10 $server = "TEST"; 10 11 11 12 13 14 15 12 ?> -
trunk/inc/config.sample.php
r551 r556 26 26 'DatabaseRealmd' => 'realmd', 27 27 'DatabaseScriptDev2' => 'scriptdev2', 28 'GMCommandsLog' => 'gm_commands.log', 28 29 ), 29 30 'Web' => array -
trunk/inc/server.php
r553 r556 4 4 { 5 5 private $db; 6 public function __construct ($db) 7 { 8 $this -> db = $db; 9 } 10 // -- 11 public function HumanDate ($date,$time = 1) 12 { 13 // input date is 0000-00-00 00:00:00 14 $date_arr = explode(" ",$date); 15 $date = explode("-",$date_arr[0]); 16 $time_stp = explode(":",$date_arr[1]); 17 $time = mktime($time_stp[0],$time_stp[1],$time_stp[2],$date[1],$date[2],$date[0]); 18 if ($time == 1) 19 { 20 $human_date = date ("d.m.Y H:i:s",$time); 21 } 22 else 23 { 24 $human_date = date ("d.m.Y",$time); 25 } 26 return $human_date; 27 } 28 // -- 29 public function RealmOnline () 30 { 31 $this -> db -> select_db("realm1_realmd"); 32 $pocet = $this -> db -> query("SELECT `id` FROM `account` WHERE `online` = '1'") -> num_rows; 33 return $pocet; 34 } 35 // -- 36 public function ParseCopper ($copper_in) 37 { 38 $copper = $copper_in; 39 $golds = floor($copper / 10000); 40 $num = $copper - $golds * 10000; 41 $silver = floor($num / 100); 42 $copper = $num - $silver * 100; 43 $show_golds = "<font size=\"4\">".$golds."</font> <img src=\"imgs/inc/g.gif\">"; 44 $show_silver = "<font size=\"4\">".$silver."</font> <img src=\"imgs/inc/s.gif\">"; 45 $show_copper = "<font size=\"4\">".$copper."</font> <img src=\"imgs/inc/c.gif\">"; 46 return $show_golds." ".$show_silver." ".$show_copper; 47 } 6 7 public function __construct($db) 8 { 9 $this->db = $db; 10 } 11 12 public function HumanDate($date, $time = 1) 13 { 14 // input date is 0000-00-00 00:00:00 15 $date_arr = explode(' ', $date); 16 $date = explode('-', $date_arr[0]); 17 $time_stp = explode(':', $date_arr[1]); 18 $time = mktime($time_stp[0], $time_stp[1], $time_stp[2], $date[1], $date[2], $date[0]); 19 if($time == 1) $human_date = date('d.m.Y H:i:s', $time); 20 else $human_date = date('d.m.Y', $time); 21 return($human_date); 22 } 23 24 public function RealmOnline() 25 { 26 global $Config; 27 28 $this->db->select_db($Config['Mangos']['DatabaseRealmd']); 29 $pocet = $this->db->query('SELECT `id` FROM `account` WHERE `online` = 1')->num_rows; 30 return($pocet); 31 } 32 33 public function ParseCopper($copper_in) 34 { 35 $copper = $copper_in; 36 $golds = floor($copper / 10000); 37 $num = $copper - $golds * 10000; 38 $silver = floor($num / 100); 39 $copper = $num - $silver * 100; 40 $show_golds = '<font size="4">'.$golds.'</font> <img src="imgs/inc/g.gif">'; 41 $show_silver = '<font size="4">'.$silver.'</font> <img src="imgs/inc/s.gif">'; 42 $show_copper = '<font size="4">'.$copper.'</font> <img src="imgs/inc/c.gif">'; 43 return($show_golds.' '.$show_silver.' '.$show_copper); 44 } 48 45 49 // -- 50 public function MangosOnline() 51 { 52 include("inc/db.php"); 53 $this -> db -> select_db($db_characters); 54 $pocet = $this -> db -> query("SELECT `guid` FROM `characters` WHERE `online` = '1'") -> num_rows; 55 return $pocet; 56 } 57 // -- 58 public function ServerOnline($ip, $port) 59 { 60 if($fp1 = @fsockopen($ip, $port, $ERROR_NO, $ERROR_STR,(float)0.5)) 61 { 62 fclose($fp1); 63 return true; 64 } 65 else 66 {return false;} 67 } 68 // -- 69 public function ServerImg ($status) 70 { 71 if ($status) 72 { 73 return('<img src="imgs/inc/on.gif" alt="online" /> <span style="text-color: #234303; text-size: 4;">Online</span>'); 74 } 75 else 76 { 77 return('<img src="imgs/inc/off.gif" alt="offline" /> <span style="text-color: #990000; text-size: 4;">Offline</span>'); 78 } 79 } 80 // -- 81 public function ServerUptime () 82 { 83 include("inc/db.php"); 84 $this -> db -> select_db($db_mangos); 85 $row = $this -> db -> query('SELECT `starttime`, `uptime` FROM `uptime` ORDER BY `starttime` DESC LIMIT 1') ->fetch_array(); 86 $uptime = round($row["uptime"] / 3600); 87 return $uptime; 88 } 89 // -- 90 public function CharacterCount() 91 { 92 include("inc/db.php"); 93 $this -> db -> select_db($db_characters); 94 $row = $this -> db -> query("SELECT COUNT(*) FROM characters") -> fetch_array(); 95 return($row[0]); 96 } 97 // -- 98 public function AccountCount() 99 { 100 include("inc/db.php"); 101 $this -> db -> select_db($db_realmd); 102 $row = $this -> db -> query("SELECT COUNT(*) FROM account") -> fetch_array(); 103 return($row[0]); 104 } 105 // -- 106 public function GuidToCharName ($guid) 107 { 108 include("inc/db.php"); 109 $this -> db -> select_db($db_characters); 110 $row = $this -> db -> query("SELECT `name` FROM `characters` WHERE `guid` = '".$guid."' LIMIT 1;") -> fetch_array(); 111 return $row["name"]; 112 } 113 // -- 114 public function ShowGmLog ($log) 115 { 116 echo " 117 <table border=\"1\" width=\"540\"> 118 <tr> 46 public function MangosOnline() 47 { 48 global $Config; 49 50 include('inc/db.php'); 51 $this->db->select_db($Config['Mangos']['DatabaseCharacters']); 52 $pocet = $this->db->query('SELECT `guid` FROM `characters` WHERE `online` = 1')->num_rows; 53 return($pocet); 54 } 55 56 public function ServerOnline($ip, $port) 57 { 58 if($fp1 = @fsockopen($ip, $port, $ERROR_NO, $ERROR_STR, (float)0.5)) 59 { 60 fclose($fp1); 61 return(true); 62 } else 63 { 64 return(false); 65 } 66 } 67 68 public function ServerImg($status) 69 { 70 if($status) return('<img src="imgs/inc/on.gif" alt="online" /> <span style="text-color: #234303; text-size: 4;">Online</span>'); 71 else return('<img src="imgs/inc/off.gif" alt="offline" /> <span style="text-color: #990000; text-size: 4;">Offline</span>'); 72 } 73 74 public function ServerUptime() 75 { 76 global $Config; 77 78 include('inc/db.php'); 79 $this->db->select_db($Config['Mangos']['DatabaseRealmd']); 80 $row = $this->db->query('SELECT `starttime`, `uptime` FROM `uptime` ORDER BY `starttime` DESC LIMIT 1') 81 ->fetch_array(); 82 $uptime = round($row['uptime'] / 3600); 83 return($uptime); 84 } 85 86 public function CharacterCount() 87 { 88 global $Config; 89 90 include('inc/db.php'); 91 $this->db->select_db($Config['Mangos']['DatabaseCharacters']); 92 $row = $this->db->query('SELECT COUNT(*) FROM characters')->fetch_array(); 93 return($row[0]); 94 } 95 96 public function AccountCount() 97 { 98 global $Config; 99 100 include('inc/db.php'); 101 $this->db->select_db($Config['Mangos']['DatabaseRealmd']); 102 $row = $this->db->query('SELECT COUNT(*) FROM account')->fetch_array(); 103 return($row[0]); 104 } 105 106 public function GuidToCharName($guid) 107 { 108 global $Config; 109 include('inc/db.php'); 110 $this->db->select_db($Config['Mangos']['DatabaseCharacters']); 111 $row = $this->db->query('SELECT `name` FROM `characters` WHERE `guid` = "'.$guid.'" LIMIT 1')->fetch_array(); 112 return($row['name']); 113 } 114 115 public function ShowGmLog($log) 116 { 117 echo('<table border="1" width="540">'. 118 '<tr> 119 119 <th>Čas</th> 120 120 <th>GM</th> 121 121 <th>Příkaz</th> 122 122 <th>Vybrán</th> 123 </tr> 124 "; 125 $gm_log = ereg_replace("\n",";",$log); 126 $gm_log = explode(";",$gm_log); 127 $gm_log = array_reverse($gm_log); 128 foreach($gm_log as $row) 129 { 130 131 if (strpos($row,"Command:") == true) 132 { 133 $edited = str_replace(" Command: ", ";", $row); // 0 - time 134 $edited = str_replace(" (Account: ", ";", $edited); // 1 - command 135 $edited = str_replace(" [Player: ", ";", $edited); // 2 - gm 136 $edited = str_replace(" Selected: ", ";", $edited); // 3 - position 137 $edited = str_replace(" (GUID: ", ";", $edited); // 4 - selected 138 $edited = str_replace(")]", ";", $edited); // 5 - selected guid 139 $edited_arr = explode(";",$edited); 140 if ($edited_arr[4] == "player") 141 {$sel_name = " - ".$this -> GuidToCharName($edited_arr[5]);} 142 else 143 {$sel_name = "";} 144 $human_date = $this -> HumanDate ($edited_arr[0]); 145 echo " 146 <tr> 147 <td><font size=\"2\">".$human_date."</font></td> 148 <td>".$edited_arr[2]."</td> 149 <td>".$edited_arr[1]."</td> 150 <td>".$edited_arr[4].$sel_name."</td> 151 </tr> 152 "; 153 } 154 if (strpos($row,"mail item:") == true) 155 { 156 $edited = str_replace(" GM ", ";", $row); 157 $edited = str_replace(" (Account: ", ";", $edited); 158 $edited = str_replace(") mail item: ", ";", $edited); 159 $edited = str_replace(" (Account: ", ";", $edited); 160 $edited = str_replace(")", "", $edited); 161 $edited_arr = explode(";",$edited); 162 $human_date = $this -> HumanDate ($edited_arr[0]); 163 echo " 164 <tr> 165 <td><font size=\"2\">".$human_date."</font></td> 166 <td>".$edited_arr[1]."</td> 167 <td>Send : ".$edited_arr[3].")</td> 123 </tr>'); 124 $gm_log = ereg_replace("\n",";",$log); 125 $gm_log = explode(";",$gm_log); 126 $gm_log = array_reverse($gm_log); 127 foreach($gm_log as $row) 128 { 129 if (strpos($row,"Command:") == true) 130 { 131 $edited = str_replace(" Command: ", ";", $row); // 0 - time 132 $edited = str_replace(" (Account: ", ";", $edited); // 1 - command 133 $edited = str_replace(" [Player: ", ";", $edited); // 2 - gm 134 $edited = str_replace(" Selected: ", ";", $edited); // 3 - position 135 $edited = str_replace(" (GUID: ", ";", $edited); // 4 - selected 136 $edited = str_replace(")]", ";", $edited); // 5 - selected guid 137 $edited_arr = explode(";",$edited); 138 if($edited_arr[4] == "player") $sel_name = " - ".$this -> GuidToCharName($edited_arr[5]); 139 else $sel_name = ''; 140 $human_date = $this -> HumanDate ($edited_arr[0]); 141 echo('<tr> 142 <td><font size="2">'.$human_date.'</font></td> 143 <td>'.$edited_arr[2].'</td> 144 <td>'.$edited_arr[1].'</td> 145 <td>'.$edited_arr[4].$sel_name.'</td> 146 </tr>'); 147 } 148 if(strpos($row, 'mail item:') == true) 149 { 150 $edited = str_replace(" GM ", ";", $row); 151 $edited = str_replace(" (Account: ", ";", $edited); 152 $edited = str_replace(") mail item: ", ";", $edited); 153 $edited = str_replace(" (Account: ", ";", $edited); 154 $edited = str_replace(")", "", $edited); 155 $edited_arr = explode(";",$edited); 156 $human_date = $this -> HumanDate ($edited_arr[0]); 157 echo('<tr> 158 <td><font size="2">'.$human_date.'</font></td> 159 <td>'.$edited_arr[1].'</td> 160 <td>Send : '.$edited_arr[3].')</td> 168 161 <td>-</td> 169 </tr> 170 "; 162 </tr>'); 163 } 164 if(strpos($row,"trade:") == true) 165 { 166 $edited = str_replace(" GM ", ";", $row); 167 $edited = str_replace(" (Account: ", ";", $edited); 168 $edited = str_replace(") trade: ", ";", $edited); 169 $edited = str_replace(" (Account: ", ";", $edited); 170 $edited = str_replace(")", "", $edited); 171 $edited_arr = explode(";",$edited); 171 172 172 } 173 if (strpos($row,"trade:") == true) 174 { 175 $edited = str_replace(" GM ", ";", $row); 176 $edited = str_replace(" (Account: ", ";", $edited); 177 $edited = str_replace(") trade: ", ";", $edited); 178 $edited = str_replace(" (Account: ", ";", $edited); 179 $edited = str_replace(")", "", $edited); 180 $edited_arr = explode(";",$edited); 181 182 $human_date = $this -> HumanDate ($edited_arr[0]); 183 echo " 184 <tr> 185 <td><font size=\"2\">".$human_date."</font></td> 186 <td>".$edited_arr[1]."</td> 187 <td>Trade : ".$edited_arr[3].")</td> 173 $human_date = $this -> HumanDate ($edited_arr[0]); 174 echo('<tr> 175 <td><font size="2">'.$human_date.'</font></td> 176 <td>'.$edited_arr[1].'</td> 177 <td>Trade : '.$edited_arr[3].')</td> 188 178 <td>-</td> 189 </tr> 190 "; 191 } 192 } 193 echo "</table>"; 179 </tr>'); 194 180 } 195 // --196 public function SeoUrl ($title)197 {198 $address = $title;199 $diakritika = array("á","ä","č","ď","é","ě","ë","í","ň","ó","ö","ř","š","ť","ú","ů","ü","ý","ž","Á","Ä","Č","Ď","É","Ě","Ë","Í","Ň","Ó","Ö","Ř","Š","Ť","Ú","Ů","Ü","Ý","Ž");200 $nediakritika = array("a","a","c","d","e","e","e","i","n","o","o","r","s","t","u","u","u","y","z","A","A","C","D","E","E","E","I","N","O","O","R","S","T","U","U","U","Y","Z");201 $address = str_replace($diakritika, $nediakritika, $address);202 $address = strtolower ($address);203 $address = preg_replace ("/[^[:alpha:][:digit:]]/", "-", $address);204 $address = trim ($address, "-");205 $address = preg_replace ("/[-]+/", "-", $address);206 return $address;207 }208 // --209 public function MapName ($id)210 {211 $map_id = Array(212 0 => array(0,"Azeroths"),213 1 => array(1,"Kalimdor"),214 13 => array(13,"Test Zone"),215 17 => array(17,"Kalidar"),216 30 => array(30,"Alterac Valley"),217 33 => array(33,"Shadowfang Keep Instance"),218 34 => array(34,"The Stockade Instance"),219 35 => array(35,"Stormwind Prison"),220 36 => array(36,"Deadmines Instance"),221 37 => array(37,"Plains of Snow"),222 43 => array(43,"Wailing Caverns Instance"),223 44 => array(44,"Monastery Interior"),224 47 => array(47,"Razorfen Kraul Instance"),225 48 => array(48,"Blackfathom Deeps Instance"),226 70 => array(70,"Uldaman Instance"),227 90 => array(90,"Gnomeregan Instance"),228 109 => array(109,"Sunken Temple Instance"),229 129 => array(129,"Razorfen Downs Instance"),230 150 => array(150,"Outland"),231 169 => array(169,"Emerald Forest"),232 189 => array(189,"Scarlet Onastery Instance"),233 209 => array(209,"Zul farrak Instance"),234 229 => array(229,"Blackrock Spire Instance"),235 230 => array(230,"Blackrock Depths Instance"),236 249 => array(249,"Onyxia s Lair Instance"),237 269 => array(269,"Cot Black Morass"),238 289 => array(289,"Scholomance Instance"),239 309 => array(309,"Zul Gurub Instance"),240 329 => array(329,"Stratholme Instance"),241 349 => array(349,"Maraudon Instance"),242 369 => array(369,"Deeprun Tram"),243 389 => array(389,"Ragefire Chasm Instance"),244 409 => array(409,"The Molten Core Instance"),245 429 => array(429,"dire_maul Instance"),246 449 => array(449,"Alliance pvp Barracks"),247 450 => array(450,"Horde pvp Barracks"),248 451 => array(451,"Development Land"),249 469 => array(469,"BlackwingLair Instance"),250 489 => array(489,"Warsong Gulch"),251 509 => array(509,"Ruins of ahn Qiraj Instance"),252 529 => array(529,"Arathi Basin"),253 530 => array(530,"Outland"),254 531 => array(531,"Temple of ahn Qiraj Instance"),255 532 => array(532,"Karazahn"),256 533 => array(533,"Naxxramas Instance"),257 534 => array(534,"Cot_hyjal Past"),258 540 => array(540,"Hellfire Military"),259 542 => array(542,"Hellfire Demon"),260 543 => array(543,"Hellfire Rampart"),261 544 => array(544,"Hellfire Raid"),262 545 => array(545,"Coilfang Pumping"),263 546 => array(546,"Coilfang Marsh"),264 547 => array(547,"Coilfang Draenei"),265 548 => array(548,"Coilfang Raid"),266 550 => array(550,"Tempest Keep Raid"),267 552 => array(552,"Tempest Keep Arcane"),268 553 => array(553,"Tempest Keep Atrium"),269 554 => array(554,"Tempest Keep Factory"),270 555 => array(555,"Auchindoun Shadow"),271 556 => array(556,"Auchindoun Srakkoa"),272 557 => array(557,"Auchindoun Ethereal"),273 558 => array(558,"Auchindoun Draenei"),274 559 => array(559,"Nagrand Arena"),275 560 => array(560,"Cot Hillsbrad Past"),276 562 => array(562,"Blades Edge Arena"),277 564 => array(564,"Black Temple"),278 565 => array(565,"Gruuls Lair"),279 566 => array(566,"Netherstorm Arena"),280 568 => array(568,"Zulaman")281 );282 if(isset($map_id[$id]))283 {284 return $map_id[$id][1];285 }286 else287 {288 return("Neznámá");289 }290 }291 // --292 public function ZoneName($id)293 {294 $zone_id = Array(295 1497 => Array("Undercity",1497),296 1537 => Array("Ironforge",1537),297 1519 => Array("Stormwind city",1519),298 3 => Array("Badlands",3),299 11 => Array("Wetlands",11),300 33 => Array("Stranglethorn Vale",33),301 44 => Array("Redridge Mountains",44),302 38 => Array("Loch Modan",38),303 10 => Array("Duskwood",10),304 41 => Array("Deadwind Pass",41),305 12 => Array("Elwynn Forest",12),306 46 => Array("Burning Steppes",46),307 51 => Array("Searing Gorge",51),308 1 => Array("Dun Morogh",1),309 47 => Array("The Hinterlands",47),310 40 => Array("Westfall",40),311 267 => Array("Hillsbrad Foothills",267),312 139 => Array("Eastern Plaguelands",139),313 28 => Array("Western Plaguelands",28),314 130 => Array("Silverpine Forest",130),315 85 => Array("Tirisfal Glades",85),316 4 => Array("Blasted Lands",4),317 8 => Array("Swamp of Sorrows",8),318 45 => Array("Arathi Highlands",45),319 36 => Array("Alterac Mountains",36),320 1657 => Array("Darnassus",1657),321 1638 => Array("Thunder_bluff",1638),322 1637 => Array("Orgrimmar",1637),323 493 => Array("Moonglade",493),324 1377 => Array("Silithus",1377),325 618 => Array("Winterspring",618),326 490 => Array("Un Goro Crater",490),327 361 => Array("Felwood",361),328 16 => Array("Azshara",16),329 440 => Array("Tanaris",440),330 15 => Array("Dustwallow Marsh",15),331 215 => Array("Mulgore",215),332 357 => Array("Feralas",357),333 405 => Array("Desolace",405),334 400 => Array("Thousand Needles",400),335 14 => Array("Durotar",14),336 331 => Array("Ashenvale",331),337 148 => Array("Darkshore",148),338 141 => Array("Teldrassil",141),339 406 => Array("Stonetalon Mountains",406),340 17 => Array("She Barrens",17),341 3703 => Array("Shattrath city",3703),342 3487 => Array("Silvermoon city",3487),343 3523 => Array("Netherstorm",3523),344 3519 => Array("Terokkar Forest",3519),345 3518 => Array("Nagrand",3518),346 3525 => Array("Bloodmyst Isle",3525),347 3522 => Array("Blades Edge Mountains",3522),348 3520 => Array("Shadowmoon Valley",3520),349 3557 => Array("The Exodar",3557),350 3521 => Array("Zangarmarsh",3521),351 3483 => Array("Hellfire Peninsula",3483),352 3524 => Array("Azuremyst Isle",3524),353 3433 => Array("Ghostlands",3433),354 3430 => Array("Eversong Woods",3430)355 );356 if( isset($zone_id[$id]))357 {358 return $zone_id[$id][0];359 }360 else361 {362 return("-");363 }364 181 } 182 echo('</table>'); 183 } 184 185 public function SeoUrl($title) 186 { 187 $address = $title; 188 $diakritika = array("á","ä","č","ď","é","ě","ë","í","ň","ó","ö","ř","š","ť","ú","ů","ü","ý","ž","Á","Ä","Č","Ď","É","Ě","Ë","Í","Ň","Ó","Ö","Ř","Š","Ť","Ú","Ů","Ü","Ý","Ž"); 189 $nediakritika = array("a","a","c","d","e","e","e","i","n","o","o","r","s","t","u","u","u","y","z","A","A","C","D","E","E","E","I","N","O","O","R","S","T","U","U","U","Y","Z"); 190 $address = str_replace($diakritika, $nediakritika, $address); 191 $address = strtolower ($address); 192 $address = preg_replace ("/[^[:alpha:][:digit:]]/", "-", $address); 193 $address = trim ($address, "-"); 194 $address = preg_replace ("/[-]+/", "-", $address); 195 return($address); 196 } 197 198 public function MapName($id) 199 { 200 $map_id = Array 201 ( 202 0 => array(0,"Azeroths"), 203 1 => array(1,"Kalimdor"), 204 13 => array(13,"Test Zone"), 205 17 => array(17,"Kalidar"), 206 30 => array(30,"Alterac Valley"), 207 33 => array(33,"Shadowfang Keep Instance"), 208 34 => array(34,"The Stockade Instance"), 209 35 => array(35,"Stormwind Prison"), 210 36 => array(36,"Deadmines Instance"), 211 37 => array(37,"Plains of Snow"), 212 43 => array(43,"Wailing Caverns Instance"), 213 44 => array(44,"Monastery Interior"), 214 47 => array(47,"Razorfen Kraul Instance"), 215 48 => array(48,"Blackfathom Deeps Instance"), 216 70 => array(70,"Uldaman Instance"), 217 90 => array(90,"Gnomeregan Instance"), 218 109 => array(109,"Sunken Temple Instance"), 219 129 => array(129,"Razorfen Downs Instance"), 220 150 => array(150,"Outland"), 221 169 => array(169,"Emerald Forest"), 222 189 => array(189,"Scarlet Onastery Instance"), 223 209 => array(209,"Zul farrak Instance"), 224 229 => array(229,"Blackrock Spire Instance"), 225 230 => array(230,"Blackrock Depths Instance"), 226 249 => array(249,"Onyxia s Lair Instance"), 227 269 => array(269,"Cot Black Morass"), 228 289 => array(289,"Scholomance Instance"), 229 309 => array(309,"Zul Gurub Instance"), 230 329 => array(329,"Stratholme Instance"), 231 349 => array(349,"Maraudon Instance"), 232 369 => array(369,"Deeprun Tram"), 233 389 => array(389,"Ragefire Chasm Instance"), 234 409 => array(409,"The Molten Core Instance"), 235 429 => array(429,"dire_maul Instance"), 236 449 => array(449,"Alliance pvp Barracks"), 237 450 => array(450,"Horde pvp Barracks"), 238 451 => array(451,"Development Land"), 239 469 => array(469,"BlackwingLair Instance"), 240 489 => array(489,"Warsong Gulch"), 241 509 => array(509,"Ruins of ahn Qiraj Instance"), 242 529 => array(529,"Arathi Basin"), 243 530 => array(530,"Outland"), 244 531 => array(531,"Temple of ahn Qiraj Instance"), 245 532 => array(532,"Karazahn"), 246 533 => array(533,"Naxxramas Instance"), 247 534 => array(534,"Cot_hyjal Past"), 248 540 => array(540,"Hellfire Military"), 249 542 => array(542,"Hellfire Demon"), 250 543 => array(543,"Hellfire Rampart"), 251 544 => array(544,"Hellfire Raid"), 252 545 => array(545,"Coilfang Pumping"), 253 546 => array(546,"Coilfang Marsh"), 254 547 => array(547,"Coilfang Draenei"), 255 548 => array(548,"Coilfang Raid"), 256 550 => array(550,"Tempest Keep Raid"), 257 552 => array(552,"Tempest Keep Arcane"), 258 553 => array(553,"Tempest Keep Atrium"), 259 554 => array(554,"Tempest Keep Factory"), 260 555 => array(555,"Auchindoun Shadow"), 261 556 => array(556,"Auchindoun Srakkoa"), 262 557 => array(557,"Auchindoun Ethereal"), 263 558 => array(558,"Auchindoun Draenei"), 264 559 => array(559,"Nagrand Arena"), 265 560 => array(560,"Cot Hillsbrad Past"), 266 562 => array(562,"Blades Edge Arena"), 267 564 => array(564,"Black Temple"), 268 565 => array(565,"Gruuls Lair"), 269 566 => array(566,"Netherstorm Arena"), 270 568 => array(568,"Zulaman") 271 ); 272 if(isset($map_id[$id])) return($map_id[$id][1]); 273 else return("Neznámá"); 274 } 275 276 public function ZoneName($id) 277 { 278 $zone_id = Array 279 ( 280 1497 => Array("Undercity",1497), 281 1537 => Array("Ironforge",1537), 282 1519 => Array("Stormwind city",1519), 283 3 => Array("Badlands",3), 284 11 => Array("Wetlands",11), 285 33 => Array("Stranglethorn Vale",33), 286 44 => Array("Redridge Mountains",44), 287 38 => Array("Loch Modan",38), 288 10 => Array("Duskwood",10), 289 41 => Array("Deadwind Pass",41), 290 12 => Array("Elwynn Forest",12), 291 46 => Array("Burning Steppes",46), 292 51 => Array("Searing Gorge",51), 293 1 => Array("Dun Morogh",1), 294 47 => Array("The Hinterlands",47), 295 40 => Array("Westfall",40), 296 267 => Array("Hillsbrad Foothills",267), 297 139 => Array("Eastern Plaguelands",139), 298 28 => Array("Western Plaguelands",28), 299 130 => Array("Silverpine Forest",130), 300 85 => Array("Tirisfal Glades",85), 301 4 => Array("Blasted Lands",4), 302 8 => Array("Swamp of Sorrows",8), 303 45 => Array("Arathi Highlands",45), 304 36 => Array("Alterac Mountains",36), 305 1657 => Array("Darnassus",1657), 306 1638 => Array("Thunder_bluff",1638), 307 1637 => Array("Orgrimmar",1637), 308 493 => Array("Moonglade",493), 309 1377 => Array("Silithus",1377), 310 618 => Array("Winterspring",618), 311 490 => Array("Un Goro Crater",490), 312 361 => Array("Felwood",361), 313 16 => Array("Azshara",16), 314 440 => Array("Tanaris",440), 315 15 => Array("Dustwallow Marsh",15), 316 215 => Array("Mulgore",215), 317 357 => Array("Feralas",357), 318 405 => Array("Desolace",405), 319 400 => Array("Thousand Needles",400), 320 14 => Array("Durotar",14), 321 331 => Array("Ashenvale",331), 322 148 => Array("Darkshore",148), 323 141 => Array("Teldrassil",141), 324 406 => Array("Stonetalon Mountains",406), 325 17 => Array("She Barrens",17), 326 3703 => Array("Shattrath city",3703), 327 3487 => Array("Silvermoon city",3487), 328 3523 => Array("Netherstorm",3523), 329 3519 => Array("Terokkar Forest",3519), 330 3518 => Array("Nagrand",3518), 331 3525 => Array("Bloodmyst Isle",3525), 332 3522 => Array("Blades Edge Mountains",3522), 333 3520 => Array("Shadowmoon Valley",3520), 334 3557 => Array("The Exodar",3557), 335 3521 => Array("Zangarmarsh",3521), 336 3483 => Array("Hellfire Peninsula",3483), 337 3524 => Array("Azuremyst Isle",3524), 338 3433 => Array("Ghostlands",3433), 339 3430 => Array("Eversong Woods",3430) 340 ); 341 if(isset($zone_id[$id])) return($zone_id[$id][0]); 342 else return('-'); 343 } 365 344 } 366 345 -
trunk/pages/dotation.php
r499 r556 1 1 <?php 2 echo"<h3>Příspěvky na server:</h3> 2 3 echo('<h3>Příspěvky na server:</h3> 3 4 <p> 4 Přispěvkem na server budete mít kvalitnější hraní a dobrý pocit. I neoficiální servery musí pokrýt svou údržbu a vývoj a tyto peníze se nebudou zneužívat.<br> 5 <br> 6 <table align=\"center\" border=\"1\" width=\"500\"> 5 Přispěvkem na server budete mít kvalitnější hraní a dobrý pocit. I neoficiální servery musí pokrýt svou údržbu a vývoj a tyto peníze se nebudou zneužívat.</p> 6 <table class="gmlog"> 7 7 <tr> 8 <t d align=\"center\">Odměna</a></td>9 <t d align=\"center\">Příspěvek(CZK)</a></td>8 <th>Odměna</th> 9 <th>Příspěvek(CZK)</th> 10 10 </tr> 11 11 <tr> 12 <td align=\"center\">Přejmenování</td>13 <td align=\"center\">50</td>12 <td>Přejmenování</td> 13 <td>50</td> 14 14 </tr> 15 15 <tr> 16 <td align=\"center\">Převod postavy (z účtu na účet)</td>17 <td align=\"center\">50</td>16 <td>Převod postavy (z účtu na účet)</td> 17 <td>50</td> 18 18 </tr> 19 19 <tr> 20 <td align=\"center\">Převod postavy (z jiného/na jiný server)</td>21 <td align=\"center\">Neprovádí se</td>20 <td>Převod postavy (z jiného/na jiný server)</td> 21 <td>Neprovádí se</td> 22 22 </tr> 23 23 <tr> 24 <td align=\"center\">Obnovení postavy ze zálohy</td>25 <td align=\"center\">200</td>24 <td>Obnovení postavy ze zálohy</td> 25 <td>200</td> 26 26 </tr> 27 27 <tr> 28 <td align=\"center\">Unban (první, pak se cena zdvojnásobuje)</td>29 <td align=\"center\">200</td>28 <td>Unban (první, pak se cena zdvojnásobuje)</td> 29 <td>200</td> 30 30 </tr> 31 31 <tr> 32 <td align=\"center\">PvP Mount či Spectral Tiger + 36-místný batůžek</td>33 <td align=\"center\">300</td>32 <td>PvP Mount či Spectral Tiger + 36-místný batůžek</td> 33 <td>300</td> 34 34 </tr> 35 35 </table> 36 <br> 37 Své příspěvky posílejte na účet 670100-2202937132/6210, předem vřele děkujeme.<br> 38 Peníze můžete poslat bankovním převodem z jiného účtu nebo vložit přímo v hotovosti v některé bance na přepážce nebo také na poště. Do zprávy pro příjemce uvěďte slovo WoW, svůj nick a jméno svého účtu na serveru, případně krátký text, který tu bude v případě nezávadnosti zobrazen.<br> 39 <br> 40 Příspěvky jsou dobrovolné a nevymahatelné nazpět. Vybrané peníze budou použity na financování provozu a zlepšování serveru.<br> 41 </p>"; 36 <p> 37 Své příspěvky posílejte na účet 670100-2202937132/6210, předem vřele děkujeme.<br /> 38 Peníze můžete poslat bankovním převodem z jiného účtu nebo vložit přímo v hotovosti v některé bance na přepážce nebo také na poště. Do zprávy pro příjemce uvěďte slovo WoW, svůj nick a jméno svého účtu na serveru, případně krátký text, který tu bude v případě nezávadnosti zobrazen.<br /> 39 </p><p> 40 Příspěvky jsou dobrovolné a nevymahatelné nazpět. Vybrané peníze budou použity na financování provozu a zlepšování serveru. 41 </p>'); 42 42 43 $operace = array( 43 44 "buy" => "Nákup", … … 52 53 $load_money = $db -> query("SELECT SUM(`money`) FROM `finance`;") -> fetch_array(); 53 54 54 echo"<p><strong>Aktuální stav financí: ".$load_money[0]." Kč</strong></p>"; 55 echo " 56 <table border=\"1\" width=\"540\"> 57 <tr> 58 <th>Datum</th> 59 <th>Suma</th> 60 <th>Popis</th> 61 <th>Odměna</th> 62 </tr> 63 "; 64 $load_dotation = $db -> query("SELECT * FROM `finance` ORDER BY `id` DESC;"); 65 while ($row = $load_dotation -> fetch_array()) 55 echo('<p><strong>Aktuální stav financí: '.$load_money[0].' Kč</strong></p>'); 56 echo('<table class="gmlog">'. 57 '<tr>'. 58 '<th>Datum</th>'. 59 '<th>Suma</th>'. 60 '<th>Popis</th>'. 61 '<th>Odměna</th>'. 62 '</tr>'); 63 64 $load_dotation = $db->query('SELECT * FROM `finance` ORDER BY `id` DESC'); 65 while ($row = $load_dotation->fetch_array()) 66 { 67 $odmena = $row['odmena']; 68 69 if($row['time'] != '') 66 70 { 67 $odmena = $row["odmena"]; 68 69 if ($row["time"] != "") 70 { 71 72 //$date = $server -> HumanDate ($row["time"],0); 73 $date = $row["time"]; 74 } 75 else 76 { 77 $date = ""; 78 } 79 if($row["money"] > 0) 80 {$plus = "+";} else{$plus = "";} 81 echo " 82 <tr> 83 <td align=\"center\">".$date."</td> 84 <td align=\"center\">".$plus.$row["money"]."</td> 85 <td align=\"left\">".$operace[$row["operation"]]." ".$row["description"]."</td> 86 <td align=\"center\">".$odmena."</td> 87 </tr> 88 "; 71 //$date = $server -> HumanDate ($row["time"],0); 72 $date = $row['time']; 73 } else 74 { 75 $date = ''; 89 76 } 90 echo "</table>"; 77 if($row['money'] > 0) $plus = "+"; 78 else $plus = ''; 79 echo('<tr>'. 80 '<td>'.$date.'</td>'. 81 '<td>'.$plus.$row['money'].'</td>'. 82 '<td>'.$operace[$row['operation']].' '.$row['description'].'</td>'. 83 '<td>'.$odmena.'</td>'. 84 '</tr>'); 85 } 86 echo('</table>'); 91 87 92 88 ?> -
trunk/pages/download.php
r551 r556 3 3 include('files.php'); 4 4 echo('<h2 align="center">Soubory ke stažení:</h2>'); 5 echo('<div align="center" ><table width="80%" cellspacing="0">');5 echo('<div align="center" ><table class="DownloadTable">'); 6 6 foreach($Files as $GroupName => $Group) 7 7 { -
trunk/pages/events.php
r407 r556 1 1 <?php 2 2 3 $EventsLinks = array( 4 1 => array("http://wwpw.wowwiki.com/Midsummer_Fire_Festival", "http://www.worldofwarcraft.com/info/events/midsummer/"), 5 2 => array("http://www.wowwiki.com/Feast_of_Winter_Veil", "http://www.worldofwarcraft.com/info/events/winterveil/"), 6 3 => array("http://www.wowwiki.com/Darkmoon_Faire", "http://www.worldofwarcraft.com/info/basics/factions/darkmoon/"), 7 4 => array("http://www.wowwiki.com/Darkmoon_Faire", "http://www.worldofwarcraft.com/info/basics/factions/darkmoon/"), 8 5 => array("http://www.wowwiki.com/Darkmoon_Faire", "http://www.worldofwarcraft.com/info/basics/factions/darkmoon/"), 9 6 => array("http://www.wowwiki.com/New_Year", "http://www.worldofwarcraft.com/info/events/newyears/"), 10 7 => array("http://www.wowwiki.com/Lunar_Festival", "http://www.worldofwarcraft.com/info/events/lunarnewyears/"), 11 8 => array("http://www.wowwiki.com/Love_is_in_the_Air", "http://www.worldofwarcraft.com/info/events/loveisintheair/"), 12 9 => array("http://www.wowwiki.com/Noblegarden", "http://www.worldofwarcraft.com/community/ingameevents.html#noblegarden"), 13 10 => array("http://www.wowwiki.com/Children%27s_Week", "http://www.worldofwarcraft.com/info/events/childrensweek/"), 14 11 => array("http://www.wowwiki.com/Harvest_Festival", "http://www.worldofwarcraft.com/info/events/harvestfestival/"), 15 12 => array("http://www.wowwiki.com/Hallow%27s_End", "http://www.worldofwarcraft.com/info/events/hallowsend/"), 16 13 => array("http://www.wowwiki.com/Elemental_Invasions", "http://www.worldofwarcraft.com/community/ingameevents.html#elemental"), 17 14 => array("http://www.wowwiki.com/Stranglethorn_Fishing_Extravaganza", "http://www.worldofwarcraft.com/info/events/fishing/"), 18 15 => array("http://www.wowwiki.com/Stranglethorn_Fishing_Extravaganza", "http://www.worldofwarcraft.com/info/events/fishing/"), 19 16 => array("http://www.wowwiki.com/Gurubashi_Arena#Gurubashi_Arena_Booty_Run", "http://www.worldofwarcraft.com/community/ingameevents.html#gurubashi"), 20 17 => array("http://www.wowwiki.com/The_Scourge_Invasion", "http://www.worldofwarcraft.com/info/events/scourgeinvasion/"), 21 18 => array("", "http://www.worldofwarcraft.com/community/ingameevents.html#calltoarms"), 22 19 => array("", "http://www.worldofwarcraft.com/community/ingameevents.html#calltoarms"), 23 20 => array("", "http://www.worldofwarcraft.com/community/ingameevents.html#calltoarms"), 24 21 => array("", "http://www.worldofwarcraft.com/community/ingameevents.html#calltoarms"), 25 22 => array("http://www.wowwiki.com/Ahn%27Qiraj_War_Effort", "http://www.worldofwarcraft.com/wareffort/servers.html"), 26 23 => array("", ""), 27 24 => array("", ""), 28 25 => array("", "http://www.worldofwarcraft.com/community/ingameevents.html#calltoarms"), 29 26 => array("http://www.wowwiki.com/Brewfest", "http://www.worldofwarcraft.com/info/events/brewfest/"), 30 27 => array("", ""), 31 28 => array("http://www.wowwiki.com/Noblegarden", "http://www.worldofwarcraft.com/community/ingameevents.html#noblegarden"), 32 29 => array("http://www.wowwiki.com/Edge_of_Madness", ""), 33 30 => array("http://www.wowwiki.com/Edge_of_Madness", ""), 34 31 => array("http://www.wowwiki.com/Edge_of_Madness", ""), 35 32 => array("http://www.wowwiki.com/Edge_of_Madness", ""), 36 34 => array("http://www.wowwiki.com/L70ETC", ""), 3 $EventsLinks = array 4 ( 5 1 => array('http://wwpw.wowwiki.com/Midsummer_Fire_Festival', 'http://www.worldofwarcraft.com/info/events/midsummer/'), 6 2 => array('http://www.wowwiki.com/Feast_of_Winter_Veil', 'http://www.worldofwarcraft.com/info/events/winterveil/'), 7 3 => array('http://www.wowwiki.com/Darkmoon_Faire', 'http://www.worldofwarcraft.com/info/basics/factions/darkmoon/'), 8 4 => array('http://www.wowwiki.com/Darkmoon_Faire', 'http://www.worldofwarcraft.com/info/basics/factions/darkmoon/'), 9 5 => array('http://www.wowwiki.com/Darkmoon_Faire', 'http://www.worldofwarcraft.com/info/basics/factions/darkmoon/'), 10 6 => array('http://www.wowwiki.com/New_Year', 'http://www.worldofwarcraft.com/info/events/newyears/'), 11 7 => array('http://www.wowwiki.com/Lunar_Festival', 'http://www.worldofwarcraft.com/info/events/lunarnewyears/'), 12 8 => array('http://www.wowwiki.com/Love_is_in_the_Air', 'http://www.worldofwarcraft.com/info/events/loveisintheair/'), 13 9 => array('http://www.wowwiki.com/Noblegarden', 'http://www.worldofwarcraft.com/community/ingameevents.html#noblegarden'), 14 10 => array('http://www.wowwiki.com/Children%27s_Week', 'http://www.worldofwarcraft.com/info/events/childrensweek/'), 15 11 => array('http://www.wowwiki.com/Harvest_Festival', 'http://www.worldofwarcraft.com/info/events/harvestfestival/'), 16 12 => array('http://www.wowwiki.com/Hallow%27s_End', 'http://www.worldofwarcraft.com/info/events/hallowsend/'), 17 13 => array('http://www.wowwiki.com/Elemental_Invasions', 'http://www.worldofwarcraft.com/community/ingameevents.html#elemental'), 18 14 => array('http://www.wowwiki.com/Stranglethorn_Fishing_Extravaganza', 'http://www.worldofwarcraft.com/info/events/fishing/'), 19 15 => array('http://www.wowwiki.com/Stranglethorn_Fishing_Extravaganza', 'http://www.worldofwarcraft.com/info/events/fishing/'), 20 16 => array('http://www.wowwiki.com/Gurubashi_Arena#Gurubashi_Arena_Booty_Run', 'http://www.worldofwarcraft.com/community/ingameevents.html#gurubashi'), 21 17 => array('http://www.wowwiki.com/The_Scourge_Invasion', 'http://www.worldofwarcraft.com/info/events/scourgeinvasion/'), 22 18 => array('', 'http://www.worldofwarcraft.com/community/ingameevents.html#calltoarms'), 23 19 => array('', 'http://www.worldofwarcraft.com/community/ingameevents.html#calltoarms'), 24 20 => array('', 'http://www.worldofwarcraft.com/community/ingameevents.html#calltoarms'), 25 21 => array('', 'http://www.worldofwarcraft.com/community/ingameevents.html#calltoarms'), 26 22 => array('http://www.wowwiki.com/Ahn%27Qiraj_War_Effort', 'http://www.worldofwarcraft.com/wareffort/servers.html'), 27 23 => array('', ''), 28 24 => array('', ''), 29 25 => array('', 'http://www.worldofwarcraft.com/community/ingameevents.html#calltoarms'), 30 26 => array('http://www.wowwiki.com/Brewfest', 'http://www.worldofwarcraft.com/info/events/brewfest/'), 31 27 => array('', ''), 32 28 => array('http://www.wowwiki.com/Noblegarden', 'http://www.worldofwarcraft.com/community/ingameevents.html#noblegarden'), 33 29 => array('http://www.wowwiki.com/Edge_of_Madness', ''), 34 30 => array('http://www.wowwiki.com/Edge_of_Madness', ''), 35 31 => array('http://www.wowwiki.com/Edge_of_Madness', ''), 36 32 => array('http://www.wowwiki.com/Edge_of_Madness', ''), 37 34 => array('http://www.wowwiki.com/L70ETC', ''), 37 38 ); 38 39 39 40 function Events() 40 41 { 41 include("inc/db.php");42 include('inc/db.php'); 42 43 43 global $db, $EventsLinks; 44 $Events = array("Running" => array(), "Planned" => array()); 45 $db -> select_db("$db_mangos"); 44 global $db, $EventsLinks, $Config; 46 45 46 $Events = array('Running' => array(), 'Planned' => array()); 47 $db->select_db($Config['Mangos']['DatabaseMangos']); 47 48 48 $DbResult = $db->query( "SELECT *, UNIX_TIMESTAMP(start_time) as start FROM game_event WHERE end_time > NOW() AND start_time < NOW()");49 $DbResult = $db->query('SELECT *, UNIX_TIMESTAMP(start_time) as start FROM game_event WHERE end_time > NOW() AND start_time < NOW()'); 49 50 while($Row = $DbResult->fetch_array()) 50 51 { 51 if(!array_key_exists($Row[ "entry"], $EventsLinks)) $EventsLinks[$Row["entry"]] = array("", "");52 $Start = (floor((time() - $Row[ "start"]) / ($Row["occurence"] * 60))) * $Row["occurence"] * 60 + $Row["start"];53 $End = $Start + $Row[ "length"] * 60;54 if((time() > $Start) and (time() < $End)) $EventState = "Running";52 if(!array_key_exists($Row['entry'], $EventsLinks)) $EventsLinks[$Row['entry']] = array('', ''); 53 $Start = (floor((time() - $Row['start']) / ($Row['occurence'] * 60))) * $Row['occurence'] * 60 + $Row['start']; 54 $End = $Start + $Row['length'] * 60; 55 if((time() > $Start) and (time() < $End)) $EventState = 'Running'; 55 56 else 56 57 { 57 $EventState = "Planned";58 $Start += $Row[ "occurence"] * 60;59 $End += $Row[ "occurence"] * 60;58 $EventState = 'Planned'; 59 $Start += $Row['occurence'] * 60; 60 $End += $Row['occurence'] * 60; 60 61 } 61 $Events[$EventState][$Row[ "start"]] = array("StartTime" => $Start, "EndTime" => $End, "Title" => $Row["description"], "WoWWiki" => $EventsLinks[$Row["entry"]][0], "Official" => $EventsLinks[$Row["entry"]][1]);62 $Events[$EventState][$Row['start']] = array('StartTime' => $Start, 'EndTime' => $End, 'Title' => $Row['description'], 'WoWWiki' => $EventsLinks[$Row['entry']][0], 'Official' => $EventsLinks[$Row['entry']][1]); 62 63 } 63 64 64 65 // Add events not started so far 65 //$DbResult = $db->select( "game_event", "*, UNIX_TIMESTAMP(start_time) as start", "start_time > NOW()");66 $DbResult = $db->query( "SELECT * , UNIX_TIMESTAMP(start_time) as start FROM game_event WHERE start_time > NOW()");66 //$DbResult = $db->select('game_event', '*, UNIX_TIMESTAMP(start_time) as start', 'start_time > NOW()'); 67 $DbResult = $db->query('SELECT * , UNIX_TIMESTAMP(start_time) as start FROM game_event WHERE start_time > NOW()'); 67 68 while($Row = $DbResult->fetch_array()) 68 69 { 69 if(!array_key_exists($Row[ "entry"], $EventsLinks)) $EventsLinks[$Row["entry"]] = array("", "");70 $Events[ "Planned"][$Row["start"]] = array("StartTime" => $Row["start"], "EndTime" => ($Row["start"] + $Row["length"] * 60), "Title" => $Row["description"], "WoWWiki" => $EventsLinks[$Row["entry"]][0], "Official" => $EventsLinks[$Row["entry"]][1]);70 if(!array_key_exists($Row['entry'], $EventsLinks)) $EventsLinks[$Row['entry']] = array('', ''); 71 $Events['Planned'][$Row['start']] = array('StartTime' => $Row['start'], 'EndTime' => ($Row['start'] + $Row['length'] * 60), 'Title' => $Row['description'], 'WoWWiki' => $EventsLinks[$Row['entry']][0], 'Official' => $EventsLinks[$Row['entry']][1]); 71 72 } 72 73 73 sort($Events[ "Running"]);74 sort($Events[ "Planned"]);74 sort($Events['Running']); 75 sort($Events['Planned']); 75 76 76 77 return($Events); … … 81 82 foreach($Events as $Event) 82 83 { 83 echo( "<tr><td align=\"Left\">".$Event["Title"]."</td><td align=\"right\">".date("j.n.Y H:i", $Event["StartTime"])."</td><td align=\"right\">".date("j.n.Y H:i", $Event["EndTime"])."</td>");84 if($Event[ "WoWWiki"] != "") echo("<td><a href=\"".$Event["WoWWiki"]."\">wowwiki</a></td>");85 else echo( "<td> </td>");86 if($Event[ "Official"] != "") echo("<td><a href=\"".$Event["Official"]."\">worldofwarcraft</a></td>"); else echo("<td> </td>");87 echo( "</tr>");84 echo('<tr><td>'.$Event['Title'].'</td><td>'.date('j.n.Y H:i', $Event['StartTime']).'</td><td>'.date('j.n.Y H:i', $Event['EndTime']).'</td>'); 85 if($Event['WoWWiki'] != '') echo('<td><a href="'.$Event['WoWWiki'].'">wowwiki</a>'); 86 else echo('<td> '); 87 if($Event['Official'] != '') echo(' <a href="'.$Event['Official'].'">worldofwarcraft</a></td>'); else echo(' </td>'); 88 echo('</tr>'); 88 89 } 89 90 } 90 91 91 92 93 94 echo"<center><h3>Události ve hře :</h3></center>"; 92 echo('<center><h3>Události ve hře :</h3></center>'); 95 93 96 94 $Events = Events(); 97 echo "<table border=\"1\" cellpadding=\"3\" cellspacing=\"0\" width=\"540\" align=\"center\">"; 98 echo"<tr><th>Název</th><th>Začátek</th><th>Konec</th><th>Informace</th><th>Informace</th></tr>"; 99 echo"<tr><td colspan=\"5\"><b>Probíhající akce</b></td></tr>"; 100 ShowEventList($Events["Running"]); 101 echo"<tr><td colspan=\"5\"><b>Plánované akce</b></td></tr>"; 102 ShowEventList($Events["Planned"]); 103 echo"</table>"; 104 105 95 echo('<table class="gmlog">'); 96 echo('<tr><th>Název</th><th>Začátek</th><th>Konec</th><th>Informace</th></tr>'); 97 echo('<tr><td colspan="5"><b>Probíhající akce</b></td></tr>'); 98 ShowEventList($Events['Running']); 99 echo('<tr><td colspan="5"><b>Plánované akce</b></td></tr>'); 100 ShowEventList($Events['Planned']); 101 echo('</table>'); 106 102 107 103 ?> 108 109 110 111 112 -
trunk/pages/gmlog.php
r551 r556 1 1 <?php 2 $gmlog = "/a/mangos1/logs/GM_Commands.log"; //CESTA K GM LOGU 3 $ config = "../gh_system/conn.php"; //CESTA KE CONN.PHP2 3 $gmlog = $Config['Mangos']['GMCommandsLog']; 4 4 $pocet_radku = 50; //KOLIK RADKU Z LOGU SE BUDE ZOBRAZOVAT 5 5 6 echo"<table align=center bordercolor='black' border=2><tr><td align=center><strong>Cas</strong><td align=center><strong>Příkaz</strong><td align=center><strong>GM</strong><td align=center><strong>Vybrán</strong></tr>"; 6 echo('<img src="imgs/gm.jpg" alt="gm" /><br />'); 7 echo('<table class="gmlog"><tr><th>Čas</th><th>Příkaz</th><th>GM</th><th>Vybrán</th></tr>'); 7 8 8 9 10 11 echo('<img src="imgs/gm.jpg" alt="gm">');12 include($config);13 9 $data = file($gmlog); 14 10 $radku = count($data); 15 11 $i = 0; 16 echo "<br />";17 12 18 while($i < $pocet_radku){ 19 $radek = $radku-1; 20 $pole=explode(" ",$data[$radek]); 13 $db->select_db($Config['Mangos']['DatabaseCharacters']); 21 14 22 if($pole[3]=="announce"): 23 $prikaz = "announce ..."; 24 else: 25 $prikaz=explode("[","$pole[3] $pole[4] $pole[5] $pole[6] $pole[7] $pole[8] $pole[9]"); 26 $prikaz = $prikaz[0]; 27 endif; 15 while($i < $pocet_radku) 16 { 17 $radek = $radku - 1; 18 $pole = explode(' ', $data[$radek]); 28 19 29 $prikaz_pole=explode("[","$pole[3] $pole[4] $pole[5] $pole[6] $pole[7] $pole[8] $pole[9]"); 30 $hrac_pole=explode("Player:",$data[$radek]); 31 $hrac=explode(" ",$hrac_pole[1]); 32 $vybran_pole=explode("Selected:",$data[$radek]); 33 $vybran=explode(" ",$vybran_pole[1]); 20 if($pole[3] == 'announce') $prikaz = 'announce ...'; 21 else 22 { 23 $prikaz = explode('[', $pole[3].' '.$pole[4].' '.$pole[5].' '.$pole[6].' '.$pole[7].' '.$pole[8].' '.$pole[9]); 24 $prikaz = $prikaz[0]; 25 } 34 26 35 if($vybran[1]=="player"): 36 $guid_pole=explode("GUID:",$vybran_pole[1]); 37 $guid=explode(")]",$guid_pole[1]); 27 $prikaz_pole = explode('[', $pole[3].' '.$pole[4].' '.$pole[5].' '.$pole[6].' '.$pole[7].' '.$pole[8].' '.$pole[9]); 28 $hrac_pole = explode('Player:', $data[$radek]); 29 $hrac = explode(' ', $hrac_pole[1]); 30 $vybran_pole = explode('Selected:', $data[$radek]); 31 $vybran = explode(' ', $vybran_pole[1]); 38 32 39 mysql_connect($SQL_Server, $SQL_Uzivatel, $SQL_Heslo); 40 mysql_select_db($Databaze_characters); 41 mysql_query("SET NAMES 'utf8'"); 42 $pocet = mysql_num_rows(mysql_query("SELECT guid FROM characters where guid=$guid[0]")); 43 if($pocet!=0): 44 $query = mysql_query("SELECT * FROM characters where guid=$guid[0]"); 45 while ($radek = mysql_fetch_array($query) ) { 46 $vybran_radek = $radek['name']; 47 $vybran = "hráč $vybran_radek"; 48 } 49 else: 50 $vybran = "<i>neznámý hrác</i>"; 51 endif; 52 else: 53 $vybran = $vybran[1]; 54 endif; 33 if($vybran[1] == 'player') 34 { 35 $guid_pole = explode('GUID:', $vybran_pole[1]); 36 $guid = explode(')]', $guid_pole[1]); 37 38 $DbResult = $db->query('SELECT name FROM characters WHERE guid='.$guid[0]); 39 if($DbResult->num_rows > 0) 40 { 41 $radek = $DbResult->fetch_assoc(); 42 $vybran_radek = $radek['name']; 43 $vybran = 'hráč '.$vybran_radek; 44 } else $vybran = '<i>neznámý hráč</i>'; 45 } else $vybran = $vybran[1]; 55 46 56 echo"<tr><td align=center>$pole[0] $pole[1]<td align=center>$prikaz<td align=center>$hrac[1]<td align=center>$vybran</tr>";57 $i = $i+1;58 $radku = $radku-1;47 echo('<tr><td>'.$pole[0].' '.$pole[1].'</td><td>'.$prikaz.'</td><td>'.$hrac[1].'</td><td>'.$vybran.'</td></tr>'); 48 $i = $i + 1; 49 $radku = $radku - 1; 59 50 } 60 echo "</table>";51 echo('</table>'); 61 52 62 53 ?> -
trunk/pages/server.php
r550 r556 1 1 <?php 2 2 3 // Settings 4 $server_setings = array 5 ( 6 "mangos" => " MaNGOS rev. 7528", 7 "udb" => "UDB 0.11.0 rev. 370", 8 "sd2" => "ScriptDev2 rev. 912", 9 ); 10 11 echo("<center><h3>Server Heroes of Fantasy :</h3> 12 <table align=\"center\" border=\"1\" width=\"540\"> 3 echo('<h3 style="text-align: center;">Server Heroes of Fantasy :</h3>'. 4 '<table class="gmlog"> 13 5 <tr> 14 <td colspan= \"2\"><b>Statistiky :</b></td>6 <td colspan="2"><strong>Statistiky :</strong></td> 15 7 </tr> 16 8 <tr> 17 9 <td>Herní server je</td> 18 <td> ".$server -> ServerImg($server -> ServerOnline("wow.zdechov.net", 8085))."</td>10 <td>'.$server->ServerImg($server->ServerOnline('wow.zdechov.net', 8085)).'</td> 19 11 </tr> 20 12 21 13 <tr> 22 14 <td>Ve hře přítomno</td> 23 <td> ".$server -> MangosOnline()."hráčů</td>15 <td>'.$server->MangosOnline().' hráčů</td> 24 16 </tr> 25 17 <tr> 26 18 <td>Server beží bez restartu</td> 27 <td> ".$server -> ServerUptime()."(hodiny)</td>19 <td>'.$server->ServerUptime().' (hodiny)</td> 28 20 </tr> 29 21 <tr> 30 22 <td>V databázi uloženo</td> 31 <td> ".$server -> AccountCount()."účtů</td>23 <td>'.$server->AccountCount().' účtů</td> 32 24 </tr> 33 25 <tr> 34 26 <td>V databázi uloženo</td> 35 <td> ".$server -> CharacterCount()."postav</td>27 <td>'.$server->CharacterCount().' postav</td> 36 28 </tr> 37 29 <tr> 38 <td><a href= \"?page=teamspeak\">TeamSpeak</a> server je</td>39 <td> ".$server -> ServerImg($server -> ServerOnline("game.zdechov.net", 51234))."</td>30 <td><a href="?page=teamspeak">TeamSpeak</a> server je</td> 31 <td>'.$server->ServerImg($server->ServerOnline('game.zdechov.net', 51234)).'</td> 40 32 </tr> 41 33 <tr> 42 <td><a href= \"http://game.zdechov.net:6969/\" target=\"_blank\">Torrent</a> server je</td>43 <td> ".$server -> ServerImg($server -> ServerOnline("game.zdechov.net", 6969))."</td>34 <td><a href="http://game.zdechov.net:6969/">Torrent</a> server je</td> 35 <td>'.$server->ServerImg($server->ServerOnline('game.zdechov.net', 6969)).'</td> 44 36 </tr> 45 37 <tr> 46 <td colspan= \"2\"><b>Software :</b></td>38 <td colspan="2"><strong>Software :</strong></td> 47 39 </tr> 48 40 <tr> … … 52 44 <tr> 53 45 <td>Aktuální WoW emulátor</td> 54 <td> ".$server_setings["mangos"]."</td>46 <td>MaNGOS rev.'.$Config['Mangos']['Revision'].'</td> 55 47 </tr> 56 48 <tr> 57 49 <td>Aktuální WoW databáze</td> 58 <td> ".$server_setings["udb"]."</td>50 <td>UDB '.$Config['Mangos']['UDBVersion'].' rev. '.$Config['Mangos']['UDBRevision'].'</td> 59 51 </tr> 60 52 <tr> 61 53 <td>ScriptDev2</td> 62 <td> ".$server_setings["sd2"]."</td>54 <td>Scriptdev2 rev. '.$Config['Mangos']['ScriptDev2Revision'].'</td> 63 55 </tr> 64 56 <tr> 65 <td colspan= \"2\"><b>Nastavení MaNGOSU :</b></td>57 <td colspan="2"><strong>Nastavení MaNGOSU :</strong></td> 66 58 </tr> 67 59 <tr> … … 94 86 </tr> 95 87 <tr> 96 <td colspan= \"2\"><b>Hardware :</b></td>88 <td colspan="2"><b>Hardware :</b></td> 97 89 </tr> 98 90 <tr> … … 117 109 </tr> 118 110 <tr> 119 <td colspan= \"2\"><b>Grafické statistiky serveru :</b></td>111 <td colspan="2"><strong>Grafické statistiky serveru :</strong></td> 120 112 </tr> 121 113 <tr> 122 114 <td>Stránka projektu</td> 123 <td><a href= \"http://stat.zdechov.net/game/\" target=\"_blank\">stat.zdechov.net/game/</a></td>115 <td><a href="http://stat.zdechov.net/game/">stat.zdechov.net/game/</a></td> 124 116 </tr> 125 </table> </center>");117 </table>'); 126 118 127 119 ?> -
trunk/styles/style.css
r554 r556 1 /* CSS Document */2 body {3 height: 100%;4 background-color: black;5 margin-top: -10px;6 }7 #page {8 width: 982px;9 min-height:100%;10 height:auto !important;11 height:100%;12 background-image: url(../imgs/web/middle.jpg);13 position: absolute;14 top: 0px;15 right: 50%;16 margin-right: -491px;17 margin-bottom: 0px;18 }19 #top {20 top: 174px;21 height: 90px;22 background-image: url(../imgs/web/top_menu.jpg);23 }24 #footer {25 position: absolute;26 top: 100%;27 width: 982px;28 height: 100px;29 margin-top: -100px;30 background-image: url(../imgs/web/bottom.jpg);31 z-index: 1;32 }33 #copyright {34 margin-left: 140px;35 font-size:12px;36 }37 #menu {38 top: 200px;39 width: 150px;40 margin-left: 110px;41 margin-top: -50px;42 height: auto;43 text-align: justify;44 padding-bottom: 100px;45 z-index: 5;46 float: left;47 }48 #content {49 top: 200px;50 width: 540px;51 margin-left: 60px;52 margin-top: -50px;53 height: auto;54 text-align: justify;55 padding-bottom: 100px;56 z-index: 5;57 float: left;58 }59 #mainmenu a {60 display: block;61 width: 150px;62 height: 33px;63 line-height: 33px;64 margin-top: -21px;65 overflow: hidden;66 color: white;67 font-weight: bold;68 font-family: Verdana;69 font-size: 12px;70 background-image: URL('../imgs/web/deselected.jpg');71 text-decoration: none;72 text-align: center;73 margin-bottom: 1px;74 }75 =======76 1 body 77 2 { … … 165 90 } 166 91 167 >>>>>>> .r552168 92 #mainmenu a:hover 169 93 { … … 241 165 border-style: solid; 242 166 width: 500px; 243 margin-left: auto;244 margin-right: auto;245 text-align: center;167 margin-left: auto; 168 margin-right: auto; 169 text-align: center; 246 170 } 247 171 … … 253 177 } 254 178 179 .gmlog 180 { 181 margin-left: auto; 182 margin-right: auto; 183 text-align: center; 184 border-width: 2px; 185 border-style: solid; 186 } 187 188 .gmlog th 189 { 190 border-width: 1px; 191 border-style: solid; 192 } 193 194 .gmlog td 195 { 196 text-align: center; 197 border-width: 1px; 198 border-style: solid; 199 } 200 255 201 .Banners 256 202 { … … 262 208 border-width: 0px; 263 209 } 210 211 .DownloadTable 212 { 213 margin-left: auto; 214 margin-right: auto; 215 text-align: left; 216 border-collapse: collapse; 217 width: 90%; 218 }
Note:
See TracChangeset
for help on using the changeset viewer.