Advertisement
Guest User

Untitled

a guest
Nov 4th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.50 KB | None | 0 0
  1. <?php
  2. defined('MYAAC') or die('Direct access not allowed!');
  3.  
  4. if(isset($config['boxes']))
  5. $config['boxes'] = explode(",", $config['boxes']);
  6. ?>
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <head>
  9. <?php echo template_place_holder('head_start'); ?>
  10. <link rel="shortcut icon" href="<?php echo $template_path; ?>/images/favicon.ico" type="image/x-icon" />
  11. <link rel="icon" href="<?php echo $template_path; ?>/images/favicon.ico" type="image/x-icon" />
  12. <link href="<?php echo $template_path; ?>/basic.css" rel="stylesheet" type="text/css" />
  13. <script type="text/javascript" src="tools/basic.js"></script>
  14. <script type="text/javascript" src="<?php echo $template_path; ?>/ticker.js"></script>
  15. <script id="twitter-wjs" src="<?php echo $template_path; ?>/js/twitter.js"></script>
  16. <script id="facebook-jssdk" async src="<?php echo $template_path; ?>/js/facebook.js"></script>
  17. <link href="<?php echo $template_path; ?>/css/facebook.css" rel="stylesheet" type="text/css">
  18. <script type="text/javascript">
  19. var loginStatus="<?php echo ($logged ? 'true' : 'false'); ?>";
  20. <?php
  21. if(PAGE != 'news') {
  22. if(strpos(URI, 'subtopic=') !== false) {
  23. $tmp = $_REQUEST['subtopic'];
  24. }
  25. else {
  26. $tmp = str_replace('/', '', URI);
  27. $exp = explode('/', URI);
  28. if(isset($exp[1]) && URI != 'account/create' && URI != 'account/lost') {
  29. if ($exp[0] == 'account') {
  30. $tmp = 'accountmanage';
  31. } else if ($exp[0] == 'news' && $exp[1] == 'archive') {
  32. $tmp = 'newsarchive';
  33. }
  34. else
  35. $tmp = $exp[0];
  36. }
  37. }
  38. }
  39. else {
  40. $tmp = 'news';
  41. }
  42. ?>
  43. var activeSubmenuItem="<?php echo $tmp; ?>";
  44. var IMAGES="<?php echo $template_path; ?>/images";
  45. var LINK_ACCOUNT="<?php echo BASE_URL; ?>";
  46.  
  47. function rowOverEffect(object) {
  48. if (object.className == 'moduleRow') object.className = 'moduleRowOver';
  49. }
  50.  
  51. function rowOutEffect(object) {
  52. if (object.className == 'moduleRowOver') object.className = 'moduleRow';
  53. }
  54.  
  55. function InitializePage() {
  56. LoadLoginBox();
  57. LoadMenu();
  58. }
  59.  
  60. // initialisation of the loginbox status by the value of the variable 'loginStatus' which is provided to the HTML-document by PHP in the file 'header.inc'
  61. function LoadLoginBox()
  62. {
  63. if(loginStatus == "false") {
  64. document.getElementById('LoginstatusText_1').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-you-are-not-logged-in.gif')";
  65. document.getElementById('ButtonText').style.backgroundImage = "url('" + IMAGES + "/global/buttons/_sbutton_login.gif')";
  66. document.getElementById('LoginstatusText_2').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-create-account.gif')";
  67. document.getElementById('LoginstatusText_2_1').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-create-account.gif')";
  68. document.getElementById('LoginstatusText_2_2').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-create-account-over.gif')";
  69. } else {
  70. document.getElementById('LoginstatusText_1').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-welcome.gif')";
  71. document.getElementById('ButtonText').style.backgroundImage = "url('" + IMAGES + "/global/buttons/_sbutton_myaccount.gif')";
  72. document.getElementById('LoginstatusText_2').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-logout.gif')";
  73. document.getElementById('LoginstatusText_2_1').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-logout.gif')";
  74. document.getElementById('LoginstatusText_2_2').style.backgroundImage = "url('" + IMAGES + "/loginbox/loginbox-font-logout-over.gif')";
  75. }
  76. }
  77.  
  78. // mouse-over and click events of the loginbox
  79. function MouseOverLoginBoxText(source)
  80. {
  81. source.lastChild.style.visibility = "visible";
  82. source.firstChild.style.visibility = "hidden";
  83. }
  84. function MouseOutLoginBoxText(source)
  85. {
  86. source.firstChild.style.visibility = "visible";
  87. source.lastChild.style.visibility = "hidden";
  88. }
  89. function LoginButtonAction()
  90. {
  91. if(loginStatus == "false") {
  92. window.location = "<?php echo getLink('account/manage'); ?>";
  93. } else {
  94. window.location = "<?php echo getLink('account/manage'); ?>";
  95. }
  96. }
  97. function LoginstatusTextAction(source) {
  98. if(loginStatus == "false") {
  99. window.location = "<?php echo getLink('account/create'); ?>";
  100. } else {
  101. window.location = "<?php echo getLink('account/logout'); ?>";
  102. }
  103. }
  104.  
  105. var menu = new Array();
  106. menu[0] = new Object();
  107. var unloadhelper = false;
  108.  
  109. // load the menu and set the active submenu item by using the variable 'activeSubmenuItem'
  110. function LoadMenu()
  111. {
  112. document.getElementById("submenu_"+activeSubmenuItem).style.color = "white";
  113. document.getElementById("ActiveSubmenuItemIcon_"+activeSubmenuItem).style.visibility = "visible";
  114. if(self.name.lastIndexOf("&") == -1) {
  115. self.name = "news=1&account=0&community=0&library=0&forum=0<?php if($config['gifts_system']) echo '&shops=0'; ?>&";
  116. }
  117. FillMenuArray();
  118. InitializeMenu();
  119. }
  120.  
  121. function SaveMenu()
  122. {
  123. if(unloadhelper == false) {
  124. SaveMenuArray();
  125. unloadhelper = true;
  126. }
  127. }
  128.  
  129. // store the values of the variable 'self.name' in the array menu
  130. function FillMenuArray()
  131. {
  132. while(self.name.length > 0 ){
  133. var mark1 = self.name.indexOf("=");
  134. var mark2 = self.name.indexOf("&");
  135. var menuItemName = self.name.substr(0, mark1);
  136. menu[0][menuItemName] = self.name.substring(mark1 + 1, mark2);
  137. self.name = self.name.substr(mark2 + 1, self.name.length);
  138. }
  139. }
  140.  
  141. // hide or show the corresponding submenus
  142. function InitializeMenu()
  143. {
  144. for(menuItemName in menu[0]) {
  145. if(menu[0][menuItemName] == "0") {
  146. document.getElementById(menuItemName+"_Submenu").style.visibility = "hidden";
  147. document.getElementById(menuItemName+"_Submenu").style.display = "none";
  148. document.getElementById(menuItemName+"_Lights").style.visibility = "visible";
  149. document.getElementById(menuItemName+"_Extend").style.backgroundImage = "url(" + IMAGES + "/general/plus.gif)";
  150. }
  151. else {
  152. document.getElementById(menuItemName+"_Submenu").style.visibility = "visible";
  153. document.getElementById(menuItemName+"_Submenu").style.display = "block";
  154. document.getElementById(menuItemName+"_Lights").style.visibility = "hidden";
  155. document.getElementById(menuItemName+"_Extend").style.backgroundImage = "url(" + IMAGES + "/general/minus.gif)";
  156. }
  157. }
  158. }
  159.  
  160. // reconstruct the variable "self.name" out of the array menu
  161. function SaveMenuArray()
  162. {
  163. var stringSlices = "";
  164. var temp = "";
  165. for(menuItemName in menu[0]) {
  166. stringSlices = menuItemName + "=" + menu[0][menuItemName] + "&";
  167. temp = temp + stringSlices;
  168. }
  169. self.name = temp;
  170. }
  171.  
  172. // onClick open or close submenus
  173. function MenuItemAction(sourceId)
  174. {
  175. if(menu[0][sourceId] == 1) {
  176. CloseMenuItem(sourceId);
  177. }
  178. else {
  179. OpenMenuItem(sourceId);
  180. }
  181. }
  182. function OpenMenuItem(sourceId)
  183. {
  184. menu[0][sourceId] = 1;
  185. document.getElementById(sourceId+"_Submenu").style.visibility = "visible";
  186. document.getElementById(sourceId+"_Submenu").style.display = "block";
  187. document.getElementById(sourceId+"_Lights").style.visibility = "hidden";
  188. document.getElementById(sourceId+"_Extend").style.backgroundImage = "url(" + IMAGES + "/general/minus.gif)";
  189. }
  190. function CloseMenuItem(sourceId)
  191. {
  192. menu[0][sourceId] = 0;
  193. document.getElementById(sourceId+"_Submenu").style.visibility = "hidden";
  194. document.getElementById(sourceId+"_Submenu").style.display = "none";
  195. document.getElementById(sourceId+"_Lights").style.visibility = "visible";
  196. document.getElementById(sourceId+"_Extend").style.backgroundImage = "url(" + IMAGES + "/general/plus.gif)";
  197. }
  198.  
  199. // mouse-over effects of menubuttons and submenuitems
  200. function MouseOverMenuItem(source)
  201. {
  202. source.firstChild.style.visibility = "visible";
  203. }
  204. function MouseOutMenuItem(source)
  205. {
  206. source.firstChild.style.visibility = "hidden";
  207. }
  208. function MouseOverSubmenuItem(source)
  209. {
  210. source.style.backgroundColor = "#14433F";
  211. }
  212. function MouseOutSubmenuItem(source)
  213. {
  214. source.style.backgroundColor = "#0D2E2B";
  215. }
  216. </script>
  217. <?php echo template_place_holder('head_end'); ?>
  218. </head>
  219. <body onBeforeUnLoad="SaveMenu();" onUnload="SaveMenu();">
  220. <?php echo template_place_holder('body_start'); ?>
  221. <?php if(!empty($config['network_facebook'])) {?>
  222. <script type="text/javascript">
  223. window.fbAsyncInit = function() {
  224. FB.init({
  225. appId : 497232093667125, // App ID
  226. status : true, // check login status
  227. cookie : true, // enable cookies to allow the server to access the session
  228. xfbml : true // parse XFBML
  229. });
  230. FB.Event.subscribe('auth.login', function() {
  231. var URLHelper = "?";
  232. if (window.location.search.replace("?", "").length > 0) {
  233. URLHelper = "&";
  234. }
  235. if (FB_TryLogin == 1) {
  236. window.location = window.location + URLHelper + "step=facebooktrylogin&wasreloaded=1";
  237. } else if (FB_TryLogin == 2) {
  238. window.location = window.location + URLHelper + "page=facebooktrylogin&wasreloaded=1";
  239. } else {
  240. window.location = window.location + URLHelper + "wasreloaded=1";
  241. }
  242. });
  243. FB.Event.subscribe('auth.logout', function(a_Response) {
  244. if (a_Response.status !== 'connected') {
  245. window.location.href=window.location.href;
  246. } else {
  247. /* nothing to do here*/
  248. }
  249. });
  250. FB.Event.subscribe('auth.statusChange', function(response) {
  251. if (FB_ForceReload == 1 && response.status == "connected") {
  252. var URLHelper = "?";
  253. if (window.location.search.replace("?", "").length > 0) {
  254. URLHelper = "&";
  255. }
  256. window.location = window.location + URLHelper + "step=facebooktrylogin&wasreloaded=1";
  257. }
  258. });
  259. };
  260. (function(d){
  261. var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
  262. if (d.getElementById(id)) {return;}
  263. js = d.createElement('script'); js.id = id; js.async = true;
  264. js.src = "//connect.facebook.net/en_US/all.js";
  265. ref.parentNode.insertBefore(js, ref);
  266. }(document));
  267. </script>
  268. <?php } ?>
  269. <div id="top"></div>
  270. <div id="ArtworkHelper" style="background-image:url(<?php echo $template_path; ?>/images/header/<?php echo $config['background_image']; ?>);" >
  271. <div id="Bodycontainer">
  272. <div id="ContentRow">
  273. <div id="MenuColumn">
  274. <div id="LeftArtwork">
  275. <img id="Statue_1" src="<?php echo $template_path; ?>/images/header/animated-statue.gif" alt="logoartwork" />
  276. <img id="TibiaLogoArtworkTop" src="<?php echo $template_path; ?>/images/header/<?php echo $config['logo_image']; ?>" onClick="window.location = '<?php echo getLink('news')?>';" alt="logoartwork" />
  277. <img id="TibiaLogoArtworkBottom" src="<?php echo $template_path; ?>/images/header/tibia-logo-artwork-bottom.gif" alt="logoartwork" />
  278. <img id="Statue_2" src="<?php echo $template_path; ?>/images/header/animated-statue.gif" alt="logoartwork" />
  279. <img id="LogoLink" src="<?php echo $template_path; ?>/images/header/tibia-logo-artwork-string.gif" onClick="window.location = 'mailto:<?php echo $config['lua']['ownerEmail']; ?>';" alt="logoartwork" />
  280. </div>
  281.  
  282. <div id="Loginbox" >
  283. <div id="LoginTop" style="background-image:url(<?php echo $template_path; ?>/images/general/box-top.gif)" ></div>
  284. <div id="BorderLeft" class="LoginBorder" style="background-image:url(<?php echo $template_path; ?>/images/general/chain.gif)" ></div>
  285.  
  286. <div class="Loginstatus" style="background-image:url(<?php echo $template_path; ?>/images/loginbox/loginbox-textfield-background.gif)" >
  287. <div id="LoginstatusText_1" class="LoginstatusText" style="background-image:url(<?php echo $template_path; ?>/images/loginbox/loginbox-font-you-are-not-logged-in.gif)" ></div>
  288. </div>
  289.  
  290. <div id="LoginButtonContainer" style="background-image:url(<?php echo $template_path; ?>/images/loginbox/loginbox-textfield-background.gif)" >
  291. <div id="LoginButton" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/sbutton.gif)" >
  292. <div onClick="LoginButtonAction();" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"><div class="Button" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/sbutton_over.gif)" ></div>
  293. <?php
  294. echo '<div id="ButtonText" '.($logged ? '' : 'style="background-image:url('.$template_path.'/images/global/buttons/_sbutton_login.gif)"').'>
  295. </div>';
  296. ?>
  297. </div>
  298. </div>
  299.  
  300. </div>
  301.  
  302. <div style="clear:both" ></div>
  303.  
  304. <div class="Loginstatus" style="background-image:url(<?php echo $template_path; ?>/images/loginbox/loginbox-textfield-background.gif)" >
  305. <div id="LoginstatusText_2" onClick="LoginstatusTextAction(this);" onMouseOver="MouseOverLoginBoxText(this);" onMouseOut="MouseOutLoginBoxText(this);" ><div id="LoginstatusText_2_1" class="LoginstatusText" style="background-image:url(<?php echo $template_path; ?>/images/loginbox/loginbox-font-create-account.gif)" ></div><div id="LoginstatusText_2_2" class="LoginstatusText" style="background-image:url(<?php echo $template_path; ?>/images/loginbox/loginbox-font-create-account-over.gif)" ></div></div>
  306. </div>
  307.  
  308. <div id="BorderRight" class="LoginBorder" style="background-image:url(<?php echo $template_path; ?>/images/general/chain.gif)" ></div>
  309. <div id="LoginBottom" class="Loginstatus" style="background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif)" ></div>
  310. </div>
  311.  
  312. <div-- id='Menu'>
  313. <div id='MenuTop' style='background-image:url(<?php echo $template_path; ?>/images/general/box-top.gif);'></div>
  314.  
  315. <?php
  316. $menus = get_template_menus();
  317.  
  318. foreach($config['menu_categories'] as $id => $cat) { ?>
  319. <div id='<?php echo $cat['id']; ?>' class='menuitem'>
  320. <span onClick="MenuItemAction('<?php echo $cat['id']; ?>')">
  321. <div class='MenuButton' style='background-image:url(<?php echo $template_path; ?>/images/menu/button-background.gif);'>
  322. <div onMouseOver='MouseOverMenuItem(this);' onMouseOut='MouseOutMenuItem(this);'><div class='Button' style='background-image:url(<?php echo $template_path; ?>/images/menu/button-background-over.gif);'></div>
  323. <span id='<?php echo $cat['id']; ?>_Lights' class='Lights'>
  324. <div class='light_lu' style='background-image:url(<?php echo $template_path; ?>/images/menu/green-light.gif);'></div>
  325. <div class='light_ld' style='background-image:url(<?php echo $template_path; ?>/images/menu/green-light.gif);'></div>
  326. <div class='light_ru' style='background-image:url(<?php echo $template_path; ?>/images/menu/green-light.gif);'></div>
  327. </span>
  328. <div id='<?php echo $cat['id']; ?>_Icon' class='Icon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-<?php echo $cat['id']; ?>.gif);'></div>
  329. <div id='<?php echo $cat['id']; ?>_Label' class='Label' style='background-image:url(<?php echo $template_path; ?>/images/menu/label-<?php echo $cat['id']; ?>.gif);'></div>
  330. <div id='<?php echo $cat['id']; ?>_Extend' class='Extend' style='background-image:url(<?php echo $template_path; ?>/images/general/plus.gif);'></div>
  331. </div>
  332. </div>
  333. </span>
  334. <div id='<?php echo $cat['id']; ?>_Submenu' class='Submenu'>
  335. <?php
  336. if(isset($menus[$id])) {
  337. foreach($menus[$id] as $category => $menu) {
  338. $is_external = strpos(trim($menu['link']), 'http') === 0;
  339. ?>
  340. <a href='<?php echo $is_external ? $menu['link'] : getLink($menu['link']); ?>'<?php echo $is_external ? ' target="_blank"' : ''?>>
  341. <div id='submenu_<?php echo str_replace('/', '', $menu['link']); ?>' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
  342. <div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
  343. <div id='ActiveSubmenuItemIcon_<?php echo str_replace('/', '', $menu['link']); ?>' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
  344. <div class='SubmenuitemLabel'><?php echo $menu['name']; ?></div>
  345. <div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
  346. </div>
  347. </a>
  348. <?php
  349. }
  350. }
  351. ?>
  352. </div>
  353. <?php
  354. if($id == MENU_CATEGORY_SHOP) {
  355. ?>
  356. <div id='MenuBottom' style='background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);'></div>
  357. <?php
  358. }
  359. ?>
  360. </div>
  361. <?php
  362. }
  363. ?>
  364. }
  365. ?>
  366. <script type="text/javascript">
  367. InitializePage();
  368. </script>
  369. </div>
  370. <div id="ContentColumn">
  371. <div class="Content">
  372. <div id="ContentHelper">
  373. <?php echo tickers(); ?>
  374.  
  375.  
  376. <div id="<?php echo PAGE; ?>" class="Box">
  377. <div class="Corner-tl" style="background-image:url(<?php echo $template_path; ?>/images/content/corner-tl.gif);"></div>
  378. <div class="Corner-tr" style="background-image:url(<?php echo $template_path; ?>/images/content/corner-tr.gif);"></div>
  379. <div class="Border_1" style="background-image:url(<?php echo $template_path; ?>/images/content/border-1.gif);"></div>
  380. <div class="BorderTitleText" style="background-image:url(<?php echo $template_path; ?>/images/content/title-background-green.gif);"></div>
  381. <?php
  382. $headline = $template_path.'/images/header/headline-' . PAGE . '.gif';
  383. if(!file_exists($headline))
  384. $headline = $template_path . '/headline.php?t=' . ucfirst($title);
  385. ?>
  386. <img class="Title" src="<?php echo $headline; ?>" alt="Contentbox headline" />
  387. <div class="Border_2">
  388. <div class="Border_3">
  389. <?php $hooks->trigger(HOOK_TIBIACOM_BORDER_3); ?>
  390. <div class="BoxContent" style="background-image:url(<?php echo $template_path; ?>/images/content/scroll.gif);">
  391. <?php echo template_place_holder('center_top') . $content; ?>
  392. </div>
  393. </div>
  394. </div>
  395. <div class="Border_1" style="background-image:url(<?php echo $template_path; ?>/images/content/border-1.gif);"></div>
  396.  
  397. <div class="CornerWrapper-b"><div class="Corner-bl" style="background-image:url(<?php echo $template_path; ?>/images/content/corner-bl.gif);"></div></div>
  398. <div class="CornerWrapper-b"><div class="Corner-br" style="background-image:url(<?php echo $template_path; ?>/images/content/corner-br.gif);"></div></div>
  399. </div>
  400. </div>
  401. </div>
  402. <div id="Footer"><?php echo template_footer(); ?><br/>Layout by CipSoft GmbH.</div>
  403. </div>
  404. <div id="ThemeboxesColumn">
  405. <div id="RightArtwork">
  406. <?php
  407. //$tmp_link =
  408. //if($config['friendly_urls'])
  409. ?>
  410. <img id="Monster" src="images/monsters/<?php echo logo_monster() ?>.gif" onClick="window.location = '?subtopic=creatures&creature=<?php echo $config['logo_monster'] ?>';" alt="Monster of the Week" />
  411. <img id="PedestalAndOnline" src="<?php echo $template_path; ?>/images/header/pedestal-and-online.gif" alt="Monster Pedestal and Players Online Box"/>
  412. <div id="PlayersOnline" onClick="window.location = '<?php echo getLink('online'); ?>'">
  413. <?php
  414. if($status['online'])
  415. echo '<div id="players" style="display: inline;">' . $status['players'] . '</div><br>Players Online';
  416. else
  417. echo '<font color="red"><b>Server<br />OFFLINE</b></font>';
  418. ?></div>
  419. </div>
  420.  
  421. <div id="Themeboxes">
  422. <?php
  423. foreach($config['boxes'] as $box) {
  424. $file = TEMPLATES . $template_name . '/boxes/' . $box . '.php';
  425. if(file_exists($file)) {
  426. include($file); ?>
  427. <?php
  428. }
  429. }
  430. ?>
  431. <?php
  432. if($config['template_allow_change'])
  433. echo '<font color="white">Template:</font><br/>' . template_form();
  434. ?>
  435. </div>
  436. </div>
  437. </div>
  438. </div>
  439. </div>
  440. <?php echo template_place_holder('body_end'); ?>
  441. </body>
  442. </html>
  443. <?php
  444. function logo_monster()
  445. {
  446. global $config;
  447. return str_replace(" ", "", trim(mb_strtolower($config['logo_monster'])));
  448. }
  449. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement