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


PHP ctrl_users::GetUserDetail方法代码示例

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


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

示例1: GetModuleList

 /**
  * Gets the module list as an array from a given category ID.
  * @author Bobby Allen (ballen@bobbyallen.me)
  * @global db_driver $zdbh The ZPX database handle.
  * @param int $catid The name of the module category to get the list of modules from.
  * @return array Array containing the list of modules for the category ID supplied.
  */
 static function GetModuleList($catid = "")
 {
     global $zdbh;
     $user = ctrl_users::GetUserDetail();
     if ($catid == "") {
         $sql = "SELECT * FROM x_modules";
     } else {
         $sql = "SELECT * FROM x_modules WHERE mo_category_fk = :catid AND mo_type_en = 'user' AND mo_enabled_en = 'true' ORDER BY mo_name_vc";
     }
     $numrows = $zdbh->prepare($sql);
     $numrows->bindParam(':catid', $catid);
     $numrows->execute();
     if ($numrows->fetchColumn() != 0) {
         $sql = $zdbh->prepare($sql);
         $sql->bindParam(':catid', $catid);
         $res = array();
         $sql->execute();
         while ($row = $sql->fetch()) {
             if (ctrl_groups::CheckGroupModulePermissions($user['usergroupid'], $row['mo_id_pk'])) {
                 array_push($res, array('mo_id_pk' => $row['mo_id_pk'], 'mo_category_fk' => $row['mo_category_fk'], 'mo_name_vc' => $row['mo_name_vc'], 'mo_version_in' => $row['mo_version_in'], 'mo_folder_vc' => $row['mo_folder_vc'], 'mo_type_en' => $row['mo_type_en'], 'mo_desc_tx' => $row['mo_desc_tx'], 'mo_installed_ts' => $row['mo_installed_ts'], 'mo_enabled_en' => $row['mo_enabled_en'], 'mo_updatever_vc' => $row['mo_updatever_vc'], 'mo_updateurl_tx' => $row['mo_updateurl_tx']));
             }
         }
         return $res;
     } else {
         return false;
     }
 }
开发者ID:BIGGANI,项目名称:zpanelx,代码行数:34,代码来源:moduleloader.class.php

示例2: Init

 /**
  * Get the latest requests and updates the values avaliable to the model/view.
  * @author Bobby Allen (ballen@bobbyallen.me)
  */
 public function Init()
 {
     //Set class varables
     $this->vars_get = array($_GET);
     $this->vars_post = array($_POST);
     $this->vars_session = array($_SESSION);
     $this->vars_cookie = array($_COOKIE);
     //Here we get the users information
     $user = ctrl_users::GetUserDetail();
     if (!isset($this->vars_session[0]['zpuid'])) {
         ui_module::GetLoginTemplate();
     }
     if (isset($this->vars_get[0]['module'])) {
         ui_module::getModule($this->GetCurrentModule());
     }
     if (isset($this->vars_get[0]['action'])) {
         if (ctrl_groups::CheckGroupModulePermissions($user['usergroupid'], ui_module::GetModuleID())) {
             if (class_exists('module_controller', FALSE) && method_exists('module_controller', 'do' . $this->vars_get[0]['action'])) {
                 call_user_func(array('module_controller', 'do' . $this->vars_get[0]['action']));
             } else {
                 echo ui_sysmessage::shout("No 'do" . runtime_xss::xssClean($this->vars_get[0]['action']) . "' class exists - Please create it to enable controller actions and runtime placeholders within your module.");
             }
         }
     }
     return;
 }
开发者ID:bbspike,项目名称:sentora-core,代码行数:30,代码来源:controller.class.php

示例3: getConfig

 static function getConfig()
 {
     global $zdbh;
     $currentuser = ctrl_users::GetUserDetail();
     $sql = "SELECT * FROM x_settings WHERE so_module_vc=:name AND so_usereditable_en = 'true' ORDER BY so_cleanname_vc";
     //$numrows = $zdbh->query($sql);
     $name = ui_module::GetModuleName();
     $numrows = $zdbh->prepare($sql);
     $numrows->bindParam(':name', $name);
     $numrows->execute();
     if ($numrows->fetchColumn() != 0) {
         $sql = $zdbh->prepare($sql);
         $sql->bindParam(':name', $name);
         $res = array();
         $sql->execute();
         while ($rowmailsettings = $sql->fetch()) {
             if (ctrl_options::CheckForPredefinedOptions($rowmailsettings['so_defvalues_tx'])) {
                 $fieldhtml = ctrl_options::OuputSettingMenuField($rowmailsettings['so_name_vc'], $rowmailsettings['so_defvalues_tx'], $rowmailsettings['so_value_tx']);
             } else {
                 $fieldhtml = ctrl_options::OutputSettingTextArea($rowmailsettings['so_name_vc'], $rowmailsettings['so_value_tx']);
             }
             array_push($res, array('cleanname' => ui_language::translate($rowmailsettings['so_cleanname_vc']), 'name' => $rowmailsettings['so_name_vc'], 'description' => ui_language::translate($rowmailsettings['so_desc_tx']), 'value' => $rowmailsettings['so_value_tx'], 'fieldhtml' => $fieldhtml));
         }
         return $res;
     } else {
         return false;
     }
 }
