CMS  Version 3.9
image_upload.inc File Reference

Go to the source code of this file.

Variables

 $image_id = checkNumeric($_GET["image_id"])
 
 $gallery_id = checkNumeric($_GET["gallery_id"])
 
 $image = new ImageRecord()
 
if($image_id) else
 
 $title = "Add a New Image to {$gallery->gallery_name}"
 
$image gallery_id = $gallery_id
 
 $form = new AutoForm($image, "POST", "/action/image_picker/image_upload?gallery_id=$gallery_id")
 
$form allowDelete = true
 
$form onSavePreProcess
 
 $imageUpload = new FileUploadFieldRenderer($form, "image_file", "Image File", array(ImageManager, imageUploadHandler))
 
$imageUpload size = 60
 
 $imageTypeSelect = new SelectFieldRenderer($form, "image_type", "Image Type")
 
 if ( $method=="POST")
 

Variable Documentation

◆ $form

$form = new AutoForm($image, "POST", "/action/image_picker/image_upload?gallery_id=$gallery_id")

Definition at line 57 of file image_upload.inc.

◆ $gallery_id

$gallery_id = checkNumeric($_GET["gallery_id"])

Definition at line 38 of file image_upload.inc.

◆ $image

$image = new ImageRecord()

Definition at line 42 of file image_upload.inc.

◆ $image_id

$image_id = checkNumeric($_GET["image_id"])

Definition at line 37 of file image_upload.inc.

◆ $imageTypeSelect

$imageTypeSelect = new SelectFieldRenderer($form, "image_type", "Image Type")

Definition at line 74 of file image_upload.inc.

◆ $imageUpload

$imageUpload = new FileUploadFieldRenderer($form, "image_file", "Image File", array(ImageManager, imageUploadHandler))

Definition at line 68 of file image_upload.inc.

◆ $title

$title = "Add a New Image to {$gallery->gallery_name}"

Definition at line 53 of file image_upload.inc.

◆ allowDelete

$form allowDelete = true

Definition at line 58 of file image_upload.inc.

◆ else

if ( $image_id) else
Initial value:

Definition at line 50 of file image_upload.inc.

◆ gallery_id

$image gallery_id = $gallery_id

Definition at line 54 of file image_upload.inc.

◆ if

if($method=="POST") (   $method = = "POST")

Definition at line 79 of file image_upload.inc.

◆ onSavePreProcess

$form onSavePreProcess
Initial value:
= function($form)
{
global $user;
if ($user)
{
$form->data->owner_id = $user->getPrimaryKeyValue();
}
}
global $user
$form

Definition at line 59 of file image_upload.inc.

◆ size

$imageUpload size = 60

Definition at line 69 of file image_upload.inc.