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


PHP Network::processSelectUI方法代码示例

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


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

示例1: processAdminUI

 public function processAdminUI()
 {
     $network = Network::processSelectUI('Statistics');
     if ($network) {
         $this->report_selected_networks[$network->getId()] = $network;
     } else {
         $networks = Security::getObjectsWithPermission(Permission::P('NETWORK_PERM_VIEW_STATISTICS'));
         foreach ($networks as $network) {
             $this->report_selected_networks[$network->getId()] = $network;
         }
     }
     $this->processDateRangeUI();
     $this->processSelectedNodesUI();
     $this->processDistinguishUsersByUI();
     $this->processSelectedUsersUI();
     $this->processSelectedReportsUI();
 }
开发者ID:soitun,项目名称:wifidog-auth,代码行数:17,代码来源:Statistics.php

示例2: processSelectUserUI

 /** Get the selected user, IF one was selected and is valid
  * @param $user_prefix A identifier provided by the programmer to recognise it's generated form
  * @param &$errMsg An error message will be appended to this is the username is not empty, but the user doesn't exist.
  * @return the User object, or null if the user is invalid or none was selected
  */
 static function processSelectUserUI($user_prefix, &$errMsg)
 {
     $object = null;
     try {
         $network = Network::processSelectUI($user_prefix);
         $name = "select_user_{$user_prefix}_username";
         if (!empty($_REQUEST[$name])) {
             $username = $_REQUEST[$name];
             return self::getUserByUsernameOrEmailAndOrigin($username, $network, $errMsg);
         } else {
             return null;
         }
     } catch (Exception $e) {
         return null;
     }
 }
开发者ID:soitun,项目名称:wifidog-auth,代码行数:21,代码来源:User.php

示例3: processAdminUI


//.........这里部分代码省略.........
     // Country
     $name = "node_" . $node_id . "_country";
     $this->setCountry($_REQUEST[$name]);
     // Public phone #
     $name = "node_" . $node_id . "_public_phone";
     $this->setTelephone($_REQUEST[$name]);
     // Public mail
     $name = "node_" . $node_id . "_public_email";
     $this->setEmail($_REQUEST[$name]);
     // Mass transit info
     $name = "node_" . $node_id . "_mass_transit_info";
     $this->setTransitInfo($_REQUEST[$name]);
     // GIS data
     // Get a geocoder for a given country
     if (!empty($_REQUEST['geocode_only'])) {
         if ($geocoder = AbstractGeocoder::getGeocoder($this->getCountry()) != null) {
             $geocoder = AbstractGeocoder::getGeocoder($this->getCountry());
         } else {
             $geocoder = AbstractGeocoder::getGeocoder('Earth');
         }
         if ($geocoder != null) {
             $geocoder->setCivicNumber($this->getCivicNumber());
             $geocoder->setStreetName($this->getStreetName());
             $geocoder->setCity($this->getCity());
             $geocoder->setProvince($this->getProvince());
             $geocoder->setPostalCode($this->getPostalCode());
             if ($geocoder->validateAddress() == true) {
                 if (($point = $geocoder->getGisLocation()) !== null) {
                     $this->setGisLocation($point);
                 } else {
                     $this->_warningMessage = _("It appears that the Geocoder could not be reached or could not geocode the given address.");
                 }
             } else {
                 $this->_warningMessage = _("You must enter a valid address.");
             }
         } else {
             $this->_warningMessage = _("Unable to create geocoder.  Are you sure you set the country?");
         }
     } else {
         // Use what has been set by the user.
         $gis_lat_name = "node_" . $node_id . "_gis_latitude";
         $gis_long_name = "node_" . $node_id . "_gis_longitude";
         $this->setGisLocation(new GisPoint($_REQUEST[$gis_lat_name], $_REQUEST[$gis_long_name], 0.0));
     }
     $name = "node_" . $node_id . "_show_on_map";
     $this->setShowOnMap(empty($_REQUEST[$name]) ? false : true);
     // Statistics
     $name = "node_{$this->id}_get_stats";
     if (!empty($_REQUEST[$name])) {
         header("Location: stats.php?" . urlencode("selected_nodes[]") . "=" . urlencode($this->getId()));
     }
     $permArray = null;
     $permArray[] = array(Permission::P('NETWORK_PERM_EDIT_ANY_NODE_CONFIG'), $network);
     $permArray[] = array(Permission::P('NODE_PERM_ALLOW_GENERATING_PUBLIC_STATS'), $this);
     if (Security::hasAnyPermission($permArray)) {
         if (isset($_REQUEST['allows_public_stats'])) {
             $this->setAllowsPublicStats($_REQUEST['allows_public_stats'] == 'on');
         } else {
             $this->setAllowsPublicStats(false);
         }
     }
     // Node configuration section
     $network = $this->getNetwork();
     // Deployment status
     $name = "node_" . $node_id . "_deployment_status";
     $this->setDeploymentStatus(self::processSelectDeploymentStatus($name));
     // Network selection
     $name = "node_" . $node_id . "_network_id";
     $new_network = Network::processSelectUI($name);
     if ($new_network != $this->getNetwork()) {
         Security::requirePermission(Permission::P('NETWORK_PERM_ADD_NODE'), $new_network);
         $this->setNetwork($new_network);
     }
     //  is_splash_only_node
     if ($network->getSplashOnlyNodesAllowed()) {
         $name = "node_" . $node_id . "_is_splash_only_node";
         $this->setIsConfiguredSplashOnly(empty($_REQUEST[$name]) ? false : true);
     }
     // custom_portal_redirect_url
     if ($network->getCustomPortalRedirectAllowed()) {
         $name = "node_" . $node_id . "_custom_portal_redirect_url";
         $this->setCustomPortalRedirectUrl($_REQUEST[$name]);
     }
     // allow_original_URL_redirect
     if ($network->getPortalOriginalUrlAllowed()) {
         $name = "node_" . $node_id . "_allow_original_URL_redirect";
         $this->setPortalOriginalUrlAllowed(empty($_REQUEST[$name]) ? false : true);
     }
     // End Node configuration section
     parent::processGraphAdminUI($errMsg, $network);
     if (!empty($errMsg)) {
         echo $errMsg;
         $errMsg = null;
     }
     // Access rights
     Stakeholder::processAssignStakeholdersUI($this, $errMsg);
     if (!empty($errMsg)) {
         echo $errMsg;
     }
 }
