403Webshell
Server IP : 192.249.121.117  /  Your IP : 216.73.216.251
Web Server : Apache
System : Linux ded4606.inmotionhosting.com 3.10.0-1160.81.1.el7.x86_64 #1 SMP Fri Dec 16 17:29:43 UTC 2022 x86_64
User : oakben5 ( 1001)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/oakben5/public_html/docsearch/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/oakben5/public_html/docsearch/batchprgmanager.php
<?php

/**

 * entityManagerClass - This class takes care of actions related to an entity

 * @author JMJ (jimmy.bastine@gmail.com)

 * @version 0.1

 * @copyright EMRInfotech (14-Jan-2014)

 * @since 14-Jan-2014

 */

class batchprgmanager {

        var $db;

        var $table;

       /**

        * Class constructor

        * @param db

        */

        public function __construct($db='') {

                $this->db 	 		= $db;

				$this->tableDept	= 'wprg_pods_doctor_department';

				$this->tableDrstableDrs		= 'wprg_pods_doctor';

        }

       

       /**

        * Get all depts

        * @param $date-today

        */

		public function getAllDepts() {

			$this->db->connect();

			if($this->db->errno	== 0)

			

		

			{

				$sql			= "SELECT * FROM `obmcprod_pods_department` ORDER BY `obmcprod_pods_department`.`name` ASC"; 

				

		



				//echo $sql; exit;

				$this->db->query($sql);

				if($this->db->errno	== 0)

				{

					$this->db->fetchArray();

					$this->db->close();

					return $this->db->resArr;

				}

			}

			else

			{

				return $this->db->errno.$this->db->error;

			}

        }

        

        

        

        

        

        

        

        

        

		public function getAllDrs($name,$dept) {

			$this->db->connect();

			$sqlW1 = "";

			$sqlW2 = "";

			$sqlorder = "ORDER BY obmcprod_pods_doctors.name ASC";

			

			if($this->db->errno	== 0)

			{

			    

			    

				$sql			= "SELECT *,obmcprod_pods_doctors.id as docid, obmcprod_pods_department.name as fld_dept_name , obmcprod_pods_doctors.image_url as guid ,obmcprod_pods_doctors.name AS fld_doctors_name  FROM `obmcprod_pods_doctors`
INNER JOIN obmcprod_podsrel on obmcprod_podsrel.item_id = obmcprod_pods_doctors.id and obmcprod_podsrel.pod_id = 9831 and obmcprod_podsrel.field_id = 9837 
inner join obmcprod_pods_department on obmcprod_pods_department.id = obmcprod_podsrel.related_item_id";

				if(trim($name)!='')
				{
					$sqlW1		= " WHERE ( obmcprod_pods_doctors.name LIKE '%$name%' ";

				$mixedstr =	explode(" ",$name);
				
				foreach ($mixedstr as $value) { 

					$sqlW1		= $sqlW1. " OR obmcprod_pods_doctors.name LIKE '%$value%' ";
					//echo "$value <br>";
				  }
				  
				$sqlW1		= $sqlW1. " ) ";
				}

				if(trim($dept)!=0)

				     if(trim($name)!='')

					$sqlW2		= " AND obmcprod_pods_department.id='$dept' ";

				     else

				     

				     $sqlW2		= " WHERE obmcprod_pods_department.id='$dept' ";

				

				$sql		.= $sqlW1 . $sqlW2 .$sqlorder;

			// echo $sql;die();

				

			/*	echo '<div class="modal"><a href="javascript:closeModalEvent();" class="close-modal">Close</a>';

echo $sql;

echo '</div>'; */

				$this->db->query($sql);

				if($this->db->errno	== 0)

				{

					$this->db->fetchArray();

					$this->db->close();

					return $this->db->resArr;

				}

			}

			else

			{

				return $this->db->errno.$this->db->error;

			}

        }



        public function OldgetAllDrs($name,$dept) {

			$this->db->connect();

			$sqlW1 = "";

			$sqlW2 = "";

			if($this->db->errno	== 0)

			{

				$sql			= "SELECT wprg_pods_doctor.*,wprg_pods_doctor_department.* FROM ".$this->tableDrs;

				$sql			.= " LEFT JOIN " . $this->tableDept . " ON wprg_pods_doctor_department.id=fld_doctors_deptid";

				

				if(trim($name)!='')

					$sqlW1		= " fld_doctors_name LIKE '%$name%' ";

				if(trim($dept)!=0)

					$sqlW2		= " fld_doctors_deptid='$dept' ";



				if(!($sqlW1=='' && $sqlW2==''))

					$sql			.= " WHERE ";

				if($sqlW1!='' && $sqlW2!='')

					$sql		.= $sqlW1 . " AND " . $sqlW2;

				else

					 $sql		.= $sqlW1 . $sqlW2;

					 

				

			/*	echo '<div class="modal"><a href="javascript:closeModalEvent();" class="close-modal">Close</a>';

echo $sql;

echo '</div>'; */

				$this->db->query($sql);

				if($this->db->errno	== 0)

				{

					$this->db->fetchArray();

					$this->db->close();

					return $this->db->resArr;

				}

			}

			else

			{

				return $this->db->errno.$this->db->error;

			}

        } 

	   /**

        * Get all emps with Driving license expiring today

        * @param $date-today

        */

