File "memployer.php"
Full Path: /home/ichhrkpd/public_html/application/models/database/memployer.php
File size: 5.85 KB
MIME-type: text/x-php
Charset: utf-8
<?php
/**
* Version 1.0.0
* Creation date: 02/Dec/2017
* @Written By: S.M. Sarwar Hasan
* Genuity Systems
*/
class Memployer extends GSModel{
var $eid;
var $employer_name;
var $employer_type;
var $employer_address;
var $employer_city;
var $employer_state;
var $employer_zip;
var $status;
function __construct() {
parent::__construct ();
$this->SetValidation();
$this->tableName="employer";
$this->primaryKey="eid";
}
function Reset(){
$this->eid=$this->employer_name=$this->employer_type=$this->employer_address=$this->employer_city=null;
$this->employer_state=$this->employer_zip=$this->status=null;
}
function SetValidation(){
$this->validations=array(
"eid"=>array("Text"=>"eid", "Rule"=>"required|xss_clean"),
"employer_name"=>array("Text"=>"employer_name", "Rule"=>"required|xss_clean"),
//"employer_type"=>array("Text"=>"employer_type", "Rule"=>""),
"employer_address"=>array("Text"=>"employer_address", "Rule"=>"required|xss_clean"),
"employer_city"=>array("Text"=>"employer_city", "Rule"=>"required|xss_clean"),
//"employer_state"=>array("Text"=>"employer_state", "Rule"=>""),
"employer_zip"=>array("Text"=>"employer_zip", "Rule"=>"required|xss_clean"),
"status"=>array("Text"=>"status", "Rule"=>"")
);
}
function GetAddForm($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="eid"><?php _e("Eid"); ?></label>
<div class="col-md-<?php echo $input_col;?>">
<input type="text" maxlength="11" value="<?php echo $mainobj->GetPostValue("eid");?>" class="form-control" id="eid" name="eid" placeholder="Eid" data-bv-notempty="true" data-bv-notempty-message="<?php _e("Eid is required");?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-<?php echo $label_col;?>" for="employer_name"><?php _e("Employer Name"); ?></label>
<div class="col-md-<?php echo $input_col;?>">
<input type="text" maxlength="100" value="<?php echo $mainobj->GetPostValue("employer_name");?>" class="form-control" id="employer_name" name="employer_name" placeholder="Employer Name" data-bv-notempty="true" data-bv-notempty-message="<?php _e("Employer Name is required");?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-<?php echo $label_col;?>" for="employer_type"><?php _e("Employer Type"); ?></label>
<div class="col-md-<?php echo $input_col;?>">
<input type="text" maxlength="1" value="<?php echo $mainobj->GetPostValue("employer_type");?>" class="form-control" id="employer_type" name="employer_type" placeholder="Employer Type" data-bv-notempty="true" data-bv-notempty-message="<?php _e("Employer Type is required");?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-<?php echo $label_col;?>" for="employer_address"><?php _e("Employer Address"); ?></label>
<div class="col-md-<?php echo $input_col;?>">
<input type="text" maxlength="150" value="<?php echo $mainobj->GetPostValue("employer_address");?>" class="form-control" id="employer_address" name="employer_address" placeholder="Employer Address" data-bv-notempty="true" data-bv-notempty-message="<?php _e("Employer Address is required");?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-<?php echo $label_col;?>" for="employer_city"><?php _e("Employer City"); ?></label>
<div class="col-md-<?php echo $input_col;?>">
<input type="text" maxlength="50" value="<?php echo $mainobj->GetPostValue("employer_city");?>" class="form-control" id="employer_city" name="employer_city" placeholder="Employer City" data-bv-notempty="true" data-bv-notempty-message="<?php _e("Employer City is required");?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-<?php echo $label_col;?>" for="employer_state"><?php _e("Employer State"); ?></label>
<div class="col-md-<?php echo $input_col;?>">
<input type="text" maxlength="2" value="<?php echo $mainobj->GetPostValue("employer_state");?>" class="form-control" id="employer_state" name="employer_state" placeholder="Employer State" data-bv-notempty="true" data-bv-notempty-message="<?php _e("Employer State is required");?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-<?php echo $label_col;?>" for="employer_zip"><?php _e("Employer Zip"); ?></label>
<div class="col-md-<?php echo $input_col;?>">
<input type="text" maxlength="5" value="<?php echo $mainobj->GetPostValue("employer_zip");?>" class="form-control" id="employer_zip" name="employer_zip" placeholder="Employer Zip" data-bv-notempty="true" data-bv-notempty-message="<?php _e("Employer Zip 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;?>">
<input type="text" maxlength="1" value="<?php echo $mainobj->GetPostValue("status");?>" class="form-control" id="status" name="status" placeholder="Status" data-bv-notempty="true" data-bv-notempty-message="<?php _e("Status is required");?>">
</div>
</div>
<?php
}
}
?>