PageRenderTime 48ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 1ms

/index.php

https://github.com/TravianWar/Travianx
PHP | 512 lines | 456 code | 42 blank | 14 comment | 19 complexity | f8b51be0925d1aad5333673a6757f80b MD5 | raw file
  1. <?php
  2. #################################################################################
  3. ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
  4. ## --------------------------------------------------------------------------- ##
  5. ## Filename index.php ##
  6. ## Developed by: Advocaite ##
  7. ## License: TravianX Project ##
  8. ## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
  9. ## ##
  10. #################################################################################
  11. error_reporting(E_ALL);
  12. if (!file_exists('GameEngine/config.php')) {
  13. header("Location: install/");
  14. }
  15. include("GameEngine/config.php");
  16. include("GameEngine/Database.php");
  17. include("GameEngine/Lang/".LANG.".php");
  18. ?>
  19. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  20. <html xmlns="http://www.w3.org/1999/xhtml"><head>
  21. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  22. <title>
  23. <?php echo SERVER_NAME; ?></title>
  24. <link rel="stylesheet" type="text/css" href="index.php_files/compact.css"><meta name="content-language" content="au">
  25. <meta http-equiv="imagetoolbar" content="no">
  26. <script type="text/javascript" src="uncrypt.js"></script>
  27. </head>
  28. <body class="gecko LTR">
  29. <div id="backgroundLeft"></div>
  30. <div id="backgroundRight"></div>
  31. <div id="background">
  32. <div id="navigation-wrapper">
  33. <div id="navigation-container">
  34. <div id="country_select">
  35. </div>
  36. <div id="top-nav">
  37. <div id="top-nav-menu">
  38. <div id="logo">
  39. <a href="http://www.ragezone.com/f583/"><img src="index.php_files/x.gif" class="logo" alt=""></a>
  40. </div>
  41. <ul id="top-navigation">
  42. <li>
  43. <a href="#tutorial" class="popcon"><?php echo TOUR ?></a>
  44. </li>
  45. <li>
  46. <a target="blank" href="http://100.100.0.1/foro/forumdisplay.php?27-Travian" id="forum"><?php echo FORUM ?></a>
  47. </li>
  48. <li>
  49. <a href="#moregames" class="popcon"><?php echo MORE_LINKS ?></a>
  50. </li>
  51. <li>
  52. <a id="register" class="popcon" href="#serverRegister"><?php echo REG ?></a> </li>
  53. </ul>
  54. </div>
  55. <div id="top-nav-login">
  56. <div id="login">
  57. <div class="btn-green">
  58. <div class="btn-green-l"></div>
  59. <div class="btn-green-c">
  60. <a class="npage popcon" href="#serverLogin"><?php echo LOGIN ?></a> </div>
  61. <div class="btn-green-r"></div>
  62. <div class="clear"></div>
  63. </div>
  64. </div>
  65. </div>
  66. </div> </div>
  67. </div>
  68. <div id="content-container">
  69. <div id="content-menu">
  70. <div id="statistics">
  71. <div id="stat-top"></div>
  72. <div id="stat_bottom"></div>
  73. <h3 class="stat bold grey"><?php echo PLAYER_STATISTICS; ?> </h3>
  74. <div>
  75. <div class="stat type"><?php echo TOTAL_PLAYERS; ?>:</div><div class="stat value"><?php
  76. $users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users"));
  77. echo $users;
  78. ?></div>
  79. <div class="clear"></div>
  80. <div class="stat type"><?php echo ACTIVE_PLAYERS; ?>:</div><div class="stat value"><?php
  81. $weekago = time() - 604800;
  82. $usersthisweek = mysql_result(mysql_query("SELECT COUNT(*) FROM ".TB_PREFIX."users WHERE lastupdate>$weekago"),0);
  83. echo $usersthisweek;
  84. ?></div>
  85. <div class="clear"></div>
  86. <div class="stat type"><?php echo ONLINE_PLAYERS; ?>:</div><div class="stat value"><?php
  87. $result = mysql_query("SELECT * FROM ".TB_PREFIX."active");
  88. $num_rows = mysql_num_rows($result);
  89. echo $num_rows;
  90. ?></div>
  91. <div class="clear"></div>
  92. </div>
  93. </div>
  94. <div id="news">
  95. <div id="news-head"></div>
  96. <div id="news-content">
  97. <h3 class="news bold"><?php echo NEWS; ?> </h3>
  98. <!-- NEWSBOX1 - START -->
  99. <div class="news-items">
  100. <?php if(HOME1 == true){
  101. include("Templates/News/home/home1.tpl");
  102. }
  103. ?>
  104. </div>
  105. <!-- NEWSBOX1 - END -->
  106. <?php if(HOME2 & HOME1 == true){
  107. echo '<div class="news-divider"></div>';
  108. }
  109. else if(HOME1 & HOME3 == true){
  110. echo '<div class="news-divider"></div>';
  111. }
  112. else echo '';
  113. ?>
  114. <!-- NEWSBOX2 - START -->
  115. <div class="news-items">
  116. <?php if(HOME2 == true){
  117. include("Templates/News/home/home2.tpl");
  118. }
  119. ?>
  120. </div>
  121. <!-- NEWSBOX2 - END -->
  122. <?php if(HOME3 & HOME2 == true){
  123. echo '<div class="news-divider"></div>';
  124. }
  125. else echo '';
  126. ?>
  127. <!-- NEWSBOX3 - START -->
  128. <div class="news-items">
  129. <?php if(HOME3 == true){
  130. include("Templates/News/home/home3.tpl");
  131. }
  132. ?>
  133. </div>
  134. <!-- NEWSBOX3 - END -->
  135. </div>
  136. <div id="news-bottom"> </div>
  137. </div>
  138. </div>
  139. <div id="content-main">
  140. <div id="wit">
  141. <div id="wit-top"></div>
  142. <div id="wit-content" class="with-button">
  143. <div id="hero"></div>
  144. <h1 class="wit bold"><?php echo MP_STRATEGY_GAME ?></h1>
  145. <div class="wit-info"><?php echo WHAT_IS ?>
  146. <div class="playnow playnow-button">
  147. <div class="playnow-start">
  148. <h1 class="play white bold"><a id="register" class="popcon play" href="index.php#serverRegister" title="Register here for free!"><?php echo REGISTER_FOR_FREE ?></a></h1>
  149. </div>
  150. <div class="playnow-end"></div>
  151. <div class="clear"></div>
  152. </div>
  153. </div>
  154. <div id="stage_space"></div>
  155. <div id="stage">
  156. <div id="frame">
  157. <div class="stage-content stage-content0 shown" style="background-image: url(index.php_files/gpack/main_defailt/img/stage/new_world-ltr.jpg); visibility: visible; opacity: 1;">
  158. <div style="position:absolute; left:15px; top:170px;"><img alt="" class="bbArrow" src="index.php_files/x.gif"> <span style="color:black;"><span style="font-weight:bold;"><?php echo PLAY_NOW ?></span></span></div>
  159. <div style="position:absolute; left:15px; top:12px;"><h3><?php echo LATEST_GAME_WORLD ?></h3><br>
  160. <span style="font-weight:bold;"><?php echo LATEST_GAME_WORLD2 ?></span></div>
  161. <div class="stage-arrow stage-arrow-0"></div>
  162. </div>
  163. <div class="stage-content stage-content1 " style="background-image: url(index.php_files/gpack/main_defailt/img/stage/feature-ltr.jpg); visibility: visible; opacity: 1;">
  164. <div style="position:absolute; left:15px; top:170px;"><img alt="" class="bbArrow" src="index.php_files/x.gif"> <span style="color:black;"><span style="font-weight:bold;"><?php echo LEARN_MORE ?></span></span></div>
  165. <div style="position:absolute; left:15px; top:12px;"><h3><?php echo SERVER_NAME ?></h3><br>
  166. <span style="font-weight:bold;"><?php echo LEARN_MORE2 ?></span></div>
  167. <div class="stage-arrow stage-arrow-1"></div>
  168. </div>
  169. <div class="stage-content stage-content2" style="background-image: url(index.php_files/gpack/main_defailt/img/stage/community-ltr.jpg)">
  170. <div style="position:absolute; left:15px; top:170px;"><img alt="" class="bbArrow" src="index.php_files/x.gif"> <span style="color:black;"><span style="font-weight:bold;"><?php echo BECOME_COMUNITY ?></span></span></div>
  171. <div style="position:absolute; left:15px; top:12px;"><h3><?php echo COMUNITY ?></h3><br>
  172. <span style="font-weight:bold;"><?php echo BECOME_COMUNITY2 ?></span></div>
  173. <div class="stage-arrow stage-arrow-2"></div>
  174. </div>
  175. <div id="stage-nav">
  176. <ul id="buttons">
  177. <li class="b0 act0" style="background-image: url(index.php_files/gpack/main_defailt/img/stage/new_world_small-ltr.png)">&nbsp;</li>
  178. <li class="b1" style="background-image: url(index.php_files/gpack/main_defailt/img/stage/feature_small-ltr.png)">&nbsp;</li>
  179. <li class="b2" style="background-image: url(index.php_files/gpack/main_defailt/img/stage/community_small-ltr.png)">&nbsp;</li>
  180. </ul>
  181. </div>
  182. </div>
  183. <div style="visibility: hidden; opacity: 0;" id="stage-bg"></div>
  184. <div id="stage-fg">
  185. <div class="stage-links">
  186. <a style="visibility: visible; opacity: 1;" class="stage-link stage-link1 shown" href="index.php#serverRegister"></a>
  187. <a style="visibility: visible; opacity: 1;" class="stage-link stage-link2 " href="index.php#serverRegister"></a>
  188. <a class="stage-link stage-link3" href="http://100.100.0.1/foro/forumdisplay.php?27-Travian"></a>
  189. </div>
  190. <div id="stage-nav-click">
  191. <ul id="buttons-click">
  192. <li style="visibility: visible; opacity: 1;" class="b0 act0">&nbsp;</li>
  193. <li style="visibility: visible; opacity: 1;" class="b1 ">&nbsp;</li>
  194. <li class="b2">&nbsp;</li>
  195. </ul>
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. <div id="wit-bottom"></div>
  201. </div>
  202. <div id="moreabttravian">
  203. <div id="find-out-more">
  204. <div id="strip-head"><div><?php echo LEARN_MORE ?></div></div>
  205. <div id="strip">
  206. <ul id="strips">
  207. <li class="stip0">&nbsp;</li>
  208. <li class="stip1">&nbsp;</li>
  209. <li class="stip2">&nbsp;</li>
  210. <li class="stip3">&nbsp;</li>
  211. <li class="stip4">&nbsp;</li>
  212. <li class="stip5">&nbsp;</li>
  213. </ul>
  214. </div>
  215. <div id="strip-details">
  216. <div class="details">
  217. <div class="details-top"></div>
  218. <div class="details-l-top"></div><div class="details-r-top"></div>
  219. <div class="details-body">
  220. <div class="details-body-l" id="strip-c1"></div>
  221. <div class="details-body-r"><?php echo LEARN1 ?><br><br>
  222. <div class="btn-green">
  223. <div class="btn-green-l"></div>
  224. <div class="btn-green-c"><a class="npage popcon" href="/index.php#tutorial"><?php echo TOUR ?></a></div>
  225. <div class="btn-green-r"></div>
  226. </div>
  227. </div>
  228. </div>
  229. <div class="details-l-bottom"></div><div class="details-r-bottom"></div>
  230. <div class="details-bottom"></div>
  231. </div>
  232. <div class="details">
  233. <div class="details-top"></div>
  234. <div class="details-l-top"></div><div class="details-r-top"></div>
  235. <div class="details-body">
  236. <div class="details-body-l" id="strip-c2"></div>
  237. <div class="details-body-r"><?php echo LEARN2 ?><br><br>
  238. <div class="btn-green">
  239. <div class="btn-green-l"></div>
  240. <div class="btn-green-c"><a class="npage popcon" href="/index.php#tutorial"><?php echo TOUR ?></a></div>
  241. <div class="btn-green-r"></div>
  242. </div>
  243. </div>
  244. </div>
  245. <div class="details-l-bottom"></div><div class="details-r-bottom"></div>
  246. <div class="details-bottom"></div>
  247. </div>
  248. <div class="details">
  249. <div class="details-top"></div>
  250. <div class="details-l-top"></div><div class="details-r-top"></div>
  251. <div class="details-body">
  252. <div class="details-body-l" id="strip-c3"></div>
  253. <div class="details-body-r"><?php echo LEARN3 ?><br><br>
  254. <div class="btn-green">
  255. <div class="btn-green-l"></div>
  256. <div class="btn-green-c"><a class="npage popcon" href="/index.php#tutorial"><?php echo TOUR ?></a></div>
  257. <div class="btn-green-r"></div>
  258. </div>
  259. </div>
  260. </div>
  261. <div class="details-l-bottom"></div><div class="details-r-bottom"></div>
  262. <div class="details-bottom"></div>
  263. </div>
  264. <div class="details">
  265. <div class="details-top"></div>
  266. <div class="details-l-top"></div><div class="details-r-top"></div>
  267. <div class="details-body">
  268. <div class="details-body-l" id="strip-c4"></div>
  269. <div class="details-body-r"><?php echo LEARN4 ?><br><br>
  270. <div class="btn-green">
  271. <div class="btn-green-l"></div>
  272. <div class="btn-green-c"><a class="npage popcon" href="/index.php#tutorial"><?php echo TOUR ?></a></div>
  273. <div class="btn-green-r"></div>
  274. </div>
  275. </div>
  276. </div>
  277. <div class="details-l-bottom"></div><div class="details-r-bottom"></div>
  278. <div class="details-bottom"></div>
  279. </div>
  280. <div class="details">
  281. <div class="details-top"></div>
  282. <div class="details-l-top"></div><div class="details-r-top"></div>
  283. <div class="details-body">
  284. <div class="details-body-l" id="strip-c5"></div>
  285. <div class="details-body-r"><?php echo LEARN5 ?><br><br>
  286. <div class="btn-green">
  287. <div class="btn-green-l"></div>
  288. <div class="btn-green-c"><a class="npage popcon" href="/index.php#tutorial"><?php echo TOUR ?></a></div>
  289. <div class="btn-green-r"></div>
  290. </div>
  291. </div>
  292. </div>
  293. <div class="details-l-bottom"></div><div class="details-r-bottom"></div>
  294. <div class="details-bottom"></div>
  295. </div>
  296. <div class="details">
  297. <div class="details-top"></div>
  298. <div class="details-l-top"></div><div class="details-r-top"></div>
  299. <div class="details-body">
  300. <div class="details-body-l" id="strip-c6"></div>
  301. <div class="details-body-r"><?php echo LEARN6 ?>
  302. <div class="btn-green">
  303. <div class="btn-green-l"></div>
  304. <div class="btn-green-c"><a class="npage popcon" href="/index.php#tutorial"><?php echo TOUR ?></a></div>
  305. <div class="btn-green-r"></div>
  306. </div>
  307. </div>
  308. </div>
  309. <div class="details-l-bottom"></div><div class="details-r-bottom"></div>
  310. <div class="details-bottom"></div>
  311. </div>
  312. </div>
  313. </div>
  314. </div>
  315. <div id="ssc-bg">
  316. <div id="ss-head">
  317. <div id="ss-head-left"></div>
  318. <div id="ss-head-right"></div>
  319. <h3 class="ss bold white"><?php echo SCREENSHOTS ?></h3></div>
  320. <div id="ss-container">
  321. <div id="g-widget">
  322. <a class="browse next disabled"></a>
  323. <div id="gallery">
  324. <div style="width: 1568px;" id="g-items">
  325. <img src="index.php_files/x.gif" class="screen1" alt="">
  326. <img src="index.php_files/x.gif" class="screen2" alt="">
  327. <img src="index.php_files/x.gif" class="screen3" alt="">
  328. <img src="index.php_files/x.gif" class="screen4" alt="">
  329. <img src="index.php_files/x.gif" class="screen5" alt="">
  330. <img src="index.php_files/x.gif" class="screen6" alt="">
  331. <img src="index.php_files/x.gif" class="screen7" alt="">
  332. <img src="index.php_files/x.gif" class="screen8" alt="">
  333. </div>
  334. </div>
  335. <a class="browse prev"></a>
  336. </div>
  337. </div>
  338. </div>
  339. <script type="text/javascript">
  340. window.addEvent('domready', function()
  341. {
  342. //stage
  343. var stagewidget = new stageWidget({
  344. stagebg:$('stage-bg'),
  345. stageduration: {
  346. 0:5000,
  347. 1:5000,
  348. 2:5000 },
  349. stagecon:$$(".stage-content"),
  350. stagenav:$$("#buttons-click li"),
  351. stagelink:$$(".stage-link"),
  352. });
  353. //tooltip
  354. var tooltipwidget = new tooltipWidget({
  355. tips: $$("#strips li"),
  356. details:$$(".details")
  357. });
  358. //slider
  359. var sliderwidget = new sliderWidget({
  360. container: $$('#g-widget'),
  361. pimgwidth:520,
  362. head:$('prev_head'),
  363. desc:$('prev_desc'),
  364. prev_bg:$('overlaybg'),
  365. prev_container:$('preview_container'),
  366. prev_stage_container:$$('#preview_stage'),
  367. prev_items:$('preview_items'),
  368. close:$('close')
  369. });
  370. //slideshow [footer]
  371. $('screenshotp').addEvents(
  372. {
  373. 'click': function(e) {
  374. e.stop();
  375. this.fireEvent('show');
  376. },
  377. 'show':function(e){
  378. new sliderWidget({
  379. container: $$('#g-widget'),
  380. preview: false,
  381. inpreview:true,
  382. pimgwidth:520,
  383. head:$('prev_head'),
  384. desc:$('prev_desc'),
  385. prev_bg:$('overlaybg'),
  386. prev_container:$('preview_container'),
  387. prev_stage_container:$$('#preview_stage'),
  388. prev_items:$('preview_items'),
  389. close:$('close'),
  390. directcall:true
  391. });
  392. }
  393. });
  394. //popup anchor
  395. var url = new URI();
  396. var anchor = url.get('fragment');
  397. if (anchor && anchor == 'screenshots')
  398. {
  399. $('screenshotp').fireEvent('show');
  400. }
  401. });
  402. </script> </div>
  403. <div class="clear"></div>
  404. </div>
  405. <div id="footer-container">
  406. <div id="footer">
  407. <a class="flink popcon" href="#help"><?php echo SUPPORT ?></a>&nbsp;|&nbsp;
  408. <a target="blank" class="flink" href="http://100.100.0.1/foro/forumdisplay.php?27-Travian"><?php echo FORUM ?></a>&nbsp;|&nbsp;
  409. <a class="flink popcon" href="#moregames"><?php echo MORE_LINKS ?></a>&nbsp;|&nbsp;
  410. <a target="blank" class="flink" href="#screenshots" id="screenshotp"><?php echo SCREENSHOTS ?></a>&nbsp;|&nbsp;
  411. <br>
  412. <a target="blank" class="flink" href="http://forum.ragezone.com/f583/">TravianX 4.8.5</a> - 2011
  413. </div>
  414. </div>
  415. <div id="preview_container">
  416. <div id="p-top"></div>
  417. <div id="p-bg"></div>
  418. <div id="p-bottom"></div>
  419. <a class="close"></a>
  420. <div id="p-content">
  421. <div id="prev_head">
  422. <h3><?php echo SCREENSHOTS ?></h3>
  423. </div>
  424. <div id="preview_stage">
  425. <a class="browse next"></a>
  426. <div id="preview_img">
  427. <div id="preview_items"></div>
  428. </div>
  429. <a class="browse prev"></a>
  430. <div class="clear"></div>
  431. </div>
  432. <div id="prev_desc"></div>
  433. </div>
  434. </div>
  435. <div class="serverLogin" style="display: none; visibility: visible; left: 246px; top: 100px;" id="popup">
  436. <div id="popup-top"><a class="pclose"></a></div>
  437. <div id="popup-content"><h3 class="pop popgreen bold"><?php echo CHOOSE ?></h3>
  438. <div id="t3Divider"></div>
  439. <div id="t3Area">
  440. <div id="t3AreaTop" class="openedClosedSwitch switchOpened">
  441. <a class="link" title="" href="#" onclick="
  442. $('t3AreaContent').toggleClass('hide');
  443. $('t3AreaBottom').toggleClass('hide');
  444. $('t3AreaTop').toggleClass('switchClosed');
  445. $('t3AreaTop').toggleClass('switchOpened');
  446. "><span class="switch" src="img/x.gif">Travian Classic</span></a>
  447. </div>
  448. <div id="t3AreaContent">
  449. <div class="clear"></div>
  450. </div>
  451. <div id="t3AreaBottom"></div>
  452. </div>
  453. <div class="clear"></div></div>
  454. <div id="popup-bottom"></div>
  455. </div>
  456. <div style="visibility: visible; opacity: 0.7; display: none; height: 1140px;" id="overlaybg"></div>
  457. <script type="text/javascript">
  458. var screenshots = [
  459. {'img':'screenBig screenBig1','hl':'Village centre', 'desc':'Your village could be like this one day, becoming the starting point for your vast empire.'},
  460. {'img':'screenBig screenBig2','hl':'Village overview', 'desc':'Lumber, clay, iron and crop are the vital resources which will fuel the economy of your village and feed your people; they will provide you with the materials necessary for construction and war. With these valuable resources, you can train a powerful conquering army.'},
  461. {'img':'screenBig screenBig3','hl':'The hero', 'desc':'You can send your hero to adventures, where he will have to face great danger and pass difficult challenges. If your hero is successful, he stands a chance of bringing something valuable home.'},
  462. {'img':'screenBig screenBig4','hl':'Building information', 'desc':'For it to become powerful and productive, your village will need a great number of buildings. At the beginning, choose well what you want to construct first, as resources are scarce.'},
  463. {'img':'screenBig screenBig5','hl':'Surrounding territories', 'desc':'Explore your surrounding territories in order to get to know your neighbors; you can opt for a path of peace, creating alliances and confederacies, or you can wage war and conquer the surrounding lands. There may be rich oases in your vicinity; conquer them to gain various valuable bonuses, but always be aware of the dangerous wild animals that inhabit them.'},
  464. {'img':'screenBig screenBig6','hl':'Battle report', 'desc':'It is wise to train your army early on, so you can defend yourself and attack others. This way, you can raid more resources and build up your empire more quickly.'},
  465. {'img':'screenBig screenBig7','hl':'Medals system', 'desc':'At the end of every week, the very best 10 players and alliances will be elected, topping in different categories; as a reward for their prowess they will receive medals, celebrating their achievements.'},
  466. {'img':'screenBig screenBig8','hl':'Task system', 'desc':'To assist you when you first start managing your empire, we have sent the Taskmaster; he will guide you with tips and advice in order to help you build up your village. Just click on the image of the Taskmaster to your left to activate him.'}
  467. ];
  468. </script>
  469. </div>
  470. </body></html>