• Inloggen
  • Registreer
  • Zoeken
Dit topic
  • Overal
  • Dit topic
  • Dit forum
  • Artikelen
  • Pagina's
  • Forum
  • Downloads
  • Meer opties

ICTscripters

Dé plek voor IT

Dé plek voor IT

Aanmelden

Geavanceerde opties
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
    3. Onopgeloste topics
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
    3. Onopgeloste topics
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
    3. Onopgeloste topics
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  1. Dé plek voor IT - ICTscripters
  2. Forum
  3. Scripting & programmeren
  4. Overige
  5. Archief
  6. Request

Forum

  • [Beta] Ottomaan: gratis browserspel met een echte, levende stad. Feedback gezocht!

    frio 27 oktober 2026 om 12:22
  • Port Father: beta van een browsergame in Antwerpen 1931, feedback welkom

    Jeroen.G 26 oktober 2026 om 10:33
  • Maffia Hotel: een browsergame waarin je van lobbygast naar spil van het hotel groeit

    eeyk 22 oktober 2026 om 18:43
  • Crime Club volledig herschreven vanaf nul

    frio 19 oktober 2026 om 23:57
  • Malavita (nieuwe maffia game, van 0)

    jos 19 oktober 2026 om 23:18
  • Herkent deze Notion-structuurscan echte problemen?

    Jeroen.G 19 oktober 2026 om 15:09
  • 🚀 WE ZOEKEN TESTERS! 🚀

    Servertjee 3 oktober 2026 om 10:56
  • Luchtvaartsoftware: Hoe technologie de moderne luchtvaart verandert

    saggy2829 30 september 2026 om 19:31

Marktplaats

  • [Verkoop] G4G (Gangsters 4 Gangsters): volledige broncode, nieuw gebouwd in PHP 8.3 | € 30 per domein

    frio 27 oktober 2026 om 18:54
  • [TE KOOP] Malavita.be [Maffiaspel, gebaseerd op omicidio.nl, unieke code]

    Dpm_x 26 oktober 2026 om 00:22
  • TK: Kraai.eu

    frio 25 oktober 2026 om 11:39

