daily pastebin goal
1%
SHARE
TWEET

core.php

TheWorldHacking Jun 5th, 2017 104 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. define("CMS", TRUE);
  4.  
  5. session_start();
  6.  
  7. $sqlhostname = "mysql.hostinger.it";   
  8. $sqlusername = "u643495072_root";
  9. $sqlpassword = "admin1" //password localhost
  10. $sqldb = "u643495072_habbo";        // il tuo database
  11. $path = "http://localhost/";    //il tuo link preceduto da http:// e seguito da una /
  12.  
  13. mysql_connect("$sqlhostname", "$sqlusername", "$sqlpassword")or die("<br><font size='2' face='Tahoma'><b>Errore del CMS:</b><br><em>Non Riesco a connettermi al databse MySQL!</em></font>");
  14. mysql_select_db("$sqldb")or die("<br><font size='2' face='Tahoma'><b>Non connesso al Database MySQL!</font>");
  15.  
  16. function HoloText($str, $advanced=false, $bbcode=false) {
  17.     if($advanced == true){ return stripslashes($str); }
  18.     $str = stripslashes(nl2br(htmlspecialchars($str)));
  19.     if($bbcode == true){$str = bbcode_format($str); }
  20.     return $str;
  21. }
  22.  
  23. $H = date('H');
  24. $i = date('i');
  25. $s = date('s');
  26. $m = date('m');
  27. $d = date('d');
  28. $Y = date('Y');
  29. $j = date('j');
  30. $n = date('n');
  31. $today = $d;
  32. $month = $m;
  33. $year = $Y;
  34. $date_normal = date('d-m-Y',mktime($m,$d,$Y));
  35. $date_full = date('d-m-Y H:i:s',mktime($H,$i,$s,$m,$d,$Y));
  36. $date_time = date('H:i:s', mktime($H,$i,$s));
  37.  
  38. $name = $_SESSION['username'];
  39. $sql = mysql_query("SELECT * FROM users WHERE username = '".$name."' ");
  40. $myrow = mysql_fetch_assoc($sql);
  41. $my_id = $myrow['id'];
  42.  
  43. $remote_ip = $_SERVER[REMOTE_ADDR];
  44. $sysadmin = "1";
  45. $sql = mysql_query("SELECT * FROM cms_system LIMIT 1");
  46. $site = mysql_fetch_assoc($sql);
  47. $trade = $site['trade'];
  48. if($site['site_closed'] == '1' && $myrow['rank'] < 6 && empty($manu)){ header("location: ".$path."manutenzione.php"); }
  49. $sitename = $site['sitename'];
  50. $shortname = $site['shortname'];
  51. $s1ql = mysql_query("SELECT * FROM server_status LIMIT 1");
  52. $r1ow = mysql_fetch_assoc($s1ql);
  53. $online_count = $r1ow['users_online'];
  54.  
  55. if(empty($allow_guests)){ $allow_guests = "false"; }
  56. if(!session_is_registered(username) && $allow_guests == "false"){header("location: ".$path."index.php?redirect=".$_SERVER[REQUEST_URI].""); }
  57.  
  58. function HoloHash($password){
  59. $string = sha1($password . "xCg532%@%gdvf^5DGaa6&*rFTfg^FD4\$OIFThrR_gh(ugf*/");
  60. return $string;
  61. }
  62.  
  63. function GenerateTicket(){
  64.     $data = "us-";
  65.     for ($i=1; $i<=6; $i++){
  66.         $data = $data . rand(0,9);
  67.     }
  68.     $data = $data . "-";
  69.     for ($i=1; $i<=20; $i++){
  70.         $data = $data . rand(0,9);
  71.     }
  72.     $data = $data . "-time-stop-client";
  73.     $data = $data . rand(0,5);
  74.     return $data;
  75. }
  76.  
  77. function decode($text){
  78. $str = str_replace(array('à','è','ì','ò','ù','é'), array('&agrave','&egrave','&igrave','&ograve','&ugrave','&eacute'), $text);
  79. return $str;
  80. }
  81.  
  82. if(empty($admin)){ $admin = "false"; }
  83. if($admin == "true" && $myrow['rank'] < 7){ header("location: ../index"); }
  84.  
  85. if(!session_is_registered(username)){ $name = "Visitatore"; }
  86.  
  87. $pban = mysql_query("SELECT * FROM bans WHERE value = '".$name."' ");
  88. if(mysql_num_rows($pban) > 0){
  89. $ban = mysql_fetch_assoc($pban);
  90. session_destroy();
  91. header("location: index?banned=true&banid=".$ban['id']." ");
  92. }
  93. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top