Changeset 455
- Timestamp:
- Oct 30, 2012, 6:51:08 PM (12 years ago)
- Location:
- trunk/Common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Global.php
r452 r455 277 277 } 278 278 279 function MysqlDateTimeToTime($Time) 280 { 281 $Parts = explode(' ', $Time); 279 function MysqlDateTimeToTime($DateTime) 280 { 281 if($DateTime == '') return(0); 282 $Parts = explode(' ', $DateTime); 282 283 $DateParts = explode('-', $Parts[0]); 283 284 $TimeParts = explode(':', $Parts[1]); … … 286 287 } 287 288 288 function MysqlDateToTime($Time) 289 { 290 return(MysqlDateTimeToTime($Time.' 0:0:0')); 289 function MysqlDateToTime($Date) 290 { 291 if($Date == '') return(0); 292 return(MysqlDateTimeToTime($Date.' 0:0:0')); 291 293 } 292 294 293 295 function MysqlTimeToTime($Time) 294 296 { 297 if($Time == '') return(0); 295 298 return(MysqlDateTimeToTime('0000-00-00 '.$Time)); 296 299 } -
trunk/Common/Types/Date.php
r445 r455 11 11 global $MonthNames; 12 12 13 if($Item['Value'] == 0) return(''); 13 14 if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time(); 14 15 $Parts = getdate($Item['Value']); … … 25 26 $Parts = getdate($Item['Value']); 26 27 28 $Output = ''; 29 //if($Item['Value'] == '') $Checked = ' checked="1"'; else $Checked = ''; 30 //$Output .= '<input type="checkbox" name="'.$Item['Name'].'-null"'.$Checked.'/>'; 31 27 32 // Day 28 $Output = '<select name="'.$Item['Name'].'-day">';33 $Output .= '<select name="'.$Item['Name'].'-day">'; 29 34 for($I = 1; $I <= 31; $I++) 30 35 { -
trunk/Common/Types/DateTime.php
r445 r455 11 11 global $MonthNames; 12 12 13 if($Item['Value'] == 0) return(''); 13 14 if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time(); 14 15 $Parts = getdate($Item['Value']); -
trunk/Common/Types/Time.php
r445 r455 9 9 function OnView($Item) 10 10 { 11 if($Item['Value'] == 0) return(''); 11 12 if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time(); 12 13 $TimeParts = getdate($Item['Value']);
Note:
See TracChangeset
for help on using the changeset viewer.