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


PHP page::link方法代码示例

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


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

 public static function page_control_panel()
 {
     $a = array();
     $a[] = page::link("admin/modules", "Modules");
     $a[] = page::link("admin/themes", "Themes");
     $a[] = page::link("admin/permissions", "Permissions");
     return theme::t_list($a);
 }
开发者ID:decima,项目名称:M2-platine,代码行数:8,代码来源:admin.module.php

示例3: list_of_menus

 public static function list_of_menus()
 {
     $array = array();
     foreach (self::get_all_menus() as $list) {
         $array[] = page::link($list->url, $list->name);
     }
     return "<h3>Links</h3>" . theme::t_list($array);
 }
开发者ID:decima,项目名称:M2-platine,代码行数:8,代码来源:menu.module.php

示例4: home

function home()
{
    $out = "there is actually no content. enable content module to manage this page";
    if (module_manager::is_enabled("content")) {
        $out = "";
        $nodes = content_database::node_load_all();
        $b = false;
        if (count($nodes) > 0) {
            page::title("Home");
            foreach ($nodes as $node) {
                if (content::node_access_read($node->nid)) {
                    $b = true;
                    $out .= "<div class='post'>";
                    if ($node->title != null) {
                        $out .= "<div class='title'>";
                        $out .= page::link("node/" . $node->nid, $node->title);
                        $out .= "</div>";
                    }
                    if ($node->description != null) {
                        $out .= "<div class='content'>";
                        $node->description = utf8_decode($node->description);
                        if (strlen($node->description) > 200) {
                            $out .= substr($node->description, 0, 200) . "... " . page::link("node/" . $node->nid, t("+ read more"));
                        } else {
                            $out .= $node->description;
                        }
                        $out .= "</div>";
                    }
                    $out .= "<div class='author'>";
                    $out .= "<hr/>";
                    $out .= content_page::post_author_date($node->uid, $node->author, $node->date);
                    $out .= "<hr/>";
                    $out .= "</div>";
                    $out .= "</div>";
                }
            }
        } else {
            $out .= "there is no content, please add a content first.";
        }
    }
    return $b ? $out : "there is no content.";
}
开发者ID:decima,项目名称:M2-platine,代码行数:42,代码来源:home.php

示例5: post_author_date

 public static function post_author_date($uid, $author, $date)
 {
     $u = page::link("user/" . $uid, $author);
     $k = print_date($date);
     return t("posted by %user on %date", array("%user" => $u, "%date" => $k));
 }
开发者ID:decima,项目名称:M2-platine,代码行数:6,代码来源:content_page.php

示例6: 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

示例7: 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

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