require_once("config/sql_session.php");
session_start();
@ini_set('display_errors',0);
//6482138266:AAEbfB_7odN3Ba02FdGzdOsJgMCaz8MdmHw
//https://api.telegram.org/bot6482138266:AAEbfB_7odN3Ba02FdGzdOsJgMCaz8MdmHw/getUpdates
//https://api.telegram.org/bot6482138266:AAEbfB_7odN3Ba02FdGzdOsJgMCaz8MdmHw/sendMessage?chat_id=-912323629&text=Băng lươn lẹo
require_once("config/adminfunc.php");
require_once("config/adminfunc_gh.php");
require_once("config/netidfunc.php");
require_once("config/edu_func.php");
require_once("config/multifunc.php");
require_once("config/ChatGPT.php");
//Config input format
//Expire
define('COOKIE_PUID', '_puid=user-...');
// To use chat.openai.com
// get ACCESS_TOKEN - https://chat.openai.com/api/auth/session
define('ACCESS_TOKEN', 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik1UaEVOVUpHTkVNMVFURTRNMEZCTWpkQ05UZzVNRFUxUlRVd1FVSkRNRU13UmtGRVFrRXpSZyJ9.eyJodHRwczovL2FwaS5vcGVuYWkuY29tL3Byb2ZpbGUiOnsiZW1haWwiOiJwaHVvbmduZ3V5ZW4wN2N0QGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlfSwiaHR0cHM6Ly9hcGkub3BlbmFpLmNvbS9hdXRoIjp7InVzZXJfaWQiOiJ1c2VyLUVlT3BQSzY1YWxIWWo0M0pNT1VOZWYwcyJ9LCJpc3MiOiJodHRwczovL2F1dGgwLm9wZW5haS5jb20vIiwic3ViIjoiZ29vZ2xlLW9hdXRoMnwxMTI3ODUzMTg4MjQ2NDcyMzY4NzkiLCJhdWQiOlsiaHR0cHM6Ly9hcGkub3BlbmFpLmNvbS92MSIsImh0dHBzOi8vb3BlbmFpLm9wZW5haS5hdXRoMGFwcC5jb20vdXNlcmluZm8iXSwiaWF0IjoxNzAyOTIyNjg2LCJleHAiOjE3MDM3ODY2ODYsImF6cCI6IlRkSkljYmUxNldvVEh0Tjk1bnl5d2g1RTR5T282SXRHIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBlbWFpbCBtb2RlbC5yZWFkIG1vZGVsLnJlcXVlc3Qgb3JnYW5pemF0aW9uLnJlYWQgb3JnYW5pemF0aW9uLndyaXRlIG9mZmxpbmVfYWNjZXNzIn0.NeDbfmidRbg9SvE2zGEdlEcfjNtV-cC3Tgm68Jcw0TI-X7kbGUdrEG38ZAW8VjZmeL_C7uEb_dzdMDLfZuQn7XtC0nO7Koa0x_UO6nfYcNOXqhhzUoTrfB4R5QgG1ryFKDD0LO65FxMZ9cVviSFRlIxjOi50lC8uRCuYfBxmQwiYoul6eBFLfKBnaHsbu-5f5V0LMpfsZ5177-mQPFHVbYe2_tWdKFrkC8wj2vDnly_jnrKtiQp58O9e7OlIXlndk_kPIUJHteasrwJttXpiT6K999tQ6oO3_UZ9A0mPzlJT6K_cY0Nz4efdfTUCf6BzFEdKkm7_cjlrM4gn3KP4MQ');
$domain = DOMAIN_only($_SERVER['HTTP_HOST']);
$serverHost = explode('.', $_SERVER['HTTP_HOST']);
$subdomain = trim($serverHost[0]);
$domain1ty = $domain;
$web_v = "5.188.12391255693767517040014706339";
$APIKey ="97360024EA772AC5D39B1C6E73559E";
$SecretKey ="CB1E0206923F025F1019C1CE8646D6";
$domain_kho = "676bE8954_86Cc2";
$xu0DOI = 100000000000;
$domain_taptrung = 18;
@session_set_cookie_params ( 0 ,"/", preg_replace( "/^".( isset( $_SERVER["SUBDOMAIN"] ) ? $_SERVER["SUBDOMAIN"]:"www" )."\./","", $_SERVER["HTTP_HOST"] ) );
@ini_set('session.cookie_domain','.'.$domain);
@ini_set('session.gc_maxlifetime',30*60);
@ini_set('max_execution_time', 0);
@query("SET character_set_connection=utf8mb4, character_set_results=utf8mb4, character_set_client=utf8mb4");
@date_default_timezone_set('Asia/Saigon');
$ipme = fetch_alt_ip();
$domain_info = DOMAIN_info($domain1ty);
if(!isset($domain_info))
{
die("Not allow ip ".$ipme);
exit();
}
$step_khachhang = array(201,207,208,111,230,217,209,219,214,222,223,210,227);
$step_nhanvien = array(105,101, 226,203,205,204,200,206,220,212,104,500,0,200,112,207,103,102,109);
$step_public = array(231,232,202,108);
$array_subdomain = array('quanly', 'hotro', 'my', 'vip');
//unset($_SESSION['oneid_buy']);
if(is_array($domain_info))
{
$_SESSION['domainid'] = $domain_info['id'];
$_SESSION['admin_uid'] = $domain_info['admin_uid'];
$_SESSION['admin_oneid']= $domain_info['admin_oneid'];
$admin_oneid= $domain_info['admin_oneid'];
$domain_oneid = $domain_info['oneid'];
$oneid_domain = $domain_info['oneid'];
if(!empty($domain_info['oneid_me']) AND !isset($_SESSION['oneid_buy']))
{
$_SESSION['oneid_buy'] = $domain_info['oneid_me'];
}
elseif(!isset($_SESSION['oneid_buy'])) $_SESSION['oneid_buy'] = $oneid_domain;
//echo $_SESSION['oneid_buy'];domain_root
$domain = $domain_info['domain'];
$duongdantin = $domain_info['duongdantin'];
$ngayhethan = $domain_info['ngayhethan'];
$tong_tk_nhanvien = $domain_info['soluong_tk_nhanvien'];
$tong_tk_khach = $domain_info['soluong_tk_khach'];
$admin_dvt = $domain_info['dvt'];
$domain_title = $domain_info['domain_title'];
$domain_root = $domain_info['domain_root'];
$from_mail = $domain_info['email'];
$admin_css = $domain_info['css'];
$admin_css_erp = $domain_info['css_erp'];
$admin_maunen = $domain_info['maunen'];
$admin_mauchu = $domain_info['mauchu'];
$actived_shop = $domain_info['actived_shop'];
$theme1 = $domain_info['theme1'];
$theme1_active = $domain_info['theme1_active'];
$phantram_shop = $domain_info['phantram'];
$yesno_webpush = $domain_info['webpush'];
$domain_map = $domain_info['map'];
$guest_oneid = $domain_info['guest_oneid'];
$popup_login = $domain_info['popup_login'];
$from_name = "$domain_title - $domain";
$admin_info = MEMBERS_info($_SESSION['admin_oneid']);
$admin_hoten = isset($admin_info['hoten'])?$admin_info['hoten']:'';
$_SESSION['token_ghtk'] = "3eBd1f7c37Ccb730158BC91d7cbCeF75D157c400";
$_SESSION['token_ghn'] = "56c297f3-750c-11ec-b18b-3a9c67615aba";
//$logo_domain = $fullpath."/datafiles/".$domain_info['id']."/$duongdantin/".$domain_info['logo'];
//$logo_domain_mb = $fullpath."/datafiles/".$domain_info['id']."/$duongdantin/".$domain_info['logo_mb'];
//$favicon_domain = $fullpath."/datafiles/".$domain_info['id']."/$duongdantin/".$domain_info['icon'];
}
if(!isset($_SESSION['domain_lang'])) $_SESSION['domain_lang']= $domain_info['domain_lang'];
elseif(isset($_GET['lang'])) $_SESSION['domain_lang'] = PlanText($_GET['lang']);
if($_SESSION['domainid'] < 1)
{
include("you_are_not_allow.php");
exit();
}
if(isset($ngayhethan) AND $ngayhethan < time())
{
include("dahethan.php");
exit();
}
if($domain_info['active_ip']==1)
{
$accept_ip = Get_MEMBERS_ip($mysqli,$_SESSION['domainid'],$ipme);
if(isset($accept_ip['id']) AND $accept_ip['id'] <1) die("Not allow ip ".$ipme);
}
include("config/thumbnail.php");
include("bien.php");
//UpNode_nh();
if(empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "off"){
$redirect = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header('HTTP/1.1 301 Moved Permanently');
header('Location: ' . $redirect);
exit();
}
$docpat = PlanText(htmlspecialchars($_SERVER['REQUEST_URI']));
$mainexp = explode("/",$docpat);
if(isset($mainexp[1])) $motty = $mainexp[1]; else $motty = NULL;
if(isset($mainexp[2])) $haity = $mainexp[2]; else $haity = NULL;
if(isset($mainexp[3])) $baty = $mainexp[3]; else $baty = NULL;
if(isset($mainexp[4])) $idoption1 = $mainexp[4];
if(isset($mainexp[5])) $idoption2 = $mainexp[5];
$motty = preg_replace('/\?.*/', '', $motty);
$haity = preg_replace('/\?.*/', '', $haity);
$baty = preg_replace('/\?.*/', '', $baty);
if(isset($motty)) $motty_nho = strtolower($motty); else $motty_nho = NULL;
if(isset($haity)) $haity_nho = strtolower($haity); else $haity_nho = NULL;
if(isset($baty)) $baty_nho = strtolower($baty); else $baty_nho = NULL;
if($motty=='amp') $accept_key = urldecode($haity);
else $accept_key = urldecode($motty);
$array_admin = array(1808,108,109);
$array_bossduyetluong = array(1808,109,108,11);
$array_quanlykho = array(1808,109,108,13);
//echo create_pass(md5("1ty.vnhoangdung3p"),"B2LCX");
/////////////////////////////////////////////////////////
$checksub = CHECK_subdomain($_SERVER['HTTP_HOST'],$domain);
if($checksub==1)
{
$themes_page = $domain_info['themes'];
if(isset($_SESSION['phannhom']) AND $_SESSION['phannhom'] < 10) $fullpath = $domain_info['domain_fullpath'];
elseif(@$_SESSION['phannhom'] >= 10) $fullpath = $domain_info['domain_fullpath'];
}
elseif($theme1_active==1)
{
$fullpath = $domain_info['domain_root'];
$themes_page = $theme1;
}
else
{
//$domain1ty = $_SERVER['SERVER_NAME'];
$fullpath = 'https://'.$_SERVER['SERVER_NAME'];
//$fullpath = $domain_info['domain_fullpath'];
}
//$vnp_Url = "https://pay.vnpay.vn/vpcpay.html";
//$vnp_Url = "https://sandbox.vnpayment.vn/paymentv2/vpcpay.html";
//$vnp_Returnurl = "$fullpath/return-transaction";
//$vnp_apiUrl = "http://sandbox.vnpayment.vn/merchant_webapi/merchant.html";
//$apiUrl = "https://sandbox.vnpayment.vn/merchant_webapi/api/transaction";
//$startTime = date("YmdHis");
//$expire = date('YmdHis',strtotime('+15 minutes',strtotime($startTime)));
//echo $fullpath; exit();
if(isset($_COOKIE['WEBCOOKIE_ID']) AND !is_oneid($_SESSION['oneid']))
{
checkhash($_COOKIE['WEBCOOKIE_HASH'],$_COOKIE['WEBCOOKIE_ID'],$_COOKIE['WEBCOOKIE_PASS'],$fullpath);
}
if(!isset($_SESSION['OneTY']))
{
$_SESSION['OneTY'] = sessionhash_id();
savehash($_SESSION['OneTY'],0,'',0,@$fullpath.$_SERVER['REQUEST_URI']);
}
$logo_domain = @$fullpath."/datafiles/".$domain_info['id']."/$duongdantin/".$domain_info['logo'];
$logo_domain_mb = @$fullpath."/datafiles/".$domain_info['id']."/$duongdantin/".$domain_info['logo_mb'];
$favicon_domain = @$fullpath."/datafiles/".$domain_info['id']."/$duongdantin/".$domain_info['icon'];
///////////
if($motty=='FeA0Ea753_F4D38')
{
include("policy.php");
exit();
}
if ($motty=='xoamembertag' AND $_SESSION['phannhom']=='1808') {
echo '';
query("DELETE FROM `members_tag` WHERE `oneid_uid` = '0' AND `activetags`=0 LIMIT 1000");
echo "Deleted 1000 rows `oneid_uid` = '0' AND `activetags`=0"; // Anh Kỳ chỉnh chổ này!
exit();
}
if ($motty=='xoamemberlog' AND $_SESSION['phannhom']=='1808') {
echo '';
query("DELETE FROM `members_logfile` WHERE `oneid_me` = '0' LIMIT 1000");
echo "Deleted 1000 rows"; // Anh Kỳ chỉnh chổ này!
exit();
}
if(isset($_GET['members']) AND $_GET['members']=='logout')
{
THOAT($domain);
echo "";
exit();
}
if(isset($_SESSION['FB_ID']) AND !$_SESSION['OneTY_user'])
{
FB_check($_SESSION['FB_EMAIL'],$_SESSION['FB_ID'],$_SESSION['FB_FULLNAME'],$domain1ty);
}
elseif(isset($_SESSION['GG_ID']) AND !$_SESSION['OneTY_user'])
{
GG_check($_SESSION['GG_EMAIL'],$_SESSION['GG_ID'],$_SESSION['GG_FULLNAME'],'',$domain1ty,$actual_link);
}
else
{
if($motty=='FB_login'||$motty=='fblogin'||$motty=='fbconnect'||$motty=='fb'||$motty_nho=='fb')
{
if(isset($_SESSION['FB_ID'])) {header("Location: $fullpath");exit();}
include("fb.php");
exit();
}
if($motty=='GG_login'||$motty=='gg'||$motty=='gg_login'||$motty_nho=='gg')
{
if(isset($_SESSION['GG_ID'])) {header("Location: $fullpath");exit();}
include("gg.php");
exit();
}
}
if($motty=='api')
{
include("themes/pagerunas/api.php");
exit();
}
if($motty=='redirect')
{
include("themes/pagerunas/redirect.php");
exit();
}
if($motty=='login-as')
{
if ($_SESSION['phannhom'] == 1808) {
$oneid_uid = PlanText($_GET['oneid']);
$mem_info = MEMBERS_info($oneid_uid);
$_SESSION['OneTY_user'] = $mem_info['uid'];
$_SESSION['oneid'] = $oneid_uid;
}
header("Location: $fullpath");
exit();
}
if($motty=='login-admin-root' AND !empty($_GET['oneid']))
{
$oneid = PlanText($_GET['oneid']);
$checkroot = ROOT_as($oneid);
if($checkroot==1){
$login_all = ROOT_loginas($oneid);
$mem_info = MEMBERS_info($login_all['admin_oneid']);
query("UPDATE `loginas` SET `login`='1' WHERE `oneid`='$oneid' LIMIT 1");
$_SESSION['OneTY_user'] = $mem_info['uid'];
$_SESSION['oneid'] = $login_all['admin_oneid'];
header("Location: $fullpath");
exit();
}
}
if($motty_nho=='loginme' AND $haity_nho > 0)
{
$_SESSION['OneTY_user'] = $haity_nho;
}
if(is_oneid($_SESSION['oneid']) > 0)
{
$mem_info = MEMBERS_info($_SESSION['oneid']);
$_SESSION['phannhom'] = $mem_info['phannhom'];
$_SESSION['OneTY_user'] = $mem_info['uid'];
$_SESSION['netid'] = $mem_info['netid_profile'];
$mem_mess=CheckInbox($_SESSION['oneid']);$mem_allmess=CheckAllInbox($_SESSION['oneid']);
}
else {
$mem_info = array("phannhom"=>0,"uid"=>0); $_SESSION['OneTY_user'] = 0;$_SESSION['oneid']='0';$_SESSION['phannhom']='0';
if(@$mem_info['memlock']==1)
{
echo move_to_url($fullpath,"THÔNG BÁO!
bạn đã bị khóa. Vui lòng liên hệ admin",$fullpath."?members=logout","THÔNG BÁO",3);
exit();
}
}
if (isset($_GET['affid'])) {
$actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$_SESSION['actual_link'] = $actual_link;
$_SESSION['affid'] = PlanText($_GET['affid']);
}
if($motty=='tim-mat-khau')
{
$sql = query("SELECT * FROM `members_losspass` WHERE `id` = '$haity' AND `domainid` = '".$_SESSION['domainid']."' LIMIT 1");
$row = mysqli_fetch_array($sql);
if(mysqli_num_rows($sql)!=1)
{
echo move_to_url($fullpath,"THÔNG BÁO!
Thông tin không chính xác. Vui lòng liên hệ admin",$fullpath."?members=logout","THÔNG BÁO",3);
exit();
}
$hoten = $row['hoten'];
$email = $row['email'];
$domainid = $row['domainid'];
if($domainid != $_SESSION['domainid'])
{
echo move_to_url($fullpath,"THÔNG BÁO!
Thông tin không chính xác. Vui lòng liên hệ admin",$fullpath."?members=logout","THÔNG BÁO",3);
exit();
}
$password = create_key();
$dm_config = Check_MYDomain_config($_SESSION['domainid'],'email_lay_lai_mat_khau');
$mess = $dm_config['noidung'];
$tieude = $dm_config['tieude'];
$a = array("[%tenthanhvien%]","[%email%]","[%matkhau%]","[%domain%]","[%domain_name%]","[%thoigiangui%]","[%link%]");
$b = array($hoten,$email,$password,$domain1ty,$domain_title,date('d-m-Y H:i:s', time()),$fullpath);
$mess = str_replace($a,$b,$mess);
//$tieude = str_replace($a,$b,$tieude);
query("UPDATE `members` SET `matkhau`='".md5($password)."' WHERE `email`='$email' AND `domainid` = '".$_SESSION['domainid']."' LIMIT 1");
Mail_Sender($email,$hoten,$tieude,$mess,1);
echo move_to_url($fullpath,"THÔNG BÁO!
Vui lòng check mail nhận mật khẩu mới",$fullpath,"THÔNG BÁO",3);
exit();
}
if($motty=='FB_access')
{
echo $_GET['code'];
echo $_GET['error_message'];
exit();
}
if($motty=='FB_go')
{
include("fbgo.php");
exit();
}
if($motty=='FB_auto')
{
POST_fb($domain1ty);
exit();
}
if($motty=='ms_api')
{
include("themes/pagerunas/onedrive.php");
exit();
}
if($motty_nho=='gg_api')
{
include("themes/pagerunas/googledrive.php");//GG_api.php
exit();
}
if($motty=='gg_drive')
{
include("themes/pagerunas/googledrive.php");
exit();
}
if($motty=='api_ms_login')
{
include("themes/pagerunas/api_ms_login.php");
exit();
}
if($motty=='api_post')
{
include("themes/pagerunas/api_post.php");
exit();
}
if($motty=='api_post2')
{
include("themes/pagerunas/api_post2.php");
exit();
}
if($motty=='oneid_action')
{
include("themes/pagerunas/oneid.php");
exit();
}
if($motty=='manifest.json')
{
include("themes/pagerunas/manifest.php");
exit();
}
if($motty=='IMG-x')
{
include("themes/pagerunas/img-resize.php");
exit();
}
if($motty=='openfpt')
{
include("themes/pagerunas/openfpt.php");
exit();
}
if($motty=='autogetimg')
{
include("themes/pagerunas/autogetimg.php");
exit();
}
if($motty=='accesstrade')
{
include("themes/pagerunas/accesstrade.vn.php");
exit();
}
if($motty=='autogetcontent')
{
include("themes/pagerunas/autogeturl.php");
exit();
}
if($motty=='autogetlink')
{
include("themes/pagerunas/autogetlink.php");
exit();
}
if($motty=='phpinfo')
{
phpinfo();
}
if(strtolower($motty)=='tag')
{
$webtag = urldecode($haity);
$webtag = PlanText($webtag);
//@Add_MEMBERS_TAG($webtag);
}
if($motty=='ggmap')
{
include("themes/pagerunas/ggmap.php");
exit();
}
if($motty=='automail')
{
include("themes/pagerunas/automail.php");
exit();
}
if($motty=='live')
{
include("themes/pagerunas/live.php");
exit();
}
if($motty=='sitemap.xml')
{
include("themes/pagerunas/sitemap.php");
exit();
}
if($motty=='ajbat')
{
include("themes/pagerunas/ajax_drive.php");
include("themes/pagerunas/ajax.php");
exit();
}
if($motty=='ajbat_shop')
{
include("themes/pagerunas/ajbat_shop.php");
exit();
}
if($motty=='pinggoogle')
{
include("themes/pagerunas/ping.php");
exit();
}
if($motty=='2020')
{
include ("themes/pagerunas/2020.php");
exit();
}
if($motty=='autoget')
{
include ("themes/pagerunas/autoget.php");
exit();
}
if($motty=='auto-mail-sender')
{
include ("themes/pagerunas/auto-mail-sender.php");
exit();
}
if ($motty_nho=='downloadvcard') {
$array = explode('.', $haity);
$file = $array[0].".vcf";
$oneid_uid = PlanText($array[0]);
header('Content-Description: File Transfer');
header('Content-Type: text/x-vcard');
header('Content-Disposition: attachment; filename="'.basename($file).'"');
header('Connection:close');
echo createVcard_ver2($oneid_uid,$fullpath);
exit();
}
if ($motty_nho=='downloadexcel') {
include('downloadexcel.php');
exit();
}
if($motty_nho=='admindownload')
{
if($_SESSION['phannhom'] < 108) die();
$sqlgd = mysql_query("SELECT * FROM `backupdomain` WHERE `oneid` = '$haity' LIMIT 1");
$rowgd = mysql_fetch_array($sqlgd);
$oneid = $rowgd['oneid'];
$domainid = $rowgd['domainid'];
if(is_file("datafiles/$domainid/backup/".$oneid.".sql"))
{
$backup_file_name = "$fullpath/datafiles/$domainid/backup/".$oneid.".sql";
// Download the SQL backup file to the browser
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=' . basename($backup_file_name));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($backup_file_name));
ob_clean();
flush();
readfile($backup_file_name);
exec('rm ' . $backup_file_name);
}
exit();
}
if($motty=='ajbat_push')
{
include("themes/pagerunas/ajax_push.php");
exit();
}
if ($motty=='delete_logfile') {
echo '';
query("DELETE FROM `members_logfile` WHERE `kieu` = '0' ORDER BY `id` ASC LIMIT 100");
exit();
}
if ($motty=='delete_inbox') {
echo '';
query("DELETE FROM `members_inbox` WHERE `oneid_uid` = '' ORDER BY `id` ASC LIMIT 100");
exit();
}
if(($motty_nho=='postbai' || $motty_nho=='postthongtin' || $motty_nho=='posthoadon' || $motty_nho=='postsanpham' || $motty_nho=='postthuchi'
|| $motty_nho=='postbaogia' || $motty_nho=='postlich' || $motty_nho=='postghichu' || $motty_nho=='postnhacviec' || $motty_nho=='posttainguyen'
|| $motty_nho=='postthuvien' || $motty_nho=='postbaocao' || $motty_nho=='postcongviec' || $motty_nho=='posttaichinh' || $motty_nho=='postnghiphep' || $motty_nho=='postthaoluan' || $motty_nho=='postlienket'
|| $motty_nho=='postduan' || $motty_nho=='posthopdong'|| $motty_nho=='postdichvu' || $motty_nho=='posthotro' || $motty_nho =='postdn'|| $motty_nho=='mem-info')
AND $_SESSION['OneTY_user'] < 1)
{
echo move_to_url($fullpath,"LỖI NẶNG
đăng nhập đã, rồi check coi sao :)",$fullpath,"THÔNG BÁO",3);
exit();
}
if(isset($_GET['DUYET']) AND $mem_info['phannhom']==1808 && $_GET['DUYET']=='YES')
{
$bvid = PlanText($_GET['AdminSEO']);
if($_SESSION['OneTY_user']==3842)
{
$sql1 = mysql_query("UPDATE `baiviet_kietxuat` SET `showhi`='1' WHERE `id`='$bvid' LIMIT 1");
}
//echo move_to_url($fullpath,"ĐÃ XÓA
đã xóa bài viết thành công","https://$domain1ty/","THÔNG BÁO",3);
//exit();
}
if(isset($_GET['DELETEme']) AND $mem_info['phannhom']==1808 && $_GET['DELETEme']=='YES')
{
$bvid = PlanText($_GET['AdminSEO']);
if($_SESSION['OneTY_user']==596753)
{
$sql = mysql_query("DELETE FROM `baiviet_kietxuat` WHERE `seo_name`='$motty' LIMIT 1");
$sql = mysql_query("DELETE FROM `baiviet_data` WHERE `baivietid`='$bvid' LIMIT 1");
$sql = mysql_query("DELETE FROM `node` WHERE `seo_name`='$motty' LIMIT 1");
}
echo move_to_url($fullpath,"ĐÃ XÓA
đã xóa bài viết thành công","https://$domain1ty/","THÔNG BÁO",3);
exit();
}
if($_POST AND isset($_POST['action_id']))
{
include("themes/pagerunas/action.php");
exit();
}
//echo $accept_key;
if(strlen($accept_key)>0) $node_check = NODE_check($accept_key);
if(!is_array($node_check)) $accept_key = '';
//if($_SESSION['phannhom'] == 1808)print_r($node_check);
$accept_kh=0;
if(@$node_check['id_table']==0 AND @is_array($node_check) AND @count($node_check) > 0)
{
$web_level = 1;
$web_id = $node_check['id'];
$web_title = $node_check['title'];
$web_name = $node_check['title'];
$webtag = PlanText($web_title);
$web_description = $node_check['desc'];
$web_tags = $node_check['tags'];
$web_step = $node_check['step'];
$file_include = '1_cat.php';//$node_check['step'].
$node_check['id_action'] = 0;
$_SESSION['node_domainid'] = $node_check['domainid'];
$web_seo = $node_check['active_seo'];
$web_oneid = $node_check['oneid'];
$web_img = $node_check['img'];
$oneid_chude = $node_check['oneid'];
$step_all = Get_CauHinh($web_step);
$oneid_step = $step_all['oneid'];
}
elseif(@$node_check['id_table']==4 AND is_array($node_check))
{
$web_level = 3;
$web_id = $node_check['id'];
$web_title = $node_check['title'];
$web_name = $node_check['title'];
$webtag = PlanText($web_title);
$web_description = $node_check['desc'];
$web_tags = $node_check['tags'];
$web_step = $node_check['step'];
$_SESSION['node_domainid'] = $node_check['domainid'];
if(in_array($web_step, array(235,240,244))) $file_include = 'netid-phankhu.php';
else $file_include = 'members-phankhu.php';//$node_check['step'].
$node_check['id_action'] = 0;
$web_img = $node_check['img'];
$web_seo = $node_check['active_seo'];
$web_oneid = $node_check['oneid'];
$oneid_phankhu = $node_check['oneid'];
}
elseif(@$node_check['id_table']==6 AND is_array($node_check))
{
$web_level = 3;
$web_id = $node_check['id'];
$web_title = $node_check['title'];
$web_name = $node_check['title'];
$webtag = PlanText($web_title);
$web_description = $node_check['desc'];
$web_tags = $node_check['tags'];
$web_step = $node_check['step'];
$_SESSION['node_domainid'] = $node_check['domainid'];
$file_include = 'netid_voucher.php';//$node_check['step'].
$node_check['id_action'] = 0;
$web_img = $node_check['img'];
$web_seo = $node_check['active_seo'];
$web_oneid = $node_check['oneid'];
$oneid_phankhu = $node_check['oneid'];
}
elseif(@$node_check['id_table']==7 AND is_array($node_check))
{
$web_level = 3;
$web_id = $node_check['id'];
$web_title = $node_check['title'];
$web_name = $node_check['title'];
$webtag = PlanText($web_title);
$web_description = $node_check['desc'];
$web_tags = $node_check['tags'];
$web_step = $node_check['step'];
$_SESSION['node_domainid'] = $node_check['domainid'];
$file_include = 'members_cv.php';//$node_check['step'].
$node_check['id_action'] = 0;
$web_img = $node_check['img'];
$web_seo = $node_check['active_seo'];
$web_oneid = $node_check['oneid'];
$oneid_phankhu = $node_check['oneid'];
}
elseif(@$node_check['id_table']==5 AND is_array($node_check))
{
$web_level = 4;
$web_id = $node_check['id'];
$web_title = $node_check['title'];
$web_name = $node_check['title'];
$webtag = PlanText($web_title);
$web_description = $node_check['desc'];
$web_tags = $node_check['tags'];
$web_step = 227;
$_SESSION['node_domainid'] = $node_check['domainid'];
$file_include = 'shop.php';//$node_check['step'].
$node_check['id_action'] = 0;
$web_img = $node_check['img'];
$web_seo = $node_check['active_seo'];
$web_oneid = $node_check['oneid'];
$oneid_phankhu = $node_check['oneid'];
}
elseif(@$node_check['id_table']==100 AND is_array($node_check))
{
$web_level = 4;
$web_id = $node_check['id'];
$web_title = $node_check['title'];
$web_name = $node_check['title'];
$webtag = PlanText($web_title);
$web_description = $node_check['desc'];
$web_tags = $node_check['tags'];
$web_step = $node_check['step'];
$_SESSION['node_domainid'] = $node_check['domainid'];
$include = $node_check['include'];
$file_include = 'other.php';//$node_check['step'].
$node_check['id_action'] = 0;
$web_img = $node_check['img'];
$web_seo = $node_check['active_seo'];
$web_oneid = $node_check['oneid'];
$oneid_phankhu = $node_check['oneid'];
}
elseif(isset($node_check) AND @in_array($node_check['id_table'], array(8,9)) AND @is_array($node_check))//tỉnh thành theo địa điểm
{
//if($_SESSION['phannhom'] == 1808)print_r($node_check);
$web_level = 3;
$web_id = $node_check['id'];
$web_title = $node_check['title'];
$web_name = $node_check['title'];
$webtag = PlanText($web_title);
$web_description = $node_check['desc'];
$web_tags = $node_check['tags'];
$web_step = $node_check['step'];
$_SESSION['node_domainid'] = $node_check['domainid'];
$file_include = 'map.php';//$node_check['step'].
$node_check['id_action'] = 0;
$web_img = $node_check['img'];
$web_seo = $node_check['active_seo'];
if($node_check['id_table']==8) $_GET['id_province'] = $node_check['name_table'];
elseif($node_check['id_table']==9) $_GET['id_country'] = $node_check['name_table'];
$web_oneid = $node_check['oneid'];
$oneid_phankhu = $node_check['oneid'];
}
elseif(isset($node_check) AND @in_array($node_check['id_table'], array(10)) AND @is_array($node_check))//tỉnh thành theo địa điểm
{
//if($_SESSION['phannhom'] == 1808)print_r($node_check);
$web_level = 3;
$web_id = $node_check['id'];
$web_title = $node_check['title'];
$web_name = $node_check['title'];
$webtag = PlanText($web_title);
$web_description = $node_check['desc'];
$web_tags = $node_check['tags'];
$web_step = $node_check['step'];
$_SESSION['node_domainid'] = $node_check['domainid'];
$file_include = '1_cat.php';//$node_check['step'].
$node_check['id_action'] = 0;
$web_img = $node_check['img'];
$web_seo = $node_check['active_seo'];
if($node_check['id_table']==10) $_GET['id_province'] = $node_check['name_table'];
elseif($node_check['id_table']==9) $_GET['id_country'] = $node_check['name_table'];
$web_oneid = $node_check['oneid'];
$oneid_phankhu = $node_check['oneid'];
}
elseif(@$node_check['step']==0 AND is_array($node_check) AND count($node_check) > 0)
{
$web_level = 1;
$web_id = $node_check['id'];
$web_title = $node_check['title'];
$webtag = PlanText($web_title);
$web_name = $node_check['title'];
$web_description = $node_check['desc'];
$web_tags = $node_check['tags'];
$web_step = $node_check['step'];
$web_img = $node_check['img'];
$file_include = 'member.php';//$node_check['step'].
$accept_kh=1;
$web_seo = $node_check['active_seo'];
$web_oneid = $node_check['oneid'];
$_SESSION['node_domainid'] = $node_check['domainid'];
}
elseif(is_array($node_check) AND count($node_check)>0)
{
$web_id = $node_check['id'];
$web_title = $node_check['title'];
$web_name = $node_check['title'];
$webtag = PlanText($web_title);
$web_description = $node_check['desc'];
$web_tags = $node_check['tags'];
$web_step = $node_check['step'];
$web_img = $node_check['img'];
$web_seo = $node_check['active_seo'];
$web_oneid = $node_check['oneid'];
$step_all = Get_CauHinh($web_step);
$oneid_step = $step_all['oneid'];
$_SESSION['node_domainid'] = $node_check['domainid'];
if($node_check['type']==0)
{
$file_include = 'content.php';//$node_check['step'].
$web_level = 3;
}
else
{
$file_include = '1_cat.php';//$node_check['step'].
$web_level = 2;
}
}
else
{
$web_step=0;
if($motty!='')
{
if($motty_nho=='tag') $webtag = TagMe(urldecode($haity));
elseif($motty_nho=='search') $webtag = TagMe(PlanText(urldecode(($_GET['q']))));
else $webtag = TagMe(urldecode($motty));
//$webtag ="không";
$webtag = PlanText($webtag);
$wtag = TagMe_ADD($webtag);
$web_seo = REMOVE_vn($wtag);
$tagme = GET_tagme($webtag);
if($tagme)
{
$loai_tag = $tagme['type'];
$activetags = $tagme['activetags'];
}
else
{
$loai_tag = 0;$activetags=0;
}
if(is_login($_SESSION['OneTY_user']) AND isset($_GET['q'])) @Add_MEMBERS_TAG($webtag,$loai_tag);
//@Up_TAG($web_seo,$_SESSION['oneid']);
//if($_SESSION['phannhom']) echo $web_seo;
$get_note = GET_Members_TAG($web_seo);
//if (!empty($web_seo)) {
if (is_array($get_note))
{ // Nếu có tag tồn tại mới chạy
$webtag_oneid = "";
$file_include = 'tag.php';
$web_name = "Quản Lý Doanh Nghiệp";
if($get_note['id']>0 AND $get_note['activetags']>0)
{
$web_title = $get_note['keysearch'];
$web_description = utf8_style($get_note['ghichu']);
if($web_description=='') $web_description = "$webtag: Tất cả thông tin, sản phẩm, dịch vụ, video về $webtag...";
$web_tags = $get_note['keysearch'];
$web_loaitags = $get_note['loai'];
$web_icon = $get_note['icon'];
$web_img = $fullpath."/datafiles/".$domain_info['id']."/".$get_note['duongdantin']."/".$get_note['icon'];
$webtag = $get_note['oneid'];
$webtag_oneid = $get_note['oneid'];
$web_oneid = $get_note['oneid'];
}
if($get_note['id']>0 AND $get_note['activetags']==0)
{
$web_title = $webtag;
$web_description = utf8_style($get_note['ghichu']);
if($web_description =='') $web_description = "$webtag: Tất cả thông tin, sản phẩm, dịch vụ, video về $webtag...";
$web_tags = $get_note['keysearch'];
$web_loaitags = $get_note['loai'];
$web_icon = $get_note['icon'];
$web_img = $fullpath."/datafiles/".$domain_info['id']."/".$get_note['duongdantin']."/".$get_note['icon'];
$webtag = $webtag;
$web_tags = $webtag;
$webtag_oneid = $get_note['oneid'];
$web_oneid = $get_note['oneid'];
}
//echo $webtag_oneid;
if($get_note['loai']==2) {$checked2 = "checked";$memberid_tag = 0;}
elseif($get_note['loai']==1) {$checked1 = "checked";$memberid_tag = $mem_info['uid'];}
else {$checked = "checked";$memberid_tag = 0;}
}
else
{
$web_tags = $webtag;
$webtag_oneid = "";
$file_include = 'tag.php';
}
}
else
{
$web_name = $domain_info['domain_title'];
$web_title = $domain_info['domain_title'];
$web_description = $domain_info['domain_intro'];
$web_tags = $domain_info['domain_tags'];
$file_include = 'home.php';
$web_img = $fullpath."/datafiles/".$domain_info['id']."/$duongdantin/".$domain_info['logo'];
}
$web_level = 0;
$web_color = '#000';
$web_seo = 0;
}
if(strtolower($motty)=='tag' AND $haity !='')
{
//$web_color = $get_config['webcolor'];//'#D00000';
//$web_kieuthienthi = $get_config['kieuhienthi'];
$web_title = urldecode($haity);
$web_description = "Tất cả thông tin về: $web_title - Thiết Kế Website Cao Cấp...";
}
if(!isset($web_img)) $web_img = "$fullpath/images/".$domain_info['duongdantin']."/".$domain_info['icon'];
if(!isset($web_name)) $web_name = $domain_info['domain_title'];
if(!isset($web_title)) $web_title = $domain_info['domain_title'];
if(!isset($web_description)) $web_description = $domain_info['domain_intro'];
//echo "web_oneid:=".$_SESSION['web_oneid'];
if($motty=='amp')
{
include ("themes/pagerunas/amp.php");
exit();
}
if($motty_nho == "json"){
include("themes/pagerunas/include_json.php");
exit();
}
if($motty_nho=='result-ipn')
{
include("themes/pagerunas/result-ipn.php");
exit();
}
if($motty_nho=='result-ship')
{
include("themes/pagerunas/resultship.php");
exit();
}
if($motty=='checkout' AND $haity=='cart')
{
$web_title = "Giỏ hàng";
}
if($motty=='checkout' AND $haity=='payment')
{
$web_title = "Thanh toán";
}
if(isset($_GET['jumpcat']) AND $_GET['jumpcat'] >0 AND $mem_info['phannhom']==1808)
{
$newcat = $_GET['jumpcat'];
$sql_upbv = query("UPDATE `baiviet_kietxuat` SET `kietxuat`='$newcat' WHERE `id`='$web_action' LIMIT 1");
}
if($subdomain=='quanly' AND $domain1ty=='1shop.vn')
{
$full_dm = $fullpath;
}
elseif($domain1ty=='1shop.vn' AND $subdomain=='')
{
$full_dm = "https://".$domain1ty;
}
else
{
$full_dm = "$fullpath";
}
$_SESSION['mynavi'] = $full_dm."/".$motty;
if(is_numeric($haity) AND $haity > 0) $web_title = $web_title ." - Trang ".($haity);
if($motty_nho=='tiep-thi-lien-ket') $web_title = 'Tiếp thị liên kết';
if($motty_nho=='auto_folder')
{
//$sql_dm = query("SELECT * FROM `domain_info` ");
//while ($row = mysqli_fetch_array($sql_dm)) {
$id = 123;
TAO_folder_tudong($id);
//}
exit();
}
//// SET Members Logsfile
if($motty_nho=='search' AND $_GET['q']!='')
{
$set_tientrinh = 2;
$set_ghichu = "Tìm kiếm";
}
else
{
$set_tientrinh = 0;
$set_ghichu = "Truy cập trang";
}
if(is_login($_SESSION['OneTY_user'])) @MEMBERS_logfile($_SESSION['oneid'],$web_oneid,$set_ghichu,0/*$kieu*/,$set_tientrinh/*$tientrinh*/,$web_step/*$step*/,$_SESSION['mynavi'],$web_title,$web_oneid,0,0,100);
if(in_array($motty_nho, array('nhan-vien','khach-hang')))
{
$domainstep_menu = GET_domainstep_menu($motty);
$web_title = $domainstep_menu['cataname'];
}
//echo "themes/".$themes_page."/index.php";
include("themes/".$themes_page."/index.php");
?>