文件
mashangyoujiu/Application/Admin/Controller/WebbaseController.class.php

26 行
893 B
PHP
可执行文件

<?php
namespace Admin\Controller;
use Think\Controller;
class WebbaseController extends Controller {
public static $WEBSET;
public function checkwebset(){
$webset = session('logoinfo');
if($webset){
self::$WEBSET = $webset;
}else{
$webname = $_SERVER['HTTP_HOST'];
if($webname==C('adminhttp')){
$webset = M('retail_logo')->where(array('pid'=>1))->find();
}else{
$web = M('retail_domain')->where(array('url'=>$webname))->find();
$webset = M('retail_logo')->where(array('pid'=>$web['pid'],'status'=>1))->find();
}
self::$WEBSET = $webset;
session('logoinfo',$webset);
}
$this->assign('logoinfo',$webset); // 映射网站设置信息。
}
public function _initialize() {
$this->checkwebset();
}
}