function processRequest() { // if POST // -> handle Upload if ($_SERVER['REQUEST_METHOD'] == "POST") { header('Content-type: application/json'); echo json_encode(processUpload()); } else { $imageId = getRequestParameter("img"); header("Content-type: image/jpeg"); echo showImage($imageId); } }
public function getBranch() { $branches = Branch::all(); return Datatables::of($branches)->edit_column('image', function ($row) { if (!empty($row->image)) { return showImage($row->image, BRANCH_IMAGE . showDate($row->created, 1)); } })->edit_column('status', function ($row) { return showSelectStatus($row->id, $row->status, 'Kacana.product.branch.setStatusBranch(' . $row->id . ', 1)', 'Kacana.product.branch.setStatusBranch(' . $row->id . ', 0)'); })->edit_column('created', function ($row) { return showDate($row->created); })->edit_column('updated', function ($row) { return showDate($row->updated); })->add_column('action', function ($row) { return showActionButton('Kacana.product.branch.showEditBranchForm(' . $row->id . ')', 'Kacana.product.branch.removeBranch(' . $row->id . ')', true); })->make(true); }
/** * get products * * @return Response */ public function getProduct() { $products = Product::all(); return Datatables::of($products)->edit_column('image', function ($row) { if (!empty($row->image)) { return showImage($row->image, PRODUCT_IMAGE . $row->id); } })->edit_column('status', function ($row) { return showSelectStatus($row->id, $row->status, 'Kacana.product.setStatus(' . $row->id . ', 1)', 'Kacana.product.setStatus(' . $row->id . ', 0)'); })->edit_column('created', function ($row) { return showDate($row->created); })->edit_column('updated', function ($row) { return showDate($row->updated); })->add_column('action', function ($row) { return showActionButton("/product/editProduct/" . $row->id, 'Kacana.product.removeProduct(' . $row->id . ')', false, false); })->make(true); }
public function getUser() { $users = User::all(); return Datatables::of($users)->edit_column('image', function ($row) { if (!empty($row->image)) { return showImage($row->image, PRODUCT_IMAGE . $row->id); } })->edit_column('status', function ($row) { return showSelectStatus($row->id, $row->status, 'Kacana.user.setStatus(' . $row->id . ', 1)', 'Kacana.user.setStatus(' . $row->id . ', 0)'); })->edit_column('created', function ($row) { return showDate($row->created); })->edit_column('updated', function ($row) { return showDate($row->updated); })->add_column('action', function ($row) { return showActionButton('Kacana.user.show(' . $row->id . ')', 'Kacana.product.branch.removeBranch(' . $row->id . ')', true); })->make(true); }
<?php include('rotator.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <body> <p>Reload to see a random image.</p> <?php showImage(); ?> </body> </html>
if (isset($_GET['page'])) { $page = sanitizeString($_GET['page']); } $offset = ($page - 1) * $num_per_page; $query = "SELECT * FROM messages WHERE recip='{$view}' ORDER BY time DESC LIMIT {$num_per_page} OFFSET {$offset}"; $result = queryMysql($query); $num = $result->num_rows; $end = min($num, $num_per_page); if ($num) { echo "<p class='page'>page "; $href = "messages.php?view={$view}"; showPage($page, $pages, $href); for ($i = 0; $i < $end; $i++) { $row = $result->fetch_array(MYSQLI_ASSOC); if ($row['pm'] == 0 || strtolower($row['auth']) == strtolower($user) || strtolower($row['recip']) == strtolower($user)) { echo "<div class='message clearfix'><a href='members.php?view=" . $row['auth'] . "'>" . showImage($row['auth']) . "<div class='message-text'>" . $row['auth'] . "</a>"; // public messages if ($row['pm'] == 0) { echo " wrote: "" . $row['message'] . """; } else { echo " whispered: <span class='whisper'><i>"" . $row['message'] . ""</i></span>"; } if (strtolower($row['recip']) == strtolower($user)) { echo "<span class='action'>[<a href='messages.php?erase=" . $row['id'] . "'>erase</a>]</span>"; } echo "<p class='date'>" . date(' M jS \'y g:ia', $row['time']) . "</p>"; echo "</div></div>"; } } echo "<p class='page'>page "; showPage($page, $pages, $href);
$pdo = $db->getPDO(); $stmt = $pdo->prepare("SELECT image_id FROM image_data WHERE user_id = :user_id"); try { $stmt->execute(array('user_id' => $user_id)); $row = $stmt->fetchAll(); return $row; } catch (Exception $e) { echo 'Message: ' . $e->getMessage() . '<br />'; } } // end showUserImages function showImage($image_id) { $db = new DbAccess(); $pdo = $db->getPDO(); $stmt = $pdo->prepare("SELECT image_filename FROM image_data WHERE image_id = :image_id"); try { $stmt->execute(array('image_id' => $image_id)); $row = $stmt->fetch(); return $row['image_filename']; } catch (Exception $e) { echo 'Message: ' . $e->getMessage() . '<br />'; } } // end showImage foreach (showUserImages(4571) as $key) { foreach ($key as $imggg) { echo showImage($imggg); echo '<img src="' . showImage($imggg) . '"/>' . '<br />'; } }
<table cellpadding="1" cellspacing="1" border="0" width="100%"> <form name="helpForm" action="<?php print $_SERVER['PHP_SELF']; ?> " method="get" enctype="multipart/form-data"> <tr> <td colspan="2" width="100%"> Use this to find directories and files which can be used below: </td> </tr> <tr> <td align="right"> <a href="javascript:document.helpForm.submit();" title="browse tree"> <?php echo showImage('images/rc-gui-install-24.png', '24', '24'); ?> </a> </td> <td> <input size="60" type="text" name="fileName" value="<?php print $filename; ?> " class="text" /> </td> </tr> <tr> <td> <input type="submit" name="helpdata" value="close" class="button" onclick="window.close();" /> </td> <td align="right">
<!-- 相册 --> <table id="image_table" width="100%" class="form_table" align="center" style="display:none;"> <tr><td><input id="add_image" type="button" value="添加一张" /></td></tr> <tr><td> </td></tr> <tr><td> <ul id="image_ul"> <?php foreach ($gpData as $k => $v) { ?> <li> <input pic_id="<?php echo $v['id']; ?> " type="button" value="删除" /><br /> <?php showImage($v['sm_image_url']); ?> </li> <?php } ?> </ul> </td></tr> <tr><td> </td></tr> </table> <div class="button-div"> <input type="submit" value=" 确定 " class="button"/> <input type="reset" value=" 重置 " class="button" /> </div> </form> </div>
function popFile($url, $width = 80, $ext = "jpg") { if ($ext == "swf") { $url = showFlash($url, $width, 60) . "<br>" . "<a target='_blank' href={$url}>Full Screen</a>"; } else { $url = "<a target='_blank' href={$url}>" . showImage($url, 80) . "</a>"; } return $url; }
queryMysql("INSERT INTO friends VALUES('{$user}', '{$add}')"); } } elseif (isset($_GET['remove'])) { $remove = sanitizeString($_GET['remove']); queryMysql("DELETE FROM friends WHERE user='******' AND friend='{$remove}'"); } // display members $result = queryMysql("SELECT user FROM members ORDER BY user"); $num = $result->num_rows; echo "<h3 class='title'>Other members</h3><div class='display'><ul>"; for ($i = 0; $i < $num; $i++) { $row = $result->fetch_array(MYSQLI_ASSOC); if (strtolower($row['user']) == strtolower($user)) { continue; } echo "<li class='clearfix'><a href='members.php?view=" . $row['user'] . "'>" . showImage($row['user']) . $row['user'] . "</a>"; // check friend status $follow = "follow"; $result1 = queryMysql("SELECT * FROM friends WHERE user='******' AND friend='" . $row['user'] . "'"); $t1 = $result1->num_rows; $result1 = queryMysql("SELECT * FROM friends WHERE user='******'user'] . "' AND friend='{$user}'"); $t2 = $result1->num_rows; if ($t1 + $t2 > 1) { echo "<span class='state'>↔ is a mutual friend.</span>"; } elseif ($t1) { echo "<span class='state'>← you are following</span>"; } elseif ($t2) { echo "<span class='state'>→ is following you</span>"; $follow = 'recip'; } if (!$t1) {
<?php require VIEWS . '_layout/header.php'; ?> <div class="content"> <div class="multimedia imagenes"> <div id="accordion" style="width:100%"> <?php foreach ($dirs as $i => $dir) { $path = !$i ? $dir : $dirs[0] . DIRECTORY_SEPARATOR . $dir; $gallery_imgs = scandir(PUBLICO . $path, 1); $cat = $dir == $dirs[0] ? 'índice' : $dir; echo "<h3>{$cat}</h3>"; echo "<div>"; foreach ($gallery_imgs as $id => $img) { $url = PUBLICO . $path . DIRECTORY_SEPARATOR . $img; if (isImageValid($url)) { $urlimg = URL . $path . DIRECTORY_SEPARATOR . $img; showImage($id, $urlimg); } } echo "</div>"; } ?> <!-- </div> --> </div> </div> </div> <?php require VIEWS . '_layout/footer.php';
<h1><?php echo $_SESSION['pengar']; ?> € jäljellä</h1> <form method="POST"> <h2 id="betsize">Panos: <?php echo $_SESSION['bet']; ?> </h2> <input type="range" min="10" max="100" name="bet" value="<?php echo $_SESSION['bet']; ?> " onchange="document.getElementById('betsize').innerHTML = 'Panos: ' + value"> <button type="submit" name="run" class="full">Pelaa!</button> </form> <?php if (isset($_POST['run'])) { for ($i = 0; $i < $quantity; $i++) { echo showImage($nums[$i]); } } if ($_SESSION['won'] != '') { echo "<script>alert('" . $_SESSION['won'] . "');</script>"; } ?> </body> </html>
$following = array_diff($following, $mutual); $friends = FALSE; if (sizeof($mutual)) { echo "<span class='subhead'>{$name2} mutual friends</span><ul>"; foreach ($mutual as $friend) { echo "<li class='clearfix'><a href='members.php?view={$friend}'>" . showImage($friend) . "{$friend}</a></li>"; } echo "</ul>"; $friends = TRUE; } if (sizeof($followers)) { echo "<span class='subhead'>{$name2} followers</span><ul>"; foreach ($followers as $friend) { echo "<li class='clearfix'><a href='members.php?view={$friend}'>" . showImage($friend) . "{$friend}</a></li>"; } echo "</ul>"; $friends = TRUE; } if (sizeof($following)) { echo "<span class='subhead'>{$name3} following</span><ul>"; foreach ($following as $friend) { echo "<li class='clearfix'><a href='members.php?view={$friend}'>" . showImage($friend) . "{$friend}</a></li>"; } echo "</ul>"; $friends = TRUE; } if (!$friends) { echo "<br>You don't have any friends yet.<br><br>"; } echo "</div>"; include_once '../templates/footer.php';
function getTrackArt() { $display = new jzDisplay(); $track =& new jzMediaTrack($_GET['jz_path'], "id"); $album = $track->getAncestor("album"); $art = $album->getMainArt(false, true, "audio", true); if ($_GET['type'] == 'xml') { echoXMLHeader(); echo " <track>\n"; echo " <name>" . xmlentities($track->getName()) . "</name>\n"; echo " <image>"; if ($art) { echo xmlentities($display->returnImage($art, false, false, false, "limit", false, false, false, false, false, "0", false, true, true)); } echo " </image>\n"; echo " <thumbnail>"; $art = $album->getMainArt('75x75', true, "audio", true); if ($art) { echo xmlentities($display->returnImage($art, false, 75, 75, "limit", false, false, false, false, false, "0", false, true, true)); } echo " </thumbnail>\n"; echo " </track>\n"; echoXMLFooter(); } else { showImage($art); } }
</tr> <tr> <td> <input type="text" placeholder="设备数量" name="device_number" autocomplete="off" class="input-text" value="<?php echo $data["device_number"]; ?> " style=" width:150px"> </td> </tr> <tr> <td> <span style="margin-left:-55px">原图:</span> <?php showImage($data['sm_img'], 100); ?> </td> </tr> <tr> <td> <span>修改图片:</span> <input size="60" type="file" name="device_img" value="" autocomplete="off" style=" width:150px"/> </td> </tr> <tr> <td>
if ($mysqli->connect_errno) { echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error; } $id = $_REQUEST['id']; echo "id=" . $id; $query = "SELECT upload_filename, db_filename, filepath, filesize, width, height, file_type, upload_date\n\t FROM image_files WHERE id = '{$id}'"; $result = $mysqli->query($query); if ($mysqli->error) { echo "fail to select dberror = " . $mysqli->error; } $row = mysqli_fetch_array($result, MYSQLI_ASSOC); echo "dbfilename : " . $row['db_filename']; $name = $_SERVER['DOCUMENT_ROOT'] . "/web_test/image_test/upload_image/" . $row['db_filename']; $imagesize = getimagesize($name); // echo "<td><a href='javascript:image_view(\"{$row['db_filename']}\",{$imagesize[0]},{$imagesize[1]});'>".htmlspecialchars($row['upload_filename'])."</a></td>"; showImage($row['db_filename']); // echo '<img src="data:'.$row['file_type'].';'.$row['db_filename'].'"/>'; // 이미지 뿌리기 $mysqli->close(); } else { echo "no id"; } function showImage($image_name) { if (isset($image_name)) { // 이미지 파일명 // 이미지 전체경로를 포함한 이미지명 $image_path = $_SERVER['DOCUMENT_ROOT'] . '/web_test/image_test/upload_image/' . $image_name; echo "image_path : " . $image_path; // 넘어온 이미지경로의 존재여부와 파일여부 확인 if (file_exists($image_path) && is_file($image_path)) { // 넘어온 파일 확장자 추출
Hình Ảnh: </div> <div class="col-md-8 require"> <div class="red">*</div> <div class="addon addon-right"> <input type="text" name="image" class="form-control" id="imageproduct" value="<?php echo $data->image; ?> " /> <i class="fa fa-upload addon-icon showupload" href="#imageproduct" title="upload image"></i> </div> <div class="boxupload"> <span class="showimage"> Xem hình ảnh</span> <img src="<?php echo showImage($data->image); ?> " class="showimg" /> </div> <span class="desc">Copy url hình ảnh và dán vào hoặc click vào icon upload để upload ảnh mới. Kích thước chuẩn 458x458</span> </div> </div><br /> </div> <div class="col-md-6"> <div class="row"> <div class="col-md-4"> Số Lượng: </div> <div class="col-md-8 require"> <div class="red">*</div> <input type="text" name="quantity" class="form-control" value="{{$data->quantity}}" />
echo "<div class='display'><h2 class='title'>Course Discussions</h2>"; // determine the total pages $result_page = queryMysql("SELECT * FROM discussions WHERE course='{$view}'"); $pages = ceil($result_page->num_rows / $num_per_page); if ($pages) { echo "<p class='page'>page "; $href = "group.php?view={$view}"; showPage($page, $pages, $href); echo "</p>"; $result_dis = queryMysql("SELECT * FROM discussions WHERE course='{$view}' ORDER BY time DESC LIMIT {$num_per_page} OFFSET {$offset}"); $num_dis = $result_dis->num_rows; if ($num_dis) { $end = min($num_dis, $num_per_page); for ($i = 0; $i < $end; $i++) { $row_dis = $result_dis->fetch_array(MYSQLI_ASSOC); echo "<div class='message clearfix'><a href='members.php?view=" . $row_dis['user'] . "'>" . showImage($row_dis['user']) . "<div class='message-text'>" . $row_dis['user'] . "</a>: " . "<span>" . $row_dis['message'] . "</span>"; if (strtolower($row_dis['user']) == strtolower($user)) { echo "<span class='action'>[<a href='group.php?view={$view}&page={$page}&erase=" . $row_dis['id'] . "'>erase</a>]</span>"; } echo "<p class='date'>" . date(' M jS \'y g:ia', $row_dis['time']) . "</p>"; echo "</div></div>"; } } else { echo "<p>Page {$page} not found.</p>"; } echo "<p class='page'>page "; showPage($page, $pages, $href); echo "</p>"; } else { echo "<p>No discussions yet.</p>"; }
showImage($goods['sm_logo']); ?> </a> </li> <?php foreach ($pics as $k => $v) { ?> <li> <a href="javascript:void(0);" rel="{gallery: 'gal1', smallimage: '<?php echo $imgUrl . $v['pic']; ?> ',largeimage: '<?php echo $imgUrl . $v['pic']; ?> '}"><?php showImage($v['sm_pic']); ?> </a> </li> <?php } ?> </ul> </div> </div> </div> <!-- 图片预览区域 end --> <!-- 商品基本信息区域 start -->
// Now let's update audioscrobbler $el->setStartTime(time()); if ($enable_audioscrobbler == "true") { $jzSERVICES->loadService("reporting", "audioscrobbler"); $jzSERVICES->updatePlayCountReporting($el); } } $meta = $el->getMeta(); if ($meta['artist'] != "" and $meta['artist'] != "-") { $title = $meta['artist'] . " - " . $el->getName(); } else { $title = $el->getName(); } if (isset($_GET['jz_user'])) { $be->setPlaying($_GET['jz_user'], $el, $_GET['sid']); } session_write_close(); // Close session while file is streaming sendMedia($el->getFileName("host"), $title, $resample); } exit; break; // download a collection of media: // download a collection of media: case "image": if (preg_match("/\\.({$ext_graphic})\$/i", $_GET['jz_path'])) { showImage($_GET['jz_path']); } exit; break; }
.filter-<?php print sanitize($dir); ?> .item-<?php print sanitize($dir); ?> { display: block; } <?php } } ?> </style> <div class="row items"> <div id="filters" class="filter-all"> <?php foreach (glob('*') as $dir) { if (is_dir($dir)) { foreach (glob("{$dir}/*.*") as $img) { showImage($img, $dir); } } else { if (!preg_match("#\\.php\$#", $dir) && !preg_match("#^thumb#", $dir)) { showImage($dir); } } } ?> </div> </div>
<th>操作</th> </tr> <?php foreach ($data as $k => $v) { ?> <tr class="tron"> <td align="center"><?php echo $v['id']; ?> </td> <td align="center"><?php echo $v['goods_name']; ?> </td> <td align="center"><?php showImage($v['sm_logo'], 50); ?> </td> <td align="center"> <a onclick="return confirm('确定要还原吗?');" href="<?php echo U('recycle?id=' . $v['id']); ?> ">还原</a> <a onclick="return confirm('确定要删除吗?');" href="<?php echo U('delete?id=' . $v['id']); ?> ">彻底删除</a> </td> </tr> <?php }
switch ($action) { case 'detail': showCategories($mode); showDetail($ASIN, $mode); break; case 'addtocart': case 'deletefromcart': case 'emptycart': case 'showcart': echo "<hr /><h1>Your shopping cart</h1>"; showCart($_SESSION['cart'], $mode); break; case 'image': showCategories($mode); echo "<h1>Large Product Image</h1>"; showImage($ASIN, $mode); break; case 'search': showCategories($mode); echo "<h1>Search Results For " . $search . "</h1>"; showSearch($search, $page, $mode); break; case 'browsenode': default: showCategories($mode); $category = getCategoryName($browseNode); if (!$category || $category == 'Best Selling Books') { echo "<h1>Current Best Sellers</h1>"; } else { echo "<h1>Current Best Sellers in " . $category . "</h1>"; }
echo $v["goods_id"]; ?> " goods_attr_id="<?php echo $v["goods_attr_id"]; ?> "> <td><input type="checkbox" value="<?php echo $v["goods_id"]; ?> -<?php echo $v["goods_attr_id"]; ?> " name="buythis[]" /></td> <td class="col1"> <a href=""><?php showImage($v['sm_logo']); ?> </a> <strong><a href=""><?php echo $v["goods_name"]; ?> </a></strong></td> <td class="col2"> <?php echo $v["goods_attr_str"]; ?> </td> <td class="col3">¥<span><?php echo $v["price"]; ?> </span>元</td> <td class="col4"> <a href="javascript:;" class="reduce_num"></a>
/* * See bug #23069 */ if (WEBINSTALLER && WINDOWS) { $php_sapi_name = win32DetectPHPSAPI(); if ($php_sapi_name == 'cgi') { $msg = nl2br("\nSorry! The PEAR installer actually does not work on Windows platform\nusing CGI and Apache. Please install the module SAPI (see\nhttp://www.php.net/manual/en/install.apache.php for the instructions) or\nuse the CLI (cli\\php.exe) in the console.\n"); displayHTML('error', $msg); } } if (WEBINSTALLER && isset($_GET['action']) && $_GET['action'] == 'img' && isset($_GET['img'])) { switch ($_GET['img']) { case 'note': case 'pearlogo': case 'smallpear': showImage($_GET['img']); exit; default: exit; } } // Check if PHP version is sufficient if (function_exists("version_compare") && version_compare(phpversion(), "4.3.0", '<')) { die("Sorry! Your PHP version is too old. PEAR and this script requires at\nleast PHP 4.3.0 for stable operation.\n\nIt may be that you have a newer version of PHP installed in your web\nserver, but an older version installed as the 'php' command. In this\ncase, you need to rebuilt PHP from source.\nIf your source is 4.3.x or newer, just make sure you don't run\n'configure' with --disable-cli, rebuilt and copy sapi/cli/php.\n\nPlease upgrade PHP to a newer version, and try again. See you then.\n\n"); } $gopear_bundle_dir = dirname(__FILE__) . '/go-pear-bundle'; $bootstrap_files = array('PEAR.php' => 'http://cvs.php.net/viewcvs.cgi/pear-core/PEAR.php?view=co&pathrev=PEAR_1_4', 'Archive/Tar.php' => 'http://cvs.php.net/viewcvs.cgi/pear/Archive_Tar/Archive/Tar.php?view=co&pathrev=RELEASE_1_3_2', 'Console/Getopt.php' => 'http://cvs.php.net/viewcvs.cgi/pear-core/Console/Getopt.php?view=co&pathrev=PEAR_1_4'); $bootstrap_pkgs = array('PEAR', 'Structures_Graph'); $installer_packages = array('PEAR', 'Structures_Graph-stable', 'Archive_Tar-stable', 'Console_Getopt-stable'); $pfc_packages = array('PEAR_Frontend_Web-beta' => 'Webbased PEAR Installer', 'PEAR_Frontend_Gtk2' => 'Graphical PEAR installer based on PHP-Gtk2', 'MDB2' => 'database abstraction layer.'); $config_desc = array('prefix' => 'Installation prefix ($prefix)', 'temp_dir' => 'Temporary files directory', 'bin_dir' => 'Binaries directory', 'php_dir' => 'PHP code directory ($php_dir)', 'doc_dir' => 'Documentation base directory', 'data_dir' => 'Data base directory', 'test_dir' => 'Tests base directory');
</tr> <tr> <td class="label">品牌的链接地址:</td> <td> <input type="text" name="site_url" value="<?php echo $data['site_url']; ?> " /> </td> </tr> <tr> <td class="label">品牌的logo:</td> <td> <input type="file" name="logo" /><br /> <?php showImage($data['logo'], 100); ?> </td> </tr> <tr> <td colspan="99" align="center"> <input type="submit" class="button" value=" 确定 " /> <input type="reset" class="button" value=" 重置 " /> </td> </tr> </table> </form> </div> <script> </script>