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


PHP templates::parsePHPModules方法代码示例

本文整理汇总了PHP中templates::parsePHPModules方法的典型用法代码示例。如果您正苦于以下问题:PHP templates::parsePHPModules方法的具体用法?PHP templates::parsePHPModules怎么用?PHP templates::parsePHPModules使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在templates的用法示例。


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

示例1: load_modules_list

function load_modules_list()
{
    $tpl = new templates();
    $array = $tpl->parsePHPModules();
    $page = CurrentPageName();
    $data = array();
    $data['page'] = 1;
    $data['total'] = $total;
    $data['rows'] = array();
    $c = 0;
    if ($_POST["query"] != null) {
        $search = $_POST["query"];
        $search = str_replace(".", "\\.", $search);
        $search = str_replace("*", ".*?", $search);
    }
    if ($_POST["sortorder"] == "asc") {
        ksort($array);
    } else {
        krsort($array);
    }
    while (list($module, $array_f) = each($array)) {
        if ($search != null) {
            if (!preg_match("#{$search}#", $module)) {
                continue;
            }
        }
        $html = array();
        if (is_array($array_f)) {
            while (list($a, $b) = each($array_f)) {
                if (is_array($b)) {
                    while (list($c, $d) = each($b)) {
                        //$html[]="<br><span style='font-size:11px'><strong>$c</strong>:$d</span>";
                    }
                } else {
                    $html[] = "<br><span style='font-size:11px'><strong>{$a}</strong>:{$b}</span>";
                }
            }
        }
        $c++;
        $data['rows'][] = array('id' => $module, 'cell' => array("<img src='img/arrow-right-24.png'>", "<strong style='font-size:14px;style='color:{$color}'>{$href}{$module}</a></strong>" . @implode("", $html)));
    }
    $data['total'] = $c;
    echo json_encode($data);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:44,代码来源:phpconfig.php

示例2: buildPage


//.........这里部分代码省略.........
                $jquery = $filename;
                continue;
            }
            $js[] = "<script type=\"text/javascript\" src=\"/ressources/templates/{$template}/js/{$filename}\"></script>";
            $log[] = "<!-- {$filename} -->";
        }
        $lang2Link = "<a href=\"javascript:blur();\" OnClick=\"javascript:PopupLogonLang()\" style='color:{$LinkColor} !important'>{language}</a>";
        if (trim($GLOBALS["FixedLanguage"]) != null) {
            $lang2Link = null;
        }
        if ($jquery != null) {
            $jquery = "<script type=\"text/javascript\" src=\"/ressources/templates/{$template}/js/{$jquery}\"></script>";
        }
        $jslogon = "<script type=\"text/javascript\" src=\"logon.php?start=yes\"></script>";
        if ($ProductName != null) {
            $ProductName = "<input type='hidden' id='change-artica-name' value='{$ProductName}'>";
        }
        $jsArtica = $p->jsArtica();
        $js[] = "<script type=\"text/javascript\" language=\"javascript\" src=\"/js/jquery.reject.js\"></script>";
        $css[] = "<link href=\"/css/jquery.reject.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" >";
        $sock = new sockets();
        $TITLE_RESSOURCE = "ressources/templates/{$template}/TITLE";
        $favicon = $p->favicon($template);
        if ($GLOBALS["VERBOSE"]) {
            echo "replace tokens line:" . __LINE__ . "<br>\n";
        }
        if (is_file($TITLE_RESSOURCE)) {
            $title = @file_get_contents($TITLE_RESSOURCE);
            $title = str_replace("%server", $users->hostname, $title);
        } else {
            $title = $users->hostname;
        }
        $FPM = null;
        if (method_exists("templates", "parsePHPModules")) {
            $modules = $tpl2->parsePHPModules();
            $PHPVERSION = null;
            if (isset($modules["Core"]["PHP Version"])) {
                if (preg_match("#([0-9\\.]+)#", $modules["Core"]["PHP Version"], $re)) {
                    $PHPVERSION = "&nbsp;|&nbsp;PHP v.{$re[1]}";
                }
            }
            if (isset($modules["cgi-fcgi"]["php-fpm"])) {
                $FPM = " (PHP-FPM)";
            }
        }
        $WizardSavedSettings = unserialize(base64_decode($sock->GET_INFO("WizardSavedSettings")));
        $WizardSavedSettingsSend = $sock->GET_INFO("WizardSavedSettingsSend");
        $UnlockCompanyName = $sock->GET_INFO("UnlockCompanyName");
        if (!is_numeric($WizardSavedSettingsSend)) {
            $WizardSavedSettingsSend = 0;
        }
        $roundcube_uri = roundcube_uri($users);
        if ($roundcube_uri != null) {
            $miniadm = "<span style='color:{$LinkColor} !important'>&nbsp;|&nbsp;</span><a href=\"{$roundcube_uri}\" style='color:{$LinkColor};text-decoration:underline'>WebMail<a>&nbsp;";
        }
        $miniadm = $miniadm . "<span style='color:{$LinkColor}'>&nbsp;|&nbsp;</span><a href='miniadm.logon.php' style='color:{$LinkColor}'>End-User WebAccess</a>&nbsp;";
        if (!isset($WizardSavedSettings["company_name"])) {
            $WizardSavedSettings["company_name"] = null;
        }
        $company_name = $WizardSavedSettings["company_name"];
        if ($UnlockCompanyName != null) {
            $company_name = $UnlockCompanyName;
        }
        if ($company_name != null) {
            $company_name = "<center style='margin:5px;font-size:16px;padding:5px;\n\t\t\t\tborder-top:1px solid {$LinkColor};border-bottom:1px solid {$LinkColor}'>-&nbsp;{$company_name}&nbsp;-</center>";
        }
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:67,代码来源:logon.php


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