6 trace(print_r($_FILES,
true), 2);
13 if (!isset($_FILES[
"photo"]))
26 if (!preg_match(
"/\\.\\w+$/", $_FILES[
"photo"][
"name"]))
30 $_FILES[
"photo"][
"name"] .=
".jpg";
34 $_FILES[
"photo"][
"name"] .=
".png";
52 $image->include_in_slideshow =
false;
54 $image->image_type = $_FILES[
"photo"][
"type"];
static using()
Import the datamodels, views and manifest for the specified component(s).
static end($message="")
Use this method to terminate execution of a script instead of using the php keywords exit() or die().
static isJPG($filename)
Test the contents of the specified file, returning true if a JPEG header signature is found.
static imageUploadHandler($field, $image)
Upload the image file specified in the given field.
static isPNG($filename)
Test the contents of the specified file, returning true if a PNG header signature is found.
if(! $gallery_id) if(!isset($_FILES["photo"])) $gallery
if($gallery->owner_id !=$user->get($user->getPrimaryKey()) &&!checkRole($gallery->write_access)) if(!preg_match("/\\.\\w+$/", $_FILES["photo"]["name"])) $image