$name){ $DIRS[] = array('title'=> $name, 'dir'=> $dir .'/'); if(!is_dir($PUBLIC_HTML_DIR . $dir)){ mkdir($PUBLIC_HTML_DIR . $dir); } } /* IMAGE_FORMATS - custom image formats for uploading images title - format title dir - hidden directory for custom formats must start with dot(for being invisible in SwampyBrowser) ext - image type and extension. Avaliable formats (png,jpg,gif,false) false means image keeps its orginal extension and image type width/height - formated image width/height in pixels. false meens auto count or leaves orginal scale - there are 5 image scale tipes: orginal - leaves image in its orginal size max - fits image to given size addbs - fits image to given size and adds backgroun to keep given size crop - crops image to given size stretch - stretches image to given size bg - is user only with addbg scale type, it specifies color of added background in HTML color code format mask - path to mask in public_html dir. It adds mask to the image, can be used to place logos on images, mask file must be png image ant fit exact size of given format */ $IMAGE_FORMATS = array ( /// DO NOT DELETE THIS (mthumb format is used for generating thumbnails) 'mthumb' => array('title'=>"", 'dir' => ".mthumbs/", 'ext'=>"png",'width' => 100,'height' => 100,'mask' => false, 'scale'=>"crop", 'bg'=>"FFFFFF"), //custom user predifined format for uploading and formating images 'orginal' => array('title'=>"Orginal", 'dir' => "", 'ext'=>false,'width' => 0, 'height' => 0, 'mask' => false, 'scale'=>"orginal",'bg'=>"FFFFFF"), 'gthumb' => array('title'=>"Gallery thumb", 'dir' => ".gthumb/", 'ext'=>"png",'width' => 160,'height' => 100,'mask' => false, 'scale'=>"addbg",'bg'=>"FFFFFF"), ); /* SwampyBrowser language selection (only English is avalible for now)*/ $LANG = "pl"; if(!$_SESSION['admin']) { header("Location: /admin/login/"); } /* You can add here login check becouse every php script is including this file first before any operation */ ?>