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


PHP Manager::GetUserName方法代码示例

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


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

示例1: GetFindResults

 function GetFindResults(&$db, $post)
 {
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Manager/Language/{$MainLanguage}/HelpDesk.php";
     $returnArray = array();
     if (!empty($post['TicketId'])) {
         $db->Query("SELECT * FROM Z_HelpDeskTickets WHERE idx = '" . $post['TicketId'] . "'");
         array_push($returnArray, $db->GetRow());
     }
     if (!empty($post['memb___id'])) {
         $db->Query("SELECT * FROM Z_HelpDeskTickets WHERE memb___id = '" . $post['memb___id'] . "' ORDER BY idx DESC");
         while ($data = $db->GetRow()) {
             if (!in_array($data, $returnArray)) {
                 array_push($returnArray, $data);
             }
         }
     }
     if (!empty($post['starting_date']) && !empty($post['ending_date'])) {
         $starting_date = explode("/", $post['starting_date']);
         $starting_date = $starting_date[2] . "-" . $starting_date[1] . "-" . $starting_date[0];
         $ending_date = explode("/", $post['ending_date']);
         $ending_date = $ending_date[2] . "-" . $ending_date[1] . "-" . $ending_date[0] . " 23:59:59";
         $db->Query("SELECT * FROM Z_HelpDeskTickets WHERE created >= '{$starting_date}' AND created <= '{$ending_date}' ORDER BY created DESC");
         while ($data = $db->GetRow()) {
             if (!in_array($data, $returnArray)) {
                 array_push($returnArray, $data);
             }
         }
     }
     if (!empty($post['ip'])) {
         $db->Query("SELECT * FROM Z_HelpDeskTickets WHERE idx IN (SELECT ticket_idx FROM Z_HelpDeskMessages WHERE ip = '" . $post['ip'] . "') ORDER BY idx DESC");
         while ($data = $db->GetRow()) {
             if (!in_array($data, $returnArray)) {
                 array_push($returnArray, $data);
             }
         }
     }
     $dateClass = new Date();
     $managerClass = new Manager();
     $return = "\n\t\t<table class=\"HelpDeskSearchResultsTable\">\n\t\t<tr><th>{$HelpDeskMessage001}</th><th>{$HelpDeskMessage016}</th><th>{$HelpDeskMessage002}</th><th>{$HelpDeskMessage003}</th><th>{$HelpDeskMessage004}</th><th>{$HelpDeskMessage005}</th></tr><tbody>";
     foreach ($returnArray as $Key => $Value) {
         $return .= "\n\t\t\t<tr onclick=\"OpenTicket('" . $Value['idx'] . "')\" style=\"cursor:pointer\">\n\t\t\t <td align=\"center\"><strong>" . $Value['idx'] . "</strong></td>\n\t\t\t <td align=\"center\">" . $Value['memb___id'] . "</td>\n\t\t\t <td align=\"center\">" . $dateClass->DateFormat($Value['created']) . " " . $dateClass->TimeFormat($Value['created'], "h") . "</td>\n\t\t\t <td align=\"center\">" . $dateClass->DateFormat($Value['last_update']) . " " . $dateClass->TimeFormat($Value['last_update'], "h") . "</td>\n\t\t\t <td align=\"center\">";
         $UserName = $managerClass->GetUserName($Value['admin'], $db);
         if ($UserName == $_SESSION['ManagerName']) {
             $return .= "<strong>{$UserName}</strong>";
         } else {
             $return .= $UserName;
         }
         $return .= "</td>\n\t\t\t <td align=\"center\">" . $this->TicketStatus($Value['status']) . "</td>";
         $return .= "</tr>";
     }
     $return .= "</tbody></table>\n\t\t<script>\n\t\t\tfunction Go()\n\t\t\t{\n\t\t\t\t\$('.HelpDeskSearchResultsTable tbody tr:even').addClass('HelpDeskTicketRowEven');\n\t\t\t\t\$('.HelpDeskSearchResultsTable tbody tr:odd').addClass('HelpDeskTicketRowOdd');\n\t\t\t}\n\t\t\t\n\t\t\t\$(function()\n\t\t\t{\n\t\t\t\tsetTimeout(Go, 100);\n\t\t\t});\n\t\t</script>";
     return $return;
 }
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:54,代码来源:HelpDesk.class.php

