Exemplo n.º 1
0
function GetMemberFform($type, $f, $fvalue, $fformsize = '')
{
    if ($type == "select" || $type == "radio" || $type == "checkbox") {
        return GetMFformSelect($type, $f, $fvalue, $fformsize);
    }
    $file = "../data/html/memberfhtml.txt";
    $data = ReadFiletext($file);
    $exp = "[!--" . $type . "--]";
    $r = explode($exp, $data);
    $string = str_replace("[!--enews.var--]", $f, $r[1]);
    $string = str_replace("[!--enews.def.val--]", $fvalue, $string);
    $string = RepMFformSize($f, $string, $type, $fformsize);
    return fAddAddsData($string);
}
Exemplo n.º 2
0
function GetClassFform($type, $f, $fvalue, $fformsize = '')
{
    if ($type == "select" || $type == "radio" || $type == "checkbox") {
        return GetCFformSelect($type, $f, $fvalue, $fformsize);
    }
    $file = "../data/html/classfhtml.txt";
    $data = ReadFiletext($file);
    $exp = "[!--" . $type . "--]";
    $r = explode($exp, $data);
    $string = str_replace("[!--enews.var--]", $f, $r[1]);
    $string = str_replace("[!--enews.def.val--]", $fvalue, $string);
    if ($type == 'editor') {
        $editortype = 'Default';
        $string = str_replace("[!--editor.type--]", $editortype, $string);
        $string = str_replace("[!--editor.basepath--]", '', $string);
    } elseif ($type == 'img' || $type == 'flash' || $type == 'file') {
        $string = str_replace("[!--enews.modtype--]", '1', $string);
        $string = str_replace("[!--enews.path--]", '', $string);
    }
    $string = RepCFformSize($f, $string, $type, $fformsize);
    return fAddAddsData($string);
}
Exemplo n.º 3
0
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);
}