當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DedeInclude函數代碼示例

本文整理匯總了PHP中DedeInclude函數的典型用法代碼示例。如果您正苦於以下問題:PHP DedeInclude函數的具體用法?PHP DedeInclude怎麽用?PHP DedeInclude使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DedeInclude函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: dirname

require_once dirname(__FILE__) . "/config.php";
CheckPurview('co_Export');
if (empty($dopost)) {
    $dopost = '';
}
if ($dopost != 'done') {
    require_once DEDEADMIN . "/inc/inc_catalog_options.php";
    $channelid = $usemore = 0;
    if (!empty($nid)) {
        $mrow = $dsql->GetOne("Select count(*) as dd From `#@__co_htmls` where nid='{$nid}' And isdown='1' ");
        $rrow = $dsql->GetOne("Select channelid,usemore From `#@__co_note` where nid='{$nid}' ");
        $channelid = 1;
        $usemore = $rrow['usemore'];
    }
    include DedeInclude("templets/co_bang.htm");
    exit;
} else {
    $typeid = isset($typeid) ? $typeid : "";
    $nid = isset($nid) ? $nid : "";
    if ($typeid == "" && !is_numeric($typeid)) {
        $addflag1 = 'err';
        showmsg('參數錯誤(err:typeid  is error)', "co_main.php");
    } else {
        $row = $dsql->getone("SELECT id FROM `#@__arctype` where `id`={$typeid}");
        if ($row) {
            $addflag1 = 'ok';
        } else {
            $addflag1 = 'ok';
            $typeid = 0;
        }
開發者ID:soonfine,項目名稱:leread,代碼行數:30,代碼來源:co_bang.php

示例2: ShowMsg

    if ($rank == 10) {
        ShowMsg('超級管理員的權限不允許更改!', 'sys_group.php');
        exit;
    }
    $purview = "";
    if (is_array($purviews)) {
        foreach ($purviews as $p) {
            $purview .= "{$p} ";
        }
        $purview = trim($purview);
    }
    $dsql->ExecuteNoneQuery("UPDATE `#@__admintype` SET typename='{$typename}',purviews='{$purview}' WHERE CONCAT(`rank`)='{$rank}'");
    ShowMsg('成功更改用戶組的權限!', 'sys_group.php');
    exit;
} else {
    if ($dopost == 'del') {
        $dsql->ExecuteNoneQuery("DELETE FROM `#@__admintype` WHERE CONCAT(`rank`)='{$rank}' AND system='0';");
        ShowMsg("成功刪除一個用戶組!", "sys_group.php");
        exit;
    }
}
$groupRanks = array();
$groupSet = $dsql->GetOne("SELECT * FROM `#@__admintype` WHERE CONCAT(`rank`)='{$rank}' ");
$groupRanks = explode(' ', $groupSet['purviews']);
include DedeInclude('templets/sys_group_edit.htm');
//檢查是否已經有此權限
function CRank($n)
{
    global $groupRanks;
    return in_array($n, $groupRanks) ? ' checked' : '';
}
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:31,代碼來源:sys_group_edit.php

示例3: dirname

<?php

require_once dirname(__FILE__) . "/config.php";
require_once DEDEINC . "/dedecollection.class.php";
if (!empty($nid)) {
    $ntitle = '采集指定節點:';
    $nid = intval($nid);
    $co = new DedeCollection();
    $co->LoadNote($nid);
    $row = $dsql->GetOne("Select count(aid) as dd From `#@__co_htmls` where nid='{$nid}'; ");
    if ($row['dd'] == 0) {
        $unum = "沒有記錄或從來沒有采集過這個節點!";
    } else {
        $unum = "共有 {$row['dd']} 個曆史種子網址!<a href='javascript:SubmitNew();'>[<u>更新種子網址,並采集</u>]</a>";
    }
} else {
    $ntitle = '監控式采集:';
    $unum = "沒指定采集節點,將使用檢測新內容采集模式!";
}
include DedeInclude('templets/co_gather_start.htm');
開發者ID:klr2003,項目名稱:sourceread,代碼行數:20,代碼來源:co_gather_start.php

示例4: AutoCharset

if ($dopost == 'install') {
    $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='{$pid}'");
    if (is_array($row)) {
        if ($cfg_soft_lang == 'utf-8') {
            $config_row = AutoCharset(unserialize(utf82gb($row['config'])));
        } else {
            if ($cfg_soft_lang == 'gb2312') {
                $config_row = unserialize($row['config']);
            }
        }
        //print_r($config_row);exit;
        $af = new Array2form($config_row);
        $af->SetDefaultTpl($tplstring);
        $reval = $af->GetAll();
    }
    include DedeInclude('templets/sys_payment_install.htm');
    exit;
} else {
    if ($dopost == 'config') {
        if ($pay_name == "" || $pay_desc == "" || $pay_fee == "") {
            ShowMsg("您有未填寫的項目!", "-1");
            exit;
        }
        $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='{$pid}'");
        if ($cfg_soft_lang == 'utf-8') {
            $config = AutoCharset(unserialize(utf82gb($row['config'])));
        } else {
            if ($cfg_soft_lang == 'gb2312') {
                $config = unserialize($row['config']);
            }
        }
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:31,代碼來源:sys_payment.php

示例5: array

            }
            echo '</xmp>';
            exit;
        }
    }
}
//獲取係統存在的表信息
$otherTables = array();
$dedeSysTables = array();
$channelTables = array();
$dsql->SetQuery("Select addtable From `#@__channeltype` ");
$dsql->Execute();
while ($row = $dsql->GetObject()) {
    $channelTables[] = $row->addtable;
}
$dsql->SetQuery("Show Tables");
$dsql->Execute('t');
while ($row = $dsql->GetArray('t', MYSQL_BOTH)) {
    if (ereg("^{$cfg_dbprefix}", $row[0]) || in_array($row[0], $channelTables)) {
        $dedeSysTables[] = $row[0];
    } else {
        $otherTables[] = $row[0];
    }
}
$mysql_version = $dsql->GetVersion();
include DedeInclude('templets/sys_data.htm');
function TjCount($tbname, &$dsql)
{
    $row = $dsql->GetOne("Select count(*) as dd From {$tbname}");
    return $row['dd'];
}
開發者ID:klr2003,項目名稱:sourceread,代碼行數:31,代碼來源:sys_data.php

示例6: empty

        $ddw = empty($ddw) ? "0" : $ddw;
        $ccw = empty($ccw) ? "0" : $ccw;
        $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>{$istarttime} AND mid='{$uid}'; ");
        $ddw += $row['dd'];
        $ccw += $row['cc'];
    }
    $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>{$istarttime} AND mid='{$uid}'; ");
    $ddw = $row['dd'] + $ddw;
    $ccw = $row['cc'] + $ccw;
    //當天
    $starttime = $y . "-{$m}-{$d} 00:00:00";
    $istarttime = GetMkTime($starttime);
    $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'";
    $dsql->Execute('me', $sql);
    while ($frow = $dsql->GetArray('me')) {
        $ddd = empty($ddd) ? "0" : $ddd;
        $ccd = empty($ccd) ? "0" : $ccd;
        $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>{$istarttime} AND mid='{$uid}'; ");
        $ddd += $row['dd'];
        $ccd += $row['cc'];
    }
    $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>{$istarttime} AND mid='{$uid}'; ");
    $ddd = $row['dd'] + $ddd;
    $ccd = $row['cc'] + $ccd;
    $msg = "<table width='96%' border='0' align='center' cellpadding='3' cellspacing='1' bgcolor='#cfcfcf'>\r\n    <tr align='center' bgcolor='#FBFCE2'>\r\n      <td width='18%' height='26'><strong>管理員↓|統計信息→</strong></td>\r\n      <td width='18%'><strong>全部(文檔|點擊)</strong></td>\r\n      <td width='16%'><strong>季度</strong></td>\r\n      <td width='16%'><strong>當月</strong></td>\r\n      <td width='16%'><strong>近七天</strong></td>\r\n      <td width='16%'><strong>當天</strong></td>\r\n    </tr>\r\n    <tr align='center' bgcolor='#FFFFFF'>\r\n      <td height='26'>{$userid}</td>\r\n      <td>{$dd} | {$cc}</td>\r\n      <td>{$dds} | {$ccs}</td>\r\n      <td>{$ddm} | {$ccm}</td>\r\n      <td>{$ddw} | {$ccw}</td>\r\n      <td>{$ddd} | {$ccd}</td>\r\n    </tr>\r\n    </table><br style='clear:both'/>\r\n";
    AjaxHead();
    echo $msg;
    exit;
}
include DedeInclude('templets/sys_admin_user_tj.htm');
開發者ID:iabing,項目名稱:mzzyc,代碼行數:30,代碼來源:sys_admin_user_tj.php

示例7: array

    } else {
        $configstr .= "\$safe_gdstyle = '';\r\n";
    }
    $configstr .= "\$safe_wwidth = '" . $gd_wwidth . "';\r\n";
    $configstr .= "\$safe_wheight = '" . $gd_wheight . "';\r\n";
    $configstr .= "\$safe_codelen = '" . $codelen . "';\r\n";
    $configstr .= "\$safe_faq_reg = '" . $gdfaq_reg . "';\r\n";
    $configstr .= "\$safe_faq_send = '" . $gdfaq_send . "';\r\n";
    $configstr .= "\$safe_faq_msg = '" . $gdfaq_msg . "';\r\n";
    //保存問答數組
    $faqs = array();
    for ($i = 1; $i <= count($question) - 1; $i++) {
        $val = trim($question[$i]);
        if ($val) {
            $faqs[$i]['question'] = str_replace("'", "\"", stripslashes($val));
            $faqs[$i]['answer'] = stripslashes(trim($answer[$i]));
        }
    }
    //print_r($question);exit();
    $configstr .= "\$safe_faqs = '" . serialize($faqs) . "';\r\n";
    $configstr = "<" . "?php\r\n" . $configstr . "?" . ">\r\n";
    $fp = fopen($safeconfigfile, "w") or die("寫入文件 {$safeconfigfile} 失敗,請檢查權限!");
    fwrite($fp, $configstr);
    fclose($fp);
    ShowMsg("修改配置成功!", "sys_safe.php");
    exit;
}
require_once $safeconfigfile;
$safefaqs = unserialize($safe_faqs);
include DedeInclude('templets/sys_safe.htm');
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:30,代碼來源:sys_safe.php

示例8: ShowMsg

            exit;
        }
        if (trim($nvarname) == '' || eregi('[^a-z_]', $nvarname)) {
            ShowMsg("變量名不能為空並且必須為[a-z_]組成!", "-1");
            exit;
        }
        $row = $dsql->GetOne("Select varname From `#@__sysconfig` where varname like '{$nvarname}' ");
        if (is_array($row)) {
            ShowMsg("該變量名稱已經存在!", "-1");
            exit;
        }
        $row = $dsql->GetOne("Select aid From `#@__sysconfig` order by aid desc ");
        $aid = $row['aid'] + 1;
        $inquery = "INSERT INTO `#@__sysconfig`(`aid`,`varname`,`info`,`value`,`type`,`groupid`)\r\n    VALUES ('{$aid}','{$nvarname}','{$varmsg}','{$nvarvalue}','{$vartype}','{$vargroup}')";
        $rs = $dsql->ExecuteNoneQuery($inquery);
        if (!$rs) {
            ShowMsg("新增變量失敗,可能有非法字符!", "sys_info.php?gp={$vargroup}");
            exit;
        }
        if (!is_writeable($configfile)) {
            ShowMsg("成功保存變量,但由於 {$configfile} 無法寫入,因此不能更新配置文件!", "sys_info.php?gp={$vargroup}");
            exit;
        } else {
            ReWriteConfig();
            ShowMsg("成功保存變量並更新配置文件!", "sys_info.php?gp={$vargroup}");
            exit;
        }
    }
}
include DedeInclude('templets/sys_info.htm');
開發者ID:klr2003,項目名稱:sourceread,代碼行數:30,代碼來源:sys_info.php

示例9: empty

    $channelid = empty($channelid) ? 0 : intval($channelid);
    $cid = empty($cid) ? 0 : intval($cid);
    //獲得頻道模型ID
    if ($cid > 0 && $channelid == 0) {
        $row = $dsql->GetOne("Select channeltype From `#@__arctype` where id='{$cid}'; ");
        $channelid = $row['channeltype'];
    } else {
        if ($channelid == 0) {
            $channelid = 1;
        }
    }
    $softconfig = $dsql->GetOne("select * From `#@__softconfig` ");
    //獲得頻道模型信息
    $cInfos = $dsql->GetOne(" Select * From  `#@__channeltype` where id='{$channelid}' ");
    $channelid = $cInfos['id'];
    include DedeInclude("templets/soft_add.htm");
    exit;
} else {
    if ($dopost == 'save') {
        require_once DEDEINC . '/image.func.php';
        require_once DEDEINC . '/oxwindow.class.php';
        $flag = isset($flags) ? join(',', $flags) : '';
        $notpost = isset($notpost) && $notpost == 1 ? 1 : 0;
        if (empty($click)) {
            $click = $cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click;
        }
        if (!isset($typeid2)) {
            $typeid2 = 0;
        }
        if (!isset($autokey)) {
            $autokey = 0;
開發者ID:klr2003,項目名稱:sourceread,代碼行數:31,代碼來源:soft_add.php

示例10: addslashes

                }
                $keywords = addslashes($keywords);
                if ($keywords == '') {
                    $keywords = ',';
                }
                $dsql->ExecuteNoneQuery("update `#@__archives` set keywords='{$keywords}' where id='{$id}'");
            }
            $sp->Clear();
            unset($sp);
        }
        //end if limit
        //返回提示信息
        if ($totalnum > 0) {
            $tjlen = ceil($tjnum / $totalnum * 100);
        } else {
            $tjlen = 100;
        }
        $dvlen = $tjlen * 2;
        $tjsta = "<div style='width:200;height:15;border:1px solid #898989;text-align:left'><div style='width:{$dvlen};height:15;background-color:#829D83'></div></div>";
        $tjsta .= "<br/>完成處理文檔總數的:{$tjlen} %,位置:{$startdd},繼續執行任務...";
        if ($tjnum < $totalnum) {
            $nurl = "article_keywords_make.php?dopost=fetch&totalnum={$totalnum}&startdd=" . ($startdd + $pagesize) . "&pagesize={$pagesize}";
            ShowMsg($tjsta, $nurl, 0, 500);
        } else {
            ShowMsg("完成所有任務!", "javascript:;");
        }
        exit;
    }
}
include DedeInclude('templets/article_keywords_make.htm');
開發者ID:klr2003,項目名稱:sourceread,代碼行數:30,代碼來源:article_keywords_make.php

