Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- ini_set("display_errors", "0");
- ini_set('memory_limit', '256M');
- ini_set('max_execution_time', 0);
- set_time_limit(0);
- header('Cache-Control: no-cache, no-store, must-revalidate');
- header('Pragma: no-cache');
- header('Expires: 0');
- require("sml_files/db.php");
- require("sml_files/rss.php");
- require("sml_files/indexer.php");
- require("sml_files/smarty/Smarty.class.php");
- require("sml_files/funct.php");
- define("SESSION_PATH","/");
- define("SESSION_DOMAIN",$_SERVER['HTTP_HOST']);
- $smarty = new Smarty();
- $fp = 1;
- $login = 0;
- $ok = "";
- $error = "";
- $user = "";
- $pass = "";
- $target_count = 0;
- $search_count = 0;
- $proxy_count = 0;
- $ok_count = 0;
- $err_count = 0;
- $na_count = 0;
- $content_count = 0;
- $thread_number = 3;
- $man_interval = 3;
- $site_host_page = SESSION_DOMAIN;
- $host_url = "http://".SESSION_DOMAIN;
- $host_path = HOST_PATH;
- $name = "";
- $title = "";
- $excerpt = "";
- $url = "";
- $logout = 0;
- $gexq = "";
- $gexnum = 10;
- $yexq = "";
- $yexnum = 10;
- $bexq = "";
- $bexnum = 20;
- $proc = 2;
- $blog_name = "blogs";
- $blog_param = "pg";
- $modl = 0;
- $lbtrk = 2;
- $tsata = 2;
- $tsnfl = 2;
- $tspgr = 0;
- $tsobl = 0;
- $tsbwd = "";
- $tb_links = 0;
- $pb_links = 0;
- $total_links = 0;
- if(isset($_GET['modl']) && $_GET['modl'] >= 1){
- $tmodl = preg_replace("/([^0-9]{1,}+)/e","substr('\\0',0,0)", trim($_GET['modl']));
- $tmodl = trim($tmodl);
- if($tmodl >= 1){
- $modl = $tmodl;
- }
- }
- if(isset($_GET['logout']) && $_GET['logout'] == 1 && isset($_COOKIE["smlsessions"])){
- $logout = trim($_GET['logout']);
- $ckey = "";
- $sname = "smlsessions";
- $expire = 0;
- setcookie($sname, $ckey, $expire, SESSION_PATH, SESSION_DOMAIN);
- $smarty->assign('ok',$ok);
- $smarty->assign('error',$error);
- $smarty->assign('fp',1);
- $smarty->assign('logout',$logout);
- $smarty->assign('page_title','SmartLink Admin Login');
- $smarty->display('header.tpl');
- $smarty->display('admin.tpl');
- $smarty->display('footer.tpl');
- exit;
- }
- if(isset($_GET['help']) && $_GET['help'] == 1 && isset($_COOKIE["smlsessions"])){
- $smarty->assign('page_title','SmartLink Help');
- $smarty->display('header.tpl');
- $smarty->assign('host_url',$host_url);
- $smarty->assign('host_path',$host_path);
- $smarty->display('help.tpl');
- $smarty->display('footer.tpl');
- exit;
- }
- if(isset($_POST) && count($_POST) > 0){
- if(isset($_POST['user']) && isset($_POST['pass'])){
- $user = trim($_POST['user']);
- $pass = trim($_POST['pass']);
- $query = "SELECT id, site_host_page from sml_settings WHERE user = '".mysql_real_escape_string($user)."' AND pass = '".sha1($pass)."' LIMIT 1";
- $result = mysql_query($query, $GLOBALS['DB']);
- if(is_resource($result) && mysql_num_rows($result) > 0) {
- $data = mysql_fetch_array($result);
- $v_host_page = trim($data['site_host_page']);
- $secret_word = "th3_#!^)324f2%!@&^6fcjfd";
- $td = time();
- if(isset($_SERVER['HTTP_HOST'])){
- $code = $secret_word."http://".$_SERVER['HTTP_HOST']."/".$td;
- } else {
- $code = $secret_word."".$v_host_page."".$td;
- }
- $key = strtoupper(md5($code));
- $idv_url = "http://www.siteduct.com/sl/idv.php?key=".$key."&td=".$td."&user=".$user;
- $idv_cnf = @file_get_contents($idv_url);
- $idv_cnf = trim($idv_cnf);
- if(strlen($idv_cnf) <= 0){
- $error = "Error: License error.";
- } else {
- $secret_word_2 = "*%)fgg(!#@%&tr^&*@!#";
- if(isset($_SERVER['HTTP_HOST'])){
- $code_2 = $secret_word_2."http://".$_SERVER['HTTP_HOST']."/".$td;
- } else {
- $code_2 = $secret_word_2."".$v_host_page."".$td;
- }
- $key_2 = strtoupper(md5($code_2));
- if($idv_cnf != $key_2){
- $error = "Error: License error.";
- } else {
- $ckey = trim(md5(time()));
- $query = "UPDATE sml_settings set ckey = '".mysql_real_escape_string($ckey)."' WHERE user = '".mysql_real_escape_string($user)."' AND pass = '".sha1($pass)."' LIMIT 1";
- $result = mysql_query($query, $GLOBALS['DB']);
- if(mysql_affected_rows() > 0) {
- $fp = 0;
- $login = 1;
- $sname = "smlsessions";
- $expire = 0;
- setcookie($sname, $ckey, $expire, SESSION_PATH, SESSION_DOMAIN);
- }
- }
- }
- } else {
- $error = "Error: Username or password is not correct.";
- }
- }
- }
- .................................................................................
- ...............................
- ..........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement