Changeset 14011 for trunk/administration
- Timestamp:
- 05/18/10 05:05:03 (2 years ago)
- Location:
- trunk/administration
- Files:
-
- 3 edited
-
js/memb_levels.js (modified) (1 diff)
-
memb_levels.php (modified) (4 diffs)
-
templates/base/css/memb_levels.css (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/administration/js/memb_levels.js
r12171 r14011 33 33 closeOnOuterClick: false 34 34 }); 35 $('#adm-mlevels-holder > #adm-mlevels-action').addWebForms(); 35 36 $(document).addWebForms(); 37 $("input[type='datetime']", document).each(function() { 38 $(this).dynDateTime({ 39 ifFormat: '%Y-%m-%d %H:%M:%S', 40 showsTime: true, 41 position_css: 'fixed' 42 }); 43 }); 36 44 }, 37 45 'json' -
trunk/administration/memb_levels.php
r13886 r14011 74 74 $sQuery .= !empty($_POST['allowedCnt']) ? ", `AllowedCount`='" . $_POST['allowedCnt'] . "'" : ""; 75 75 $sQuery .= !empty($_POST['period']) ? ", `AllowedPeriodLen`='" . $_POST['period'] . "'" : ""; 76 $sQuery .= !empty($_POST['dateStart']) ? ", `AllowedPeriodStart`=FROM_UNIXTIME(" . d2i($_POST['dateStart']) . ")" : "";77 $sQuery .= !empty($_POST['dateEnd']) ? ", `AllowedPeriodEnd`=FROM_UNIXTIME(" . d2i($_POST['dateEnd']) . ")" : "";76 $sQuery .= !empty($_POST['dateStart']) ? ", `AllowedPeriodStart`=FROM_UNIXTIME(" . strtotime($_POST['dateStart']) . ")" : ""; 77 $sQuery .= !empty($_POST['dateEnd']) ? ", `AllowedPeriodEnd`=FROM_UNIXTIME(" . strtotime($_POST['dateEnd']) . ")" : ""; 78 78 $aResult = $GLOBALS['MySQL']->query($sQuery) > 0 ? array('code' => 0, 'message' => MsgBox(_t('_adm_txt_mlevels_action_saved'))) : array('code' => 1, 'message' => MsgBox(_t('_adm_txt_mlevels_action_cannot_save'))); 79 79 … … 363 363 'caption' => _t('_adm_txt_mlevels_actions_avail_start'), 364 364 'info' => _t('_adm_txt_mlevels_actions_avail_desc'), 365 'value' => isset($aAction['AllowedPeriodStart']) ? (int)$aAction['AllowedPeriodStart'] : "",365 'value' => isset($aAction['AllowedPeriodStart']) ? $aAction['AllowedPeriodStart'] : "", 366 366 'display' => 'filterDate', 367 367 ), … … 371 371 'caption' => _t('_adm_txt_mlevels_actions_avail_end'), 372 372 'info' => _t('_adm_txt_mlevels_actions_avail_desc'), 373 'value' => isset($aAction['AllowedPeriodEnd']) ? (int)$aAction['AllowedPeriodEnd'] : "",373 'value' => isset($aAction['AllowedPeriodEnd']) ? $aAction['AllowedPeriodEnd'] : "", 374 374 'display' => 'filterDate', 375 375 ), … … 472 472 return true; 473 473 } 474 function d2i($sDate) {475 $iResult = 0;476 477 $aMatch = array();478 if(preg_match('#(\d+)/(\d+)/(\d+)#', $sDate, $aMatch)) {479 $iDay = $aMatch[1];480 $iMonth = $aMatch[2];481 $iYear = $aMatch[3];482 $iResult = mktime (0, 0, 0, $iMonth, $iDay, $iYear);483 $iResult = $iResult > 0 ? $iResult : 0;484 }485 486 return $iResult;487 }488 489 474 ?> -
trunk/administration/templates/base/css/memb_levels.css
r10570 r14011 32 32 33 33 /*--- 'Manage Action' section ---*/ 34 div.calendar { 35 z-index: 9999; 36 } 34 37 div#adm-mlevels-action{ 35 38 width: 562px; … … 52 55 display: none; 53 56 } 57 div.ui-datepicker { 58 z-index: 9999; 59 }
Note: See TracChangeset
for help on using the changeset viewer.