芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/thefirstcookout.com/support/application/models/database/Mnotice.php
SetValidation(); $this->tableName="notice"; $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"), "title"=>array("Text"=>"Title", "Rule"=>"required|max_length[50]"), "msg"=>array("Text"=>"Msg", "Rule"=>"required"), "msg_for"=>array("Text"=>"Msg For", "Rule"=>"max_length[1]"), "added_by"=>array("Text"=>"Added By", "Rule"=>"required|max_length[2]"), "added_on"=>array("Text"=>"Added By", "Rule"=>"max_length[20]"), "status"=>array("Text"=>"Status", "Rule"=>"max_length[1]") ); } public function GetPropertyRawOptions($property,$isWithSelect=false){ $returnObj=array(); switch ($property) { case "msg_for": $returnObj=array("B"=>"Both","S"=>"Site","A"=>"Admin Panel"); 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 "msg_for": $returnObj=array("B"=>"success","S"=>"success","A"=>"success"); break; default: } return $returnObj; } public function GetPropertyOptionsIcon($property){ $returnObj=array(); switch ($property) { case "msg_for": $returnObj=array("B"=>"","S"=>"","A"=>""); break; default: } return $returnObj; } static function DeleteById($id) { return parent::DeleteByKeyValue("id",$id); } function GetAddForm($label_col=4,$input_col=8,$mainobj=null,$except=array(),$disabled=array()){ if(!$mainobj){ $mainobj=$this; } ?>
" class="form-control" id="title" placeholder="" data-bv-notempty="true" data-bv-notempty-message="">
placeholder="" data-bv-notempty="true" data-bv-notempty-message="">GetPostValue("msg");?></textarea>
" class="form-control app-date-picker" id="start_date" placeholder="" data-bv-notempty="true" data-bv-notempty-message="">
" class="form-control app-date-picker" id="end_date" placeholder="" data-bv-notempty="true" data-bv-notempty-message="">
GetPostValue("msg_for","B"); $msg_for_isDisabled=in_array("msg_for", $disabled); GetHTMLRadioByArray("Msg For","msg_for","msg_for",true,$mainobj->GetPropertyRawOptions("msg_for"),$msg_for_selected,$msg_for_isDisabled); ?>
GetPostValue("status","A") == "A" ? "checked" : ""?> value="A" class="" id="status" >