Advertisement
Guest User

Untitled

a guest
Jun 8th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 163.17 KB | None | 0 0
  1. <?php
  2. date_default_timezone_set('America/Araguaina');
  3. if(!defined('INITIALIZED'))
  4. exit;
  5. if($group_id_of_acc_logged == 2)
  6. $main_content .= '<h1>Account Manager Bloqueado.';
  7. else
  8. if(!$logged)
  9. if($action == "logout")
  10. $main_content .= '
  11. <div class="TableContainer" >
  12. <table class="Table1" cellpadding="0" cellspacing="0" >
  13. <div class="CaptionContainer" >
  14. <div class="CaptionInnerContainer" >
  15. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  16. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  17. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  18. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  19. <div class="Text" >Logout Successful</div>
  20. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  21. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  22. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  23. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  24. </div>
  25. </div>
  26. <tr>
  27. <td>
  28. <div class="InnerTableContainer" >
  29. <table style="width:100%;" >
  30. <tr>
  31. <td>You have logged out of your '.htmlspecialchars($config['server']['serverName']).' account. In order to view your account you need to <a href="?subtopic=accountmanagement" >log in</a> again.</td>
  32. </tr>
  33. </table>
  34. </div>
  35. </td>
  36. </tr>
  37. </table>
  38. </div>';
  39. else
  40. {
  41. $passB = '<span>Password:</span>';
  42. $logB = '<span>Account Name:</span>';
  43. if(isset($isTryingToLogin))
  44. {
  45. $main_content .= '
  46. <div class="SmallBox" >
  47. <div class="MessageContainer" >
  48. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
  49. <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  50. <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  51. <div class="ErrorMessage" >
  52. <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
  53. <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
  54. <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div>
  55. <b>The Following Errors Have Occurred:</b><br/>';
  56. switch(Visitor::getLoginState())
  57. {
  58. case Visitor::LOGINSTATE_NO_ACCOUNT:
  59. $main_content .= 'Account with that name doesn\'t exist.<br/>';
  60. $logB = '<span style="color:red;">Account Name:</span>';
  61. break;
  62. case Visitor::LOGINSTATE_WRONG_PASSWORD:
  63. $main_content .= 'Wrong password to account.<br/>';
  64. $passB = '<span style="color:red;">Password:</span>';
  65. break;
  66. }
  67. $main_content .= '
  68. </div>
  69. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
  70. <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  71. <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" />
  72. </div>
  73. </div>
  74. </div><br/>';
  75. }
  76. $main_content .= '
  77. <form action="?subtopic=accountmanagement" method="post" style="margin: 0px; padding: 0px;">
  78. <div class="TableContainer" >
  79. <table class="Table4" cellpadding="0" cellspacing="0" >
  80. <div class="CaptionContainer" >
  81. <div class="CaptionInnerContainer" >
  82. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  83. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  84. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  85. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  86. <div class="Text" >Account Login</div>
  87. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  88. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  89. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  90. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  91. </div>
  92. </div>
  93. <tr>
  94. <td>
  95. <div class="InnerTableContainer" >
  96. <table style="width:100%;" >
  97. <tr>
  98. <td>
  99. <div class="TableShadowContainerRightTop" >
  100. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div>
  101. </div>
  102. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" >
  103. <div class="TableContentContainer" >
  104. <table class="TableContent" width="100%" style="border:1px solid #faf0d7;" >
  105. <tr>
  106. <td>
  107. <table style="float: left; width: 370px;" cellpadding="0" cellspacing="0" >
  108. <tr>
  109. <td class="LabelV120" ><span>'.$logB.'</span></td>
  110. <td><input type="password" name="account_login" size="35" maxlength="30" ></td>
  111. </tr>
  112. <tr>
  113. <td class="LabelV120" ><span>'.$passB.'</span></td>
  114. <td><input type="password" name="password_login" size="35" maxlength="29" ></td>
  115. </tr>
  116.  
  117.  
  118.  
  119. </table>
  120.  
  121.  
  122.  
  123.  
  124.  
  125. <div style="float: right; font-size: 1px;" >
  126.  
  127. <input type="hidden" name="page" value="overview" >
  128. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
  129. <input class="ButtonText" type="image" name="Login" alt="Login" src="'.$layout_name.'/images/buttons/_sbutton_login.gif" >
  130. </div>
  131. </div>
  132. </form>
  133. <div style="width: 2px; height: 2px;" ></div>
  134. <form action="/?subtopic=lostaccount" method="post" style="padding:0px;margin:0px;" >
  135. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
  136. <input class="ButtonText" type="image" name="Account lost?" alt="Account lost?" src="'.$layout_name.'/images/buttons/_sbutton_accountlost.gif" >
  137. </div>
  138. </div>
  139. </form>
  140. </div>
  141. </td>
  142. </tr>
  143. </table>
  144. </div>
  145. </div>
  146. <div class="TableShadowContainer" >
  147. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" >
  148. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div>
  149. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div>
  150. </div>
  151. </div>
  152. </td>
  153. </tr>
  154. </table>
  155. </div>
  156. </table>
  157. </div>
  158. </td>
  159. </tr>
  160. <br/>
  161. <center>
  162. <h1>New to '.$config['server']['serverName'].'?</h1>
  163. </center>
  164. <div class="TableContainer" >
  165. <table class="Table4" cellpadding="0" cellspacing="0" >
  166. <div class="CaptionContainer" >
  167. <div class="CaptionInnerContainer" >
  168. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  169. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  170. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  171. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  172. <div class="Text" >New Player</div>
  173. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  174. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  175. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  176. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  177. </div>
  178. </div>
  179. <tr>
  180. <td>
  181. <div class="InnerTableContainer" >
  182. <table style="width:100%;" >
  183. <tr>
  184. <td>
  185. <div class="TableShadowContainerRightTop" >
  186. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div>
  187. </div>
  188. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" >
  189. <div class="TableContentContainer" >
  190. <table class="TableContent" width="100%" style="border:1px solid #faf0d7;" >
  191. <tr>
  192. <td >
  193. <div style="float: right; margin-top: 20px;" >
  194. <form class="MediumButtonForm" action="/?subtopic=createaccount" method="post" >
  195. <div class="MediumButtonBackground" style="background-image:url('.$layout_name.'/images/buttons/mediumbutton.gif)" onMouseOver="MouseOverMediumButton(this);" onMouseOut="MouseOutMediumButton(this);" ><div class="MediumButtonOver" style="background-image:url('.$layout_name.'/images/buttons/mediumbutton-over.gif)" onMouseOver="MouseOverMediumButton(this);" onMouseOut="MouseOutMediumButton(this);" ></div>
  196. <input class="MediumButtonText" type="image" name="Create Account" alt="Create Account" src="'.$layout_name.'/images/buttons/mediumbutton_createaccount.png" />
  197. </div>
  198. </form>
  199. </div>
  200. <div id="LoginCreateAccountBox" >
  201. <p><b>'.$config['server']['serverName'].'...</b></p>
  202. <div style="margin-left: 10px;" >
  203. <p>... where hardcore gaming meets fantasy.</p>
  204. <p>... where friendships last a lifetime.</p>
  205. <p>... unites adventurers since 1997!</p>
  206. </div>
  207. </div>
  208. </table>
  209. </div>
  210. </div>
  211. <div class="TableShadowContainer" >
  212. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" >
  213. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div>
  214. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div>
  215. </div>
  216. </div>
  217. </td>
  218. </tr>
  219. </table>
  220. </div>
  221. </table>
  222. </div>
  223. </td>
  224. </tr>';
  225. }
  226. else
  227. {
  228.  
  229.  
  230. //Here start our new accountmanagement ;D
  231. if($action == "")
  232. {
  233. if($account_logged->getCustomField('vip_time') > time()){
  234. $isVip = true;
  235. $account_statusOver = '
  236. <span class="green">
  237. <span class="BigBoldText">VIP Account</span>
  238. </span>';
  239. }else{
  240. $isVip = false;
  241. $account_statusOver = '
  242. <span class="red">
  243. <span class="BigBoldText">Free Account</span>
  244. </span>';
  245. }
  246.  
  247. if($account_logged->getCustomField('vip_time') > time())
  248. $account_statusPic = '<img class="AccountStatusImage" src="'.$layout_name.'/images/account/account-status_green.gif" alt="VIP account">';
  249. else
  250. $account_statusPic = '<img class="AccountStatusImage" src="'.$layout_name.'/images/account/account-status_red.gif" alt="free account">';
  251.  
  252. $main_content .= '
  253. <center>
  254. <table>
  255. <tbody>
  256. <tr>
  257. <td><img src="'.$layout_name.'/images/content/headline-bracer-left.gif"></td>
  258. <td style="text-align:center;vertical-align:middle;horizontal-align:center;font-size:17px;font-weight:bold;">Bem vindo à sua conta '.$account_logged->getRLName().'!<br></td>
  259. <td><img src="'.$layout_name.'/images/content/headline-bracer-right.gif"></td>
  260. </tr>
  261. </tbody>
  262. </table>
  263. </center>
  264. <br>';
  265. $main_content .= '
  266. <div class="TableContainer">
  267. <div class="CaptionContainer">
  268. <div class="CaptionInnerContainer">
  269. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  270. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  271. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  272. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  273. <div class="Text">Account Status</div>
  274. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  275. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  276. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  277. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  278. </div>
  279. </div>
  280. <table class="Table5" cellpadding="0" cellspacing="0">
  281. <tbody>
  282. <tr>
  283. <td>
  284. <div class="InnerTableContainer">
  285. <table style="width:100%;">
  286. <tbody>
  287. <tr>
  288. <td>
  289. <div class="TableShadowContainerRightTop">
  290. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  291. </div>
  292. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  293. <div class="TableContentContainer">
  294. <table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
  295. <tbody>
  296. <tr>
  297. <td>'.$account_statusPic.'</td>
  298. <td width="100%" valign="middle">
  299. '.$account_statusOver.'';
  300. if($isVip)
  301. $main_content .= '
  302. <small><br>You still have <font style="text-transform:capitalize;">'.(int)(($account_logged->getCustomField('vip_time') - time())/60 / 60 / 24).'</font> vip days remaining.</small>';
  303. $main_content .= '
  304. </td>
  305. <td>
  306. <form action="?subtopic=accountmanagement&action=manage" method="post" style="padding:0px;margin:0px;">
  307. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)">
  308. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);">
  309. </div>
  310. <input class="ButtonText" type="image" name="Manage Account" alt="Manage Account" src="'.$layout_name.'/images/buttons/_sbutton_manageaccount.gif">
  311. </div>
  312. </div>
  313. </form>
  314. <div style="font-size:1px;height:4px;"></div>
  315. <form action="?subtopic=shopsystem" method="post" style="padding:0px;margin:0px;">
  316. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)">
  317. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  318. <input class="ButtonText" type="image" name="Get Premium" alt="Get Premium" src="'.$layout_name.'/images/buttons/_sbutton_getpremium.gif">
  319. </div>
  320. </div>
  321. </form>
  322. <div style="font-size:1px;height:4px;"></div>
  323. <form action="?subtopic=accountmanagement&action=logout" method="post" style="padding:0px;margin:0px;">
  324. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)">
  325. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  326. <input class="ButtonText" type="image" name="Logout" alt="Logout" src="'.$layout_name.'/images/buttons/_sbutton_logout.gif">
  327. </div>
  328. </div>
  329. </form>
  330. </td>
  331. </tr>
  332. </tbody>
  333. </table>
  334. </div>
  335. </div>
  336. <div class="TableShadowContainer">
  337. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  338. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  339. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  340. </div>
  341. </div>
  342. </td>
  343. </tr>
  344. </tbody>
  345. </table>
  346. </div>
  347. </td>
  348. </tr>
  349. </tbody>
  350. </table>
  351. </div>
  352. <br>';
  353. //REGISTRAR
  354. $account_reckey = $account_logged->getCustomField("key");
  355. if(empty($account_reckey))
  356. $main_content .= '
  357. <div class="SmallBox" >
  358. <div class="MessageContainer" >
  359. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
  360. <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  361. <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  362. <div class="Message" >
  363. <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
  364. <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
  365. <table class="HintBox" >
  366. <tr>
  367. <td>
  368. <div class="BoxButtons" >
  369.  
  370. <div style="font-size:1px;height:4px;" ></div>
  371. </div>
  372. <p><b>Você ainda não gerou sua Recovery Key!</b></p>
  373. <p>Clique em register account para receber sua recovery key e a guarde em um lugar seguro. Ter sua recovery key garante que você possa recuperar sua conta caso a perca.</p>
  374. <p>Se você perder sua recovery key, você pode comprar outra entrando em contato através de um <a href="?subtopic=helpdesk">ticket</a>, mas somente se tiver o E-Mail no qual a conta está registrada!<td><a href="?subtopic=accountmanagement&action=registeraccount"><img src="'.$layout_name.'/images/rk.jpg"></a></td></p>
  375. </td>
  376. <tr>
  377. </table>
  378. </div>
  379. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
  380. <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  381. <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  382. </div>
  383. </div><br/>
  384. ';
  385.  
  386.  
  387. //DOWNLOAD
  388. $main_content .= '
  389. <div class="SmallBox" >
  390. <div class="MessageContainer" >
  391. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
  392. <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  393. <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  394. <div class="Message" >
  395. <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
  396. <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
  397. <table class="HintBox" >
  398. <tr>
  399. <td>
  400. <div class="BoxButtons" >
  401.  
  402. <div style="font-size:1px;height:4px;" ></div>
  403. </div>
  404. <p><b>Baixe nosso cliente para uma melhor experiência!</b></p>
  405. <p>Usando o nosso cliente você pode abrir quantos clientes quiser e não precisa usar IP Changer! Além disso ele é mais bonito e legal de se usar :)<td><a href="?subtopic=download"><img src="'.$layout_name.'/images/account/download_windows.gif"></a></td></p>
  406.  
  407. </td>
  408. <tr>
  409. </table>
  410. </div>
  411. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
  412. <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  413. <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  414. </div>
  415. </div><br/>
  416. ';
  417.  
  418. //CHARACTERS
  419. $main_content .= '
  420. <div class="RowsWithOverEffect">
  421. <div class="TableContainer">
  422. <div class="CaptionContainer">
  423. <div class="CaptionInnerContainer">
  424. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  425. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  426. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  427. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  428. <div class="Text">Characters</div>
  429. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
  430. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
  431. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  432. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
  433. </div>
  434. </div>
  435. <table class="Table3" cellpadding="0" cellspacing="0">
  436. <tbody>
  437. <tr>
  438. <td>
  439. <div class="InnerTableContainer">
  440. <table style="width:100%;">
  441. <tbody>
  442. <tr>
  443. <td>
  444. <div class="TableShadowContainerRightTop">
  445. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
  446. </div>
  447. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
  448. <div class="TableContentContainer">
  449. <table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
  450. <tbody>
  451. <tr class="LabelH">
  452. <td></td>
  453. <td style="width:40%;">Name</td>
  454. <td style="width:120px!important;">World</td>
  455. <td style="width:90px!important;">Status</td>
  456. <td style="width:90px!important;">&nbsp;</td>
  457. </tr>';
  458.  
  459. $account_players = $account_logged->getPlayersList();
  460. //show list of players on account
  461. $var = 0;
  462. foreach($account_players as $account_player)
  463. {
  464. $player_number_counter++;
  465. if($var==0) {
  466. $preview = ' previewstate="0"';
  467. } else {
  468. $preview = '';
  469. }
  470.  
  471. if($var==0) {
  472. $display = 'block';
  473. } else {
  474. $display = 'none';
  475. }
  476.  
  477. if($var==0) {
  478. $displayNum = 'none';
  479. } else {
  480. $displayNum = 'inline';
  481. }
  482.  
  483. if($var==0) {
  484. $displayBold = 'bold';
  485. } else {
  486. $displayBold = 'normal';
  487. }
  488.  
  489. if($var==0) {
  490. $displayFont = '13';
  491. } else {
  492. $displayFont = '10';
  493. }
  494.  
  495. $main_content .='
  496. <tr id="CharacterRow_'.$player_number_counter.'"
  497. onmouseover="InRowWithOverEffect(&#39;CharacterRow_'.$player_number_counter.'&#39;,';
  498.  
  499. if(is_int($player_number_counter / 2))
  500. $main_content .= '&#39;#e7d1af&#39;';
  501. else
  502. $main_content .= '&#39;#ffedd1&#39;';
  503.  
  504.  
  505. $main_content .='
  506. );"
  507. onmouseout="OutRowWithOverEffect(&#39;CharacterRow_'.$player_number_counter.'&#39;,';
  508.  
  509. if(is_int($player_number_counter / 2))
  510. $main_content .= '&#39;#d5c0a1&#39;';
  511. else
  512. $main_content .= '&#39;#f1e0c6&#39;';
  513.  
  514. $main_content .='
  515. );"
  516. onclick="FocusCharacter('.$player_number_counter.', &#39;'.urlencode($account_player->getName()).'&#39;, '.$config['site']['max_players_per_account'].');"
  517. class="Odd" style="font-weight: '.$displayBold.';';
  518.  
  519. if(is_int($player_number_counter / 2))
  520. $main_content .= 'background-color: #d5c0a1;">';
  521. else
  522. $main_content .= 'background-color: #f1e0c6;">';
  523.  
  524. $main_content .='
  525. <td style="width:40px;text-align:center;padding:2px;">
  526. <span id="CharacterNumberOf_'.$player_number_counter.'" style="display: '.$displayNum.';">'.$player_number_counter.'.</span>
  527. <span id="PlayButtonOf_'.$player_number_counter.'" style="display: '.$display.';">
  528. <span name="FlashClientPlayButton" id="FlashClientPlayButton" playlink="#" ' . $preview . '>';
  529.  
  530. if($account_player->isDeleted())
  531. {
  532. $main_content .= '<img style="border:0px;" src="'.$layout_name.'/images/account/play-not-button.gif">';
  533. } else {
  534. $main_content .= '
  535. <a href="#" >
  536. <img style="border:0px;" onmouseover="InMiniButton(this, &#39;&#39;);" onmouseout="OutMiniButton(this, &#39;&#39;);" src="'.$layout_name.'/images/account/play-button.gif">
  537. </a>';
  538. }
  539.  
  540. $main_content .='
  541. </span>
  542. </span>
  543. </td>
  544. <td id="CharacterCell2_'.$player_number_counter.'">
  545. <span style="white-space:nowrap;vertical-align:middle;">
  546. <span id="CharacterNameOf_'.$player_number_counter.'" style="font-size: '.$displayFont.'pt;">'.htmlspecialchars($account_player->getName()).'</span><br>
  547. <span id="CharacterNameOf_'.$player_number_counter.'"><small>'.htmlspecialchars($vocation_name[$account_player->getPromotion()][$account_player->getVocation()]).' - Level '.$account_player->getLevel().'</small></span>
  548. </span>
  549. </td>
  550. <td id="CharacterCell2_'.$player_number_counter.'">
  551. <span style="white-space:nowrap;">'.htmlspecialchars($config['server']['serverName']).'</span>
  552. </td>
  553. <td id="CharacterCell3_'.$player_number_counter.'">';
  554. if(!$account_player->isOnline())
  555. $main_content .= '';
  556. else
  557. $main_content .= '<font color="#00CD00"><b>online</b></font>';
  558. if($account_player->isDeleted())
  559. {
  560. $main_content .= 'deleted';
  561. }
  562. $main_content .='
  563. </td>
  564. <td id="CharacterCell4_'.$player_number_counter.'" style="text-align:center;">
  565. <span id="CharacterOptionsOf_'.$player_number_counter.'" style="display: '.$display.';">
  566. <span style="font-weight:normal;">[<a href="?subtopic=accountmanagement&action=changecomment&name='.urlencode($account_player->getName()).'">Edit</a>]</span>';
  567. if($account_player->isDeleted())
  568. {
  569. $main_content .= '<br><span style="font-weight:normal;">[<a href="?subtopic=accountmanagement&action=undelete&name='.urlencode($account_player->getName()).'">Undelete</a>]</span>';
  570. } else {
  571. $main_content .= '<br><span style="font-weight:normal;">[<a href="?subtopic=accountmanagement&action=deletecharacter&name='.urlencode($account_player->getName()).'">Delete</a>]</span>';
  572. }
  573.  
  574. $main_content .= '
  575. </span>
  576. </td>
  577. </tr>';
  578. $var++;
  579. }
  580. $main_content .='
  581. </tbody>
  582. </table>
  583. </div>
  584. </div>
  585. <div class="TableShadowContainer">
  586. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">
  587. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
  588. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
  589. </div>
  590. </div>
  591. </td>
  592. </tr>
  593. <tr>
  594. <td>
  595. <table class="InnerTableButtonRow" cellpadding="0" cellspacing="0">
  596. <tbody>
  597. <tr>
  598. <td></td>
  599. <td align="right" style="padding-right:7px;width:100%;">
  600. <form action="?subtopic=accountmanagement&action=createcharacter" method="post" style="padding:0px;margin:0px;">
  601. <input type="hidden" name="selectedcharacter" value="Draz Mytos">
  602. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)">
  603. <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
  604. <input class="ButtonText" type="image" name="Create Character" alt="Create Character" src="'.$layout_name.'/images/buttons/_sbutton_createcharacter.gif">
  605. </div>
  606. </div>
  607. </form>
  608. </td>
  609. </tr>
  610. </tbody>
  611. </table>
  612. </td>
  613. </tr>
  614. </tbody>
  615. </table>
  616. </div>
  617. </td>
  618. </tr>
  619. </tbody>
  620. </table>
  621. </div>
  622. </div>
  623. <br><br>';
  624. //MIGRATION TOOL ;D
  625. if($group_id_of_acc_logged >= $config['site']['access_admin_panel']){
  626. $main_content .= '
  627. <div class="SmallBox">
  628. <div class="MessageContainer">
  629. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);"></div>
  630. <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
  631. <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
  632. <div class="Message">
  633. <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></div>
  634. <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></div>
  635. <table class="HintBox">
  636. <tbody>
  637. <tr>
  638. <td>
  639. <p><b>Admin Panel</b></p>
  640. <p>Click <a href="?subtopic=cpanel">here</a> to go your new <strong>Admin Panel</strong></p>
  641. </td>
  642. </tr>
  643. <tr></tr>
  644. </tbody>
  645. </table>
  646. </div>
  647. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);"></div>
  648. <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
  649. <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
  650. </div>
  651. </div>
  652. <br>';
  653. }else{
  654. $main_content .= '
  655. <div class="SmallBox">
  656. <div class="MessageContainer">
  657. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);"></div>
  658. <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
  659. <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
  660. <div class="Message">
  661. <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></div>
  662. <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></div>
  663. <table class="HintBox">
  664. <tbody>
  665. <tr>
  666. <td>
  667. <p><b>New Account Management</b></p>
  668. <p>This is the main page of managing your account, here you will have the key to your account information displayed and updated, enjoy! </p>
  669. </td>
  670. </tr>
  671. <tr></tr>
  672. </tbody>
  673. </table>
  674. </div>
  675. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);"></div>
  676. <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
  677. <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
  678. </div>
  679. </div>
  680. <br>';
  681. }
  682. }
  683. //Here finish our new account management
  684.  
  685. if($action == "manage")
  686. {
  687. $account_reckey = $account_logged->getCustomField("key");
  688. $dataNow = $account_logged->getCustomField('vip_time');
  689. if($account_logged->getCustomField('vip_time') > 0)
  690. $account_status = '<b><font color="#00CD00">VIP Account, '. floor($dataNow) .' days left</font></b>';
  691. else
  692. $account_status = '<b><font color="red">Free Account</font></b>';
  693. if(empty($account_reckey))
  694. $account_registred = '<b><font color="red">No</font></b>';
  695. else
  696. if($config['site']['generate_new_reckey'] && $config['site']['send_emails'])
  697. $account_registred = '<b><font color="green">Yes ( <a href="?subtopic=accountmanagement&action=newreckey"> Buy new Rec key </a> )</font></b>';
  698. else
  699. $account_registred = '<b><font color="green">Yes</font></b>';
  700.  
  701. $account_created = $account_logged->getCreateDate();
  702. $account_email = $account_logged->getEMail();
  703. $account_email_new_time = $account_logged->getCustomField("email_new_time");
  704. if($account_email_new_time > 1)
  705. $account_email_new = $account_logged->getCustomField("email_new");
  706. $account_rlname = $account_logged->getRLName();
  707. $account_location = $account_logged->getLocation();
  708.  
  709. $main_content .= '
  710. <div class="SmallBox" >
  711. <div class="MessageContainer" >
  712. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
  713. <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  714. <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  715. <div class="Message" >
  716. <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" />
  717. </div>
  718. <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
  719. <table style="width:100%;" >
  720. <td style="width:100%;text-align:center;" >
  721. <nobr>[<a href="#General+Information" >General Information</a>]</nobr>
  722. <nobr>[<a href="#Registration" >Registration</a>]</nobr>
  723. </td>
  724. <td>
  725. <form action="?subtopic=shopsystem" method="post" style="padding:0px;margin:0px;" >
  726. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton_green.gif)" >
  727. <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_green_over.gif);" ></div>
  728. <input class="ButtonText" type="image" name="Get Premium" alt="Get Premium" src="'.$layout_name.'/images/buttons/_sbutton_getpremium.gif" >
  729. </div>
  730. </div>
  731. </form>
  732. <div style="font-size:1px;height:4px;" ></div>
  733. <table border="0" cellspacing="0" cellpadding="0" >
  734. <form action="?subtopic=accountmanagement" method="post" >
  735. <tr>
  736. <td style="border:0px;" >
  737. <input type="hidden" name=page value=overview >
  738. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" >
  739. <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
  740. <input class="ButtonText" type="image" name="Overview" alt="Overview" src="'.$layout_name.'/images/buttons/_sbutton_overview.gif" >
  741. </div>
  742. </div>
  743. </td>
  744. </tr>
  745. </form>
  746. </table>
  747. </td>
  748. </tr>
  749. </table>
  750. </div>
  751. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
  752. <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  753. <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  754. </div>
  755. </div><br/>';
  756. $main_content .= '
  757. <a name="General+Information" ></a>
  758. <div class="TopButtonContainer" >
  759. <div class="TopButton" >
  760. <a href="#top" >
  761. <image style="border:0px;" src="'.$layout_name.'/images/content/back-to-top.gif" />
  762. </a>
  763. </div>
  764. </div>
  765. <div class="TableContainer" >
  766. <table class="Table3" cellpadding="0" cellspacing="0" >
  767. <div class="CaptionContainer" >
  768. <div class="CaptionInnerContainer" >
  769. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  770. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  771. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  772. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  773. <div class="Text" >General Information</div>
  774. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  775. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  776. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  777. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  778. </div>
  779. </div>
  780. <tr>
  781. <td>
  782. <div class="InnerTableContainer" >
  783. <table style="width:100%;" >
  784. <tr>
  785. <td>
  786. <div class="TableShadowContainerRightTop" >
  787. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div>
  788. </div>
  789. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" >
  790. <div class="TableContentContainer" >
  791. <table class="TableContent" width="100%" >
  792. <tr style="background-color:#D4C0A1;" >
  793. <td class="LabelV" >Account Name:</td>
  794. <td style="width:90%;" >
  795. <div style="position:relative;width:100%;" >
  796. <span id="DisplayAccountID" >'.str_repeat('*', strlen(htmlspecialchars($account_logged->getName()))).'</span>
  797. <span id="MaskedAccountID" style="visibility:hidden;display:none" >'.str_repeat('*', strlen(htmlspecialchars($account_logged->getName()))).'</span>
  798. <span id="ReadableAccountID" style="visibility:hidden;display:none" >'.htmlspecialchars($account_logged->getName()).'</span>
  799. <img id="ButtonAccountID" onMouseDown="ToggleMaskedText(\'AccountID\');" style="position:absolute;right:0px;top:2px;cursor:pointer;" src="'.$layout_name.'/images/general/show.gif" />
  800. </div>
  801. </td>
  802. </tr>
  803. <tr style="background-color:#F1E0C6;" >
  804. <td class="LabelV" >Email Address:</td>
  805. <td style="width:90%;" >
  806. <div style="position:relative;width:100%;" >
  807. <span id="DisplayEMail" >'.str_repeat('*', strlen(htmlspecialchars($account_email))).'</span>
  808. <span id="MaskedEMail" style="visibility:hidden;display:none" >'.str_repeat('*', strlen(htmlspecialchars($account_email))).'</span>
  809. <span id="ReadableEMail" style="visibility:hidden;display:none" >'.htmlspecialchars($account_email).'</span>
  810. <img id="ButtonEMail" onMouseDown="ToggleMaskedText(\'EMail\');" style="position:absolute;right:0px;top:2px;cursor:pointer;" src="'.$layout_name.'/images/general/show.gif" />
  811. </div>
  812. </td>
  813. </tr>
  814. <tr style="background-color:#D4C0A1;" >
  815. <td class="LabelV" >Created:</td>
  816. <td>'.date("M d Y, G:i:s", $account_created).'</td>
  817. </tr>
  818. <tr style="background-color:#F1E0C6;" >
  819. <td class="LabelV" >Last Login:</td>
  820. <td>'.date("M d Y, G:i:s", time()).'</td>
  821. </tr>
  822. <tr style="background-color:#D4C0A1;" >
  823. <td class="LabelV" >Account Status:</td>
  824. <td>'.$account_status;
  825. if($account_logged->getCustomField('premdays')){
  826.  
  827. $main_content .= '<br/><font style="font-size:8pt">(You still have ' .($account_logged->getCustomField('premdays')). ' days remaining.)</font>';
  828. }else{
  829. $main_content .= '<br/><font style="font-size:8pt">(You still have ' .($account_logged->getCustomField('premdays')). ' days remaining.)</font>';
  830. }
  831. $main_content .= '
  832. </td>
  833. </tr>
  834. </table>
  835. </div>
  836. </div>
  837. <div class="TableShadowContainer" >
  838. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" >
  839. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div>
  840. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div>
  841. </div>
  842. </div>
  843. </td>
  844. </tr>
  845. <tr>
  846. <td>
  847. <table class="InnerTableButtonRow" cellpadding="0" cellspacing="0" >
  848. <tr>
  849. <td>
  850. <table border="0" cellspacing="0" cellpadding="0" >
  851. <form action="?subtopic=accountmanagement&action=changepassword" method="post" >
  852. <tr>
  853. <td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" >
  854. <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
  855. <input class="ButtonText" type="image" name="Change Password" alt="Change Password" src="'.$layout_name.'/images/buttons/_sbutton_changepassword.gif" >
  856. </div>
  857. </div>
  858. </td>
  859. </tr>
  860. </form>
  861. </table>
  862. <td></td>
  863. <td>
  864. <table class="InnerTableButtonRow" cellpadding="0" cellspacing="0" >
  865. <form action="?subtopic=accountmanagement&action=changeemail" method="post" >
  866. <tr>
  867. <td style="border:0px;" ><input type="hidden" name=step value=changename >
  868. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" >
  869. <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
  870. <input class="ButtonText" type="image" name="Change Email" alt="Rename Account" src="'.$layout_name.'/images/buttons/_sbutton_changeemail.gif" >
  871. </div>
  872. </div>
  873. </td>
  874. </tr>
  875. </form>
  876. </table>
  877. </td>
  878. </tr>
  879. </table>
  880. </td>
  881. </tr>
  882. </table>
  883. </div>
  884. </table>
  885. </div>
  886. </td>
  887. </tr><br/><br/>';
  888. if($account_email_new_time > 1)
  889. if($account_email_new_time < time())
  890. $account_email_change = '<br>(You can accept <b>'.htmlspecialchars($account_email_new).'</b> as a new email.)';
  891. else
  892. {
  893. $account_email_change = ' <br>You can accept <b>new e-mail after '.date("j F Y", $account_email_new_time).".</b>";
  894.  
  895. $main_content .= '
  896. <div class="SmallBox" >
  897. <div class="MessageContainer" >
  898. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
  899. <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  900. <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  901. <div class="Message" >
  902. <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
  903. <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
  904. <table>
  905. <tr>
  906. <td class="LabelV" >Note:</td>
  907. <td style="width:100%;" >A request has been submitted to change the email address of this account to <b>'.htmlspecialchars($account_email_new).'</b>. After <b>'.date("j F Y, G:i:s", $account_email_new_time).'</b> you can accept the new email address and finish the process. Please cancel the request if you do not want your email address to be changed! Also cancel the request if you have no access to the new email address!</td>
  908. </tr>
  909. </table>
  910. <div align="center" >
  911. <table border="0" cellspacing="0" cellpadding="0" >
  912. <form action="?subtopic=accountmanagement&action=changeemail" method="post" >
  913. <tr>
  914. <td style="border:0px;" >
  915. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" >
  916. <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" >
  917. <div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
  918. <input class="ButtonText" type="image" name="Edit" alt="Edit" src="'.$layout_name.'/images/buttons/_sbutton_edit.gif" >
  919. </div>
  920. </div>
  921. </td>
  922. </tr>
  923. </form>
  924. </table>
  925. </div>
  926. </div>
  927. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
  928. <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  929. <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  930. </div>
  931. </div>
  932. <br/><br/>';
  933. }
  934.  
  935. //REGISTRATION
  936. $main_content .= '
  937. <a name="Registration" ></a>
  938. <div class="TopButtonContainer" >
  939. <div class="TopButton" >
  940. <a href="#top" >
  941. <image style="border:0px;" src="'.$layout_name.'/images/content/back-to-top.gif" />
  942. </a>
  943. </div>
  944. </div>
  945. <div class="TableContainer" >
  946. <table class="Table5" cellpadding="0" cellspacing="0" >
  947. <div class="CaptionContainer" >
  948. <div class="CaptionInnerContainer" >
  949. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  950. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  951. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  952. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  953. <div class="Text" >Registration</div>
  954. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  955. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  956. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  957. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  958. </div>
  959. </div>
  960. <tr>
  961. <td>
  962. <div class="InnerTableContainer" >
  963. <table style="width:100%;" >
  964. <tr>
  965. <td>
  966. <div class="TableShadowContainerRightTop" >
  967. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div>
  968. </div>
  969. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" >
  970. <div class="TableContentContainer" >
  971. <table class="TableContent" width="100%" >
  972. <tr>
  973. <td>
  974. <table style="width:100%;">
  975. <tr>
  976. <td class="LabelV" >Real Name:</td>
  977. <td style="width:90%;" >'.$account_rlname.'</td>
  978. </tr>
  979. <tr>
  980. <td class="LabelV" >Location:</td>
  981. <td style="width:90%;" >'.$account_location.'</td>
  982. </tr>
  983. </table>
  984. </td>
  985. <td align=right>
  986. <table border="0" cellspacing="0" cellpadding="0" >
  987. <form action="?subtopic=accountmanagement&action=changeinfo" method="post" >
  988. <tr>
  989. <td style="border:0px;" >
  990. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" >
  991. <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" >
  992. <div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
  993. <input class="ButtonText" type="image" name="Edit" alt="Edit" src="'.$layout_name.'/images/buttons/_sbutton_edit.gif" >
  994. </div>
  995. </div>
  996. </td>
  997. </tr>
  998. </form>
  999. </table>
  1000. </td>
  1001. </tr>
  1002. </table>
  1003. </div>
  1004. </div>
  1005. <div class="TableShadowContainer" >
  1006. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" >
  1007. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div>
  1008. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div>
  1009. </div>
  1010. </div>
  1011. </td>
  1012. </tr>
  1013. </table>
  1014. </div>
  1015. </table>
  1016. </div>
  1017. </td>
  1018. </tr><br/>';
  1019. }
  1020. //########### CHANGE PASSWORD ##########
  1021. if($action == "changepassword") {
  1022. $new_password = trim($_POST['newpassword']);
  1023. $new_password2 = trim($_POST['newpassword2']);
  1024. $old_password = trim($_POST['oldpassword']);
  1025. if(empty($new_password) && empty($new_password2) && empty($old_password))
  1026. {
  1027. $main_content .= 'Please enter your current password and a new password. For your security, please enter the new password twice.<br/><br/><form action="?subtopic=accountmanagement&action=changepassword" method="post" ><div class="TableContainer" ><table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Change Password</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div> <tr> <td> <div class="InnerTableContainer" ><table style="width:100%;" ><tr><td class="LabelV" ><span >New Password:</span></td><td style="width:90%;" ><input type="password" name="newpassword" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >New Password Again:</span></td><td><input type="password" name="newpassword2" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >Current Password:</span></td><td><input type="password" name="oldpassword" size="30" maxlength="29" ></td></tr></table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
  1028. }
  1029. else
  1030. {
  1031. if(empty($new_password) || empty($new_password2) || empty($old_password))
  1032. {
  1033. $show_msgs[] = "Please fill in form.";
  1034. }
  1035. if($new_password != $new_password2)
  1036. {
  1037. $show_msgs[] = "The new passwords do not match!";
  1038. }
  1039. if(empty($show_msgs))
  1040. {
  1041. if(!check_password($new_password))
  1042. {
  1043. $show_msgs[] = "New password contains illegal chars (a-z, A-Z and 0-9 only!) or lenght.";
  1044. }
  1045. if(!$account_logged->isValidPassword($old_password))
  1046. {
  1047. $show_msgs[] = "Current password is incorrect!";
  1048. }
  1049. }
  1050. if(!empty($show_msgs))
  1051. {
  1052. //show errors
  1053. $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>';
  1054. foreach($show_msgs as $show_msg) {
  1055. $main_content .= '<li>'.$show_msg;
  1056. }
  1057. $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>';
  1058. //show form
  1059. $main_content .= 'Please enter your current password and a new password. For your security, please enter the new password twice.<br/><br/><form action="?subtopic=accountmanagement&action=changepassword" method="post" ><div class="TableContainer" ><table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Change Password</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >New Password:</span></td><td style="width:90%;" ><input type="password" name="newpassword" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >New Password Again:</span></td><td><input type="password" name="newpassword2" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >Current Password:</span></td><td><input type="password" name="oldpassword" size="30" maxlength="29" ></td></tr></table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
  1060. }
  1061. else
  1062. {
  1063. $org_pass = $new_password;
  1064. $account_logged->setPassword($new_password);
  1065. $account_logged->save();
  1066. $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Password Changed</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>Your password has been changed.';
  1067. if($config['site']['send_emails'] && $config['site']['send_mail_when_change_password'])
  1068. {
  1069. $mailBody = '<html>
  1070. <body>
  1071. <h3>Password to account changed!</h3>
  1072. <p>You or someone else changed password to your account on server <a href="'.$config['server']['url'].'"><b>'.htmlspecialchars($config['server']['serverName']).'</b></a>.</p>
  1073. <p>New password: <b>'.htmlspecialchars($org_pass).'</b></p>
  1074. </body>
  1075. </html>';
  1076. $mail = new PHPMailer();
  1077. if ($config['site']['smtp_enabled'])
  1078. {
  1079. $mail->IsSMTP();
  1080. $mail->Host = $config['site']['smtp_host'];
  1081. $mail->Port = (int)$config['site']['smtp_port'];
  1082. $mail->SMTPAuth = $config['site']['smtp_auth'];
  1083. $mail->Username = $config['site']['smtp_user'];
  1084. $mail->Password = $config['site']['smtp_pass'];
  1085. }
  1086. else
  1087. $mail->IsMail();
  1088. $mail->IsHTML(true);
  1089. $mail->From = $config['site']['mail_address'];
  1090. $mail->AddAddress($account_logged->getEMail());
  1091. $mail->Subject = $config['server']['serverName']." - Changed password";
  1092. $mail->Body = $mailBody;
  1093. if($mail->Send())
  1094. $main_content .= '<br /><small>Your new password were send on email address <b>'.htmlspecialchars($account_logged->getEMail()).'</b>.</small>';
  1095. else
  1096. $main_content .= '<br /><small>An error occorred while sending email with password!</small>';
  1097. }
  1098. $main_content .= '</td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
  1099. $_SESSION['password'] = $new_password;
  1100. }
  1101. }
  1102. }
  1103.  
  1104. //############# CHANGE E-MAIL ###################
  1105. if($action == "changeemail")
  1106. {
  1107. $account_email_new_time = $account_logged->getCustomField("email_new_time");
  1108. if($account_email_new_time > 10) {$account_email_new = $account_logged->getCustomField("email_new"); }
  1109. if($account_email_new_time < 10)
  1110. {
  1111. if($_POST['changeemailsave'] == 1)
  1112. {
  1113. $account_email_new = trim($_POST['new_email']);
  1114. $post_password = trim($_POST['password']);
  1115. if(empty($account_email_new))
  1116. {
  1117. $change_email_errors[] = "Please enter your new email address.";
  1118. }
  1119. else
  1120. {
  1121. if(!check_mail($account_email_new))
  1122. {
  1123. $change_email_errors[] = "E-mail address is not correct.";
  1124. }
  1125. }
  1126. if(empty($post_password))
  1127. {
  1128. $change_email_errors[] = "Please enter password to your account.";
  1129. }
  1130. else
  1131. {
  1132. if(!$account_logged->isValidPassword($post_password))
  1133. {
  1134. $change_email_errors[] = "Wrong password to account.";
  1135. }
  1136. }
  1137. if(empty($change_email_errors))
  1138. {
  1139. $account_email_new_time = time() + $config['site']['email_days_to_change'] * 24 * 3600;
  1140. $account_logged->set("email_new", $account_email_new);
  1141. $account_logged->set("email_new_time", $account_email_new_time);
  1142. $account_logged->save();
  1143. $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >New Email Address Requested</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>You have requested to change your email address to <b>'.htmlspecialchars($account_email_new).'</b>. The actual change will take place after <b>'.date("j F Y, G:i:s", $account_email_new_time).'</b>, during which you can cancel the request at any time.</td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
  1144. }
  1145. else
  1146. {
  1147. //show errors
  1148. $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>';
  1149. foreach($change_email_errors as $change_email_error)
  1150. {
  1151. $main_content .= '<li>'.$change_email_error.'</li>';
  1152. }
  1153. $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>';
  1154. //show form
  1155. $main_content .= 'Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. <b>For security reasons, the actual change will be finalised after a waiting period of '.$config['site']['email_days_to_change'].' days.</b><br/><br/><form action="?subtopic=accountmanagement&action=changeemail" method="post" ><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change Email Address</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ></tr><td class="LabelV" ><span >New Email Address:</span></td> <td style="width:90%;" ><input name="new_email" value="'.htmlspecialchars($_POST['new_email']).'" size="30" maxlength="50" ></td><tr></tr><td class="LabelV" ><span >Password:</span></td> <td><input type="password" name="password" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><input type="hidden" name=changeemailsave value=1 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
  1156. }
  1157. }
  1158. else
  1159. {
  1160. $main_content .= 'Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. <b>For security reasons, the actual change will be finalised after a waiting period of '.$config['site']['email_days_to_change'].' days.</b><br/><br/><form action="?subtopic=accountmanagement&action=changeemail" method="post" ><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change Email Address</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ></tr><td class="LabelV" ><span >New Email Address:</span></td> <td style="width:90%;" ><input name="new_email" value="'.htmlspecialchars($_POST['new_email']).'" size="30" maxlength="50" ></td><tr></tr><td class="LabelV" ><span >Password:</span></td> <td><input type="password" name="password" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><input type="hidden" name=changeemailsave value=1 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
  1161. }
  1162. }
  1163. else
  1164. {
  1165. if($account_email_new_time < time())
  1166. {
  1167. if($_POST['changeemailsave'] == 1)
  1168. {
  1169. $account_logged->set("email_new", "");
  1170. $account_logged->set("email_new_time", 0);
  1171. $account_logged->setEmail($account_email_new);
  1172. $account_logged->save();
  1173. $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Email Address Change Accepted</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>You have accepted <b>'.htmlspecialchars($account_logged->getEmail()).'</b> as your new email adress.</td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
  1174. }
  1175. else
  1176. {
  1177. $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Email Address Change Accepted</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>Do you accept <b>'.htmlspecialchars($account_email_new).'</b> as your new email adress?</td></tr> </table> </div> </table></div></td></tr><br /><table width="100%"><tr><td width="30">&nbsp;</td><td align=left><form action="?subtopic=accountmanagement&action=changeemail" method="post"><input type="hidden" name="changeemailsave" value=1 ><INPUT TYPE=image NAME="I Agree" SRC="'.$layout_name.'/images/buttons/sbutton_iagree.gif" BORDER=0 WIDTH=120 HEIGHT=17></FORM></td><td align=left><form action="?subtopic=accountmanagement&action=changeemail" method="post"><input type="hidden" name="emailchangecancel" value=1 ><input type=image name="Cancel" src="'.$layout_name.'/images/buttons/sbutton_cancel.gif" BORDER=0 WIDTH=120 HEIGHT=17></form></td><td align=right><form action="?subtopic=accountmanagement" method="post" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form></td><td width="30">&nbsp;</td></tr></table>';
  1178. }
  1179. }
  1180. else
  1181. {
  1182. $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change of Email Address</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>A request has been submitted to change the email address of this account to <b>'.htmlspecialchars($account_email_new).'</b>.<br/>The actual change will take place on <b>'.date("j F Y, G:i:s", $account_email_new_time).'</b>.<br>If you do not want to change your email address, please click on "Cancel".</td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=changeemail" method="post" ><tr><td style="border:0px;" ><input type="hidden" name="emailchangecancel" value=1 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Cancel" alt="Cancel" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" ></div></div></td></tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
  1183. }
  1184. }
  1185. if($_POST['emailchangecancel'] == 1)
  1186. {
  1187. $account_logged->set("email_new", "");
  1188. $account_logged->set("email_new_time", 0);
  1189. $account_logged->save();
  1190. $main_content = '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Email Address Change Cancelled</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>Your request to change the email address of your account has been cancelled. The email address will not be changed.</td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
  1191. }
  1192. }
  1193.  
  1194. //########### CHANGE PUBLIC INFORMATION (about account owner) ######################
  1195. if($action == "changeinfo") {
  1196. $new_rlname = htmlspecialchars(trim($_POST['info_rlname']));
  1197. $new_location = htmlspecialchars(trim($_POST['info_location']));
  1198. if($_POST['changeinfosave'] == 1) {
  1199. //save data from form
  1200. $account_logged->set("rlname", $new_rlname);
  1201. $account_logged->set("location", $new_location);
  1202. $account_logged->save();
  1203. $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Public Information Changed</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>Your public information has been changed.</td></tr> </table> </div> </table></div></td></tr><br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
  1204. }
  1205. else
  1206. {
  1207. //show form
  1208. $account_rlname = $account_logged->getCustomField("rlname");
  1209. $account_location = $account_logged->getCustomField("location");
  1210. $main_content .= 'Here you can tell other players about yourself. This information will be displayed alongside the data of your characters. If you do not want to fill in a certain field, just leave it blank.<br/><br/><form action="?subtopic=accountmanagement&action=changeinfo" method=post><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change Public Information</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" >Real Name:</td><td style="width:90%;" ><input name="info_rlname" value="'.$account_rlname.'" size="30" maxlength="50" ></td></tr><tr><td class="LabelV" >Location:</td><td><input name="info_location" value="'.$account_location.'" size="30" maxlength="50" ></td></tr></table> </div> </table></div></td></tr><br/><table width="100%"><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><input type="hidden" name="changeinfosave" value="1" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
  1211. }
  1212. }
  1213.  
  1214. //############## GENERATE RECOVERY KEY ###########
  1215. if($action == "registeraccount")
  1216. {
  1217. $reg_password = trim($_POST['reg_password']);
  1218. $old_key = $account_logged->getCustomField("key");
  1219. if($_POST['registeraccountsave'] == "1")
  1220. {
  1221. if($account_logged->isValidPassword($reg_password))
  1222. {
  1223. if(empty($old_key))
  1224. {
  1225. $dontshowtableagain = 1;
  1226. $acceptedChars = 'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789';
  1227. $max = strlen($acceptedChars)-1;
  1228. $new_rec_key = NULL;
  1229. // 10 = number of chars in generated key
  1230. for($i=0; $i < 10; $i++) {
  1231. $cnum[$i] = $acceptedChars{mt_rand(0, $max)};
  1232. $new_rec_key .= $cnum[$i];
  1233. }
  1234. $account_logged->set("key", $new_rec_key);
  1235. $account_logged->save();
  1236. $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Account Registered</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" >Thank you for registering your account! You can now recover your account if you have lost access to the assigned email address by using the following<br/><br/><font size="5">&nbsp;&nbsp;&nbsp;<b>Recovery Key: '.htmlspecialchars($new_rec_key).'</b></font><br/><br/><br/><b>Important:</b><ul><li>Write down this recovery key carefully.</li><li>Store it at a safe place!</li>';
  1237. if($config['site']['send_emails'] && $config['site']['send_mail_when_generate_reckey'])
  1238. {
  1239. $mailBody = '<html>
  1240. <body>
  1241. <h3>New recovery key!</h3>
  1242. <p>You or someone else generated recovery key to your account on server <a href="'.$config['server']['url'].'"><b>'.htmlspecialchars($config['server']['serverName']).'</b></a>.</p>
  1243. <p>Recovery key: <b>'.htmlspecialchars($new_rec_key).'</b></p>
  1244. </body>
  1245. </html>';
  1246. $mail = new PHPMailer();
  1247. if ($config['site']['smtp_enabled'])
  1248. {
  1249. $mail->IsSMTP();
  1250. $mail->Host = $config['site']['smtp_host'];
  1251. $mail->Port = (int)$config['site']['smtp_port'];
  1252. $mail->SMTPAuth = $config['site']['smtp_auth'];
  1253. $mail->Username = $config['site']['smtp_user'];
  1254. $mail->Password = $config['site']['smtp_pass'];
  1255. }
  1256. else
  1257. $mail->IsMail();
  1258. $mail->IsHTML(true);
  1259. $mail->From = $config['site']['mail_address'];
  1260. $mail->AddAddress($account_logged->getEMail());
  1261. $mail->Subject = $config['server']['serverName']." - recovery key";
  1262. $mail->Body = $mailBody;
  1263. if($mail->Send())
  1264. $main_content .= '<br /><small>Your recovery key were send on email address <b>'.htmlspecialchars($account_logged->getEMail()).'</b>.</small>';
  1265. else
  1266. $main_content .= '<br /><small>An error occorred while sending email with recovery key! You will not receive e-mail with this key.</small>';
  1267. }
  1268. $main_content .= '</ul> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
  1269. }
  1270. else
  1271. $reg_errors[] = 'Your account is already registred.';
  1272. }
  1273. else
  1274. $reg_errors[] = 'Wrong password to account.';
  1275. }
  1276. if($dontshowtableagain != 1)
  1277. {
  1278. //show errors if not empty
  1279. if(!empty($reg_errors))
  1280. {
  1281. $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>';
  1282. foreach($reg_errors as $reg_error)
  1283. $main_content .= '<li>'.$reg_error;
  1284. $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>';
  1285. }
  1286. //show form
  1287. $main_content .= 'To generate recovery key for your account please enter your password.<br/><br/><form action="?subtopic=accountmanagement&action=registeraccount" method="post" ><input type="hidden" name="registeraccountsave" value="1"><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Generate recovery key</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Password:</td><td><input type="password" name="reg_password" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
  1288. }
  1289. }
  1290.  
  1291. //############## GENERATE NEW RECOVERY KEY ###########
  1292. if($action == "newreckey")
  1293. {
  1294. $reg_password = trim($_POST['reg_password']);
  1295. $reckey = $account_logged->getCustomField("key");
  1296. if((!$config['site']['generate_new_reckey'] || !$config['site']['send_emails']) || empty($reckey))
  1297. $main_content .= 'You cant get new rec key';
  1298. else
  1299. {
  1300. $points = $account_logged->getCustomField('premdays');
  1301. if($_POST['registeraccountsave'] == "1")
  1302. {
  1303. if($account_logged->isValidPassword($reg_password))
  1304. {
  1305. if($points >= $config['site']['generate_new_reckey_price'])
  1306. {
  1307. $dontshowtableagain = 1;
  1308. $acceptedChars = 'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789';
  1309. $max = strlen($acceptedChars)-1;
  1310. $new_rec_key = NULL;
  1311. // 10 = number of chars in generated key
  1312. for($i=0; $i < 10; $i++) {
  1313. $cnum[$i] = $acceptedChars{mt_rand(0, $max)};
  1314. $new_rec_key .= $cnum[$i];
  1315. }
  1316. $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Account Registered</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><ul>';
  1317. $mailBody = '<html>
  1318. <body>
  1319. <h3>New recovery key!</h3>
  1320. <p>You or someone else generated recovery key to your account on server <a href="'.$config['server']['url'].'"><b>'.htmlspecialchars($config['server']['serverName']).'</b></a>.</p>
  1321. <p>Recovery key: <b>'.htmlspecialchars($new_rec_key).'</b></p>
  1322. </body>
  1323. </html>';
  1324. $mail = new PHPMailer();
  1325. if ($config['site']['smtp_enabled'])
  1326. {
  1327. $mail->IsSMTP();
  1328. $mail->Host = $config['site']['smtp_host'];
  1329. $mail->Port = (int)$config['site']['smtp_port'];
  1330. $mail->SMTPAuth = $config['site']['smtp_auth'];
  1331. $mail->Username = $config['site']['smtp_user'];
  1332. $mail->Password = $config['site']['smtp_pass'];
  1333. }
  1334. else
  1335. $mail->IsMail();
  1336. $mail->IsHTML(true);
  1337. $mail->From = $config['site']['mail_address'];
  1338. $mail->AddAddress($account_logged->getEMail());
  1339. $mail->Subject = $config['server']['serverName']." - new recovery key";
  1340. $mail->Body = $mailBody;
  1341. if($mail->Send())
  1342. {
  1343. $account_logged->set("key", $new_rec_key);
  1344. $account_logged->set("premdays", $account_logged->get("premdays")-$config['site']['generate_new_reckey_price']);
  1345. $account_logged->save();
  1346. $main_content .= '<br />Your recovery key were send on email address <b>'.htmlspecialchars($account_logged->getEMail()).'</b> for '.$config['site']['generate_new_reckey_price'].' premium points.';
  1347. }
  1348. else
  1349. $main_content .= '<br />An error occorred while sending email ( <b>'.htmlspecialchars($account_logged->getEMail()).'</b> ) with recovery key! Recovery key not changed. Try again.';
  1350. $main_content .= '</ul> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
  1351. }
  1352. else
  1353. $reg_errors[] = 'You need '.$config['site']['generate_new_reckey_price'].' premium points to generate new recovery key. You have <b>'.$points.'<b> premium points.';
  1354. }
  1355. else
  1356. $reg_errors[] = 'Wrong password to account.';
  1357. }
  1358. if($dontshowtableagain != 1)
  1359. {
  1360. //show errors if not empty
  1361. if(!empty($reg_errors))
  1362. {
  1363. $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>';
  1364. foreach($reg_errors as $reg_error)
  1365. $main_content .= '<li>'.$reg_error.'</li>';
  1366. $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>';
  1367. }
  1368. //show form
  1369. $main_content .= 'To generate NEW recovery key for your account please enter your password.<br/><font color="red"><b>New recovery key cost '.$config['site']['generate_new_reckey_price'].' Premium Points.</font> You have '.$points.' premium points. You will receive e-mail with this recovery key.</b><br/><form action="?subtopic=accountmanagement&action=newreckey" method="post" ><input type="hidden" name="registeraccountsave" value="1"><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Generate recovery key</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Password:</td><td><input type="password" name="reg_password" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
  1370. }
  1371. }
  1372. }
  1373.  
  1374.  
  1375.  
  1376. //###### CHANGE CHARACTER COMMENT ######
  1377. if($action == "changecomment")
  1378. {
  1379. $player_name = $_REQUEST['name'];
  1380. $signature = htmlspecialchars(substr(trim($_POST['signature']),0,2000));
  1381. $new_comment = htmlspecialchars(substr(trim($_POST['comment']),0,2000));
  1382. $new_hideacc = (int) $_POST['accountvisible'];
  1383. if(check_name($player_name))
  1384. {
  1385. $player = new Player();
  1386. $player->find($player_name);
  1387. if($player->isLoaded())
  1388. {
  1389. $player_account = $player->getAccount();
  1390. if($account_logged->getId() == $player_account->getId())
  1391. {
  1392. if($_POST['changecommentsave'] == 1)
  1393. {
  1394. $player->set("hide_char", $new_hideacc);
  1395. $player->set("comment", $new_comment);
  1396. $player->set("signature", $signature);
  1397. $player->save();
  1398. $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Information Changed</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character information has been changed.</td></tr> </table> </div> </table></div></td></tr><br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
  1399. }
  1400. else
  1401. {
  1402. $main_content .= '
  1403. Here you can see and edit the information about your character.<br/>If you do not want to specify a certain field, just leave it blank.<br/><br/>
  1404. <form action="?subtopic=accountmanagement&action=changecomment" method="post" >
  1405. <div class="TableContainer" >
  1406. <table class="Table5" cellpadding="0" cellspacing="0" >
  1407. <div class="CaptionContainer" >
  1408. <div class="CaptionInnerContainer" >
  1409. span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  1410. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  1411. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  1412. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  1413. <div class="Text" >Edit Character Information</div>
  1414. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  1415. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  1416. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  1417. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  1418. </div>
  1419. </div>
  1420. <tr>
  1421. <td>
  1422. <div class="InnerTableContainer" >
  1423. <table style="width:100%;" >
  1424. <tr>
  1425. <td>
  1426. <div class="TableShadowContainerRightTop" >
  1427. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div>
  1428. </div>
  1429. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" >
  1430. <div class="TableContentContainer" >
  1431. <table class="TableContent" width="100%" >
  1432. <tr>
  1433. <td class="LabelV" >Name:</td>
  1434. <td style="width:80%;" >'.htmlspecialchars($player_name).'</td>
  1435. </tr>
  1436. <tr>
  1437. <td class="LabelV" >Hide Account:</td><td>';
  1438. if($player->getCustomField("hide_char") == 1)
  1439. {
  1440. $main_content .= '
  1441. <input type="checkbox" name="accountvisible" value="1" checked="checked">';
  1442. }
  1443. else
  1444. {
  1445. $main_content .= '
  1446. <input type="checkbox" name="accountvisible" value="1" >';
  1447. }
  1448. $main_content .= '
  1449. check to hide your account information
  1450. </td>
  1451. </tr>
  1452. </table>
  1453. </div>
  1454. </div>
  1455. <div class="TableShadowContainer" >
  1456. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" >
  1457. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div> </div>
  1458. </div>
  1459. </td>
  1460. </tr>
  1461. <tr>
  1462. <td>
  1463. <div class="TableShadowContainerRightTop" >
  1464. <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div>
  1465. </div>
  1466. <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" >
  1467. <div class="TableContentContainer" >
  1468. <table class="TableContent" width="100%" >
  1469. <tr>
  1470. <td class="LabelV" ><span >Comment:</span></td>
  1471. <td style="width:80%;" >
  1472. <textarea name="comment" rows="10" cols="50" wrap="virtual" >'.$player->getCustomField("comment").'</textarea><br>
  1473. </td>
  1474. </tr>
  1475. <tr>
  1476. <td class="LabelV" style="white-space:normal;" ><span >Forum Signature:</span></td>
  1477. <td style="width:80%;" >
  1478. <textarea name="signature" rows="4" cols="50" wrap="virtual" >'.$player->getCustomField("signature").'</textarea>
  1479. </td>
  1480. </tr>
  1481. </table>
  1482. </div>
  1483. </div>
  1484. <div class="TableShadowContainer" >
  1485. <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" >
  1486. <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div>
  1487. <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div>
  1488. </div>
  1489. </div>
  1490. </td>
  1491. </tr>
  1492. </td>
  1493. </tr>
  1494. </table>
  1495. </div>
  1496. </table>
  1497. </div>
  1498. </td>
  1499. </tr><br/>
  1500. <table style="width:100%" >
  1501. <tr align="center" >
  1502. <td>
  1503. <table border="0" cellspacing="0" cellpadding="0" >
  1504. <tr>
  1505. <td style="border:0px;" >
  1506. <input type="hidden" name="name" value="'.htmlspecialchars($player->getName()).'">
  1507. <input type="hidden" name="changecommentsave" value="1">
  1508. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
  1509. <input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" >
  1510. </div>
  1511. </div>
  1512. </td>
  1513. <tr>
  1514. </form>
  1515. </table>
  1516. </td>
  1517. <td>
  1518. <table border="0" cellspacing="0" cellpadding="0" >
  1519. <form action="?subtopic=accountmanagement" method="post" >
  1520. <tr>
  1521. <td style="border:0px;" >
  1522. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
  1523. <input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div>
  1524. </td>
  1525. </tr>
  1526.  
  1527. </form>
  1528. </table>
  1529. </td>
  1530. </tr>
  1531. </table>';
  1532. }
  1533. }
  1534. else
  1535. {
  1536. $main_content .= "Error. Character <b>".htmlspecialchars($player_name)."</b> is not on your account.";
  1537. }
  1538. }
  1539. else
  1540. {
  1541. $main_content .= "Error. Character with this name doesn't exist.";
  1542. }
  1543. }
  1544. else
  1545. {
  1546. $main_content .= "Error. Name contain illegal characters.";
  1547. }
  1548. }
  1549.  
  1550. //### DELETE character from account ###
  1551. if($action == "deletecharacter")
  1552. {
  1553. $player_name = trim($_POST['delete_name']);
  1554. $password_verify = trim($_POST['delete_password']);
  1555. if($_POST['deletecharactersave'] == 1)
  1556. {
  1557. if(!empty($player_name) && !empty($password_verify))
  1558. {
  1559. if(check_name($player_name))
  1560. {
  1561. $player = new Player();
  1562. $player->find($player_name);
  1563. if($player->isLoaded())
  1564. {
  1565. $player_account = $player->getAccount();
  1566. if($account_logged->getId() == $player_account->getId())
  1567. {
  1568. if($account_logged->isValidPassword($password_verify))
  1569. {
  1570. if(!$player->isOnline())
  1571. {
  1572. //dont show table "delete character" again
  1573. $dontshowtableagain = 1;
  1574. //delete player
  1575. $player->set('deleted', 1);
  1576. $player->save();
  1577. $main_content .= '
  1578. <div class="TableContainer" >
  1579. <table class="Table1" cellpadding="0" cellspacing="0" >
  1580. <div class="CaptionContainer" >
  1581. <div class="CaptionInnerContainer" >
  1582. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  1583. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  1584. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  1585. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  1586. <div class="Text" >Character Deleted</div>
  1587. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  1588. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  1589. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  1590. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  1591. </div>
  1592. </div>
  1593. <tr>
  1594. <td>
  1595. <div class="InnerTableContainer" >
  1596. <table style="width:100%;" >
  1597. <tr>
  1598. <td>The character <b>'.htmlspecialchars($player_name).'</b> has been deleted.</td>
  1599. </tr>
  1600. </table>
  1601. </div>
  1602. </table>
  1603. </div>
  1604. </td>
  1605. </tr>
  1606. <br>
  1607. <center>
  1608. <table border="0" cellspacing="0" cellpadding="0" >
  1609. <form action="?subtopic=accountmanagement" method="post" >
  1610. <tr>
  1611. <td style="border:0px;" >
  1612. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" >
  1613. <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" >
  1614. <div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
  1615. <input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" >
  1616. </div>
  1617. </div>
  1618. </td>
  1619. </tr>
  1620. </form>
  1621. </table>
  1622. </center>';
  1623. }
  1624. else
  1625. $delete_errors[] = 'This character is online.';
  1626. }
  1627. else
  1628. {
  1629. $delete_errors[] = 'Wrong password to account.';
  1630. }
  1631. }
  1632. else
  1633. {
  1634. $delete_errors[] = 'Character <b>'.htmlspecialchars($player_name).'</b> is not on your account.';
  1635. }
  1636. }
  1637. else
  1638. {
  1639. $delete_errors[] = 'Character with this name doesn\'t exist.';
  1640. }
  1641. }
  1642. else
  1643. {
  1644. $delete_errors[] = 'Name contain illegal characters.';
  1645. }
  1646. }
  1647. else
  1648. {
  1649. $delete_errors[] = 'Character name or/and password is empty. Please fill in form.';
  1650. }
  1651. }
  1652. if($dontshowtableagain != 1)
  1653. {
  1654. if(!empty($delete_errors))
  1655. {
  1656. $main_content .= '
  1657. <div class="SmallBox" >
  1658. <div class="MessageContainer" >
  1659. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
  1660. <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  1661. <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  1662. <div class="ErrorMessage" >
  1663. <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
  1664. <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
  1665. <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div>
  1666. <b>The Following Errors Have Occurred:</b><br/>';
  1667. foreach($delete_errors as $delete_error)
  1668. {
  1669. $main_content .= '<li>'.$delete_error;
  1670. }
  1671. $main_content .= '
  1672. </div>
  1673. <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
  1674. <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  1675. <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
  1676. </div>
  1677. </div><br/>';
  1678. }
  1679. $main_content .= 'To delete this character enter your password and click on "Submit". You can undelete the character within the first 2 months (60 days) after the deletion. After this time the character is deleted for good and cannot be restored anymore!.<br/><br/>
  1680. <form action="?subtopic=accountmanagement&action=deletecharacter" method="post" >
  1681. <input type="hidden" name="deletecharactersave" value="1">
  1682. <div class="TableContainer" >
  1683. <table class="Table1" cellpadding="0" cellspacing="0" >
  1684. <div class="CaptionContainer" >
  1685. <div class="CaptionInnerContainer" >
  1686. <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  1687. <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  1688. <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  1689. <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  1690. <div class="Text" >Delete Character</div>
  1691. <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
  1692. <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
  1693. <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  1694. <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
  1695. </div>
  1696. </div>
  1697. <tr>
  1698. <td>
  1699. <div class="InnerTableContainer" >
  1700. <table style="width:100%;" >
  1701. <tr>
  1702. <td class="LabelV" ><span >Character Name:</td>
  1703. <td style="width:90%;" >
  1704. <input type="hidden" name="delete_name" value="'.$_GET['name'].'" size="30" maxlength="29" >
  1705. <p>'.$_GET['name'].'</p>
  1706. </td>
  1707. </tr>
  1708. <tr>
  1709. <td class="LabelV" ><span >Password:</td>
  1710. <td>
  1711. <input type="password" name="delete_password" size="30" maxlength="29" >
  1712. </td>
  1713. </tr>
  1714. </table>
  1715. </div>
  1716. </table>
  1717. </div>
  1718. </td>
  1719. </tr><br/>
  1720. <table style="width:100%" >
  1721. <tr align="center" >
  1722. <td>
  1723. <table border="0" cellspacing="0" cellpadding="0" >
  1724. <tr>
  1725. <td style="border:0px;" >
  1726. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" >
  1727. <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" >
  1728. <div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
  1729. <input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" >
  1730. </div>
  1731. </div>
  1732. </td>
  1733. <tr>
  1734. </form>
  1735. </table>
  1736. </td>
  1737. <td>
  1738. <table border="0" cellspacing="0" cellpadding="0" >
  1739. <form action="?subtopic=accountmanagement" method="post" >
  1740. <tr>
  1741. <td style="border:0px;" >
  1742. <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" >
  1743. <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" >
  1744. <div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
  1745. <input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" >
  1746. </div>
  1747. </div>
  1748. </td>
  1749. </tr>
  1750. </form>
  1751. </table>
  1752. </td>
  1753. </tr>
  1754. </table>';
  1755. }
  1756. }
  1757.  
  1758.  
  1759. //### UNDELETE character from account ###
  1760. if($action == "undelete")
  1761. {
  1762. $player_name = trim($_GET['name']);
  1763. if(!empty($player_name))
  1764. {
  1765. if(check_name($player_name))
  1766. {
  1767. $player = new Player();
  1768. $player->find($player_name);
  1769. if($player->isLoaded())
  1770. {
  1771. $player_account = $player->getAccount();
  1772. if($account_logged->getId() == $player_account->getId())
  1773. {
  1774. if(!$player->isOnline())
  1775. {
  1776. $player->set('deleted', 0);
  1777. $player->save();
  1778. $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Undeleted</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character <b>'.htmlspecialchars($player_name).'</b> has been undeleted.</td></tr> </table> </div> </table></div></td></tr><br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
  1779. }
  1780. else
  1781. $delete_errors[] = 'This character is online.';
  1782. }
  1783. else
  1784. $delete_errors[] = 'Character <b>'.htmlspecialchars($player_name).'</b> is not on your account.';
  1785. }
  1786. else
  1787. $delete_errors[] = 'Character with this name doesn\'t exist.';
  1788. }
  1789. else
  1790. $delete_errors[] = 'Name contain illegal characters.';
  1791. }
  1792. }
  1793.  
  1794. //## CREATE CHARACTER on account ###
  1795. if($action == "createcharacter")
  1796. {
  1797. if(count($config['site']['worlds']) > 1)
  1798. {
  1799. if(isset($_REQUEST['world']))
  1800. $world_id = (int) $_REQUEST['world'];
  1801. }
  1802. else
  1803. $world_id = 0;
  1804. if(!isset($world_id))
  1805. {
  1806. $main_content .= 'Before you can create character you must select world: ';
  1807. foreach($config['site']['worlds'] as $id => $world_n)
  1808. $main_content .= '<br /><a href="?subtopic=accountmanagement&action=createcharacter&world='.$id.'">- '.htmlspecialchars($world_n).'</a>';
  1809. $main_content .= '<br /><h3><a href="?subtopic=accountmanagement">BACK</a></h3>';
  1810. }
  1811. else
  1812. {
  1813. $main_content .= '<script type="text/javascript">
  1814. var nameHttp;
  1815.  
  1816. function checkName()
  1817. {
  1818. if(document.getElementById("newcharname").value=="")
  1819. {
  1820. document.getElementById("name_check").innerHTML = \'<b><font color="red">Please enter new character name.</font></b>\';
  1821. return;
  1822. }
  1823. nameHttp=GetXmlHttpObject();
  1824. if (nameHttp==null)
  1825. {
  1826. return;
  1827. }
  1828. var newcharname = document.getElementById("newcharname").value;
  1829. var url="?subtopic=ajax_check_name&name=" + newcharname + "&uid="+Math.random();
  1830. nameHttp.onreadystatechange=NameStateChanged;
  1831. nameHttp.open("GET",url,true);
  1832. nameHttp.send(null);
  1833. }
  1834.  
  1835. function NameStateChanged()
  1836. {
  1837. if (nameHttp.readyState==4)
  1838. {
  1839. document.getElementById("name_check").innerHTML=nameHttp.responseText;
  1840. }
  1841. }
  1842. </script>';
  1843. $newchar_name = ucwords(strtolower(trim($_POST['newcharname'])));
  1844. $newchar_sex = $_POST['newcharsex'];
  1845. $newchar_vocation = $_POST['newcharvocation'];
  1846. $newchar_town = $_POST['newchartown'];
  1847. if($_POST['savecharacter'] != 1)
  1848. {
  1849. $main_content .= 'Please choose a name';
  1850. if(count($config['site']['newchar_vocations'][$world_id]) > 1)
  1851. $main_content .= ', vocation';
  1852. $main_content .= ' and sex for your character. <br/>In any case the name must not violate the naming conventions stated in the <a href="?subtopic=tibiarules" target="_blank" >'.htmlspecialchars($config['server']['serverName']).' Rules</a>, or your character might get deleted or name locked.';
  1853. if($account_logged->getPlayersList()->count() >= $config['site']['max_players_per_account'])
  1854. $main_content .= '<b><font color="red"> You have maximum number of characters per account on your account. Delete one before you make new.</font></b>';
  1855. $main_content .= '<br/><br/><form action="?subtopic=accountmanagement&action=createcharacter" method="post" ><input type="hidden" name="world" value="'.$world_id.'" ><input type="hidden" name=savecharacter value="1" ><div class="TableContainer" > <table class="Table3" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Create Character</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div><tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" > <div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr class="LabelH" ><td style="width:50%;" ><span >Name</td><td><span >Sex</td></tr><tr class="Odd" ><td><input id="newcharname" name="newcharname" onkeyup="checkName();" value="'.htmlspecialchars($newchar_name).'" size="30" maxlength="29" ><BR><font size="1" face="verdana,arial,helvetica"><div id="name_check">Please enter your character name.</div></font></td><td>';
  1856. $main_content .= '<input type="radio" name="newcharsex" value="1" ';
  1857. if($newchar_sex == 1)
  1858. $main_content .= 'checked="checked" ';
  1859. $main_content .= '>male<br/>';
  1860. $main_content .= '<input type="radio" name="newcharsex" value="0" ';
  1861. if($newchar_sex == "0")
  1862. $main_content .= 'checked="checked" ';
  1863. $main_content .= '>female<br/></td></tr></table></div></div></table></div>';
  1864. if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1)
  1865. $main_content .= '<div class="InnerTableContainer" > <table style="width:100%;" ><tr>';
  1866. if(count($config['site']['newchar_vocations'][$world_id]) > 1)
  1867. {
  1868. $main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your vocation:</b></td><td><table class="TableContent" width="100%" >';
  1869. foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char)
  1870. {
  1871. $main_content .= '<tr><td><input type="radio" name="newcharvocation" value="'.$char_vocation_key.'" ';
  1872. if($newchar_vocation == $char_vocation_key)
  1873. $main_content .= 'checked="checked" ';
  1874. $main_content .= '>'.htmlspecialchars($vocation_name[0][$char_vocation_key]).'</td></tr>';
  1875. }
  1876. $main_content .= '</table></table></td>';
  1877. }
  1878. if(count($config['site']['newchar_towns'][$world_id]) > 1)
  1879. {
  1880. $main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your city:</b></td><td><table class="TableContent" width="100%" >';
  1881. foreach($config['site']['newchar_towns'][$world_id] as $town_id)
  1882. {
  1883. $main_content .= '<tr><td><input type="radio" name="newchartown" value="'.$town_id.'" ';
  1884. if($newchar_town == $town_id)
  1885. $main_content .= 'checked="checked" ';
  1886. $main_content .= '>'.htmlspecialchars($towns_list[$world_id][$town_id]).'</td></tr>';
  1887. }
  1888. $main_content .= '</table></table></td>';
  1889. }
  1890. if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1)
  1891. $main_content .= '</tr></table></div>';
  1892. $main_content .= '</table></div></td></tr><br/><table style="width:100%;" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
  1893. }
  1894. else
  1895. {
  1896. if(empty($newchar_name))
  1897. $newchar_errors[] = 'Please enter a name for your character!';
  1898. if(empty($newchar_sex) && $newchar_sex != "0")
  1899. $newchar_errors[] = 'Please select the sex for your character!';
  1900. if(count($config['site']['newchar_vocations'][$world_id]) > 1)
  1901. {
  1902. if(empty($newchar_vocation))
  1903. $newchar_errors[] = 'Please select a vocation for your character.';
  1904. }
  1905. else
  1906. $newchar_vocation = $config['site']['newchar_vocations'][$world_id][0];
  1907. if(count($config['site']['newchar_towns'][$world_id]) > 1)
  1908. {
  1909. if(empty($newchar_town))
  1910. $newchar_errors[] = 'Please select a town for your character.';
  1911. }
  1912. else
  1913. $newchar_town = $config['site']['newchar_towns'][$world_id][0];
  1914. if(empty($newchar_errors))
  1915. {
  1916. if(!check_name_new_char($newchar_name))
  1917. $newchar_errors[] = 'This name contains invalid letters, words or format. Please use only a-Z, - , \' and space.';
  1918. if($newchar_sex != 1 && $newchar_sex != "0")
  1919. $newchar_errors[] = 'Sex must be equal <b>0 (female)</b> or <b>1 (male)</b>.';
  1920. if(count($config['site']['newchar_vocations'][$world_id]) > 1)
  1921. {
  1922. $newchar_vocation_check = FALSE;
  1923. foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char)
  1924. if($newchar_vocation == $char_vocation_key)
  1925. $newchar_vocation_check = TRUE;
  1926. if(!$newchar_vocation_check)
  1927. $newchar_errors[] = 'Unknown vocation. Please fill in form again.';
  1928. }
  1929. else
  1930. $newchar_vocation = 0;
  1931. }
  1932. if(empty($newchar_errors))
  1933. {
  1934. $check_name_in_database = new Player();
  1935. $check_name_in_database->find($newchar_name);
  1936. if($check_name_in_database->isLoaded())
  1937. $newchar_errors[] .= 'This name is already used. Please choose another name!';
  1938. $number_of_players_on_account = $account_logged->getPlayersList()->count();
  1939. if($number_of_players_on_account >= $config['site']['max_players_per_account'])
  1940. $newchar_errors[] .= 'You have too many characters on your account <b>('.$number_of_players_on_account.'/'.$config['site']['max_players_per_account'].')</b>!';
  1941. }
  1942. if(empty($newchar_errors))
  1943. {
  1944. $char_to_copy_name = $config['site']['newchar_vocations'][$world_id][$newchar_vocation];
  1945. $char_to_copy = new Player();
  1946. $char_to_copy->find($char_to_copy_name);
  1947. if(!$char_to_copy->isLoaded())
  1948. $newchar_errors[] .= 'Wrong characters configuration. Try again or contact with admin. ADMIN: Edit file config/config.php and set valid characters to copy names. Character to copy <b>'.htmlspecialchars($char_to_copy_name).'</b> doesn\'t exist.';
  1949. }
  1950. if(empty($newchar_errors))
  1951. {
  1952. // load items and skills of player before we change ID
  1953. $char_to_copy->getItems()->load();
  1954. $char_to_copy->loadSkills();
  1955.  
  1956. if($newchar_sex == "0")
  1957. $char_to_copy->setLookType(136);
  1958. $char_to_copy->setID(null); // save as new character
  1959. $char_to_copy->setLastIP(0);
  1960. $char_to_copy->setLastLogin(0);
  1961. $char_to_copy->setLastLogout(0);
  1962. $char_to_copy->setName($newchar_name);
  1963. $char_to_copy->setAccount($account_logged);
  1964. $char_to_copy->setSex($newchar_sex);
  1965. $char_to_copy->setTown($newchar_town);
  1966. $char_to_copy->setPosX(0);
  1967. $char_to_copy->setPosY(0);
  1968. $char_to_copy->setPosZ(0);
  1969. $char_to_copy->setBalance(0);
  1970. $char_to_copy->setWorldID((int) $world_id);
  1971. $char_to_copy->setCreateIP(Visitor::getIP());
  1972. $char_to_copy->setCreateDate(time());
  1973. $char_to_copy->setSave(); // make character saveable
  1974. $char_to_copy->save(); // now it will load 'id' of new player
  1975. if($char_to_copy->isLoaded())
  1976. {
  1977. $char_to_copy->saveItems();
  1978. $char_to_copy->saveSkills();
  1979. $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Created</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character <b>'.htmlspecialchars($newchar_name).'</b> has been created.<br/>Please select the outfit when you log in for the first time.<br/><br/><b>See you on '.$config['server']['serverName'].'!</b></td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
  1980. }
  1981. else
  1982. {
  1983. echo "Error. Can\'t create character. Probably problem with database. Try again or contact with admin.";
  1984. exit;
  1985. }
  1986. }
  1987. else
  1988. {
  1989. $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>';
  1990. foreach($newchar_errors as $newchar_error)
  1991. $main_content .= '<li>'.$newchar_error;
  1992. $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>';
  1993. $main_content .= 'Please choose a name';
  1994. if(count($config['site']['newchar_vocations'][$world_id]) > 1)
  1995. $main_content .= ', vocation';
  1996. $main_content .= ' and sex for your character. <br/>In any case the name must not violate the naming conventions stated in the <a href="?subtopic=tibiarules" target="_blank" >'.$config['server']['serverName'].' Rules</a>, or your character might get deleted or name locked.<br/><br/><form action="?subtopic=accountmanagement&action=createcharacter" method="post" ><input type="hidden" name="world" value="'.$world_id.'" ><input type="hidden" name=savecharacter value="1" ><div class="TableContainer" > <table class="Table3" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Create Character</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div><tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" > <div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr class="LabelH" ><td style="width:50%;" ><span >Name</td><td><span >Sex</td></tr><tr class="Odd" ><td><input id="newcharname" name="newcharname" onkeyup="checkName();" value="'.$newchar_name.'" size="30" maxlength="29" ><BR><font size="1" face="verdana,arial,helvetica"><div id="name_check">Please enter your character name.</div></font></td><td>';
  1997. $main_content .= '<input type="radio" name="newcharsex" value="1" ';
  1998. if($newchar_sex == 1)
  1999. $main_content .= 'checked="checked" ';
  2000. $main_content .= '>male<br/>';
  2001. $main_content .= '<input type="radio" name="newcharsex" value="0" ';
  2002. if($newchar_sex == "0")
  2003. $main_content .= 'checked="checked" ';
  2004. $main_content .= '>female<br/></td></tr></table></div></div></table></div>';
  2005. if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1)
  2006. $main_content .= '<div class="InnerTableContainer" > <table style="width:100%;" ><tr>';
  2007. if(count($config['site']['newchar_vocations'][$world_id]) > 1)
  2008. {
  2009. $main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your vocation:</b></td><td><table class="TableContent" width="100%" >';
  2010. foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char)
  2011. {
  2012. $main_content .= '<tr><td><input type="radio" name="newcharvocation" value="'.htmlspecialchars($char_vocation_key).'" ';
  2013. if($newchar_vocation == $char_vocation_key)
  2014. $main_content .= 'checked="checked" ';
  2015. $main_content .= '>'.htmlspecialchars($vocation_name[0][$char_vocation_key]).'</td></tr>';
  2016. }
  2017. $main_content .= '</table></table></td>';
  2018. }
  2019. if(count($config['site']['newchar_towns'][$world_id]) > 1)
  2020. {
  2021. $main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your city:</b></td><td><table class="TableContent" width="100%" >';
  2022. foreach($config['site']['newchar_towns'][$world_id] as $town_id)
  2023. {
  2024. $main_content .= '<tr><td><input type="radio" name="newchartown" value="'.htmlspecialchars($town_id).'" ';
  2025. if($newchar_town == $town_id)
  2026. $main_content .= 'checked="checked" ';
  2027. $main_content .= '>'.htmlspecialchars($towns_list[$world_id][$town_id]).'</td></tr>';
  2028. }
  2029. $main_content .= '</table></table></td>';
  2030. }
  2031. if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1)
  2032. $main_content .= '</tr></table></div>';
  2033. $main_content .= '</table></div></td></tr><br/><table style="width:100%;" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
  2034. }
  2035. }
  2036. }
  2037. }
  2038. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement