function GetQFform($type, $f, $fvalue, $fformsize = '', $add) { if ($type == "select" || $type == "radio" || $type == "checkbox") { return GetFformSelect($type, $f, $fvalue, $fformsize); } $file = "../data/html/qfhtml.txt"; $data = ReadFiletext($file); //特殊字段 if ($f == "newstext" || $f == "downpath" || $f == "onlinepath" || $f == "morepic" || $f == "playerid") { $type = $f; } $exp = "[!--" . $type . "--]"; $r = explode($exp, $data); $string = str_replace("[!--enews.var--]", $f, $r[1]); $string = str_replace("[!--enews.def.val--]", $fvalue, $string); if ($type == 'linkfield') { $string = str_replace("[!--enews.cfield.var--]", $add[linkfieldval], $string); $string = str_replace("[!--enews.vfield.var--]", $add[linkfieldshow], $string); $string = str_replace("[!--enews.ctbname--]", $add[linkfieldtb], $string); } elseif ($type == 'linkfieldselect') { $selectf = $add[linkfieldval] == $add[linkfieldshow] ? $add[linkfieldval] : $add[linkfieldval] . ',' . $add[linkfieldshow]; $string = str_replace("[!--enews.cfield.var--]", $add[linkfieldval], $string); $string = str_replace("[!--enews.vfield.var--]", $add[linkfieldshow], $string); $string = str_replace("[!--enews.ctbname--]", $add[linkfieldtb], $string); $string = str_replace("[!--enews.selectf--]", $selectf, $string); } elseif ($type == 'editor' || $type == 'newstext') { $editortype = $add[editorys] == 0 ? 'Default' : 'Basic'; $string = str_replace("[!--editor.type--]", $editortype, $string); $string = str_replace("[!--editor.basepath--]", '', $string); } $string = RepFformSize($f, $string, $type, $fformsize); return addslashes($string); }
function GetQFform($type, $f, $fvalue, $fformsize = '', $add) { if ($type == "select" || $type == "radio" || $type == "checkbox") { return GetFformSelect($type, $f, $fvalue, $fformsize); } $file = "../data/html/qfhtml.txt"; $data = ReadFiletext($file); //特殊字段 if ($f == "newstext" || $f == "downpath" || $f == "onlinepath" || $f == "morepic" || $f == "playerid") { $type = $f; } $exp = "[!--" . $type . "--]"; $r = explode($exp, $data); $string = str_replace("[!--enews.var--]", $f, $r[1]); $string = str_replace("[!--enews.def.val--]", $fvalue, $string); if ($type == 'linkfield') { $string = str_replace("[!--enews.cfield.var--]", $add[linkfieldval], $string); $string = str_replace("[!--enews.vfield.var--]", $add[linkfieldshow], $string); $string = str_replace("[!--enews.ctbname--]", $add[linkfieldtb], $string); } elseif ($type == 'linkfieldselect') { $selectf = $add[linkfieldval] == $add[linkfieldshow] ? $add[linkfieldval] : $add[linkfieldval] . ',' . $add[linkfieldshow]; $string = str_replace("[!--enews.cfield.var--]", $add[linkfieldval], $string); $string = str_replace("[!--enews.vfield.var--]", $add[linkfieldshow], $string); $string = str_replace("[!--enews.ctbname--]", $add[linkfieldtb], $string); $string = str_replace("[!--enews.selectf--]", $selectf, $string); } elseif ($type == 'editor' || $type == 'newstext') { $editortype = $add[editorys] == 0 ? 'Default' : 'Basic'; $string = str_replace("[!--editor.type--]", $editortype, $string); $string = str_replace("[!--editor.basepath--]", '', $string); } elseif ($type == 'morevaluefield') { $mvr = explode(',', $add['fmvnum']); $mv_var = ReturnMoreValueFieldHtmlVar($f, $mvr[0], $mvr[1], $mvr[2]); $string = str_replace("[!--enews.jstr--]", $mv_var['jstr'], $string); $string = str_replace("[!--enews.saytr--]", $mv_var['saytr'], $string); $string = str_replace("[!--enews.deftr--]", $mv_var['deftr'], $string); $string = str_replace("[!--enews.edittr--]", $mv_var['edittr'], $string); $string = str_replace("[!--enews.mvline--]", $mvr[1], $string); $string = str_replace("[!--enews.mvnum--]", $mvr[0], $string); $string = str_replace("[!--enews.mvmust--]", $mvr[2], $string); } $string = RepFformSize($f, $string, $type, $fformsize); return fAddAddsData($string); }