Project

General

Profile

« Previous | Next » 

Revision 643

Added by thorn almost 17 years ago

Had to fix some strtotime()-related issues in admin/pages/sections and module news to use with PHP4.

View differences:

modify_post.php
52 52
// include jscalendar-setup
53 53
$jscal_use_time = true; // whether to use a clock, too
54 54
require_once(WB_PATH."/include/jscalendar/wb-setup.php");
55
// override some vars: (normally, there is no need to change this)
56
//$jscal_lang = "en"; //- calendar-language (default: wb-backend-language)
57
//$jscal_today = ""; // - date the calendar offers if the text-field is empty (default: today)
58
//$jscal_firstday = "0"; // - first-day-of-week (0-sunday, 1-monday, ...) (default: 0(EN) or 1(everything else))
59
//$jscal_format = "Y-m-d"; // - initial-format used for the text-field (default: from wb-backend-date-format)
60
//$jscal_ifformat = "%Y-%m-%d"; // - format for jscalendar (default: from wb-backend-date-format)
61

  
62 55
?>
63

  
64 56
<h2><?php echo $TEXT['ADD'].'/'.$TEXT['MODIFY'].' '.$TEXT['POST']; ?></h2>
65 57

  
66 58
<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_post.php" method="post" style="margin: 0;">
......
123 115
<tr>
124 116
	<td><?php echo $TEXT['PUBL_START_DATE']; ?>:</td>
125 117
	<td>
126
	<input type="text" id="publishdate" name="publishdate" value="<?php if($fetch_content['published_when']==0) print date($jscal_format, time()); else print date($jscal_format, $fetch_content['published_when']);?>" style="width: 120px;" />
118
	<input type="text" id="publishdate" name="publishdate" value="<?php if($fetch_content['published_when']==0) print date($jscal_format, strtotime((date('Y-m-d')))); else print date($jscal_format, $fetch_content['published_when']);?>" style="width: 120px;" />
127 119
	<img src="<?php echo ADMIN_URL ?>/images/clock_16.png" id="publishdate_trigger" style="cursor: pointer;" title="Calendar" onmouseover="this.style.background='lightgrey';" onmouseout="this.style.background=''" />
128 120
	<img src="<?php echo ADMIN_URL ?>/images/clock_del_16.png" style="cursor: pointer;" title="delete date" onmouseover="this.style.background='lightgrey';" onmouseout="this.style.background=''" onclick="document.modify.publishdate.value=''" />
129 121
	</td>

Also available in: Unified diff