* echo $userinfo['email']; * * array_push($user_list, array("id"=>$userinfo['user_id'], "alias"=>$userinfo['user_alias'], "email"=>$userinfo['email'])); * } else { * echo 'fail to get user list'; * * } * } */ $mysqli->close(); } return $image_list; } $possible_url = array("get_image", "get_all_images"); $value = "An error has occurred"; if (isset($_POST["action"]) && in_array($_POST["action"], $possible_url)) { switch ($_POST["action"]) { case "get_all_images": $value = get_image_list(); break; case "get_image": if (isset($_POST["id"])) { $value = get_image_by_id($_POST["id"]); } else { $value = "Missing argument"; } break; } } // return JSON array exit(json_encode($value));
JavascriptLanguage::getInstance()->addLangVar('Click to zoom out'); JavascriptLanguage::getInstance()->addLangVar('Click to zoom in'); JavascriptLoader::getInstance()->load('documents'); $out = ''; $dspCurDirName = claro_htmlspecialchars($curDirName); $dspCurDirPath = claro_htmlspecialchars($curDirPath); $cmdCurDirPath = rawurlencode($curDirPath); $cmdParentDir = rawurlencode($parentDir); // Define toot title and subtitle $titleElement['mainTitle'] = get_lang("Documents and Links"); if (claro_is_in_a_group() && claro_is_group_allowed()) { $titleElement['supraTitle'] = claro_get_current_group_data('name'); } // Get image list from file list if (($docView == 'image' || $docView == 'thumbnails') && isset($fileList)) { $imageList = get_image_list($fileList, $is_allowedToEdit); } // Command list $cmdList = array(); /* * if the $curDirName is empty, we're in the root point * and we can't go to a parent dir */ if ($curDirName || $cmd == 'exSearch') { $cmdList[] = array('img' => 'parent', 'name' => get_lang('Up'), 'url' => claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exChDir&file=' . download_url_encode($parentDir)))); } $cmdList[] = array('img' => 'search', 'name' => get_lang('Search'), 'url' => claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=rqSearch&cwd=' . $cmdCurDirPath))); if (trim($searchPattern) != '') { $downloadArgument = 'searchPattern=' . rawurlencode($searchPattern); } else { $downloadArgument = 'file=' . download_url_encode($curDirPath);
-or- http://creativecommons.org/licenses/GPL/2.0/ */ require "cpg.php"; if ($_GET['image']) { // selected image from bookmark or get form $file = $_GET['image']; } if ($_FILES['userfile']['tmp_name']) { // Upload detected captain! handle_upload(); } // Recommended Image Form Items $recommended = get_image_list($rec_image_dir); // User Submitted Image $user_submitted = get_image_list($image_dir); // Steps Form Options $step_options = get_steps_list(); // Methods! $method_options = get_method_list(); if ($file) { // hoooo buddy, process the image. $color_palette = get_color_palette($file); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Color Palette Generator</title> <style type="text/css">@import "app.css";</style> <script type="text/javascript" src="funcs.js"></script>