Beispiel #1
0
/**
 * 获取指定位置的导航菜单
 * @param int $type 导航位置
 */
function WSTNavigation($type = 0)
{
    $URL_HTML_SUFFIX = C('URL_HTML_SUFFIX');
    $cururl = U(MODULE_NAME . "/" . CONTROLLER_NAME . "/" . ACTION_NAME);
    $cururl = str_ireplace("." . $URL_HTML_SUFFIX, '', $cururl);
    $areaId2 = (int) session('areaId2');
    $rs = F('navigation/' . $areaId2);
    if (!$rs) {
        $m = M();
        //获取所在省份
        $sql = "select parentId from __PREFIX__areas where areaId=" . $areaId2;
        $areaId1Rs = $m->query($sql);
        $areaId1 = (int) $areaId1Rs[0]['parentId'];
        $sql = "select navType,navTitle,navUrl,isShow,isOpen \n\t\t  from __PREFIX__navs where isShow=1 and (areaId1=0 or areaId1=" . $areaId1 . ") and (areaId2=0 or areaId2=" . $areaId2 . ") \n\t\t  order by navType asc,navSort asc";
        $rs = $m->query($sql);
        F('navigation/' . $areaId2, $rs);
    }
    foreach ($rs as $key => $v) {
        $rs[$key]['url'] = $cururl;
        if (stripos($v['navUrl'], 'https://') === false && stripos($v['navUrl'], 'http://') === false) {
            $rs[$key]['navUrl'] = WSTDomain() . "/" . $rs[$key]['navUrl'];
        }
        $rs[$key]['active'] = stripos($rs[$key]['navUrl'], $cururl) !== false ? 1 : 0;
        $rs[$key]['end'] = $key == count($rs) - 1 ? 1 : 0;
    }
    //分组
    $data = array();
    foreach ($rs as $key => $v) {
        $data[$v['navType']][] = $v;
    }
    return $data[$type];
}
			</li>
		</ul>
		<span class="clr"></span>
	</div>
</div>

<div style="height:132px;">
<div id="mainsearchbox" style="text-align:center;">
	<div id="wst-search-pbox">
		<div style="float:left;width:240px;" class="wst-header-car">
		  <a href='<?php 
echo WSTDomain();
?>
'>
			<img id="wst-logo" width='240' height='132' src="<?php 
echo WSTDomain();
?>
/<?php 
echo $CONF['mallLogo'];
?>
"/>
		  </a>	
		</div>
		<div id="wst-search-container">
			<div id="wst-search-type-box">
				<input id="wst-search-type" type="hidden" value="<?php 
echo $searchType;
?>
"/>
				<div id="wst-panel-goods" class="<?php 
if ($searchType == 1) {
Beispiel #3
0
<?php

return array(define('WEB_HOST', WSTDomain()), 'WxPayConf_pub' => array('JS_API_CALL_URL' => WEB_HOST . '/index.php/Home/WxJsAPI/jsApiCall', 'SSLCERT_PATH' => WEB_HOST . '/ThinkPHP/Library/Vendor/WxPayPubHelper/cacert/apiclient_cert.pem', 'SSLKEY_PATH' => WEB_HOST . '/ThinkPHP/Library/Vendor/WxPayPubHelper/cacert/apiclient_key.pem', 'NOTIFY_URL' => WEB_HOST . '/index.php/Home/WxNative2/notify', 'CURL_TIMEOUT' => 30));
 /**
  * 获取当前版本
  */
 public function getWSTMallVersion()
 {
     $this->isAjaxLogin();
     $version = C('WST_VERSION');
     $key = C('WST_MD5');
     $license = $GLOBALS['CONFIG']['mallLicense'];
     $content = file_get_contents(C('WST_WEB') . '/index.php?m=Api&c=Download&a=getLastVersion&version=' . $version . '&version_md5=' . $key . "&license=" . $license . "&host=" . WSTDomain());
     $json = json_decode($content, true);
     if ($json['version'] == $version) {
         $json['version'] = "same";
     }
     $this->ajaxReturn($json);
 }
 private function getLevelImg($levle)
 {
     if ($levle == 0) {
         return $img = '<img src="' . WSTDomain() . '/Apps/Home/View/default/images/level/l0.gif" height="25" width="25">';
     } else {
         return $img = '<img src="' . WSTDomain() . '/Apps/Home/View/default/images/level/l' . $levle . '.gif" height="25" width="25">';
     }
 }