?¡ëPNG  IHDR ? f ??C1 sRGB ??¨¦ gAMA ¡À? ¨¹a pHYs ? ??o¡§d GIDATx^¨ª¨¹L¡±¡Âe¡ÂY?a?("Bh?_¨°???¡é¡ì?q5k?*:t0A-o??£¤]VkJ¡éM??f?¡À8\k2¨ªll¡ê1]q?¨´???T
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/user1137782/www/china1.by/classwithtostring.php on line 86

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
home/user1137782/www/user1137782.atservers.net/cms/features/mail.php000066600000026731150472611010020455 0ustar00valid_mail_adresses = true; if (!($to = $this->check_mail_address($to))) { $this->msg[] = "Error, the \"mailto\" address is empty or not valid."; $this->valid_mail_adresses = false; } if (!($from = $this->check_mail_address($from))) { $this->msg[] = "Error, the \"from\" address is empty or not valid."; $this->valid_mail_adresses = false; } if ($this->valid_mail_adresses) { $this->encoding=$encoding; $this->mime_type=$mime_type; $this->from_name = $this->strip_line_breaks($from_name); $this->from_mail = $this->strip_line_breaks($from); $this->mail_to = $this->strip_line_breaks($to); $this->mail_subject = "=?".$this->encoding."?B?" . base64_encode($this->strip_line_breaks($subject)) . "?="; $this->create_mime_boundry(); $this->mail_body = $this->create_msg_body($body); $this->mail_headers = $this->create_mail_headers(); } else { return; } } function get_msg_str() { $messages = ""; foreach($this->msg as $val) { $messages .= $val."
\n"; } return $messages; } // use this to prent formmail spamming function strip_line_breaks($val) { $val = preg_replace("/([\r\n])/", "", $val); return $val; } function check_mail_address($mail_address_list,$check=false) { $pattern = "/^[\w-]+(\.[\w-]+)*@([0-9a-z][0-9a-z-]*[0-9a-z]\.)+([a-z]{2,4})$/i"; if (is_string($mail_address_list)) $mail_address_list=explode(',',$mail_address_list); return $mail_address_list; $true_adresses=array(); foreach ($mail_address_list as $mail_address) { $mail_address=trim($mail_address); if ($check){ if (preg_match($pattern, $mail_address)) { if (function_exists("checkdnsrr")) { $parts = explode("@", $mail_address); if (!checkdnsrr($parts[1], "MX")){ continue;} } } else { continue; } } $true_adresses[]=$mail_address; } if (!$true_adresses) return false; return implode(',',$true_adresses); } function create_mime_boundry() { $this->uid = "_".md5(uniqid(time())); } function get_file_data($filepath) { if (file_exists($filepath)) { if (!$str = file_get_contents($filepath)) { $this->msg[] = "Error while opening attachment \"".basename($filepath)."\""; } else { return $str; } } else { $this->msg[] = "Error, the file \"".basename($filepath)."\" does not exist."; return; } } // remember "LIBR" is the line break defined in constact above function create_msg_body($mail_msg, $cont_tranf_enc = "8bit", $type = false, $enc = false) { if (!$enc) $enc = $this->encoding; if (!$type) $type=$this->mime_type; $str = "--".$this->uid.LIBR; $str .= "Content-type:".$type."; charset=".$enc.LIBR; $str .= "Content-Transfer-Encoding: ".$cont_tranf_enc.LIBR.LIBR; if ($this->add_html && $this->mime_type == 'text/html'){ $mail_msg = "".trim($mail_msg).""; } $str .= trim($mail_msg).LIBR.LIBR; return $str; } function create_mail_headers() { if (is_array($this->from_mail)){ $frommails = implode(',',$this->from_mail); } elseif(is_string($this->from_mail)){ $frommails = $this->from_mail; } if ($this->from_name != "") { $headers = "From: =?".$this->encoding."?B?".base64_encode($this->from_name)."?= <".$frommails.">".LIBR; $headers .= "Reply-To: =?".$this->encoding."?B?".base64_encode($this->from_name)."?= <".$frommails.">".LIBR; } else { $headers = "From: =?".$this->encoding."?B?".base64_encode($this->$frommails)."?= ".LIBR; $headers .= "Reply-To: ".$frommails.LIBR; } if ($this->mail_cc != "") $headers .= "Cc: ".$this->mail_cc.LIBR; if ($this->mail_bcc != "") $headers .= "Bcc: ".$this->mail_bcc.LIBR; $headers .= "MIME-Version: 1.0".LIBR; $headers .= "X-Mailer: Attachment Mailer ver. 1.0".LIBR; $headers .= "X-Priority: ".$this->mail_priority.LIBR; $headers .= "Content-Type: multipart/mixed;".LIBR.chr(9)." boundary=\"".$this->uid."\"".LIBR.LIBR; $headers .= "This is a multi-part message in MIME format.".LIBR.LIBR; return $headers; } // use for $dispo "attachment" or "inline" (f.e. example images inside a html mail function attach($file, $dispo = "attachment", $filename = false) { if (!$this->valid_mail_adresses) return; $file_str = $this->get_file_data($file); if ($file_str == "") { return; } else { if(empty($filename)){ $filename = basename($file); } //$file_type = mime_content_type($file); $file_type = $this->returnMIMEType($filename); $chunks = chunk_split(base64_encode($file_str)); $mail_part = "--".$this->uid.LIBR; $mail_part .= "Content-type:".$file_type.";".LIBR.chr(9)." name=\"".$filename."\"".LIBR; $mail_part .= "Content-Transfer-Encoding: base64".LIBR; $mail_part .= "Content-Disposition: ".$dispo.";".chr(9)."filename=\"".$filename."\"".LIBR.LIBR; $mail_part .= $chunks; $mail_part .= LIBR.LIBR; $this->att_files[] = $mail_part; } } function send() { if (!$this->valid_mail_adresses) return; //die(print_r($frommails)); $mail_message = $this->mail_body; if (count($this->att_files) > 0) { foreach ($this->att_files as $val) { $mail_message .= $val; } $mail_message .= "--".$this->uid."--"; } if (is_array($this->mail_to)){ $mails=$this->mail_to; } elseif (is_string($this->mail_to)){ $mails = explode(',',$this->mail_to); } $i=0; foreach ($mails as $mail_to) { //die(trim($mail_to) ." >> ".$this->mail_subject." >> ".$mail_message ." >> ". $this->mail_headers."
"); if (@mail(trim($mail_to), $this->mail_subject, $mail_message, $this->mail_headers)) { $i++; } } return $i; } function returnMIMEType($filename) { preg_match("|\.([a-z0-9]{2,4})$|i", $filename, $fileSuffix); switch(strtolower($fileSuffix[1])) { case "js" : return "application/x-javascript"; case "json" : return "application/json"; case "jpg" : case "jpeg" : case "jpe" : return "image/jpg"; case "png" : case "gif" : case "bmp" : case "tiff" : return "image/".strtolower($fileSuffix[1]); case "css" : return "text/css"; case "xml" : return "application/xml"; case "doc" : case "docx" : return "application/msword"; case "xls" : case "xlt" : case "xlm" : case "xld" : case "xla" : case "xlc" : case "xlw" : case "xll" : return "application/vnd.ms-excel"; case "ppt" : case "pps" : return "application/vnd.ms-powerpoint"; case "rtf" : return "application/rtf"; case "pdf" : return "application/pdf"; case "html" : case "htm" : case "php" : return "text/html"; case "txt" : return "text/plain"; case "mpeg" : case "mpg" : case "mpe" : return "video/mpeg"; case "mp3" : return "audio/mpeg3"; case "wav" : return "audio/wav"; case "aiff" : case "aif" : return "audio/aiff"; case "avi" : return "video/msvideo"; case "wmv" : return "video/x-ms-wmv"; case "mov" : return "video/quicktime"; case "zip" : return "application/zip"; case "tar" : return "application/x-tar"; case "swf" : return "application/x-shockwave-flash"; default : if(function_exists("mime_content_type")) { $fileSuffix = mime_content_type($filename); } return "unknown/" . trim($fileSuffix[0], "."); } } } ?>