Advertisement
Guest User

Untitled

a guest
Jun 5th, 2020
850
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.93 KB | None | 0 0
  1. <?php
  2. /*
  3. __ ___ ___ ___ __ ___ __ __ ___ __ __ ___ __
  4. /__` |__ | |__ |__ |__) \_/ | | | | | |__ |__) /__` |__ |__) \ / | / ` |__ /__`
  5. .__/ |___ | | |___ | \ / \ | | | |/\| |___ |__) .__/ |___ | \ \/ | \__, |___ .__/
  6.  
  7. */
  8. class GlobalSettings{
  9.  
  10. /*
  11. Lord, Maraming salamat po palagi sa inyong Wisdom na inyong ipinapahiram sa amin ^_^.
  12. Nawa po ay patuloy nyo pa po kaming mas pag-palain pa po, sa proyekto pong ito,
  13. akin pong ipapaubaya na po sa inyo kung ano po ang maging kakahantungan po nito.
  14. Nawa'y ilayo nyo po kami sa masasamang loob at nagtatangkang mang-gulo po sa aming buhay.
  15. Sa mga nagkasala po sa amin ay amin po silang patatawarin gaya ng pagpapatawad nyo po sa amin.
  16.  
  17. Maraming salamat po!
  18. Glory to God in the Highest!
  19. In Jesus name, I give you thanks, praise and worship,
  20. Amen.
  21. Eliezer S. Rabadon (SeiferXIII)
  22. Signed: 01/15/16
  23. */
  24.  
  25. /* BEGIN DATABASE SETTINGS */
  26. protected $blazedex_sql = array(
  27. 'dbaddress' => 'RAN-PC\SQLEXPRESS', // db host //done this
  28. 'dbuser' => 'sa', // database username //done this
  29. 'dbpass' => '123' // database password //done this
  30.  
  31. );
  32.  
  33. public $bd_sql = array(
  34. 'db1' => 'SeiferCP', //done this
  35. 'db2' => 'RanGame1', //done this
  36. 'db3' => 'RanShop', //done this
  37. 'db4' => 'RanUser' //done this
  38. );
  39.  
  40. /* END DATABASE SETTINGS */
  41.  
  42. /* BEGIN DEFINITIONS */
  43. public $def = array(
  44. 'admin_username' => array('test123','test123'),//admin username and admin password //done this
  45. 'server_name' => 'Server Name', // servername
  46. 'server_website' => 'localhost/index.php', // website link
  47. 'server_motto' => '',
  48. 'EPoints_Name' => 'E-Points',
  49. 'GameTime_Column' => 'GameTime2',
  50. 'Kills_Columns' => 'P.ChaPkWin+P.ChaKills',
  51. 'Death_Columns' => 'P.ChaPkLoss',
  52. 'Referral_Advertisement' => '
  53. ',
  54. 'about_html' => '
  55. ',
  56. 'footer' => '&copy; 2018 Ran Online Ph.',
  57. 'maintenance_page' => 'Website is currently not available, please stand2by.',
  58. 'avatar_type' => 'identicon', //identicon , wavatar, mm, monesterid, 404, retro, blank - powered by gravatar
  59. );
  60.  
  61. /* END DEFINITIONS */
  62.  
  63.  
  64. /* BEGIN OPTIONS */
  65. public $options = array(
  66.  
  67. /******* BEGIN TEARHEAR CP INTEGRATION *******/
  68. 'is_tearhear18_migrate' => array(
  69. 'activated' => false,
  70. 'webSite' => 'webSite'
  71. ),
  72. /******* END TEARHEAR CP INTEGRATION *******/
  73. /* BEGIN CORE OPTIONS */
  74. 'is_md5' => true, //Enable/Disable MD5 Encryption on password
  75. 'display_onlinecount' => false, //Display Online Count?
  76. 'maintenance_mode' => false, //Is Website Online?
  77. 'serverinfo_newsid' => 6, //News ID of the Server Information Page
  78. 'howtodonate_newsid' => 4, //News ID of How to Donation Page
  79. 'enable_logs' => true, //Log actions of the user (buy,topup,change credentials, etc.)
  80. /* END CORE OPTIONS */
  81.  
  82. /* BEGIN RAN Web Core Functions */
  83. 'enable_changepass' => true, //Is password change enabled?
  84. 'enable_chadelete' => true, //Web based Character Deletion
  85. 'enable_changepin' => true, //Is pincode change enabled?
  86. 'enable_changeemail' => true, //Is email change enabled?
  87. 'enable_topup' => true, //Is topup system enabled?
  88. 'enable_connectedfix' => false, //Is connectedfix system enabled?
  89. 'enable_webmarket' => true, //Is webmarket system enabled?
  90.  
  91. /* END RAN Web Core Functions */
  92.  
  93.  
  94. /* BEGIN Referral System */
  95. 'referral' => array(
  96. 'activated' => false, //Is referral system enabled?
  97. 'comission' => 0.05 //5% Referral Bonus once the reffered user has topped up.
  98. ),
  99. 'shopbonus' => array(
  100. 'activated' => false, //Is icafe shop bonus system enabled?
  101. 'comission' => 0.02 //2% Referral Bonus to the shop owner and the player who topped up once the player has input the icafe code when they topped up.
  102. ),
  103. 'enable_shopbonus' => true, //Is iCafe Shop Bonus enabled?
  104. /* END Referral System */
  105. /* BEGIN Points Conversion */
  106. 'ep2vp' => array(
  107. 'activated' => true, //Is EP to VP system enabled?
  108. 'ep2vp_minimum' => 20,
  109. 'ep2vp_rate' => 1
  110. /* 1 EP = 1 VP */
  111. ),
  112. 'vp2ep' => array(
  113. 'activated' => true, //Is VP to EP system enabled?
  114. 'vp2ep_minimum' => 20,
  115. 'vp2ep_rate' => 1
  116. /* 1 VP = 1 EP */
  117. ),
  118. 'gt2vp' => array(
  119. 'activated' => true, //Is GameTime to VP system enabled?
  120. 'gt2vp_minimum' => 60, //Minimum Minutes that can be converted
  121. 'gt2vp_rate' => 2,
  122. /* 90 Minutes = 1VP */
  123. ),
  124. /* END Points Conversion */
  125.  
  126. /* BEGIN Private Server Core Functions */
  127. 'changeschool_system' => array(
  128. 'activated' => true, //Is Change School system enabled?
  129. 'cooldown' => 5, //How many days?
  130. 'fee' => 0, //how much?
  131. 'currency' => 'ep' //vp or ep or gold
  132. ),
  133.  
  134. 'resetstats_system' => array(
  135. 'activated' => true, //Is Reset Stats system enabled?
  136. 'fee' => 0, //how much?
  137. 'currency' => 'ep' //vp or ep or gold
  138. ),
  139.  
  140. 'is_reborn_server' => false, //Enable/Disable Reborn Rankings
  141. 'reborn' => array (
  142. 'activated' => false, //Does your server has reborn system?
  143. 'rb1' => array(
  144. 'activated' => false,
  145. 'level_req' => 170,
  146. 'fee' => 1000000,
  147. 'from' => 0,
  148. 'to' => 20,
  149. 'stats_reward' => 100
  150. ),
  151.  
  152. 'rb2' => array(
  153. 'activated' => false,
  154. 'level_req' => 180,
  155. 'fee' => 2000000,
  156. 'from' => 21,
  157. 'to' => 30,
  158. 'stats_reward' => 120
  159. ),
  160.  
  161. 'rb3' => array(
  162. 'activated' => false,
  163. 'level_req' => 190,
  164. 'fee' => 3000000,
  165. 'from' => 31,
  166. 'to' => 40,
  167. 'stats_reward' => 130
  168. ),
  169.  
  170. 'rb4' => array(
  171. 'activated' => false,
  172. 'level_req' => 200,
  173. 'fee' => 4000000,
  174. 'from' => 41,
  175. 'to' => 50,
  176. 'stats_reward' => 150
  177. ),
  178. ),
  179.  
  180. 'vote' => array(
  181. 'activated' => true,
  182. 'vote_level_req' => 200, //Level Requirement - Voting System
  183. 'ip_filter' => false,
  184. 'vote_every' => 12, //12 hours
  185. 'reward' => 2,
  186. 'portal_1' => array(
  187. 'activated' => false,
  188. 'topsite_name' => 'GTop 100',
  189. 'image' => 'http://l2deathland.com/display/images/vote/gtop100.jpg',
  190. 'link' => "http://www.gtop100.com/topsites/Ran-Online/sitedetails/Strife-Ran-Online-89904?vote=1",
  191. ),
  192. 'portal_2' => array(
  193. 'activated' => true,
  194. 'topsite_name' => 'ArenaTop 100',
  195. 'image' => 'http://www.arena-top100.com/images/arena-top100.png',
  196. 'link' => "http://www.arena-top100.com/index.php?a=in&u=antediluvian2016",
  197. ),
  198. 'portal_3' => array(
  199. 'activated' => true,
  200. 'topsite_name' => 'GameSama',
  201. 'image' => 'http://topsite.gamesama.com/votebutton.png',
  202. 'link' => "http://topsite.gamesama.com/profile/161",
  203. ),
  204. 'portal_4' => array(
  205. 'activated' => true,
  206. 'topsite_name' => 'XtremeTop 100',
  207. 'image' => 'http://www.xtremetop100.com/votenew.jpg',
  208. 'link' => "http://www.xtremetop100.com/in.php?site=1132358737",
  209. ),
  210. 'portal_5' => array(
  211. 'activated' => true,
  212. 'topsite_name' => 'TopOfGames',
  213. 'image' => 'http://ic.pics.livejournal.com/samaritanyn/10860637/47879/47879_original.gif',
  214. 'link' => "http://gamesama.com",
  215. ),
  216. )
  217. /* END Private Server Core Functions */
  218.  
  219. );
  220. /* END OPTIONS */
  221.  
  222. /* BEGIN ACTIVE SHOP */
  223. public $activeshop = array(
  224. 'voteshop' => true,
  225. 'premiumshop' => true
  226. );
  227. /* END ACTIVE SHOP */
  228.  
  229. /* BEGIN SHOP CATEGORIES */
  230. public $shop_ctg = array(
  231. 'Weapons',
  232. 'Accessories',
  233. 'Costumes',
  234. 'Pet System',
  235. 'EXP',
  236. 'Cards',
  237. 'Enhancements'
  238. );
  239.  
  240. /* BEGIN MAX VALUES */
  241. public $maxvalue = array(
  242. 'max_topnews' => 5, //Maximum Top News
  243. 'max_toprank' => 5, //Maximum Top Rank
  244. 'max_rankall' => 50, //Maximum Top Rank All
  245. );
  246. /* END MAX VALUES */
  247.  
  248. /* BEGIN ACTIVE CLASS */
  249. public $activeclass = array(
  250. 'brawler' => true,
  251. 'swordsman' => true,
  252. 'archer' => true,
  253. 'shaman' => true,
  254. 'extreme' => false,
  255. 'gunner' => false,
  256. 'assassin' => false,
  257. 'magician' => false
  258. );
  259. /* END ACTIVE CLASS */
  260.  
  261. /* BEGIN SOCIAL MEDIA */
  262. public $social = array(
  263. 'display_social' => true,
  264. 'facebook' => 'http://facebook.com/',
  265. 'twitter' => '',
  266. 'youtube' => '',
  267. 'twitch' => '',
  268. 'steam' => '',
  269. 'fbgroup' => ''
  270. );
  271. /* END SOCIAL MEDIA */
  272.  
  273. function setOpenGraph(){
  274. echo '
  275. <meta property="og:type" content="article">
  276. <meta property="og:title" content="content">
  277. <meta property="og:description" content="content">
  278. <meta name="author" content="">
  279. <meta property="article:author" content="" />
  280.  
  281. ';
  282. }
  283.  
  284.  
  285. /***********************************************************************************************************************************************************
  286. ***********************************************************************************************************************************************************
  287. -----------------------------------------------------------------------------------------------------------------------------------------------------------
  288. Editing the source code below may cause major disturbance on your website. Please DO NOT Modify things beyond this line.
  289. -----------------------------------------------------------------------------------------------------------------------------------------------------------
  290. .______ ___________ ____ ______ .__ __. _______ .___________. __ __ __ _______. __ __ .__ __. _______
  291. | _ \ | ____\ \ / / / __ \ | \ | | | \ | || | | | | | / | | | | | | \ | | | ____|
  292. | |_) | | |__ \ \/ / | | | | | \| | | .--. | `---| |----`| |__| | | | | (----` | | | | | \| | | |__
  293. | _ < | __| \_ _/ | | | | | . ` | | | | | | | | __ | | | \ \ | | | | | . ` | | __|
  294. | |_) | | |____ | | | `--' | | |\ | | '--' | | | | | | | | | .----) | | `----.| | | |\ | | |____ __
  295. |______/ |_______| |__| \______/ |__| \__| |_______/ |__| |__| |__| |__| |_______/ |_______||__| |__| \__| |_______(_ )
  296. |/
  297. _______ ______ .__ __. ______ .___________. .___ ___. ______ _______ __ ___________ ____
  298. | \ / __ \ | \ | | / __ \ | | | \/ | / __ \ | \ | | | ____\ \ / /
  299. | .--. | | | | | \| | | | | | `---| |----` | \ / | | | | | | .--. || | | |__ \ \/ /
  300. | | | | | | | | . ` | | | | | | | | |\/| | | | | | | | | || | | __| \_ _/
  301. | '--' | `--' | | |\ | | `--' | | | | | | | | `--' | | '--' || | | | | |
  302. |_______/ \______/ |__| \__| \______/ |__| |__| |__| \______/ |_______/ |__| |__| |__|
  303.  
  304. -----------------------------------------------------------------------------------------------------------------------------------------------------------
  305. Editing the source code below may cause major disturbance on your website. Please DO NOT Modify things beyond this line.
  306. -----------------------------------------------------------------------------------------------------------------------------------------------------------
  307. YOU HAVE BEEN WARNED.
  308. ***********************************************************************************************************************************************************
  309. ***********************************************************************************************************************************************************/
  310.  
  311. /* BEGIN SITE PAGES - DO NOT MODIFY! */
  312. public $SitePages = array(
  313. 'login',
  314. 'download',
  315. 'info',
  316. 'voteshop',
  317. 'premiumshop',
  318. 'rank',
  319. 'contact',
  320. 'shop',
  321. 'resetpass',
  322. 'register',
  323. 'news',
  324. 'donate',
  325. 'webmarket',
  326. 'userpanel',
  327. 'adminpanel'
  328.  
  329. );
  330. /* END SITE PAGES - DO NOT MODIFY! */
  331.  
  332. public function getPageName($p)
  333. {
  334. if (in_array($p,$this->SitePages))
  335. {
  336. switch($p)
  337. {
  338. case "login":
  339. return "Login";
  340. break;
  341. case "register":
  342. return "Register";
  343. break;
  344. case "resetpass":
  345. return "Reset Password";
  346. break;
  347. case "rank":
  348. return "Rankings";
  349. break;
  350. case "shop":
  351. return "ItemShop";
  352. break;
  353. case "news":
  354. return "News";
  355. break;
  356. case "userpanel":
  357. return "User Panel";
  358. break;
  359. case "download":
  360. return "Download";
  361. break;
  362. case "info":
  363. return "Server Info";
  364. break;
  365. case "donate":
  366. return "Donate";
  367. break;
  368. case "adminpanel":
  369. return "Admin Panel";
  370. break;
  371. default:
  372. include "404";
  373. }
  374. }
  375. }
  376.  
  377.  
  378. //Connecting to MsSQL
  379. public function doSQLConnect(){
  380.  
  381. $link = mssql_connect(
  382. $this->blazedex_sql['dbaddress'],
  383. $this->blazedex_sql['dbuser'],
  384. $this->blazedex_sql['dbpass']
  385. );
  386.  
  387. $tx = time();
  388. $check['updateVoteTime'] = mssql_query("delete from ".$this->bd_sql['db1'].".dbo.VotePanel where lastVoteDate <= '".date('Y-m-d H:i:s', $tx)."'");
  389. if(!$link) return FALSE;
  390. else return TRUE;
  391.  
  392. }
  393. public function doLogout(){
  394. session_start();
  395. session_destroy(); // ?? Session ???????
  396. session_start();
  397. }
  398.  
  399. function isLoggedIn(){
  400. session_start();
  401. if($_SESSION["___user_"] != NULL && $_SESSION["___pass_"] != NULL) return true;
  402. else return false;
  403. }
  404. function doCheckCaptchaResult($captcha,$ip){
  405. $response=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=6LdhaxITAAAAAOUWL2P9eNMVjGqdgZd0TJF5yFgc&response=".$captcha."&remoteip=".$ip);
  406. return $response.success;
  407. }
  408. public function doRandom($length=11){
  409. $key = '';
  410. $pattern = "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5q6r7s8t9u0v1w2x3y4z5";
  411. for($i=0;$i<$length;$i++){
  412. $key .= $pattern{rand(5,35)};
  413. }
  414. return strtoupper($key);
  415. }
  416. public function doLogAction($username,$desc){
  417. mssql_query("INSERT INTO ".$this->bd_sql[db1].".dbo.LogActionCP (username,description) VALUES ('".$username."','".$desc."') ");
  418. }
  419. public function doLogVote($accName, $lastVoteDate, $voteLink, $ip){
  420. //mssql_query("INSERT INTO ".$this->bd_sql[db1].".dbo.VotePanel (accName, lastVoteDate, voteLink, ip) VALUES ('$accName', DATEADD(hour, + ".$this->options[vote]['vote_every'].", GETDATE())) , '$voteLink', '$ip') ");
  421. mssql_query("insert into ".$this->bd_sql['db1'].".dbo.VotePanel(accName, lastVoteDate, voteLink, ip) values('".$accName."','".$lastVoteDate."', '".$voteLink."','".$ip."')");
  422. }
  423.  
  424. public function doDeduct($currency,$amount,$chanum=0){
  425. session_start();
  426. $currency = (int)$currency;
  427. $amount = (int)$amount;
  428. $chanum = (int)$chanum;
  429. switch($currency)
  430. {
  431. case 1: //ep
  432. $exec = mssql_query(sprintf("UPDATE ".$this->bd_sql[db1].".dbo.Points SET Points = Points - $amount WHERE UserName = '".$_SESSION[___user_]."'"));
  433. return true;
  434. break;
  435. case 2: //vp
  436. $exec = mssql_query(sprintf("UPDATE ".$this->bd_sql[db1].".dbo.Points SET VPoints = VPoints - $amount WHERE UserName = '".$_SESSION[___user_]."'"));
  437. return true;
  438. break;
  439. case 3: //gold
  440. if($chanum!=0) $exec = mssql_query(sprintf("UPDATE ".$this->bd_sql[db2].".dbo.ChaInfo SET ChaMoney = ChaMoney - $amount WHERE ChaNum=$chanum and UserNum='".$this->getUserNum_from_username($_SESSION[___user_])."'"));
  441. return true;
  442. break;
  443. case 4: //reborn
  444. if($chanum!=0) $exec = mssql_query(sprintf("UPDATE ".$this->bd_sql[db2].".dbo.ChaInfo SET ChaReborn = ChaReborn - $amount WHERE ChaNum=$chanum and UserNum='".$this->getUserNum_from_username($_SESSION[___user_])."'"));
  445. return true;
  446. break;
  447. case 5: //gametime
  448. if($chanum!=0) $exec = mssql_query(sprintf("UPDATE ".$this->bd_sql[db4].".dbo.UserInfo SET ".$this->def['GameTime_Column']." = ".$this->def['GameTime_Column']." - $amount WHERE UserNum='".$this->getUserNum_from_username($_SESSION[___user_])."'"));
  449. return true;
  450. break;
  451. default:
  452. return false;
  453. }
  454.  
  455. }
  456. public function getDownload ($quantity=0){
  457. $i = 0;
  458. if($quantity==0)$download = mssql_query("SELECT id,date,title,text FROM ".$this->bd_sql['db1'].".dbo.download ORDER BY date DESC");
  459. else $download = mssql_query("SELECT TOP $quantity id,date,title,text FROM ".$this->bd_sql['db1'].".dbo.download ORDER BY date DESC");
  460. $downloadlist['count'] =0;
  461. $downloadlist = array();
  462. while($download_info = mssql_fetch_array($download)){
  463. $downloadlist[$i] = array(
  464. 'id' => $download_info['id'],
  465. 'dates' => $download_info['date'],
  466. 'text' => $download_info['text'],
  467. 'title' => $download_info['title'],
  468. 'datewhole' => date('m.j.Y', strtotime($download_info['date']))
  469. );
  470.  
  471. $downloadlist['count']++;
  472. $i++;
  473.  
  474. }
  475. return $downloadlist;
  476.  
  477. }
  478. public function getTopNews ($quantity=0){
  479. $i = 0;
  480. if($quantity==0)$news = mssql_query("SELECT id,date,type,title,pin FROM ".$this->bd_sql['db1'].".dbo.news ORDER BY date DESC");
  481. else $news = mssql_query("SELECT TOP $quantity id,date,type,title,pin FROM ".$this->bd_sql['db1'].".dbo.news ORDER BY date DESC");
  482. $newslist['count'] =0;
  483. $newslist = array();
  484. while($news_info = mssql_fetch_array($news)){
  485. $newslist[$i] = array(
  486. 'id' => $news_info['id'],
  487. 'dates' => $news_info['date'],
  488. 'type' => $news_info['type'],
  489. 'title' => $news_info['title'],
  490. 'date' => strtotime($news_info['date']),
  491. 'datewhole' => date('m.j.Y', strtotime($news_info['date'])),
  492. 'newsmonth' => date('m', strtotime($news_info['date'])),
  493. 'newsday' => date('j', strtotime($news_info['date'])),
  494. 'pin' => $news_info['pin']
  495.  
  496. );
  497.  
  498. $newslist['count']++;
  499. $i++;
  500.  
  501. }
  502. return $newslist;
  503.  
  504. }
  505.  
  506. public function getLogActionCP ( $count,$username=NULL )
  507. {
  508. $loginfo = array();
  509. $i = 0;
  510. if($username!=NULL)$get_logaction = mssql_query("SELECT TOP $count username,description,logdate FROM ".$this->bd_sql['db1'].".dbo.LogActionCP WHERE username='$username' ORDER BY logdate desc");
  511. else $get_logaction = mssql_query("SELECT TOP $count username,description,logdate FROM ".$this->bd_sql['db1'].".dbo.LogActionCP ORDER BY logdate desc");
  512. if(mssql_num_rows($get_logaction)==0) return false;
  513. while ( $logact = mssql_fetch_array($get_logaction)){
  514. $loginfo[$i] = array(
  515. 'username' => $logact['username'],
  516. 'description' => $logact['description'],
  517. 'logdate' => $logact['logdate']
  518. );
  519. $loginfo['count']++;
  520. $i++;
  521. }
  522. return $loginfo;
  523. }
  524.  
  525.  
  526. public function getNewsInfo( $id ){
  527. $newsinfo = array();
  528. $get_news = mssql_query("SELECT id,title,text,date,autor FROM ".$this->bd_sql['db1'].".dbo.news where id = $id");
  529. if(mssql_num_rows($get_news)==0) return false;
  530. while ($points = mssql_fetch_array($get_news)) {
  531. $newsinfo = array(
  532. 'id' => $points[id],
  533. 'title' => $points[title],
  534. 'text' => $points[text],
  535. 'date' => date('m.j.Y', strtotime($points['date'])),
  536. 'autor' => $points[autor]
  537. );
  538. }
  539.  
  540. return $newsinfo;
  541.  
  542. }
  543. public function getShopInfo ($quantity=0){
  544. $i = 0;
  545. if($quantity==0)$shopinfo = mssql_query("SELECT * FROM ".$this->bd_sql['db1'].".dbo.ShopInfo");
  546. else $shopinfo = mssql_query("SELECT TOP $quantity * FROM ".$this->bd_sql['db1'].".dbo.ShopInfo");
  547. $shopinfolist['count'] =0;
  548. $shopinfolist = array();
  549. while($shopinfo_info = mssql_fetch_array($shopinfo)){
  550. $shopinfolist[$i] = array(
  551. 'id' => $shopinfo_info['ShopName'],
  552. 'dates' => $shopinfo_info['Owner'],
  553. 'type' => $shopinfo_info['ShopID'],
  554. );
  555.  
  556. $shopinfolist['count']++;
  557. $i++;
  558.  
  559. }
  560. return $shopinfolist;
  561.  
  562. }
  563.  
  564. function getOnlineCount(){
  565. $get_points = mssql_query("SELECT SUM(ChaOnline) as Online FROM ".$this->bd_sql['db2'].".dbo.ChaInfo where ChaOnline = 1");
  566. while ($points = mssql_fetch_array($get_points)) {
  567. return $points[Online];
  568. }
  569. }
  570. function getCurPeak(){
  571. $get_points = mssql_query("SELECT onlinepeak as Online FROM ".$this->bd_sql['db1'].".dbo.settings where server1 = 0");
  572. while ($points = mssql_fetch_array($get_points)) {
  573. return $points[Online];
  574. }
  575. }
  576. function getOnlinePeak(){
  577. $ol = $this->getOnlineCount();
  578. $pik = $this->getCurPeak();
  579. if($ol > $pik)
  580. {
  581. $pik = $online;
  582. $exec = mssql_query(sprintf("UPDATE ".$this->bd_sql[db1].".dbo.settings SET onlinepeak = $pik WHERE server1=0"));
  583. }
  584. return $pik;
  585. }
  586. function getEP( $username ){
  587. $get_points = mssql_query("SELECT Points FROM ".$this->bd_sql['db1'].".dbo.Points where UserName = '".$username."'");
  588. while ($points = mssql_fetch_array($get_points)) {
  589. return $points[Points];
  590. }
  591. }
  592. function getreferrer( $username ){
  593. $get_points = mssql_query("SELECT referrer FROM ".$this->bd_sql['db1'].".dbo.Points where referrer = '".$username."'");
  594. return mssql_num_rows($get_points);
  595. }
  596. function getVP( $username ){
  597. $get_points = mssql_query("SELECT VPoints FROM ".$this->bd_sql['db1'].".dbo.Points where UserName = '".$username."'");
  598. while ($points = mssql_fetch_array($get_points)) {
  599.  
  600. return $points[VPoints];
  601.  
  602. }
  603. }
  604. function getEMail( $username ){
  605. $get_points = mssql_query("SELECT UserEmail FROM ".$this->bd_sql['db4'].".dbo.UserInfo where UserName = '".$username."'");
  606. while ($points = mssql_fetch_array($get_points)) {
  607.  
  608. return $points[UserEmail];
  609.  
  610. }
  611. }
  612. function getUserInfo_Points( $username ){
  613. $userinfo = array();
  614. $userinfo['count'] = 0;
  615. $i=0;
  616. $get_points = mssql_query("SELECT UserName,Points,VPoints FROM ".$this->bd_sql['db1'].".dbo.Points where UserName like '%".$username."%'");
  617. while ($points = mssql_fetch_array($get_points)) {
  618. $userinfo[$i] = array(
  619. 'UserName' => $points['UserName'],
  620. 'Points' => $points['Points'],
  621. 'VPoints' => $points['VPoints'],
  622. 'UserEmail' => $this->getEMail($points['UserName'])
  623. );
  624. $userinfo['count']++;
  625. $i++;
  626.  
  627.  
  628.  
  629. }
  630. return $userinfo;
  631. }
  632. function getUserType( $username ){
  633. $get_points = mssql_query("SELECT UserType FROM ".$this->bd_sql['db4'].".dbo.UserInfo where UserName = '".$username."'");
  634. while ($points = mssql_fetch_array($get_points)) {
  635. return $points[UserType];
  636. }
  637. }
  638. function getUserNum_from_username( $username ){
  639. $get_points = mssql_query("SELECT UserNum FROM ".$this->bd_sql['db4'].".dbo.UserInfo where UserName = '".$username."'");
  640. while ($points = mssql_fetch_array($get_points)) {
  641.  
  642. return $points[UserNum];
  643.  
  644.  
  645. }
  646. }
  647. function getUserNum_from_ChaName( $chaname ){
  648. $get_points = mssql_query("SELECT UserNum FROM ".$this->bd_sql['db2'].".dbo.ChaInfo where ChaName = '".$chaname."'");
  649. while ($points = mssql_fetch_array($get_points)) {
  650.  
  651. return $points[UserNum];
  652.  
  653.  
  654. }
  655. }
  656. function getUserName_from_usernum( $usernum ){
  657. $get_points = mssql_query("SELECT UserName FROM ".$this->bd_sql['db4'].".dbo.UserInfo where UserNum = $usernum");
  658. while ($points = mssql_fetch_array($get_points)) {
  659.  
  660. return $points[UserName];
  661.  
  662.  
  663. }
  664. }
  665. function getChaName_from_username( $username ){
  666. $getname = mssql_query("SELECT ChaName from ".$this->bd_sql['db2'].".dbo.ChaInfo WHERE UserNum=".$this->getUserNum_from_username($username)." ");
  667. while ($points = mssql_fetch_array($getname)) {
  668.  
  669. return $points[ChaName];
  670.  
  671.  
  672. }
  673.  
  674. }
  675. function doInsert2bank( $username, $productnum, $quantity ){
  676. for($i=0;$i<$quantity;$i++)
  677. {
  678. $insert_user = mssql_query("INSERT INTO ".$this->bd_sql[db3].".dbo.ShopPurchase (UserUID,ProductNum) VALUES ('".$username."','".$productnum."') ");
  679. }
  680. }
  681. function getlastip( $username ){
  682. $get_points = mssql_query("SELECT TOP 1 LogIpAddress FROM ".$this->bd_sql['db4'].".dbo.LogLogin where UserID = '".$username."' AND LogInOut=1 ORDER BY LogDate DESC");
  683. while ($points = mssql_fetch_array($get_points)) {
  684. return $points[LogIpAddress];
  685. }
  686. }
  687. function getGuName ( $guild ){
  688. $get_points = mssql_query("SELECT GuName FROM ".$this->bd_sql['db2'].".dbo.GuildInfo where GuNum = '".$guild."'");
  689. if(mssql_num_rows($get_points) == 0 ) return "None";
  690. while ($points = mssql_fetch_array($get_points)) {
  691. return $points[GuName];
  692. }
  693. }
  694. public function deleteNews($id){
  695. $id = (int)$id;
  696. $get_news = mssql_query("SELECT * FROM ".$this->bd_sql['db1'].".dbo.news where id = '$id'");
  697. while ($dnews = mssql_fetch_array($get_news)) {
  698. $strSQL = mssql_query("DELETE FROM ".$this->bd_sql['db1'].".dbo.news where id = '$id'");
  699. }
  700. return true;
  701. }
  702. public function deleteDownload($id){
  703. $id = (int)$id;
  704. $get_news = mssql_query("SELECT * FROM ".$this->bd_sql['db1'].".dbo.download where id = '$id'");
  705. while ($dnews = mssql_fetch_array($get_news)) {
  706. $strSQL = mssql_query("DELETE FROM ".$this->bd_sql['db1'].".dbo.download where id = '$id'");
  707. }
  708. return true;
  709. }
  710. public function deleteShopItemMap($id){
  711. $id = (int)$id;
  712. $get_news = mssql_query("SELECT * FROM ".$this->bd_sql['db3'].".dbo.ShopItemMap where ProductNum = '$id'");
  713. while ($dnews = mssql_fetch_array($get_news)) {
  714. $strSQL = mssql_query("DELETE FROM ".$this->bd_sql['db3'].".dbo.ShopItemMap where ProductNum = '$id'");
  715. }
  716. return true;
  717. }
  718. public function deleteTopup($code,$pin){
  719. $code = htmlspecialchars($code);
  720. $pin = htmlspecialchars($pin);
  721. $get_news = mssql_query("SELECT * FROM ".$this->bd_sql['db1'].".dbo.Topup where Code = '$code' and PCode ='$pin'");
  722. while ($dnews = mssql_fetch_array($get_news)) {
  723. $strSQL = mssql_query("DELETE FROM ".$this->bd_sql['db1'].".dbo.Topup where Code = '$code' and PCode ='$pin'");
  724. }
  725. return true;
  726. }
  727. public function deleteiCafe($code){
  728. $code = htmlspecialchars($code);
  729. $get_news = mssql_query("SELECT * FROM ".$this->bd_sql['db1'].".dbo.ShopInfo where ShopID = '$code'");
  730. while ($dnews = mssql_fetch_array($get_news)) {
  731. $strSQL = mssql_query("DELETE FROM ".$this->bd_sql['db1'].".dbo.ShopInfo where ShopID = '$code'");
  732. }
  733. return true;
  734. }
  735. public function getCharacterRank($quantity, $class=""){
  736. $quantity = (int)$quantity;
  737. if($quantity == 0) $quantity = 100;
  738. $charlist = array();
  739. $i = 0;
  740. if($class=="toprich") $rich = "P.ChaMoney DESC,";
  741. else $rich = "";
  742. if($class=="toppk") $pk = "P.ChaPkWin DESC, P.ChaPkLoss ASC,";
  743. else $pk = "";
  744. switch($class)
  745. {
  746. case "brawler":
  747. if($this->activeclass[$class]) $class = "AND P.ChaClass IN (1,64)";
  748. break;
  749. case "swordsman":
  750. if($this->activeclass[$class]) $class = "and P.ChaClass IN (2,128)";
  751. break;
  752. case "archer":
  753. if($this->activeclass[$class]) $class = "and P.ChaClass IN (4,256)";
  754. break;
  755. case "shaman":
  756. if($this->activeclass[$class]) $class = "and P.ChaClass IN (8,512)";
  757. break;
  758. case "extreme":
  759. if($this->activeclass[$class]) $class = "and P.ChaClass IN (16,32)";
  760. break;
  761. case "gunner":
  762. if($this->activeclass[$class]) $class = "and P.ChaClass IN (1024,2048)";
  763. break;
  764. case "assassin":
  765. if($this->activeclass[$class]) $class = "and P.ChaClass IN (4096,8192)";
  766. break;
  767. case "magician":
  768. if($this->activeclass[$class]) $class = "and P.ChaClass IN (16384,32768)";
  769. break;
  770. case "sg":
  771. $class = "and P.ChaSchool=0";
  772. break;
  773. case "mp":
  774. $class = "and P.ChaSchool=1";
  775. break;
  776. case "phx":
  777. $class = "and P.ChaSchool=2";
  778. break;
  779. default:
  780. $class = "";
  781. break;
  782. }
  783.  
  784. if($this->options['is_reborn_server']){ $r = "P.ChaReborn,"; $reborn = "P.ChaReborn DESC,"; }
  785. else{ $reborn = ""; $r="";}
  786. $charlist['count'] =0;
  787. //$get_crank = mssql_query("SELECT TOP $quantity P.ChaExp,P.ChaMoney,P.ChaLastLevelUp,P.ChaName,P.ChaLevel,P.ChaClass,P.ChaExp,P.ChaOnline,P.GuNum, $r (".$this->def['Kills_Columns'].") AS Kills, (".$this->def['Death_Columns'].") AS Deaths FROM ".$this->bd_sql['db4'].".dbo.UserInfo U, ".$this->bd_sql['db2'].".dbo.ChaInfo P WHERE P.UserNum = U.UserNum AND U.UserType < 11 AND U.UserBlockDate < GETDATE() AND P.ChaDeleted != 1 $class ORDER BY $pk $rich $reborn Kills DESC, Deaths ASC,P.ChaLevel DESC, P.ChaLastLevelUp DESC, P.ChaExp DESC");
  788. $get_crank = mssql_query("SELECT TOP $quantity P.ChaPkWin, P.ChaPkLoss, P.ChaName, P.ChaReborn, P.ChaLevel, P.ChaClass, P.ChaSchool, P.ChaOnline, P.GuNum, P.ChaNum, P.ChaMoney FROM ".$this->bd_sql['db2'].".dbo.ChaInfo P, ".$this->bd_sql['db4'].".dbo.UserInfo U WHERE P.UserNum = U.UserNum AND U.UserType != 32 AND U.UserType != 31 AND U.UserType != 30 AND U.UserType != 10 AND U.UserType != 6969 AND U.UserAvailable != 0 AND P.ChaDeleted != 1 AND P.SGNUM != 1 $class ORDER BY $pk $rich $reborn P.ChaLevel DESC, P.ChaPkWin DESC, P.ChaName ASC");
  789.  
  790. //$get_crank = mssql_query("SELECT TOP $quantity P.ChaExp,P.ChaMoney,P.ChaLastLevelUp,P.ChaName,P.ChaLevel,P.ChaClass,P.ChaExp,P.ChaOnline,P.GuNum, $r (".$this->def['Kills_Columns'].") AS Kills, (".$this->def['Death_Columns'].") AS Deaths FROM ".$this->bd_sql['db4'].".dbo.UserInfo U, ".$this->bd_sql['db2'].".dbo.ChaInfo P WHERE P.UserNum = U.UserNum AND U.UserType < 11 AND P.ChaDeleted != 1 $class ORDER BY $rich P.ChaLevel DESC, P.ChaLastLevelUp DESC");
  791. if(mssql_num_rows($get_crank) == 0 ) return false;
  792. while ($crank = mssql_fetch_array($get_crank)) {
  793. $ccount++;
  794. $get_g = mssql_query("SELECT GuName FROM ".$this->bd_sql['db2'].".dbo.GuildInfo where GuNum = '$crank[GuNum]' ");
  795. while ($guild = mssql_fetch_array($get_g)) {
  796. $g = $guild[3];
  797. }
  798.  
  799. $charlist[$i] = array(
  800.  
  801. 'ChaName' => $crank[ChaName],
  802. 'ChaReborn' => $crank[ChaReborn],
  803. 'ChaClass' => $crank[ChaClass],
  804. 'ChaLevel' => $crank[ChaLevel],
  805. 'ChaSchool' => $this->getSchool($crank[ChaSchool]),
  806. 'ChaOnline' => $this->getOnlineStatus($crank[ChaOnline]),
  807. 'TotalKills' => $crank[ChaPkWin],
  808. 'TotalDeath' => $crank[ChaPkLoss],
  809. 'GuNum' => $crank[GuNum],
  810. 'ChaMoney' => $crank[ChaMoney]
  811.  
  812. );
  813. $i++;
  814. $charlist['count']++;
  815.  
  816. }
  817.  
  818. return $charlist;
  819. }
  820. public function getItemShop($type="",$ctg="",$search="",$admincp=0){
  821. $itemlist = array();
  822. $itemlist['count'] = 0;
  823. $type = (int)$type;
  824. $i = 0;
  825. if($search!=""){ $search="ItemName LIKE '%$search%'"; }
  826. if($ctg !=""){ $ctg="AND ItemCtg=$ctg"; }
  827. if($type!=""){ $itemsec="AND ItemSec=$type"; }
  828. if($admincp==1) $get_new_item = mssql_query("SELECT ItemCtg,ItemMain,ItemSub,ItemName,ItemBought,ItemPrice,Itemexp,ItemSS,ItemComment,ProductNum,ItemSec,hidden,Itemstock FROM ".$this->bd_sql[db3].".dbo.ShopItemMap WHERE $search order by ItemBought desc");
  829. else $get_new_item = mssql_query("SELECT ItemCtg,ItemMain,ItemSub,ItemName,ItemBought,ItemPrice,Itemexp,ItemSS,ItemComment,ProductNum,ItemSec,hidden,Itemstock FROM ".$this->bd_sql[db3].".dbo.ShopItemMap where hidden=0 $itemsec $ctg $search order by ItemBought desc");
  830. while ($new_items = mssql_fetch_array($get_new_item)) {
  831. $itemlist[$itemlist['count']] = array(
  832. 'ItemSS' => $new_items[ItemSS],
  833. 'ItemName' => $new_items[ItemName],
  834. 'Itemstock' => $new_items[Itemstock],
  835. 'ItemPrice' => $new_items[ItemPrice],
  836. 'ItemSec' => $new_items[ItemSec],
  837. 'ItemComment' => $new_items[ItemComment],
  838. 'ProductNum' => $new_items[ProductNum],
  839. 'ItemMain' => $new_items[ItemMain],
  840. 'ItemSub' => $new_items[ItemSub],
  841. 'hidden' => $new_items[hidden],
  842. 'ItemCtg' => $new_items[ItemCtg]
  843.  
  844. );
  845. $itemlist['count']++;
  846. }
  847. return $itemlist;
  848. }
  849. public function getTopupCodes(){
  850. $topuplist = array();
  851. $i=0;
  852. $get_new_topup = mssql_query("SELECT Code,PCode,Points FROM ".$this->bd_sql[db1].".dbo.TopUp order by date desc");
  853. while ($new_topup = mssql_fetch_array($get_new_topup)) {
  854. $topuplist[$i] = array(
  855. 'Code' => $new_topup['Code'],
  856. 'PCode' => $new_topup['PCode'],
  857. 'Points' => $new_topup['Points']
  858. );
  859. $topuplist['count']++;
  860. $i++;
  861. }
  862. return $topuplist;
  863. }
  864. public function getCharacterStatistics(){
  865. $fetchstats = mssql_query(" SELECT sum(case when ChaClass IN(1,64) then 1 end) as brawler,
  866. sum(case when ChaClass IN(2,128) then 1 end) as swordsman,
  867. sum(case when ChaClass IN(4,256) then 1 end) as archer,
  868. sum(case when ChaClass IN(8,512) then 1 end) as shaman,
  869. sum(case when ChaClass IN(16,32) then 1 end) as extreme,
  870. sum(case when ChaClass IN(1024,2048) then 1 end) as gunner,
  871. sum(case when ChaClass IN(4096,8192) then 1 end) as assassin,
  872. sum(case when ChaClass IN(16384,32768) then 1 end) as magician,
  873. sum(case when ChaDeleted=1 then 1 end) as deleted,
  874. sum(case when ChaOnline=1 then 1 end) as online,
  875. sum(1) as overall
  876. FROM ".$this->bd_sql[db2].".dbo.ChaInfo");
  877. while ($stats = mssql_fetch_array($fetchstats))
  878. {
  879. $mainstats = array(
  880. 'brawler' => (int)$stats['brawler'],
  881. 'swordsman' => (int)$stats['swordsman'],
  882. 'archer' => (int)$stats['archer'],
  883. 'shaman' => (int)$stats['shaman'],
  884. 'extreme' => (int)$stats['extreme'],
  885. 'gunner' => (int)$stats['gunner'],
  886. 'assassin' => (int)$stats['assassin'],
  887. 'magician' => (int)$stats['magician'],
  888. 'online' => (int)$stats['online'],
  889. 'deleted' => (int)$stats['deleted'],
  890. 'overall' => (int)$stats['overall']
  891. );
  892. }
  893.  
  894. return $mainstats;
  895.  
  896. }
  897. public function getiCafe(){
  898. $topuplist = array();
  899. $i=0;
  900. $get_new_topup = mssql_query("SELECT ShopName,ShopID,ShopOwner FROM ".$this->bd_sql[db1].".dbo.ShopInfo");
  901. while ($new_topup = mssql_fetch_array($get_new_topup)) {
  902. $topuplist[$i] = array(
  903. 'branch' => $new_topup['ShopName'],
  904. 'owner' => $new_topup['ShopOwner'],
  905. 'code' => $new_topup['ShopID']
  906. );
  907. $topuplist['count']++;
  908. $i++;
  909. }
  910. return $topuplist;
  911. }
  912. function getGuMarkImage ( $guild ){
  913. $get_points = mssql_query("SELECT GuMarkImage FROM ".$this->bd_sql['db2'].".dbo.GuildInfo where GuNum = '".$guild."'");
  914. while ($points = mssql_fetch_array($get_points)) {
  915. return $points[GuMarkImage];
  916. }
  917. }
  918. function getAvatar ( $xemail ){
  919.  
  920. return md5( strtolower( trim( $xemail ) ) );
  921. }
  922. function Init() {
  923. error_reporting(E_ALL ^E_NOTICE ^E_WARNING);
  924. date_default_timezone_set('Asia/Manila');
  925. putenv("TZ=Asia/Manila");
  926.  
  927. if (!in_array($_SESSION["___user_"], $this->def['admin_username'])) $this->doStartSecurity();
  928.  
  929.  
  930. }
  931. public function doCheckNumRows ( $stmt ){
  932. $rows = mssql_num_rows($stmt);
  933. if($rows > 0) return true;
  934. else return false;
  935. }
  936. public function getClass($class){
  937. switch($class)
  938. {
  939. case 1:
  940. case 64:
  941. return "Brawler";
  942. break;
  943. case 2:
  944. case 128:
  945. return "Swordsman";
  946. break;
  947. case 4:
  948. case 256:
  949. return "Archer";
  950. break;
  951. case 8:
  952. case 512:
  953. return "Shaman";
  954. break;
  955. case 1024:
  956. case 2048:
  957. return "Gunner";
  958. break;
  959. case 4096:
  960. case 8192:
  961. return "Assassin";
  962. break;
  963. case 16384:
  964. case 32768:
  965. return "Magician";
  966. break;
  967. default:
  968. return "N/A";
  969. }
  970. }
  971. public function getSchool($school){
  972. switch ($school){
  973. case 0:
  974. return "SG";
  975. break;
  976. case 1:
  977. return "MP";
  978. break;
  979. case 2:
  980. return "PHX";
  981. break;
  982. default:
  983. return "Leonair";
  984. }
  985.  
  986.  
  987. }
  988. public function getOnlineStatus($online){
  989. switch($online)
  990. {
  991. case 0:
  992. return "Offline";
  993. break;
  994. case 1:
  995. return "Online";
  996. break;
  997. }
  998.  
  999. }
  1000. function shorten_string($oldstring, $wordsreturned){
  1001. $retval = $string;
  1002. $string = preg_replace('/(?<=\S,)(?=\S)/', ' ', $oldstring);
  1003. $string = str_replace("\n", " ", $string);
  1004. $array = explode(" ", $string);
  1005. if (count($array)<=$wordsreturned)
  1006. {
  1007. $retval = $string;
  1008. }
  1009. else
  1010. {
  1011. array_splice($array, $wordsreturned);
  1012. $retval = implode(" ", $array)." ";
  1013. }
  1014. return $retval;
  1015. }
  1016.  
  1017. function mask ( $str, $start = 0, $length = null ) {
  1018. $mask = preg_replace ( "/\S/", "*", $str );
  1019. if ( is_null ( $length )) {
  1020. $mask = substr ( $mask, $start );
  1021. $str = substr_replace ( $str, $mask, $start );
  1022. } else {
  1023. $mask = substr ( $mask, $start, $length );
  1024. $str = substr_replace ( $str, $mask, $start, $length );
  1025. }
  1026. return $str;
  1027. }
  1028.  
  1029. function doStartSecurity(){
  1030.  
  1031. $today = date("Ymd");
  1032. $ip = $_SERVER['REMOTE_ADDR'];
  1033. $time = date("l dS of F Y h:i:s A");
  1034. $script = $_SERVER['SCRIPT_NAME'];
  1035. //$fp = fopen ("logs/errlog_$today.txt", "a+");
  1036. $sql_inject_1 = array(";","'","%",'"'); #Whoth need replace
  1037. $sql_inject_2 = array("", "","","&quot;"); #To wont replace
  1038. $GET_KEY = array_keys($_GET); #array keys from $_GET
  1039. $POST_KEY = array_keys($_POST); #array keys from $_POST
  1040. $COOKIE_KEY = array_keys($_COOKIE); #array keys from $_COOKIE
  1041.  
  1042. /*begin clear $_GET */
  1043. for($i=0;$i<count($GET_KEY);$i++)
  1044. {
  1045. $real_get[$i] = $_GET[$GET_KEY[$i]];
  1046. $_GET[$GET_KEY[$i]] = str_replace($sql_inject_1, $sql_inject_2, htmlspecialchars($_GET[$GET_KEY[$i]]));
  1047. if($real_get[$i] != $_GET[$GET_KEY[$i]])
  1048. {
  1049. //fwrite ($fp, "IP: $ip\r\n");
  1050. //fwrite ($fp, "Method: GET\r\n");
  1051. //fwrite ($fp, "Value: $real_get[$i]\r\n");
  1052. //fwrite ($fp, "Script: $script\r\n");
  1053. //fwrite ($fp, "Time: $time\r\n");
  1054. //fwrite ($fp, "==================================\r\n");
  1055. }
  1056. }
  1057. /*end clear $_GET */
  1058.  
  1059. /*begin clear $_POST */
  1060. for($i=0;$i<count($POST_KEY);$i++)
  1061. {
  1062. $real_post[$i] = $_POST[$POST_KEY[$i]];
  1063. $_POST[$POST_KEY[$i]] = str_replace($sql_inject_1, $sql_inject_2, htmlspecialchars($_POST[$POST_KEY[$i]]));
  1064. if($real_post[$i] != $_POST[$POST_KEY[$i]])
  1065. {
  1066. //fwrite ($fp, "IP: $ip\r\n");
  1067. //fwrite ($fp, "Method: POST\r\n");
  1068. //fwrite ($fp, "Value: $real_post[$i]\r\n");
  1069. //fwrite ($fp, "Script: $script\r\n");
  1070. //fwrite ($fp, "Time: $time\r\n");
  1071. //fwrite ($fp, "==================================\r\n");
  1072. }
  1073. }
  1074. /*end clear $_POST */
  1075.  
  1076. /*begin clear $_COOKIE */
  1077. for($i=0;$i<count($COOKIE_KEY);$i++)
  1078. {
  1079. $real_cookie[$i] = $_COOKIE[$COOKIE_KEY[$i]];
  1080. $_COOKIE[$COOKIE_KEY[$i]] = str_replace($sql_inject_1, $sql_inject_2, htmlspecialchars($_COOKIE[$COOKIE_KEY[$i]]));
  1081. if($real_cookie[$i] != $_COOKIE[$COOKIE_KEY[$i]])
  1082. {
  1083. //fwrite ($fp, "IP: $ip\r\n");
  1084. //fwrite ($fp, "Method: COOKIE\r\n");
  1085. //fwrite ($fp, "Value: $real_cookie[$i]\r\n");
  1086. //fwrite ($fp, "Script: $script\r\n");
  1087. //fwrite ($fp, "Time: $time\r\n");
  1088. //fwrite ($fp, "==================================\r\n");
  1089. }
  1090. }
  1091.  
  1092. /*end clear $_COOKIE */
  1093. //fclose ($fp);
  1094. }
  1095.  
  1096. public $seiferxiii = array(
  1097. 'hash' => '17377db57e632b4c6ac6b7bc5717835a',
  1098. 'ze' => 'C9E1074F5B3F9FC8EA1',
  1099. 'bu' => 'C0E190D8267E36708F9'
  1100.  
  1101. );
  1102.  
  1103. }
  1104. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement