0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.118.128.17


Current Path : /proc/thread-self/root/var/www/html/demo/cms/custom_src/
Upload File :
Current File : //proc/thread-self/root/var/www/html/demo/cms/custom_src/common_data.php

<?php
// AUTHOR : VINOD KUMAR K M
//MODULE  : ENQUIRY 
//DATE    : 05/06/2014
	class common_data
	{
		public $module_name;
		function __construct($aobj_context)
		{
			session_start();
			
			$this->aobj_context=$aobj_context;
			$this->aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
			$this->user_id = $_SESSION['user_id'];
			$this->login_ctr = $_SESSION['login_cnt'];
			$this->user_dept = $_SESSION['user_dept'];	
		}
		
		function GetContactNameForSelectedParty()
		{
			$party_int_code = $this->aobj_context->mobj_data["party_int_code"];
			$module_id = $this->aobj_context->mobj_data["g_str_module_name"];
			if($module_id!='Invoice')
			{
				$get_all_contact_name="select mdcd.internal_code,mdcd.contact_person_name as contact_person 
									from master_database md
									inner join master_database_contact_details_group mdcd on mdcd.ref_s_ref_data_code=md.internal_code
									where md.internal_code={$party_int_code}";
									//echo "<pre>".$get_contact_name; die();
				$obj_get_all_contact_name = $this->aobj_context->mobj_db->GetAll($get_all_contact_name);
			}
			else
			{
				$get_all_contact_name="select pmcd.internal_code,pmcd.contact_person_name as contact_person 
									from party_master pm
									inner join party_master_contact_details_group pmcd on pmcd.ref_s_ref_data_code=pm.internal_code
									where pm.internal_code={$party_int_code}";
									//echo "<pre>".$get_all_contact_name; die();
				$obj_get_all_contact_name = $this->aobj_context->mobj_db->GetAll($get_all_contact_name);
			}
            if($obj_get_all_contact_name)			
			echo $this->aobj_context->mobj_output->ToJSONEnvelope($obj_get_all_contact_name,0,"success");
			else
			echo $this->aobj_context->mobj_output->ToJSONEnvelope($obj_get_all_contact_name,-1,"failure");
		} 
		
	
	}
	function GetContactNameForSelectedParty($aobj_context)
	{ 
		$obj=new common_data($aobj_context);
		$obj->GetContactNameForSelectedParty();		
	}

?>