		public function getEmpsDrvLcneExpToday($tdy) {

			$this->db->connect();

			if($this->db->errno	== 0)

			{

				$sql			= "SELECT * FROM ".$this->tableEmp." WHERE emp_dri_lice_exp_date='".$tdy."'";

				$this->db->query($sql);

				if($this->db->errno	== 0)

				{

					$this->db->fetchArray();

					$this->db->close();

					return $this->db->resArr;

				}

			}

			else

			{

				return $this->db->errno.$this->db->error;

			}

        }

       /**

        * Get all subscribers of license expiring notification

        * @param notification-$id

        */

		public function getAllSubscribers($id) {

			$this->db->connect();

			if($this->db->errno	== 0)

			{

				$sql			= "SELECT name,email FROM ".$this->tableSub.

									" WHERE notification_id ='".$id."'";

				$this->db->query($sql);

				if($this->db->errno	== 0)

				{

					$this->db->fetchArray();

					$this->db->close();

					return $this->db->resArr;

				}

			}

			else

			{

				return $this->db->errno.$this->db->error;

			}

        }        

       /**

        * Get all supervisior emails

        * @param emp-$id

        */

		public function getAllSuperiors($id) {

			$this->db->connect();

			if($this->db->errno	== 0)

			{

				$sql			= "SELECT * FROM ".$this->tableEmp." WHERE emp_number IN(SELECT erep_sup_emp_number FROM ".$this->tableSuperior.

				" WHERE	erep_sub_emp_number ='".$id."')";

				$this->db->query($sql);

				if($this->db->errno	== 0)

				{

					$this->db->fetchArray();

					$this->db->close();

					return $this->db->resArr;

				}

			}

			else

			{

				return $this->db->errno.$this->db->error;

			}

        }

       /**

        * Get email array

        * @param array

        */

		public function getEmailStr($arr,$fld) {

			$emailArr	= array();

			foreach ($arr as $key=>$val) {

				array_push($emailArr,trim($val[$fld]));

			}

			return $emailArr;

        }

        

	   /**

        * Get email array

        * @param array

        */

		public function getMailBody1($arr) {

			$emailBody	= '<!DOCTYPE html><html><body>';

			$emailBody	.= '<div style="font-family: Arial;">' .

								'<div id="divheader" style="background-color:#439CC8;text-align:center;">' .

									'<h2>OakbendHRM - License Expiry Notification</h2>' .

									'<div id="divheader" style="background-color:#439CC8;"></span>' .

								'</div>' .

								'<div id="divmailbody" style="background-color:#E9EFF0;padding:15px;">' .

									'<div style="background-color:#FFFFFF;text-align:justify;">' .

										'<p>Hello,</p>' .

										'<p>This is to inform that the '.$arr['name'].' license of Mr./Ms. '.$arr['emp_firstname'].' '.$arr['emp_lastname'].' expires today.</p>' .

										'<p style="text-decoration:underline;">Employee and License details are as follows:</p>' .

										'<p>Employee Id: '.$arr['employee_id'].'<br>' .

										'Employee DOB: '.$arr['emp_birthday'].'<br>' .

										'License No.: '.$arr['license_no'].'</p>' .

										'Please do not hesitate to contact for any further assistance.' .

										'<p>Thank you<br>' .

										'OakbendHRM - Admin<br>' .

										'oakbendhrm@gmail.com</p>' .

									'</div>' .

								'</div>' .

								'<div id="divfooter" style="background-color:#F1F1F1;font-size:11px;text-align:justify;">' .

									'Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.' .

									'<br>Copyright � 2014, All rights reserved.' .

								'</div>' .

						  '</div>';

			$emailBody	.= '</body></html>';			

			

			return $emailBody;

        }

/**

        * Get email array

        * @param array

        */

		public function getMailBody($arr) {

			$emailBody	= '';

			$emailBody	.= 'This is to inform that the '.$arr['name'].' license of Mr./Ms. '.$arr['emp_firstname'].' '.$arr['emp_lastname'].' expires today.<br><br>' .

										'Employee and License details are as follows:<br>' .

										'Employee Id: '.$arr['employee_id'].'<br>' .

										'Employee DOB: '.$arr['emp_birthday'].'<br>' .

										'License No.: '.$arr['license_no'].'<br><br>' .

										'Please do not hesitate to contact for any further assistance.' .

										'<br><br>Thank you<br>' .

										'OakbendHRM - Admin<br>' .

										'oakbendhrm@gmail.com<br>';		

			

			return $emailBody;

        }		

		public function insertDoctor($dataArr) {

			$this->db->connect($this->dbName);			

			try

			{

				$sql  			= "INSERT INTO ".$this->tableDrs." ";

				$beginning		= true;

				$fldLst			= "(";

				$valueLst		= " VALUES (";

				foreach($dataArr as $key => $value)

				{

					$fldLst		.= ($beginning)			? " ".$key										:", ".$key;

					$valueLst	.= ($beginning)			? " "."'".$value."'"	:", "."'".$value."'";

					$beginning	= false;

				}

				$fldLst			.= ")";

				$valueLst		.= ")";

				$sql 			.= $fldLst . $valueLst;

				//echo $sql;die();

				$id	  			= $this->db->executeInsert($sql);

				return $id;

			}

			catch (Exception $e)

			{

				return $this->db->errno." : ".$this->db->error." : ".$e->getMessage();

			}            			

        }

		

}//class

?>

Youez - 2016 - github.com/yon3zu
LinuXploit