卖逼视频免费看片|狼人就干网中文字慕|成人av影院导航|人妻少妇精品无码专区二区妖婧|亚洲丝袜视频玖玖|一区二区免费中文|日本高清无码一区|国产91无码小说|国产黄片子视频91sese日韩|免费高清无码成人网站入口

Discuz!x1.5 二級域名問題解決方案

Discuz!x1.5 二級域名問題解決方案一、 域名跳轉(zhuǎn)且跳轉(zhuǎn)到的域名顯示為用戶的二級域名(1)修改/index.php文件第82行switch($domain['idtype']) {case'h

Discuz!x1.5 二級域名問題解決方案

一、 域名跳轉(zhuǎn)且跳轉(zhuǎn)到的域名顯示為用戶的二級域名

(1)修改/index.php文件第82行

switch($domain['idtype']) {

case'home':

$apphost=$domain['domain'].'.'.$_ENV['domain']['root'][$domain['idtype']].'/';

$domainroot='http://'.$domain['domain'].'.'.$_ENV['domain']['root'][$domain['idtype']].'/';

if($_G['setting']['rewritestatus']&&in_array('home_space', _G['setting']['rewritestatus'])) {

$url=rewriteoutput('home_space',1,$apphost, domain['id']); } else {

$url = $domainroot.'home.php?mod=space&uid='.$domain['domain']; }

break;

(2)修改/source/function/function_core.php 第1102行

if(empty($_G['setting']['domain']['app']['default'])) {

$temp = parse_url($_G['siteurl']);

$_G['setting']['domain']['app']['default'] = $temp['host'];//

}

$_G['domain'] = array();

$port = empty($_SERVER['SERVER_PORT']) || $_SERVER['SERVER_PORT'] == '80' ? '' : ':'.$_SERVER['SERVER_PORT'];

if(is_array($_G['setting']['domain']['app'])) {

foreach($_G['setting']['domain']['app'] as $app => $domain) {

if(($domain || $_G['setting']['domain']['app']['default'])) {

$appphp = "http://wk.huhome.net/{$app}.php";

if(!$domain) {

$domain = $_G['setting']['domain']['app']['default'];

}elseif($_GET['mod']=='space' && !empty($_GET['uid']) && $app=='home'){// $temp = parse_url($_G['siteurl']);//

$domain=$temp['host'];//

}//

$_G['domain']['search'][$app] = " ,

array('menu_setting_functions', 'setting_functions'), array('menu_setting_domain', 'domain'), array('menu_shmain_domain','shmain_domain'), array('menu_setting_home', 'setting_home'), array('menu_setting_user', 'setting_permissions'), array('menu_setting_credits', 'setting_credits'), array('menu_setting_sec', 'setting_sec')

(4)修改文件/source/language/lang_admincp_menu.php 第44行

'menu_setting_functions' => '站點(diǎn)功能',

'menu_setting_domain' => '域名設(shè)置',

'menu_shmain_domain'=>'域名審核',//添加

'menu_setting_user' => '用戶權(quán)限',

'menu_setting_credits' => '積分設(shè)置',

'menu_setting_mail' => '郵件設(shè)置', array('menu_setting_user',

'setting_permissions'),

, (3)修改文件admin.php 第33行 分配訪問權(quán)限

增加, 'shmain'

$admincp_actions_normal = array('index', …… 'district', 'diytemplate', 'verify', 'nav', 'domain', 'shmain') ;

(4)新建文件/template/default/forum/shmain.htm

技巧提示
  • 用戶申請的 二級域 名必須經(jīng)過審核后才有效。

……

,

    1. <rt id="4xvx4"><small id="4xvx4"></small></rt>

      <rt id="4xvx4"></rt>
      審核域名請求
      操作用戶名空間名申請的域名

      name="modtype[{$group[uid]}]" class="radio"> 否決

      通過

      name="modtype[{$group[uid]}]" class="radio"> 刪除

      name="modtype[{$group[uid]}]" class="radio"> 忽略

      href="home.php?mod=space&uid=$group[uid]">{$group[username]}
      積分:{$group[credits]}

      注冊時(shí)間:{$group[regdate]}

      Email:{$group[email]}

      空間名稱:{$group[spacename]}

      空間簡介:{$group[spacedescription]}

      最近一次更新:{$group[spacenote]}

      最近一次行為記錄:{$group[recentnote]}

      {$group[domain]}

      value="{$group[domain]}" />

      (4)修改/source/include/spacecp/spacecp_domain.php第40行 注釋取消用戶修改域名權(quán)限

      if($setarr) {

      updatecreditbyaction('modifydomain');

      DB::update('common_member_field_home', $setarr, array('uid' => $_G['uid']));

      /* require_once libfile('function/delete');

      ,

      $query = DB::query("SELECT

      m.uid,m.username,m.regdate,m.credits,m.email,h.spacename,h.domain,h.spacedescri ption,h.spacenote,

      h.recentnote FROM ".DB::table('common_member_field_home')." h

      LEFT JOIN ".DB::table('common_member')." m ON h.uid=m.uid

      LEFT JOIN ".DB::table('common_domain')." d ON h.uid=d.id

      WHERE d.domain IS NULL OR d.domain <> h.domain");

      while($group = DB::fetch($query)) {

      foreach($group as $k=>$v){

      if(empty($v)){

      $group[$k]="無";

      }

      }

      if($group[domain]!="無"){

      $groups[] = $group;

      }

      }

      include template('forum/shmain');

      }else{

      $modtype=$_POST[modtype];

      $domain=$_POST[domain];

      //print_r($domain);

      foreach($modtype as $key=>$type){

      switch($type){

      case 'delete':shmain_del($key,$domain);

      break;

      case 'ignore':

      case 'invalidate':shmain_inv($key,$domain);

      break;

      case 'validate':shmain_val($key,$domain);

      break;

      }

      }

      include template('forum/shmain');

      }

      }

      }

      function shmain_del($key,$domain){

      DB::query("UPDATE ".DB::table('common_member_field_home')." SET domain=''"." WHERE uid = {$key}");

      $query = DB::query("SELECT * FROM ".DB::table('common_domain')." WHERE id =

      ,

      {$key}");

      $group = DB::fetch($query);

      //print_r($group);

      if(!empty($group)){

      DB::query("DELETE FROM ".DB::table('common_domain')." WHERE id = {$key}"); }

      }

      function shmain_inv($key,$domain){

      }

      function shmain_val($key,$domain){

      global $_G;

      $query = DB::query("SELECT * FROM ".DB::table('common_domain')." WHERE id = {$key}");

      $group = DB::fetch($query);

      //print_r($group);

      if(!empty($group)){

      DB::query("DELETE FROM ".DB::table('common_domain')." WHERE id = {$key}"); }

      require_once libfile('function/delete');

      標(biāo)簽: