]*?>.*?@si', // javascript '@]*?>.*?@siU', // style '@<[\/\!]*?[^<>]*?>@si', // htmls '@@' // komentarji ); $text = preg_replace($search, ' ', $document); $text = trim($text); $text = str_replace(" ", " ", $text ); $text = str_replace("\"", " ", $text ); $text = str_replace("š", "š", $text ); $text = str_replace("Š", "Š", $text ); return $text; } public static function left($cNiz, $nLen=150) { $cNiz = trim($cNiz); if (strlen($cNiz) > $nLen) { $cNiz = substr($cNiz, 0, $nLen); if ($nAt=strrpos($cNiz, ' ')) { $cNiz = substr($cNiz, 0, $nAt); } } return $cNiz; } } class Calc{ public static function Price_Discount($price, $discount){ return ($price - ($price * $discount / 100)); } public static function Discount_Price($price, $discounted_price){ return 100 - ($discounted_price / $price ) * 100; } } class Html{ public static function is_empy($str){ $str = Seo::html_to_txt($str); $str = trim($str); return $str; } } class Upload{ /* * @return: * "" - file was not uploaded * "filename" - name of the file * false - error occur * */ public static function File($upload_fieldname, $save_dir, $save_filename = "", $save_overwrite = false){ $upload_file = $_FILES[$upload_fieldname]; if (trim($upload_file['tmp_name']) != '') { $upload_filename = $upload_file['name']; $upload_ext = substr(strrchr($upload_filename, "."), 1); // Save filename if($save_filename == ""){ $save_filename = $upload_filename; } else { $save_filename = $save_filename . ".$upload_ext"; } $save_file_full_path = $save_dir . $save_filename; // Check if can overwrite if(! $save_overwrite){ if(file_exists($save_file_full_path)){ return false; } } // Save file to disk $imagePath = move_uploaded_file($upload_file['tmp_name'], $save_file_full_path); return $save_filename; } return ""; } } class Download{ public static function file($filepath, $filename, $die=true){ if ($fd = fopen ($filepath, "r")) { $fsize = filesize($filepath); $path_parts = pathinfo($filepath); $ext = strtolower($path_parts["extension"]); switch ($ext) { case "pdf": header("Content-type: application/pdf"); // add here more headers for diff. extensions header("Content-Disposition: attachment; filename=\"".$filename."\""); // use 'attachment' to force a download break; default; header("Content-type: application/octet-stream"); header("Content-Disposition: filename=\"".$filename."\""); } header("Content-length: $fsize"); header("Cache-control: private"); //use this to open files directly while(!feof($fd)) { $buffer = fread($fd, 2048); echo $buffer; } } fclose ($fd); exit; if($die){ die(); } } } class Image{ // Rounder corners http://www.assemblysys.com/dataServices/rounded_corners.php public static function Round($file, $corner_image, $radius = 20, $angle = 0, $option = array("topleft" => true, "topright" => true, "bottomleft" => true, "bottomright" => true)){ //$image_file = $_GET['src']; //$corner_radius = isset($_GET['radius']) ? $_GET['radius'] : 20; // The default corner radius is set to 20px //$angle = isset($_GET['angle']) ? $_GET['angle'] : 0; // The default angle is set to 0o $topleft = $option["topleft"]; //(isset($_GET['topleft']) and $_GET['topleft'] == "no") ? false : true; // Top-left rounded corner is shown by default $bottomleft = $option["topright"]; //(isset($_GET['bottomleft']) and $_GET['bottomleft'] == "no") ? false : true; // Bottom-left rounded corner is shown by default $bottomright = $option["bottomleft"]; //(isset($_GET['bottomright']) and $_GET['bottomright'] == "no") ? false : true; // Bottom-right rounded corner is shown by default $topright = $option["bottomright"]; //(isset($_GET['topright']) and $_GET['topright'] == "no") ? false : true; // Top-right rounded corner is shown by default //$images_dir = 'images/'; //http://www.assemblysys.com/dataServices/rounded_corners.php $corner_source = imagecreatefrompng($corner_image);//imagecreatefrompng('images/rounded_corner.png'); $corner_width = imagesx($corner_source); $corner_height = imagesy($corner_source); $corner_resized = ImageCreateTrueColor($radius, $radius); ImageCopyResampled($corner_resized, $corner_source, 0, 0, 0, 0, $radius, $radius, $corner_width, $corner_height); $corner_width = imagesx($corner_resized); $corner_height = imagesy($corner_resized); $image = imagecreatetruecolor($corner_width, $corner_height); $image = imagecreatefromjpeg($file); // replace filename with $_GET['src'] $size = getimagesize($file); // replace filename with $_GET['src'] $white = ImageColorAllocate($image,255,255,255); $black = ImageColorAllocate($image,0,0,0); // Top-left corner if ($topleft == true) { $dest_x = 0; $dest_y = 0; imagecolortransparent($corner_resized, $black); imagecopymerge($image, $corner_resized, $dest_x, $dest_y, 0, 0, $corner_width, $corner_height, 100); } // Bottom-left corner if ($bottomleft == true) { $dest_x = 0; $dest_y = $size[1] - $corner_height; $rotated = imagerotate($corner_resized, 90, 0); imagecolortransparent($rotated, $black); imagecopymerge($image, $rotated, $dest_x, $dest_y, 0, 0, $corner_width, $corner_height, 100); } // Bottom-right corner if ($bottomright == true) { $dest_x = $size[0] - $corner_width; $dest_y = $size[1] - $corner_height; $rotated = imagerotate($corner_resized, 180, 0); imagecolortransparent($rotated, $black); imagecopymerge($image, $rotated, $dest_x, $dest_y, 0, 0, $corner_width, $corner_height, 100); } // Top-right corner if ($topright == true) { $dest_x = $size[0] - $corner_width; $dest_y = 0; $rotated = imagerotate($corner_resized, 270, 0); imagecolortransparent($rotated, $black); imagecopymerge($image, $rotated, $dest_x, $dest_y, 0, 0, $corner_width, $corner_height, 100); } // Rotate image $image = imagerotate($image, $angle, $white); // Output final image imagejpeg($image); imagedestroy($image); imagedestroy($corner_source); } } ?>
0 продукти

Fatal error: Uncaught Error: Class 'Format' not found in /usr/local/lsws/bultehna.bg/html/include/modules/basket/view/mycart_header.php:14 Stack trace: #0 /usr/local/lsws/bultehna.bg/html/include/modules/template.php(38): include() #1 /usr/local/lsws/bultehna.bg/html/include/modules/basket/controller/basket.php(309): Template->fetch() #2 /usr/local/lsws/bultehna.bg/html/include/modules/pagemanager/controller/pagemanager.php(677): Page_Basket->view_mycart_header() #3 /usr/local/lsws/bultehna.bg/html/include/modules/common/controller/common.php(28): PageManager->module_load() #4 /usr/local/lsws/bultehna.bg/html/include/modules/pagemanager/controller/pagemanager.php(677): Page_Common->view_header() #5 /usr/local/lsws/bultehna.bg/html/include/modules/pagemanager/controller/pagemanager.php(559): PageManager->module_load() #6 /usr/local/lsws/bultehna.bg/html/index.php(45): PageManager->load() #7 {main} thrown in /usr/local/lsws/bultehna.bg/html/include/modules/basket/view/mycart_header.php on line 14