Advertisement
Kaiquegabriel

Untitled

Jul 22nd, 2018
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 136.66 KB | None | 0 0
  1. <?php
  2. $items = simplexml_load_file($config['site']['serverPath'].'/data/items/items.xml') or die('<b>Could not load items!</b>');
  3.  
  4. foreach($items->item as $v)
  5. $itemList[(int)$v['id']] = ucwords(strtolower($v['name']));
  6.  
  7. if($config['site']['shop_system'] == 1) {
  8. if($logged)
  9. $user_premium_points = $account_logged->getCustomField('premium_points');
  10. else
  11. $user_premium_points = 'Login first';
  12.  
  13. function getItemByID($id) {
  14. $id = (int) $id;
  15. $SQL = $GLOBALS['SQL'];
  16. $data = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_offer').' WHERE '.$SQL->fieldName('id').' = '.$SQL->quote($id).';')->fetch();
  17. if ($data['offer_type'] == 'pacc') {
  18. $offer['id'] = $data['id'];
  19. $offer['type'] = $data['offer_type'];
  20. $offer['days'] = $data['count1'];
  21. $offer['points'] = $data['points'];
  22. $offer['description'] = $data['offer_description'];
  23. $offer['name'] = $data['offer_name'];
  24. $offer['offer_type'] = $data['offer_type'];
  25. }elseif ($data['offer_type'] == 'item') {
  26. $offer['id'] = $data['id'];
  27. $offer['type'] = $data['offer_type'];
  28. $offer['item_id'] = $data['itemid1'];
  29. $offer['item_count'] = $data['count1'];
  30. $offer['points'] = $data['points'];
  31. $offer['description'] = $data['offer_description'];
  32. $offer['name'] = $data['offer_name'];
  33. }elseif ($data['offer_type'] == 'outfit') {
  34. $offer['id'] = $data['id'];
  35. $offer['type'] = $data['offer_type'];
  36. $offer['points'] = $data['points'];
  37. $offer['name'] = $data['offer_name'];
  38. }elseif ($data['offer_type'] == 'vipdays') {
  39. $offer['id'] = $data['id'];
  40. $offer['type'] = $data['offer_type'];
  41. $offer['days'] = $data['count1'];
  42. $offer['points'] = $data['points'];
  43. $offer['description'] = $data['offer_description'];
  44. $offer['name'] = $data['offer_name'];
  45. $offer['offer_type'] = $data['offer_type'];
  46. }elseif ($data['offer_type'] == 'itemvip') {
  47. $offer['id'] = $data['id'];
  48. $offer['type'] = $data['offer_type'];
  49. $offer['item_id'] = $data['itemid1'];
  50. $offer['item_count'] = $data['count1'];
  51. $offer['points'] = $data['points'];
  52. $offer['description'] = $data['offer_description'];
  53. $offer['name'] = $data['offer_name'];
  54. }elseif ($data['offer_type'] == 'container') {
  55. $offer['id'] = $data['id'];
  56. $offer['type'] = $data['offer_type'];
  57. $offer['container_id'] = $data['itemid2'];
  58. $offer['container_count'] = $data['count2'];
  59. $offer['item_id'] = $data['itemid1'];
  60. $offer['item_count'] = $data['count1'];
  61. $offer['points'] = $data['points'];
  62. $offer['description'] = $data['offer_description'];
  63. $offer['name'] = $data['offer_name'];
  64. }elseif ($data['offer_type'] == 'unban') {
  65. $offer['id'] = $data['id'];
  66. $offer['type'] = $data['offer_type'];
  67. $offer['points'] = $data['points'];
  68. $offer['description'] = $data['offer_description'];
  69. $offer['name'] = $data['offer_name'];
  70. }elseif ($data['offer_type'] == 'redskull') {
  71. $offer['id'] = $data['id'];
  72. $offer['type'] = $data['offer_type'];
  73. $offer['points'] = $data['points'];
  74. $offer['description'] = $data['offer_description'];
  75. $offer['name'] = $data['offer_name'];
  76. }elseif ($data['offer_type'] == 'itemlogout') {
  77. $offer['id'] = $data['id'];
  78. $offer['type'] = $data['offer_type'];
  79. $offer['points'] = $data['points'];
  80. $offer['description'] = $data['offer_description'];
  81. $offer['pid'] = $data['pid'];
  82. $offer['count1'] = $data['count1'];
  83. $offer['item_id'] = $data['itemid1'];
  84. $offer['free_cap'] = $data['free_cap'];
  85. }elseif ($data['offer_type'] == 'storage') {
  86. $offer['id'] = $data['id'];
  87. $offer['type'] = $data['offer_type'];
  88. $offer['item_id'] = $data['itemid1'];
  89. $offer['points'] = $data['points'];
  90. $offer['description'] = $data['offer_description'];
  91. $offer['name'] = $data['offer_name'];
  92. }elseif ($data['offer_type'] == 'changename') {
  93. $offer['id'] = $data['id'];
  94. $offer['type'] = $data['offer_type'];
  95. $offer['points'] = $data['points'];
  96. $offer['description'] = $data['offer_description'];
  97. $offer['name'] = $data['offer_name'];
  98. }return $offer;
  99. }
  100.  
  101. function getOfferArray() {
  102. $offer_list = $GLOBALS['SQL']->query('SELECT * FROM '.$GLOBALS['SQL']->tableName('z_shop_offer').';');
  103. $i_pacc = 0;
  104. $i_item = 0;
  105. $i_outfit = 0;
  106. $i_vipdays = 0;
  107. $i_itemvip = 0;
  108. $i_container = 0;
  109. $i_unban = 0;
  110. $i_redskull = 0;
  111. $i_itemlogout = 0;
  112. $i_changename = 0;
  113. $i_storage = 0;
  114. while($data = $offer_list->fetch()) {
  115. if ($data['offer_type'] == 'pacc') {
  116. $offer_array['pacc'][$i_pacc]['id'] = $data['id'];
  117. $offer_array['pacc'][$i_pacc]['days'] = $data['count1'];
  118. $offer_array['pacc'][$i_pacc]['points'] = $data['points'];
  119. $offer_array['pacc'][$i_pacc]['description'] = $data['offer_description'];
  120. $offer_array['pacc'][$i_pacc]['name'] = $data['offer_name'];
  121. $offer_array['pacc'][$i_pacc]['offer_type'] = $data['offer_type'];
  122. $i_pacc++;
  123. }elseif ($data['offer_type'] == 'item') {
  124. $offer_array['item'][$i_item]['id'] = $data['id'];
  125. $offer_array['item'][$i_item]['item_id'] = $data['itemid1'];
  126. $offer_array['item'][$i_item]['item_count'] = $data['count1'];
  127. $offer_array['item'][$i_item]['points'] = $data['points'];
  128. $offer_array['item'][$i_item]['description'] = $data['offer_description'];
  129. $offer_array['item'][$i_item]['name'] = $data['offer_name'];
  130. $i_item++;
  131. }elseif ($data['offer_type'] == 'outfit') {
  132. $offer_array['outfit'][$i_outfit]['id'] = $data['id'];
  133. $offer_array['outfit'][$i_outfit]['points'] = $data['points'];
  134. $offer_array['outfit'][$i_outfit]['name'] = $data['offer_name'];
  135. $i_outfit++;
  136. }elseif ($data['offer_type'] == 'vipdays') {
  137. $offer_array['vipdays'][$i_vipdays]['id'] = $data['id'];
  138. $offer_array['vipdays'][$i_vipdays]['days'] = $data['count1'];
  139. $offer_array['vipdays'][$i_vipdays]['points'] = $data['points'];
  140. $offer_array['vipdays'][$i_vipdays]['description'] = $data['offer_description'];
  141. $offer_array['vipdays'][$i_vipdays]['name'] = $data['offer_name'];
  142. $offer_array['vipdays'][$i_vipdays]['offer_type'] = $data['offer_type'];
  143. $i_vipdays++;
  144. }elseif ($data['offer_type'] == 'itemvip') {
  145. $offer_array['itemvip'][$i_itemvip]['id'] = $data['id'];
  146. $offer_array['itemvip'][$i_itemvip]['item_id'] = $data['itemid1'];
  147. $offer_array['itemvip'][$i_itemvip]['item_count'] = $data['count1'];
  148. $offer_array['itemvip'][$i_itemvip]['points'] = $data['points'];
  149. $offer_array['itemvip'][$i_itemvip]['description'] = $data['offer_description'];
  150. $offer_array['itemvip'][$i_itemvip]['name'] = $data['offer_name'];
  151. $i_itemvip++;
  152. }elseif ($data['offer_type'] == 'container'){
  153. $offer_array['container'][$i_container]['id'] = $data['id'];
  154. $offer_array['container'][$i_container]['container_id'] = $data['itemid2'];
  155. $offer_array['container'][$i_container]['container_count'] = $data['count2'];
  156. $offer_array['container'][$i_container]['item_id'] = $data['itemid1'];
  157. $offer_array['container'][$i_container]['item_count'] = $data['count1'];
  158. $offer_array['container'][$i_container]['points'] = $data['points'];
  159. $offer_array['container'][$i_container]['description'] = $data['offer_description'];
  160. $offer_array['container'][$i_container]['name'] = $data['offer_name'];
  161. $i_container++;
  162. }elseif ($data['offer_type'] == 'unban') {
  163. $offer_array['unban'][$i_unban]['id'] = $data['id'];
  164. $offer_array['unban'][$i_unban]['points'] = $data['points'];
  165. $offer_array['unban'][$i_unban]['description'] = $data['offer_description'];
  166. $offer_array['unban'][$i_unban]['name'] = $data['offer_name'];
  167. $i_unban++;
  168. }elseif ($data['offer_type'] == 'redskull') {
  169. $offer_array['redskull'][$i_redskull]['id'] = $data['id'];
  170. $offer_array['redskull'][$i_redskull]['points'] = $data['points'];
  171. $offer_array['redskull'][$i_redskull]['description'] = $data['offer_description'];
  172. $offer_array['redskull'][$i_redskull]['name'] = $data['offer_name'];
  173. $i_redskull++;
  174. }elseif ($data['offer_type'] == 'itemlogout') {
  175. $offer_array['itemlogout'][$i_itemlogout]['id'] = $data['id'];
  176. $offer_array['itemlogout'][$i_itemlogout]['points'] = $data['points'];
  177. $offer_array['itemlogout'][$i_itemlogout]['description'] = $data['offer_description'];
  178. $offer_array['itemlogout'][$i_itemlogout]['name'] = $data['offer_name'];
  179. $offer_array['itemlogout'][$i_itemlogout]['count1'] = $data['count1'];
  180. $offer_array['itemlogout'][$i_itemlogout]['pid'] = $data['pid'];
  181. $offer_array['itemlogout'][$i_itemlogout]['item_id'] = $data['itemid1'];
  182. $offer_array['itemlogout'][$i_itemlogout]['free_cap'] = $data['free_cap'];
  183. $i_itemlogout++;
  184. }elseif ($data['offer_type'] == 'storage') {
  185. $offer_array['storage'][$i_storage]['id'] = $data['id'];
  186. $offer_array['storage'][$i_storage]['points'] = $data['points'];
  187. $offer_array['storage'][$i_storage]['item_id'] = $data['itemid1'];
  188. $offer_array['storage'][$i_storage]['description'] = $data['offer_description'];
  189. $offer_array['storage'][$i_storage]['name'] = $data['offer_name'];
  190. $i_storage++;
  191. }elseif ($data['offer_type'] == 'changename') {
  192. $offer_array['changename'][$i_changename]['id'] = $data['id'];
  193. $offer_array['changename'][$i_changename]['points'] = $data['points'];
  194. $offer_array['changename'][$i_changename]['description'] = $data['offer_description'];
  195. $offer_array['changename'][$i_changename]['name'] = $data['offer_name'];
  196. $i_changename++;
  197. }
  198. }
  199. return $offer_array;
  200. }
  201.  
  202. if($action == '') {
  203. unset($_SESSION['viewed_confirmation_page']);
  204. $main_content .= '<div style="text-align: justify;"><center><h2>Welcome to '.$config['server']['serverName'].' Shop.</h2></center></div>';
  205. $offer_list = getOfferArray();
  206. // show storage
  207.  
  208. if(count($offer_list['storage']) > 0){
  209. $main_content .= '
  210. <div class="TableContainer">
  211. <div class="CaptionContainer">
  212. <div class="CaptionInnerContainer">
  213. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  214. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  215. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  216. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  217. <div class="Text">Storages for Sale</div>
  218. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  219. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  220. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  221. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  222. </div>
  223. </div>
  224. <table class="Table3" cellpadding="0" cellspacing="0">
  225. <tbody>
  226. <tr>
  227. <td>
  228. <div class="InnerTableContainer">
  229. <table style="width:100%;">
  230. <tbody>
  231. <tr>
  232. <td>
  233. <div class="TableShadowContainerRightTop">
  234. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  235. </div>
  236. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  237. <div class="TableContentContainer">
  238. <table class="TableContent" style="border:1px solid #faf0d7;" width="100%">
  239. <tbody>';
  240. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  241. $main_content.='
  242. <tr bgcolor="'.$bgcolor.'">
  243. <td valign="middle" width="10%" align="center"><b>Product</b></td>
  244. <td valign="middle" width="60%"><b>Description</b></td>
  245. <td valign="middle">&nbsp;</td>
  246. </tr>';
  247. if(count($offer_list['storage']) > 0)
  248. foreach($offer_list['storage'] as $storage) {
  249. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  250. $main_content .= '<tr bgcolor="'.$bgcolor.'">
  251. <td valign="middle" align="center"><img src="images/items/storage/'.$storage['item_id'].'.gif" width="32" height="32" /></td>
  252. <td><font style="font-size:16px; font-weight:bold;">'.$storage['name'].'</font>&nbsp;';
  253. $main_content .='<small>('.$storage['points'].' points)</small>';
  254. $main_content .='<br />
  255. '.$storage['description'].'</td>
  256. <td align="center">';
  257. if(!$logged) $main_content .= '<a href="/?subtopic=accountmanagement"><input type="submit" value="Login First" class="btn disabled btn-danger" /></a>'; else
  258. $main_content .= '
  259. <form action="index.php?subtopic=shopsystem&action=select_player" method="POST">
  260. <input type="hidden" name="buy_id" value="'.$storage['id'].'">
  261. <table border="0" cellpadding="0" cellspacing="0">
  262. <tbody>
  263. <tr>
  264. <td style="border: 0px none;">
  265. <div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
  266. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  267. <input class="ButtonText" name="Continue" alt="Continue" src="'.$layout_name.'/images/buttons/_sbutton_purchase.gif" type="image">
  268. </div>
  269. </div>
  270. </td>
  271. </tr>
  272. </tbody>
  273. </table>
  274. </form>';}
  275. $main_content .= '
  276. </tbody>
  277. </table>
  278. </div>
  279. </div>
  280. <div class="TableShadowContainer">
  281. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  282. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  283. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  284. </div>
  285. </div>
  286. </td>
  287. </tr>
  288. </tbody>
  289. </table>
  290. </div>
  291. </td>
  292. </tr>
  293. </tbody>
  294. </table>
  295. </div><br />';}
  296.  
  297. if($logged){ $main_content .= '
  298. <a name="History" ></a>
  299. <div class="TableContainer" >
  300. <table class="Table5" cellpadding="0" cellspacing="0">
  301. <div class="CaptionContainer" >
  302. <div class="CaptionInnerContainer" >
  303. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
  304. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
  305. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span>
  306. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span>
  307. <div class="Text" >History</div>
  308. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span>
  309. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span>
  310. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
  311. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
  312. </div>
  313. </div>
  314. <tr>
  315. <td>
  316. <div class="InnerTableContainer" >
  317. <table style="width:100%;" >';
  318. $main_content .= '
  319. <tr>
  320. <td>
  321. <div class="TableShadowContainerRightTop" >
  322. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rt.gif);" ></div>
  323. </div>
  324. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rm.gif);" >
  325. <div class="TableContentContainer" >
  326. <table class="TableContent" width="100%" style="border:1px solid #faf0d7;" >
  327. <tr>
  328. <td>
  329. <div style="float:right;" >
  330. <form action="?subtopic=shopsystem&action=show_history" method="post" style="padding:0px;margin:0px;" >
  331. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton_green.gif)" >
  332. <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_green_over.gif);" ></div>
  333. <input class="ButtonText" type="image" name="View History" alt="View History" src="'.$layout_name.'/images/buttons/_sbutton_viewhistory.gif" >
  334. </div>
  335. </div>
  336. </form>
  337. </div>
  338. <b>Shopping History</b><br/>
  339. Contains all historical data of your payments.
  340. </td>
  341. </tr>
  342. </table>
  343. </div>
  344. </div>
  345. <div class="TableShadowContainer" >
  346. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bm.gif);" >
  347. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bl.gif);" ></div>
  348. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-br.gif);" ></div>
  349. </div>
  350. </div>
  351. </td>
  352. </tr>';
  353.  
  354. $main_content .= '
  355. </table>
  356. </div>
  357. </table>
  358. </div>
  359. </td>
  360. </tr>
  361. <br/>';}
  362.  
  363. //show list of vipdays offers
  364. if(count($offer_list['pacc']) > 0){
  365. $main_content .= '
  366. <div class="TableContainer">
  367. <div class="CaptionContainer">
  368. <div class="CaptionInnerContainer">
  369. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  370. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  371. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  372. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  373. <div class="Text">Premium Roses</div>
  374. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  375. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  376. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  377. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  378. </div>
  379. </div>
  380. <table class="Table3" cellpadding="0" cellspacing="0">
  381. <tbody>
  382. <tr>
  383. <td>
  384. <div class="InnerTableContainer">
  385. <table style="width:100%;">
  386. <tbody>
  387. <tr>
  388. <td>
  389. <div class="TableShadowContainerRightTop">
  390. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  391. </div>
  392. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  393. <div class="TableContentContainer">
  394. <table class="TableContent" style="border:1px solid #faf0d7;" width="100%">
  395. <tbody>';
  396. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  397. $main_content.='
  398. <tr bgcolor="'.$bgcolor.'">
  399. <td valign="middle" width="10%" align="center"><b>Product</b></td>
  400. <td valign="middle" width="60%"><b>Description</b></td>
  401. <td valign="middle">&nbsp;</td>
  402. </tr>';
  403. if(count($offer_list['pacc']) > 0)
  404. foreach($offer_list['pacc'] as $pacc) {
  405. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  406. $main_content .= '
  407. <tr bgcolor="'.$bgcolor.'">
  408. <td valign="middle" align="center"><img src="images/shop/premium.gif" /></td>
  409. <td><font style="font-size:16px; font-weight:bold;">'.$pacc['days'].' Premium Days</font>&nbsp;<small>('.$pacc['points'].' points)</small><br />'.$pacc['description'].'</td>
  410. <td align="center">';
  411. if(!$logged) $main_content .= '<a href="/?subtopic=accountmanagement"><input type="submit" value="Login First" class="btn disabled btn-danger" /></a>'; else
  412. $main_content .= '
  413. <form action="index.php?subtopic=shopsystem&action=select_player" method=POST>
  414. <input type="hidden" name="buy_id" value="'.$pacc['id'].'">
  415. <table border="0" cellpadding="0" cellspacing="0">
  416. <tbody>
  417. <tr>
  418. <td style="border: 0px none;">
  419. <div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
  420. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  421. <input class="ButtonText" name="Continue" alt="Continue" src="'.$layout_name.'/images/buttons/_sbutton_purchase.gif" type="image">
  422. </div>
  423. </div>
  424. </td>
  425. </tr>
  426. </tbody>
  427. </table>
  428. </form>';}
  429. $main_content .= '
  430. </td>
  431. </tr>';
  432. $main_content .= '
  433. </tbody>
  434. </table>
  435. </div>
  436. </div>
  437. <div class="TableShadowContainer">
  438. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  439. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  440. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  441. </div>
  442. </div>
  443. </td>
  444. </tr>
  445. </tbody>
  446. </table>
  447. </div>
  448. </td>
  449. </tr>
  450. </tbody>
  451. </table>
  452. </div><br />';}
  453. if(count($offer_list['vipdays']) > 0){
  454. $main_content .= '
  455. <div class="TableContainer">
  456. <div class="CaptionContainer">
  457. <div class="CaptionInnerContainer">
  458. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  459. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  460. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  461. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  462. <div class="Text">VIP Account</div>
  463. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  464. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  465. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  466. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  467. </div>
  468. </div>
  469. <table class="Table3" cellpadding="0" cellspacing="0">
  470. <tbody>
  471. <tr>
  472. <td>
  473. <div class="InnerTableContainer">
  474. <table style="width:100%;">
  475. <tbody>
  476. <tr>
  477. <td>
  478. <div class="TableShadowContainerRightTop">
  479. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  480. </div>
  481. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  482. <div class="TableContentContainer">
  483. <table class="TableContent" style="border:1px solid #faf0d7;" width="100%">
  484. <tbody>';
  485. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  486. $main_content.='
  487. <tr bgcolor="'.$bgcolor.'">
  488. <td valign="middle" width="10%" align="center"><b>Product</b></td>
  489. <td valign="middle" width="60%"><b>Description</b></td>
  490. <td valign="middle">&nbsp;</td>
  491. </tr>';
  492. if(count($offer_list['vipdays']) > 0)
  493. foreach($offer_list['vipdays'] as $vipdays) {
  494. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  495. $main_content .= '<tr bgcolor="'.$bgcolor.'"><td valign="middle" align="center"><img src="images/shop/vip.gif" /></td>
  496. <td><font style="font-size:16px; font-weight:bold;">'.$vipdays['days'].' VIP Days</font>&nbsp;<small>('.$vipdays['points'].' points)</small><br />'.$vipdays['description'].'</td>
  497. <td align="center">';
  498. if(!$logged) $main_content .= '<a href="/?subtopic=accountmanagement"><input type="submit" value="Login First" class="btn disabled btn-danger" /></a>'; else
  499. $main_content .= '
  500. <form action="index.php?subtopic=shopsystem&action=select_player" method=POST>
  501. <input type="hidden" name="buy_id" value="'.$vipdays['id'].'">
  502. <table border="0" cellpadding="0" cellspacing="0">
  503. <tbody>
  504. <tr>
  505. <td style="border: 0px none;">
  506. <div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
  507. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  508. <input class="ButtonText" name="Continue" alt="Continue" src="'.$layout_name.'/images/buttons/_sbutton_purchase.gif" type="image">
  509. </div>
  510. </div>
  511. </td>
  512. </tr>
  513. </tbody>
  514. </table>
  515. </form>';
  516. $main_content .= '
  517. </td>
  518. </tr>';
  519. }
  520. $main_content .= '
  521. </tbody>
  522. </table>
  523. </div>
  524. </div>
  525. <div class="TableShadowContainer">
  526. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  527. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  528. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  529. </div>
  530. </div>
  531. </td>
  532. </tr>
  533. </tbody>
  534. </table>
  535. </div>
  536. </td>
  537. </tr>
  538. </tbody>
  539. </table>
  540. </div><br />';}
  541. //show list of itemsvip offers
  542. if(count($offer_list['itemvip']) > 0) {
  543. $main_content .= '
  544. <div class="TableContainer">
  545. <div class="CaptionContainer">
  546. <div class="CaptionInnerContainer">
  547. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  548. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  549. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  550. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  551. <div class="Text">Premium Roses</div>
  552. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  553. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  554. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  555. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  556. </div>
  557. </div>
  558. <table class="Table3" cellpadding="0" cellspacing="0">
  559. <tbody>
  560. <tr>
  561. <td>
  562. <div class="InnerTableContainer">
  563. <table style="width:100%;">
  564. <tbody>
  565. <tr>
  566. <td>
  567. <div class="TableShadowContainerRightTop">
  568. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  569. </div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  570. <div class="TableContentContainer">
  571. <table class="TableContent" style="border:1px solid #faf0d7;" width="100%">
  572. <tbody>';
  573. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  574. $main_content.='
  575. <tr bgcolor="'.$bgcolor.'">
  576. <td valign="middle" width="10%" align="center"><b>Product</b></td>
  577. <td valign="middle" width="60%"><b>Description</b></td>
  578. <td valign="middle">&nbsp;</td>
  579. </tr>';
  580. foreach($offer_list['itemvip'] as $itemvip) {
  581. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  582. $main_content .= '<tr bgcolor="'.$bgcolor.'"><td valign="middle" align="center">
  583. ';
  584. if(file_exists('images/items/'.$itemvip['item_id'].'.gif')) { $main_content .= '<br /><img src="images/items/'.$itemvip['item_id'].'.gif" height="32" width="32"><br /> '; } else { $main_content .= '<br /> <img src="images/monsters/nophoto.png" height="32" width="32">'; }
  585. $main_content .='</td>
  586. <td><font style="font-size:16px; font-weight:bold;">'.$itemList[(int)$itemvip['item_id']].'</font>&nbsp;<small>('.$itemvip['points'].' points)</small><br />'.$itemvip['description'].'</td>
  587. <td align="center">';
  588. if(!$logged) $main_content .= '<a href="/?subtopic=accountmanagement"><input type="submit" value="Login First" class="btn disabled btn-danger" /></a>'; else
  589. $main_content .= '
  590. <form action="index.php?subtopic=shopsystem&action=select_player" method=POST>
  591. <input type="hidden" name="buy_id" value="'.$itemvip['id'].'">
  592. <table border="0" cellpadding="0" cellspacing="0">
  593. <tbody>
  594. <tr>
  595. <td style="border: 0px none;">
  596. <div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
  597. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  598. <input class="ButtonText" name="Continue" alt="Continue" src="'.$layout_name.'/images/buttons/_sbutton_purchase.gif" type="image">
  599. </div>
  600. </div>
  601. </td>
  602. </tr>
  603. </tbody>
  604. </table>
  605. </form>';
  606. $main_content .= '</td></tr>';
  607. }
  608. $main_content .= '</tbody>
  609. </table>
  610. </div>
  611. </div>
  612. <div class="TableShadowContainer">
  613. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  614. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  615. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  616. </div>
  617. </div>
  618. </td>
  619. </tr>
  620. </tbody>
  621. </table>
  622. </div>
  623. </td>
  624. </tr>
  625. </tbody>
  626. </table>
  627. </div><br />';}
  628. //show list of items offers
  629. if(count($offer_list['item']) > 0 or count($offer_list['itemlogout']) > 0){
  630. $main_content .= '
  631. <div class="TableContainer">
  632. <div class="CaptionContainer">
  633. <div class="CaptionInnerContainer">
  634. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  635. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  636. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  637. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  638. <div class="Text">Items</div>
  639. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  640. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  641. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  642. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  643. </div>
  644. </div>
  645. <table class="Table3" cellpadding="0" cellspacing="0">
  646. <tbody>
  647. <tr>
  648. <td>
  649. <div class="InnerTableContainer">
  650. <table style="width:100%;">
  651. <tbody>
  652. <tr>
  653. <td>
  654. <div class="TableShadowContainerRightTop">
  655. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  656. </div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  657. <div class="TableContentContainer">
  658. <table class="TableContent" style="border:1px solid #faf0d7;" width="100%">
  659. <tbody>';
  660. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  661. $main_content.='
  662. <tr bgcolor="'.$bgcolor.'">
  663. <td valign="middle" width="10%" align="center"><b>Product</b></td>
  664. <td valign="middle" width="60%"><b>Description</b></td>
  665. <td valign="middle">&nbsp;</td>';
  666. if(count($offer_list['item']) > 0) {
  667. foreach($offer_list['item'] as $item) {
  668. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  669. $main_content .= '
  670. </tr>
  671. <tr bgcolor="'.$bgcolor.'">
  672. <td valign="middle" align="center">'; if(file_exists('images/items/'.$item['item_id'].'.gif')) { $main_content .= '<br /><img src="images/items/'.$item['item_id'].'.gif" height="32" width="32"><br /> '; } else { $main_content .= '<br /> <img src="images/monsters/nophoto.png" height="32" width="32">'; }
  673. $main_content .='
  674. </td>
  675. <td><font style="font-size:16px; font-weight:bold;">'.$itemList[(int)$item['item_id']].'</font>&nbsp;';
  676. $main_content .='<small>('.$item['points'].' points)</small>';
  677. $main_content .='<br />
  678. '.$item['description'].'
  679. </td>
  680. <td valign="middle" align="center">';
  681. if(!$logged) $main_content .= '<a href="/?subtopic=accountmanagement"><input type="submit" value="Login First" class="btn disabled btn-danger" /></a>'; else
  682. $main_content .= '
  683. <form action="index.php?subtopic=shopsystem&action=select_player" method="POST">
  684. <input type="hidden" name="buy_id" value="'.$item['id'].'">
  685. <table border="0" cellpadding="0" cellspacing="0">
  686. <tbody>
  687. <tr>
  688. <td style="border: 0px none;">
  689. <div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
  690. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  691. <input class="ButtonText" name="Continue" alt="Continue" src="'.$layout_name.'/images/buttons/_sbutton_purchase.gif" type="image">
  692. </div>
  693. </div>
  694. </td>
  695. </tr>
  696. </tbody>
  697. </table>
  698. </form>';
  699. $main_content .= '</td></tr>';
  700. }
  701. $main_content .= '</tbody>
  702. </table>
  703. </div>
  704. </div>
  705. <div class="TableShadowContainer">
  706. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  707. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  708. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  709. </div>
  710. </div></td>
  711. </tr>
  712. </tbody>
  713. </table>
  714. </div>
  715. </td>
  716. </tr>
  717. </tbody>
  718. </table>
  719. </div><br />';
  720. }
  721. }
  722.  
  723. //show list of outfits offers
  724. if(count($offer_list['outfit']) > 0) {
  725. $main_content .= '
  726. <div class="TableContainer">
  727. <div class="CaptionContainer">
  728. <div class="CaptionInnerContainer">
  729. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  730. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  731. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  732. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  733. <div class="Text">Outfits</div>
  734. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  735. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  736. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  737. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  738. </div>
  739. </div>
  740. <table class="Table3" cellpadding="0" cellspacing="0">
  741. <tbody>
  742. <tr>
  743. <td>
  744. <div class="InnerTableContainer">
  745. <table style="width:100%;">
  746. <tbody>
  747. <tr>
  748. <td>
  749. <div class="TableShadowContainerRightTop">
  750. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  751. </div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  752. <div class="TableContentContainer">
  753. <table class="TableContent" style="border:1px solid #faf0d7;" width="100%">
  754. <tbody>';
  755. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  756. $main_content.='
  757. <tr bgcolor="'.$bgcolor.'">
  758. <td valign="middle" width="10%" align="center"><b>Product</b></td>
  759. <td valign="middle" width="60%"><b>Description</b></td>
  760. <td valign="middle">&nbsp;</td>';
  761. if(count($offer_list['outfit']) > 0) {
  762. foreach($offer_list['outfit'] as $outfit) {
  763. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  764. $main_content .= '
  765. </tr>
  766. <tr bgcolor="'.$bgcolor.'">
  767. <td valign="middle" align="center">';
  768.  
  769. if(file_exists($layout_name.'/images/outfits/'.$outfit['name'].'_male.gif')) {
  770. $main_content .= '<img src="'.$layout_name.'/images/outfits/'.$outfit['name'].'_male.gif"">';
  771. $main_content .= '<img src="'.$layout_name.'/images/outfits/'.$outfit['name'].'_female.gif"">';
  772. } else {
  773. $main_content .= '<img src="'.$layout_name.'/images/items/notfound.gif">';
  774. }
  775.  
  776. $main_content .= '
  777. </td>
  778. <td><font style="font-size:16px; font-weight:bold;">'.$outfit['name'].' Outfits</font>&nbsp;';
  779. $main_content .='<small>('.$outfit['points'].' points)</small></td>
  780. <td valign="middle" align="center">';
  781. if(!$logged) $main_content .= '<a href="/?subtopic=accountmanagement"><input type="submit" value="Login First" class="btn disabled btn-danger" /></a>'; else
  782. $main_content .= '
  783. <form action="index.php?subtopic=shopsystem&action=select_player" method="POST">
  784. <input type="hidden" name="buy_id" value="'.$outfit['id'].'">
  785. <table border="0" cellpadding="0" cellspacing="0">
  786. <tbody>
  787. <tr>
  788. <td style="border: 0px none;">
  789. <div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
  790. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  791. <input class="ButtonText" name="Continue" alt="Continue" src="'.$layout_name.'/images/buttons/_sbutton_purchase.gif" type="image">
  792. </div>
  793. </div>
  794. </td>
  795. </tr>
  796. </tbody>
  797. </table>
  798. </form>';
  799. $main_content .= '</td></tr>';
  800. }
  801. $main_content .= '</tbody>
  802. </table>
  803. </div>
  804. </div>
  805. <div class="TableShadowContainer">
  806. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  807. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  808. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  809. </div>
  810. </div></td>
  811. </tr>
  812. </tbody>
  813. </table>
  814. </div>
  815. </td>
  816. </tr>
  817. </tbody>
  818. </table>
  819. </div><br />';
  820. }
  821. }
  822.  
  823. //show list of containers offers
  824.  
  825. if(count($offer_list['itemlogout']) > 0) {
  826. $main_content .= '
  827. <div class="TableContainer">
  828. <div class="CaptionContainer">
  829. <div class="CaptionInnerContainer">
  830. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  831. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  832. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  833. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  834. <div class="Text">Items Logout</div>
  835. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  836. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  837. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  838. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  839. </div>
  840. </div>
  841. <table class="Table3" cellpadding="0" cellspacing="0">
  842. <tbody>
  843. <tr>
  844. <td>
  845. <div class="InnerTableContainer">
  846. <table style="width:100%;">
  847. <tbody>
  848. <tr>
  849. <td>
  850. <div class="TableShadowContainerRightTop">
  851. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  852. </div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  853. <div class="TableContentContainer">
  854. <table class="TableContent" style="border:1px solid #faf0d7;" width="100%">
  855. <tbody>';
  856. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  857. $main_content.='
  858. <tr bgcolor="'.$bgcolor.'">
  859. <td valign="middle" width="10%" align="center"><b>Product</b></td>
  860. <td valign="middle" width="60%"><b>Description</b></td>
  861. <td valign="middle">&nbsp;</td>
  862. </tr>';
  863. foreach($offer_list['itemlogout'] as $itemlogout) {
  864. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  865. $main_content .= '<tr bgcolor="'.$config['site']['lightborder'].'"><td valign="middle" align="center"><img src="images/items/'.$itemlogout['id'].'.gif"></td><td><b>'.$itemlogout['name'].'</b> ('.$itemlogout['points'].' points)<br />'.$itemlogout['description'].'</td><td align="center">';
  866. if(!$logged) $main_content .= '<a href="/?subtopic=accountmanagement"><input type="submit" value="Login First" class="btn disabled btn-danger" /></a>'; else
  867. $main_content .= '
  868. <form action="index.php?subtopic=shopsystem&action=select_player" method=POST>
  869. <input type="hidden" name="buy_id" value="'.$itemlogout['id'].'">
  870. <table border="0" cellpadding="0" cellspacing="0">
  871. <tbody>
  872. <tr>
  873. <td style="border: 0px none;">
  874. <div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
  875. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  876. <input class="ButtonText" name="Continue" alt="Continue" src="'.$layout_name.'/images/buttons/_sbutton_purchase.gif" type="image">
  877. </div>
  878. </div>
  879. </td>
  880. </tr>
  881. </tbody>
  882. </table>
  883. </form>';
  884. $main_content .= '</td></tr>';
  885. }
  886. $main_content .= '</tbody>
  887. </table>
  888. </div>
  889. </div>
  890. <div class="TableShadowContainer">
  891. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  892. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  893. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  894. </div>
  895. </div>
  896. </td>
  897. </tr>
  898. </tbody>
  899. </table>
  900. </div>
  901. </td>
  902. </tr>
  903. </tbody>
  904. </table>
  905. </div><br />';}
  906. if(count($offer_list['container']) > 0) {
  907. $main_content .= '
  908. <div class="TableContainer">
  909. <div class="CaptionContainer">
  910. <div class="CaptionInnerContainer">
  911. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  912. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  913. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  914. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  915. <div class="Text">Containers Of Items</div>
  916. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  917. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  918. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  919. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  920. </div>
  921. </div>
  922. <table class="Table3" cellpadding="0" cellspacing="0">
  923. <tbody>
  924. <tr>
  925. <td>
  926. <div class="InnerTableContainer">
  927. <table style="width:100%;">
  928. <tbody>
  929. <tr>
  930. <td>
  931. <div class="TableShadowContainerRightTop">
  932. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  933. </div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  934. <div class="TableContentContainer">
  935. <table class="TableContent" style="border:1px solid #faf0d7;" width="100%">
  936. <tbody>';
  937. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  938. $main_content.='
  939. <tr bgcolor="'.$bgcolor.'">
  940. <td valign="middle" width="10%" align="center"><b>Product</b></td>
  941. <td valign="middle" width="60%"><b>Description</b></td>
  942. <td valign="middle">&nbsp;</td>
  943.  
  944. </tr>';
  945. foreach($offer_list['container'] as $container) {
  946. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  947. $main_content .= '<tr bgcolor="'.$bgcolor.'"><td valign="middle" align="center">'; if(file_exists('images/items/'.$container['item_id'].'.gif')) { $main_content .= '<img src="images/items/'.$container['item_id'].'.gif" height="32" width="32">'; } else { $main_content .= '<img src="images/monsters/nophoto.png" height="32" width="32">'; } $main_content .='</td>
  948. <td><b style="font-height: bold; font-size: 16px;">'.$container['name'].'</b> ('.$container['points'].' points)<br />'.$container['description'].'</td><td align="center">';
  949. if(!$logged) $main_content .= '<a href="/?subtopic=accountmanagement"><input type="submit" value="Login First" class="btn disabled btn-danger" /></a>'; else
  950. $main_content .= '
  951. <form action="?subtopic=shopsystem&action=select_player" method="POST">
  952. <input type="hidden" name="buy_id" value="'.$container['id'].'">
  953. <table border="0" cellpadding="0" cellspacing="0">
  954. <tbody>
  955. <tr>
  956. <td style="border: 0px none;">
  957. <div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
  958. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  959. <input class="ButtonText" name="Continue" alt="Continue" src="'.$layout_name.'/images/buttons/_sbutton_purchase.gif" type="image">
  960. </div>
  961. </div>
  962. </td>
  963. </tr>
  964. </tbody>
  965. </table>
  966. </form>';
  967. $main_content .= '</td></tr>';
  968. }
  969. $main_content .= '</tbody>
  970. </table>
  971. </div>
  972. </div>
  973. <div class="TableShadowContainer">
  974. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  975. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  976. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  977. </div>
  978. </div>
  979. </td>
  980. </tr>
  981. </tbody>
  982. </table>
  983. </div>
  984. </td>
  985. </tr>
  986. </tbody>
  987. </table>
  988. </div><br />';}
  989. if(count($offer_list['changename']) > 0 or count($offer_list['redskull']) > 0 or count($offer_list['unban']) > 0){
  990. $main_content .= '
  991. <div class="TableContainer">
  992. <div class="CaptionContainer">
  993. <div class="CaptionInnerContainer">
  994. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  995. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  996. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  997. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  998. <div class="Text">Account Additional</div>
  999. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  1000. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  1001. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  1002. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  1003. </div>
  1004. </div>
  1005. <table class="Table3" cellpadding="0" cellspacing="0">
  1006. <tbody>
  1007. <tr>
  1008. <td>
  1009. <div class="InnerTableContainer">
  1010. <table style="width:100%;">
  1011. <tbody>
  1012. <tr>
  1013. <td>
  1014. <div class="TableShadowContainerRightTop">
  1015. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  1016. </div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  1017. <div class="TableContentContainer">
  1018. <table class="TableContent" style="border:1px solid #faf0d7;" width="100%">
  1019. <tbody>';
  1020. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  1021. $main_content.='
  1022. <tr bgcolor="'.$bgcolor.'">
  1023. <td valign="middle" width="10%" align="center"><b>Product</b></td>
  1024. <td valign="middle" width="60%"><b>Description</b></td>
  1025. <td valign="middle">&nbsp;</td>
  1026. </tr>';
  1027. //Change Name
  1028. if(count($offer_list['changename']) > 0)
  1029. foreach($offer_list['changename'] as $changename) {
  1030. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  1031. $main_content .= '<tr bgcolor="'.$bgcolor.'">
  1032. <td valign="middle" align="center"><img src="images/shop/name.gif" /></td>
  1033. <td><font style="font-size:16px; font-weight:bold;">'.$changename['name'].'</font>&nbsp;';
  1034. $main_content .='<small>('.$changename['points'].' points)</small>';
  1035. $main_content .='<br />
  1036. '.$changename['description'].'</td>
  1037. <td align="center">';
  1038. if(!$logged) $main_content .= '<a href="/?subtopic=accountmanagement"><input type="submit" value="Login First" class="btn disabled btn-danger" /></a>'; else
  1039. $main_content .= '
  1040. <form action="index.php?subtopic=shopsystem&action=select_player" method="POST">
  1041. <input type="hidden" name="buy_id" value="'.$changename['id'].'">
  1042. <table border="0" cellpadding="0" cellspacing="0">
  1043. <tbody>
  1044. <tr>
  1045. <td style="border: 0px none;">
  1046. <div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
  1047. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  1048. <input class="ButtonText" name="Continue" alt="Continue" src="'.$layout_name.'/images/buttons/_sbutton_purchase.gif" type="image">
  1049. </div>
  1050. </div>
  1051. </td>
  1052. </tr>
  1053. </tbody>
  1054. </table>
  1055. </form>';}
  1056.  
  1057. //Remove Red Skull
  1058. if(count($offer_list['redskull']) > 0)
  1059. foreach($offer_list['redskull'] as $redskull) {
  1060. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  1061. $main_content .= '<tr bgcolor="'.$bgcolor.'">
  1062. <td valign="middle" align="center"><img src="images/shop/skull.gif" /></td>
  1063. <td><font style="font-size:16px; font-weight:bold;">'.$redskull['name'].'</font>&nbsp;';
  1064. $main_content .='<small>('.$redskull['points'].' points)</small>';
  1065. $main_content .='<br />'.$redskull['description'].'</td>
  1066. <td align="center">';
  1067. if(!$logged) $main_content .= '<a href="/?subtopic=accountmanagement"><input type="submit" value="Login First" class="btn disabled btn-danger" /></a>'; else
  1068. $main_content .= '
  1069. <form action="index.php?subtopic=shopsystem&action=select_player" method="POST">
  1070. <input type="hidden" name="buy_id" value="'.$redskull['id'].'">
  1071. <table border="0" cellpadding="0" cellspacing="0">
  1072. <tbody>
  1073. <tr>
  1074. <td style="border: 0px none;">
  1075. <div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
  1076. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  1077. <input class="ButtonText" name="Continue" alt="Continue" src="'.$layout_name.'/images/buttons/_sbutton_purchase.gif" type="image">
  1078. </div>
  1079. </div>
  1080. </td>
  1081. </tr>
  1082. </tbody>
  1083. </table>
  1084. </form>';
  1085. $main_content .= '</td></tr>';}
  1086. //Unban
  1087. if(count($offer_list['unban']) > 0)
  1088. foreach($offer_list['unban'] as $unban){
  1089. if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
  1090. $main_content .= '<tr bgcolor="'.$bgcolor.'">
  1091. <td valign="middle" align="center"><br /><img src="images/shop/ban.gif" height="32" width="32"/></td>
  1092. <td><font style="font-size:16px; font-weight:bold;">'.$unban['name'].'</font>&nbsp;';
  1093. $main_content .='<small>('.$unban['points'].' points)</small>';
  1094. $main_content .='<br />'.$unban['description'].'</td>
  1095. <td align="center">';
  1096. if(!$logged) $main_content .= '<a href="/?subtopic=accountmanagement"><input type="submit" value="Login First" class="btn disabled btn-danger" /></a>'; else
  1097. $main_content .= '
  1098. <form action="index.php?subtopic=shopsystem&action=select_player" method="POST">
  1099. <input type="hidden" name="buy_id" value="'.$unban['id'].'">
  1100. <table border="0" cellpadding="0" cellspacing="0">
  1101. <tbody>
  1102. <tr>
  1103. <td style="border: 0px none;">
  1104. <div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
  1105. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  1106. <input class="ButtonText" name="Continue" alt="Continue" src="'.$layout_name.'/images/buttons/_sbutton_purchase.gif" type="image">
  1107. </div>
  1108. </div>
  1109. </td>
  1110. </tr>
  1111. </tbody>
  1112. </table>
  1113. </form>';
  1114. $main_content .= '</td></tr>';}
  1115. $main_content .= '
  1116. </tbody>
  1117. </table>
  1118. </div>
  1119. </div>
  1120. <div class="TableShadowContainer">
  1121. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  1122. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  1123. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  1124. </div>
  1125. </div>
  1126. </td>
  1127. </tr>
  1128. </tbody>
  1129. </table>
  1130. </div>
  1131. </td>
  1132. </tr>
  1133. </tbody>
  1134. </table>
  1135. </div>';}}
  1136. elseif($action == 'select_player') {
  1137. unset($_SESSION['viewed_confirmation_page']);
  1138. if(!$logged) {
  1139. $main_content .= '<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="4" WIDTH="100%">
  1140. <TR BGCOLOR="'.$config['site']['vdarkborder'].'">
  1141. <TD CLASS=white><B>Shoping Error</B></TD>
  1142. </TR>
  1143. <TR BGCOLOR='.$config['site']['darkborder'].'>
  1144. <td>
  1145. <TABLE BORDER="0" CELLSPACING="1" cellpadding="4">
  1146. <TR>
  1147. <TD>Please login first.</TD>
  1148. </TR>
  1149. </TABLE>
  1150. </td>
  1151. </tr>
  1152. </TABLE>';}
  1153. else {
  1154. $buy_id = (int) $_REQUEST['buy_id'];
  1155. if(empty($buy_id)) {
  1156. $main_content .= '<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="4" WIDTH="100%">
  1157. <TR BGCOLOR="'.$config['site']['vdarkborder'].'">
  1158. <TD CLASS=white><B>Shoping Error</B></TD>
  1159. </TR>
  1160. <TR BGCOLOR='.$config['site']['darkborder'].'>
  1161. <td>
  1162. <TABLE BORDER="0" CELLSPACING="1" cellpadding="4">
  1163. <TR>
  1164. <TD>Please <a href="index.php?subtopic=shopsystem">select item</a> first.</TD>
  1165. </TR>
  1166. </TABLE>
  1167. </td>
  1168. </tr>
  1169. </TABLE>';}
  1170. else {
  1171. $buy_offer = getItemByID($buy_id);
  1172. if(isset($buy_offer['id'])) { //item exist in database
  1173. if($buy_offer['type'] != 'changename') {
  1174. if($user_premium_points >= $buy_offer['points']) {
  1175. if(empty($_REQUEST['page'])) { $color1 = 'blue'; $color2 = 'green-blue'; $color3 = 'blue'; $color4 = 'blue'; $color5 = 'blue'; }
  1176. if($_REQUEST['page'] == 'confirm') { $color1 = 'blue'; $color2 = 'green'; $color3 = 'green'; $color4 = 'green-blue'; $color5 = 'blue'; }
  1177. if($_REQUEST['page'] == 'transfer') { $color1 = 'green'; $color2 = 'green'; $color3 = 'green'; $color4 = 'green'; $color5 = 'green'; }
  1178. $main_content .= '
  1179. <div id="ProgressBar" >
  1180. <center><h2>Shop Buy Item</h2></center>
  1181. <div id="MainContainer" >
  1182. <div id="BackgroundContainer" >
  1183. <img id="BackgroundContainerLeftEnd" src="'.$layout_name.'/images/vips/stonebar-left-end.gif" />
  1184. <div id="BackgroundContainerCenter">
  1185. <div id="BackgroundContainerCenterImage" style="background-image:url('.$layout_name.'/images/vips/stonebar-center.gif);" />
  1186. </div>
  1187. </div>
  1188. <img id="BackgroundContainerRightEnd" src="'.$layout_name.'/images/vips/stonebar-right-end.gif" />
  1189. </div>
  1190. <img id="TubeLeftEnd" src="'.$layout_name.'/images/vips/progress-bar-tube-left-green.gif" />
  1191. <img id="TubeRightEnd" src="'.$layout_name.'/images/vips/progress-bar-tube-right-'.$color1.'.gif" />
  1192. <div id="FirstStep" class="Steps" >
  1193. <div class="SingleStepContainer" >
  1194. <img class="StepIcon" src="'.$layout_name.'/images/vips/progress-bar-icon-0-green.gif" />
  1195. <div class="StepText" style="font-weight:normal;" >Item Selected</div>
  1196. </div>
  1197. </div>
  1198. <div id="StepsContainer1" ><div id="StepsContainer2" ><div class="Steps" style="width:50%" >
  1199. <div class="TubeContainer" ><img class="Tube" src="'.$layout_name.'/images/vips/progress-bar-tube-'.$color2.'.gif" /></div><div class="SingleStepContainer" ><img class="StepIcon" src="'.$layout_name.'/images/vips/progress-bar-icon-3-'.$color3.'.gif" /><div class="StepText" style="font-weight:normal;" >Confirm Data</div>
  1200. </div></div><div class="Steps" style="width:50%" ><div class="TubeContainer" ><img class="Tube" src="'.$layout_name.'/images/vips/progress-bar-tube-'.$color4.'.gif" /></div><div class="SingleStepContainer" ><img class="StepIcon" src="'.$layout_name.'/images/vips/progress-bar-icon-4-'.$color5.'.gif" />
  1201. <div class="StepText" style="font-weight:normal;" >Transfer Result</div></div></div></div></div></div></div>';
  1202. $main_content .= '
  1203. <div class="TableContainer">
  1204. <div class="CaptionContainer">
  1205. <div class="CaptionInnerContainer">
  1206. <span class="CaptionEdgeLeftTop" style="background-image: url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  1207. <span class="CaptionEdgeRightTop" style="background-image: url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  1208. <span class="CaptionBorderTop" style="background-image: url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  1209. <span class="CaptionVerticalLeft" style="background-image: url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  1210. <div class="Text">Delivery Informations</div>
  1211. <span class="CaptionVerticalRight" style="background-image: url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  1212. <span class="CaptionBorderBottom" style="background-image: url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  1213. <span class="CaptionEdgeLeftBottom" style="background-image: url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  1214. <span class="CaptionEdgeRightBottom" style="background-image: url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  1215. </div>
  1216. </div>
  1217. <table class="Table3" cellpadding="0" cellspacing="0">
  1218. <tbody><tr>
  1219. <td>
  1220. <div class="InnerTableContainer">
  1221. <table style="width: 100%;"><tbody><tr><td>
  1222. <div class="InnerTableContainer">
  1223. <table>
  1224. <tbody>
  1225. <tr>
  1226. <td>
  1227. <div class="TableShadowContainerRightTop">
  1228. <div class="TableShadowRightTop" style="background-image: url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  1229. </div>
  1230. <div class="TableContentAndRightShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  1231. <div class="TableContentContainer">
  1232. <table class="TableContent" style="border: 1px solid #faf0d7;">
  1233. <tbody>
  1234. <tr style="background-color: #505050;">
  1235. </tr>
  1236. <tr class="Table" style="background-color: #d4c0a1;">
  1237. <td style="width: 800; border: 1px; border-style: solid; border-color: #FAF0D7; padding: 4px;">
  1238. <table border="0" cellpadding="4" cellspacing="1" width="100%">
  1239. <tr bgcolor="'.$config['site']['vdarkborder'].'">
  1240. <td colspan="2"><font style="font-size:16px; font-weight:bold; color: #FFFFFF;"><b>Item Informations</b></font></td>
  1241. </tr>
  1242. <tr bgcolor="#D4C0A1">
  1243. <td width="100"><b>Image:</b></td><td width="550">';
  1244. if ($buy_offer['type'] == 'pacc')
  1245. $main_content .= '<img src="images/shop/premium.gif" height="32" width="32" />';
  1246. elseif ($buy_offer['type'] == 'vipdays')
  1247. $main_content .= '<img src="images/shop/vip.gif" height="32" width="32" />';
  1248. elseif ($buy_offer['type'] == 'redskull')
  1249. $main_content .= '<img src="images/shop/skull.gif" height="32" width="32" />';
  1250. elseif ($buy_offer['type'] == 'unban')
  1251. $main_content .= '<img src="images/shop/ban.gif" height="32" width="32" />';
  1252. elseif ($buy_offer['type'] == 'item')
  1253. if(file_exists('images/items/'.$buy_offer['item_id'].'.gif')) {
  1254. $main_content .= '<img src="images/items/'.$buy_offer['item_id'].'.gif" height="32" width="32">';
  1255. } else {
  1256. $main_content .= '<img src="images/items/notfound.gif" height="32" width="32">';
  1257. }
  1258. elseif ($buy_offer['type'] == 'outfit')
  1259. if(file_exists($layout_name.'/images/outfits/'.$buy_offer['name'].'_male.gif')) {
  1260. $main_content .= '<img src="'.$layout_name.'/images/outfits/'.$buy_offer['name'].'_male.gif"">';
  1261. $main_content .= '<img src="'.$layout_name.'/images/outfits/'.$buy_offer['name'].'_female.gif"">';
  1262. } else {
  1263. $main_content .= '<img src="'.$layout_name.'/images/items/notfound.gif">';
  1264. }
  1265. elseif ($buy_offer['type'] == 'itemvip')
  1266. if(file_exists('images/items/'.$buy_offer['item_id'].'.gif')) {
  1267. $main_content .= '<img src="images/items/'.$buy_offer['item_id'].'.gif" height="32" width="32">';
  1268. } else {
  1269. $main_content .= '<img src="images/items/notfound.gif" height="32" width="32">';
  1270. }
  1271.  
  1272. $main_content .='
  1273. </td>
  1274. </tr>
  1275. <tr bgcolor="#F1E0C6"><td width="100"><b>Product:</b></td><td width="550">';
  1276.  
  1277. if ($buy_offer['type'] == 'pacc')
  1278. $main_content .= 'Premium Days';
  1279. elseif ($buy_offer['type'] == 'vipdays')
  1280. $main_content .= 'VIP Days';
  1281. elseif ($buy_offer['type'] == 'redskull')
  1282. $main_content .= 'Remove Skull';
  1283. elseif ($buy_offer['type'] == 'unban')
  1284. $main_content .= 'Unban or Remove Ban';
  1285. elseif ($buy_offer['type'] == 'item')
  1286. $main_content .= $itemList[(int)$buy_offer['item_id']];
  1287. elseif ($buy_offer['type'] == 'itemvip')
  1288. $main_content .= $itemList[(int)$buy_offer['item_id']];
  1289. elseif ($buy_offer['type'] == 'outfit')
  1290. $main_content .= $buy_offer['name'].' outfits';
  1291.  
  1292. $main_content .= '. '.$buy_offer['description'].'</td></tr>';
  1293. $main_content .='<tr bgcolor="#F1E0C6"><td width="100"><b>Cost:</b></td><td width="550"><small><b>'.$buy_offer['points'].'</b> premium points</small></td></tr>';
  1294. $main_content .='
  1295. </table>
  1296. </td>
  1297. </tr>
  1298. </tbody>
  1299. </table>
  1300. </div>
  1301. </div>
  1302. <div class="TableShadowContainer">
  1303. <div class="TableBottomShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  1304. <div class="TableBottomLeftShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  1305. <div class="TableBottomRightShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  1306. </div>
  1307. </div>
  1308. </td>
  1309. </tr>
  1310. </tbody>
  1311. </table>
  1312. </div>
  1313. <div class="InnerTableContainer">
  1314. <table>
  1315. <tbody>
  1316. <tr>
  1317. <td>
  1318. <div class="TableShadowContainerRightTop">
  1319. <div class="TableShadowRightTop" style="background-image: url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  1320. </div>
  1321. <div class="TableContentAndRightShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  1322. <div class="TableContentContainer">
  1323. <table class="TableContent" style="border: 1px solid #faf0d7;">
  1324. <tbody>
  1325. <tr style="background-color: #505050;">
  1326. </tr>
  1327. <tr class="Table" style="background-color: #d4c0a1;">
  1328. <td style="width: 800; border: 1px; border-style: solid; border-color: #FAF0D7; padding: 4px;">
  1329. <form action="index.php?subtopic=shopsystem&action=confirm_transaction" method=POST>
  1330. <input type="hidden" name="buy_id" value="'.$buy_id.'">
  1331. <table border="0" cellpadding="4" cellspacing="1" width="100%">
  1332. <tr bgcolor="'.$config['site']['vdarkborder'].'">
  1333. <td colspan="2"><font style="font-size:16px; font-weight:bold; color: #FFFFFF;"><b>Select one Player</b></font></td>
  1334. </tr>
  1335. <tr bgcolor="#D4C0A1"><td width="110"><b>Name:</b>&nbsp;&nbsp;<select name="buy_name" style="padding: 5px;">';
  1336. $players_from_logged_acc = $account_logged->getPlayersList();
  1337. if(count($players_from_logged_acc) > 0) {
  1338. foreach($players_from_logged_acc as $player)
  1339. $main_content .= '<option>'.$player->getName().'</option>';
  1340. } else {
  1341. $main_content .= 'You don\'t have any character on your account.';
  1342. }
  1343. $main_content .= '</select>&nbsp;<input type="submit" class="btn btn-success" style="margin-top: -2.5px;" value="Purchase"><br /><small>Character <b> your account </b> you will receive.</small></td></tr></table>
  1344. </form>
  1345. </td>
  1346. </tr>
  1347. </tbody>
  1348. </table>
  1349. </div>
  1350. </div>
  1351. <div class="TableShadowContainer">
  1352. <div class="TableBottomShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  1353. <div class="TableBottomLeftShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  1354. <div class="TableBottomRightShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  1355. </div>
  1356. </div>
  1357. </td>
  1358. </tr>
  1359. </tbody>
  1360. </table>
  1361. </div>
  1362. <div class="InnerTableContainer">
  1363. <table>
  1364. <tbody>
  1365. <tr>
  1366. <td>
  1367. <div class="TableShadowContainerRightTop">
  1368. <div class="TableShadowRightTop" style="background-image: url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  1369. </div>
  1370. <div class="TableContentAndRightShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  1371. <div class="TableContentContainer">
  1372. <table class="TableContent" style="border: 1px solid #faf0d7;">
  1373. <tbody>
  1374. <tr style="background-color: #505050;">
  1375. </tr>
  1376. <tr class="Table" style="background-color: #d4c0a1;">
  1377. <td style="width: 800; border: 1px; border-style: solid; border-color: #FAF0D7; padding: 4px;">
  1378. <form action="index.php?subtopic=shopsystem&action=confirm_transaction" method="POST"><input type="hidden" name="buy_id" value="'.$buy_id.'">
  1379. <table border="0" cellpadding="4" cellspacing="1" width="100%">
  1380. <tr bgcolor="'.$config['site']['vdarkborder'].'">
  1381. <td colspan="2"><font style="font-size:16px; font-weight:bold; color: #FFFFFF;"><b>Send Gift</b></font></td>
  1382. </tr>
  1383. <tr bgcolor="#D4C0A1"><td width="110"><b>To player:</b>&nbsp;&nbsp;<input type="text" name="buy_name" autocomplete="off" placeholder="Character&nbsp;to&nbsp;recive&nbsp;'.$buy_offer['name'].'" size="25">&nbsp;<input type="submit" value="Purchase to friend" class="btn btn-success" style="margin-top: -2.5px;"><br /><small>Put in the field above the name of the character that will receive the item.</small></td></tr>
  1384. </table>
  1385. </form>
  1386. </td>
  1387. </tr>
  1388. </tbody>
  1389. </table>
  1390. </div>
  1391. </div>
  1392. <div class="TableShadowContainer">
  1393. <div class="TableBottomShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  1394. <div class="TableBottomLeftShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  1395. <div class="TableBottomRightShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  1396. </div>
  1397. </div>
  1398. </td>
  1399. </tr>
  1400. </tbody>
  1401. </table>
  1402. </div>
  1403. </td>
  1404. </tr>
  1405. </tbody>
  1406. </table>
  1407. </div>
  1408. </td>
  1409. </tr>
  1410. </tbody>
  1411. </table>
  1412. </div>';
  1413. } else {
  1414. $main_content .= '
  1415. <TABLE BORDER="0" CELLSPACING="1" CELLPADDING="4" WIDTH="100%">
  1416. <TR BGCOLOR="'.$config['site']['vdarkborder'].'">
  1417. <TD CLASS="white"><b>Erro</b></td>
  1418. </TR>
  1419. <TR BGCOLOR='.$config['site']['darkborder'].'><TD>To buy <b>'.$buy_offer['name'].'</b> you need <b>'.$buy_offer['points'].' premium points</b>.<br />Your balance is currently <b>'.$user_premium_points.'</b> premium points.</TD>
  1420. </TR>
  1421. </TABLE>
  1422. <br />
  1423. <table width="100%">
  1424. <tbody>
  1425. <tr align="center">
  1426. <td>
  1427. <table border="0" cellpadding="0" cellspacing="0">
  1428. <tbody><tr><td style="border: 0px none;">
  1429. <a href="javascript:void();" onclick=location.href="index.php?subtopic=buypt">
  1430. <div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
  1431. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  1432. <div class="ButtonText" style="background-image:url('.$layout_name.'/images/buttons/_sbutton_buypoints.png);"></div>
  1433. </div>
  1434. </div>
  1435. </a>
  1436. </td>
  1437. </tr>
  1438. <tr>
  1439. </tr>
  1440. </tbody>
  1441. </table>
  1442. </td>
  1443. <td>
  1444. <table border="0" cellpadding="0" cellspacing="0">
  1445. <tbody>
  1446. <tr>
  1447. <td style="border: 0px none;">
  1448. <a href="javascript:void();" onclick=location.href="index.php?subtopic=shopsystem"><div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
  1449. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif); visibility: hidden;"></div>
  1450. <input class="ButtonText" name="Back" alt="Back" src="'.$layout_name.'/images/vips/_sbutton_back.gif" type="image">
  1451. </table>
  1452. </td>
  1453. </tr>
  1454. </tbody>
  1455. </table>
  1456. <p>&nbsp;</p>';}
  1457. } else {
  1458. $main_content .= '<script type="text/javascript">
  1459.  
  1460. var accountHttp;
  1461.  
  1462. //sprawdza czy dane konto istnieje czy nie
  1463. function checkAccount()
  1464. {
  1465. if(document.getElementById("account_name").value=="")
  1466. {
  1467. document.getElementById("acc_name_check").innerHTML = \'<img src="images/nok.gif" />\';
  1468. return;
  1469. }
  1470. accountHttp=GetXmlHttpObject();
  1471. if (accountHttp==null)
  1472. {
  1473. return;
  1474. }
  1475. var account = document.getElementById("account_name").value;
  1476. var url="ajax/check_account.php?account=" + account + "&uid="+Math.random();
  1477. accountHttp.onreadystatechange=AccountStateChanged;
  1478. accountHttp.open("GET",url,true);
  1479. accountHttp.send(null);
  1480. }
  1481.  
  1482. function AccountStateChanged()
  1483. {
  1484. if (accountHttp.readyState==4)
  1485. {
  1486. document.getElementById("acc_name_check").innerHTML=accountHttp.responseText;
  1487. }
  1488. }
  1489.  
  1490. var emailHttp;
  1491.  
  1492. //sprawdza czy dane konto istnieje czy nie
  1493. function checkEmail()
  1494. {
  1495. if(document.getElementById("email").value=="")
  1496. {
  1497. document.getElementById("email_check").innerHTML = \'<img src="images/nok.gif" />\';
  1498. return;
  1499. }
  1500. emailHttp=GetXmlHttpObject();
  1501. if (emailHttp==null)
  1502. {
  1503. return;
  1504. }
  1505. var email = document.getElementById("email").value;
  1506. var url="ajax/check_email.php?email=" + email + "&uid="+Math.random();
  1507. emailHttp.onreadystatechange=EmailStateChanged;
  1508. emailHttp.open("GET",url,true);
  1509. emailHttp.send(null);
  1510. }
  1511.  
  1512. function checkName()
  1513. {
  1514. if(document.getElementById("newcharname").value=="")
  1515. {
  1516. document.getElementById("name_check").innerHTML = \'<b><font color="red">Please enter new character name.</font></b>\';
  1517. return;
  1518. }
  1519. nameHttp=GetXmlHttpObject();
  1520. if (nameHttp==null)
  1521. {
  1522. return;
  1523. }
  1524. var newcharname = document.getElementById("newcharname").value;
  1525. var url="?subtopic=ajax_check_name&name=" + newcharname + "&uid="+Math.random();
  1526. nameHttp.onreadystatechange=NameStateChanged;
  1527. nameHttp.open("GET",url,true);
  1528. nameHttp.send(null);
  1529. }
  1530.  
  1531. function EmailStateChanged()
  1532. {
  1533. if (emailHttp.readyState==4)
  1534. {
  1535. document.getElementById("email_check").innerHTML=emailHttp.responseText;
  1536. }
  1537. }
  1538.  
  1539. function validate_required(field,alerttxt)
  1540. {
  1541. with (field)
  1542. {
  1543. if (value==null||value==""||value==" ")
  1544. {alert(alerttxt);return false;}
  1545. else {return true}
  1546. }
  1547. }
  1548.  
  1549. function validate_email(field,alerttxt)
  1550. {
  1551. with (field)
  1552. {
  1553. apos=value.indexOf("@");
  1554. dotpos=value.lastIndexOf(".");
  1555. if (apos<1||dotpos-apos<2)
  1556. {alert(alerttxt);return false;}
  1557. else {return true;}
  1558. }
  1559. }
  1560.  
  1561. function validate_form(thisform)
  1562. {
  1563. with (thisform)
  1564. {
  1565. if (validate_required(buy_from,"Please enter a new name of your character!")==false)
  1566. {buy_from.focus();return false;}
  1567. if (validate_required(email,"Please enter your e-mail!")==false)
  1568. {email.focus();return false;}
  1569. if (validate_email(email,"Invalid e-mail format!")==false)
  1570. {email.focus();return false;}
  1571. if (verifpass==1) {
  1572. if (validate_required(passor,"Please enter password!")==false)
  1573. {passor.focus();return false;}
  1574. if (validate_required(passor2,"Please repeat password!")==false)
  1575. {passor2.focus();return false;}
  1576. if (passor2.value!=passor.value)
  1577. {alert(\'Repeated password is not equal to password!\');return false;}
  1578. }
  1579. if(rules.checked==false)
  1580. {alert(\'To create account you must accept server rules!\');return false;}
  1581. }
  1582. }
  1583. </script>';
  1584. $main_content .= '
  1585. <form action="index.php?subtopic=shopsystem&action=confirm_transaction" method="post" onsubmit="return validate_form(this)">
  1586. <input type="hidden" name="buy_id" value="'.$buy_id.'">
  1587. <div class="TableContainer">
  1588. <div class="CaptionContainer">
  1589. <div class="CaptionInnerContainer">
  1590. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  1591. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  1592. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  1593. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  1594. <div class="Text">Change Name</div>
  1595. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  1596. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  1597. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  1598. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  1599. </div>
  1600. </div>
  1601. <table class="Table3" cellpadding="0" cellspacing="0">
  1602. <tbody>
  1603. <tr>
  1604. <td>
  1605. <div class="InnerTableContainer">
  1606. <table style="width:100%;">
  1607. <tbody>
  1608. <tr>
  1609. <td>
  1610. <div class="TableShadowContainerRightTop" >
  1611. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rt.gif);" ></div>
  1612. </div>
  1613. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rm.gif);" >
  1614. <div class="TableContentContainer" >
  1615. <table border="0" cellpadding="4" cellspacing="1" width="100%">
  1616. <tr bgcolor="#505050">
  1617. <td colspan="2"><b class="white">You must be offline to change the name.</b></td>
  1618. </tr>
  1619. <tr bgcolor="#D4C0A1">
  1620. <td width="110"><b>Name:</b></td>
  1621. <td width="550">
  1622. <select style="padding: 5px;" name="buy_name">';
  1623. $players_from_logged_acc = $account_logged->getPlayersList();
  1624. if(count($players_from_logged_acc) > 0) {
  1625. foreach($players_from_logged_acc as $player) {
  1626. $main_content .= '<option>'.$player->getName().'</option>';}
  1627. } else {
  1628. $main_content .= 'You don\'t have any character on your account.';}
  1629. $main_content .= '</select>
  1630. </td>
  1631. </tr>
  1632. <tr bgcolor="#F1E0C6">
  1633. <td width="110"><b>New name:</b></td>
  1634. <td width="550"><input type="text" name="buy_from" id="buy_from" style="padding: 5px;" />&nbsp;';
  1635. if ($account_logged->getCustomField("premium_points") <= $buy_offer['points']){$main_content .='<input type="submit" value="New Name" class="btn disabled btn-danger" disabled />';} else {$main_content .='<input type="submit" value="New Name" class="btn btn-success"/>';}
  1636. $main_content .=' &nbsp;&nbsp;&nbsp;&nbsp;<form action="index.php?subtopic=shopsystem" method="post"><input type="submit" value="Back to Shop" class="btn btn-primary" /></form></td>
  1637. </tr>
  1638. </table>
  1639. </div>
  1640. </div>
  1641. <div class="TableShadowContainer" >
  1642. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bm.gif);" >
  1643. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bl.gif);" ></div>
  1644. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-br.gif);" ></div>
  1645. </div>
  1646. </div>
  1647. </td>
  1648. </tr>
  1649. </div>
  1650. </td>
  1651. </tr>
  1652. </tbody>
  1653. </table>
  1654. </div>
  1655. </td>
  1656. </tr>
  1657. </tbody>
  1658. </table>
  1659. </div>
  1660. </form>';}
  1661. } else {
  1662. $main_content .= '<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="5" WIDTH="100%">
  1663. <tr BGCOLOR="'.$config['site']['vdarkborder'].'">
  1664. <td CLASS="white"><b>Error</b></td>
  1665. </tr>
  1666. <tr BGCOLOR='.$config['site']['darkborder'].'>
  1667. <td>Offer with ID <b>'.$buy_id.'</b> doesn\'t exist. Please <a href="index.php?subtopic=shopsystem">select item</a> again.</td>
  1668. </tr>
  1669. </TABLE>';}
  1670. }}}
  1671. elseif($action == 'confirm_transaction') {
  1672. if(!$logged) {
  1673. $main_content .= '<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="4" WIDTH="100%">
  1674. <TR BGCOLOR="'.$config['site']['vdarkborder'].'">
  1675. <TD CLASS=white><B>Shoping Error</B></TD>
  1676. </TR>
  1677. <TR BGCOLOR='.$config['site']['darkborder'].'>
  1678. <td>
  1679. <TABLE BORDER="0" CELLSPACING="1" cellpadding="4">
  1680. <TR>
  1681. <TD>Please login first.</TD>
  1682. </TR>
  1683. </TABLE>
  1684. </td>
  1685. </tr>
  1686. </TABLE>';}
  1687. else {
  1688. $buy_id = (int) $_POST['buy_id'];
  1689. $buy_name = stripslashes(urldecode($_POST['buy_name']));
  1690. $buy_from = stripslashes(urldecode($_POST['buy_from']));
  1691. if(empty($buy_id)) {
  1692. $main_content .= 'Please <a href="index.php?subtopic=shopsystem">select item</a> first.';
  1693. } else {
  1694. if($buy_offer['type'] == 'changename'){
  1695. if(!check_name_new_char($buy_from)) {
  1696. $main_content .= 'Invalid name format of new name.';
  1697. }}
  1698. else {
  1699. $buy_offer = getItemByID($buy_id);
  1700. $check_name_in_database = new Player();
  1701. $check_name_in_database->find($buy_from);
  1702. if($buy_offer['type'] == 'changename'){
  1703. if(!$check_name_in_database->isLoaded()) {
  1704. }}
  1705. if(isset($buy_offer['id'])) { //item exist in database
  1706. if($user_premium_points >= $buy_offer['points']) {
  1707. if(check_name($buy_name)) {
  1708. $buy_player = new Player();
  1709. $buy_player->find($buy_name);
  1710. if($buy_player->isLoaded()) {
  1711. $buy_player_account = $buy_player->getAccount();
  1712. if($_SESSION['viewed_confirmation_page'] == 'yes' && $_POST['buy_confirmed'] == 'yes') {
  1713. if($buy_offer['type'] == 'pacc') {
  1714. $player_premdays = $buy_player_account->getCustomField('premdays');
  1715. $player_lastlogin = $buy_player_account->getCustomField('lastday');
  1716. $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_pacc').' (id, to_name, to_account, from_nick, from_account, price, pacc_days, trans_state, trans_start, trans_real) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['days']).', \'realized\', '.$SQL->quote(time()).', '.$SQL->quote(time()).');';
  1717. $SQL->query($save_transaction);
  1718. $nomedoComprador = $buy_player_account->getName();
  1719. if($player_premdays > 0){
  1720. $newVipDays = $player_premdays + ($buy_offer['days']);
  1721. $merda = $SQL->query("UPDATE `accounts` SET `premdays` = '$newVipDays' WHERE `name` = '$nomedoComprador'");
  1722. }else{
  1723. $newVipDays2 = ($buy_offer['days']);
  1724. $merda = $SQL->query("UPDATE `accounts` SET `premdays` = '$newVipDays2' WHERE `name` = '$nomedoComprador'");
  1725. }
  1726. $nomedoCara = $account_logged->getName();
  1727. $anyThing = $user_premium_points-$buy_offer['points'];
  1728. $SQL->query("UPDATE `accounts` SET `premium_points` = '$anyThing' WHERE `name` = '$nomedoCara'");
  1729. $user_premium_points = $user_premium_points - $buy_offer['points'];
  1730. if ($player_vip_days >= 1) {
  1731. }
  1732. $main_content .= '<center><h2>Premium Days added!</h2><b>'.$buy_offer['days'].' days</b> of VIP days added to the account of player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><br /><a href="index.php?subtopic=shopsystem">Go to Shop Site</a><br />';}
  1733. elseif($buy_offer['type'] == 'unban'){
  1734. $my_acc_id = $account_logged->getCustomField('id');
  1735. $datadata = $SQL->query('SELECT * FROM '.$SQL->tableName('bans').' WHERE value = '.$my_acc_id.';')->fetch();
  1736. if($datadata['value'] == $my_acc_id) {
  1737. if($SQL->query('DELETE FROM bans WHERE value= '.$my_acc_id.' LIMIT 1;')) {
  1738. } else {
  1739. $SQL->query('DELETE FROM bans WHERE account= '.$my_acc_id.' LIMIT 1;');
  1740. }
  1741. $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
  1742. $user_premium_points = $user_premium_points - $buy_offer['points'];
  1743. $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' (id, to_name, to_account, from_nick, from_account, price, offer_id, offer_desc, trans_state, trans_start, trans_real) VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', \'0003\', \'\', \'wait\', '.$SQL->quote(time()).', \'0\');';
  1744. $SQL->query($save_transaction);
  1745. $main_content .= '<center><h2>Ban Deleted!</h2><b>Your account has been unbanned for '.$buy_offer['points'].' premium points</b> from your account.
  1746. <br>Now you have <b>'.$user_premium_points.' premium points</b>.<br><br><a href="index.php?subtopic=shopsystem">Go to Shop Site</a><br>';
  1747. } else {
  1748. $main_content .= '<center><b>You don\'t have any bans in your account!</b><br><br><a href="index.php?subtopic=shopsystem">Go back</a><br>';
  1749. }
  1750. }
  1751.  
  1752. elseif($buy_offer['type'] == 'storage') {
  1753. $datadata = $SQL->query("SELECT * FROM `player_storage` WHERE `player_id` = ".$buy_player->getCustomField('id')." AND `key` = '".$buy_offer['item_id']."'")->fetch();
  1754. $player = $SQL->query("SELECT * FROM `players` WHERE `id` = ".$buy_player->getCustomField('id')."")->fetch();
  1755. if($datadata['key'] == $buy_offer['item_id']) {
  1756. $main_content .='
  1757. <table cellspacing="1" cellpadding="4" width="100%">
  1758. <tr bgcolor="#505050">
  1759. <td colspan="4" class="white"><b>Shop Message</b></td>
  1760. </tr>
  1761. <TR BGCOLOR='.$config['site']['darkborder'].'><TD align="center"><i>Your character already has this storage, please select another storage or another character to continue with the purchase.</i></TD></TR>
  1762. </TABLE>
  1763. <br />
  1764. <br />
  1765. ';
  1766. }
  1767. else
  1768. {
  1769. if ($player['online'] == 0){
  1770. $SQL->query("INSERT INTO `player_storage` (`player_id` ,`key` ,`value`)
  1771. VALUES ('".$buy_player->getCustomField('id')."', '".$buy_offer['item_id']."', '1');");
  1772. $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
  1773. $user_premium_points = $user_premium_points - $buy_offer['points'];
  1774. $main_content .= '<center><h2>Storage enviada!</h2><b>Voc&ecirc recebeu sua storage por '.$buy_offer['points'].' pontos</b> da sua account.
  1775. <br>Agora voc&ecirc possui <b>'.$user_premium_points.' pontos</b>.<br /><br />';
  1776. }
  1777. }
  1778. if ($player['online'] == 1){
  1779. $main_content .='
  1780. <table cellspacing="1" cellpadding="4" width="100%">
  1781. <tr bgcolor="#505050">
  1782. <td colspan="4" class="white"><b>Shop Message</b></td>
  1783. </tr>
  1784. <TR BGCOLOR='.$config['site']['darkborder'].'><TD align="center">
  1785. <i>
  1786. Your character is online at this time, so that the system can properly credit the storage, we require that you log out your character before buying any other type of storage.
  1787. </i>
  1788. </TD></TR>
  1789. </TABLE>
  1790. <br />
  1791. <br />
  1792. ';
  1793. }
  1794. $main_content .='
  1795. <center>
  1796. <table border="0" cellpadding="0" cellspacing="0">
  1797. <tbody>
  1798. <tr>
  1799. <td style="border: 0px none;">
  1800. <div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
  1801. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  1802. <form action="index.php?subtopic=shopsystem" method="post">
  1803. <input class="ButtonText" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" type="image">
  1804. </form>
  1805. </div>
  1806. </div>
  1807. </td>
  1808. </tr>
  1809. </tbody>
  1810. </table>
  1811. </center>
  1812. ';
  1813. }
  1814. ////////////////////////////////
  1815. elseif($buy_offer['type'] == 'itemlogout') {
  1816. $my_acc_id = $buy_player->getCustomField('id');
  1817. $playerinfo = $SQL->query('SELECT * FROM '.$SQL->tableName('players').' WHERE id = '.$my_acc_id.';')->fetch();
  1818. $playerslot = $SQL->query('SELECT * FROM '.$SQL->tableName('player_items').' WHERE player_id = '.$my_acc_id.';')->fetch();
  1819. if ($playerinfo['online'] == '0') {
  1820. if ($playerslot['pid'] != '10') {
  1821. if ($datadata['cap'] >= $SQL->quote($buy_offer['free_cap'])) {
  1822. $SQL->query('INSERT INTO player_items (player_id, pid, itemtype, count) VALUES ('.$my_acc_id.', '.$SQL->quote($buy_offer['pid']).', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['count1']).');');
  1823. $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
  1824. $user_premium_points = $user_premium_points - $buy_offer['points'];
  1825. $main_content .= '<h2>Item received to player: '.$buy_player->getName().'!</h2><br />Now you have <b>'.$user_premium_points.' premium points</b>.
  1826. <br /><a href="index.php?subtopic=shopsystem">Go to Shop Site</a>';
  1827. } else {
  1828. $main_content .= '<b>You need '.$SQL->quote($buy_offer['free_cap']).' or more of cap!</b><br /><a href="index.php?subtopic=shopsystem">Go back</a>';
  1829. }} else {
  1830. $main_content .= '<b>Please leave the arrow slot in blank to receive item!</b><br /><a href="index.php?subtopic=shopsystem">Go back</a>';
  1831. }} else {
  1832. $main_content .= '<b>You need to be offline!</b><br /><a href="index.php?subtopic=shopsystem">Go back</a>';
  1833. }
  1834. }
  1835. ////////////////////////////////
  1836.  
  1837. elseif($buy_offer['type'] == 'changename') {
  1838.  
  1839. $charID = $buy_player->getCustomField('id');
  1840. $newchar_errors = array();
  1841. $newchar_name = ucwords(strtolower(trim($buy_from)));
  1842. if(empty($newchar_name))
  1843. $newchar_errors[] = 'Please enter a new name for your character!';
  1844. if(!check_name_new_char($newchar_name))
  1845. $newchar_errors[] = 'This name contains invalid letters, words or format. Please use only a-Z, - , \' and space.';
  1846. $check_name_in_database = new Player();
  1847. $check_name_in_database->find($newchar_name);
  1848. if($check_name_in_database->isLoaded())
  1849. $newchar_errors[] = 'This name is already used. Please choose another name!';
  1850.  
  1851. $charToEdit = new Player($charID);
  1852. if(!$charToEdit->isLoaded())
  1853. $newchar_errors[] = 'This player does not exist.';
  1854. if($charToEdit->isOnline())
  1855. $newchar_errors[] = 'This player is ONLINE. Logout first.';
  1856. elseif($account_logged->getID() != $charToEdit->getAccountID())
  1857. $newchar_errors[] = 'This player is not on your account.';
  1858.  
  1859. if(empty($newchar_errors))
  1860. {
  1861. $main_content .= '<center>Name of character <b>' . htmlspecialchars($charToEdit->getName()) . '</b> changed to <b>' . htmlspecialchars($newchar_name) . '</b></center><br><br>';
  1862. $charToEdit->setName($newchar_name);
  1863. $charToEdit->save();
  1864. $account_logged->setCustomField('premium_points', $account_logged->getCustomField('premium_points') - $buy_offer['points']);
  1865. $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' (id, to_name, to_account, from_nick, from_account, price, offer_id, offer_desc, trans_state, trans_start, trans_real) VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', \'0001\', \'\', \'wait\', '.$SQL->quote(time()).', \'0\');';
  1866. $SQL->query($save_transaction);
  1867. }
  1868. else
  1869. {
  1870. $main_content .= 'Some errors occured:<br />';
  1871. foreach($newchar_errors as $e)
  1872. {
  1873. $main_content .= '<li>' . $e . '</li>';
  1874. }
  1875. $main_content .= '<br /><a href="index.php?subtopic=shopsystem">Go back</a>';
  1876. }
  1877. }
  1878.  
  1879. ////////////////////////////////
  1880. elseif($buy_offer['type'] == 'redskull') {
  1881.  
  1882. $my_acc_id = $buy_player->getCustomField('id');
  1883.  
  1884. $playerinfo = $SQL->query('SELECT * FROM '.$SQL->tableName('players').' WHERE '.$SQL->fieldName('id').' = '.$my_acc_id.';')->fetch();
  1885.  
  1886. if($playerinfo['skull'] == '4' AND $playerinfo['online'] >= '0' AND $playerinfo['skulltime'] > '0') {
  1887. $SQL->query('UPDATE killers SET unjustified=0 WHERE id IN (SELECT kill_id FROM player_killers WHERE player_id='. $my_acc_id .');');
  1888.  
  1889. $SQL->query('UPDATE players SET skulltime=0, skull=0 WHERE id='. $my_acc_id .';');
  1890. $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
  1891. $user_premium_points = $user_premium_points - $buy_offer['points'];
  1892.  
  1893. $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' (id, to_name, to_account, from_nick, from_account, price, offer_id, offer_desc, trans_state, trans_start, trans_real) VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', \'0002\', \'\', \'wait\', '.$SQL->quote(time()).', \'0\');';
  1894. $SQL->query($save_transaction);
  1895.  
  1896. $main_content .= '<center><h2>RedSkull Removed!</h2><br /><b>Your redskull has been removed from the player '.$buy_player->getName().'.</b>
  1897. <br />Now you have<b> '.$user_premium_points.' premium points</b>.<br /><br /><a href="index.php?subtopic=shopsystem">Go to Shop Site</a><br />';
  1898. } else {
  1899. $main_content .= '<center><b>'.$buy_player->getName().' has to be offline or have redskull to complete transaction!.</b><br /><br /><a href="index.php?subtopic=shopsystem">Go back</a><br />';
  1900. }}
  1901.  
  1902. //////////////////////////
  1903. elseif($buy_offer['type'] == 'item') {
  1904. $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' (id, name, type, action, param1, param2, param3, param4, param5, param6, param7, delete_it) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', \'login\', \'give_item\', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['item_count']).', \'\', \'\', \'item\', '.$SQL->quote($buy_offer['name']).', \'\', \'1\');';
  1905. $SQL->query($sql);
  1906.  
  1907. $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' (id, to_name, to_account, from_nick, from_account, price, offer_id, offer_desc, trans_state, trans_start, trans_real) VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['item_id']).', \'\', \'wait\', '.$SQL->quote(time()).', \'0\');';
  1908. $SQL->query($save_transaction);
  1909.  
  1910. $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
  1911. $user_premium_points = $user_premium_points - $buy_offer['points'];
  1912. $color1 = 'green'; $color2 = 'green'; $color3 = 'green'; $color4 = 'green'; $color5 = 'green';
  1913. $main_content .= '
  1914. <div id="ProgressBar" >
  1915. <center><h2>Character World Transfer</h2></center>
  1916. <div id="MainContainer" >
  1917. <div id="BackgroundContainer" >
  1918. <img id="BackgroundContainerLeftEnd" src="'.$layout_name.'/images/vips/stonebar-left-end.gif" />
  1919. <div id="BackgroundContainerCenter">
  1920. <div id="BackgroundContainerCenterImage" style="background-image:url('.$layout_name.'/images/vips/stonebar-center.gif);" />
  1921. </div>
  1922. </div>
  1923. <img id="BackgroundContainerRightEnd" src="'.$layout_name.'/images/vips/stonebar-right-end.gif" />
  1924. </div>
  1925. <img id="TubeLeftEnd" src="'.$layout_name.'/images/vips/progress-bar-tube-left-green.gif" />
  1926. <img id="TubeRightEnd" src="'.$layout_name.'/images/vips/progress-bar-tube-right-'.$color1.'.gif" />
  1927. <div id="FirstStep" class="Steps" >
  1928. <div class="SingleStepContainer" >
  1929. <img class="StepIcon" src="'.$layout_name.'/images/vips/progress-bar-icon-0-green.gif" />
  1930. <div class="StepText" style="font-weight:normal;" >Item Selected</div>
  1931. </div>
  1932. </div>
  1933. <div id="StepsContainer1" ><div id="StepsContainer2" ><div class="Steps" style="width:50%" >
  1934. <div class="TubeContainer" ><img class="Tube" src="'.$layout_name.'/images/vips/progress-bar-tube-'.$color2.'.gif" /></div><div class="SingleStepContainer" ><img class="StepIcon" src="'.$layout_name.'/images/vips/progress-bar-icon-3-'.$color3.'.gif" /><div class="StepText" style="font-weight:normal;" >Confirm Data</div>
  1935. </div></div><div class="Steps" style="width:50%" ><div class="TubeContainer" ><img class="Tube" src="'.$layout_name.'/images/vips/progress-bar-tube-'.$color4.'.gif" /></div><div class="SingleStepContainer" ><img class="StepIcon" src="'.$layout_name.'/images/vips/progress-bar-icon-4-'.$color5.'.gif" />
  1936. <div class="StepText" style="font-weight:normal;" >Transfer Result</div></div></div></div></div></div></div>';
  1937. $main_content .= '<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="4" WIDTH="100%">
  1938. <TR BGCOLOR="'.$config['site']['vdarkborder'].'">
  1939. <TD CLASS="white"><b>Item added successfully !</b></td>
  1940. </TR>
  1941. <TR BGCOLOR='.$config['site']['darkborder'].'>
  1942. <TD>
  1943. Item was sent to the player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />
  1944. Now you have <b>'.$user_premium_points.' premium points</b>.
  1945. </TD>
  1946. </TR>
  1947. </TABLE>
  1948. <br /><form action="index.php?subtopic=shopsystem" method="post"><input type="submit" value="Back to Shop" class="btn btn-primary" /></form><br /><br />';}
  1949.  
  1950. //////////////////////////
  1951.  
  1952. elseif($buy_offer['type'] == 'outfit') {
  1953.  
  1954. $my_acc_id = $buy_player->getCustomField('id');
  1955. $playerinfo = $SQL->query('SELECT * FROM '.$SQL->tableName('players').' WHERE '.$SQL->fieldName('id').' = '.$my_acc_id.';')->fetch();
  1956.  
  1957. if ($playerinfo['online'] >= '0') {
  1958.  
  1959. $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' (id, name, type, action, param1, param2, param3, param4, param5, param6, param7, delete_it) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', \'login\', \'give_outfit\', \'\', \'\', '.$SQL->quote($buy_offer['name']).', \'\', \'outfit\', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote($buy_offer['points']).', \'1\');';
  1960. $SQL->query($sql);
  1961.  
  1962. $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' (id, to_name, to_account, from_nick, from_account, price, offer_id, offer_desc, trans_state, trans_start, trans_real) VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', \'0004\', '.$SQL->quote($buy_offer['name']).', \'wait\', '.$SQL->quote(time()).', \'0\');';
  1963. $SQL->query($save_transaction);
  1964.  
  1965. $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
  1966. $user_premium_points = $user_premium_points - $buy_offer['points'];
  1967.  
  1968. $color1 = 'green'; $color2 = 'green'; $color3 = 'green'; $color4 = 'green'; $color5 = 'green';
  1969.  
  1970. $main_content .= '
  1971. <div id="ProgressBar" >
  1972. <center><h2>Character World Transfer</h2></center>
  1973. <div id="MainContainer" >
  1974. <div id="BackgroundContainer" >
  1975. <img id="BackgroundContainerLeftEnd" src="'.$layout_name.'/images/vips/stonebar-left-end.gif" />
  1976. <div id="BackgroundContainerCenter">
  1977. <div id="BackgroundContainerCenterImage" style="background-image:url('.$layout_name.'/images/vips/stonebar-center.gif);" />
  1978. </div>
  1979. </div>
  1980. <img id="BackgroundContainerRightEnd" src="'.$layout_name.'/images/vips/stonebar-right-end.gif" />
  1981. </div>
  1982. <img id="TubeLeftEnd" src="'.$layout_name.'/images/vips/progress-bar-tube-left-green.gif" />
  1983. <img id="TubeRightEnd" src="'.$layout_name.'/images/vips/progress-bar-tube-right-'.$color1.'.gif" />
  1984. <div id="FirstStep" class="Steps" >
  1985. <div class="SingleStepContainer" >
  1986. <img class="StepIcon" src="'.$layout_name.'/images/vips/progress-bar-icon-0-green.gif" />
  1987. <div class="StepText" style="font-weight:normal;" >Item Selected</div>
  1988. </div>
  1989. </div>
  1990. <div id="StepsContainer1" ><div id="StepsContainer2" ><div class="Steps" style="width:50%" >
  1991. <div class="TubeContainer" ><img class="Tube" src="'.$layout_name.'/images/vips/progress-bar-tube-'.$color2.'.gif" /></div><div class="SingleStepContainer" ><img class="StepIcon" src="'.$layout_name.'/images/vips/progress-bar-icon-3-'.$color3.'.gif" /><div class="StepText" style="font-weight:normal;" >Confirm Data</div>
  1992. </div></div><div class="Steps" style="width:50%" ><div class="TubeContainer" ><img class="Tube" src="'.$layout_name.'/images/vips/progress-bar-tube-'.$color4.'.gif" /></div><div class="SingleStepContainer" ><img class="StepIcon" src="'.$layout_name.'/images/vips/progress-bar-icon-4-'.$color5.'.gif" />
  1993. <div class="StepText" style="font-weight:normal;" >Transfer Result</div></div></div></div></div></div></div>';
  1994. $main_content .= '<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="4" WIDTH="100%">
  1995. <TR BGCOLOR="'.$config['site']['vdarkborder'].'">
  1996. <TD CLASS="white"><b>Outfit added successfully!</b></td>
  1997. </TR>
  1998. <TR BGCOLOR='.$config['site']['darkborder'].'>
  1999. <TD>
  2000. The <b>'.$buy_offer['name'].'</b> outfits was sent to the player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />
  2001. Now you have <b>'.$user_premium_points.' premium points</b>.
  2002. </TD>
  2003. </TR>
  2004. </TABLE>
  2005. <br /><form action="index.php?subtopic=shopsystem" method="post"><input type="submit" value="Back to Shop" class="btn btn-primary" /></form><br /><br />';}
  2006. } else {
  2007. $main_content .= '<center><a href="index.php?subtopic=shopsystem">Go back</a></center><br />';
  2008. }
  2009. //////////////////////////////
  2010. if($buy_offer['type'] == 'vipdays') {
  2011. $player_vip_time = $buy_player_account->getCustomField('vip_time');
  2012. $player_lastlogin = $buy_player_account->getCustomField('lastday');
  2013. $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_pacc').' (id, to_name, to_account, from_nick, from_account, price, pacc_days, trans_state, trans_start, trans_real) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['days']).', \'realized\', '.$SQL->quote(time()).', '.$SQL->quote(time()).');';
  2014. $SQL->query($save_transaction);
  2015. $nomedoComprador = $buy_player_account->getName();
  2016. if($player_vip_time > 0){
  2017. $newVipDays = $player_vip_time + ($buy_offer['days'] * 86400);
  2018. $merda = $SQL->query("UPDATE `accounts` SET `vip_time` = '$newVipDays' WHERE `name` = '$nomedoComprador'");
  2019. }else{
  2020. $newVipDays2 = time() + ($buy_offer['days'] * 86400);
  2021. $merda = $SQL->query("UPDATE `accounts` SET `vip_time` = '$newVipDays2' WHERE `name` = '$nomedoComprador'");
  2022. }
  2023. $nomedoCara = $account_logged->getName();
  2024. $anyThing = $user_premium_points-$buy_offer['points'];
  2025. $SQL->query("UPDATE `accounts` SET `premium_points` = '$anyThing' WHERE `name` = '$nomedoCara'");
  2026. $user_premium_points = $user_premium_points - $buy_offer['points'];
  2027. if ($player_vip_days >= 1) {
  2028. }
  2029. $main_content .= '<center><h2>VIP Days added!</h2><b>'.$buy_offer['days'].' days</b> of VIP days added to the account of player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><br /><a href="index.php?subtopic=shopsystem">Go to Shop Site</a><br />';}
  2030. elseif($buy_offer['type'] == 'itemvip') {
  2031. $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' (id, name, type, action, param1, param2, param3, param4, param5, param6, param7, delete_it) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', \'login\', \'give_item\', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['megaitems_count']).', \'\', \'\', \'megaitems\', '.$SQL->quote($buy_offer['name']).', \'\', \'1\');';
  2032. $SQL->query($sql);
  2033. $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' (id, to_name, to_account, from_nick, from_account, price, offer_id, offer_desc, trans_state, trans_start, trans_real) VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['item_id']).', \'\', \'wait\', '.$SQL->quote(time()).', \'0\');';
  2034. $SQL->query($save_transaction);
  2035. $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
  2036. $user_premium_points = $user_premium_points - $buy_offer['points'];
  2037. $main_content .= '<center><h2>Item added!</h2><b>'.$buy_offer['name'].'</b> added to player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br>Now you have <b>'.$user_premium_points.' premium points</b>.<br>';
  2038. }
  2039. elseif($buy_offer['type'] == 'container') {
  2040. $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' (id, name, type, action, param1, param2, param3, param4, param5, param6, param7, delete_it) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', \'login\', \'give_item\', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['item_count']).', '.$SQL->quote($buy_offer['container_id']).', '.$SQL->quote($buy_offer['container_count']).', \'container\', '.$SQL->quote($buy_offer['name']).', \'\', \'1\');';
  2041. $SQL->query($sql);
  2042. $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' (id, to_name, to_account, from_nick, from_account, price, offer_id, offer_desc, trans_state, trans_start, trans_real) VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['name']).', \'wait\', '.$SQL->quote(time()).', \'0\');';
  2043. $SQL->query($save_transaction);
  2044. $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
  2045. $user_premium_points = $user_premium_points - $buy_offer['points'];
  2046. $main_content .= '<center><h2>Container of items added!</h2><b>'.$buy_offer['name'].'</b> added to player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><br /><a href="index.php?subtopic=shopsystem">GO TO MAIN SHOP SITE</a><br />';
  2047. }}
  2048. else {
  2049. if($buy_offer['type'] != 'changename') {
  2050. $set_session = TRUE;
  2051. $_SESSION['viewed_confirmation_page'] = 'yes';
  2052. if(empty($_REQUEST['page'])) { $color1 = 'blue'; $color2 = 'green-blue'; $color3 = 'blue'; $color4 = 'blue'; $color5 = 'blue'; }
  2053. if($_REQUEST['action'] == 'confirm_transaction') { $color1 = 'blue'; $color2 = 'green'; $color3 = 'green'; $color4 = 'green-blue'; $color5 = 'blue'; }
  2054. if($_REQUEST['page'] == 'transfer') { $color1 = 'green'; $color2 = 'green'; $color3 = 'green'; $color4 = 'green'; $color5 = 'green'; }
  2055. $main_content .= '
  2056. <div id="ProgressBar" >
  2057. <center><h2>Shop Buy Item</h2></center>
  2058. <div id="MainContainer" >
  2059. <div id="BackgroundContainer" >
  2060. <img id="BackgroundContainerLeftEnd" src="'.$layout_name.'/images/vips/stonebar-left-end.gif" />
  2061. <div id="BackgroundContainerCenter">
  2062. <div id="BackgroundContainerCenterImage" style="background-image:url('.$layout_name.'/images/vips/stonebar-center.gif);" />
  2063. </div>
  2064. </div>
  2065. <img id="BackgroundContainerRightEnd" src="'.$layout_name.'/images/vips/stonebar-right-end.gif" />
  2066. </div>
  2067. <img id="TubeLeftEnd" src="'.$layout_name.'/images/vips/progress-bar-tube-left-green.gif" />
  2068. <img id="TubeRightEnd" src="'.$layout_name.'/images/vips/progress-bar-tube-right-'.$color1.'.gif" />
  2069. <div id="FirstStep" class="Steps" >
  2070. <div class="SingleStepContainer" >
  2071. <img class="StepIcon" src="'.$layout_name.'/images/vips/progress-bar-icon-0-green.gif" />
  2072. <div class="StepText" style="font-weight:normal;" >Item Selected</div>
  2073. </div>
  2074. </div>
  2075. <div id="StepsContainer1" ><div id="StepsContainer2" ><div class="Steps" style="width:50%" >
  2076. <div class="TubeContainer" ><img class="Tube" src="'.$layout_name.'/images/vips/progress-bar-tube-'.$color2.'.gif" /></div><div class="SingleStepContainer" ><img class="StepIcon" src="'.$layout_name.'/images/vips/progress-bar-icon-3-'.$color3.'.gif" /><div class="StepText" style="font-weight:normal;" >Confirm Data</div>
  2077. </div></div><div class="Steps" style="width:50%" ><div class="TubeContainer" ><img class="Tube" src="'.$layout_name.'/images/vips/progress-bar-tube-'.$color4.'.gif" /></div><div class="SingleStepContainer" ><img class="StepIcon" src="'.$layout_name.'/images/vips/progress-bar-icon-4-'.$color5.'.gif" />
  2078. <div class="StepText" style="font-weight:normal;" >Transfer Result</div></div></div></div></div></div></div>';
  2079. $main_content .= '
  2080. <div class="TableContainer">
  2081. <div class="CaptionContainer">
  2082. <div class="CaptionInnerContainer">
  2083. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2084. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2085. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  2086. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  2087. <div class="Text">Shop Box</div>
  2088. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  2089. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  2090. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2091. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2092. </div>
  2093. </div>
  2094. <table class="Table5" cellpadding="0" cellspacing="0">
  2095. <tbody>
  2096. <tr>
  2097. <td>
  2098. <div class="InnerTableContainer">
  2099. <table style="width:100%;">
  2100. <tbody>
  2101. <tr>
  2102. <td>
  2103. <div class="TableShadowContainerRightTop" >
  2104. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rt.gif);" ></div>
  2105. </div>
  2106. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rm.gif);" >
  2107. <div class="TableContentContainer" >
  2108. <table border="0" cellpadding="4" cellspacing="1" width="100%">
  2109. <tr bgcolor="#505050"><td colspan="3"><font color="white"><b>Confirm transaction</b></font></td></tr>
  2110. <tr bgcolor="'.$config['site']['darkborder'].'"><td><b>Image:</b></td><td width="550" colspan="2">';
  2111. if ($buy_offer['type'] == 'pacc')
  2112. $main_content .= '<img src="images/shop/premium.gif" height="32" width="32" />';
  2113. elseif ($buy_offer['type'] == 'vipdays')
  2114. $main_content .= '<img src="images/shop/vip.gif" height="32" width="32" />';
  2115. elseif ($buy_offer['type'] == 'redskull')
  2116. $main_content .= '<img src="images/shop/skull.gif" height="32" width="32" />';
  2117. elseif ($buy_offer['type'] == 'unban')
  2118. $main_content .= '<img src="images/shop/ban.gif" height="32" width="32" />';
  2119. elseif ($buy_offer['type'] == 'item')
  2120. if(file_exists('images/items/'.$buy_offer['item_id'].'.gif')) {
  2121. $main_content .= '<img src="images/items/'.$buy_offer['item_id'].'.gif" height="32" width="32">';
  2122. } else {
  2123. $main_content .= '<img src="images/items/notfound.gif" height="32" width="32">';
  2124. }
  2125. elseif ($buy_offer['type'] == 'outfit')
  2126. if(file_exists($layout_name.'/images/outfits/'.$buy_offer['name'].'_male.gif')) {
  2127. $main_content .= '<img src="'.$layout_name.'/images/outfits/'.$buy_offer['name'].'_male.gif"">';
  2128. $main_content .= '<img src="'.$layout_name.'/images/outfits/'.$buy_offer['name'].'_female.gif"">';
  2129. } else {
  2130. $main_content .= '<img src="'.$layout_name.'/images/items/notfound.gif">';
  2131. }
  2132.  
  2133. elseif ($buy_offer['type'] == 'itemvip')
  2134. if(file_exists('images/items/'.$buy_offer['item_id'].'.gif')) {
  2135. $main_content .= '<img src="images/items/'.$buy_offer['item_id'].'.gif" height="32" width="32">';
  2136. } else {
  2137. $main_content .= '<img src="images/items/notfound.gif" height="32" width="32">';
  2138. }
  2139. $main_content .='<br /><small><b>'.$buy_offer['name'].'</b></small></td></tr>
  2140. <tr bgcolor="'.$config['site']['lightborder'].'"><td><b>Description:</b></td><td width="550" colspan="2">'.$buy_offer['description'].'</td></tr>';
  2141. $main_content .='
  2142. <tr bgcolor="'.$config['site']['darkborder'].'">
  2143. <td><b>Cost:</b></td>
  2144. <td width="550" colspan="2"><b>'.$buy_offer['points'].' premium points</b> from your account</td>
  2145. </tr>';
  2146. $main_content .='
  2147. <tr bgcolor="'.$config['site']['lightborder'].'"><td><b>For Player:</b></td><td width="550" colspan="2">'.$buy_player->getName().' <small>[<a href="index.php?subtopic=characters&name='.$buy_player->getName().'" target="_blank">View Character</a>]</small></td></tr>
  2148. <tr bgcolor="'.$config['site']['darkborder'].'"><td><b>Confirm Transaction?</b></td>
  2149. <td><form action="index.php?subtopic=shopsystem&action=confirm_transaction" method="POST">
  2150. <input type="hidden" name="buy_confirmed" value="yes">
  2151. <input type="hidden" name="buy_id" value="'.$buy_id.'">
  2152. <input type="hidden" name="buy_from" value="'.urlencode($new_name).'">
  2153. <input type="hidden" name="buy_name" value="'.urlencode($buy_name).'">
  2154. <input type="submit" value="Accept" class="btn btn-success" />
  2155. </form>
  2156. </td>
  2157. <td>
  2158. <form action="index.php?subtopic=shopsystem" method="POST">
  2159. <input type="submit" value="Cancel" class="btn btn-danger" />
  2160. </form>
  2161. </td>
  2162. </tr>
  2163. </table>
  2164. </div>
  2165. </div>
  2166. <div class="TableShadowContainer" >
  2167. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bm.gif);" >
  2168. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bl.gif);" ></div>
  2169. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-br.gif);" ></div>
  2170. </div>
  2171. </div>
  2172. </td>
  2173. </tr>
  2174. </div>
  2175. </td>
  2176. </tr>
  2177. </tbody>
  2178. </table>
  2179. </div>
  2180. </td>
  2181. </tr>
  2182. </tbody>
  2183. </table>
  2184. </div><br />';
  2185. } else {
  2186. $set_session = TRUE;
  2187. $_SESSION['viewed_confirmation_page'] = 'yes';
  2188. $main_content .= '<center>
  2189. <div class="TableContainer">
  2190. <div class="CaptionContainer">
  2191. <div class="CaptionInnerContainer">
  2192. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2193. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2194. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  2195. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  2196. <div class="Text">Shop Box</div>
  2197. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  2198. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  2199. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2200. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2201. </div>
  2202. </div>
  2203. <table class="Table3" cellpadding="0" cellspacing="0">
  2204. <tbody>
  2205. <tr>
  2206. <td>
  2207. <div class="InnerTableContainer">
  2208. <table style="width:100%;">
  2209. <tbody>
  2210. <tr>
  2211. <td>
  2212. <div class="TableShadowContainerRightTop" >
  2213. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rt.gif);" ></div>
  2214. </div>
  2215. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-rm.gif);" >
  2216. <div class="TableContentContainer" >
  2217. <table border="0" cellpadding="4" cellspacing="1" width="100%">
  2218. <tr bgcolor="#505050"><td colspan="3"><font color="white" size="4"><b>Confirm transaction</b></font></td></tr>
  2219. <tr bgcolor="#D4C0A1"><td width="130"><b>Name:</b></td><td width="550" colspan="2">'.$buy_offer['name'].'</td></tr>
  2220. <tr bgcolor="#F1E0C6"><td width="130"><b>Description:</b></td><td width="550" colspan="2">'.$buy_offer['description'].'</td></tr>
  2221. <tr bgcolor="#D4C0A1"><td width="130"><b>Cost:</b></td><td width="550" colspan="2"><b>'.$buy_offer['points'].' premium points</b></td></tr>
  2222. <tr bgcolor="#F1E0C6"><td width="130"><b>Current Name:</b></td><td width="550" colspan="2"><font color="red">'.$buy_player->getName().'</font></td></tr>
  2223. <tr bgcolor="#D4C0A1"><td width="130"><b>New Name:</b></td><td width="550" colspan="2"><font color="red">'.$buy_from.'</font></td></tr>
  2224. <tr bgcolor="#F1E0C6"><td width="130"><b>Change Name?</b></td><td width="275" align="left">
  2225. <form action="index.php?subtopic=shopsystem&action=confirm_transaction" method="POST">
  2226. <input type="hidden" name="buy_confirmed" value="yes">
  2227. <input type="hidden" name="buy_id" value="'.$buy_id.'">
  2228. <input type="hidden" name="buy_from" value="'.urlencode($buy_from).'">
  2229. <input type="hidden" name="buy_name" value="'.urlencode($buy_name).'">
  2230. <input type="submit" value="Accept">
  2231. </form>
  2232. </td>
  2233. <td align="right"><form action="index.php?subtopic=shopsystem" method="POST">
  2234. <input type="submit" value="Cancel">
  2235. </form>
  2236. </td>
  2237. </tr>
  2238. </table>
  2239. </div>
  2240. </div>
  2241. <div class="TableShadowContainer" >
  2242. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bm.gif);" >
  2243. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-bl.gif);" ></div>
  2244. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/global/content/table-shadow-br.gif);" ></div>
  2245. </div>
  2246. </div>
  2247. </td>
  2248. </tr>
  2249. </div>
  2250. </td>
  2251. </tr>
  2252. </tbody>
  2253. </table>
  2254. </div>
  2255. </td>
  2256. </tr>
  2257. </tbody>
  2258. </table>
  2259. </div>
  2260. ';
  2261. }}}
  2262. else {
  2263. $main_content .= '<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="5" WIDTH="100%">
  2264. <tr BGCOLOR="'.$config['site']['vdarkborder'].'">
  2265. <td CLASS="white"><b>Error</b></td>
  2266. </tr>
  2267. <tr BGCOLOR='.$config['site']['darkborder'].'>
  2268. <td>Player with name <b>'.$buy_name.'</b> doesn\'t exist. Please <a href="index.php?subtopic=shopsystem&action=select_player&buy_id='.$buy_id.'">select other name</a>.</td>
  2269. </tr>
  2270. </TABLE>';
  2271. }
  2272. } else {
  2273. $main_content .= '<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="4" WIDTH="100%">
  2274. <TR BGCOLOR="'.$config['site']['vdarkborder'].'">
  2275. <TD CLASS=white><B>Shoping Error</B></TD>
  2276. </TR>
  2277. <TR BGCOLOR='.$config['site']['darkborder'].'>
  2278. <td>
  2279. <TABLE BORDER="0" CELLSPACING="1" cellpadding="4">
  2280. <TR>
  2281. <TD>Invalid name format. Please <a href="index.php?subtopic=shopsystem&action=select_player&buy_id='.$buy_id.'">select other name</a>.</TD>
  2282. </TR>
  2283. </TABLE>
  2284. </td>
  2285. </tr>
  2286. </TABLE><br />';}
  2287. } else {
  2288. $main_content .= '<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="5" WIDTH="100%">
  2289. <tr BGCOLOR="'.$config['site']['vdarkborder'].'">
  2290. <td CLASS="white"><b>Error</b></td>
  2291. </tr>
  2292. <tr BGCOLOR='.$config['site']['darkborder'].'>
  2293. <td>For this item you need <b>'.$buy_offer['points'].'</b> points. You have only <b>'.$user_premium_points.'</b> premium points. Please <a href="index.php?subtopic=shopsystem">select other item</a> or buy premium points.</td>
  2294. </tr>
  2295. </TABLE>';
  2296. }}
  2297. else {
  2298. $main_content .= '<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="5" WIDTH="100%">
  2299. <tr BGCOLOR="'.$config['site']['vdarkborder'].'">
  2300. <td CLASS="white"><b>Error</b></td>
  2301. </tr>
  2302. <tr BGCOLOR='.$config['site']['darkborder'].'>
  2303. <td>Offer with ID <b>'.$buy_id.'</b> doesn\'t exist. Please <a href="index.php?subtopic=shopsystem">select item</a> again.</td>
  2304. </tr>
  2305. </TABLE>';
  2306. }}}}
  2307. if(!$set_session) {
  2308. unset($_SESSION['viewed_confirmation_page']);
  2309. }}
  2310. elseif($action == 'show_history') {
  2311. if(!$logged) {
  2312. $main_content .= 'Please login first.';
  2313. } else{
  2314.  
  2315. $items_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_item').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';');
  2316. if(is_object($items_history_received)) {
  2317. foreach($items_history_received as $item_received) {
  2318.  
  2319. if($item_received['offer_id'] != 0001 && $item_received['offer_id'] != 0002 && $item_received['offer_id'] != 0003 && $item_received['offer_id'] != 0004)
  2320. {
  2321. if($account_logged->getId() == $item_received['to_account'])
  2322. $char_color = 'green';
  2323. else
  2324. $char_color = 'red';
  2325.  
  2326. $items_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$item_received['to_name'].'</font></td><td>';
  2327.  
  2328. if($account_logged->getId() == $item_received['from_account'])
  2329. $items_received_text .= '<i>Your account</i>';
  2330. else
  2331. $items_received_text .= $item_received['from_nick'];
  2332.  
  2333. $items_received_text .= '</td><td>'.$item_received['offer_id'].'</td><td>'.$item_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $item_received['trans_start']).'</td>';
  2334.  
  2335. if($item_received['trans_real'] > 0)
  2336. $items_received_text .= '<td>'.date("j F Y, H:i:s", $item_received['trans_real']).'</td>';
  2337. else
  2338. $items_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>';
  2339.  
  2340. $items_received_text .= '</tr>';
  2341. }
  2342.  
  2343. else {
  2344.  
  2345. $services_received_text .= '<tr bgcolor="#F1E0C6"><td>';
  2346.  
  2347. if($item_received['offer_id'] == 0001)
  2348. $services_received_text .= 'Character name <b>'.$item_received['to_name'].'</b> changed to name <b>'.$item_received['from_nick'].'</b>.';
  2349. elseif ($item_received['offer_id'] == 0002)
  2350. $services_received_text .= 'Skull removed from character name <b>'.$item_received['to_name'].'</b>.';
  2351. elseif ($item_received['offer_id'] == 0003)
  2352. $services_received_text .= 'The character <b>'.$item_received['to_name'].'</b> has been unbanned.';
  2353. elseif ($item_received['offer_id'] == 0004)
  2354. $services_received_text .= 'The <b>'.$item_received['offer_desc'].'</b> outfits to character <b>'.$item_received['to_name'].'</b> .';
  2355.  
  2356. $services_received_text .= '</td>';
  2357.  
  2358. $services_received_text .= '<td>'.$item_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $item_received['trans_start']).'</td>';
  2359.  
  2360. $services_received_text .= '</tr>';
  2361.  
  2362. }
  2363. }
  2364. }
  2365.  
  2366. $itemsguild_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shopguild_history_item').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';');
  2367. if(is_object($itemsguild_history_received)) {
  2368. foreach($itemsguild_history_received as $itemguild_received) {
  2369.  
  2370. if($itemguild_received['offer_id'] != 0001 && $itemguild_received['offer_id'] != 0002 && $itemguild_received['offer_id'] != 0003)
  2371. {
  2372. if($account_logged->getId() == $itemguild_received['to_account'])
  2373. $char_color = 'green';
  2374. else
  2375. $char_color = 'red';
  2376.  
  2377. $itemsguild_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$itemguild_received['to_name'].'</font></td><td>';
  2378.  
  2379. if($account_logged->getId() == $itemguild_received['from_account'])
  2380. $itemsguild_received_text .= '<i>Your account</i>';
  2381. else
  2382. $itemsguild_received_text .= $itemguild_received['from_nick'];
  2383.  
  2384. $itemsguild_received_text .= '</td><td>'.$itemguild_received['offer_id'].'</td><td>'.$itemguild_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $itemguild_received['trans_start']).'</td>';
  2385.  
  2386. if($itemguild_received['trans_real'] > 0)
  2387. $itemsguild_received_text .= '<td>'.date("j F Y, H:i:s", $itemguild_received['trans_real']).'</td>';
  2388. else
  2389. $itemsguild_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>';
  2390.  
  2391. $itemsguild_received_text .= '</tr>';
  2392. }
  2393.  
  2394. else {
  2395.  
  2396. $servicesguild_received_text .= '<tr bgcolor="#F1E0C6"><td>';
  2397.  
  2398. if($itemguild_received['offer_id'] == 0001)
  2399. $servicesguild_received_text .= 'Character name <b>'.$itemguild_received['to_name'].'</b> changed to name <b>'.$itemguild_received['from_nick'].'</b>.';
  2400. elseif ($itemguild_received['offer_id'] == 0002)
  2401. $servicesguild_received_text .= 'Skull removed from character name <b>'.$itemguild_received['to_name'].'</b>.';
  2402. elseif ($itemguild_received['offer_id'] == 0003)
  2403. $servicesguild_received_text .= 'The character <b>'.$itemguild_received['to_name'].'</b> has been unbanned.';
  2404.  
  2405. $servicesguild_received_text .= '</td>';
  2406.  
  2407. $servicesguild_received_text .= '<td>'.$itemguild_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $itemguild_received['trans_start']).'</td>';
  2408.  
  2409. $servicesguild_received_text .= '</tr>';
  2410.  
  2411. }
  2412. }
  2413. }
  2414.  
  2415. $paccs_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_pacc').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';');
  2416. if(is_object($paccs_history_received)) {
  2417. foreach($paccs_history_received as $pacc_received) {
  2418. if($account_logged->getId() == $pacc_received['to_account'])
  2419. $char_color = 'green';
  2420. else
  2421. $char_color = 'red';
  2422. $paccs_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$pacc_received['to_name'].'</font></td><td>';
  2423. if($account_logged->getId() == $pacc_received['from_account'])
  2424. $paccs_received_text .= '<i>Your account</i>';
  2425. else
  2426. $paccs_received_text .= $pacc_received['from_nick'];
  2427. $paccs_received_text .= '</td><td>'.$pacc_received['pacc_days'].' days</td><td>'.$pacc_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $pacc_received['trans_real']).'</td></tr>';
  2428. }
  2429. }
  2430. $paccsguild_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shopguild_history_pacc').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';');
  2431. if(is_object($paccsguild_history_received)) {
  2432. foreach($paccsguild_history_received as $paccguild_received) {
  2433. if($account_logged->getId() == $paccguild_received['to_account'])
  2434. $char_color = 'green';
  2435. else
  2436. $char_color = 'red';
  2437. $paccsguild_received_text .= '<tr bgcolor="#F1E0C6"><td><font color="'.$char_color.'">'.$paccguild_received['to_name'].'</font></td><td>';
  2438. if($account_logged->getId() == $paccguild_received['from_account'])
  2439. $paccsguild_received_text .= '<i>Your account</i>';
  2440. else
  2441. $paccsguild_received_text .= $paccguild_received['from_nick'];
  2442. $paccsguild_received_text .= '</td><td>'.$paccguild_received['pacc_days'].' days</td><td>'.$paccguild_received['price'].' Points</td><td>'.date("j F Y, H:i:s", $paccguild_received['trans_real']).'</td></tr>';
  2443. }
  2444. }
  2445. $main_content .= '<center><h1>Transactions History</h1></center>';
  2446. if(!empty($items_received_text))
  2447. $main_content .= '
  2448. <div class="TableContainer">
  2449. <div class="CaptionContainer">
  2450. <div class="CaptionInnerContainer">
  2451. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2452. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2453. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  2454. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  2455. <div class="Text">Items | Items VIP\'s Transactions</div>
  2456. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  2457. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  2458. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2459. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2460. </div>
  2461. </div>
  2462. <table class="Table3" cellpadding="0" cellspacing="0">
  2463. <tbody>
  2464. <tr>
  2465. <td>
  2466. <div class="InnerTableContainer">
  2467. <table style="width:100%;">
  2468. <tbody>
  2469. <tr>
  2470. <td>
  2471. <div class="TableShadowContainerRightTop">
  2472. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  2473. </div>
  2474. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  2475. <div class="TableContentContainer">
  2476. <center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=100%><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Item ID</b></td><td><b>Cost</b></td><td><b>Buy on site</b></td><td><b>Received on game</b></td></tr>'.$items_received_text.'</table>
  2477. </div>
  2478. </div>
  2479. <div class="TableShadowContainer">
  2480. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  2481. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  2482. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  2483. </div>
  2484. </td>
  2485. </tr>
  2486. </tbody>
  2487. </table>
  2488. </div>
  2489. </td>
  2490. </tr>
  2491. </tbody>
  2492. </table>
  2493. </div><br />';
  2494.  
  2495. if(!empty($services_received_text))
  2496. $main_content .= '
  2497. <div class="TableContainer">
  2498. <div class="CaptionContainer">
  2499. <div class="CaptionInnerContainer">
  2500. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2501. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2502. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  2503. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  2504. <div class="Text">Account Additional Transactions</div>
  2505. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  2506. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  2507. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2508. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2509. </div>
  2510. </div>
  2511. <table class="Table3" cellpadding="0" cellspacing="0">
  2512. <tbody>
  2513. <tr>
  2514. <td>
  2515. <div class="InnerTableContainer">
  2516. <table style="width:100%;">
  2517. <tbody>
  2518. <tr>
  2519. <td>
  2520. <div class="TableShadowContainerRightTop">
  2521. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  2522. </div>
  2523. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  2524. <div class="TableContentContainer">
  2525. <center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=100%><tr bgcolor="#D4C0A1"><td><b>Service description:</b></td><td><b>Cost</b></td><td><b>Buy on site</b></td></tr>'.$services_received_text.'</table>
  2526. </div>
  2527. </div>
  2528. <div class="TableShadowContainer">
  2529. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  2530. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  2531. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  2532. </div>
  2533. </td>
  2534. </tr>
  2535. </tbody>
  2536. </table>
  2537. </div>
  2538. </td>
  2539. </tr>
  2540. </tbody>
  2541. </table>
  2542. </div><br />';
  2543.  
  2544. if(!empty($paccs_received_text))
  2545. $main_content .= '
  2546. <div class="TableContainer">
  2547. <div class="CaptionContainer">
  2548. <div class="CaptionInnerContainer">
  2549. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2550. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2551. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  2552. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  2553. <div class="Text">Premium/VIP Days Transactions</div>
  2554. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  2555. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  2556. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2557. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  2558. </div>
  2559. </div>
  2560. <table class="Table3" cellpadding="0" cellspacing="0">
  2561. <tbody>
  2562. <tr>
  2563. <td>
  2564. <div class="InnerTableContainer">
  2565. <table style="width:100%;">
  2566. <tbody>
  2567. <tr>
  2568. <td>
  2569. <div class="TableShadowContainerRightTop">
  2570. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  2571. </div>
  2572. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  2573. <div class="TableContentContainer">
  2574. <center><table BORDER=0 CELLPADDING=1 CELLSPACING=1 WIDTH=100%><tr bgcolor="#D4C0A1"><td><b>To:</b></td><td><b>From:</b></td><td><b>Duration</b></td><td><b>Cost</b></td><td><b>Added:</b></td></tr>'.$paccs_received_text.'</table>
  2575. </div>
  2576. </div>
  2577. <div class="TableShadowContainer">
  2578. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  2579. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  2580. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  2581. </div>
  2582. </td>
  2583. </tr>
  2584. </tbody>
  2585. </table>
  2586. </div>
  2587. </td>
  2588. </tr>
  2589. </tbody>
  2590. </table>
  2591. </div><br />';
  2592. if(empty($paccs_received_text) && empty($items_received_text) && empty($itemsguild_received_text) && empty($services_received_text))
  2593. $main_content .= '<center>You did not buy/receive any items or PACC.</center><br>';
  2594. }
  2595. }
  2596. }
  2597. if(!$logged)
  2598. $main_content .= '<br /><center><div class="notice"><b>Please login to see how much points you have</b></div></center>';
  2599. else
  2600. if($account_logged->getCustomField("premium_points") <= 0)
  2601. $main_content .='<br /><center><div class="error"><b>You do not have premium points available.</b><br /><br /><form action="index.php?subtopic=buypt" method="post"><input type="submit" value="Buy points!" class="btn btn-success" /></form></div></center>';
  2602. else
  2603. if($account_logged->getCustomField("premium_points") >= 1)
  2604. $main_content .='<br /><center><div class="success" style="width: 300px;">You have&nbsp;<b>'.$account_logged->getCustomField("premium_points").'</b>&nbsp;premium points available</div></center>';
  2605.  
  2606. else
  2607. $main_content .= '
  2608. <div class="error">
  2609. Shop for disabled the internal maintenance, back in a moment with our standard systems.<br /><br /><b><small>Graciously, Staff</small></b>
  2610. </div>
  2611. ';
  2612. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement