当前位置: 首页>>代码示例>>PHP>>正文


PHP showInfo函数代码示例

本文整理汇总了PHP中showInfo函数的典型用法代码示例。如果您正苦于以下问题:PHP showInfo函数的具体用法?PHP showInfo怎么用?PHP showInfo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了showInfo函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: uninstall

    public static function uninstall()
    {
        global $db, $setting, $admin_cat;
        $info = self::info();
        $db->delete($setting['db']['pre'] . "news_mark");
        $db->exec("drop", "table", $setting['db']['pre'] . "news_mark");
        $db->delete($setting['db']['pre'] . "admin_cat", array("file", "=", "news_mark.php"));
        $db->delete($setting['db']['pre'] . "plugin", array("idx", "=", $info['idx']));
        deleteCache("admin_cat");
        deleteCache("plugin");
        $err = array();
        if ($db->GetError($err)) {
            showInfo($setting['language']['plugin_err_uninstall'] . "\r\n\t\t\t<br />\r\n\t\t\t<pre>\r\n\t\t\t" . join("\n------------------------\n", $err) . "\r\n\t\t\t</pre>\r\n\t\t\t");
        } else {
            includeCache("admin_cat");
            $admin_cat = toJson($admin_cat, $setting['gen']['charset']);
            echo <<<mystep
<script language="javascript">
parent.admin_cat = {$admin_cat};
parent.setNav();
</script>
mystep;
            buildParaList("plugin");
            echo showInfo($setting['language']['plugin_uninstall_done'], false);
        }
    }
开发者ID:laiello,项目名称:mystep-cms,代码行数:26,代码来源:class.php

示例2: build_page

function build_page($method)
{
    global $mystep, $req, $db, $tpl, $tpl_info, $setting, $id, $web_id;
    $tpl_info['idx'] = "art_info_" . ($method == "list" ? "list" : "input");
    $tpl_tmp = $mystep->getInstance("MyTpl", $tpl_info);
    if ($method == "list") {
        $condition = array();
        if (!empty($web_id)) {
            $condition = array("web_id", "n=", $web_id);
        }
        $db->select($setting['db']['pre'] . "info_show", "*", $condition, array("order" => "id asc"));
        $n = 0;
        while ($record = $db->GetRS()) {
            $n++;
            if ($webInfo = getParaInfo("website", "web_id", $record['web_id'])) {
                $record['web_id'] = $webInfo['name'];
            } else {
                $record['web_id'] = "ALL";
            }
            $tpl_tmp->Set_Loop('record', $record);
        }
        $tpl_tmp->Set_If('empty', $n == 0);
        $tpl_tmp->Set_Variable('title', $setting['language']['admin_art_info_title']);
        $tpl_tmp->Set_Variable('web_id', $web_id);
    } else {
        if ($method == "edit") {
            $record = $db->record($setting['db']['pre'] . "info_show", "*", array("id", "n=", $id));
            if ($record === false) {
                $tpl->Set_Variable('main', showInfo($setting['language']['admin_art_info_error'], 0));
                $mystep->show($tpl);
                $mystep->pageEnd(false);
            }
            $web_id = $record['web_id'];
            HtmlTrans(&$record);
        } else {
            $record = array();
            $record['id'] = 0;
            $record['web_id'] = $web_id;
            $record['subject'] = "";
            $record['content'] = "";
            $record['attach_list'] = "|";
        }
        $tpl_tmp->Set_Variables($record);
        $Max_size = round(GetFileSize(ini_get('upload_max_filesize')) / 1024 / 1024, 2);
        $tpl_tmp->Set_Variable('title', $method == 'add' ? $setting['language']['admin_art_info_add'] : $setting['language']['admin_art_info_edit']);
        $tpl_tmp->Set_Variable('method', $method);
        $tpl_tmp->Set_Variable('MaxSize', $Max_size);
        $tpl_tmp->Set_Variable('back_url', $req->getServer("HTTP_REFERER"));
    }
    $max_count = count($GLOBALS['website']);
    for ($i = 0; $i < $max_count; $i++) {
        $GLOBALS['website'][$i]['selected'] = $GLOBALS['website'][$i]['web_id'] == $web_id ? "selected" : "";
        $tpl_tmp->Set_Loop("website", $GLOBALS['website'][$i]);
    }
    $db->Free();
    $tpl->Set_Variable('main', $tpl_tmp->Get_Content('$db, $setting'));
    unset($tpl_tmp);
    $mystep->show($tpl);
    return;
}
开发者ID:laiello,项目名称:mystep-cms,代码行数:60,代码来源:art_info.php

示例3: info_body

function info_body()
{
    $id = 1;
    function showInfo($cmd)
    {
        global $id;
        ?>
<div class="info_frame">
<a href="#" onclick="look('l_<?php 
        echo $id;
        ?>
','t_<?php 
        echo $id;
        ?>
')"><div id="t_<?php 
        echo $id;
        ?>
" class="info_topic"><?php 
        echo $cmd;
        ?>
</div></a>
<div id="l_<?php 
        echo $id;
        ?>
" class="info_list"><pre>
<?php 
        exec($cmd, $lines);
        foreach ($lines as $s) {
            echo "{$s}\n";
        }
        $id += 1;
        ?>
</pre></div></div><br />
<?php 
    }
    ?>
<div id="container">
<h3><?php 
    echo getMsg('coreInfo');
    ?>
</h3>
<?php 
    showInfo("/bin/uname -a");
    showInfo("cat /proc/cpuinfo");
    showInfo("cat /proc/meminfo");
    showInfo("/sbin/lsmod");
    showInfo("/bin/ps -w");
    showInfo("/bin/dmesg");
    showInfo("/bin/busybox");
    showInfo("cat /proc/mounts");
    showInfo("/bin/df -h");
    showInfo("/sbin/fdisk -l");
    showInfo("/sbin/ifconfig");
    showInfo("/sbin/route");
    showInfo("cat /etc/resolv.conf");
    showInfo("set");
    echo "</div>\n";
}
开发者ID:jasanders,项目名称:os-aios,代码行数:58,代码来源:mod_info.php

示例4: build_page

function build_page($method)
{
    global $mystep, $req, $db, $setting, $id;
    $tpl_info = array("idx" => $method == "list" ? "list" : "input", "style" => "../plugin/" . basename(realpath(dirname(__FILE__))) . "/tpl/", "path" => ROOT_PATH . "/" . $setting['path']['template']);
    $tpl = $mystep->getInstance("MyTpl", $tpl_info);
    if ($method == "list") {
        $status = file_get_contents("status.txt");
        if ($status == "run") {
            $tpl->Set_Variable('status_info', $setting['language']['plugin_crontab_status_run']);
            $tpl->Set_Variable('status_link', "?method=stop");
            $tpl->Set_Variable('status_txt', $setting['language']['plugin_crontab_status_stop']);
        } else {
            $tpl->Set_Variable('status_info', $setting['language']['plugin_crontab_status_stop']);
            //$tpl->Set_Variable('status_link', "?method=start");
            $tpl->Set_Variable('status_link', 'javascript:crontab_start()');
            $tpl->Set_Variable('status_txt', $setting['language']['plugin_crontab_status_run']);
        }
        $db->select($setting['db']['pre'] . "crontab", "*", "", array("order" => "id desc"));
        while ($record = $db->GetRS()) {
            HtmlTrans(&$record);
            $tpl->Set_Loop('record', $record);
        }
        $db->Free();
        $tpl->Set_Variable('title', $setting['language']['plugin_crontab_title']);
    } else {
        if ($method == "edit") {
            $record = $db->record($setting['db']['pre'] . "crontab", "*", array("id", "n=", $id));
            if ($record === false) {
                $tpl->Set_Variable('main', showInfo($setting['language']['plugin_crontab_error'], 0));
                $mystep->show($tpl);
                $mystep->pageEnd(false);
            }
            HtmlTrans(&$record);
        } else {
            $record = array();
            $record['id'] = 0;
            $record['name'] = "";
            $record['mode'] = 1;
            $record['expire'] = "";
            $record['schedule'] = "0,0,1,0,0";
            $record['url'] = "";
            $record['code'] = "";
        }
        $record['send_date'] = date("Y-m-d H:i:s");
        $tpl->Set_Variables($record);
        $tpl->Set_Variable('title', $method == 'add' ? $setting['language']['plugin_crontab_add'] : $setting['language']['plugin_crontab_edit']);
        $tpl->Set_Variable('method', $method);
        $tpl->Set_Variable('back_url', $req->getServer("HTTP_REFERER"));
    }
    $tpl->Set_Variable('path_admin', $setting['path']['admin']);
    $db->Free();
    $mystep->show($tpl);
    return;
}
开发者ID:laiello,项目名称:mystep-cms,代码行数:54,代码来源:crontab.php

示例5: build_page

function build_page($method)
{
    global $mystep, $req, $db, $setting, $id;
    $tpl_info = array("idx" => $method == "list" ? "list" : "input", "style" => "../plugin/" . basename(realpath(dirname(__FILE__))) . "/tpl/", "path" => ROOT_PATH . "/" . $setting['path']['template']);
    $tpl = $mystep->getInstance("MyTpl", $tpl_info);
    if ($method == "list") {
        $db->select($setting['db']['pre'] . "email", "*", "", array("order" => "id desc"));
        while ($record = $db->GetRS()) {
            HtmlTrans(&$record);
            $tpl->Set_Loop('record', $record);
        }
        $db->Free();
        $tpl->Set_Variable('title', $setting['language']['plugin_email_title']);
    } else {
        if ($method == "edit") {
            $record = $db->record($setting['db']['pre'] . "email", "*", array("id", "n=", $id));
            if ($record === false) {
                $tpl->Set_Variable('main', showInfo($setting['language']['plugin_email_error'], 0));
                $mystep->show($tpl);
                $mystep->pageEnd(false);
            }
            HtmlTrans(&$record);
        } else {
            $record = array();
            $record['id'] = 0;
            $record['subject'] = "";
            $record['from'] = "";
            $record['reply'] = "";
            $record['notification'] = "";
            $record['priority'] = 3;
            $record['to'] = "";
            $record['cc'] = "";
            $record['bcc'] = "";
            $record['header'] = "";
            $record['content'] = "";
            $record['attachment'] = "";
        }
        $record['send_date'] = date("Y-m-d H:i:s");
        $tpl->Set_Variables($record);
        $tpl->Set_Variable('title', $method == 'add' ? $setting['language']['plugin_email_add'] : $setting['language']['plugin_email_edit']);
        $tpl->Set_Variable('method', $method);
        $tpl->Set_Variable('back_url', $req->getServer("HTTP_REFERER"));
    }
    $tpl->Set_Variable('path_admin', $setting['path']['admin']);
    $db->Free();
    $mystep->show($tpl);
    return;
}
开发者ID:laiello,项目名称:mystep-cms,代码行数:48,代码来源:email.php

示例6: build_page

function build_page($method)
{
    global $mystep, $req, $db, $tpl, $power_id, $tpl_info, $setting;
    $tpl_info['idx'] = "user_power_" . ($method == "list" ? "list" : "input");
    $tpl_tmp = $mystep->getInstance("MyTpl", $tpl_info);
    $formatList = array('digital' => $setting['language']['checkform_item_digital'], 'date' => $setting['language']['checkform_item_date'], 'time' => $setting['language']['checkform_item_time']);
    if ($method == "list") {
        $db->select($setting['db']['pre'] . "user_power", "*", "", array("order" => "power_id"));
        while ($record = $db->GetRS()) {
            HtmlTrans(&$record);
            $record['format'] = $formatList[$record['format']];
            $tpl_tmp->Set_Loop('record', $record);
        }
        $tpl_tmp->Set_Variable('title', $setting['language']['admin_user_power_title']);
    } else {
        $tpl_tmp->Set_Variable('title', $method == "add" ? $setting['language']['admin_user_power_add'] : $setting['language']['admin_user_power_edit']);
        if ($method == "edit") {
            $record = $db->record($setting['db']['pre'] . "user_power", "*", array("power_id", "n=", $power_id));
            if ($record === false) {
                $tpl->Set_Variable('main', showInfo($setting['language']['admin_user_power_error'], 0));
                $mystep->show($tpl);
                $mystep->pageEnd(false);
            }
            $record['idx_org'] = $record['idx'];
        } else {
            $record['power_id'] = 0;
            $record['idx'] = "";
            $record['idx_org'] = "";
            $record['name'] = "";
            $record['value'] = "";
            $record['format'] = "";
            $record['format_org'] = "";
            $record['comment'] = "";
        }
        $tpl_tmp->Set_Variables($record);
        foreach ($formatList as $key => $value) {
            $tpl_tmp->Set_Loop('format', array("key" => $key, "value" => $value, "select" => $record['format'] == $key ? "selected" : ""));
        }
        $tpl_tmp->Set_Variable('method', $method);
        $tpl_tmp->Set_Variable('back_url', $req->getServer("HTTP_REFERER"));
    }
    $db->Free();
    $tpl->Set_Variable('main', $tpl_tmp->Get_Content('$db, $setting'));
    unset($tpl_tmp);
    $mystep->show($tpl);
    return;
}
开发者ID:laiello,项目名称:mystep-cms,代码行数:47,代码来源:user_power.php

示例7: build_page

function build_page($method)
{
    global $mystep, $req, $db, $tpl, $type_id, $tpl_info, $setting, $user_power;
    $tpl_info['idx'] = "user_type_" . ($method == "list" ? "list" : "input");
    $tpl_tmp = $mystep->getInstance("MyTpl", $tpl_info);
    if ($method == "list") {
        $max_count = count($user_power);
        $db->select($setting['db']['pre'] . "user_type", "*", "", array("order" => "type_id"));
        while ($record = $db->GetRS()) {
            HtmlTrans(&$record);
            $record['user_power'] = "";
            for ($i = 0; $i < $max_count; $i++) {
                $record['user_power'] .= "<td class=\"row\">" . $record[$user_power[$i]['idx']] . "</td>\n";
            }
            $tpl_tmp->Set_Loop('record', $record);
        }
        $tpl_tmp->Set_Variable('title', $setting['language']['admin_user_type_title']);
    } else {
        $tpl_tmp->Set_Variable('title', $method == "add" ? $setting['language']['admin_user_type_add'] : $setting['language']['admin_user_type_edit']);
        if ($method == "edit") {
            $record = $db->record($setting['db']['pre'] . "user_type", "*", array("type_id", "n=", $type_id));
            if ($record === false) {
                $tpl->Set_Variable('main', showInfo($setting['language']['admin_user_type_error'], 0));
                $mystep->show($tpl);
                $mystep->pageEnd(false);
            }
        } else {
            $record['type_id'] = 0;
            $record['type_name'] = "";
        }
        $tpl_tmp->Set_Variables($record);
        $tpl_tmp->Set_Variable('method', $method);
        $tpl_tmp->Set_Variable('back_url', $req->getServer("HTTP_REFERER"));
    }
    $max_count = count($user_power);
    for ($i = 0; $i < $max_count; $i++) {
        if (isset($record[$user_power[$i]['idx']])) {
            $user_power[$i]['value'] = $record[$user_power[$i]['idx']];
        }
        $tpl_tmp->Set_Loop('user_power', $user_power[$i]);
    }
    $db->Free();
    $tpl->Set_Variable('main', $tpl_tmp->Get_Content('$db, $setting'));
    unset($tpl_tmp);
    $mystep->show($tpl);
    return;
}
开发者ID:laiello,项目名称:mystep-cms,代码行数:47,代码来源:user_type.php

示例8: build_page

function build_page($method)
{
    global $mystep, $req, $db, $setting, $idx, $mydb;
    $tpl_info = array("idx" => "main", "style" => "../plugin/" . basename(realpath(dirname(__FILE__))) . "/tpl/", "path" => ROOT_PATH . "/" . $setting['path']['template']);
    $tpl = $mystep->getInstance("MyTpl", $tpl_info);
    $tpl_info['idx'] = $method == "list" ? "list" : "input";
    $tpl_tmp = $mystep->getInstance("MyTpl", $tpl_info);
    if ($method == "list") {
        $record = $mydb->queryAll();
        if (!$record) {
            $record = array();
        }
        $tpl_tmp->Set_Loop('record', $record, true);
        $tpl_tmp->Set_Variable('title', $setting['language']['plugin_xcode_title']);
    } else {
        if ($method == "edit") {
            $record = $mydb->queryDate("idx=" . $idx, true, &$fp_pos, &$row_pos);
            if (!$record) {
                $tpl->Set_Variable('main', showInfo($setting['language']['plugin_xcode_error'], 0));
                $mystep->show($tpl);
                $mystep->pageEnd(false);
            }
            $record['content'] = GetFile(dirname(__FILE__) . "/code/" . $idx . ".php");
            HtmlTrans(&$record);
        } else {
            $record = array();
            $record['idx'] = $_SERVER['REQUEST_TIME'];
            $record['page'] = "";
            $record['position'] = "0";
            $record['description'] = "";
            $record['content'] = "<?php\n\n?>";
        }
        $tpl_tmp->Set_Variables($record);
        $tpl_tmp->Set_Variable('title', $method == 'add' ? $setting['language']['plugin_xcode_add'] : $setting['language']['plugin_xcode_edit']);
        $tpl_tmp->Set_Variable('method', $method);
        $tpl_tmp->Set_Variable('back_url', $req->getServer("HTTP_REFERER"));
    }
    $tpl->Set_Variable('path_admin', $setting['path']['admin']);
    $tpl->Set_Variable('main', $tpl_tmp->Get_Content('$setting'));
    unset($tpl_tmp);
    $mystep->show($tpl);
    return;
}
开发者ID:laiello,项目名称:mystep-cms,代码行数:43,代码来源:xcode.php

示例9: build_page

function build_page($method)
{
    global $mystep, $req, $db, $setting, $id;
    $tpl_info = array("idx" => $method == "list" ? "list" : "input", "style" => "../plugin/" . basename(realpath(dirname(__FILE__))) . "/tpl/", "path" => ROOT_PATH . "/" . $setting['path']['template']);
    $tpl = $mystep->getInstance("MyTpl", $tpl_info);
    if ($method == "list") {
        $max_count = count($GLOBALS['admin_cat']);
        for ($i = 0; $i < $max_count; $i++) {
            switch ($GLOBALS['admin_cat'][$i]['web_id']) {
                case "0":
                    $GLOBALS['admin_cat'][$i]['web_id'] = $setting['language']['plugin_admin_cat_panle'];
                    break;
                case "255":
                    $GLOBALS['admin_cat'][$i]['web_id'] = $setting['language']['plugin_admin_cat_allsub'];
                    break;
                default:
                    $webInfo = getParaInfo("website", "web_id", $GLOBALS['admin_cat'][$i]['web_id']);
                    $GLOBALS['admin_cat'][$i]['web_id'] = $webInfo['name'];
                    break;
            }
            $tpl->Set_Loop('record', $GLOBALS['admin_cat'][$i]);
            $max_count2 = count($GLOBALS['admin_cat'][$i]['sub']);
            for ($j = 0; $j < $max_count2; $j++) {
                switch ($GLOBALS['admin_cat'][$i]['sub'][$j]['web_id']) {
                    case "0":
                        $GLOBALS['admin_cat'][$i]['sub'][$j]['web_id'] = $setting['language']['plugin_admin_cat_panle'];
                        break;
                    case "255":
                        $GLOBALS['admin_cat'][$i]['sub'][$j]['web_id'] = $setting['language']['plugin_admin_cat_allsub'];
                        break;
                    default:
                        $GLOBALS['admin_cat'][$i]['sub'][$j]['web_id'] = getParaInfo("website", "web_id", $GLOBALS['admin_cat'][$i]['sub'][$j]['web_id']);
                        $GLOBALS['admin_cat'][$i]['sub'][$j]['web_id'] = $GLOBALS['admin_cat'][$i]['sub'][$j]['web_id']['name'];
                        break;
                }
                $GLOBALS['admin_cat'][$i]['sub'][$j]['name'] = "&nbsp; &nbsp; " . $GLOBALS['admin_cat'][$i]['sub'][$j]['name'];
                $tpl->Set_Loop('record', $GLOBALS['admin_cat'][$i]['sub'][$j]);
            }
        }
        $tpl->Set_Variable('title', $setting['language']['plugin_admin_cat_title']);
    } else {
        if ($method == "edit") {
            $record = $db->record($setting['db']['pre'] . "admin_cat", "*", array("id", "n=", $id));
            if ($record === false) {
                $tpl->Set_Variable('main', showInfo($setting['language']['plugin_admin_cat_error'], 0));
                $mystep->show($tpl);
                $mystep->pageEnd(false);
            }
            $web_id = $record['web_id'];
            HtmlTrans(&$record);
        } else {
            $record = array();
            $record['id'] = 0;
            $record['pid'] = 0;
            $record['name'] = "";
            $record['file'] = "";
            $record['path'] = "";
            $record['web_id'] = "0";
            $record['order'] = "0";
            $record['comment'] = "";
        }
        $tpl->Set_Variables($record);
        $tpl->Set_Variable('title', $method == 'add' ? $setting['language']['plugin_admin_cat_add'] : $setting['language']['plugin_admin_cat_edit']);
        $tpl->Set_Variable('method', $method);
        $tpl->Set_Variable('back_url', $req->getServer("HTTP_REFERER"));
        $max_count = count($GLOBALS['website']);
        for ($i = 0; $i < $max_count; $i++) {
            $tpl->Set_Loop("website", $GLOBALS['website'][$i]);
        }
        $max_count = count($GLOBALS['admin_cat']);
        for ($i = 0; $i < $max_count; $i++) {
            $tpl->Set_Loop("cat", array("id" => $GLOBALS['admin_cat'][$i]['id'], "name" => $GLOBALS['admin_cat'][$i]['name'], "selected" => $GLOBALS['admin_cat'][$i]['id'] == $record['pid'] ? "selected" : ""));
        }
    }
    $tpl->Set_Variable('path_admin', $setting['path']['admin']);
    $db->Free();
    $mystep->show($tpl);
    return;
}
开发者ID:laiello,项目名称:mystep-cms,代码行数:79,代码来源:admin_cat.php

示例10: build_page

function build_page($method)
{
    global $mystep, $req, $db, $tpl, $tpl_info, $setting, $news_cat, $news_id, $cat_id, $group, $web_id, $setting_sub;
    $top_mode_list = array("0" => $setting['language']['admin_art_content_top_mode_1'], "1" => $setting['language']['admin_art_content_top_mode_2'], "2" => $setting['language']['admin_art_content_top_mode_3']);
    $top_list = array("1" => $setting['language']['admin_art_content_top_1'], "2" => $setting['language']['admin_art_content_top_2'], "4" => $setting['language']['admin_art_content_top_3']);
    $tpl_info['idx'] = "art_content_" . ($method == "list" ? "list" : "input");
    $tpl_tmp = $mystep->getInstance("MyTpl", $tpl_info);
    if ($cat_info = getParaInfo("news_cat", "cat_id", $cat_id)) {
        $web_id = $cat_info['web_id'];
    }
    $check_i = "";
    $check_b = "";
    $check_c = "";
    if (empty($group['power_cat'])) {
        $group['power_cat'] = 0;
    }
    if ($method == "list") {
        $page = $req->getGet("page");
        $keyword = $req->getGet("keyword");
        $order = $req->getGet("order");
        $tpl_tmp->Set_Variable('order', $order);
        $order_type = $req->getGet("order_type");
        if (empty($order_type)) {
            $order_type = "desc";
        }
        $condition = array();
        if (!empty($web_id)) {
            $condition[] = array("web_id", "n=", $web_id, "and");
        }
        if (!empty($cat_id)) {
            $condition[] = array("cat_id", "n=", $cat_id, "and");
        }
        if (!empty($keyword)) {
            $condition[] = array(array(array("subject", "like", $keyword), array("tag", "like", $keyword)), "and");
        }
        if ($group['power_cat'] != "all") {
            $condition[] = array("cat_id", "nin", $group['power_cat'], "and");
        }
        //navigation
        $counter = $db->result($setting['db']['pre_sub'] . "news_show", "count(*)", $condition);
        list($page_arr, $page_start, $page_size) = GetPageList($counter, "?keyword={$keyword}&cat_id={$cat_id}&web_id={$web_id}&order={$order}&order_type={$order_type}", $page);
        $tpl_tmp->Set_Variables($page_arr);
        //main list
        $the_order = array();
        if (!empty($cat_id) && $order != "setop") {
            $the_order[] = "order desc";
        }
        if ($order == "setop") {
            $order_type = "desc";
        }
        if (!empty($order)) {
            $the_order[] = "{$order} {$order_type}";
        }
        $the_order[] = "news_id {$order_type}";
        $sql = $db->buildSel_join(array(array("name" => $setting['db']['pre_sub'] . "news_show", "idx" => "a", "col" => "*", "condition" => $condition, "order" => $the_order), array("name" => $setting['db']['pre'] . "news_cat", "idx" => "b", "col" => "cat_idx, cat_name", "join" => "cat_id")), "", array("limit" => "{$page_start}, {$page_size}"));
        $db->Query($sql);
        while ($record = $db->GetRS()) {
            HtmlTrans(&$record);
            if (empty($record['link'])) {
                $record['link'] = getUrl("read", array($record['news_id'], $record['cat_id']), 1, $record['web_id']);
            }
            $tpl_tmp->Set_Loop('record', $record);
        }
        $title = empty($cat_id) ? $setting['language']['admin_art_content_list_all'] : $db->result($setting['db']['pre'] . "news_cat", "cat_name", array("cat_id", "n=", $cat_id));
        $tpl_tmp->Set_Variable('title', $setting['language']['admin_art_content_list_article'] . " - " . $setting_sub['web']['title'] . " - " . $title);
        $tpl_tmp->Set_Variable('keyword', $keyword);
        $tpl_tmp->Set_Variable('cat_id', $cat_id);
        $tpl_tmp->Set_Variable('order_type_org', $order_type);
        $order_type = $order_type == "asc" ? "desc" : "asc";
        $tpl_tmp->Set_Variable('order_type', $order_type);
        $tpl_tmp->Set_Variable('keyword', $keyword);
    } elseif ($method == "edit") {
        $record = $db->record($setting['db']['pre_sub'] . "news_show", "*", array("news_id", "n=", $news_id));
        if (!$record) {
            $tpl->Set_Variable('main', showInfo($setting['language']['admin_art_content_error'], 0));
            $mystep->show($tpl);
            $mystep->pageEnd(false);
        }
        HtmlTrans(&$record);
        $tpl_tmp->Set_Variables($record, "record");
        $cat_id = $record['cat_id'];
        $setop = (int) $record['setop'];
        foreach ($top_list as $key => $value) {
            $key = (int) $key;
            $tpl_tmp->Set_Loop('setop', array("key" => $key, "value" => $value, "checked" => ($setop & $key) == $key ? "checked" : ""));
            if (($setop & $key) == $key) {
                $setop -= $key;
            }
        }
        $setop /= 1024;
        foreach ($top_mode_list as $key => $value) {
            $key = (int) $key;
            $tpl_tmp->Set_Loop('setop_mode', array("key" => $key, "value" => $value, "checked" => $setop == $key ? "checked" : ""));
        }
        $theStyle = explode(",", $record['style']);
        $max_count = count($theStyle);
        for ($i = 0; $i < $max_count; $i++) {
            if ($theStyle[$i] == "i") {
                $check_i = "checked";
            } elseif ($theStyle[$i] == "b") {
//.........这里部分代码省略.........
开发者ID:laiello,项目名称:mystep-cms,代码行数:101,代码来源:art_content.php

示例11: pageEnd

 public function pageEnd($show_info = false)
 {
     global $setting;
     for ($i = count($this->func_end) - 1; $i >= 0; $i--) {
         call_user_func($this->func_end[$i]);
     }
     $setting['info']['query_count'] = $GLOBALS['db']->Close();
     if ($GLOBALS['db']->GetError($err_info) && isset($GLOBALS['op_mode'])) {
         ob_clean();
         echo showInfo($setting['language']['admin_database_error'] . '<ol style="text-align:left;font-weight:normal;"><li>' . implode('</li><li>', $err_info) . '</li></ol>', 0);
     }
     if (!empty($GLOBALS['goto_url']) && ob_get_length() == 0) {
         header("location: " . $GLOBALS['goto_url']);
     } else {
         GzDocOut($setting['gen']['gzip_level'], $show_info);
     }
     unset($GLOBALS['db'], $GLOBALS['req'], $GLOBALS['setting'], $this);
     exit;
 }
开发者ID:laiello,项目名称:mystep-cms,代码行数:19,代码来源:mystep.class.php

示例12: build_page

function build_page($method)
{
    global $mystep, $req, $db, $tpl, $web_id, $tpl_info, $website, $setting;
    $tpl_info['idx'] = "web_subweb_" . ($method == "list" ? "list" : "input");
    $tpl_tmp = $mystep->getInstance("MyTpl", $tpl_info);
    $tpl_tmp->allow_script = true;
    if ($method == "list") {
        $db->select($setting['db']['pre'] . "website", "*", "", array("order" => "web_id"));
        while ($record = $db->GetRS()) {
            HtmlTrans(&$record);
            $tpl_tmp->Set_Loop('record', $record);
        }
        $tpl_tmp->Set_Variable('title', $setting['language']['admin_web_subweb_title']);
        global $admin_cat;
        $tpl_tmp->Set_Variable("admin_cat", toJson($admin_cat, $setting['gen']['charset']));
        $tpl_tmp->Set_Variable("website", toJson($website, $setting['gen']['charset']));
    } else {
        $tpl_tmp->Set_Variable('title', $method == "add" ? $setting['language']['admin_web_subweb_add'] : $setting['language']['admin_web_subweb_edit']);
        if ($method == "edit") {
            $record = $db->record($setting['db']['pre'] . "website", "*", array("web_id", "n=", $web_id));
            if ($record === false) {
                $tpl->Set_Variable('main', showInfo($setting['language']['admin_web_subweb_error'], 0));
                $mystep->show($tpl);
                $mystep->pageEnd(false);
            }
        } else {
            $record['web_id'] = 0;
            $record['name'] = "";
            $record['idx'] = "";
            $record['host'] = "";
        }
        $GLOBALS['subweb_idx'] = $record['idx'];
        $tpl_tmp->Set_Variables($record);
        $setting['watermark']['mode'] = array($setting['watermark']['mode'] & 1 == 1, $setting['watermark']['mode'] & 2 == 2);
        $tpl_tmp->Set_Variable('method', $method);
        $tpl_tmp->Set_Variable('back_url', $req->getServer("HTTP_REFERER"));
    }
    $tpl->Set_Variable('main', $tpl_tmp->Get_Content('$db, $setting'));
    $db->Free();
    unset($tpl_tmp);
    $mystep->show($tpl);
    return;
}
开发者ID:laiello,项目名称:mystep-cms,代码行数:43,代码来源:web_subweb.php

示例13: trim

     $sevent = "<b title='{$origevent}'>{$event}</b>";
     if (in_array($event, $exclude) || substr($event, 0, 2) == "**") {
         $sevent = "<b>" . trim(substr($event, 2)) . "</b>";
     }
     if ($event == "** Full Server Tick") {
         $sevent = showInfo('fst', 'Full Server Tick');
         $serverLoad = $pct_tick;
     }
     if ($event == "** Connection Handler") {
         $sevent = showInfo('connhandler', 'Connection Handler');
     }
     if ($event == "** activatedTickEntity") {
         $sevent = showInfo('ate', 'Activated Entities');
     }
     if ($event == "Scheduler") {
         $sevent = showInfo('sched', 'Plugin Scheduler');
     }
     $i++;
     if ($plugin == $subkey && $i >= 11 || $pct_tot_raw < 0.0003 || $plugin != "Minecraft" && $i >= 6 && $plugin != $subkey) {
         $disabled = " hidden";
         $hiddenelem = true;
     } else {
         $disabled = "";
         $shown++;
     }
     $timesPerTick = pad(number_format($timesPerTick, $timesPerTick > 10 ? 0 : 1), 4);
     echo "<span class='event {$disabled}'><pre>  {$pct_tot}\t{$pct_tick}\t{$stime}\t{$avg}\t{$timesPerTick}\t{$count}";
     echo "\t    {$sevent}\n</pre></span>";
 }
 if ($hiddenelem) {
     echo "<button class='show_rest'>Show rest...</button><br />";
开发者ID:LinEvil,项目名称:timings,代码行数:31,代码来源:index.php

示例14: build_page

function build_page($method)
{
    global $mystep, $req, $db, $mydb, $setting, $topic_id;
    $tpl_info = array("idx" => "main", "style" => "../plugin/" . basename(realpath(dirname(__FILE__))) . "/tpl/", "path" => ROOT_PATH . "/" . $setting['path']['template']);
    $tpl = $mystep->getInstance("MyTpl", $tpl_info);
    if ($method == "add" || $method == "edit") {
        $tpl_info['idx'] = "input";
    } else {
        $tpl_info['idx'] = $method;
    }
    $tpl_tmp = $mystep->getInstance("MyTpl", $tpl_info);
    if ($method == "list") {
        $order = $req->getGet("order");
        $order_type = $req->getGet("order_type");
        if (empty($order_type)) {
            $order_type = "desc";
        }
        $keyword = $req->getGet("keyword");
        $page = $req->getGet("page");
        $condition = array();
        if (!empty($keyword)) {
            $condition[] = array("topic_name", "like", $keyword);
        }
        $counter = $db->result($setting['db']['pre'] . "topic", "count(*)", $condition);
        list($page_arr, $page_start, $page_size) = GetPageList($counter, "?keyword={$keyword}&order={$order}&order_type={$order_type}", $page);
        $tpl_tmp->Set_Variables($page_arr);
        $the_order = array();
        if (empty($order)) {
            $order = "topic_id";
        }
        $the_order[] = "{$order} {$order_type}";
        if ($order != "topic_id") {
            $the_order[] = "topic_id {$order_type}";
        }
        $db->select($setting['db']['pre'] . "topic", "*", $condition, array("order" => $the_order, "limit" => "{$page_start}, {$page_size}"));
        while ($record = $db->GetRS()) {
            if (empty($record['topic_link'])) {
                $record['topic_link'] = getUrl("topic", $record['topic_idx']);
            }
            $tpl_tmp->Set_Loop('record', $record);
        }
        $tpl_tmp->Set_Variable('order_type_org', $order_type);
        if ($order_type == "desc") {
            $order_type = "asc";
        } else {
            $order_type = "desc";
        }
        $tpl_tmp->Set_Variable('keyword', $keyword);
        $tpl_tmp->Set_Variable('order', $order);
        $tpl_tmp->Set_Variable('order_type', $order_type);
        $tpl_tmp->Set_Variable('title', $setting['language']['plugin_topic_title']);
    } else {
        $record = array();
        if ($method == "edit") {
            $record = $db->record($setting['db']['pre'] . "topic", "*", array("topic_id", "n=", $topic_id));
            if ($record === false) {
                $tpl->Set_Variable('main', showInfo($setting['language']['plugin_topic_error'], 0));
                $mystep->show($tpl);
                return;
            }
            $record['topic_tpl'] = GetFile("topic/" . $topic_id . ".tpl");
            HtmlTrans(&$record);
            $style_list = explode(",", $record['topic_cat']);
            $max_count = count($style_list);
            for ($i = 0; $i < $max_count; $i++) {
                $tpl_tmp->Set_Loop('style_list', array("index" => $i, "style" => $style_list[$i]));
            }
            $n = 1;
            $db->select($setting['db']['pre'] . "topic_link", "*", array("topic_id", "n=", $topic_id), array("order" => "link_order desc,id desc"));
            while ($links = $db->GetRS()) {
                HtmlTrans(&$links);
                $links['idx'] = $n++;
                $links['link_cat'] = $style_list[$links['link_cat']];
                if (empty($links['link_url'])) {
                    $links['link_url'] = "/read.php?id=" . $links['news_id'];
                }
                $tpl_tmp->Set_Loop('link_list', $links);
            }
        } else {
            $record = array();
            $record['topic_id'] = 0;
        }
        $tpl_tmp->Set_Variables($record);
        $tpl_tmp->Set_Variable('show_link', $method == "edit" ? "" : "none");
        $tpl_tmp->Set_Variable('title', $setting['language']['plugin_topic_' . $method]);
        $tpl_tmp->Set_Variable('method', $method);
    }
    $tpl_tmp->Set_Variable('max_size', ini_get('upload_max_filesize'));
    $tpl_tmp->Set_Variable('path_admin', $setting['path']['admin']);
    $tpl->Set_Variable('path_admin', $setting['path']['admin']);
    $tpl->Set_Variable('main', $tpl_tmp->Get_Content('$setting'));
    $db->Free();
    unset($tpl_tmp);
    $mystep->show($tpl);
    return;
}
开发者ID:laiello,项目名称:mystep-cms,代码行数:96,代码来源:topic.php

示例15: build_page

function build_page($method)
{
    global $mystep, $req, $db, $tpl, $group_id, $tpl_info, $admin_cat, $admin_cat_plat, $news_cat, $website, $setting;
    $tpl_info['idx'] = "user_group_" . ($method == "list" ? "list" : "input");
    $tpl_tmp = $mystep->getInstance("MyTpl", $tpl_info);
    if ($method == "list") {
        $db->select($setting['db']['pre'] . "user_group", "*", "", array("order" => "group_id"));
        while ($record = $db->GetRS()) {
            HtmlTrans(&$record);
            if ($record['power_func'] == "all") {
                $record['power_func'] = $setting['language']['admin_user_group_power_all'];
            } elseif ($record['power_func'] == "") {
                $record['power_func'] = $setting['language']['admin_user_group_power_none'];
            } else {
                $thePowerFunc = explode(",", $record['power_func']);
                $record['power_func'] = "";
                $max_count = count($thePowerFunc);
                for ($i = 0; $i < $max_count; $i++) {
                    $theFunc = getParaInfo("admin_cat_plat", "id", $thePowerFunc[$i]);
                    $record['power_func'] .= $theFunc['name'] . ", ";
                }
                $record['power_func'] = substr($record['power_func'], 0, -2);
            }
            if ($record['power_cat'] == "all") {
                $record['power_cat'] = $setting['language']['admin_user_group_cat_all'];
            } elseif ($record['power_cat'] == "") {
                $record['power_cat'] = $setting['language']['admin_user_group_cat_none'];
            } else {
                $thePowerCata = explode(",", $record['power_cat']);
                $record['power_cat'] = "";
                $max_count = count($thePowerCata);
                for ($i = 0; $i < $max_count; $i++) {
                    $theCata = getParaInfo("news_cat", "cat_id", $thePowerCata[$i]);
                    $record['power_cat'] .= $theCata['cat_name'] . ", ";
                }
                $record['power_cat'] = substr($record['power_cat'], 0, -2);
            }
            if ($record['power_web'] == "all") {
                $record['power_web'] = $setting['language']['admin_user_group_web_all'];
            } elseif ($record['power_web'] == "") {
                $record['power_web'] = $setting['language']['admin_user_group_web_none'];
            } else {
                $thePowerWeb = explode(",", $record['power_web']);
                $record['power_web'] = "";
                $max_count = count($thePowerWeb);
                for ($i = 0; $i < $max_count; $i++) {
                    $theWeb = getParaInfo("website", "web_id", $thePowerWeb[$i]);
                    $record['power_web'] .= $theWeb['name'] . ", ";
                }
                $record['power_web'] = substr($record['power_web'], 0, -2);
            }
            $tpl_tmp->Set_Loop('record', $record);
        }
        $tpl_tmp->Set_Variable('title', $setting['language']['admin_user_group_title']);
    } else {
        $tpl_tmp->Set_Variable('title', $method == "add" ? $setting['language']['admin_user_group_add'] : $setting['language']['admin_user_group_edit']);
        if ($method == "edit") {
            $record = $db->record($setting['db']['pre'] . "user_group", "*", array("group_id", "n=", $group_id));
            if ($record === false) {
                $tpl->Set_Variable('main', showInfo($setting['language']['admin_user_group_error'], 0));
                $mystep->show($tpl);
                $mystep->pageEnd(false);
            }
        } else {
            $record['group_id'] = 0;
            $record['group_name'] = "";
            $record['power_func'] = "";
            $record['power_cat'] = "";
            $record['power_web'] = "";
        }
        $tpl_tmp->Set_Variables($record);
        $tpl_tmp->Set_Variable('power_web_all_checked', $record['power_web'] == "all" ? "checked" : "");
        $max_count = count($website);
        for ($i = 0; $i < $max_count; $i++) {
            $tpl_tmp->Set_Loop('power_web', array("web_id" => $website[$i]['web_id'], "name" => $website[$i]['name'], "checked" => strpos("," . $record['power_web'] . ",", "," . $website[$i]['web_id'] . ",") !== false ? "checked" : ""));
        }
        $tpl_tmp->Set_Variable('power_func_all_checked', $record['power_func'] == "all" ? "checked" : "");
        $max_count = count($admin_cat);
        for ($i = 0; $i < $max_count; $i++) {
            $tpl_tmp->Set_Loop('power_func', array("key" => $admin_cat[$i]['id'], "value" => $admin_cat[$i]['name'], "pid" => $admin_cat[$i]['pid'], "checked" => strpos("," . $record['power_func'] . ",", "," . $admin_cat[$i]['id'] . ",") !== false ? "checked" : ""));
            if (isset($admin_cat[$i]['sub'])) {
                $max_count1 = count($admin_cat[$i]['sub']);
                for ($j = 0; $j < $max_count1; $j++) {
                    $tpl_tmp->Set_Loop('power_func', array("key" => $admin_cat[$i]['sub'][$j]['id'], "value" => ($j + 1 == count($admin_cat[$i]['sub']) ? "©¸ " : "©À ") . $admin_cat[$i]['sub'][$j]['name'], "pid" => $admin_cat[$i]['sub'][$j]['pid'], "checked" => strpos("," . $record['power_func'] . ",", "," . $admin_cat[$i]['sub'][$j]['id'] . ",") !== false ? "checked" : ""));
                }
            }
        }
        $tpl_tmp->Set_Variable('power_cat_all_checked', $record['power_cat'] == "all" ? "checked" : "");
        $max_count = count($news_cat);
        for ($i = 0; $i < $max_count; $i++) {
            $news_cat[$i]['cat_name'] = (isset($news_cat[$i + 1]) && $news_cat[$i + 1]['cat_layer'] == $news_cat[$i]['cat_layer'] ? "©À " : "©¸ ") . $news_cat[$i]['cat_name'];
            for ($j = 1; $j < $news_cat[$i]['cat_layer']; $j++) {
                $news_cat[$i]['cat_name'] = " &nbsp;" . $news_cat[$i]['cat_name'];
            }
            $news_cat[$i]['cat_name'] = preg_replace("/^©À /", "", preg_replace("/^©¸ /", "", $news_cat[$i]['cat_name']));
            $news_cat[$i]['checked'] = strpos("," . $record['power_cat'] . ",", "," . $news_cat[$i]['cat_id'] . ",") !== false ? "checked" : "";
            $tpl_tmp->Set_Loop('power_cat', $news_cat[$i]);
        }
        $tpl_tmp->Set_Variable('method', $method);
        $tpl_tmp->Set_Variable('back_url', $req->getServer("HTTP_REFERER"));
//.........这里部分代码省略.........
开发者ID:laiello,项目名称:mystep-cms,代码行数:101,代码来源:user_group.php


注:本文中的showInfo函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。