开发者ID:bbspike,项目名称:sentora-core,代码行数:28,代码来源:controller.ext.php

示例4: Template

 public static function Template()
 {
     $currentuser = ctrl_users::GetUserDetail();
     $bandwidthquota = $currentuser['bandwidthquota'];
     $bandwidth = ctrl_users::GetQuotaUsages('bandwidth', $currentuser['userid']);
     if ($bandwidthquota == 0) {
         return '<div class="progress progress-striped"><div class="progress-bar progress-bar-success" style="width: 0%"></div></div>';
     } else {
         if (fs_director::CheckForEmptyValue($bandwidth)) {
             $bandwidth = 0;
         }
         $percent = round($bandwidth / $bandwidthquota * 100, 0);
         if ($percent >= 75) {
             $bar = 'danger';
         } else {
             $bar = 'success';
         }
         if ($percent >= 10) {
             $showpercent = $percent . '%';
         } else {
             $showpercent = '';
         }
         return '<div class="progress progress-striped"><div class="progress-bar progress-bar-' . $bar . '" style="width: ' . $percent . '%">' . $showpercent . '</div></div>';
     }
 }
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:25,代码来源:progbarbandwidth.class.php

示例5: translate

 /**
  * Used to translate a text string into the language preference of the user.
  * @author Russell Skinner (rskinner@zpanelcp.com)
  * @global db_driver $zdbh The ZPX database handle.
  * @param $message The string to translate.
  * @return string The transalated string.
  */
 static function translate($message)
 {
     global $zdbh;
     $message = addslashes($message);
     $currentuser = ctrl_users::GetUserDetail();
     $lang = $currentuser['language'];
     $column_names = self::GetColumnNames('x_translations');
     foreach ($column_names as $column_name) {
         $columnNameClean = $zdbh->mysqlRealEscapeString($column_name);
         $sql = $zdbh->prepare("SELECT * FROM x_translations WHERE " . $columnNameClean . " LIKE :message");
         $sql->bindParam(':message', $message);
         $sql->execute();
         $result = $sql->fetch();
         if ($result) {
             if (!fs_director::CheckForEmptyValue($result['tr_' . $lang . '_tx'])) {
                 return $result['tr_' . $lang . '_tx'];
             } else {
                 return stripslashes($message);
             }
         }
     }
     if (!fs_director::CheckForEmptyValue($message) && $lang == "en") {
         $sql = $zdbh->prepare("INSERT INTO x_translations (tr_en_tx) VALUES (:message)");
         $sql->bindParam(':message', $message);
         $sql->execute();
     }
     return stripslashes($message);
 }
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:35,代码来源:language.class-orig.php

示例6: Template

 public static function Template()
 {
     $active = isset($_REQUEST['module']) ? '' : 'class="active"';
     $line = '<li ' . $active . '><a href="."><: Home :></a></li>';
     $modcats = ui_moduleloader::GetModuleCats();
     rsort($modcats);
     foreach ($modcats as $modcat) {
         $shortName = $modcat['mc_name_vc'];
         switch ($shortName) {
             case 'Account Information':
                 $shortName = 'Account';
                 break;
             case 'Server Admin':
                 $shortName = 'Admin';
                 break;
             case 'Database Management':
                 $shortName = 'Database';
                 break;
             case 'Domain Management':
                 $shortName = 'Domain';
                 break;
             case 'File Management':
                 $shortName = 'File';
                 break;
             case 'Server Admin':
                 $shortName = 'Server';
                 break;
         }
         $shortName = '<: ' . $shortName . ' :>';
         $mods = ui_moduleloader::GetModuleList($modcat['mc_id_pk']);
         if (count($mods) > 0) {
             $line .= '<li class="dropdown">';
             // IF Account, show Gravatar Image
             if ($shortName == '<: Account :>') {
                 $currentuser = ctrl_users::GetUserDetail();
                 $image = self::get_gravatar($currentuser['email'], 22, 'mm', 'g', true);
                 $line .= '<a href="#" class="dropdown-toggle" data-toggle="dropdown">' . $image . ' ' . $shortName . ' <b class="caret"></b></a>';
             } else {
                 $line .= '<a href="#" class="dropdown-toggle" data-toggle="dropdown">' . $shortName . ' <b class="caret"></b></a>';
             }
             $line .= '<ul class="dropdown-menu">';
             foreach ($mods as $mod) {
                 $class_name = str_replace(array(' ', '_'), '-', strtolower($mod['mo_folder_vc']));
                 if (isset($_GET['module']) && $_GET['module'] == $mod['mo_folder_vc']) {
                     $line .= '<li class="active">';
                 } else {
                     $line .= '<li>';
                 }
                 $line .= '<a href="?module=' . $mod['mo_folder_vc'] . '"><i class="icon-' . $class_name . '"></i> <: ' . $mod['mo_name_vc'] . ' :></a></li>';
             }
             // If Account tab, show Logout Menu Item
             if ($shortName == '<: Account :>') {
                 $line .= '<li><a href="?logout"><i class="icon-phpinfo"></i> Logout</a></li>';
             }
             $line .= '</ul></li>';
         }
     }
     return $line;
 }
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:59,代码来源:modulelistznavbar.class.php

