system: Linux mars.sprixweb.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
cmd: 

Direktori : /home/pfhr/public_html/classes/Lib/
Upload File :
Current File : /home/pfhr/public_html/classes/Lib/ValidateInputs.php

<?php
class Lib_ValidateInputs
{
	function Lib_ValidateInputs($module)
	{
		
		if($module=='insertmember')
			$this->validateInsertmember();
		elseif($module=='verify')
			$this->validateverify();
		elseif($module=='login')
			$this->validatelogin();
		elseif($module=='forgotpass')
			$this->validateforgotpass();
		elseif($module=='passverify')
			$this->validatepassverify();
		elseif($module=='updateuser')
			$this->validateupdateuser();
		elseif($module=='changepassword')
			$this->validatechangepassword();
		elseif($module=='contact')
			$this->validatecontact();
		elseif($module=='suggestion')
			$this->validatesuggestion();
		elseif($module=='checkmywithdraw')
			$this->validatemywithdraw();
		elseif($module=='productcaptcha')
			$this->productcaptcha();
		elseif($module=='validatemail')
			$this->validatTellToFriend();
		elseif($module=='validatecheque')
			$this->validateCheque();
		elseif($module=='validatechequeinputs')
			$this->validateChequeInputs();
		elseif($module=='updatesitedetails')
			$this->validateSiteDetails();	
			
	}
	
	
	function validateInsertmember()
	{			
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 

			if(isset($_POST['txtusername']) and isset($_POST['txtpassword']) and isset($_POST['txtrepassword']) and isset($_POST['txtfirstname']) and isset($_POST['txtlastname']) and isset($_POST['txtemail']) and isset($_POST['country']) and isset($_POST['txtzipcode']) and isset($_POST['txtphone']))
			{
				$obj = new Lib_FormValidation('insertmember');
				//$this->Model_Validation_FormValidation('changepassword');
			}
			else 
			{
				header("Location:index.php?do=register");
				exit();
			}
		}
	}
	
	function validateverify()
	{			
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 

			if(isset($_POST['verify']))
			{
				$obj = new Lib_FormValidation('verify');
				//$this->Model_Validation_FormValidation('changepassword');
			}
			else 
			{
				header("Location:index.php?do=register&action=verify");
				exit();
			}
		}
	}
	
	
	function validatelogin()
	{			
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 

			if(isset($_POST['txtusername']) and  isset($_POST['txtpassword']))
			{
				$obj = new Lib_FormValidation('login');
				//$this->Model_Validation_FormValidation('changepassword');
			}
			else 
			{
				header("Location:index.php?do=login");
				exit();
			}
		}
	}
	
	function validateforgotpass()
	{			
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 

			if(isset($_POST['txtemail']) and  isset($_POST['code']))
			{
				$obj = new Lib_FormValidation('forgotpassword');
				//$this->Model_Validation_FormValidation('changepassword');
			}
			else 
			{
				header("Location:index.php?do=forgotpassword");
				exit();
			}
		}
	}
	
	function validatepassverify()
	{			
		$userid=$_GET['userid'];
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 
			
			if(isset($_POST['txtverify']))
			{	
				$obj = new Lib_FormValidation('passverify');
				//$this->Model_Validation_FormValidation('changepassword');
			}
			else 
			{	
				header("Location:index.php?do=passverify&userid=".$userid);
				exit();
			}
		}
	}
	
	function validateupdateuser()
	{		
		  $usrid=$_GET['id'];	
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 

			if(isset($_POST['txtfirstname']) and isset($_POST['txtlastname']) and isset($_POST['txtemail']) and isset($_POST['country']) and isset($_POST['payment']))
			{
				$obj = new Lib_FormValidation('updateuser');
				//$this->Model_Validation_FormValidation('changepassword');
			}
			else 
			{
				header("Location:?do=mprofile&id=".$usrid);
				exit();
			}
		}
	}
	
	function validatechangepassword()
	{		
		$usrid=$_GET['id'];	
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 

			if(isset($_POST['txtoldpass']) and isset($_POST['txtnewpass']) and isset($_POST['txtrenewpass']))
			{
				$obj = new Lib_FormValidation('changepassword');
				//$this->Model_Validation_FormValidation('changepassword');
			}
			else 
			{
				header("Location:?do=mchangepassword");
				exit();
			}
		}
	}
	
	
	function validatecontact()
	{		
		  $usrid=$_GET['id'];	
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 

			if(isset($_POST['txtname']) and isset($_POST['txtemail']) and isset($_POST['txtsubject']) and isset($_POST['txtmessage']))
			{
				$obj = new Lib_FormValidation('contact');
				//$this->Model_Validation_FormValidation('changepassword');
			}
			else 
			{
				header("Location:?do=contactus");
				exit();
			}
		}
	}
	function validatesuggestion()
	{		
		  $usrid=$_GET['id'];	
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 

			if(isset($_POST['txtname']) and isset($_POST['txtemail']) and isset($_POST['txtsubject']) and isset($_POST['txtmessage']))
			{
				$obj = new Lib_FormValidation('suggestion');
				//$this->Model_Validation_FormValidation('changepassword');
			}
			else 
			{
				header("Location:?do=suggestion");
				exit();
			}
		}
	}
	
	function validatemywithdraw()
	{			 
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 

			if(isset($_POST['txtAmount']))
			{
				$obj = new Lib_FormValidation('validatemywithdraw');				
			}
			else 
			{
				header("Location:?do=mywithdraw");
				exit();
			}
		}
	}
	
	function productcaptcha()
	{			
		
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 
			
			
			if(isset($_POST['txtverify']))
			{	
		
				$obj = new Lib_FormValidation('productcaptcha');
				//$this->Model_Validation_FormValidation('changepassword');
			}
			else 
			{	
				header("Location:index.php?do=productdownload&id=".$_POST['productid']);
				exit();
			}
		}
	}
	
	
	function validatTellToFriend()
	{
		
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 
			if(isset($_POST['txtname']) and isset($_POST['txtemail']) and isset($_POST['txtsubject']) and isset($_POST['txtmessage']))
			{	
				$obj = new Lib_FormValidation('validatemail');
			}
			else 
			{	
				header("Location:index.php?do=mtellafriend");
				exit();
			}
		}
	}
	
	function validateCheque()
	{			
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 

			if(isset($_POST['chq_amount']) && isset($_POST['chq_payee_name']) && isset($_POST['chq_number']) && isset($_POST['chq_bank_name']) && isset($_POST['chq_branch_name']) && isset($_POST['chq_date']))
			{
				$obj = new Lib_FormValidation('validatecheque');
				//$this->Model_Validation_FormValidation('changepassword');
			}
			else 
			{
				header("Location:index.php?do=checkout&action=showchequeform");
				exit();
			}
		}
	}
	function validateChequeInputs()
	{			
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 

			if(isset($_POST['chq_amount']) && isset($_POST['chq_payee_name']) && isset($_POST['chq_number']) && isset($_POST['chq_bank_name']) && isset($_POST['chq_branch_name']) && isset($_POST['chq_date']))
			{
				$obj = new Lib_FormValidation('validatechequeinputs');
				//$this->Model_Validation_FormValidation('changepassword');
			}
			else 
			{
				header("Location:index.php?do=register&action=showchequeform");
				exit();
			}
		}
	}

	function validateSiteDetails()
	{
		include('classes/Lib/FormValidation.php');
		if(strtolower($_SERVER['REQUEST_METHOD'])=="post")
		{ 

			if(isset($_POST['txttitle']) && isset($_POST['txtbodycontent']))
			{
				$obj = new Lib_FormValidation('updatesitedetails');		
			}
			else 
			{
				header("Location:index.php?do=sitedetail");
				exit();
			}
		}

	}

}
?>