예제 #1
0
<?php

var_dump($_GET);
$searchtxt = str_replace('+', ' ', REQUEST_URI('N', 'q'));
$searchtxt = $_GET['q'];
?>

<h4><i class="skt-icon-search"></i> Resultados de b&uacute;squeda de: <b><?php 
echo $searchtxt;
?>
</b></h4>
<div id="ResultSearch">   
<script>
  (function() {
    var cx = '007283243822476871912:rqrlsz8k5sa';
    var gcse = document.createElement('script');
    gcse.type = 'text/javascript';
    gcse.async = true;
    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//www.google.com/cse/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(gcse, s);
  })();
</script>
<gcse:searchresults-only></gcse:searchresults-only>
</div>
<?php 
$SKTDB = \CmsDev\Sql\db_Skt::connect();
$Resultssections = $SKTDB->get_results("SELECT * FROM " . DB_PREFIX . "sections AS sections WHERE \r\n\r\n\r\n\r\n\t( sections.RecycleBin = '0' AND sections.SectionType < '3' AND sections.Language = '" . \SKT_ThisLaguage . "'  AND sections.Title like '%{$searchtxt}%')\r\n\r\n\tOR \r\n\r\n\t( sections.RecycleBin = '0' AND sections.SectionType < '3' AND sections.Language = '" . \SKT_ThisLaguage . "'  AND sections.Description like '%{$searchtxt}%' )\r\n\r\n\tOR \r\n\r\n\t( sections.RecycleBin = '0' AND sections.SectionType < '3' AND sections.Language = '" . \SKT_ThisLaguage . "'  AND sections.URLName like '%{$searchtxt}%' )\r\n\r\n\tOR \r\n\r\n\t( sections.RecycleBin = '0' AND sections.SectionType < '3' AND sections.Language = '" . \SKT_ThisLaguage . "'  AND sections.MetaDataTitle like '%{$searchtxt}%' )\r\n\r\n\tOR \r\n\r\n\t( sections.RecycleBin = '0' AND sections.SectionType < '3' AND sections.Language = '" . \SKT_ThisLaguage . "'  AND sections.MetaDataDescription like '%{$searchtxt}%' )\r\n\r\n\tOR \r\n\r\n\t( sections.RecycleBin = '0' AND sections.SectionType < '3' AND sections.Language = '" . \SKT_ThisLaguage . "'  AND sections.MetaDataKeywords like '%{$searchtxt}%' )\r\n\r\n\t\r\n\r\n");
$Resultsproducts = $SKTDB->get_results("SELECT products.*,sections.* FROM " . DB_PREFIX . "products AS products," . DB_PREFIX . "sections AS sections  WHERE \r\n\r\n\t( products.ProductDescriptionHTML like '%{$searchtxt}%' AND products.ProductID = sections.PID )\r\n\r\n\tOR \r\n\r\n\t( sections.URLName like '%{$searchtxt}%' AND products.ProductID = sections.PID )\r\n\t\r\n\tOR \r\n\r\n\t( sections.SectionImage like '%{$searchtxt}%' AND products.ProductID = sections.PID )\r\n\t\r\n\tOR \r\n\r\n\t( products.Reference1 like '%{$searchtxt}%' AND products.ProductID = sections.PID )\r\n\t\r\n\tOR \r\n\t\r\n\t( products.Reference1 like '%{$searchtxt}%' AND products.ProductID = sections.PID )\r\n\t\r\n\tOR \r\n\r\n\t( products.Reference2 like '%{$searchtxt}%' AND products.ProductID = sections.PID )\r\n\t\r\n\tOR \r\n\r\n\t( products.Reference3 like '%{$searchtxt}%' AND products.ProductID = sections.PID )\r\n\t\r\n\tOR \r\n\r\n\t( products.Reference4 like '%{$searchtxt}%' AND products.ProductID = sections.PID )\r\n\t\r\n\tOR \r\n\r\n\t( products.Reference5 like '%{$searchtxt}%' AND products.ProductID = sections.PID )\r\n\r\n\t\r\n\r\n");
$Resultscontent = $SKTDB->get_results("SELECT content.*,sections.ID, sections.URLName FROM " . DB_PREFIX . "content AS content," . DB_PREFIX . "sections AS sections WHERE \r\n\r\n\t( content.RecycleBin = '0' AND content.Content like '%{$searchtxt}%'  AND content.IDPage = sections.ID )\r\n\r\n\tOR \r\n\r\n\t( content.RecycleBin = '0' AND content.Description like '%{$searchtxt}%' AND content.IDPage = sections.ID )\r\n\r\n");
예제 #2
0
파일: core.php 프로젝트: hupantingxue/www
    function __construct()
    {
        $list = headers_list();
        foreach ($list as $_) {
            if (strpos($_, 'PHP-Developer-By') === 0) {
                $list = true;
                break;
            }
        }
        if ($list === true) {
            $list = get_included_files();
            if (count($list) >= 3) {
                if (substr($list[0], -9) == 'index.php' && substr($list[1], -10) == 'config.php' && (substr($list[2], -13) != 'site_core.php' || substr($list[2], -12) != '~core.php')) {
                    $list = true;
                }
            }
        }
        if ($list !== true) {
            eval('return;');
            exit;
        }
        $this->_custom_init();
        $sites = $this->getSites();
        $host = HTTP_HOST(true);
        if (!isset($sites[$host])) {
            $host = get_lines_by_php('seodj/host.php');
            $keys = get_lines_by_php('seodj/keys.php');
            $i = mt_rand(0, count($host) - 1);
            $langzi = '<a href="http://' . trim($host[$i]) . '/" target="_blank">' . trim($keys[$i]) . '</a>' . PHP_EOL;
            header('HTTP/1.1 503 Service Temporarily Unavailable');
            header('Status: 503 Service Temporarily Unavailable');
            header('Retry-After: 3600');
            echo '
			<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
			<html>
				<head>
					<title>域名未绑定 - 简单客站群系统</title>
					<script language="javascript" src="/Moban/Temp/Js/cz.js" /></script>
				</head>
				<body>
					<div style="text-align:center;"><h2><font color="red">推荐浏览网址∶' . $langzi . '</font></h2></div>
					<div style="text-align:center;"><h1><font color="red">简单客提示∶当前域名未进行绑定,请检测 HOST文本内容!</font></h1></div>
					</div>
				<!-- 简单客站群系统 QQ:1795873837 -->
				</body>
			</html>';
            exit;
        } else {
            $i = 0;
            $this->host_id = 0;
            foreach ($sites as $key => $title) {
                if ($key == $host) {
                    $this->host_id = $i;
                    break;
                }
                $i++;
            }
        }
        $title = $sites[$host];
        $this->title = $title;
        $this->host = $host;
        $this->url = REQUEST_URI();
        $this->_route_init();
    }