本文整理汇总了PHP中Date::SetDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Date::SetDate方法的具体用法?PHP Date::SetDate怎么用?PHP Date::SetDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Date
的用法示例。
在下文中一共展示了Date::SetDate方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Date
$para_page_id = $_POST["p_para_page_id"];
$message = "";
if ($para_user_id == "") {
$para_user_id = $guardian->GetUserId();
}
if ($para_date == "") {
$date = new Date();
$para_date = $date->GetNowFull();
}
if ($action == 1) {
$paragraph = new Paragraph();
$paragraph->SetDatabase($database);
$paragraph->SetId($para_id);
$paragraph->SelectById();
$date = new Date();
$date->SetDate($paragraph->GetDate());
$date->ConvertToFullDisplay();
$para_id = $paragraph->GetId();
$para_text = $paragraph->GetText();
$para_date = $date->GetConverted();
$para_order = $paragraph->GetOrder();
$para_user_id = $paragraph->GetUser();
$para_page_id = $paragraph->GetPage();
if ($para_id == "") {
$message_position = 6;
$message = $screen_module_name . " não encontrado.";
$para_id = "";
$para_text = "";
$para_date = $date->GetNowFull();
$para_order = "";
$para_user_id = $guardian->GetUserId();
示例2: Message
<?php
$messages = new Message();
$messages->SetDatabase($database);
$messages->SetTopic($data1["topc_id"]);
echo $messages->CountByTopic();
?>
</td>
<td bgcolor="#FFFFFF" width="20%" valign="middle" align="center">
<?php
$last_message = new Message();
$last_message->SetDatabase($database);
$last_message->SetTopic($data1["topc_id"]);
if ($last_message->SelectLastMessageByTopic()) {
$date = new Date();
$date->SetDate($last_message->GetDate());
$date->ConvertToFullDisplay();
?>
<?php
echo $date->GetConverted();
?>
, <?php
echo $last_message->GetUser();
?>
<?php
}
?>
</td>
示例3: Shout
require '../../' . $WEB_SITE . 'src/cdGuardian.php';
$screen_module_name = "Grito da Galera";
if (isset($_POST["p_action"])) {
$action = $_POST["p_action"];
$shou_id = $_POST["p_shou_id"];
$shou_date = $_POST["p_shou_date"];
$shou_text = $_POST["p_shou_text"];
$shou_user_id = $_POST["p_shou_user_id"];
$message = "";
if ($action == 1) {
$shout = new Shout();
$shout->SetDatabase($database);
$shout->SetId($shou_id);
$shout->SelectById();
$date = new Date();
$date->SetDate($shout->GetDate());
$date->ConvertToFullDisplay();
$shou_id = $shout->GetId();
$shou_date = $date->GetConverted();
$shou_text = $shout->GetText();
$shou_user_id = $shout->GetUser();
if ($shou_id == "") {
$message = $screen_module_name . " não encontrado.";
$shou_id = "";
$shou_date = $date->GetNowFull();
$shou_text = "";
$shou_user_id = "";
}
}
if ($action == 2) {
$date = new Date();
示例4: Date
$message_position = 6;
$message = $screen_module_name . " incluído com sucesso.";
$mess_id = "";
$mess_text = "";
$mess_date = $date->GetNowFull();
$mess_user_id = $guardian->GetUserId();
$mess_topc_id = "";
} else {
$message_position = 6;
$message = "Problemas na operação.";
}
}
}
if ($action == 3) {
$date = new Date();
$date->SetDate($mess_date);
$date->ConverToFullDate();
if ($date->VerifyDate()) {
$message = $date->GetMessage();
$message_position = 2;
} else {
$message = new Message();
$message->SetDatabase($database);
$message->SetId($mess_id);
$message->SetText(str_replace("\"", "\\\"", $mess_text));
$message->SetDate($date->GetDate());
$message->SetUser($mess_user_id);
$message->SetTopic($mess_topc_id);
if ($message->Update()) {
$message_position = 6;
$message = $screen_module_name . " alterado com sucesso.";
示例5: Date
$result = $news->SelectNextPage($last_new_id);
} else {
$result = $news->Select();
}
}
$counter = 0;
while ($data = $database->FetchArray($result)) {
if ($counter == 0) {
$first_new_id = $data["news_id"];
}
if ($counter >= $news_per_page) {
break;
}
$last_new_id = $data["news_id"];
$date = new Date();
$date->SetDate($data["news_date"]);
$date->ConvertToFullDisplay();
?>
<tr>
<td bgcolor="#DDDDDD" align="left" width="20%">
<?php
echo $date->GetConverted();
?>
</td>
<td bgcolor="#DDDDDD" align="left" width="80%">
<?php
echo $data["news_title"];
?>
</td>
</tr>
示例6: News
$screen_module_name = "Notícia";
if (isset($_POST["p_action"])) {
$action = $_POST["p_action"];
$news_id = $_POST["p_news_id"];
$news_title = $_POST["p_news_title"];
$news_date = $_POST["p_news_date"];
$news_text = $_POST["p_news_text"];
$news_user_id = $_POST["p_news_user_id"];
$message = "";
if ($action == 1) {
$news = new News();
$news->SetDatabase($database);
$news->SetId($news_id);
$news->SelectById();
$date = new Date();
$date->SetDate($news->GetDate());
$date->ConvertToFullDisplay();
$news_id = $news->GetId();
$news_title = $news->GetTitle();
$news_date = $date->GetConverted();
$news_text = $news->GetText();
$news_user_id = $news->GetUser();
if ($news_id == "") {
$message = $screen_module_name . " não encontrada.";
$news_id = "";
$news_title = "";
$news_date = "";
$news_text = "";
$news_user_id = "";
}
}
示例7: Date
$page_arti_id = $_POST["p_page_arti_id"];
$message = "";
if ($page_user_id == "") {
$page_user_id = $guardian->GetUserId();
}
if ($page_date == "") {
$date = new Date();
$page_date = $date->GetNowFull();
}
if ($action == 1) {
$page = new Page();
$page->SetDatabase($database);
$page->SetId($page_id);
$page->SelectById();
$date = new Date();
$date->SetDate($page->GetDate());
$date->ConvertToFullDisplay();
$page_id = $page->GetId();
$page_number = $page->GetNumber();
$page_date = $date->GetConverted();
$page_user_id = $page->GetUser();
$page_arti_id = $page->GetArticle();
if ($page_id == "") {
$message_position = 5;
$message = $screen_module_name . " não encontrada.";
$page_id = "";
$page_number = "";
$page_date = $date->GetNowFull();
$page_user_id = $guardian->GetUserId();
$page_arti_id = "";
}
示例8: Date
$message_position = 5;
$message = $screen_module_name . " incluído com sucesso.";
$arti_id = "";
$arti_title = "";
$arti_date = $date->GetNowFull();
$arti_user_id = "";
$arti_subj_id = "";
} else {
$message_position = 5;
$message = "Problemas na operação.";
}
}
}
if ($action == 3) {
$date = new Date();
$date->SetDate($arti_date);
$date->ConvertToDate();
if ($date->VerifyDate()) {
$message = $date->GetMessage();
$message_position = 2;
} else {
$article = new Article();
$article->SetDatabase($database);
$article->SetId($arti_id);
$article->SetTitle($arti_title);
$article->SetDate($date->GetDate());
$article->SetUser($arti_user_id);
$article->SetSubject($arti_subj_id);
if ($article->Update()) {
$message_position = 5;
$message = $screen_module_name . " alterado com sucesso.";
示例9: Date
$topc_date = $_POST["p_topc_date"];
$topc_level = $_POST["p_topc_level"];
$topc_user_id = $_POST["p_topc_user_id"];
$topc_topc_id = $_POST["p_topc_topc_id"];
$message = "";
if ($topc_date == "") {
$date = new Date();
$topc_date = $date->GetNowFull();
}
if ($action == 1) {
$topic = new Topic();
$topic->SetDatabase($database);
$topic->SetId($topc_id);
$topic->SelectById();
$date = new Date();
$date->SetDate($topc_date);
$date->ConvertToDisplay();
$topc_id = $topic->GetId();
$topc_title = $topic->GetTitle();
$topc_text = $topic->GetText();
$topc_date = $date->GetConverted();
$topc_level = $topic->GetLevel();
$topc_user_id = $topic->GetUser();
$topc_topc_id = $topic->GetTopic();
if ($topc_id == "") {
$message_position = 7;
$message = $screen_module_name . " não encontrado.";
$topc_id = "";
$topc_title = "";
$topc_text = "";
$topc_date = $date->GetNow();
示例10: Date
$result = $shout->SelectNextPage($last_shout_id);
} else {
$result = $shout->Select();
}
}
$counter = 0;
while ($data = $database->FetchArray($result)) {
if ($counter == 0) {
$first_shout_id = $data["shou_id"];
}
if ($counter >= $shouts_per_page) {
break;
}
$last_shout_id = $data["shou_id"];
$date = new Date();
$date->SetDate($data["shou_date"]);
$date->ConvertToFullDisplay();
?>
<tr>
<td bgcolor="#DDDDDD" align="left" width="60%">
<?php
echo $date->GetConverted();
?>
</td>
<td bgcolor="#DDDDDD" align="left" width="40%">
<?php
echo $data["user_username"];
?>
</td>
</tr>
示例11: Message
</td>
<td bgcolor="#FFFFFF" width="70%" valign="center" align="left">
<select name="p_mess_id">
<option value="">Selecione</option>
<?php
$result = "";
$message = new Message();
$message->SetDatabase($database);
if ($topc_id != "") {
$message->SetTopic($mess_topc_id);
$result = $message->SelectByTopic();
}
while ($data = $database->FetchArray($result)) {
$date = new Date();
$date->SetDate($data["mess_date"]);
$date->ConverToFullDisplay();
$mess_id = $data["mess_id"];
$mess_date = $date->GetConverted();
echo "<option value=\"" . $mess_id . "\">" . $mess_date . "</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="100%" valign="center" align="center" colspan="2">
<a href="javascript:Select();">Selecionar</a>
<a href="javascript:Close();">Fechar</a>
</td>