示例2: ScheduledEvents

 function ScheduledEvents(&$db)
 {
     require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Date.class.php";
     $dateClass = new Date();
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Manager/Language/{$MainLanguage}/Events.php";
     require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Manager/System/Manager.class.php";
     $mn = new Manager();
     $db->Query("SELECT * FROM Z_Currencies ORDER BY idx");
     $NumCurrencies = $db->NumRows();
     $Currencies = array();
     for ($i = 0; $i < $NumCurrencies; $i++) {
         $Currencies[$i + 1] = $db->GetRow();
     }
     $db->Query("SELECT idx,title FROM Z_Events");
     while ($data = $db->GetRow()) {
         $EventNames[$data[0]] = $data[1];
     }
     $return = "\n\t\t<table class=\"BlockListTable\">\n        \t<tr>\n\t\t\t\t<th align=\"center\">{$EventsMessage027}</th>\n            \t<th align=\"center\">{$EventsMessage028}</th>\n            \t<th align=\"center\">{$EventsMessage029}</th>\n\t\t\t\t<th align=\"center\">{$EventsMessage040}</th>\n\t\t\t\t<th align=\"center\">{$EventsMessage031}</th>\n            \t<th align=\"center\"></th>\n            \t<th></th>\n          \t</tr>";
     $db->Query("SELECT * FROM Z_EventsSchedule WHERE winner IS NULL ORDER BY date ASC");
     $numrows = $db->NumRows();
     for ($i = 0; $i < $numrows; $i++) {
         $ScheduledEvents[$i] = $db->GetRow();
     }
     if (is_array($ScheduledEvents)) {
         foreach ($ScheduledEvents as $k => $v) {
             $getColor = "";
             if ($v['date'] < date("Y-m-d H:i:s")) {
                 $getColor = "style=\"color:#F00\"";
             }
             $disabled = "";
             if ($_SESSION['ManagerId'] != $v['by']) {
                 if ($mn->GetUserLevel($_SESSION['ManagerId'], $db) <= $mn->GetUserLevel($v['by'], $db)) {
                     $disabled = "disabled=\"disabled\"";
                 }
             }
             $Prizes = "";
             foreach ($Currencies as $Key => $Value) {
                 if ($v["currency" . $Key] > 0) {
                     $Prizes .= $v["currency" . $Key] . " " . $Value['name'] . "<br />";
                 }
             }
             $return .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"center\">" . $EventNames[$v['event']] . "</td>\n\t\t\t\t\t<td align=\"center\">" . $mn->GetUserName($v['by'], $db) . "</td>\n\t\t\t\t\t<td align=\"center\" {$getColor}>" . $dateClass->DateFormat($v['date']) . " " . $dateClass->TimeFormat($v['date'], "h") . "</td>\n\t\t\t\t\t<td align=\"center\">{$Prizes}</td>\n\t\t\t\t\t<td align=\"center\">\n\t\t\t\t\t\t<input type=\"text\" name=\"winner_" . $v['idx'] . "\" id=\"winner_" . $v['idx'] . "\" size=\"10\" maxlength=\"10\" {$disabled} />\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t";
             if ($_SESSION['ManagerId'] == $v['by'] || $mn->GetUserLevel($_SESSION['ManagerId'], $db) > $mn->GetUserLevel($v['by'], $db)) {
                 $return .= "\n\t\t\t\t\t\t\t<div id=\"icon\" style=\"cursor:pointer; float:left;\" align=\"center\" class=\"ui-state-default ui-corner-all\" onclick=\"EventPrize('" . $v['idx'] . "')\" title=\"{$EventsMessage032}\">\n\t\t\t\t\t\t\t\t<span class=\"ui-widget ui-icon ui-icon-check\"></span>\n\t\t\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t\t\t<div id=\"icon\" style=\"cursor:pointer; float:left;\" align=\"center\" class=\"ui-state-default ui-corner-all\" onclick=\"CancelScheduled('" . $v['idx'] . "')\" title=\"{$EventsMessage033}\">\n\t\t\t\t\t\t\t\t<span class=\"ui-widget ui-icon ui-icon-closethick\"></span>\n\t\t\t\t\t\t\t</div>";
             }
             $return .= "\n\t\t\t\t\t</td>\n\t\t\t\t</tr>";
         }
     }
     $return .= "</table>";
     return $return;
 }
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:52,代码来源:Events.class.php

