本文整理汇总了PHP中CForm::IsOldVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP CForm::IsOldVersion方法的具体用法?PHP CForm::IsOldVersion怎么用?PHP CForm::IsOldVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CForm
的用法示例。
在下文中一共展示了CForm::IsOldVersion方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Set
//.........这里部分代码省略.........
//"'".$DB->ForSql($arFields["FILTER_RESULT_TEMPLATE"],255)."'";
if (is_set($arFields, "TABLE_RESULT_TEMPLATE")) {
$arFields_i["TABLE_RESULT_TEMPLATE"] = $arFields['TABLE_RESULT_TEMPLATE'];
}
//"'".$DB->ForSql($arFields["TABLE_RESULT_TEMPLATE"],255)."'";
if (is_set($arFields, "USE_RESTRICTIONS")) {
$arFields_i["USE_RESTRICTIONS"] = $arFields["USE_RESTRICTIONS"] == "Y" ? "Y" : "N";
}
//"'Y'" : "'N'";
if (is_set($arFields, "RESTRICT_USER")) {
$arFields_i["RESTRICT_USER"] = intval($arFields["RESTRICT_USER"]);
}
//"'".intval($arFields["RESTRICT_USER"])."'";
if (is_set($arFields, "RESTRICT_TIME")) {
$arFields_i["RESTRICT_TIME"] = intval($arFields["RESTRICT_TIME"]);
}
//"'".intval($arFields["RESTRICT_TIME"])."'";
if (is_set($arFields, "arRESTRICT_STATUS")) {
$arFields_i["RESTRICT_STATUS"] = implode(",", $arFields["arRESTRICT_STATUS"]);
}
//"'".$DB->ForSql(implode(",", $arFields["arRESTRICT_STATUS"]))."'";
if (is_set($arFields, "STAT_EVENT1")) {
$arFields_i["STAT_EVENT1"] = $arFields['STAT_EVENT1'];
}
//"'".$DB->ForSql($arFields["STAT_EVENT1"],255)."'";
if (is_set($arFields, "STAT_EVENT2")) {
$arFields_i["STAT_EVENT2"] = $arFields['STAT_EVENT2'];
}
//"'".$DB->ForSql($arFields["STAT_EVENT2"],255)."'";
if (is_set($arFields, "STAT_EVENT3")) {
$arFields_i["STAT_EVENT3"] = $arFields['STAT_EVENT3'];
}
//"'".$DB->ForSql($arFields["STAT_EVENT3"],255)."'";
if (CForm::IsOldVersion() != "Y") {
unset($arFields_i["SHOW_TEMPLATE"]);
unset($arFields_i["SHOW_RESULT_TEMPLATE"]);
unset($arFields_i["PRINT_RESULT_TEMPLATE"]);
unset($arFields_i["EDIT_RESULT_TEMPLATE"]);
}
$z = $DB->Query("SELECT IMAGE_ID, SID, SID as VARNAME FROM b_form WHERE ID='" . $FORM_ID . "'", false, $err_mess . __LINE__);
$zr = $z->Fetch();
$oldSID = $zr["SID"];
if (strlen($arFields["arIMAGE"]["name"]) > 0 || strlen($arFields["arIMAGE"]["del"]) > 0) {
if (intval($zr["IMAGE_ID"]) > 0) {
$arFields["arIMAGE"]["old_file"] = $zr["IMAGE_ID"];
}
if (!array_key_exists("MODULE_ID", $arFields["arIMAGE"]) || strlen($arFields["arIMAGE"]["MODULE_ID"]) <= 0) {
$arFields["arIMAGE"]["MODULE_ID"] = "form";
}
$fid = CFile::SaveFile($arFields["arIMAGE"], "form");
if (intval($fid) > 0) {
$arFields_i["IMAGE_ID"] = intval($fid);
} else {
$arFields_i["IMAGE_ID"] = "null";
}
}
if ($arFields['SID']) {
$arFields_i["MAIL_EVENT_TYPE"] = "FORM_FILLING_" . $arFields["SID"];
} else {
$arFields_i["MAIL_EVENT_TYPE"] = "FORM_FILLING_" . $oldSID;
}
if ($FORM_ID > 0) {
$strUpdate = $DB->PrepareUpdate('b_form', $arFields_i);
if ($strUpdate != '') {
$query = 'UPDATE b_form SET ' . $strUpdate . " WHERE ID='" . $FORM_ID . "'";
$arBinds = array('FORM_TEMPLATE' => $arFields_i['FORM_TEMPLATE']);