Server IP : 108.163.255.210 / Your IP : 18.191.205.110 Web Server : Apache System : Linux blossom.urlnameserver.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64 User : ( 1172) PHP Version : 7.2.34 Disable Function : eval,escapeshellarg,proc_close,proc_get_status,proc_nice,proc_open,symlink,system,pcntl_exec,getrusage,chown,chgp,closelog,openlog,syslog,define_syslog_variables,php_ini_loaded_file,getservbyname,getservbyport,posix_getgid,posix_getgrgid,proc_terminate,pfsockopen,apache_child_terminate,posix_mkfifo,posix_setpgid,posix_setuid,hypot,pg_host,pos,posix_access,posix_getcwd,posix_getservbyname,myshellexec,getpid,posix_getsid,posix_isatty,posix_kill,posix_mknod,posix_setgid,posix_setsid,posix_setuid,posix_times,posix_uname,ps_fill,posix_getpwuid,global,ini_restore,zip_open,zip_read,rar_open,bzopen,bzread,bzwrite,apache_get_modules,apache_get_version,phpversionphpinfo,php_ini_scanned_files,get_current_user,disk_total_space,diskfreespace,leak,imap_list,hypo,filedump,safe_mode,getmygid,apache_getenv,apache_setenv,bzread,bzwrite,bzopen,phpini,higlight_file,dos_conv,get_cwd,er_log,cmd,e_name,vdir,get_dir,only_read,ftok,ftpexec,posix_getpwnam,mysql_list_dbs,disk_free_space,session_save_path,confirm_phpdoc_compiled,zip_entry_rea,php_u,psockopen,crack_opendict,crack_getlastmessage,crack_closedict,crack_check,fpassthru,posix_get_last_error,posix_getlogin,posix_getgroups,posix_strerror,posix_getrlimit,posix_getpgrp,posix_getgrnam,pos,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/unilinki/www/Intellilead/includes/ |
Upload File : |
<?php global $_SERVER; global $DB; global $secure_server_path; global $non_secure_path ; global $SITE_FS_PATH ; date_default_timezone_set('Asia/Kolkata'); $DateTime = date('Y-m-d H:i:s', time()); //@extract($_GET); //@extract($_POST); //@extract($_FILES); //@extract($_COOKIE); //@extract($_SESSION); if($_SERVER['HTTP_HOST']=="localhost"){ $DB["host"] = "localhost"; $DB["dbName"] = "aetholq5_intellilead"; $DB["user"] = "aetholq5_intelli"; $DB["pass"] = "intel@2017$#"; $non_secure_path = "http://".$_SERVER['SERVER_NAME']."/"; $non_secure_adminpath = "http://".$_SERVER['SERVER_NAME']."/"; $secure_server_path = "http://".$_SERVER['SERVER_NAME']."/"; $SITE_PATH = "http://".$_SERVER['SERVER_NAME']."/"; $SSL_PATH = "http://".$_SERVER['SERVER_NAME']."/"; $SITE_FS_PATH = "d:/xampp/htdocs/fff/"; $local_mode = true; }else{ $DB["host"] = "localhost"; $DB["dbName"] = "aetholq5_intellilead"; $DB["user"] = "aetholq5_intelli"; $DB["pass"] = "intel@2017$#"; $non_secure_path = "http://".$_SERVER['SERVER_NAME']."/"; $non_secure_adminpath = "http://".$_SERVER['SERVER_NAME']."/"; $secure_server_path = "http://".$_SERVER['SERVER_NAME']."/"; $SITE_PATH = "http://".$_SERVER['SERVER_NAME']."/"; $SSL_PATH = "http://".$_SERVER['SERVER_NAME']."/"; //$SITE_FS_PATH = '/home/ffff/public_html/clients/fff/'; $local_mode = false; } $link = @mysql_connect($DB["host"], $DB["user"], $DB["pass"]) or die(@mysql_error()); @mysql_select_db($DB["dbName"]); // Site Setting $ext=".html"; // ==================================================================== // Avoid URL injection code. Easy to improve the security (phising, etc..) // of all your site when if are calling one .php to centralize all your // DB connections. // ==================================================================== // $req = $_SERVER['REQUEST_URI']; // $cadena = explode("?", $req); // $mi_url = $cadena[0]; // $resto = @$cadena[1]; // here you can put your suspicions chains at your will. Just be careful of // possible coincidences with your URL's variables and parameters // $inyecc = '/script|http|<|>|%3c|%3e|SELECT|UNION|UPDATE|AND|exe|exec|INSERT|tmp/i'; // // // detecting // if (preg_match($inyecc, $resto)) { // // make something, in example send an e-mail alert to administrator // //$ip = $_SERVER["HTTP_CLIENT_IP"]; // //$forwarded = $_SERVER["HTTP_X_FORWARDED_FOR"]; // //$remoteaddress = $_SERVER["REMOTE_ADDR"]; // // // $message = "attack injection in $mi_url nnchain: $resto nn from: (ip-forw-RA):- $ip - $forwarded - $remoteaddressnn --- end ---"; // //mail($email_id, "Attack injection", $message, "From: host@{$_SERVER['SERVER_NAME']}", "-fwebmaster@{$_SERVER['SERVER_NAME']}"); // // //message and kill execution // echo 'illegal url'; // die(); // } // ==================================================================== //---------------- End of URL injection ------------------------------- // ==================================================================== function checkInput($inputText){ $outputText=mysql_real_escape_string(trim($inputText)); return $outputText; } function executeQuery($sql) { $result = mysql_query($sql) or die(mysql_error(). " : ".$sql); return $result; } function getSingleResult($sql) { $response=""; $result = mysql_query($sql) or die(mysql_error(). " : ".$sql); if($line=mysql_fetch_row($result)) { $response=$line[0]; } return $response; } function getTableData($sql){ $response=array(); $result = mysql_query($sql) or die(mysql_error(). " : ".$sql); while($line=mysql_fetch_array($result)){ $response[]=$line; } return $response; } function getTableDataByColumn($sql){ $response=array(); $result = mysql_query($sql) or die(mysql_error(). " : ".$sql); for($i=0;$line=mysql_fetch_assoc($result);$i++){ foreach($line as $key=>$value) $response[$key][$i]=$value; } return $response; } function getSingleRow($sql){ $response=array(); $result = mysql_query($sql) or die(mysql_error(). " : ".$sql); if($line=mysql_fetch_array($result)){ $response=$line; } return $response; } function getSingleColumn($sql){ $response=array(); $result = mysql_query($sql) or die(mysql_error(). " : ".$sql); while($line=mysql_fetch_row($result)){ array_push($response,$line[0]); } return $response; } function executeUpdate($sql) { mysql_query($sql) or die(mysql_error(). " : ".$sql); $response = @mysql_affected_rows(); if(is_numeric($response)) return $response; else return 0; } function executeUpdate2($sql) { mysql_query($sql) or die(mysql_error(). " : ".$sql); $response = @mysql_affected_rows(); if(is_numeric($response) && $response>0) return true; else return false; } function cc_encode($s) { $sql="select encode('$s','youngpetals')"; return getSingleResult($sql); } function cc_decode($s) { $s=addslashes($s); $sql="select decode('$s','youngpetals')"; return getSingleResult($sql); } function crypt_now($s) { $new_s=crypt($s,"youngpetals"); return $new_s; } function isValid_password($s,$p){ if(crypt($s,"youngpetals")==$p) { return true; } } function fitContent($cstr, $clen) { $len = strlen(stripslashes($cstr)); if($len > $clen){$dotlist = "..";}else{$dotlist = "";} return trim(substr(stripslashes($cstr),0,$clen)).$dotlist; } function valid_data($document) { $search = array ("'<script[^>]*?>.*?</script>'si", // Strip out javascript "'<[\/\!]*?[^<>]*?>'si", // Strip out html tags "'([\r\n])[\s]+'", // Strip out white space "'&(quot|#34);'i", // Replace html entities "'&(amp|#38);'i", "'&(lt|#60);'i", "'&(gt|#62);'i", "'&(nbsp|#160);'i", "'&(iexcl|#161);'i", "'&(cent|#162);'i", "'&(pound|#163);'i", "'&(copy|#169);'i", "'&#(\d+);'e"); // evaluate as php $replace = array ("", "", "\\1", "\"", "&", "<", ">", " ", chr(161), chr(162), chr(163), chr(169), "chr(\\1)"); $text = @preg_replace ($search, $replace, $document); $text = str_replace("''","'",addslashes($text)); return $text; } function setIFramesPath(){ $path_parts = pathinfo($_SERVER['SCRIPT_FILENAME']); $basename = $path_parts["basename"]; $query_string = $_SERVER['QUERY_STRING']; $full_path = ($query_string!='')?($basename.'?'.$query_string):$basename; return $full_path; } function watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile) { list($width, $height) = getimagesize($SourceFile); $image_p = imagecreatetruecolor($width, $height); //$image = imagecreatefromjpeg($SourceFile); $ext = strtolower(substr(strrchr($SourceFile,"."),1)); if($ext=="jpg" || $ext=="jpeg"){ $image = imagecreatefromjpeg($SourceFile); } if($ext=="gif"){ $image = imagecreatefromgif($SourceFile); } if($ext=="png"){ $image = imagecreatefrompng($SourceFile); } imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height); $black = imagecolorallocate($image_p, 252,26,112); $font = 'arial.ttf'; if($width>350){ $font_size = 14; }else{ $font_size = 8; } $position_x = $width/2-2*strlen($WaterMarkText); $position_y = $height/2; imagettftext($image_p, $font_size, 0, $position_x, $position_y, $black, $font, $WaterMarkText); if ($DestinationFile<>'') { //imagejpeg ($image_p, $DestinationFile, 100); if($ext=="jpg" || $ext=="jpeg"){ imagejpeg ($image_p, $DestinationFile, 100); }if($ext=="gif"){ imagejpeg ($image_p, $DestinationFile, 100); }if($ext=="png"){ imagejpeg ($image_p, $DestinationFile, 100); } } else { header('Content-Type: image/jpeg'); imagejpeg($image_p, null, 100); } imagedestroy($image); imagedestroy($image_p); } //---------------------------------------------Thumb Class------------- class Thumbnail { /** * Thumbnail::Thumbnail() * * @param $resource_file - root or relative path + filename of image to be thumbnailed * @param $max_width - maximum width of thumbnail in pixels * @param $max_height - maximum height of thumbnail in pixels * @param $destination_file - root or relative path + filename(+extension) of saved thumbnail * @param $compression - % quality of output file - 85 is normally considered good * @param $transform - see above * @return */ function Thumbnail($resource_file, $max_width, $max_height, $destination_file="", $compression=80, $transform="") { $this->a = $resource_file; // image to be thumbnailed $this->c = $transform; $this->d = $destination_file; // thumbnail saved to $this->e = $compression; // compression ration for jpeg thumbnails $this->m = $max_width; $this->n = $max_height; $this->compile(); if($this->c !== "") { $this->manipulate(); $this->create(); } } function compile() { $this->h = getimagesize($this->a); if(is_array($this->h)) { $this->i = $this->h[0]; $this->j = $this->h[1]; $this->k = $this->h[2]; $this->o = ($this->i / $this->m); $this->p = ($this->j / $this->n); $this->q = ($this->o > $this->p) ? $this->m : round($this->i / $this->p); // width $this->r = ($this->o > $this->p) ? round($this->j / $this->o) : $this->n; // height } $this->s = ($this->k < 4) ? ($this->k < 3) ? ($this->k < 2) ? ($this->k < 1) ? Null : imagecreatefromgif($this->a) : imagecreatefromjpeg($this->a) : imagecreatefrompng($this->a) : Null; if($this->s !== Null) { $this->t = imagecreatetruecolor($this->q, $this->r); // created thumbnail reference $this->u = imagecopyresampled($this->t, $this->s, 0, 0, 0, 0, $this->q, $this->r, $this->i, $this->j); } } function create() { if($this->s !== Null) { if($this->d !== "") { ob_start(); imagejpeg($this->t, $this->d, $this->e); ob_end_clean(); } imagedestroy($this->s); imagedestroy($this->t); } } } function make_thumb($file_path, $width='', $height='', $prefix='', $target_dir=''){ if($width=='' && $height==''){ $width = 100; $height = 100; } if($width==''){ $width = $height; } if($height==''){ $height = $width; } $path_parts = pathinfo($file_path); if($target_dir==''){ $target_dir = $path_parts["dirname"]; } $thumb_path="$target_dir/".$prefix.$path_parts["basename"]; $th_path=$prefix.$path_parts["basename"]; $variable1 = new Thumbnail($file_path, $width, $height, $thumb_path,85,''); $variable1->create(); return $th_path; } //---------------------------------------------Thumb Class------------- function get_qry_str($over_write_key = array(), $over_write_value= array()) { global $_GET; $m = $_GET; if(is_array($over_write_key)) { $i=0; foreach($over_write_key as $key) { $m[$key] = $over_write_value[$i]; $i++; } }else{ $m[$over_write_key] = $over_write_value; } $qry_str = qry_str($m); return $qry_str; } function qry_str($arr, $skip = '') { $s = "?"; $i = 0; if(count($arr)>0){ foreach($arr as $key => $value) { if ($key != $skip) { if ($i == 0) { $s .= "$key=$value"; $i = 1; } else { $s .= "&$key=$value"; } } } } return $s; } function convert_number_to_words($number) { $hyphen = '-'; $conjunction = ' and '; $separator = ', '; $negative = 'negative '; $decimal = ' point '; $dictionary = array( 0 => 'Zero', 1 => 'One', 2 => 'Two', 3 => 'Three', 4 => 'Four', 5 => 'Five', 6 => 'Six', 7 => 'Seven', 8 => 'Eight', 9 => 'Nine', 10 => 'Ten', 11 => 'Eleven', 12 => 'Twelve', 13 => 'Thirteen', 14 => 'Fourteen', 15 => 'Fifteen', 16 => 'Sixteen', 17 => 'Seventeen', 18 => 'Eighteen', 19 => 'Nineteen', 20 => 'Twenty', 30 => 'Thirty', 40 => 'Fourty', 50 => 'Fifty', 60 => 'Sixty', 70 => 'Seventy', 80 => 'Eighty', 90 => 'Ninety', 100 => 'Hundred', 1000 => 'Thousand', 1000000 => 'Million', 1000000000 => 'Billion', 1000000000000 => 'Trillion', 1000000000000000 => 'Quadrillion', 1000000000000000000 => 'Quintillion' ); if (!is_numeric($number)) { return false; } if (($number >= 0 && (int) $number < 0) || (int) $number < 0 - PHP_INT_MAX) { // overflow trigger_error( 'convert_number_to_words only accepts numbers between -' . PHP_INT_MAX . ' and ' . PHP_INT_MAX, E_USER_WARNING ); return false; } if ($number < 0) { return $negative . convert_number_to_words(abs($number)); } $string = $fraction = null; if (strpos($number, '.') !== false) { list($number, $fraction) = explode('.', $number); } switch (true) { case $number < 21: $string = $dictionary[$number]; break; case $number < 100: $tens = ((int) ($number / 10)) * 10; $units = $number % 10; $string = $dictionary[$tens]; if ($units) { $string .= $hyphen . $dictionary[$units]; } break; case $number < 1000: $hundreds = $number / 100; $remainder = $number % 100; $string = $dictionary[$hundreds] . ' ' . $dictionary[100]; if ($remainder) { $string .= $conjunction . convert_number_to_words($remainder); } break; default: $baseUnit = pow(1000, floor(log($number, 1000))); $numBaseUnits = (int) ($number / $baseUnit); $remainder = $number % $baseUnit; $string = convert_number_to_words($numBaseUnits) . ' ' . $dictionary[$baseUnit]; if ($remainder) { $string .= $remainder < 100 ? $conjunction : $separator; $string .= convert_number_to_words($remainder); } break; } /* if (null !== $fraction && is_numeric($fraction)) { $string .= $decimal; $words = array(); foreach (str_split((string) $fraction) as $number) { $words[] = $dictionary[$number]; } $string .= implode(' ', $words); } */ return $string; } function price2word($price){ if($price>=10000000){ $response = $price/10000000; $response .= " Cr."; } else if($price>=100000){ $response = $price/100000; $response .= " Lakh"; } else{ $response = $price; } return $response; } function total_sundays($month,$year,$day) { $sunday=0; $total_days=cal_days_in_month(CAL_GREGORIAN, $month, $year); for($i=1;$i<=$total_days;$i++) if(date('N',strtotime($year.'-'.$month.'-'.$i))==$day) $sunday++; return $sunday; } function delTree($target) { if (is_readable($target)) { if(is_dir($target)){ $files = glob( $target . '*', GLOB_MARK ); //GLOB_MARK adds a slash to directories returned foreach( $files as $file ) { delTree( $file ); } if (is_readable($target)) return rmdir( $target ); } elseif(is_file($target)) { return unlink( $target ); } } else return false;//"No such file or directory or you are not authorized to delete this directory."; } function deleteData($id,$table,$idcolumn,$file_arr=NULL,$gpath="",$gallery=false){ if($id!="" && $table!="" && $idcolumn!=""){ if(!empty($file_arr)){ while(list($fcolumn,$path)=each($file_arr)){ $file=getSingleResult("SELECT $fcolumn FROM $table WHERE $idcolumn='$id'"); if(!is_dir($path.$file) && is_readable($path.$file) && $file!="no_logo.jpg"){ unlink($path.$file); } } } if($gallery && $gpath!=""){ delTree($gpath.$id); } mysql_query("delete from $table where $idcolumn='$id'"); } } function deleteFile($fpath,$ffile,$sql){ if(is_readable($fpath.$ffile) && $ffile!="" && $ffile!="thumb_" ) { executeUpdate($sql); @unlink($fpath.$ffile); return "File removed from server."; } } function isExists($foreignKey, $tableName, $columnName){ $count = getSingleResult("SELECT COUNT($columnName) FROM $tableName WHERE $columnName='$foreignKey'"); if($count>0) return true; else return false; } function pageUrl($title,$prefix="",$joiner="-",$suffix=""){ if($suffix=="") $suffix = $GLOBALS['ext']; if($prefix!="") $prefix .= $joiner; echo $prefix.str_replace(" ",$joiner,$title).$suffix; } function newsUrl($title){ pageUrl($title, "news"); } function projectUrl($title){ pageUrl($title, "project"); } function propertyUrl($title){ pageUrl($title, "property"); } function locationUrl($title){ pageUrl($title, "location"); } function getPageUrl($title,$prefix="",$joiner="-",$suffix=""){ if($suffix=="") $suffix = $GLOBALS['ext']; if($prefix!="") $prefix .= $joiner; echo $prefix.str_replace(" ",$joiner,$title).$suffix; } ?>