示例7: Template

 public static function Template()
 {
     $currentuser = ctrl_users::GetUserDetail(ctrl_auth::CurrentUserID());
     if ($currentuser['lastlogon']) {
         return date(ctrl_options::GetSystemOption('sentora_df'), $currentuser['lastlogon']);
     } else {
         return "<: Never :>";
     }
 }
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:9,代码来源:lastlogon.class.php

示例8: Template

 public static function Template()
 {
     $currentuser = ctrl_users::GetUserDetail();
     if ($currentuser['bandwidthquota'] == 0) {
         $bandwidthquota = '<: Unlimited :>';
     } else {
         $bandwidthquota = fs_director::ShowHumanFileSize($currentuser['bandwidthquota']);
     }
     return $bandwidthquota;
 }
开发者ID:bbspike,项目名称:sentora-core,代码行数:10,代码来源:quotabandwidth.class.php

示例9: CheckModuleExists

 /**
  * Checks that the module exists.
  * @author Bobby Allen (ballen@bobbyallen.me)
  * @param string $name Name of the module to check that exists.
  * @return boolean
  */
 static function CheckModuleExists($name)
 {
     $user = ctrl_users::GetUserDetail();
     if (file_exists("modules/" . $name . "/module.zpm")) {
         if (ctrl_groups::CheckGroupModulePermissions($user['usergroupid'], self::GetModuleID())) {
             return true;
         }
     }
     return false;
 }
开发者ID:BIGGANI,项目名称:zpanelx,代码行数:16,代码来源:module.class.php

示例10: Template

 public static function Template()
 {
     $currentuser = ctrl_users::GetUserDetail();
     $subdomainsquota = $currentuser['subdomainquota'];
     if ($subdomainsquota < 0) {
         return '&#8734;';
     } else {
         return $subdomainsquota;
     }
 }
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:10,代码来源:totalsubdomains.class.php

示例11: Template

 public static function Template()
 {
     $user = ctrl_users::GetUserDetail();
     if (!fs_director::CheckForEmptyValue(fs_director::CheckForEmptyValue($user['usercss']))) {
         $retval = "etc/styles/" . ui_template::GetUserTemplate() . "/css/default.css";
     } else {
         $retval = "etc/styles/" . ui_template::GetUserTemplate() . "/css/" . $user['usercss'] . ".css";
     }
     return $retval;
 }
开发者ID:Boter,项目名称:madmin-core,代码行数:10,代码来源:csspath.class.php

示例12: Template

 public static function Template()
 {
     $currentuser = ctrl_users::GetUserDetail();
     $forwardersquota = $currentuser['forwardersquota'];
     if ($forwardersquota < 0) {
         return '&#8734;';
     } else {
         return $forwardersquota;
     }
 }
开发者ID:TGates71,项目名称:Sentora-Windows-Upgrade,代码行数:10,代码来源:totalforwarders.class.php

示例13: doUpdateMessage

 static function doUpdateMessage()
 {
     global $controller;
     runtime_csfr::Protect();
     $currentuser = ctrl_users::GetUserDetail();
     $formvars = $controller->GetAllControllerRequests('FORM');
     self::ExectuteUpdateNotice($currentuser['userid'], $formvars['inNotice']);
     header("location: ./?module=" . $controller->GetCurrentModule() . "&saved=true");
     exit;
 }
开发者ID:BIGGANI,项目名称:zpanelx,代码行数:10,代码来源:controller.ext.php

示例14: Template

 public static function Template()
 {
     global $controller;
     $currentuser = ctrl_users::GetUserDetail();
     $domain = ctrl_users::GetUserDomains($currentuser['userid'], 3);
     if ($domain != 0) {
         return (string) $domain;
     }
     return (string) 0;
 }
开发者ID:BIGGANI,项目名称:zpanelx,代码行数:10,代码来源:parkeddomains.class.php

示例15: GetUserTemplate

 /**
  * Returns the name (folder name) of the template that should be used for the current user.
  * @author Bobby Allen (ballen@bobbyallen.me)
  * @return string The template name.
  */
 static function GetUserTemplate()
 {
     $user = ctrl_users::GetUserDetail();
     if (fs_director::CheckForEmptyValue($user['usertheme'])) {
         # Lets use the reseller's theme they have setup!
         $reseller = ctrl_users::GetUserDetail($user['resellerid']);
         return $reseller['usertheme'];
     } else {
         return $user['usertheme'];
     }
 }
开发者ID:Boter,项目名称:madmin-core,代码行数:16,代码来源:template.class.php


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