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 : 3.142.55.138
Current Path : /var/www/oasis/src_old/ |
| Current File : /var/www/oasis/src_old/getreportdetails.php |
<?php
session_start();
function getReportFormDetails($aobj_context)
{
$session['path']='activity';
$schema_name = $aobj_context->mobj_data["schema_name"];
$get_file_id="select internal_code from s_user_schema WHERE module_name='{$schema_name}'";
$lobj_get_file_id = $aobj_context->mobj_db->GetRow($get_file_id);
$_SESSION['g_report_file_id'] =$lobj_get_file_id[internal_code];
$main_src_obj=(explode("/",$_SERVER["REQUEST_URI"]));
$main_src=$main_src_obj[1];
$root_file_name=$_SERVER["DOCUMENT_ROOT"]."/".$main_src."/Report_details/report_form_".$_SESSION['g_report_file_id'].".php";
if (file_exists($root_file_name)) {
require_once($root_file_name);}
if(function_exists('getFormReport')){
getFormReport($aobj_context);}
else
{//if no files defined
$arr[0]="";// html data
$arr[1]="";// field id
$arr[2]="";//form id
$arr[3]="";//report file Id
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
}
}
function getReportFormElements($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$schema_name = $aobj_context->mobj_data["schema_name"];
$get_file_id="select internal_code from s_user_schema WHERE module_name='{$schema_name}'";
$lobj_get_file_id = $aobj_context->mobj_db->GetRow($get_file_id);
$_SESSION['g_report_file_id'] =$lobj_get_file_id[internal_code];
$lstr_qry = "select
ue.internal_code,'{$schema_name}' as schema_name,
ue.name as element_name,
s.value as Type,
replace(ue.name,' ','') as ele_field_name,
ifnull(ug.name,'0None') as group_name,
description,s1.value as meta_data,decimals,
if(s1.value='Meta',concat('m_',u.internal_code,'_ele_',ue.internal_code),'') as meta_field,
default_value,
optional,list_of_values,
u.internal_code as ref_s_user_schema_code,
ue.ref_module_code ,is_read_only,
IFNULL(ug.internal_code,0) as ref_s_user_schema_group_code,ifnull(multiple,0) as multiple,
concat('user_schema_',u.internal_code ,'_group_',IFNULL(ug.internal_code,0)) as table_id,
suffix,width*9 as width,linked_field,source_field
from s_user_schema_elements ue
inner join s_user_schema u on u.internal_code=ue.ref_s_user_schema_code
left join s_user_schema_group ug on ug.internal_code=ref_s_user_schema_group_code
left join s_ref_type s on s.internal_code=ue.data_type
left join s_ref_type s1 on s1.internal_code=ue.s_ref_type_meta
where u.module_name= '".$schema_name."' order by ue.sequence,ue.internal_code";
$lobj_schema_details = $aobj_context->mobj_db->GetAll($lstr_qry);
$get_report_names="select internal_code,report_name from report_names where report_type='r'
order by report_name ";
$lobj_get_report_names = $aobj_context->mobj_db->GetAll($get_report_names);
$arr[0]=$_SESSION['g_report_file_id'] ;
$arr[1]=$lobj_schema_details;
$arr[2]=$schema_name;
//$arr[3]=$lobj_get_report_names;
include_once("getmoduledetails.php");
$arr['links_data']= getLinks($aobj_context,$schema_name);
if(($lobj_schema_details))
{
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
else
{
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
}
?>
|