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


PHP Date::DateFormat方法代码示例

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


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

示例1: NewsList

 function NewsList(&$db)
 {
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Manager/Language/{$MainLanguage}/News.php";
     $db->Query("SELECT * FROM Z_News WHERE archive = '0' ORDER BY stick DESC, [order] ASC, date DESC");
     $NumRows = $db->NumRows();
     for ($i = 0; $i < $NumRows; $i++) {
         $News[$i] = $db->GetRow();
     }
     $dateClass = new Date();
     $return = "\n\t\t<fieldset><legend>{$NewsMessage08}</legend>\n\t\t<table class=\"NewsListTable\">\n\t\t\t<tr>\n\t\t\t\t<th>{$NewsMessage09}</th>\n\t\t\t\t<th>{$NewsMessage10}</th>\n\t\t\t\t<th>{$NewsMessage11}</th>\n\t\t\t\t<th>{$NewsMessage12}</th>\n\t\t\t\t<th></th>\n\t\t\t</tr>\n\t\t\t<tbody>\n\t\t";
     for ($i = 0; $i < $NumRows; $i++) {
         $return .= "\n\t\t\t<tr>\n\t\t\t\t<td>" . $dateClass->DateFormat($News[$i]['date']) . "</td>\n\t\t\t\t<td><strong>" . $News[$i]['title'] . "</strong></td>\n\t\t\t\t<td>" . $News[$i]['views'] . "</td>\n\t\t\t\t<td>" . $News[$i]['admin'] . "</td>\n\t\t\t\t<td>\n\t\t\t\t\t<div id=\"icon\" style=\"cursor:pointer; float:left;\" align=\"center\" class=\"ui-state-default ui-corner-all\" onclick=\"MoveNew('" . $News[$i]['idx'] . "','1')\" title=\"{$NewsMessage13}\">\n\t\t\t\t\t<span class=\"ui-widget ui-icon ui-icon-arrowthick-1-n\"></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"icon\" style=\"cursor:pointer; float:left;\" align=\"center\" class=\"ui-state-default ui-corner-all\" onclick=\"MoveNew('" . $News[$i]['idx'] . "','0')\" title=\"{$NewsMessage14}\">\n\t\t\t\t\t<span class=\"ui-widget ui-icon ui-icon-arrowthick-1-s\"></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"icon\" style=\"cursor:pointer; float:left;\" align=\"center\" class=\"ui-state-default ui-corner-all\" onclick=\"EditNew('" . $News[$i]['idx'] . "','{$NewsMessage07}')\" title=\"{$NewsMessage15}\">\n\t\t\t\t\t<span class=\"ui-widget ui-icon ui-icon-pencil\"></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"icon\" style=\"cursor:pointer; float:left;\" align=\"center\" class=\"ui-state-default ui-corner-all\" onclick=\"ArchiveNew('" . $News[$i]['idx'] . "')\" title=\"{$NewsMessage16}\">\n\t\t\t\t\t<span class=\"ui-widget ui-icon ui-icon-folder-collapsed\"></span>\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t";
     }
     $return .= "</tbody></table></fieldset>";
     $return .= "\n\t\t<script>\n\t\t\tfunction Go()\n\t\t\t{\n\t\t\t\t\$('.NewsListTable tbody tr:even').addClass('HelpDeskTicketRowEven');\n\t\t\t\t\$('.NewsListTable 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,代码行数:18,代码来源:News.class.php

示例2: ShowThisMessage

 function ShowThisMessage($idx, &$db)
 {
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Language/{$MainLanguage}/Messages.php";
     $dateClass = new Date();
     $return = "";
     $db->Query("SELECT subject,message,date FROM Z_Messages WHERE memb___id = '" . $this->acc->memb___id . "' AND idx = '{$idx}'");
     $NumRows = $db->NumRows();
     if ($NumRows < 1) {
         $return = $MessagesMessage04;
     } else {
         $data = $db->GetRow();
         $return .= "<p align=\"left\" class=\"MessagesBoxHeader\">{$MessagesMessage05} " . $dateClass->DateFormat($data['date']) . ", " . $dateClass->TimeFormat($data['date'], "h") . ".<br />";
         $return .= "{$MessagesMessage02}: " . $data['subject'] . "</p>";
         $return .= "<p align=\"justify\" class=\"MessagesBoxMessage\">" . $data['message'] . "</p>";
         $db->Query("UPDATE Z_Messages SET status = '1' WHERE idx = '{$idx}'");
     }
     return $return;
 }
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:19,代码来源:Messages.class.php

示例3: ManagePolls

 function ManagePolls(&$db)
 {
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/VIP_.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Manager/Language/{$MainLanguage}/Poll.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Account.class.php";
     $acc = new Account($db);
     $dateClass = new Date();
     $db->Query("SELECT * FROM Z_Polls ORDER BY id DESC");
     $NumRows = $db->NumRows();
     for ($i = 0; $i < $NumRows; $i++) {
         $Polls[$i] = $db->GetRow();
     }
     $return = "<fieldset><legend>{$PollMessage006}</legend>\n\t\t<table class=\"PollListTable\">\n        \t<tr>\n\t\t\t\t<th align=\"center\">{$PollMessage007}</th>\n            \t<th>{$PollMessage008}</th>\n            \t<th>{$PollMessage009}</th>\n            \t<th></th>\n          \t</tr>";
     for ($i = 0; $i < $NumRows; $i++) {
         $data = $Polls[$i];
         $minAL = $data['minAL'] < 9 ? $acc->GetVipName($data['minAL']) : $PollMessage022;
         $return .= "\n\t\t\t<tr>\n\t\t\t\t<td class=\"PollListQuestion\">" . $data['question'] . "</td>\n            \t<td nowrap=\"nowrap\" valign=\"middle\">" . $dateClass->DateFormat($data['expiration_date']) . "</td>\n            \t<td>{$minAL}</td>\n            \t<td align=\"center\">\n\t\t\t\t\n\t\t\t\t\t<div id=\"icon\" style=\"cursor:pointer; float:left;\" align=\"center\" class=\"ui-state-default ui-corner-all\" onclick=\"Poll('editPoll&id=" . $data['id'] . "','Poll Edit')\" title=\"{$PollMessage013}\">\n\t\t\t\t\t\t<span class=\"ui-widget ui-icon ui-icon-pencil\"></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"icon\" style=\"cursor:pointer; float:left;\" align=\"center\" class=\"ui-state-default ui-corner-all\" onclick=\"Poll('editAnswers&id=" . $data['id'] . "','Poll Answers')\" title=\"{$PollMessage010}\">\n\t\t\t\t\t\t<span class=\"ui-widget ui-icon ui-icon-comment\"></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<div id=\"icon\" style=\"cursor:pointer; float:left;\" align=\"center\" class=\"ui-state-default ui-corner-all\" onclick=\"Poll('viewResults&id=" . $data['id'] . "','Poll Results')\" title=\"{$PollMessage011}\">\n\t\t\t\t\t\t<span class=\"ui-widget ui-icon ui-icon-signal\"></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<div id=\"icon\" style=\"cursor:pointer; float:left;\" align=\"center\" class=\"ui-state-default ui-corner-all\" onclick=\"PollDelete('" . $data['id'] . "')\" title=\"{$PollMessage012}\">\n\t\t\t\t\t\t<span class=\"ui-widget ui-icon ui-icon-circle-close\"></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t\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\$('.PollListTable tbody tr:even').addClass('HelpDeskTicketRowEven');\n\t\t\t\t\$('.PollListTable 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,代码行数:23,代码来源:Poll.class.php

示例4: DATEADD

if ($db->NumRows() > 0) {
    $data = $db->GetRow();
    $CSOwner = $data[0];
    $CSKing = $data[1];
    $CSMark = $gd->PrintGuildMark(bin2hex($data[2]), 80);
    $CSWins = $data[3];
} else {
    $CSOwner = "";
    $CSKing = "";
    $CSMark = "";
    $CSWins = "";
}
$db->Query("SELECT DATEADD(day, -1, SIEGE_END_DATE) FROM MuCastle_DATA");
$data = $db->GetRow();
$dateClass = new Date();
$NextCSDate = $dateClass->DateFormat($data[0]);
/////////////////////
?>
<!doctype html>
<html lang="pt-br">
	<head>
		<title>Klaus Layout 0.0.1</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="...................">
		<meta name="Author" content="Japah - ViralSystem">
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
		<script src="/{tpldir}media/assets/js/pxgradient-1.0.3.js"></script>
		<script src="/{tpldir}media/assets/js/functions.js" type="text/javascript"></script>
		<script src="/{tpldir}media/assets/js/functions-nw.js" type="text/javascript"></script>
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:31,代码来源:Index.tpl.php

示例5: foreach

 for ($i = 0; $i < $NumRows; $i++) {
     $data = $EventsData[$i];
     $db->Query("SELECT realname FROM Z_Users WHERE id = '" . $data['by'] . "'");
     $result = $db->GetRow();
     $Admin = $result[0];
     $db->Query("SELECT title,description FROM Z_Events WHERE idx = '" . $data['event'] . "'");
     $result = $db->GetRow();
     $Title = $result[0];
     $Description = $result[1];
     $Prizes = "";
     foreach ($Currencies as $Key => $Value) {
         if ($data["currency" . $Key] > 0) {
             $Prizes .= $data["currency" . $Key] . " " . $Value['name'] . "<br />";
         }
     }
     $return .= "\n\t\t<tr>\n\t\t  <td>\n\t\t  \t<a href=\"javascript:;\" onclick=\"javascript: ExpandDescription('" . $data['idx'] . "')\">[+] " . $Title . "</a><br />\n\t\t\t<div style=\"display:none\" id=\"EventDescription_" . $data['idx'] . "\">\n\t\t\t\t<strong>{$EventsMsg06}</strong> {$Description}<br />\n\t\t\t\t<strong>{$EventsMsg07}</strong> " . $data['place'] . "<br />\n\t\t\t\t<strong>{$EventsMsg08}</strong>\n\t\t\t\t{$Prizes}\n\t\t\t</div\n\t\t  </td>\n\t\t  <td align=\"center\" valign=\"middle\" nowrap=\"nowrap\">" . $Admin . "</td>\n\t\t  <td align=\"center\" valign=\"middle\" nowrap=\"nowrap\">" . $dt->DateFormat($data['date']) . " " . $dt->TimeFormat($data['date'], "h") . "</td>\n\t\t  <td align=\"center\" valign=\"middle\">" . $dt->TimeRemaining($data['date']) . "</td>\n\t\t</tr>";
 }
 $return .= "</table>";
 $return .= "\n\t<script>\n\t\tfunction ExpandDescription(idx)\n\t\t{\n\t\t\t\$(\"#EventDescription_\" + idx).toggle();\n\t\t}\n\t</script>\n\t";
 $my_array['NextEvents'] = $return;
 $db->Query("SELECT TOP 30 * FROM Z_EventsSchedule WHERE winner IS NOT NULL ORDER BY date DESC");
 $NumRows = $db->NumRows();
 $EventsData = array();
 for ($i = 0; $i < $NumRows; $i++) {
     $data = $db->GetRow();
     $EventsData[$i] = $data;
 }
 $return = "<table class=\"BlockedUsersTable\">\n    <tr>\n      <th align=\"center\">{$EventsMsg01}</th>\n      <th align=\"center\">{$EventsMsg02}</th>\n\t  <th align=\"center\">{$EventsMsg03}</th>\n\t  <th align=\"center\">{$EventsMsg05}</th>\n\t</tr>";
 for ($i = 0; $i < $NumRows; $i++) {
     $data = $EventsData[$i];
     $db->Query("SELECT realname FROM Z_Users WHERE id = '" . $data['by'] . "'");
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:31,代码来源:Events.php

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

示例7: GetResults

 function GetResults(&$db, $post)
 {
     $InitTime = microtime(1);
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Manager/Language/{$MainLanguage}/WebShop.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Manager/Language/{$MainLanguage}/CreditShop.php";
     $dateClass = new Date();
     $whereArray = array();
     if (!empty($post['memb___id'])) {
         array_push($whereArray, " (memb___id = '" . $post['memb___id'] . "') ");
     }
     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";
         array_push($whereArray, " ([date] >= '{$starting_date}' AND [date] <= '{$ending_date}') ");
     }
     $where = implode("AND", $whereArray);
     $db->Query("SELECT idx, name FROM Z_CreditShopPacks");
     $NumRows = $db->NumRows();
     while ($data = $db->GetRow()) {
         $Packs[$data['idx']] = $data['name'];
     }
     $db->Query("SELECT * FROM Z_CreditShopLogs WHERE {$where} ORDER BY [date] DESC");
     $NumRows = $db->NumRows();
     for ($i = 0; $i < $NumRows; $i++) {
         $LogData[$i] = $db->GetRow();
     }
     $return = "\n\t\t<table class=\"WebShopLogListTable\">\n        \t<tr style=\"background-color:#000; color:#FFF;\">\n            \t<th>{$WebShopMessage009}</th>\n            \t<th>{$WebShopMessage010}</th>\n\t\t\t\t<th>{$CreditShopMessage53}</th>\t\t\t\t\n\t\t\t\t<th>{$WebShopMessage013}</th>\n\t\t\t\t<th>{$WebShopMessage014}</th>\n\t\t\t</tr>\n\t\t\t<tbody>\n\t\t  \t";
     for ($i = 0; $i < $NumRows; $i++) {
         $data = $LogData[$i];
         if ($i > 1 && $i % 10 == 0) {
             $return .= "\n\t\t\t\t\t<tr style=\"background-color:#000; color:#FFF;\">\n\t\t\t\t\t<th>{$WebShopMessage009}</th>\n\t\t\t\t\t<th>{$WebShopMessage010}</th>\n\t\t\t\t\t<th>{$CreditShopMessage53}</th>\t\t\t\t\n\t\t\t\t\t<th>{$WebShopMessage013}</th>\n\t\t\t\t\t<th>{$WebShopMessage014}</th>\n\t\t\t\t</tr>\n\t\t\t\t";
         }
         $return .= "\n\t\t\t<tr>\n\t\t\t\t<td align=\"center\">" . $data['idx'] . "</td>\n\t\t\t\t<td align=\"center\">" . $data['memb___id'] . "</td>\n\t\t\t\t<td align=\"center\">[" . $data['package'] . "] " . $Packs[$data['package']] . "</td>\n\t\t\t\t<td align=\"center\">" . $dateClass->DateFormat($data['date']) . " " . $dateClass->TimeFormat($data['date'], "h") . "</td>\n\t\t\t\t<td align=\"center\">{$CreditShopMessage06}" . $data['paidvalue'] . "{$CreditShopMessage07}</td>\n\t\t\t</tr>\n\t\t\t";
     }
     $return .= "\n\t\t</tbody>\n\t\t</table>\n\t\t<script>\n\t\t\tfunction GoEven()\n\t\t\t{\n\t\t\t\t\$('.WebShopLogListTable tbody tr:even').addClass('HelpDeskTicketRowEven');\n\t\t\t\t\$('.WebShopLogListTable 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(GoEven, 100);\n\t\t\t});\n\t\t</script>";
     $FinalTime = microtime(1);
     $ProcessTime = $FinalTime - $InitTime;
     $return .= "<p>Proccess time: " . sprintf("%02.3f", $ProcessTime) . "</p>";
     return $return;
 }
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:43,代码来源:CreditShop.class.php

示例8: ConfirmDonation

 function ConfirmDonation(&$db, $idx)
 {
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Donations.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Manager/Language/{$MainLanguage}/Donations.php";
     $db->Query("SELECT * FROM Z_Income WHERE idx = '{$idx}'");
     $data = $db->GetRow();
     require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Account.class.php";
     $acc = new Account($db);
     $Amount = $data['amount'];
     if (isset($DonationsPercentDeposit) && $DonationsPercentDeposit != 100) {
         $Amount = (int) ($Amount * $DonationsPercentDeposit / 100);
     }
     $acc->AddCredits($data['memb___id'], 0, $Amount, $db);
     $db->Query("UPDATE Z_Income SET status = '1' , date_confirm = getdate() WHERE idx = '{$idx}'");
     $dateClass = new Date();
     $currentDateTime = $dateClass->DateFormat(date("Y-m-d")) . " " . $dateClass->TimeFormat(date("H:i"), "h");
     $replaces = array("[number]" => $idx, "[amount]" => $Amount, "[date]" => $currentDateTime);
     foreach ($replaces as $Key => $Value) {
         $DonationsMessage29 = str_replace($Key, $Value, $DonationsMessage29);
         $DonationsMessage33 = str_replace($Key, $Value, $DonationsMessage33);
         $DonationsMessage34 = str_replace($Key, $Value, $DonationsMessage34);
     }
     if ($DonationsMessage) {
         $acc->NewUserMessage($db, $data['memb___id'], $DonationsMessage29, $DonationsMessage34);
     }
     if ($DonationsMail) {
         require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Mail.class.php";
         $db->Query("SELECT mail_addr,memb_name FROM MEMB_INFO WHERE memb___id = '" . $data['memb___id'] . "'");
         $userData = $db->GetRow();
         $mailCass = new Mail();
         $mailCass->SendMail($userData['mail_addr'], $userData['memb_name'], $DonationsMessage29, $DonationsMessage33);
     }
     return $DonationsMessage35;
 }
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:35,代码来源:Donations.class.php

示例9: GetMyFullLastBuys

 function GetMyFullLastBuys(&$db, &$acc, &$it)
 {
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/WebShop.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Language/{$MainLanguage}/WebShop.php";
     require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Date.class.php";
     $dateClass = new Date();
     require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Item.class.php";
     $it = new Item();
     $db->Query("SELECT * FROM Z_Currencies");
     while ($data = $db->GetRow()) {
         $Currencies[$data['idx']] = $data['name'];
     }
     $db->Query("SELECT * FROM Z_WebShopLog WHERE memb___id = '{$acc->memb___id}' AND status = '1' ORDER BY [date] DESC");
     $NumRows = $db->NumRows();
     for ($i = 0; $i < $NumRows; $i++) {
         $LogData[$i] = $db->GetRow();
     }
     $return = "\n\t\t<script>\n\t\tvar Working = 0;\n\t\tfunction SearchItem(idx,serial)\n\t\t{\n\t\t\tif(Working == 1) return;\n\t\t\tWorking = 1;\n\t\t\t\$(\"#ItemLocation_\"+idx).html(\"...\");\n\t\t\t\$.post(\"/" . $_SESSION['SiteFolder'] . "System/ItemFinder.php\", { idx:idx, serial:serial, gseisgaefohrhóhg:'segsvsegerblou' }, function(data) {\n\t\t\t\t\$(\"#ItemLocation_\"+idx).html(data);\n\t\t\t\tWorking = 0;\n\t\t\t});\n\t\t}\n\t\t\n\t\tfunction RemoveInsurance(idx)\n\t\t{\n\t\t\tif(confirm('{$WebShopMessage058}'))\n\t\t\t{\n\t\t\t\t\$.post(\"/" . $_SESSION['SiteFolder'] . "?c=WebShop/MyBuys/Insurance\", { idx:idx }, function(data) {\n\t\t\t\t\talert('{$WebShopMessage059}');\n\t\t\t\t\t";
     $return .= "LoadContent('index.php?c=WebShop/MyBuys');";
     $return .= "\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t</script>";
     if (isset($WebShopCancelByUser) && $WebShopCancelByUser) {
         $return .= "\n\t\t\t<p>{$WebShopMessage050}</p>\n\t\t\t<p>{$WebShopMessage055}<br />\n\t\t\t<strong>{$WebShopCancelPercentNoInsurance}" . "%</strong> {$WebShopMessage056}<br />\n\t\t\t<strong>{$WebShopCancelPercentInsurance}" . "%</strong> {$WebShopMessage057}</p>";
     }
     if (isset($WebShopRemoveInsuranceByUser) && $WebShopRemoveInsuranceByUser) {
         $return .= "<p>{$WebShopMessage060}</p>";
     }
     $return .= "\n\t\t<table class=\"WebShopFullHistoryTable\">\n        \t<tr style=\"background-color:#000; color:#FFF;\">\n            \t<th>{$WebShopMessage042}</td>\n            \t<th>{$WebShopMessage043}</td>\n\t\t\t\t<th>{$WebShopMessage044}</td>\n\t\t\t\t<th>{$WebShopMessage045}</td>\n\t\t\t\t<th>{$WebShopMessage046}</td>\n\t\t\t\t<th></td>\n\t\t\t</tr><tbody>\n\t\t  \t";
     for ($i = 0; $i < $NumRows; $i++) {
         $data = $LogData[$i];
         if ($data['insurance'] == 1) {
             if (isset($WebShopRemoveInsuranceByUser) && $WebShopRemoveInsuranceByUser) {
                 $insurance = "<a href=\"javascript:;\" onclick=\"RemoveInsurance('" . $data['idx'] . "')\" style=\"color:#00AA00\" alt=\"{$WebShopMessage048}\" title=\"{$WebShopMessage048}\">[&#8226;]</a>";
             } else {
                 $insurance = "<span style=\"color:#00AA00\">[&#8226;]</a>";
             }
         } else {
             $insurance = "<span style=\"color:#FF0000\">x</span>";
         }
         $it->AnalyseItemByHex($data['item']);
         $item = $it->ShowItemName($data['item']) . $it->ShowItemDetails($data['item']);
         $location = "\n\t\t\t<div id=\"ItemLocation_" . $data['idx'] . "\">\n\t\t\t\t<a href=\"javascript:;\" onclick=\"SearchItem('" . $data['idx'] . "','" . $data['serial'] . "')\" alt=\"{$WebShopMessage049}\" title=\"{$WebShopMessage049}\">[{$WebShopMessage047}]</a>\n\t\t\t</div>";
         if ($i > 1 && $i % 10 == 0) {
             $return .= "\n\t\t\t\t<tr style=\"background-color:#000; color:#FFF;\">\n\t\t\t\t\t<th>{$WebShopMessage042}</td>\n\t\t\t\t\t<th>{$WebShopMessage043}</td>\n\t\t\t\t\t<th>{$WebShopMessage044}</td>\n\t\t\t\t\t<th>{$WebShopMessage045}</td>\n\t\t\t\t\t<th>{$WebShopMessage046}</td>\n\t\t\t\t\t<th></td>\n\t\t\t\t</tr>\n\t\t\t\t";
         }
         $return .= "\n\t\t\t<tr>\n\t\t\t\t<td align=\"center\">" . $dateClass->DateFormat($data['date']) . " " . $dateClass->TimeFormat($data['date'], "h") . "</td>\n\t\t\t\t<td align=\"center\">" . $item . "</td>\n\t\t\t\t<td align=\"center\" nowrap=\"nowrap\">" . number_format($data['price'], 0, "", ".") . " " . $Currencies[$data['currency']] . "</td>\n\t\t\t\t<td align=\"center\"><div id=\"insurance_" . $data['idx'] . "\">" . $insurance . "</div></td>\n\t\t\t\t<td align=\"center\">" . $location . "</td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t\t";
     }
     $return .= "\n\t\t</tbody>\n\t\t</table>\n\t\t";
     return $return;
 }
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:50,代码来源:WebShop.class.php

示例10: GetAllNewsModule

 function GetAllNewsModule(&$db, $TemplateFile)
 {
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/News.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Language/{$MainLanguage}/News.php";
     $dateClass = new Date();
     $replaces = array('title', 'admin', 'date', 'text', 'views', 'link', 'link_url', 'time');
     $db->Query("SELECT TOP {$NewsLimitModule} * FROM Z_News WHERE archive = '0' ORDER BY stick DESC, [order] ASC");
     $numrows = $db->NumRows();
     for ($i = 0; $i < $numrows; $i++) {
         $data = $db->GetRow();
         $my_template = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/{$TemplateFile}");
         $my_complement = $my_template;
         $link = trim($data['link']);
         foreach ($replaces as $k => $v) {
             if ($v == 'date') {
                 $my_complement = str_replace("{date}", $dateClass->DateFormat($data['date']), $my_complement);
             }
             if ($v == 'time') {
                 $my_complement = str_replace("{time}", $dateClass->TimeFormat($data['date']), $my_complement);
             } else {
                 if ($v == 'text') {
                     $my_complement = str_replace("{text}", $this->cutHTML($data['text'], $NewsModuleMaxChars), $my_complement);
                 } else {
                     if ($v == 'link') {
                         if (substr($link, 0, 7) == "http://" && strlen($link) > 12) {
                             $my_complement = str_replace("{link}", "<a href=\"" . $link . "\" target=\"_blank\">{$NewsMsg02}</a>", $my_complement);
                         } else {
                             $my_complement = str_replace("{link}", "<a href=\"/" . $_SESSION['SiteFolder'] . "?c=News/" . $data['idx'] . "\">{$NewsMsg02}</a>", $my_complement);
                         }
                     } else {
                         if ($v == 'link_url') {
                             if (substr($link, 0, 7) == "http://" && strlen($link) > 12) {
                                 $my_complement = str_replace("{link_url}", $link, $my_complement);
                             } else {
                                 $my_complement = str_replace("{link_url}", "/" . $_SESSION['SiteFolder'] . "?c=News/" . $data['idx'] . "", $my_complement);
                             }
                         } else {
                             if (!is_object($data["{$v}"])) {
                                 $my_complement = str_replace("{" . $v . "}", $data["{$v}"], $my_complement);
                             }
                         }
                     }
                 }
             }
         }
         $this->AllNewsReturn .= $my_complement;
     }
     return $this->AllNewsReturn;
 }
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:50,代码来源:News.class.php

示例11: RenameCharLog

 function RenameCharLog(&$db, $memb___id)
 {
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Manager/Language/{$MainLanguage}/Users.php";
     $dateClass = new Date();
     $db->Query("SELECT [oldName],[newName],[date],[ip] FROM [Z_Rename] WHERE memb___id = '{$memb___id}'");
     $return = "<hr />\n\t\t<fieldset>\n\t\t<legend>{$UsersMessage138}</legend>\n\t\t<div>\n\t\t\t<span style=\"float:left;\">{$UsersMessage001} {$memb___id}</span>\n\t\t\t<span title=\"Account Info\" style=\"float:left; cursor:pointer\" class=\"ui-icon ui-icon-info\" onclick=\"UserInfo('{$memb___id}')\"></span>\n\t\t</div><br />\n\t\t<hr />\n\t\t<table class=\"UserInfoTable HelpDeskTicketsTable\">\n\t\t\t<tr>\n\t\t\t\t<th>{$UsersMessage139}</th>\n\t\t\t\t<th>{$UsersMessage140}</th>\n\t\t\t\t<th>{$UsersMessage141}</th>\n\t\t\t\t<th>{$UsersMessage142}</th>\n\t\t\t</tr>\n\t\t\t";
     while ($data = $db->GetRow()) {
         $return .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . $data['oldName'] . "</td>\n\t\t\t\t\t<td>" . $data['newName'] . "</td>\n\t\t\t\t\t<td align=\"center\">" . $dateClass->DateFormat($data['date']) . " " . $dateClass->TimeFormat($data['date'], "h") . "</td>\n\t\t\t\t\t<td align=\"center\">" . $data['ip'] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t";
     }
     $return .= "\n\t\t</table>\n\t\t</fieldset>\n\t\t\n\t\t<script>\n\t\t\tfunction Go()\n\t\t\t{\n\t\t\t\t\$('.UserInfoTable tbody tr:even').addClass('HelpDeskTicketRowEven');\n\t\t\t\t\$('.UserInfoTable 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,代码行数:13,代码来源:Users.class.php

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

示例13: Date

 function __construct(&$db = NULL)
 {
     if ($db != NULL) {
         $this->db =& $db;
     }
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/SQL.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/VIP_.php";
     require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Users.php";
     require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Date.class.php";
     $date = new Date();
     if (isset($_SESSION['memb___id'])) {
         //Pegar dados da conta no banco
         $db->Query("SELECT TOP 1 * FROM MEMB_INFO WHERE memb___id = '" . $_SESSION['memb___id'] . "'");
         $data = $db->GetRow();
         $columns = array('memb_guid', 'memb___id', 'memb__pwd', 'memb_name', 'sno__numb', 'post_code', 'addr_info', 'addr_deta', 'tel__numb', 'phon_numb', 'mail_addr', 'fpas_ques', 'fpas_answ', 'job__code', 'appl_days', 'modi_days', 'out__days', 'true_days', 'mail_chek', 'bloc_code', 'ctl1_code', $SQLVIPDateColumn, $SQLVIPColumn);
         foreach ($columns as $chave => $valor) {
             if (isset($data["{$valor}"])) {
                 if (empty($this->{$valor})) {
                     $this->{$valor} = $data["{$valor}"];
                 }
             }
         }
         //Vip Name
         $this->GetVipName($this->{$SQLVIPColumn});
         //Creditos
         $db->Query("SELECT TOP 1 * FROM Z_Credits WHERE memb___id = '{$this->memb___id}' AND type = 0");
         $data = $db->GetRow();
         $credits = $data['value'];
         if (empty($credits)) {
             $credits = "0";
         }
         $this->Credits = $credits;
         //Avisos
         $db->Query("SELECT COUNT(idx) FROM Z_Messages WHERE memb___id = '{$this->memb___id}' AND status = '0'");
         $msgs = $db->GetRow();
         $this->Messages = $msgs[0];
         //Data de vencimento
         $this->VIP_DueDate = $date->DateFormat($this->{$SQLVIPDateColumn});
         //Imagem
         if (isset($UsersImageMinAL) && $this->{$SQLVIPColumn} >= $UsersImageMinAL) {
             if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "UploadedImages/" . md5($this->memb___id) . ".gif")) {
                 $this->userImage = "<img src=\"/" . $_SESSION['SiteFolder'] . "UploadedImages/" . md5($this->memb___id) . ".gif" . "\" />";
             } else {
                 $this->userImage = "<img src=\"/{tpldir}noImage.gif\" />";
             }
         } else {
             $this->userImage = "<img src=\"/{tpldir}noAL.gif\" />";
         }
         //VIP Item
         $this->VIP_Item_Status = 0;
         $this->VIP_Item_DueDate = "-";
         if (isset($VIP_Item) && $VIP_Item === true) {
             $db->Query("SELECT status, due_date FROM Z_VipItemUsers WHERE memb___id = '{$this->memb___id}'");
             if ($db->NumRows() == 1) {
                 $data = $db->GetRow();
                 if ($data[0] == 1) {
                     $this->VIP_Item_Status = 1;
                     $this->VIP_Item_DueDate = date("d/m/y", strtotime(substr($data[1], 0, 20)));
                 }
             }
         }
     }
 }
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:64,代码来源:Account.class.php

示例14: array

    $my_array['GeneralTitle'] = $BlocksMsg01;
    $my_array['GeneralContent'] = "";
    $db->Query("SELECT * FROM Z_BlockedUsers WHERE status = '1' ORDER BY idx DESC");
    $NumRows = $db->NumRows();
    $BlockData = array();
    for ($i = 0; $i < $NumRows; $i++) {
        $data = $db->GetRow();
        $BlockData[$i] = $data;
    }
    $return = "<table class=\"BlockedUsersTable\">\n    <tr>\n      <th align=\"center\">{$BlocksMsg02}</th>\n      <th align=\"center\">{$BlocksMsg03}</th>\n\t  <th align=\"center\">{$BlocksMsg04}</th>\n\t  <th align=\"center\">{$BlocksMsg05}</th>\n\t  <th align=\"center\">{$BlocksMsg06}</th>\n\t  <th align=\"center\">{$BlocksMsg07}</th>\n\t</tr>";
    for ($i = 0; $i < $NumRows; $i++) {
        $data = $BlockData[$i];
        $db->Query("SELECT realname FROM Z_Users WHERE id = '" . $data['admin'] . "'");
        $result = $db->GetRow();
        $Admin = $result[0];
        $return .= "\n\t\t<tr>\n\t\t  <td align=\"center\" nowrap=\"nowrap\">" . $data['memb___id'] . "</td>\n\t\t  <td>" . $data['cause'] . "</td>\n\t\t  <td align=\"center\" nowrap=\"nowrap\">" . $dt->DateFormat($data['blockdate']) . "</td>\n\t\t  <td align=\"center\" nowrap=\"nowrap\">" . $dt->DateFormat($data['unblockdate']) . "</td>\n\t\t  <td align=\"center\" nowrap=\"nowrap\">" . $Admin . "</td>\n\t\t  <td align=\"center\" nowrap=\"nowrap\">\n\t\t  ";
        if (strlen($data['image']) > 15) {
            $return .= "<a href=\"" . $data['image'] . "\" target=\"_blank\">{$BlocksMsg08}</a>";
        } else {
            $return .= "-";
        }
        $return .= "\n\t\t  </td>\n\t\t</tr>";
    }
    $return .= "</table>";
    $my_array['GeneralContent'] = $return;
    $db->Disconnect();
    $tpl = new Template();
    $tpl->Assign($my_array);
    $tpl->Display($_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Templates/{$MainTemplate}/GeneralContent.tpl.php");
} else {
    echo "ERROR: File Templates/{$MainTemplate}/GeneralContent.tpl.php doesnt exists";
开发者ID:BieeeLC,项目名称:OpenWeb,代码行数:31,代码来源:BlockedUsers.php

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


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