[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path Zen Cart 源代码 general.js
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers |
// | |
// | http://www.zen-cart.com/index.php |
// | |
// | Portions Copyright (c) 2003 osCommerce |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.zen-cart.com/license/2_0.txt. |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to |
// | license@zen-cart.com so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// $Id: general.js 1105 2005-04-04 22:05:35Z birdbrain $
//
function SetFocus(TargetFormName) {
var target = 0;
if (TargetFormName != "") {
for (i=0; i<document.forms.length; i++) {
if (document.forms[i].name == TargetFormName) {
target = i;
break;
}
}
}
function RemoveFormatString(TargetElement, FormatString) {
if (TargetElement.value == FormatString) {
TargetElement.value = "";
}
TargetElement.select();
}
function CheckDateRange(from, to) {
if (Date.parse(from.value) <= Date.parse(to.value)) {
return true;
} else {
return false;
}
}
function IsValidDate(DateToCheck, FormatString) {
var strDateToCheck;
var strDateToCheckArray;
var strFormatArray;
var strFormatString;
var strDay;
var strMonth;
var strYear;
var intday;
var intMonth;
var intYear;
var intDateSeparatorIdx = -1;
var intFormatSeparatorIdx = -1;
var strSeparatorArray = new Array("-"," ","/",".");
var strMonthArray = new Array("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");
var intDaysArray = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);