<?php $fieldname = 'image'; $savepath = $_SERVER['DOCUMENT_ROOT'] . '/images/avatars'; $savename = isset($_GET['savename']) ? $_GET['savename'] : ''; if (empty($savename)) { $savename = isset($_POST['savename']) ? $_POST['savename'] : ''; } $config = array('savepath' => $savepath, 'savename' => $savename); /*----*/ $step = 1; require 'ImageEdit.php'; $imageEdit = new ImageEdit($config); $imageEdit->run(); $vals = $imageEdit->getValues(); if ($vals['has_img']) { $step = 2; } if ($vals['saved']) { $step = 3; } ?> <!DOCTYPE html> <head> <meta charset="utf-8"> <title>Image Editor</title> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/bootstrap-jasny.min.css"> <link rel="stylesheet" href="css/jquery.Jcrop.min.css"> <link rel="stylesheet" href="css/style.min.css"> </head>
public static function hookRemoteCall(Context $ctx) { $img = new ImageEdit($ctx); $img->sendFile(); exit; }