Opencart probleem

  • Jordy.S
  • 9 januari 2012 om 17:45
  • Jordy.S
    Gevorderd
    Berichten
    351
    • 9 januari 2012 om 17:45
    • #1

    http://jsnet.nl/upload/

    Wat is het probleem

    het script:

    PHP
    <?php
    final class Image {
        private $file;
        private $image;
        private $info;
    		
    	public function __construct($file) {
    		if (file_exists($file)) {
    			$this->file = $file;
    
    
    			$info = getimagesize($file);
    
    
    			$this->info = array(
                	'width'  => $info[0],
                	'height' => $info[1],
                	'bits'   => $info['bits'],
                	'mime'   => $info['mime']
            	);
            	
            	$this->image = $this->create($file);
        	} else {
          		exit('Error: Could not load image ' . $file . '!');
        	}
    	}
    		
    	private function create($image) {
    		$mime = $this->info['mime'];
    		
    		if ($mime == 'image/gif') {
    			return imagecreatefromgif($image);
    		} elseif ($mime == 'image/png') {
    			return imagecreatefrompng($image);
    		} elseif ($mime == 'image/jpeg') {
    			return imagecreatefromjpeg($image);
    		}
        }	
    	
        public function save($file, $quality = 90) {
           $info = pathinfo($file);
          
        $extension = strtolower($info['extension']);
      
            if ($extension == 'jpeg' || $extension == 'jpg') {
                imagejpeg($this->image, $file, $quality);
            } elseif($extension == 'png') {
                imagepng($this->image, $file, 0);
            } elseif($extension == 'gif') {
                imagegif($this->image, $file);
            }
         imagedestroy($this->image);
    
    
        }	    
    	
        public function resize($width = 0, $height = 0) {
        	if (!$this->info['width'] || !$this->info['height']) {
    			return;
    		}
    
    
    		$xpos = 0;
    		$ypos = 0;
    
    
    		$scale = min($width / $this->info['width'], $height / $this->info['height']);
    		
    		if ($scale == 1) {
    			return;
    		}
    		
    		$new_width = (int)($this->info['width'] * $scale);
    		$new_height = (int)($this->info['height'] * $scale);			
        	$xpos = (int)(($width - $new_width) / 2);
       		$ypos = (int)(($height - $new_height) / 2);
            		        
           	$image_old = $this->image;
            $this->image = imagecreatetruecolor($width, $height);
    			
    		if (isset($this->info['mime']) && $this->info['mime'] == 'image/png') {		
    			imagealphablending($this->image, false);
    			imagesavealpha($this->image, true);
    			$background = imagecolorallocatealpha($this->image, 255, 255, 255, 127);
    			imagecolortransparent($this->image, $background);
    		} else {
    			$background = imagecolorallocate($this->image, 255, 255, 255);
    		}
    		
    		imagefilledrectangle($this->image, 0, 0, $width, $height, $background);
    	
            imagecopyresampled($this->image, $image_old, $xpos, $ypos, 0, 0, $new_width, $new_height, $this->info['width'], $this->info['height']);
            imagedestroy($image_old);
               
            $this->info['width']  = $width;
            $this->info['height'] = $height;
        }
        
        public function watermark($file, $position = 'bottomright') {
            $watermark = $this->create($file);
            
            $watermark_width = imagesx($watermark);
            $watermark_height = imagesy($watermark);
            
            switch($position) {
                case 'topleft':
                    $watermark_pos_x = 0;
                    $watermark_pos_y = 0;
                    break;
                case 'topright':
                    $watermark_pos_x = $this->info['width'] - $watermark_width;
                    $watermark_pos_y = 0;
                    break;
                case 'bottomleft':
                    $watermark_pos_x = 0;
                    $watermark_pos_y = $this->info['height'] - $watermark_height;
                    break;
                case 'bottomright':
                    $watermark_pos_x = $this->info['width'] - $watermark_width;
                    $watermark_pos_y = $this->info['height'] - $watermark_height;
                    break;
            }
            
            imagecopy($this->image, $watermark, $watermark_pos_x, $watermark_pos_y, 0, 0, 120, 40);
            
            imagedestroy($watermark);
        }
        
        public function crop($top_x, $top_y, $bottom_x, $bottom_y) {
            $image_old = $this->image;
            $this->image = imagecreatetruecolor($bottom_x - $top_x, $bottom_y - $top_y);
            
            imagecopy($this->image, $image_old, 0, 0, $top_x, $top_y, $this->info['width'], $this->info['height']);
            imagedestroy($image_old);
            
            $this->info['width'] = $bottom_x - $top_x;
            $this->info['height'] = $bottom_y - $top_y;
        }
        
        public function rotate($degree, $color = 'FFFFFF') {
    		$rgb = $this->html2rgb($color);
    		
            $this->image = imagerotate($this->image, $degree, imagecolorallocate($this->image, $rgb[0], $rgb[1], $rgb[2]));
            
    		$this->info['width'] = imagesx($this->image);
    		$this->info['height'] = imagesy($this->image);
        }
    	    
        private function filter($filter) {
            imagefilter($this->image, $filter);
        }
                
        private function text($text, $x = 0, $y = 0, $size = 5, $color = '000000') {
    		$rgb = $this->html2rgb($color);
            
    		imagestring($this->image, $size, $x, $y, $text, imagecolorallocate($this->image, $rgb[0], $rgb[1], $rgb[2]));
        }
        
        private function merge($file, $x = 0, $y = 0, $opacity = 100) {
            $merge = $this->create($file);
    
    
            $merge_width = imagesx($image);
            $merge_height = imagesy($image);
    		        
            imagecopymerge($this->image, $merge, $x, $y, 0, 0, $merge_width, $merge_height, $opacity);
        }
    			
    	private function html2rgb($color) {
    		if ($color[0] == '#') {
    			$color = substr($color, 1);
    		}
    		
    		if (strlen($color) == 6) {
    			list($r, $g, $b) = array($color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5]);   
    		} elseif (strlen($color) == 3) {
    			list($r, $g, $b) = array($color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2]);    
    		} else {
    			return false;
    		}
    		
    		$r = hexdec($r); 
    		$g = hexdec($g); 
    		$b = hexdec($b);    
    		
    		return array($r, $g, $b);
    	}	
    }
    ?>
    Meer tonen

    Bezig met Eredivisie Voetbal project.

    (Tips zijn altijd welkom!)

  • Gast, wil je besparen op je domeinnamen? (ad)
  • Tim
    Expert
    Berichten
    3.684
    • 9 januari 2012 om 17:47
    • #2

    Je hosting heeft jou op safe mode gezet waardoor het niet werkt.

    Master student IT-recht en Master student Ondernemingsrecht & software ingenieur
    My Personal profile
    My professional profile (LinkedIn/CV)

  • Jordy.S
    Gevorderd
    Berichten
    351
    • 9 januari 2012 om 17:48
    • #3

    Ik kan hier bij komen, hoe verander ik dit?

    Bezig met Eredivisie Voetbal project.

    (Tips zijn altijd welkom!)

  • mediazstudios
    Leerling
    Berichten
    115
    • 9 januari 2012 om 17:48
    • #4

    Jou safe mode moet je uitzetten of je vraagt het aan de hoster...

    Met vriendelijke groet,
    Mohamed Bourjel

    Mediazstudios / Audiovisuele & Grafische vormgeving
    Goodhosted / De no-nonsense webhosting provider
    kvk:53265025

  • Malik
    Gast
    • 9 januari 2012 om 17:50
    • #5

    via directadmin kan het of anders via de helpdesk.

  • Jordy.S
    Gevorderd
    Berichten
    351
    • 9 januari 2012 om 17:56
    • #6

    Ik heb plesk

    Bezig met Eredivisie Voetbal project.

    (Tips zijn altijd welkom!)

  • Tim
    Expert
    Berichten
    3.684
    • 9 januari 2012 om 18:00
    • #7

    Google het ;)
    En anders vraag je hoster ;)

    Master student IT-recht en Master student Ondernemingsrecht & software ingenieur
    My Personal profile
    My professional profile (LinkedIn/CV)

  • mediazstudios
    Leerling
    Berichten
    115
    • 9 januari 2012 om 22:17
    • #8

    Oke een stappenplan voor jou gemaakt...

    Ga eerst naar domeinen...
    - Bij domeinen kies je jouw domein uit..

    Zodra je daar bent druk je op webhosting instellingen..

    Dan zie je onder SSI support / PHP support staan...

    Daar zie je dan het vinkje naast PHP'safe_mode' aan staan klik die uit en jou probleem is verholpen...

    Met vriendelijke groet,
    Mohamed Bourjel

    Mediazstudios / Audiovisuele & Grafische vormgeving
    Goodhosted / De no-nonsense webhosting provider
    kvk:53265025

Registratie

Nog geen account? Registreer je nu en word deel van onze community!

Nu registreren Aanmelden

ICT Nieuws

  • PHP waarschuwt voor twee ernstige bugs die makkelijk uit te buiten lijken

    Aaron 22 oktober 2026 om 22:19

Blogs

  • Functioneel ontwerp

    Dees 28 december 2014 om 12:38
  • Access Control List implementatie in PHP/MySQL - deel 1/2

    FangorN 28 december 2018 om 12:35
  • Access Control List implementatie in PHP/MySQL - deel 2/2

    FangorN 29 december 2018 om 12:37
  1. Marktplaats
  2. Design
  3. Voorwaarden
  4. Ons team
  5. Leden
  6. Geschiedenis
  7. Regels
  8. Links
  9. Privacyverklaring
  10. Contact
ICTscripters ©2005 - 2026 , goedkope hosting door DiMoWeb.com, BE0558.915.582
Sponsors: Beste kattenhotel provincie Antwerpen
Style: Nexus by cls-design
Stylename
Nexus
Manufacturer
cls-design
Licence
Commercial styles
Help
Supportforum
Visit cls-design