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 : 3.148.105.127


Current Path : /var/www/results/sikkim/src/
Upload File :
Current File : /var/www/results/sikkim/src/download_misc_files.php

<?php

class download_misc_files
 {
  
    function __construct($aobj_context)
    {
		$this->aobj_context=$aobj_context;
	}
	 function DownloadMiscFiles()
	 {
	 
		$dir=$this->aobj_context->main_src."/docs/result_statements/";
	
		$this->file_names_arr=array();	 
			$file_names="";
			if (is_dir($dir)) 
			{
		
				if ($dh = opendir($dir)) {
					$cnt=0;
					 
						while (($file = readdir($dh)) !== false) {
						if(!empty($file) && $file!="." && $file!=".." && $file!="Thumbs.db")
						{
						 $this->file_names_arr[0][$cnt]['full_file_name']=$file;
						 $this->file_names_arr[0][$cnt]['file']=$file;
						  $cnt++;
						 }	
					}						 
					}				
					closedir($dh);
			}
			 
	 }
	 function FormHtml()
	 {
		$str_reval="<table style='padding:3px 4px 3px 3px;' cellpadding=5 align='center' class='tr_ventor_row' id='reval_table_data' width='80%' border='0' cellspacing='0' cellpadding='0'>";
		$str_reval.="<th align='left' colspan='6' class='ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper' style='font-size:12px; padding-left:6px; height:24px;'>Result Statement</th>";
		$str_reval.="<tr class='ui-state-default ui-jqgrid-hdiv'>";
		$str_reval.="<td align='center' style=' font-size:16px; border-right:1px solid #C5DBEC;border-left:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>File Names</td>";
		$str_reval.="</tr>";
		$print_arr=$this->file_names_arr[0];
		foreach($print_arr as $ak=>$av)
		{
			$degree_name='';	
			$file=$av['file'];
			$full_file_name=$av['full_file_name'];
			$str_reval.="<tr class='ui-widget-content jqgrow'>";		
			$str_reval.="<td class='tbl_row_new' style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:8px; font-size:12px;text-align:left;'  ><a style='color:blue;cursor:pointer;text-decoration:none;' target='_new' href='docs/result_statements/{$full_file_name}'>{$file}</a></td>";
			$str_reval.="</tr>";
		}
		$str_reval.="</html>";
		$data=$str_reval;
		$data1="No Data Found";
		if(count($print_arr)>0)
		echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,0,"success"); 
		else
		echo $this->aobj_context->mobj_output->ToJSONEnvelope($data1,0,"success"); 
	
	 }
	 
	function __destruct() {  }
}

function DownloadMiscFiles($aobj_context)
{
		$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
		$class_obj=new download_misc_files($aobj_context);	
		$class_obj->DownloadMiscFiles();
		$class_obj->FormHtml();
		
}		
?>