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


PHP Server::currentPageName方法代码示例

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


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

示例1: getNavigationHTML

 private function getNavigationHTML()
 {
     $login = $this->getLoginInfo();
     $text = "<div class=\"logininfo\">{$login}</div>";
     if ($this->modal) {
         return $text;
     }
     $level = Session::defaultPosition();
     global $GLOBAL_NAVIGATION;
     $name = Server::currentPageName();
     foreach ($GLOBAL_NAVIGATION as $link => $array) {
         $disp = $array[0];
         $imageFile = "images/nav/" . substr($link, 0, -4) . ".png";
         if (file_exists(realpath($imageFile))) {
             $imageHtml = "<img class=\"largeicon\" src=\"{$imageFile}\" />&nbsp;";
         } else {
             $imageHtml = '';
         }
         if ($level >= $array[1]) {
             if ($link == $name) {
                 $text .= "<a class=navsel href=\"{$link}\">";
             } else {
                 $text .= "<a class=nav href=\"{$link}\">";
             }
             $text .= $imageHtml . $disp . "</a>";
         }
     }
     return $text;
 }
开发者ID:rjwalsh88,项目名称:BawkApp,代码行数:29,代码来源:UIPage.php

示例2: __construct

 /**
  * Constructs the UIForm.
  *
  * $name : Form name. Currently not used for anything important.
  * $method : Form method. GET by default
  * $action : Form action. Current page by default
  */
 public function __construct($name, $method = 'GET', $action = null)
 {
     parent::__construct();
     if ($action == null) {
         $action = Server::currentPageName();
     }
     $this->method = $method;
     $this->action = $action;
     $this->name = $name;
     $this->encoding = '';
     $this->hasDatePicker = false;
     $this->hasMultiSelect = false;
     require_js('validate');
     require_css('form');
 }
开发者ID:rjwalsh88,项目名称:BawkApp,代码行数:22,代码来源:UIForm.php

示例3: __construct

 /**
  * $cells : cells of this table row
  * $name : name of the form (arbitrary at this point)
  * $buttonText : text of the confirm button
  * $buttonIconName : icon name of the confirm button, defaults to the buttonText
  * $method : form method, default GET
  * $action : form action, default current page
  */
 public function __construct($cells, $name, $buttonText, $buttonIconName = null, $method = 'GET', $action = null, $confirmmessage = null)
 {
     parent::__construct($cells);
     if ($action == null) {
         $action = Server::currentPageName();
     }
     $this->method = $method;
     $this->action = $action;
     $this->name = $name . self::nextID();
     if ($confirmmessage) {
         $js = "doConfirm('" . addslashes(htmlspecialchars($confirmmessage)) . "', document." . $this->name . ");";
     } else {
         $js = $this->name . ".submit();";
     }
     if (!$buttonIconName) {
         $buttonIconName = $buttonText;
     }
     $submitButton = UIButton::javascriptButton($buttonText, $js, $buttonIconName);
     $this->addButton($submitButton);
     require_js('validate');
     require_css('form');
 }
开发者ID:rjwalsh88,项目名称:BawkApp,代码行数:30,代码来源:UITable.php

示例4: __construct

 /**
  * Constructor.
  *
  * $name : raw button text
  * $message : dialog message to ask user
  * $formParams : associate array of form parameters
  * $icon : name of the icon: ~/images/icons/button_[$icon].png. Uses $name if not present
  * $hideText : true to have a text-less round button
  * $formMethod : the method of the form, POST by default
  * $formAction : the action of the form, current page by default
  */
 public function __construct($name, $message, $formParams, $icon = null, $hideText = false, $formMethod = 'POST', $formAction = null)
 {
     parent::__construct($name, '#', "doConfirm('" . js_reencode($message) . "', document." . ($id = 'confirm' . self::nextConfirmID()) . ");", $icon, $hideText);
     if ($formAction == null) {
         $formAction = Server::currentPageName();
     }
     $this->form = "<form class=inline name=\"{$id}\" method=\"{$formMethod}\" action=\"{$formAction}\">";
     foreach ($formParams as $name => $value) {
         $valueEsc = inputize($value);
         $this->form .= "<input type=\"hidden\" name=\"{$name}\" value=\"{$valueEsc}\" />";
     }
     $this->form .= "</form>";
     require_js('confirm');
     require_css('form');
 }
开发者ID:rjwalsh88,项目名称:BawkApp,代码行数:26,代码来源:UIButton.php


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