Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
idcm
/
application
/
models
/
database
:
mcommon_notice.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php /** * Version 1.0.0 * Creation date: 03/Oct/2016 * @Written By: * IT Cell, HSTU */ class Mcommon_notice extends GSModel{ var $id; var $title; var $description; var $creation_date; var $org_date; var $download_links; var $status; function __construct() { parent::__construct (); $this->SetValidation(); $this->tableName="common_notice"; $this->primaryKey="id"; } function Reset(){ $this->id=$this->title=$this->description=$this->creation_date=$this->download_links=null; $this->status=null; } function SetValidation(){ $this->validations=array( "id"=>array("Text"=>"id", "Rule"=>"required|xss_clean"), //"title"=>array("Text"=>"title", "Rule"=>""), //"description"=>array("Text"=>"description", "Rule"=>""), //"creation_date"=>array("Text"=>"creation_date", "Rule"=>""), //"download_links"=>array("Text"=>"download_links", "Rule"=>""), "status"=>array("Text"=>"status", "Rule"=>"") ); } function GetAddForm($isEdit,$label_col=5,$input_col=7,$mainobj=null){ if(!$mainobj){ $mainobj=$this; } ?> <div class="form-group"> <label class="control-label col-md-<?php echo $label_col;?>" for="title"><?php _e("Title"); ?></label> <div class="col-md-<?php echo $input_col;?>"> <input type="text" maxlength="" value="<?php echo $mainobj->GetPostValue("title");?>" class="form-control" id="title" name="title" placeholder="Title" > </div> </div> <div class="form-group"> <label class="control-label col-md-<?php echo $label_col;?>" for="description"><?php _e("Description"); ?></label> <div class="col-md-<?php echo $input_col;?>"> <input type="text" maxlength="" value="<?php echo $mainobj->GetPostValue("description");?>" class="form-control" id="description" name="description" placeholder="Description" > </div> </div> <div class="form-group" id="file_upload_div" style="display: block;"> <label class="control-label col-md-<?php echo $label_col;?>" for="file_upload">File input</label> <div class="col-md-<?php echo $input_col;?>"> <input type="file" id="file_upload" name="file_upload"> </div> </div> <div class="form-group"> <label class="control-label col-md-<?php echo $label_col;?>" for="notice_type"><?php _e("Notice Type"); ?></label> <div class="col-md-<?php echo $input_col;?>"> <select name="notice_type" id="notice_type" class="form-control"> <option <?php echo $mainobj->status=="C"?' selected="selected" ':"";?> value="C"><?php echo "Common Notice";?></option> <option <?php echo $mainobj->status=="S"?' selected="selected" ':"";?> value="S"><?php echo "Scroll Notice";?></option> <option <?php echo $mainobj->status=="B"?' selected="selected" ':"";?> value="B"><?php echo "Common & Scroll both";?></option> </select> </div> </div> <div class="form-group"> <label class="control-label col-md-<?php echo $label_col;?>" for="title"><?php _e("Date"); ?></label> <div class="col-md-<?php echo $input_col;?>"> <input type="text" maxlength="" class="form-control" id="org_date" name="org_date" placeholder="Date *" data-bv-notempty="true" required="required" data-bv-notempty-message="<?php _e("Date is required");?>" required="required" data-error="Date is required."> </div> </div> <div class="form-group"> <label class="control-label col-md-<?php echo $label_col;?>" for="status"><?php _e("Status"); ?></label> <div class="col-md-<?php echo $input_col;?>"> <select name="status" id="status" class="form-control"> <option <?php echo $mainobj->status=="A"?' selected="selected" ':"";?> value="A"><?php echo "Active";?></option> <option <?php echo $mainobj->status=="I"?' selected="selected" ':"";?> value="I"><?php echo "Inactive";?></option> </select> </div> </div> <?php } } ?>