芝麻web文件管理V1.00
编辑当前文件:/home/p/r/i/prismawe/clients/canaldegap.fr/modules/faq/function.createFieldForm.php
Lang("contains") =>1, $this->Lang("isexactly") =>0, $this->Lang("isnot") =>2, $this->Lang("ishigherthan") =>3, $this->Lang("islowerthan") =>4); $datecomparechoices = array($this->Lang("queryuse") => "NA", $this->Lang("isafter") =>3, $this->Lang("isbefore") =>4, $this->Lang("isbetween") =>5); $orderchoices = array("ASC"=>"ASC","DESC"=>"DESC"); $output = array(); switch($what){ case "rubrique": $output["description"] = array($this->Lang("rubrique_description"), $this->CreateInputDropdown($id,"compare_description",$comparechoices,-1,1)." ".$this->CreateInputText($id,"field_description","",30)); $output["template"] = array($this->Lang("rubrique_template"), $this->CreateInputDropdown($id,"compare_template",$comparechoices,-1,1)." ".$this->CreateInputText($id,"field_template","",30)); $output["name"] = array($this->Lang("name"), $this->CreateInputDropdown($id,"compare_name",$comparechoices,-1,1)." ".$this->CreateInputText($id,"field_name","",30)); $this->smarty->assign("tmptime", time()); $this->smarty->assign("s_and", $this->Lang("thisandthis")); $this->smarty->assign("tmp_prefix", $id."date_date_modified_"); $this->smarty->assign("tmp_prefix2", $id."date_date_modified_part2_"); $tmptemplate = '{html_select_date prefix=$tmp_prefix time=$tmptime start_year="-10" end_year="+10"} {html_select_time prefix=$tmp_prefix time=$tmptime }
{$s_and} {html_select_date prefix=$tmp_prefix2 time=$tmptime start_year="-10" end_year="+10"} {html_select_time prefix=$tmp_prefix2 time=$tmptime }
'; $tmpout = $this->CreateInputDropdown($id,"compare_date_modified",$datecomparechoices,-1,"NA"," onchange=\"dateinput_changecompare('".$id."date_modified', this.value);\"")." ".$this->ProcessTemplateFromData($tmptemplate); $tmpout .= $this->CreateInputHidden($id,"field_date_modified", "__date_field"); $output["date_modified"] = array($this->Lang("date_modified"), $tmpout); $orderfieldoptions = array(""=>"","description"=>"description","template"=>"template","id"=>"id","name"=>"name","alias"=>"alias","item_order"=>"item_order","date_modified"=>"date_modified"); $output["orderby"] = array($this->Lang("orderbyfield"), $this->CreateInputDropdown($id,"order",$orderfieldoptions)." ".$this->CreateInputDropdown($id,"order_type",$orderchoices)); break; case "terme": $output["definition"] = array($this->Lang("terme_definition"), $this->CreateInputDropdown($id,"compare_definition",$comparechoices,-1,1)." ".$this->CreateInputText($id,"field_definition","",30)); $output["parent"] = array($this->Lang("parent")); $parentoptions = $this->get_hierarchyoptions("terme"); $output["parent"][] = $this->CreateInputDropdown($id,"field_parent",$parentoptions); $output["name"] = array($this->Lang("name"), $this->CreateInputDropdown($id,"compare_name",$comparechoices,-1,1)." ".$this->CreateInputText($id,"field_name","",30)); $this->smarty->assign("tmptime", time()); $this->smarty->assign("s_and", $this->Lang("thisandthis")); $this->smarty->assign("tmp_prefix", $id."date_date_modified_"); $this->smarty->assign("tmp_prefix2", $id."date_date_modified_part2_"); $tmptemplate = '{html_select_date prefix=$tmp_prefix time=$tmptime start_year="-10" end_year="+10"} {html_select_time prefix=$tmp_prefix time=$tmptime }
{$s_and} {html_select_date prefix=$tmp_prefix2 time=$tmptime start_year="-10" end_year="+10"} {html_select_time prefix=$tmp_prefix2 time=$tmptime }
'; $tmpout = $this->CreateInputDropdown($id,"compare_date_modified",$datecomparechoices,-1,"NA"," onchange=\"dateinput_changecompare('".$id."date_modified', this.value);\"")." ".$this->ProcessTemplateFromData($tmptemplate); $tmpout .= $this->CreateInputHidden($id,"field_date_modified", "__date_field"); $output["date_modified"] = array($this->Lang("date_modified"), $tmpout); $orderfieldoptions = array(""=>"","definition"=>"definition","parent"=>"parent","id"=>"id","name"=>"name","alias"=>"alias","item_order"=>"item_order","date_modified"=>"date_modified"); $output["orderby"] = array($this->Lang("orderbyfield"), $this->CreateInputDropdown($id,"order",$orderfieldoptions)." ".$this->CreateInputDropdown($id,"order_type",$orderchoices)); break; } echo ' '; if($assign){ foreach($output as $key=>$value){ $this->smarty->assign($key."_label", $value[0]); $this->smarty->assign($key."_input", $value[1]); } }else{ echo "
"; foreach($output as $key=>$value){ if($key != "orderby") echo "
".$value[0]."
".$value[1]."
"; } echo "
"; echo "
".$output["orderby"][0].": ".$output["orderby"][1]."
"; } ?>