示例3: Archive

 function Archive(&$db)
 {
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Manager/Language/{$MainLanguage}/Blocks.php";
     $db->Query("SELECT * FROM Z_BlockedUsers WHERE status = '0' ORDER BY idx DESC");
     $NumRows = $db->NumRows();
     for ($i = 0; $i < $NumRows; $i++) {
         $Blocks[$i] = $db->GetRow();
     }
     $return = "<fieldset><legend>{$BlocksMessage27}</legend>\n\t\t<table class=\"BlockListTable\">\n        \t<tr>\n\t\t\t\t<th align=\"center\">{$BlocksMessage01}</th>\n            \t<th align=\"center\">{$BlocksMessage02}</th>\n            \t<th align=\"center\">{$BlocksMessage03}</th>\n            \t<th align=\"center\">{$BlocksMessage04}</th>\n            \t<th align=\"center\">{$BlocksMessage05}</th>\n            \t<th align=\"center\">{$BlocksMessage06}</th>\n          \t</tr>";
     $dateClass = new Date();
     $manClass = new Manager();
     for ($i = 0; $i < $NumRows; $i++) {
         $data = $Blocks[$i];
         $return .= "\n\t\t\t<tr>\n\t\t\t\t<td align=\"center\">" . $data['memb___id'] . "</td>\n            \t<td class=\"BlockListCause\">" . $data['cause'] . "</td>\n            \t<td align=\"center\">" . $dateClass->DateFormat($data['blockdate']) . "</td>\n            \t<td align=\"center\">" . $dateClass->DateFormat($data['unblockdate']) . "</td>\n            \t<td align=\"center\">" . $manClass->GetUserName($data['admin'], $db) . "</td>\n            \t<td align=\"center\">";
         if (strlen($data['image']) > 10) {
             $return .= "\n\t\t\t\t\t<a href=\"" . $data['image'] . "\" target=\"blank\">\n\t\t\t\t\t<div id=\"icon\" style=\"cursor:pointer;\" align=\"center\" class=\"ui-state-default ui-corner-all\"  title=\"{$BlocksMessage22}\">\n\t\t\t\t\t<span class=\"ui-widget ui-icon ui-icon-image\"></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t</a>";
         }
         $return .= "\n\t\t\t\t</td>\n          \t</tr>";
     }
     $return .= "</table></fieldset>";
     $return .= "\n\t\t<script>\n\t\t\tfunction Go()\n\t\t\t{\n\t\t\t\t\$('.BlockListTable tbody tr:even').addClass('HelpDeskTicketRowEven');\n\t\t\t\t\$('.BlockListTable tbody tr:odd').addClass('HelpDeskTicketRowOdd');\n\t\t\t}\n\t\t\t\n\t\t\t\$(function()\n\t\t\t{\n\t\t\t\tsetTimeout(Go, 100);\n\t\t\t});\n\t\t</script>\n\t\t";
     return $return;
 }
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:24,代码来源:Blocks.class.php


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