本文整理汇总了PHP中show_image函数的典型用法代码示例。如果您正苦于以下问题:PHP show_image函数的具体用法?PHP show_image怎么用?PHP show_image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了show_image函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_show_image_html
/**
* Get the markup to show an image thumbnail
*
* This function is a wrapper for show_image() that returns what show_image() would
* normally simply output.
*
* @param mixed $image An image object, image ID, or array of image values
* @param boolean $die_without_thumbnail Echo nothing if no thumb available? (default behavior
* is to make link to full-sized image if no thumb available)
* @param boolean $show_popup_link Wrap image in link that pops up image popup?
* @param boolean $show_description Place the image description (i.e. short caption) below the image?
* @param string $other_text Text to use instead of image description
* @param boolean $textonly True sets function into textonly mode, which instead of outputting
* image markup outputs a text description linking to image
* @param boolean $show_author Output the value of the author field below the description?
* @param string $link_with_url Wrap the image in a link to this URL instead of to image popup
* @return string XHTML markup
*/
function get_show_image_html($image, $die_without_thumbnail = false, $show_popup_link = true, $show_description = true, $other_text = '', $textonly = false, $show_author = false, $link_with_url = '')
{
ob_start();
show_image($image, $die_without_thumbnail, $show_popup_link, $show_description, $other_text, $textonly, $show_author, $link_with_url);
$result = ob_get_contents();
ob_end_clean();
return $result;
}
开发者ID:hunter2814,项目名称:reason_package,代码行数:26,代码来源:images.php
示例2: get_teaser_image_markup
function get_teaser_image_markup()
{
$markup_string = '';
$image = $this->passed_vars['teaser_image'];
if (!empty($image)) {
$markup_string .= '<div class="teaserImage">';
ob_start();
show_image(reset($image), false, false, false, '', '', true, '');
$markup_string .= ob_get_contents();
ob_end_clean();
$markup_string .= '</div>';
}
return $markup_string;
}
开发者ID:hunter2814,项目名称:reason_package,代码行数:14,代码来源:related_item.php
示例3: list_reviews
/**
* List the reviews
*
* @access public
* @return string
*/
public function list_reviews()
{
$this->load->helper('date');
$this->load->helper('html_output');
$start = $this->input->get_post('start') ? $this->input->get_post('start') : 0;
$limit = $this->input->get_post('limit') ? $this->input->get_post('limit') : MAX_DISPLAY_SEARCH_RESULTS;
$reviews = $this->reviews_model->get_reviews($start, $limit);
$records = array();
if ($reviews !== NULL) {
foreach ($reviews as $review) {
$records[] = array('reviews_id' => $review['reviews_id'], 'date_added' => mdate('%Y/%m/%d', human_to_unix($review['date_added'])), 'reviews_rating' => image('images/stars_' . $review['reviews_rating'] . '.png', sprintf(lang('rating_from_5_stars'), $review['reviews_rating'])), 'products_name' => $review['products_name'], 'reviews_status' => $review['reviews_status'], 'code' => show_image($review['languages_code']));
}
}
$this->output->set_output(json_encode(array(EXT_JSON_READER_TOTAL => $this->reviews_model->get_total(), EXT_JSON_READER_ROOT => $records)));
}
开发者ID:colonia,项目名称:tomatocart-v2,代码行数:21,代码来源:reviews.php
示例4: list_guest_books
/**
* List guest book
*
* @access public
* @return string
*/
public function list_guest_books()
{
$start = $this->input->get_post('start');
$limit = $this->input->get_post('limit');
$start = empty($start) ? 0 : $start;
$limit = empty($limit) ? MAX_DISPLAY_SEARCH_RESULTS : $limit;
$guest_books = $this->guest_book_model->get_guest_books($start, $limit);
$records = array();
if ($guest_books !== NULL) {
foreach ($guest_books as $guest_book) {
$records[] = array('guest_books_id' => $guest_book['guest_books_id'], 'title' => $guest_book['title'], 'email' => $guest_book['email'], 'guest_books_status' => $guest_book['guest_books_status'], 'languages' => show_image($guest_book['code']), 'content' => $guest_book['content'], 'date_added' => mdate('%Y/%m/%d', human_to_unix($guest_book['date_added'])));
}
}
$this->output->set_output(json_encode(array(EXT_JSON_READER_TOTAL => $this->guest_book_model->get_totals(), EXT_JSON_READER_ROOT => $records)));
}
开发者ID:colonia,项目名称:tomatocart-v2,代码行数:21,代码来源:guest_book.php
示例5: list_languages
/**
* List languages
*
* @access public
* @return string
*/
public function list_languages()
{
$start = $this->input->get_post('start') ? $this->input->get_post('start') : 0;
$limit = $this->input->get_post('limit') ? $this->input->get_post('limit') : MAX_DISPLAY_SEARCH_RESULTS;
$languages = $this->lang_model->get_languages($start, $limit);
$records = array();
if ($languages !== NULL) {
foreach ($languages as $language) {
$total_definitions = $this->lang_model->get_total_definitions($language['languages_id']);
$languages_name = $language['name'];
//verify that the language is the default language
if ($language['code'] == DEFAULT_LANGUAGE) {
$languages_name .= ' (' . lang('default_entry') . ')';
}
$records[] = array('languages_id' => $language['languages_id'], 'code' => $language['code'], 'total_definitions' => $total_definitions, 'languages_name' => $languages_name, 'languages_flag' => show_image($language['code']));
}
}
$this->output->set_output(json_encode(array(EXT_JSON_READER_TOTAL => $this->lang_model->get_total(), EXT_JSON_READER_ROOT => $records)));
}
开发者ID:colonia,项目名称:tomatocart-v2,代码行数:25,代码来源:languages.php
示例6: get_images_section
function get_images_section()
{
$str = '';
$str .= '<ul>';
foreach ($this->passed_vars['item_images'] as $image) {
$str .= '<li class="imageChunk">';
$rsi = new reasonSizedImage();
$rsi->set_id($image->id());
$rsi->set_width(400);
// Uncomment if you want to force a height or crop
//$rsi->set_height(300);
//$rsi->set_crop_style('fill');
ob_start();
show_image($rsi, false, true, true, '');
$str .= ob_get_contents();
ob_end_clean();
$str .= '</li>';
}
$str .= '</ul>';
return $str;
}
开发者ID:hunter2814,项目名称:reason_package,代码行数:21,代码来源:cloak.php
示例7: get_teaser_image_markup
function get_teaser_image_markup()
{
$markup_string = '';
$image = $this->passed_vars['teaser_image'];
if (!empty($image)) {
$markup_string .= '<div class="teaserImage">';
if (is_array($image)) {
$image = reset($image);
}
$rsi = new reasonSizedImage();
$rsi->set_id($image->id());
$rsi->set_width(600);
$rsi->set_height(600);
$rsi->set_crop_style('fill');
ob_start();
show_image($rsi, true, false, false, '');
$markup_string .= ob_get_contents();
ob_end_clean();
$markup_string .= '</div>';
}
return $markup_string;
}
开发者ID:hunter2814,项目名称:reason_package,代码行数:22,代码来源:cloak_with_image.php
示例8: print_spacer
}
print_spacer(20);
print_box(format_text($strtable), 'generalbox', 'intro');
print_spacer(20);
// Print the main part of the page ----------------------------------
print_spacer(20);
print_heading(format_string(get_string('correction', 'blended')));
print_box(format_text(get_string('imagepagedesc', 'blended')), 'generalbox', 'intro');
print_spacer(20);
//print $imagepath;
$imgout = get_field('blended_images', 'imgout', 'jobid', $jobid, 'activitycode', $acode, 'pageindex', $pageindex);
//print "<BR>IMGOUT".$imgout;
$imagepath = get_image_src($imgout);
//echo "<BR>IMGPATHNEW";
//print $imagepath;
show_image($imagepath, $course);
if ($navigationpage == "showdetails.php") {
$volver = "{$CFG->wwwroot}/mod/blended/showdetails.php?id={$course->id}&acode={$acode}&jobid={$jobid}";
}
if ($navigationpage == "reviewdetails.php") {
$volver = "{$CFG->wwwroot}/mod/blended/reviewdetails.php?id={$course->id}&acode={$acode}&jobid={$jobid}";
}
print_continue($volver);
echo "<BR><BR><center>";
helpbutton($page = 'image', get_string('pagehelp', 'blended'), $module = 'blended', $image = true, $linktext = true, $text = '', $return = false, $imagetext = '');
echo "</center>";
print_footer($course);
function show_image($imagepath, $course)
{
//print $imagepath;
$src = create_image_url($imagepath, $course);
开发者ID:juacas,项目名称:moodle-mod_blended,代码行数:31,代码来源:image.php
示例9: set_download_token
$msg .= $msg != "" ? "<p>" . $lang['lightbox_no_images'] : $lang['lightbox_no_images'];
} else {
set_download_token($user_info['lightbox_image_ids']);
$thumbnails = "<table width=\"" . $config['image_table_width'] . "\" border=\"0\" cellpadding=\"" . $config['image_table_cellpadding'] . "\" cellspacing=\"" . $config['image_table_cellspacing'] . "\">\n";
$count = 0;
$bgcounter = 0;
while ($image_row = $site_db->fetch_array($result)) {
if (!$download_allowed && check_permission("auth_download", $image_row['cat_id'])) {
$download_allowed = true;
}
if ($count == 0) {
$row_bg_number = $bgcounter++ % 2 == 0 ? 1 : 2;
$thumbnails .= "<tr class=\"imagerow" . $row_bg_number . "\">\n";
}
$thumbnails .= "<td width=\"" . $imgtable_width . "\" valign=\"top\">\n";
show_image($image_row, "lightbox");
$thumbnails .= $site_template->parse_template("thumbnail_bit");
$thumbnails .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$thumbnails .= "</tr>\n";
$count = 0;
}
}
// end while
if ($count > 0) {
$leftover = $config['image_cells'] - $count;
if ($leftover >= 1) {
for ($i = 0; $i < $leftover; $i++) {
$thumbnails .= "<td width=\"" . $imgtable_width . "\">\n \n</td>\n";
}
开发者ID:abhinay100,项目名称:fourimages_app,代码行数:31,代码来源:lightbox.php
示例10: show_forum
function show_forum($forum, $start, $sort_style, $user)
{
$page_nav = page_links("forum_forum.php?id={$forum->id}&sort={$sort_style}", $forum->threads, THREADS_PER_PAGE, $start);
echo $page_nav;
start_forum_table(array("", tra("Threads"), tra("Posts"), tra("Author"), tra("Views"), "<nobr>" . tra("Last post") . "</nobr>"));
$sticky_first = !$user || !$user->prefs->ignore_sticky_posts;
// Show hidden threads if logged in user is a moderator
//
$show_hidden = is_moderator($user, $forum);
$threads = get_forum_threads($forum->id, $start, THREADS_PER_PAGE, $sort_style, $show_hidden, $sticky_first);
if ($user) {
$subs = BoincSubscription::enum("userid={$user->id}");
}
// Run through the list of threads, displaying each of them
//
$n = 0;
$i = 0;
foreach ($threads as $thread) {
$owner = BoincUser::lookup_id($thread->owner);
if (!$owner) {
continue;
}
$unread = thread_is_unread($user, $thread);
//if ($thread->status==1){
// This is an answered helpdesk thread
if ($user && is_subscribed($thread, $subs)) {
echo '<tr class="row_hd' . $n . '">';
} else {
// Just a standard thread.
echo '<tr class="row' . $n . '">';
}
echo "<td width=\"1%\" class=\"threadicon\"><nobr>";
if ($thread->hidden) {
show_image(IMAGE_HIDDEN, tra("This thread is hidden"), tra("hidden"));
} else {
if ($unread) {
if ($thread->sticky) {
if ($thread->locked) {
show_image(NEW_IMAGE_STICKY_LOCKED, tra("This thread is sticky and locked, and you haven't read it yet"), tra("sticky/locked/unread"));
} else {
show_image(NEW_IMAGE_STICKY, tra("This thread is sticky and you haven't read it yet"), tra("sticky/unread"));
}
} else {
if ($thread->locked) {
show_image(NEW_IMAGE_LOCKED, tra("You haven't read this thread yet, and it's locked"), tra("unread/locked"));
} else {
show_image(NEW_IMAGE, tra("You haven't read this thread yet"), tra("unread"));
}
}
} else {
if ($thread->sticky) {
if ($thread->locked) {
show_image(IMAGE_STICKY_LOCKED, tra("This thread is sticky and locked"), tra("sticky/locked"));
} else {
show_image(IMAGE_STICKY, tra("This thread is sticky"), tra("sticky"));
}
} else {
if ($thread->locked) {
show_image(IMAGE_LOCKED, tra("This thread is locked"), tra("locked"));
} else {
show_image(IMAGE_POST, tra("You read this thread"), tra("read"));
}
}
}
}
echo "</nobr></td>";
$title = cleanup_title($thread->title);
//$titlelength = 9999;
//if (strlen($title) > $titlelength) {
// $title = substr($title, 0, $titlelength)."...";
//}
echo "<td class=\"threadline\"><a href=\"forum_thread.php?id={$thread->id}\"><b>{$title}</b></a><br></td>";
$n = ($n + 1) % 2;
echo '
<td class="numbers">' . ($thread->replies + 1) . '</td>
<td>' . user_links($owner, BADGE_HEIGHT_SMALL) . '</td>
<td class="numbers">' . $thread->views . '</td>
<td class="lastpost">' . time_diff_str($thread->timestamp, time()) . '</td>
</tr>
';
flush();
}
end_table();
echo "<br>{$page_nav}";
// show page links
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:86,代码来源:forum_forum.php
示例11: run
function run()
{
$col = 0;
if (empty($this->images) && !empty($this->request['search_image'])) {
echo 'No images found.';
$this->show_search_function();
} elseif (!empty($this->textonly)) {
echo '<h3>Images</h3>' . "\n";
foreach ($this->images as $id => $image) {
echo '<div class="imageChunk">';
show_image($image, false, true, true, false, true);
echo "</div>";
}
$this->show_search_function();
$this->show_paging();
} else {
echo '<table>';
foreach ($this->images as $id => $image) {
if ($col == 0) {
echo "<tr>";
}
echo "<td align='left' valign='bottom'>";
echo "<div class=\"imageChunk\">";
show_image($image, false, true, true, false, false, false);
echo "</div></td>\n";
$col = ($col + 1) % $this->columns;
if ($col == 0) {
echo "</tr>";
}
}
while ($col != 0) {
$col = ($col + 1) % $this->columns;
echo '<td> </td>';
}
echo '</tr></table>';
$this->show_search_function();
$this->show_paging();
}
}
开发者ID:hunter2814,项目名称:reason_package,代码行数:39,代码来源:gallery.php
示例12: foreach
foreach ($additional_image_fields as $key => $val) {
$additional_sql .= ", i." . $key;
}
}
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits" . $additional_sql . ", c.cat_name" . get_user_table_field(", u.", "user_name") . "\n FROM (" . IMAGES_TABLE . " i, " . CATEGORIES_TABLE . " c)\n LEFT JOIN " . USERS_TABLE . " u ON (" . get_user_table_field("u.", "user_id") . " = i.user_id)\n WHERE i.image_active = 1\n {$sql_where_query}\n AND c.cat_id = i.cat_id {$cat_id_sql}\n ORDER BY " . $config['image_order'] . " " . $config['image_sort'] . ", image_id " . $config['image_sort'] . "\n LIMIT {$offset}, {$perpage}";
$result = $site_db->query($sql);
$thumbnails = "<table width=\"" . $config['image_table_width'] . "\" border=\"0\" cellpadding=\"" . $config['image_table_cellpadding'] . "\" cellspacing=\"" . $config['image_table_cellspacing'] . "\">\n";
$count = 0;
$bgcounter = 0;
while ($image_row = $site_db->fetch_array($result)) {
if ($count == 0) {
$row_bg_number = $bgcounter++ % 2 == 0 ? 1 : 2;
$thumbnails .= "<tr class=\"imagerow" . $row_bg_number . "\">\n";
}
$thumbnails .= "<td width=\"" . $imgtable_width . "\" valign=\"top\">\n";
show_image($image_row, "search");
$thumbnails .= $site_template->parse_template("thumbnail_bit");
$thumbnails .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$thumbnails .= "</tr>\n";
$count = 0;
}
}
// end while
if ($count > 0) {
$leftover = $config['image_cells'] - $count;
if ($leftover >= 1) {
for ($i = 0; $i < $leftover; $i++) {
$thumbnails .= "<td width=\"" . $imgtable_width . "\">\n \n</td>\n";
}
开发者ID:abhinay100,项目名称:fourimages_app,代码行数:31,代码来源:search.php
示例13: get_user_table_field
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits" . $additional_sql . ", c.cat_name" . get_user_table_field(", u.", "user_name") . get_user_table_field(", u.", "user_email") . "\n FROM (" . IMAGES_TABLE . " i, " . CATEGORIES_TABLE . " c)\n LEFT JOIN " . USERS_TABLE . " u ON (" . get_user_table_field("u.", "user_id") . " = i.user_id)\n WHERE i.image_id = {$image_id} AND i.image_active = 1 AND c.cat_id = i.cat_id";
$image_row = $site_db->query_firstrow($sql);
$cat_id = isset($image_row['cat_id']) ? $image_row['cat_id'] : 0;
$is_image_owner = $image_row['user_id'] > USER_AWAITING && $user_info['user_id'] == $image_row['user_id'] ? 1 : 0;
if (!check_permission("auth_viewcat", $cat_id) || !check_permission("auth_viewimage", $cat_id) || !$image_row) {
redirect($url);
}
$random_cat_image = defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0 ? "" : get_random_image($cat_id);
$site_template->register_vars("random_cat_image", $random_cat_image);
unset($random_cat_image);
//-----------------------------------------------------
//--- Show Image --------------------------------------
//-----------------------------------------------------
$image_allow_comments = check_permission("auth_readcomment", $cat_id) ? $image_row['image_allow_comments'] : 0;
$image_name = format_text($image_row['image_name'], 2);
show_image($image_row, $mode, 0, 1);
//--- SEO variables -------------------------------
$meta_keywords = !empty($image_row['image_keywords']) ? strip_tags(implode(", ", explode(",", $image_row['image_keywords']))) : "";
$meta_description = !empty($image_row['image_description']) ? strip_tags($image_row['image_description']) . ". " : "";
$site_template->register_vars(array("detail_meta_description" => $meta_description, "detail_meta_keywords" => $meta_keywords, "prepend_head_title" => $image_name . " - "));
$in_mode = 0;
$sql = "";
if ($mode == "lightbox") {
if (!empty($user_info['lightbox_image_ids'])) {
$image_id_sql = str_replace(" ", ", ", trim($user_info['lightbox_image_ids']));
$sql = "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file\n FROM " . IMAGES_TABLE . "\n WHERE image_active = 1 AND image_id IN ({$image_id_sql}) AND (cat_id NOT IN (" . get_auth_cat_sql("auth_viewimage", "NOTIN") . ", " . get_auth_cat_sql("auth_viewcat", "NOTIN") . "))\n ORDER BY " . $config['image_order'] . " " . $config['image_sort'] . ", image_id " . $config['image_sort'];
$in_mode = 1;
}
} elseif ($mode == "search") {
if (!isset($session_info['searchid']) || empty($session_info['searchid'])) {
$session_info['search_id'] = $site_sess->get_session_var("search_id");
开发者ID:abhinay100,项目名称:fourimages_app,代码行数:31,代码来源:details.php
示例14: switch
$mainContentView = 'view/main_page.html';
if (isset($_GET['mode'])) {
$mode = $_GET['mode'];
switch ($mode) {
case 'main_page':
show_main_page();
break;
case 'gallery':
show_gallery();
break;
case 'img_upload':
show_img_upload();
break;
case 'login':
show_login();
break;
case 'register':
show_register();
break;
case 'image':
show_image();
break;
default:
show_error('404');
}
} else {
show_main_page();
}
//include 'view/head.html';
//include $mainContentView;
//include 'view/foot.html';
开发者ID:rturi,项目名称:I244,代码行数:31,代码来源:controller.php
示例15: die
die(msg('error', $DLG['file_not_found'] . " <b>({$file})</b>"));
}
if (is_dir($path)) {
die(msg('alert', $DLG['not_file'] . " <b>({$file})</b>"));
}
if (!validate_path($path)) {
die(msg('error', $DLG['invalid_dir'] . " <b>({$dir}{$file})</b>"));
}
$info = swampy_pathinfo($path);
switch ($info['extension']) {
case "jpeg":
case "jpg":
case "gif":
case "png":
case "bmp":
die(show_image($dir . $file));
break;
case "txt":
case "php":
case "js":
die(show_text($path));
break;
case "html":
case "htm":
die(show_html($dir . $file));
break;
default:
die(msg('alert', $DLG['not_supported_format']));
break;
}
function show_image($src)
开发者ID:nephie,项目名称:AZL-website,代码行数:31,代码来源:preview.php
示例16: Edit_Page
function Edit_Page()
{
//*******************************************************
global $_, $filename, $filecontents, $raw_contents, $etypes, $itypes, $MAX_EDIT_SIZE, $MAX_VIEW_SIZE, $WYSIWYG_VALID;
clearstatcache();
//Determine if a text editable file type
$filename_parts = explode(".", strtolower($filename));
$ext = end($filename_parts);
if (in_array($ext, $etypes)) {
$text_editable = TRUE;
} else {
$text_editable = FALSE;
}
$too_large_to_edit = filesize($filename) > $MAX_EDIT_SIZE;
$too_large_to_view = filesize($filename) > $MAX_VIEW_SIZE;
//Don't load $WYSIWYG_PLUGIN if not needed
if (!$text_editable || $too_large_to_edit) {
$WYSIWYG_VALID = 0;
}
if ($text_editable && !$too_large_to_view) {
$raw_contents = file_get_contents($filename);
$file_ENC = mb_detect_encoding($raw_contents);
//ASCII, UTF-8, etc...
} else {
$file_ENC = "";
$raw_contents = "";
}
if ($too_large_to_edit) {
$header2 = hsc($_['edit_h2_1']);
} else {
$header2 = hsc($_['edit_h2_2']);
}
$too_large_to_edit_message = '<b>' . hsc($_['too_large_to_edit_01']) . ' ' . number_format($MAX_EDIT_SIZE) . ' ' . hsc($_['bytes']) . '</b><br>' . hsc($_['too_large_to_edit_02']) . '<br>' . hsc($_['too_large_to_edit_03']) . '<br>' . hsc($_['too_large_to_edit_04']);
$too_large_to_view_message = '<b>' . hsc($_['too_large_to_view_01']) . ' ' . number_format($MAX_VIEW_SIZE) . ' ' . hsc($_['bytes']) . '</b><br>' . hsc($_['too_large_to_view_02']) . '<br>' . hsc($_['too_large_to_view_03']) . '<br>';
//.hsc($_['too_large_to_view_04']);
//Preserves vertical spacing when message is closed, so edit area doesn't jump as much.
echo '<style>#message_box { min-height: 1.88em; }</style>';
echo '<h2 id="edit_header">' . $header2 . ' ';
echo '<a class="h2_filename" href="/' . URLencode_path($filename) . '" target="_blank" title="' . $_['Open_View'] . '">';
echo hte(basename($filename)) . '</a>';
echo '</h2>' . PHP_EOL;
Edit_Page_form($ext, $text_editable, $too_large_to_edit, $too_large_to_edit_message, $file_ENC);
if (in_array($ext, $itypes)) {
show_image();
}
echo '<div class=clear></div>';
if ($text_editable && $too_large_to_view) {
echo '<p class="edit_disabled">' . $too_large_to_view_message . '</p>';
} elseif ($text_editable && $too_large_to_edit) {
$filecontents = hsc(file_get_contents($filename), ENT_COMPAT, 'UTF-8');
echo '<pre class="edit_disabled view_file">' . $filecontents . '</pre>';
}
}
开发者ID:arribanz,项目名称:live,代码行数:53,代码来源:ofc.php
示例17: resize_image
$image = resize_image($image, $h, $w, $t, $a, $s, $c, $il);
}
$output_formats = array('png' => 'image/png', 'jpg' => 'image/jpeg', 'gif' => 'image/gif');
if (isset($_GET['output']) && isset($output_formats[$_GET['output']])) {
$img_data['mime'] = $output_formats[$_GET['output']];
}
header('Expires: ' . gmdate("D, d M Y H:i:s", time() + 2678400) . ' GMT');
//31 days
header('Cache-Control: max-age=2678400');
//31 days
if (isset($_GET['encoding']) && $_GET['encoding'] == 'base64') {
header('Content-type: text/plain');
} else {
header('Content-type: ' . $img_data['mime']);
}
show_image($image, $q);
exit;
} else {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
<title>Image cache & resize proxy</title>
<link rel="icon" type="image/x-icon" href="favicon.ico"/>
<link href="//static.weserv.nl/images.css" type="text/css" rel="stylesheet"/>
<!--[if lte IE 9]><script src="//static.weserv.nl/html5shiv-printshiv.min.js" type="text/javascript"></script><![endif]-->
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js" type="text/javascript"></script>
<script src="//static.weserv.nl/bootstrap.min.js" type="text/javascript"></script>
</head>
开发者ID:geosub,项目名称:imagesweserv,代码行数:31,代码来源:index.php
示例18: do_uploads
?>
" />
<style>
body { font-family: Helvetica, Arial, sans-serif; color: #333; }
.item { margin: 20px; width: 600px; padding-bottom: 20px; border-bottom: 1px solid #ccc }
.caption { margin-bottom: 10px; font-weight: bold; color: #0b63b6; }
.public_id { margin-top: 5px; font-size: 12px; color: #666; }
h1 { color: #0e2953; }
h2, h3 { color: #0e5e01; }
.link { margin-top: 5px; }
.link a { font-size: 12px; color: #666; }
</style>
</head>
<body>
<?php
echo "<h1>Cloudinary - Basic PHP Sample";
echo "<h2>Uploading ... </h2>";
do_uploads();
echo "<h3>... Done uploading!</h3>";
?>
<?php
show_image($files["unnamed_local"], array("width" => 200, "height" => 150, "crop" => "fill"), "Local file, Fill 200x150");
show_image($files["named_local"], array("width" => 200, "height" => 150, "crop" => "fit"), "Local file, custom public ID, Fit into 200x150");
show_image($files["eager"], $eager_params, "Local file, Eager trasnformation of scaling to 200x150");
show_image($files["remote"], array("width" => 200, "height" => 150, "crop" => "thumb", "gravity" => "faces"), "Uploaded remote image, Face detection based 200x150 thumbnail");
show_image($files["remote_trans"], array("width" => 200, "height" => 150, "crop" => "fill", "gravity" => "face", "radius" => 10, "effect" => "sepia"), "Uploaded remote image, Fill 200x150, round corners, apply the sepia effect");
?>
</body>
</html>
开发者ID:hidayat365,项目名称:phpindonesia.or.id-membership2,代码行数:30,代码来源:basic.php
示例19: get_primary_image
function get_primary_image( $item )
{
if(empty($this->parent->textonly))
{
$item->set_env('site_id',$this->parent->site_id);
$images = $item->get_left_relationship( relationship_id_of('av_to_primary_image') );
if(!empty($images))
{
$image = current($images);
if($this->params['thumbnail_width'] != 0 or $this->params['thumbnail_height'] != 0)
{
$rsi = new reasonSizedImage();
if(!empty($rsi))
{
$rsi->set_id($image->id());
if($this->params['thumbnail_width'] != 0)
{
$rsi->set_width($this->params['thumbnail_width']);
}
if($this->params['thumbnail_height'] != 0)
{
$rsi->set_height($this->params['thumbnail_height']);
}
if($this->params['thumbnail_crop'] != '')
{
$rsi->set_crop_style($this->params['thumbnail_crop']);
}
$image = $rsi;
}
}
$die_without_thumbnail = true;
$show_popup_link = false;
$show_description = false;
$additional_text = '';
if(empty($this->request[ $this->query_string_frag.'_id' ]) || $this->request[ $this->query_string_frag.'_id' ] != $item->id() )
{
$link = $this->construct_link($item);
}
else
{
$link = '';
}
show_image( $image, $die_without_thumbnail, $show_popup_link, $show_description, $additional_text, $this->parent->textonly, false, $link );
}
}
}
开发者ID:natepixel,项目名称:reason_package,代码行数:48,代码来源:av.php
示例20: while
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
if (!$num_rows) {
$thumbnails = "";
$msg = $lang['no_images'];
} else {
$thumbnails = "<table width=\"" . $config['image_table_width'] . "\" border=\"0\" cellpadding=\"" . $config['image_table_cellpadding'] . "\" cellspacing=\"" . $config['image_table_cellspacing'] . "\">\n";
$count = 0;
$bgcounter = 0;
while ($image_row = $site_db->fetch_array($result)) {
if ($count == 0) {
$row_bg_number = $bgcounter++ % 2 == 0 ? 1 : 2;
$thumbnails .= "<tr class=\"imagerow" . $row_bg_number . "\">\n";
}
$thumbnails .= "<td width=\"" . $imgtable_width . "\" valign=\"top\">\n";
show_image($image_row);
$thumbnails .= $site_template->parse_template("thumbnail_bit");
$thumbnails .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$thumbnails .= "</tr>\n";
$count = 0;
}
}
// end while
if ($count > 0) {
$leftover = $config['image_cells'] - $count;
if ($leftover > 0) {
for ($i = 0; $i < $leftover; $i++) {
$thumbnails .= "<td width=\"" . $imgtable_width . "\">\n \n</td>\n";
}
开发者ID:abhinay100,项目名称:fourimages_app,代码行数:31,代码来源:categories.php
注:本文中的show_image函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论