File "mpay_history.php"

Full Path: /home/ichhrkpd/public_html/application/models/database/public_html/mpay_history.php
File size: 6.72 KB
MIME-type: text/x-php
Charset: utf-8

<?php 
			
/**
 * Version 1.0.0
 * Creation date: 18/Dec/2017
 * @Written By: S.M. Sarwar Hasan
 *     Genuity Systems
 */						
class Mpay_history extends GSModel{	
	var $id;
	var $payment_txn;
	var $tid;
	var $organizer_id;
	var $racer_ids;
	var $amount;
	var $card_type;
	var $card_number;
	var $first_name;
	var $last_name;
	var $trans_time;


		function __construct() {
			parent::__construct ();
			$this->SetValidation();	
			$this->tableName="pay_history";
			$this->primaryKey="id";
		}
			
	 function Reset(){
		$this->id=$this->payment_txn=$this->tid=$this->organizer_id=$this->racer_ids=null;
		$this->amount=$this->card_type=$this->first_name=$this->last_name=$this->trans_time=$this->card_number=null;
		
	}



	function SetValidation(){
		$this->validations=array(
			"id"=>array("Text"=>"id", "Rule"=>"required|xss_clean"),
			"payment_txn"=>array("Text"=>"payment_txn", "Rule"=>"required|xss_clean"),
			//"tid"=>array("Text"=>"tid", "Rule"=>""),
			//"organizer_id"=>array("Text"=>"organizer_id", "Rule"=>""),
			"racer_ids"=>array("Text"=>"racer_ids", "Rule"=>"required|xss_clean"),
			"amount"=>array("Text"=>"amount", "Rule"=>"required|xss_clean"),
			"card_type"=>array("Text"=>"card_type", "Rule"=>"required|xss_clean"),
			"first_name"=>array("Text"=>"first_name", "Rule"=>"required|xss_clean"),
			"last_name"=>array("Text"=>"last_name", "Rule"=>"required|xss_clean"),
			"trans_time"=>array("Text"=>"trans_time", "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="id"><?php _e("Id"); ?></label>
		      	<div class="col-md-<?php echo $input_col;?>">                   			     	
		      		<input type="text" maxlength="11"  value="<?php echo  $mainobj->GetPostValue("id");?>" class="form-control" id="id" name="id" placeholder="Id" data-bv-notempty="true" 	data-bv-notempty-message="<?php  _e("Id is required");?>">
		      	</div>
		      </div> 
			
			 <div class="form-group">
		      	<label class="control-label col-md-<?php echo $label_col;?>" for="payment_txn"><?php _e("Payment Txn"); ?></label>
		      	<div class="col-md-<?php echo $input_col;?>">                   			     	
		      		<input type="text" maxlength="24"  value="<?php echo  $mainobj->GetPostValue("payment_txn");?>" class="form-control" id="payment_txn" name="payment_txn" placeholder="Payment Txn" data-bv-notempty="true" 	data-bv-notempty-message="<?php  _e("Payment Txn is required");?>">
		      	</div>
		      </div> 
			
			 <div class="form-group">
		      	<label class="control-label col-md-<?php echo $label_col;?>" for="tid"><?php _e("Tid"); ?></label>
		      	<div class="col-md-<?php echo $input_col;?>">                   			     	
		      		<input type="text" maxlength="11"  value="<?php echo  $mainobj->GetPostValue("tid");?>" class="form-control" id="tid" name="tid" placeholder="Tid" >
		      	</div>
		      </div> 
			
			 <div class="form-group">
		      	<label class="control-label col-md-<?php echo $label_col;?>" for="organizer_id"><?php _e("Organizer Id"); ?></label>
		      	<div class="col-md-<?php echo $input_col;?>">                   			     	
		      		<input type="text" maxlength="11"  value="<?php echo  $mainobj->GetPostValue("organizer_id");?>" class="form-control" id="organizer_id" name="organizer_id" placeholder="Organizer Id" >
		      	</div>
		      </div> 
			
			 <div class="form-group">
		      	<label class="control-label col-md-<?php echo $label_col;?>" for="racer_ids"><?php _e("Racer Ids"); ?></label>
		      	<div class="col-md-<?php echo $input_col;?>">                   			     	
		      		<input type="text" maxlength="300"  value="<?php echo  $mainobj->GetPostValue("racer_ids");?>" class="form-control" id="racer_ids" name="racer_ids" placeholder="Racer Ids" data-bv-notempty="true" 	data-bv-notempty-message="<?php  _e("Racer Ids is required");?>">
		      	</div>
		      </div> 
			
			 <div class="form-group">
		      	<label class="control-label col-md-<?php echo $label_col;?>" for="amount"><?php _e("Amount"); ?></label>
		      	<div class="col-md-<?php echo $input_col;?>">                   			     	
		      		<input type="text" maxlength="102"  value="<?php echo  $mainobj->GetPostValue("amount");?>" class="form-control" id="amount" name="amount" placeholder="Amount" data-bv-notempty="true" 	data-bv-notempty-message="<?php  _e("Amount is required");?>">
		      	</div>
		      </div> 
			
			 <div class="form-group">
		      	<label class="control-label col-md-<?php echo $label_col;?>" for="card_type"><?php _e("Card Type"); ?></label>
		      	<div class="col-md-<?php echo $input_col;?>">                   			     	
		      		<input type="text" maxlength="24"  value="<?php echo  $mainobj->GetPostValue("card_type");?>" class="form-control" id="card_type" name="card_type" placeholder="Card Type" data-bv-notempty="true" 	data-bv-notempty-message="<?php  _e("Card Type is required");?>">
		      	</div>
		      </div> 
			
			 <div class="form-group">
		      	<label class="control-label col-md-<?php echo $label_col;?>" for="first_name"><?php _e("First Name"); ?></label>
		      	<div class="col-md-<?php echo $input_col;?>">                   			     	
		      		<input type="text" maxlength="100"  value="<?php echo  $mainobj->GetPostValue("first_name");?>" class="form-control" id="first_name" name="first_name" placeholder="First Name" data-bv-notempty="true" 	data-bv-notempty-message="<?php  _e("First Name is required");?>">
		      	</div>
		      </div> 
			
			 <div class="form-group">
		      	<label class="control-label col-md-<?php echo $label_col;?>" for="last_name"><?php _e("Last Name"); ?></label>
		      	<div class="col-md-<?php echo $input_col;?>">                   			     	
		      		<input type="text" maxlength="100"  value="<?php echo  $mainobj->GetPostValue("last_name");?>" class="form-control" id="last_name" name="last_name" placeholder="Last Name" data-bv-notempty="true" 	data-bv-notempty-message="<?php  _e("Last Name is required");?>">
		      	</div>
		      </div> 
			
			 <div class="form-group">
		      	<label class="control-label col-md-<?php echo $label_col;?>" for="trans_time"><?php _e("Trans Time"); ?></label>
		      	<div class="col-md-<?php echo $input_col;?>">                   			     	
		      		<input type="text" maxlength=""  value="<?php echo  $mainobj->GetPostValue("trans_time");?>" class="form-control" id="trans_time" name="trans_time" placeholder="Trans Time" data-bv-notempty="true" 	data-bv-notempty-message="<?php  _e("Trans Time is required");?>">
		      	</div>
		      </div> 
			
			<?php 
	}



}
?>