zoukankan      html  css  js  c++  java
  • destoon 后台入口文件weigouadmin.php解析

    destoon有几个文件不能修改,一修改后台就无法登陆,weigouadmin.php就是其中之一,据官网客服说这个文件是可以修改的,不知为什么即使不修改打开一下保存后后台就不能登陆了。因刚接触dt,需要在程序里加点注释记录一下调用路径,特记录到这里以便以后查阅。

    <?php

    。。。。。。

    $_areaids = '';

    $_areaid = array();

    isset($file) or $file = 'index';   //如果url参数里无 $file 则默认index

    $secretkey = 'a'.strtolower(substr(md5(DT_KEY), -6));

    if($CFG['authadmin'] == 'cookie') {

    $_destoon_admin = get_cookie($secretkey);

    $_destoon_admin = $_destoon_admin ? intval($_destoon_admin) : 0;

    } else {

    $session = new dsession();

    $_destoon_admin = isset($_SESSION[$secretkey]) ? intval($_SESSION[$secretkey]) : 0;

    }

    $_founder = $CFG['founderid'] == $_userid ? $_userid : 0;

    $_catids = $_childs = '';

    $_catid = $_child = array();

    if($file != 'login') {

    if($_groupid != 1 || $_admin < 1 || !$_destoon_admin) msg('', '?file=login&forward='.urlencode($DT_URL));

    if(!admin_check()) {

    admin_log(1);

    $db->query("DELETE FROM &#123;&#36;db->pre&#125;admin WHERE userid=$_userid AND url='?".$DT_QST."'");

    msg('警告!您无权进行此操作 Error(00)');

    }

    }

    if($DT['admin_log'] && $action != 'import') admin_log();

    if($DT['admin_online']) admin_online();

    if(isset($reason) && is_array($itemid)) admin_notice();

    $widget = isset($widget) ? intval($widget) : 0;

    $psize = isset($psize) ? intval($psize) : 0;

    if($psize > 0 && $psize != $pagesize) {

    $pagesize = $psize;

    $offset = ($page-1)*$pagesize;

    }

    //什么情况下$module才是destoon??

    if($module == 'destoon') {

    (include DT_ROOT.'/admin/'.$file.'.inc.php') or msg();

    } else { //后台管理界面一般走这个分支,例如供应模块里的添加供应 链接是weigouadmin.php?moduleid=5&action=add

    include DT_ROOT.'/module/'.$module.'/common.inc.php';//这里加载的就应该是/module/sell/common.inc.php   DT_ROOT是 根目录/

    (include MD_ROOT.'/admin/'.$file.'.inc.php') or msg(); //这里加载的就应该是/module/sell/admin/index.inc.php  MD_ROOT是/module/sell/

    }

    ?>

  • 相关阅读:
    169. Majority Element
    283. Move Zeroes
    1331. Rank Transform of an Array
    566. Reshape the Matrix
    985. Sum of Even Numbers After Queries
    1185. Day of the Week
    867. Transpose Matrix
    1217. Play with Chips
    766. Toeplitz Matrix
    1413. Minimum Value to Get Positive Step by Step Sum
  • 原文地址:https://www.cnblogs.com/djiz/p/6414192.html
Copyright © 2011-2022 走看看