Changeset 221
- Timestamp:
- Dec 18, 2006 5:47:34 PM (17 years ago)
- Location:
- tags/2.0.2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/2.0.2/lib/FormValidator.inc.php
r220 r221 491 491 function validateStrDate($form_name, $msg='') 492 492 { 493 if ('' == getFormData($form_name)) { 494 // Empty string is okay 495 return true; 496 } 493 497 $timestamp = strtotime(getFormData($form_name, '0')); 494 498 if ($timestamp === -1 || $timestamp === false) { -
tags/2.0.2/lib/Utilities.inc.php
r220 r221 495 495 // Translate the human string date into SQL-safe date format. 496 496 if (empty($date) || strpos($date, '0000-00-00') !== false || strtotime($date) === -1 || strtotime($date) === false) { 497 return '0000-00-00'; 497 // Return a string of zero time, formatted the same as $format. 498 return strtr($format, array( 499 'Y' => '0000', 500 'm' => '00', 501 'd' => '00', 502 'H' => '00', 503 'i' => '00', 504 's' => '00', 505 )); 498 506 } else { 499 507 return date($format, strtotime($date)); -
tags/2.0.2/services/templates/admin_form.ihtml
r185 r221 13 13 </tr> 14 14 <tr> 15 <td class="right"><label for="username"<?php $fv->err('username' , ' class="error"') ?>><?php echo _("Username"); ?></label></td>15 <td class="right"><label for="username"<?php $fv->err('username') ?>><?php echo _("Username"); ?></label></td> 16 16 <td> 17 17 <input type="text" class="small" size="50" name="username" value="<?php echo oTxt($frm['username']); ?>" /> … … 19 19 </tr> 20 20 <tr> 21 <td class="right"><label for="userpass"<?php $fv->err('userpass' , ' class="error"') ?>><?php echo _("Password"); ?></label></td>21 <td class="right"><label for="userpass"<?php $fv->err('userpass') ?>><?php echo _("Password"); ?></label></td> 22 22 <td> 23 23 <input type="password" class="small" size="50" name="userpass" value="<?php echo oTxt($frm['userpass']); ?>" /> … … 25 25 </tr> 26 26 <tr> 27 <td class="right"><label for="first_name"<?php $fv->err('first_name' , ' class="error"') ?>><?php echo _("First name"); ?></label></td>27 <td class="right"><label for="first_name"<?php $fv->err('first_name') ?>><?php echo _("First name"); ?></label></td> 28 28 <td> 29 29 <input type="text" class="small" size="50" name="first_name" value="<?php echo oTxt($frm['first_name']); ?>" /> … … 31 31 </tr> 32 32 <tr> 33 <td class="right"><label for="last_name"<?php $fv->err('last_name' , ' class="error"') ?>><?php echo _("Last name"); ?></label></td>33 <td class="right"><label for="last_name"<?php $fv->err('last_name') ?>><?php echo _("Last name"); ?></label></td> 34 34 <td> 35 35 <input type="text" class="small" size="50" name="last_name" value="<?php echo oTxt($frm['last_name']); ?>" /> … … 37 37 </tr> 38 38 <tr> 39 <td class="right"><label for="email"<?php $fv->err('email' , ' class="error"') ?>><?php echo _("Email"); ?></label></td>39 <td class="right"><label for="email"<?php $fv->err('email') ?>><?php echo _("Email"); ?></label></td> 40 40 <td> 41 41 <input type="text" class="medium" size="50" name="email" value="<?php echo oTxt($frm['email']); ?>" /> … … 43 43 </tr> 44 44 <tr> 45 <td class="right"><label for="user_type"<?php $fv->err('user_type' , ' class="error"') ?>><?php echo _("User type"); ?></label></td>45 <td class="right"><label for="user_type"<?php $fv->err('user_type') ?>><?php echo _("User type"); ?></label></td> 46 46 <td> 47 47 <select name="user_type" class="small"> -
tags/2.0.2/services/templates/password.ihtml
r185 r221 6 6 <table> 7 7 <tr> 8 <td class="right"><label for="oldpassword"<?php $fv->err('oldpassword' , ' class="error"') ?>><?php echo _("Old password"); ?></label></td>8 <td class="right"><label for="oldpassword"<?php $fv->err('oldpassword') ?>><?php echo _("Old password"); ?></label></td> 9 9 <td> 10 10 <input type="text" class="medium" size="50" name="oldpassword" /> … … 12 12 </tr> 13 13 <tr> 14 <td class="right"><label for="newpassword"<?php $fv->err('newpassword' , ' class="error"') ?>><?php echo _("New password"); ?></label></td>14 <td class="right"><label for="newpassword"<?php $fv->err('newpassword') ?>><?php echo _("New password"); ?></label></td> 15 15 <td> 16 16 <input type="password" class="medium" size="50" name="newpassword" /> … … 18 18 </tr> 19 19 <tr> 20 <td class="right"><label for="newpassword2"<?php $fv->err('newpassword2' , ' class="error"') ?>><?php echo _("New password again"); ?></label></td>20 <td class="right"><label for="newpassword2"<?php $fv->err('newpassword2') ?>><?php echo _("New password again"); ?></label></td> 21 21 <td> 22 22 <input type="password" class="medium" size="50" name="newpassword2" />
Note: See TracChangeset
for help on using the changeset viewer.