HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //opt/cpanel/ea-php54/root/usr/share/pear/RVSeagullMod/modules/tryout/classes/PdfCatalogMgr.php
<?php
class PdfCatalogMgr extends SGL_Manager
{
	function PdfCatalogMgr()
	{
		SGL::logMessage(null, PEAR_LOG_DEBUG);
		parent::SGL_Manager();
	    $this->pageTitle    = 'PDF Catagory';
        $this->template     = 'PdfCatalog.html';
		$this->_aActionsMapping =  array(
            'view'          => array('view')
        );
	}
	
	function validate($req, &$input)
	{
	   SGL::logMessage(null, PEAR_LOG_DEBUG); 
        $this->validated    = true;
        $input->error       = array();
        $input->pageTitle   = $this->pageTitle;
        $input->masterTemplate = $this->masterTemplate;
        $input->template    = $this->template;
        $input->action      = ($req->get('action'))? $req->get('action'): 'view';
	}
	
	 function display(&$output)
	 {
	 	
	 }
	 
	 function _cmd_view(&$input, &$output)
	 {
	 	SGL::logMessage(null, PEAR_LOG_DEBUG);
	 	$path = "http://rvsitebuilder.com/pdfCatalog/filemtime.ini.txt";
	 	$output->pdfFile_arr = $this->loadFilePdfCatalog($path);
	 }
	 
	 function loadFilePdfCatalog($path)
	 {
	 	//"http://rvsitebuilder.com/pdfCatalog/filemtime.ini";
	 	$data = file($path);
	 	foreach ($data as $key => $value) {
	 		if(preg_match("/(.*?)+=/i", $value, $aMatch)){
	 			$aPdfFile = explode('=', $value);
	 			$file = str_replace(".md5", "", $aPdfFile[0]);
	 			$key = str_replace(".", "_", $file);
	 			$pdfFile_arr[$key]['file'] = $file;
	 			$date = str_replace("\"", "", $aPdfFile[1]);
	 			$dateStr = strtotime($date);
	 			$pdfFile_arr[$key]['date'] = @strftime("%d-%m-%Y", $dateStr);
	 		}
	 	}
	 	      return $pdfFile_arr;
	 }

	
}
?>