Uname: Linux gains.arrowcloudlinux.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
Software: Apache
PHP version: 7.4.33 [ PHP INFO ] PHP os: Linux
Server Ip: 131.153.51.35
Your Ip: 18.218.231.116
User: az2015 (2658) | Group: az2015 (2661)
Safe Mode: OFF
Disable Function:
allow_url_include,show_source,symlink,system, passthru, exec, popen, pclose, proc_open, proc_terminate, proc_get_status, proc_close, proc_nice, allow_url_fopen, shell-exec, shell_exec, fpassthru, base64_encodem, escapeshellcmd, escapeshellarg, crack_check, crack_closedict, crack_getlastmessage, crack_opendict, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, dl, escap,phpinfo

name : dbconnect.php
<?php
$con=mysqli_connect("localhost","az2015_automate","az2015_automate","az2015_automate") or die('Connection Failed');
define('MAINDATABASE','az2015_automate');
define("TITLE", "Automation Zone");
define('DBPREFIX','');


$Msg="";

date_default_timezone_set("Asia/Singapore");

function gettodate()
	{
		date_default_timezone_set('Asia/Singapore');
		return date('Y-m-d');
	}	
function gettodatetime()
	{
		date_default_timezone_set('Asia/Singapore');
		return date('Y-m-d H:i:s');
	}
	
function alert_msg($msg)
{
echo "<script>alert('".
		$msg
		."');
		</script>";
		
}
function isImage($ImageType)
{
 if($ImageType=="image/png" ||
 $ImageType=="image/jpg" ||
 $ImageType=="image/JPG" ||
 $ImageType=="image/JPEG" ||
 $ImageType=="image/jpeg" ||
 $ImageType=="image/PNG" ||
 $ImageType=="image/GIF" ||
 $ImageType=="image/gif" ||
 $ImageType=="image/bmp" )
 {
 return true;
 }
 else
 {
 
 return false;
 }
  
} 


function isPdf($pdftype)
{
	if($pdftype == "application/pdf")
	{
		return true;
	}
	else
	{
		return false;
	}
}

function showSuccessAlert($data,$con){
	$Msg='<div class="alert alert-success errAlert_admin navbar-fixed-top" id="Msg">'.$data.'</div>';
	return $Msg;
}
function showErrorAlert($data,$con){
	$Msg='<div class="alert alert-danger errAlert_admin navbar-fixed-top" id="Msg">'.$data.'</div>';
	return $Msg;
}

function countSlider($con){
	$chk_count_sql="SELECT COUNT(*) AS row_count FROM home_slider";
	$chk_count_exe=mysqli_query($con,$chk_count_sql);
	$chk_count_result=mysqli_fetch_array($chk_count_exe);
	if($chk_count_result["row_count"] >= "6"){
		return true;
	}
	else{
		return false;
	}
}

function countImage($art_id,$con){
	$chk_imgCount_sql="SELECT COUNT(*) AS img_row_count FROM article_more_images WHERE art_img_id='".$art_id."'";
	$chk_imgCount_exe=mysqli_query($con,$chk_imgCount_sql);
	$chk_imgCount_result=mysqli_fetch_array($chk_imgCount_exe);
	if($chk_imgCount_result["img_row_count"] >= "7"){
		return true;
	}
	else{
		return false;
	}
}

function imgresize($readpath, $imagename, $destinationpath, $imgwidth, $imgheight) {

 $mimage = new SimpleImage();
 $mimage->load($readpath.$imagename);
 $mimage->resize($imgwidth,$imgheight);
 $mimage->save($destinationpath.$imagename);
 return 'success';
}

function url(){
  return sprintf(
    "%s://%s%s",
    isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http',
    $_SERVER['HTTP_HOST'],
    $_SERVER['REQUEST_URI']
  );
}

function pathurl(){
	 	$pathInfo = pathinfo(url());
	//echo $_SERVER["SCRIPT_FILENAME"];
	
	//echo $pathInfo['dirname'];
	return $pathInfo['dirname'];
	}
	
?>
© 2024 UnknownSec