Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2013
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.51 KB | None | 0 0
  1. <?php
  2.  
  3. error_reporting(0);
  4. ini_set("display_errors", "0");
  5. ini_set('memory_limit', '256M');
  6. ini_set('max_execution_time', 0);
  7. set_time_limit(0);
  8.  
  9. header('Cache-Control: no-cache, no-store, must-revalidate');
  10. header('Pragma: no-cache');
  11. header('Expires: 0');
  12.  
  13. require("sml_files/db.php");
  14. require("sml_files/rss.php");
  15. require("sml_files/indexer.php");
  16. require("sml_files/smarty/Smarty.class.php");
  17. require("sml_files/funct.php");
  18.  
  19. define("SESSION_PATH","/");
  20. define("SESSION_DOMAIN",$_SERVER['HTTP_HOST']);
  21.  
  22. $smarty = new Smarty();
  23.  
  24. $fp = 1;
  25. $login = 0;
  26. $ok = "";
  27. $error = "";
  28. $user = "";
  29. $pass = "";
  30. $target_count = 0;
  31. $search_count = 0;
  32. $proxy_count = 0;
  33. $ok_count = 0;
  34. $err_count = 0;
  35. $na_count = 0;
  36. $content_count = 0;
  37. $thread_number = 3;
  38. $man_interval = 3;
  39. $site_host_page = SESSION_DOMAIN;
  40. $host_url = "http://".SESSION_DOMAIN;
  41. $host_path = HOST_PATH;
  42. $name = "";
  43. $title = "";
  44. $excerpt = "";
  45. $url = "";
  46. $logout = 0;
  47. $gexq = "";
  48. $gexnum = 10;
  49. $yexq = "";
  50. $yexnum = 10;
  51. $bexq = "";
  52. $bexnum = 20;
  53. $proc = 2;
  54. $blog_name = "blogs";
  55. $blog_param = "pg";
  56. $modl = 0;
  57. $lbtrk = 2;
  58. $tsata = 2;
  59. $tsnfl = 2;
  60. $tspgr = 0;
  61. $tsobl = 0;
  62. $tsbwd = "";
  63. $tb_links = 0;
  64. $pb_links = 0;
  65. $total_links = 0;
  66.  
  67. if(isset($_GET['modl']) && $_GET['modl'] >= 1){
  68.  
  69. $tmodl = preg_replace("/([^0-9]{1,}+)/e","substr('\\0',0,0)", trim($_GET['modl']));
  70. $tmodl = trim($tmodl);
  71.  
  72. if($tmodl >= 1){
  73.  
  74. $modl = $tmodl;
  75. }
  76. }
  77.  
  78. if(isset($_GET['logout']) && $_GET['logout'] == 1 && isset($_COOKIE["smlsessions"])){
  79.  
  80. $logout = trim($_GET['logout']);
  81. $ckey = "";
  82. $sname = "smlsessions";
  83. $expire = 0;
  84. setcookie($sname, $ckey, $expire, SESSION_PATH, SESSION_DOMAIN);
  85.  
  86. $smarty->assign('ok',$ok);
  87. $smarty->assign('error',$error);
  88. $smarty->assign('fp',1);
  89. $smarty->assign('logout',$logout);
  90.  
  91. $smarty->assign('page_title','SmartLink Admin Login');
  92. $smarty->display('header.tpl');
  93.  
  94. $smarty->display('admin.tpl');
  95. $smarty->display('footer.tpl');
  96. exit;
  97.  
  98. }
  99.  
  100. if(isset($_GET['help']) && $_GET['help'] == 1 && isset($_COOKIE["smlsessions"])){
  101.  
  102. $smarty->assign('page_title','SmartLink Help');
  103. $smarty->display('header.tpl');
  104. $smarty->assign('host_url',$host_url);
  105. $smarty->assign('host_path',$host_path);
  106.  
  107. $smarty->display('help.tpl');
  108. $smarty->display('footer.tpl');
  109. exit;
  110.  
  111. }
  112.  
  113. if(isset($_POST) && count($_POST) > 0){
  114.  
  115. if(isset($_POST['user']) && isset($_POST['pass'])){
  116.  
  117. $user = trim($_POST['user']);
  118. $pass = trim($_POST['pass']);
  119.  
  120. $query = "SELECT id, site_host_page from sml_settings WHERE user = '".mysql_real_escape_string($user)."' AND pass = '".sha1($pass)."' LIMIT 1";
  121. $result = mysql_query($query, $GLOBALS['DB']);
  122.  
  123. if(is_resource($result) && mysql_num_rows($result) > 0) {
  124.  
  125. $data = mysql_fetch_array($result);
  126. $v_host_page = trim($data['site_host_page']);
  127.  
  128. $secret_word = "th3_#!^)324f2%!@&^6fcjfd";
  129. $td = time();
  130.  
  131. if(isset($_SERVER['HTTP_HOST'])){
  132.  
  133. $code = $secret_word."http://".$_SERVER['HTTP_HOST']."/".$td;
  134.  
  135. } else {
  136.  
  137. $code = $secret_word."".$v_host_page."".$td;
  138. }
  139.  
  140. $key = strtoupper(md5($code));
  141.  
  142. $idv_url = "http://www.siteduct.com/sl/idv.php?key=".$key."&td=".$td."&user=".$user;
  143. $idv_cnf = @file_get_contents($idv_url);
  144. $idv_cnf = trim($idv_cnf);
  145.  
  146. if(strlen($idv_cnf) <= 0){
  147.  
  148. $error = "Error: License error.";
  149.  
  150. } else {
  151.  
  152. $secret_word_2 = "*%)fgg(!#@%&tr^&*@!#";
  153.  
  154. if(isset($_SERVER['HTTP_HOST'])){
  155.  
  156. $code_2 = $secret_word_2."http://".$_SERVER['HTTP_HOST']."/".$td;
  157.  
  158. } else {
  159.  
  160. $code_2 = $secret_word_2."".$v_host_page."".$td;
  161. }
  162.  
  163. $key_2 = strtoupper(md5($code_2));
  164.  
  165. if($idv_cnf != $key_2){
  166.  
  167. $error = "Error: License error.";
  168.  
  169. } else {
  170.  
  171. $ckey = trim(md5(time()));
  172.  
  173. $query = "UPDATE sml_settings set ckey = '".mysql_real_escape_string($ckey)."' WHERE user = '".mysql_real_escape_string($user)."' AND pass = '".sha1($pass)."' LIMIT 1";
  174. $result = mysql_query($query, $GLOBALS['DB']);
  175.  
  176. if(mysql_affected_rows() > 0) {
  177.  
  178. $fp = 0;
  179. $login = 1;
  180. $sname = "smlsessions";
  181. $expire = 0;
  182. setcookie($sname, $ckey, $expire, SESSION_PATH, SESSION_DOMAIN);
  183. }
  184. }
  185. }
  186.  
  187. } else {
  188.  
  189. $error = "Error: Username or password is not correct.";
  190. }
  191. }
  192. }
  193. .................................................................................
  194. ...............................
  195. ..........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement