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


PHP page::url方法代码示例

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


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

示例1: permissions_page

 public static function permissions_page()
 {
     page::title("Permissions");
     $out = page::link("admin/permissions/scan", "scan for more permissions");
     $out .= "<form method='post' action='" . page::url("admin/permissions/update") . "'>";
     $array = array();
     $header = array("permissions");
     $groups = user_access::get_all_roles();
     foreach ($groups as $g) {
         $header[] = $g->groupname;
     }
     $perms = permission::get_all_permissions();
     foreach ($perms as $p) {
         $t_array = array();
         $t_array[] = "<b>{$p->permission}</b> <i>{$p->description}</i>";
         foreach ($groups as $g) {
             $o = "<input type='checkbox' name='permissions[" . $p->permission . "][" . $g->gid . "]' ";
             if (user::has_permission($p->permission, $g->gid)) {
                 $o .= "checked";
             }
             $o .= "/>";
             $t_array[] = $o;
         }
         $array[] = $t_array;
     }
     $out .= theme::t_table($array, $header);
     $out .= "<input type='submit' value='update'/>";
     $out .= "</form>";
     return $out;
 }
开发者ID:decima,项目名称:M2-platine,代码行数:30,代码来源:user_ui.php

示例2: form_content

 public static function form_content($content_type, $nid = 0)
 {
     $content_type = content_database::load_node_type($content_type);
     if ($nid != 0) {
     } else {
         page::title("add new %node", array("%node" => $content_type->name));
     }
     $form = array();
     $form['action'] = page::url("node/adding/" . $content_type->type);
     $form['fields'] = array();
     if ($content_type->has_title) {
         $form['fields']['title'] = array("type" => "input", "label" => "title");
     }
     if ($content_type->has_body) {
         $form['fields']['body'] = array("type" => "text", "label" => "Body");
     }
     foreach ($content_type->fields as $field) {
         $fname = $field['field_machine_name'];
         $form["fields"][$fname] = array("label" => $field['field_name']);
         switch ($field["field_type"]) {
             case "TEXT" || "text":
                 $form["fields"][$fname]["type"] = "text";
                 break;
         }
     }
     $form["fields"]["submit"] = array("type" => "submit", "value" => "save");
     return theme::t_form($form);
 }
开发者ID:decima,项目名称:M2-platine,代码行数:28,代码来源:content_page.php

示例3: header_menu

 public static function header_menu($args)
 {
     $out = '<ul class="nav navbar-nav">';
     foreach ($args as $menu) {
         if (isset($menu['submenu'])) {
             $out .= "<li class='dropdown'>";
             $out .= "<a href=\"" . page::url($menu['url']) . "\" \n                    class=\"dropdown-toggle\" \n                    data-toggle=\"dropdown\">";
             $out .= $menu['name'];
             $out .= '<b class="caret caret-inverse"></b></a>
                 <ul class="dropdown-menu">';
             foreach ($menu['submenu'] as $submenu) {
                 $out .= "<li>" . page::link($submenu['url'], $submenu['name']) . "</li>";
             }
             $out .= "</ul></li>";
         } else {
             $out .= "<li>" . page::link($menu['url'], $menu['name']) . "</li>";
         }
     }
     $out .= "</ul>";
     return $out;
 }
开发者ID:decima,项目名称:M2-platine,代码行数:21,代码来源:theme.php

示例4: jQuery

*/
?>
            <div class="">
                <?php 
if (page::title() != NULL) {
    ?>
                    <h1 class="page_title"><?php 
    echo page::title();
    ?>
</h1>
                <?php 
}
?>
                <?php 
echo page::content();
?>
            </div>
        </div>
        <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
        <script src="<?php 
echo page::url("theme/united/js/jquery.js");
?>
"></script>
        <!-- Include all compiled plugins (below), or include individual files as needed -->
        <script src="<?php 
echo page::url("theme/united/js/bootstrap.min.js");
?>
"></script>
    </body>

</html>
开发者ID:decima,项目名称:M2-platine,代码行数:31,代码来源:page.php

示例5: theme_list

 public static function theme_list()
 {
     page::title("Themes");
     $array = array();
     $header = array("theme", "path", "action");
     $themes = theme::list_of_declared_themes();
     foreach ($themes as $theme) {
         $res = "";
         if ($theme->theme_enabled && !$theme->theme_default) {
             $res = page::link("admin/themes/" . $theme->theme_name . "/setdefault", "Set default");
             $res .= " / ";
             $res .= page::link("admin/themes/" . $theme->theme_name . "/disable", "disable");
         }
         if ($theme->theme_enabled && $theme->theme_default) {
             $res = "<big>default theme</big>";
         }
         if (!$theme->theme_enabled) {
             $res = page::link("admin/themes/" . $theme->theme_name . "/enable", "enable");
         }
         $array[] = array($theme->theme_name, "<small>" . $theme->theme_path . "</small>", $res);
     }
     $str = '  <a href="' . page::url("admin/themes/scan") . '">Scan for more Themes</a><br/>';
     $str .= theme::t_table($array, $header);
     return $str;
 }
开发者ID:decima,项目名称:M2-platine,代码行数:25,代码来源:theme.php

示例6: page_list_modules

 public static function page_list_modules()
 {
     page::title("Modules");
     $res = array();
     $head = array("module", "action");
     $modules = module_manager::list_of_declared_modules();
     foreach ($modules as $module) {
         $b = array();
         $b[0] = $module->module_name;
         $b[1] = "";
         if ($module->module_installed && !$module->module_enabled) {
             $b[1] .= page::link("admin/modules/" . $module->module_name . "/enable", "Enable");
             $b[1] .= " / ";
             $b[1] .= page::link("admin/modules/" . $module->module_name . "/uninstall", "Uninstall");
         }
         if ($module->module_installed && $module->module_enabled) {
             $b[1] .= page::link("admin/modules/" . $module->module_name . "/disable", "disable");
         }
         if (!$module->module_installed) {
             $b[1] .= page::link("admin/modules/" . $module->module_name . "/install", "install");
         }
         $res[] = $b;
     }
     $str = '  <a href="' . page::url("admin/modules/scan") . '">Scan for more modules</a><br/>';
     $str .= theme::t_table($res, $head);
     return $str;
 }
开发者ID:decima,项目名称:M2-platine,代码行数:27,代码来源:module_manager.php


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