示例11: dirname

<?php

/**
 * 采集規則測試
 *
 * @version        $Id: co_test_rule.php 1 17:13 2010年7月12日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
require_once DEDEINC . "/dedecollection.class.php";
$nid = intval($nid);
$co = new DedeCollection();
$co->LoadNote($nid);
include DedeInclude('templets/co_test_rule.htm');
exit;
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:18,代碼來源:co_test_rule.php

示例12: dirname

<?php

/**
 * 通行證設置
 *
 * @version        $Id: sys_passport.php 1 22:28 2010年7月20日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
if (!isset($dopost)) {
    $dopost = "";
}
if ($dopost == 'save') {
    $ConfigFile = DEDEINC . "/config_passport.php";
    $vars = array('cfg_pp_need', 'cfg_pp_encode', 'cfg_pp_login', 'cfg_pp_exit', 'cfg_pp_reg');
    $configstr = "";
    foreach ($vars as $v) {
        ${$v} = str_replace("'", "", ${$v});
        $configstr .= "\${$v} = '" . str_replace("'", "", stripslashes(${'edit___' . $v})) . "';\r\n";
    }
    $configstr = '<' . '?' . "\r\n" . $configstr . '?' . '>';
    $fp = fopen($ConfigFile, "w") or die("寫入文件 {$ConfigFile} 失敗,請檢查權限!");
    fwrite($fp, $configstr);
    fclose($fp);
    echo "<script>alert('修改通行證配置成功!');window.location='sys_passport.php?" . time() . "';</script>\r\n";
}
include DedeInclude('templets/sys_passport.htm');
開發者ID:iabing,項目名稱:mzzyc,代碼行數:30,代碼來源:sys_passport.php

示例13: dirname

<?php

/**
 * 生成列表欄目
 *
 * @version        $Id: makehtml_list.php 1 11:09 2010年7月19日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
require_once DEDEINC . "/typelink.class.php";
include DedeInclude('templets/makehtml_list.htm');
開發者ID:stonelf,項目名稱:mcgmh,代碼行數:14,代碼來源:makehtml_list.php

示例14: CheckPurview

CheckPurview('plus_文件管理器');
if (empty($acdir)) {
    $acdir = $cfg_df_style;
}
$templetdir = $cfg_basedir . $cfg_templets_dir;
$templetdird = $templetdir . '/' . $acdir;
$templeturld = $cfg_templeturl . '/' . $acdir;
if (ereg("\\.", $acdir)) {
    ShowMsg('Not Allow dir ' . $acdir . '!', '-1');
    exit;
}
//獲取默認文件說明信息
function GetInfoArray($filename)
{
    $arrs = array();
    $dlist = file($filename);
    foreach ($dlist as $d) {
        $d = trim($d);
        if ($d != '') {
            list($dname, $info) = explode(',', $d);
            $arrs[$dname] = $info;
        }
    }
    return $arrs;
}
$dirlists = GetInfoArray($templetdir . '/templet-dirlist.inc');
$filelists = GetInfoArray($templetdir . '/templet-filelist.inc');
$pluslists = GetInfoArray($templetdir . '/templet-pluslist.inc');
$fileinfos = $acdir == 'plus' ? $pluslists : $filelists;
include DedeInclude('templets/templets_default.htm');
開發者ID:klr2003,項目名稱:sourceread,代碼行數:30,代碼來源:templets_main.php

示例15: dirname

<?php

/**
 * 生成文檔
 *
 * @version        $Id: makehtml_archives.php 1 9:10 2010年7月19日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
require_once DEDEINC . "/typelink.class.php";
include DedeInclude('templets/makehtml_archives.htm');
開發者ID:iabing,項目名稱:mzzyc,代碼行數:14,代碼來源:makehtml_archives.php


注:本文中的DedeInclude函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。