芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/thefirstcookout.com/support/application/models/database/Mmenu.php
SetValidation(); $this->tableName="menu"; $this->primaryKey="id"; $this->uniqueKey=array(); $this->multiKey=array(); $this->autoIncField=array("id"); } function SetValidation(){ $this->validations=array( "id"=>array("Text"=>"Id", "Rule"=>"max_length[10]|integer"), "parent_id"=>array("Text"=>"Parent Id", "Rule"=>"max_length[10]|integer"), "title"=>array("Text"=>"Title", "Rule"=>"required|max_length[100]"), "href_type"=>array("Text"=>"Href Type", "Rule"=>"max_length[1]"), "href"=>array("Text"=>"Href", "Rule"=>"required|max_length[255]"), "text_icon"=>array("Text"=>"Text Icon", "Rule"=>"max_length[50]"), "view_counter"=>array("Text"=>"View Counter", "Rule"=>"max_length[10]|integer"), "is_new_window"=>array("Text"=>"Is New Window", "Rule"=>"max_length[1]"), "status"=>array("Text"=>"Status", "Rule"=>"max_length[1]") ); } public function GetPropertyRawOptions($property,$isWithSelect=false) { $returnObj = array(); switch ( $property ) { case "href_type": $returnObj = array( "L" => "Link", "P" => "Page" ); break; case "is_new_window": $returnObj = array( "Y" => "Yes", "N" => "No" ); break; case "status": $returnObj = array( "A" => "Active", "I" => "Inactive" ); break; default: } if ( $isWithSelect ) { return array_merge( array( "" => "Select" ), $returnObj ); } return $returnObj; } public function GetPropertyOptionsColor($property){ $returnObj=array(); switch ($property) { case "status": $returnObj=array("A"=>"success","I"=>"danger"); break; default: } return $returnObj; } public static function DeleteById($id){ return parent::DeleteByKeyValue("id", $id); } public static function increase_viewcount($id){ $obj=new self(); $obj->view_counter("view_counter+1",true); $obj->SetWhereCondition("id", $id); return $obj->Update(); } function GetAddForm($label_col=5,$input_col=7,$mainobj=null,$except=array(),$disabled=array()){ if(!$mainobj){ $mainobj=$this; } ?>
" class="form-control " id="title" placeholder="" data-bv-notempty="true" data-bv-notempty-message="">
GetPostValue("href_type","L"); $href_type_isDisabled=in_array("href_type", $disabled); GetHTMLRadioByArray("Href Type","href_type","href_type",true,$mainobj->GetPropertyOptions("href_type"),$href_type_selected,$href_type_isDisabled,false,"has_depend_fld"); ?>
data-bv-trigger="blur" placeholder="" data-bv-notempty="true" data-bv-notempty-message="">GetPostValue("href");?></textarea>
data-bv-notempty="true" data-bv-notempty-message="" > GetPostValue("href"); $pageList=Mcustom_page::FindAllBy("status","A"); GetHTMLOption("","Select"); foreach ($pageList as $p){ GetHTMLOption("site/page/{$p->id}/{$p->slag_title}",$p->title,$selected_page); } ?>
" class="form-control app-iconpicker" id="text_icon" placeholder="">
GetPostValue("is_new_window","N") == "Y" ? "checked" : ""?> value="Y" class="" id="is_new_window" >
GetPostValue("status","A") == "A" ? "checked" : ""?> value="A" class="" id="status" >