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


PHP DateTimeUtil::getWeekDay方法代码示例

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


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

示例1: implode

?>
            </td>
        </tr>
        <tr>
            <td valign="top" style="word-break:break-all;border-color:#ffffff;background-color:#efefef;" width="92">
				<?php 
echo $lang['Send time'];
?>
<br />
            </td>
            <td valign="top" style="border-color:#ffffff;background-color:#efefef;" width="571">
				<?php 
echo ConvertUtil::formatDate($body['sendtime']);
?>
( <?php 
echo $lang['Week'] . DateTimeUtil::getWeekDay($body['sendtime']);
?>
 )
            </td>
        </tr>
        <tr>
            <td valign="top" style="word-break:break-all;border-color:#ffffff;background-color:#efefef;" colspan="1" rowspan="1" width="92">
				<?php 
echo $lang['Recipient'];
?>
<br />
            </td>
            <td valign="top" style="word-break:break-all;border-color:#ffffff;background-color:#efefef;" colspan="1" rowspan="1" width="571">
				<?php 
echo implode(',', $toid);
?>
开发者ID:AxelPanda,项目名称:ibos,代码行数:31,代码来源:content.php

示例2: actionShow

 public function actionShow()
 {
     $id = is_null($_GET["id"]) ? 0 : intval($_GET["id"]);
     if ($id) {
         $data = array();
         $email = Email::model()->fetchById($id, $this->archiveId);
         if (!$email) {
             $this->error(Ibos::lang("Parameters error", "error"), $this->createUrl("list/index"));
         }
         $isReceiver = $email["toid"] == $this->uid || $email["fromid"] == $this->uid || StringUtil::findIn($email["copytoids"], $this->uid) || StringUtil::findIn($email["toids"], $this->uid);
         if (!$isReceiver) {
             $this->error(Ibos::lang("View access invalid"), $this->createUrl("list/index"));
         }
         if (EnvUtil::getRequest("op") == "showframe") {
             echo $email["content"];
             exit;
         }
         if (($email["toid"] == $this->uid || StringUtil::findIn($email["toids"], $this->uid)) && $email["isread"] == 0) {
             Email::model()->setRead($id, $this->uid);
         }
         $email["dateTime"] = ConvertUtil::formatDate($email["sendtime"]);
         if ($this->uid == $email["fromid"]) {
             $email["fromName"] = Ibos::lang("Me");
         } elseif (!empty($email["fromid"])) {
             $email["fromName"] = User::model()->fetchRealnameByUid($email["fromid"]);
         } else {
             $email["fromName"] = $email["fromwebmail"];
         }
         $allIds = StringUtil::filterStr($email["toids"] . "," . $email["copytoids"]);
         $copyToId = explode(",", $email["copytoids"]);
         $toId = explode(",", $email["toids"]);
         $allUsers = $copyToUsers = $toUsers = array();
         foreach (explode(",", $allIds) as $key => $uid) {
             if (!empty($uid)) {
                 $tempUid = strpos($uid, "@");
                 if (!$tempUid) {
                     if ($this->uid == $uid) {
                         $name = Ibos::lang("Self");
                     } else {
                         $name = User::model()->fetchRealnameByUid($uid);
                     }
                 } else {
                     $name = $uid;
                 }
                 if (in_array($uid, $copyToId)) {
                     $copyToUsers[$key] = $allUsers[$key] = $name;
                 } elseif (in_array($uid, $toId)) {
                     $allUsers[$key] = $toUsers[$uid] = $name;
                 } else {
                     $allUsers[$key] = $name;
                 }
             }
         }
         if (!empty($email["towebmail"])) {
             $towebmails = explode(";", $email["towebmail"]);
             while (!empty($towebmails)) {
                 $toUsers[] = $allUsers[] = array_pop($towebmails);
             }
             $toUsers = array_unique($toUsers);
             $allUsers = array_unique($allUsers);
         }
         $data["allUsers"] = $allUsers;
         $data["toUsers"] = $toUsers;
         $data["copyToUsers"] = $copyToUsers;
         $data["isSecretUser"] = StringUtil::findIn($this->uid, $email["secrettoids"]);
         !empty($email["attachmentid"]) && ($data["attach"] = AttachUtil::getAttach($email["attachmentid"]));
         $data["next"] = Email::model()->fetchNext($id, $this->uid, $email["fid"], $this->archiveId);
         $data["prev"] = Email::model()->fetchPrev($id, $this->uid, $email["fid"], $this->archiveId);
         $data["email"] = $email;
         $data["weekDay"] = DateTimeUtil::getWeekDay($email["sendtime"]);
         $this->setPageTitle(Ibos::lang("Show email"));
         $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Personal Office")), array("name" => Ibos::lang("Email center"), "url" => $this->createUrl("list/index")), array("name" => Ibos::lang("Show email"))));
         $this->render("show", $data);
     } else {
         $this->error(Ibos::lang("Parameters error"), $this->createUrl("list/index"));
     }
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:77,代码来源:ContentController.php

示例3: save

 private function save()
 {
     $uid = Ibos::app()->user->uid;
     $realname = User::model()->fetchRealnameByUid($uid);
     $originalPlan = $planOutside = array();
     if (array_key_exists("originalPlan", $_POST)) {
         $originalPlan = $_POST["originalPlan"];
     }
     if (array_key_exists("planOutside", $_POST)) {
         $planOutside = array_filter($_POST["planOutside"], create_function("\$v", "return !empty(\$v[\"content\"]);"));
     }
     if (!empty($originalPlan)) {
         foreach ($originalPlan as $key => $value) {
             DiaryRecord::model()->modify($key, array("schedule" => $value));
         }
     }
     $date = $_POST["todayDate"] . " " . Ibos::lang("Weekday", "date") . DateTimeUtil::getWeekDay(strtotime($_POST["todayDate"]));
     $shareUidArr = isset($_POST["shareuid"]) ? StringUtil::getId($_POST["shareuid"]) : array();
     $diary = array("uid" => $uid, "diarytime" => strtotime($_POST["todayDate"]), "nextdiarytime" => strtotime($_POST["plantime"]), "addtime" => TIMESTAMP, "content" => $_POST["diaryContent"], "shareuid" => implode(",", $shareUidArr), "readeruid" => "", "remark" => "", "attention" => "");
     if (!empty($_POST["attachmentid"])) {
         AttachUtil::updateAttach($_POST["attachmentid"]);
     }
     $diary["attachmentid"] = $_POST["attachmentid"];
     $diaryId = Diary::model()->add($diary, true);
     if (!empty($planOutside)) {
         DiaryRecord::model()->addRecord($planOutside, $diaryId, strtotime($_POST["todayDate"]), $uid, "outside");
     }
     $plan = array_filter($_POST["plan"], create_function("\$v", "return !empty(\$v[\"content\"]);"));
     DiaryRecord::model()->addRecord($plan, $diaryId, strtotime($_POST["plantime"]), $uid, "new");
     $wbconf = WbCommonUtil::getSetting(true);
     if (isset($wbconf["wbmovement"]["diary"]) && $wbconf["wbmovement"]["diary"] == 1) {
         $supUid = UserUtil::getSupUid($uid);
         if (0 < intval($supUid)) {
             $data = array("title" => Ibos::lang("Feed title", "", array("{subject}" => $realname . " " . $date . " " . Ibos::lang("Work diary"), "{url}" => Ibos::app()->urlManager->createUrl("diary/review/show", array("diaryid" => $diaryId)))), "body" => StringUtil::cutStr($diary["content"], 140), "actdesc" => Ibos::lang("Post diary"), "userid" => $supUid, "deptid" => "", "positionid" => "");
             WbfeedUtil::pushFeed($uid, "diary", "diary", $diaryId, $data);
         }
     }
     UserUtil::updateCreditByAction("adddiary", $uid);
     $upUid = UserUtil::getSupUid($uid);
     if (!empty($upUid)) {
         $config = array("{sender}" => User::model()->fetchRealnameByUid($uid), "{title}" => Ibos::lang("New diary title", "", array("{sub}" => $realname, "{date}" => $date)), "{content}" => $this->renderPartial("remindcontent", array("realname" => $realname, "date" => $date, "lang" => Ibos::getLangSources(), "originalPlan" => array_values($originalPlan), "planOutside" => array_values($planOutside), "content" => StringUtil::cutStr(strip_tags($_POST["diaryContent"]), 200), "plantime" => $_POST["plantime"] . " " . Ibos::lang("Weekday", "date") . DateTimeUtil::getWeekDay(strtotime($_POST["plantime"])), "plan" => array_values($plan)), true), "{url}" => Ibos::app()->urlManager->createUrl("diary/review/show", array("diaryid" => $diaryId)));
         Notify::model()->sendNotify($upUid, "diary_message", $config, $uid);
     }
     $this->success(Ibos::lang("Save succeed", "message"), $this->createUrl("default/index"));
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:45,代码来源:DefaultController.php

示例4: foreach

			</div>
			<div class="page-list-mainer">
				<?php 
foreach ($datas as $finishDate => $assignments) {
    ?>
					<div>
						<div class="fill-sn">
							<div class="mini-date">
								<strong><?php 
    echo date("d", $finishDate);
    ?>
</strong>
								<div class="mini-date-body">
									<p><?php 
    echo $lang["Weekday"];
    echo DateTimeUtil::getWeekDay($finishDate);
    ?>
</p>
									<p><?php 
    echo date("Y-m", $finishDate);
    ?>
</p>
								</div>
							</div>
						</div>
						<table class="table table-hover" data-node-type="taskTable">
							<tbody>
								<?php 
    foreach ($assignments as $k => $assignment) {
        ?>
									<tr data-id="<?php 
开发者ID:AxelPanda,项目名称:ibos,代码行数:31,代码来源:list.php


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