开发者ID:cnlangzi,项目名称:wifidog-auth,代码行数:101,代码来源:Node.php

示例4: processLoginUI

 /**
  * Process the login interface
  */
 public static function processLoginUI(&$errmsg = null)
 {
     if (!empty($_REQUEST["login_form_submit"])) {
         if (isset($_REQUEST["user_id"])) {
             $username = User::getObject($_REQUEST["user_id"])->getUsername();
         } else {
             if (isset($_REQUEST["username"])) {
                 $username = $_REQUEST["username"];
             }
         }
         if (isset($_REQUEST["password"])) {
             $password = $_REQUEST["password"];
         }
         // Authenticating the user through the selected auth source.
         $network = Network::processSelectUI('auth_source');
         $user = $network->getAuthenticator()->login($username, $password, $errmsg);
         self::$_loginLastError = $errmsg;
     }
 }
开发者ID:soitun,项目名称:wifidog-auth,代码行数:22,代码来源:Authenticator.php

示例5: processCreateNewObjectUI

 /**
  * Process the new object interface.
  *
  * Will return the new object if the user has the credentials and the form was fully filled.
  * @return the node object or null if no new node was created.
  */
 public static function processCreateNewObjectUI()
 {
     // Init values
     $retval = null;
     $name = "new_node_group_name";
     if (!empty($_REQUEST[$name])) {
         $ng_name = $_REQUEST[$name];
     } else {
         $ng_name = null;
     }
     $name = "new_node_group_network_id";
     if (!empty($_REQUEST[$name])) {
         $network = Network::getObject($_REQUEST[$name]);
     } else {
         $network = Network::processSelectUI('new_node_group');
     }
     if ($network) {
         Security::requirePermission(Permission::P('NETWORK_PERM_ADD_NODEGROUP'), $network);
         $retval = self::createNewObject($ng_name, $network);
     }
     return $retval;
 }
开发者ID:cnlangzi,项目名称:wifidog-auth,代码行数:28,代码来源:NodeGroup.php

示例6: processAdminUI

 /**
  * Process admin interface of this object
  *
  * @return void
  */
 public function processAdminUI()
 {
     require_once 'classes/User.php';
     Security::requirePermission(Permission::P('SERVER_PERM_EDIT_ANY_VIRTUAL_HOST'), Server::getServer());
     // hostname
     $name = "server_" . $this->getId() . "_hostname";
     $this->setHostname($_REQUEST[$name]);
     //  default_network
     $name = "vhost_" . $this->getId() . "_default_network";
     $this->setDefaultNetwork(Network::processSelectUI($name));
     //  is_default_server
     $name = "vhost_" . $this->getId() . "_is_default_vhost";
     if (!empty($_REQUEST[$name]) && $_REQUEST[$name] == 'on') {
         $server = Server::getServer();
         $server->setDefaultVirtualHost($this);
     }
     //  ssl_available
     $name = "server_" . $this->getId() . "_ssl_available";
     if (!empty($_REQUEST[$name]) && $_REQUEST[$name] == 'on') {
         $this->setSSLAvailable(true);
     } else {
         $this->setSSLAvailable(false);
     }
     // gmaps_api_key
     if (defined('GMAPS_HOTSPOTS_MAP_ENABLED') && GMAPS_HOTSPOTS_MAP_ENABLED == true) {
         $name = "server_" . $this->getId() . "_gmaps_api_key";
         $this->setGoogleAPIKey($_REQUEST[$name]);
     }
 }
开发者ID:cnlangzi,项目名称:wifidog-auth,代码行数:34,代码来源:VirtualHost.php


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