本文整理汇总了PHP中get_cached_image函数的典型用法代码示例。如果您正苦于以下问题:PHP get_cached_image函数的具体用法?PHP get_cached_image怎么用?PHP get_cached_image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_cached_image函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: shop_image_tag
function shop_image_tag($img = array(), $counter = 0, $title = '')
{
$config =& $GLOBALS['_tmpl']['config'];
// set image values
$width = $config['image_' . $config['mode'] . '_width'];
$height = $config['image_' . $config['mode'] . '_height'];
$crop = $config['image_' . $config['mode'] . '_crop'];
$caption = empty($img['caption']) ? '' : ' :: ' . $img['caption'];
$title = empty($title) ? '' : ' title="' . html($title . $caption) . '"';
$thumb_image = get_cached_image(array("target_ext" => $img['f_ext'], "image_name" => $img['f_hash'] . '.' . $img['f_ext'], "max_width" => $width, "max_height" => $height, "thumb_name" => md5($img['f_hash'] . $width . $height . $GLOBALS['phpwcms']["sharpen_level"] . $crop . $GLOBALS['phpwcms']['colorspace']), 'crop_image' => $crop));
if ($thumb_image) {
// now try to build caption and if neccessary add alt to image or set external link for image
$caption = getImageCaption($img['caption']);
// set caption and ALT Image Text for imagelist
$capt_cur = html($caption[0]);
$caption[3] = empty($caption[3]) ? '' : ' title="' . html($caption[3]) . '"';
//title
$caption[1] = html(empty($caption[1]) ? $img['f_name'] : $caption[1]);
$list_img_temp = '<img src="' . PHPWCMS_IMAGES . $thumb_image[0] . '" ';
$list_img_temp .= $thumb_image[3] . ' alt="' . $caption[1] . '"' . $caption[3] . $title . ' border="0" />';
// use lightbox effect
if ($config['image_' . $config['mode'] . '_lightbox']) {
$a = '<a href="img/cmsimage.php/';
$a .= $config['image_zoom_width'] . 'x' . $config['image_zoom_height'] . '/';
$a .= $img['f_hash'] . '.' . $img['f_ext'] . '" ';
$a .= 'target="_blank" rel="lightbox' . $config['lightbox_id'] . '"' . $caption[3] . $title . '>';
$list_img_temp = $a . $list_img_temp . '</a>';
}
$class = empty($counter) ? '' : ' img-num-' . $counter;
return '<span class="shop-article-img' . $class . '">' . $list_img_temp . '</span>';
}
return '';
}
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:33,代码来源:frontend.init.php
示例2: showPollImage
function showPollImage($image, $zoom = 0)
{
$image_border = ' border="' . intval($GLOBALS["template_default"]["article"]["imagelist_border"]) . '"';
if (empty($GLOBALS["template_default"]["article"]["imagelist_imgclass"])) {
$image_imgclass = '';
} else {
$image_imgclass = ' class="' . $GLOBALS["template_default"]["article"]["imagelist_imgclass"] . '"';
}
$thumb_image = get_cached_image(array("target_ext" => $image[3], "image_name" => $image[2] . '.' . $image[3], "max_width" => $image[4], "max_height" => $image[5], "thumb_name" => md5($image[2] . $image[4] . $image[5] . $GLOBALS['phpwcms']["sharpen_level"] . $GLOBALS['phpwcms']['colorspace'])));
if ($zoom) {
$zoominfo = get_cached_image(array("target_ext" => $image[3], "image_name" => $image[2] . '.' . $image[3], "max_width" => $GLOBALS['phpwcms']["img_prev_width"], "max_height" => $GLOBALS['phpwcms']["img_prev_height"], "thumb_name" => md5($image[2] . $GLOBALS['phpwcms']["img_prev_width"] . $GLOBALS['phpwcms']["img_prev_height"] . $GLOBALS['phpwcms']["sharpen_level"] . $GLOBALS['phpwcms']['colorspace'])));
}
$list_img_temp = '<img src="' . PHPWCMS_IMAGES . $thumb_image[0] . '" ' . $thumb_image[3] . $image_border . $image_imgclass . ' />';
if ($zoom && !empty($zoominfo)) {
// if click enlarge the image
$open_popup_link = 'image_zoom.php?' . getClickZoomImageParameter($zoominfo[0] . '?' . $zoominfo[3]);
$open_link = $open_popup_link;
$return_false = 'return false;';
$html .= "<a href=\"" . $open_link . "\" onclick=\"checkClickZoom();clickZoom('" . $open_popup_link . "','previewpic','width=";
$html .= $zoominfo[1] . ",height=" . $zoominfo[2] . "');" . $return_false . '">';
$html .= $list_img_temp . "</a>";
} else {
// if not click enlarge
$html .= $list_img_temp;
}
return $html;
}
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:27,代码来源:ext.func.inc.php
示例3: elseif
} elseif (!$value["max_height"]) {
$value["max_height"] = $value["max_width"];
}
}
$basis = floor($value["max_width"] / $grid);
if (!$basis) {
$basis = 1;
}
$value["max_width"] = $basis * $grid;
$basis = floor($value["max_height"] / $grid);
if (!$basis) {
$basis = 1;
}
$value["max_height"] = $basis * $grid;
}
if (($image = get_cached_image($value, false, false)) && !empty($image[0])) {
// Redirect, the "old" way
if (!empty($phpwcms['cmsimage_redirect'])) {
headerRedirect(PHPWCMS_URL . PHPWCMS_IMAGES . $image[0], 301);
}
if (empty($image['type'])) {
$image['type'] = get_mimetype_by_extension(which_ext($image[0]));
}
header('Content-Type: ' . $image['type']);
header('Content-Disposition: inline');
@readfile(PHPWCMS_THUMB . $image[0]);
exit;
}
}
}
}
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:cmsimage.php
示例4: getImageCaption
//build image/image link
$thumb_image = false;
$thumb_img = '';
$caption[0] = '';
if (!empty($crow["acontent_image"][2])) {
$caption = getImageCaption(base64_decode($crow["acontent_image"][6]));
$caption[0] = html_specialchars($caption[0]);
$caption[3] = empty($caption[3]) ? '' : ' title="' . html_specialchars($caption[3]) . '"';
//title
$caption[1] = empty($caption[1]) ? html_specialchars($crow["acontent_image"][1]) : html_specialchars($caption[1]);
$thumb_image = get_cached_image(array("target_ext" => $crow["acontent_image"][3], "image_name" => $crow["acontent_image"][2] . '.' . $crow["acontent_image"][3], "max_width" => $crow["acontent_image"][4], "max_height" => $crow["acontent_image"][5], "thumb_name" => md5($crow["acontent_image"][2] . $crow["acontent_image"][4] . $crow["acontent_image"][5] . $phpwcms["sharpen_level"] . $phpwcms['colorspace'])));
if ($thumb_image != false) {
$thumb_img = '<img src="' . PHPWCMS_IMAGES . $thumb_image[0] . '" ' . $thumb_image[3];
$thumb_img .= ' alt="' . $caption[1] . '"' . $caption[3] . ' />';
if ($crow["acontent_image"][8]) {
$zoominfo = get_cached_image(array("target_ext" => $crow["acontent_image"][3], "image_name" => $crow["acontent_image"][2] . '.' . $crow["acontent_image"][3], "max_width" => $phpwcms["img_prev_width"], "max_height" => $phpwcms["img_prev_height"], "thumb_name" => md5($crow["acontent_image"][2] . $phpwcms["img_prev_width"] . $phpwcms["img_prev_height"] . $phpwcms["sharpen_level"] . $phpwcms['colorspace'])));
if ($zoominfo != false) {
$popup_img = 'image_zoom.php?' . getClickZoomImageParameter($zoominfo[0] . '?' . $zoominfo[3]);
if (!empty($caption[2][0])) {
$open_link = $caption[2][0];
$return_false = '';
} else {
$open_link = $popup_img;
$return_false = 'return false;';
}
$thumb_img = '<a href="' . $popup_img . '" onclick="window.open(\'' . $open_link . "','previewpic','width=" . $zoominfo[1] . ",height=" . $zoominfo[2] . "');" . $return_false . '"' . $caption[2][1] . '>' . $thumb_img . '</a>';
}
} else {
if ($caption[2][0]) {
$thumb_img = '<a href="' . $caption[2][0] . '"' . $caption[2][1] . '>' . $thumb_img . '</a>';
}
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:cnt27.article.inc.php
示例5: die
**/
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
// Text with image
$cinfo[1] = cut_string($row["acontent_title"], '…', 55);
$cinfo[2] = cut_string($row["acontent_subtitle"], '…', 55);
$cinfo[3] = str_replace("\n", " ", cut_string($row["acontent_text"], '…', 150));
// 0 :1 :2 :3 :4 :5 :6 :7 :8
// dbid:filename:hash:extension:width:height:caption:position:zoom
$cinfo_image = explode(":", $row["acontent_image"]);
if (isset($cinfo_image[2]) && is_array($cinfo_image) && count($cinfo_image)) {
$thumb_image = get_cached_image(array("target_ext" => $cinfo_image[3], "image_name" => $cinfo_image[2] . '.' . $cinfo_image[3], "thumb_name" => md5($cinfo_image[2] . $phpwcms["img_list_width"] . $phpwcms["img_list_height"] . $phpwcms["sharpen_level"] . $phpwcms['colorspace'])));
if ($thumb_image != false) {
$cinfo_image = '<img src="' . PHPWCMS_IMAGES . $thumb_image[0] . '" border="0" ' . $thumb_image[3] . '>';
} else {
$cinfo_image = '';
}
} else {
$cinfo_image = '';
}
$cinfo["result"] = '';
foreach ($cinfo as $value) {
if ($value) {
$cinfo["result"] .= $value . "\n";
}
}
$cinfo["result"] = str_replace("\n", " / ", html(trim($cinfo["result"])));
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:cnt1.list.inc.php
示例6: html_specialchars
if ($thumb_image != false) {
$thumb_img = '<img src="' . PHPWCMS_IMAGES . $thumb_image[0] . '" ' . $thumb_image[3];
$thumb_img .= ' alt="' . html_specialchars($caption[1]) . '"';
if ($caption[3]) {
$thumb_img .= ' title="' . html_specialchars($caption[3]) . '"';
}
$thumb_img .= ' class="' . $template_default['classes']['image-thumb'] . '" />';
$img_thumb_name = $thumb_image[0];
$img_thumb_rel = PHPWCMS_IMAGES . $thumb_image[0];
$img_thumb_abs = PHPWCMS_URL . PHPWCMS_IMAGES . $thumb_image[0];
$img_thumb_width = $thumb_image[1];
$img_thumb_height = $thumb_image[2];
$img_thumb_ext = which_ext($thumb_image[0]);
$content['images']['article'] = array('name' => $row["article_image"]["name"], 'hash' => $row["article_image"]["hash"], 'ext' => $img_thumb_ext, 'image' => array('width' => $img_thumb_width, 'height' => $img_thumb_height, 'src' => $img_thumb_rel));
if ($row["article_image"]["zoom"]) {
$zoominfo = get_cached_image(array("target_ext" => $row["article_image"]['ext'], "image_name" => $row["article_image"]['hash'] . '.' . $row["article_image"]['ext'], "max_width" => $phpwcms["img_prev_width"], "max_height" => $phpwcms["img_prev_height"], "thumb_name" => md5($row["article_image"]['hash'] . $phpwcms["img_prev_width"] . $phpwcms["img_prev_height"] . $phpwcms["sharpen_level"] . $phpwcms['colorspace'])));
if ($zoominfo != false) {
$img_zoom_name = $zoominfo[0];
$img_zoom_rel = PHPWCMS_IMAGES . $zoominfo[0];
$img_zoom_abs = PHPWCMS_URL . PHPWCMS_IMAGES . $zoominfo[0];
$img_zoom_width = $zoominfo[1];
$img_zoom_height = $zoominfo[2];
$content['images']['article']['zoom'] = array('width' => $img_zoom_width, 'height' => $img_zoom_height, 'src' => $img_zoom_rel);
$popup_img = 'image_zoom.php?' . getClickZoomImageParameter($zoominfo[0] . '?' . $zoominfo[3]);
if (!empty($caption[2][0])) {
$open_link = $caption[2][0];
$return_false = '';
} else {
$open_link = $popup_img;
$return_false = 'return false;';
}
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:content.article.inc.php
示例7: _dbQuery
//$sql .= " AND f_public=1";
$sql .= " ORDER BY f_sort, f_name";
$data = _dbQuery($sql);
//phpwcms imagesdata from cp
$imagesdata = array();
//only if cp was saved already
if ($cid != 0) {
$sql2 = "SELECT acontent_form FROM " . DB_PREPEND . "phpwcms_articlecontent WHERE acontent_id=" . $cid . " AND acontent_aid=" . $aid;
$data2 = _dbQuery($sql2);
$data3 = unserialize($data2[0]['acontent_form']);
$imagesdata = json_decode($data3['jqs_imagedata'], true);
}
foreach ($data as $val) {
//build html img-tag
//get image
$thumb_image = get_cached_image(array("target_ext" => $val['f_ext'], "image_name" => $val['f_hash'] . '.' . $val['f_ext'], "max_width" => $phpwcms['img_list_width'], "max_height" => $phpwcms['img_list_height'], "thumb_name" => md5($val['f_hash'] . $phpwcms['img_list_width'] . $phpwcms['img_list_height'] . $phpwcms["sharpen_level"])));
//add title and descr from DB
$image_title = '';
$image_descr = '';
$image_css = '';
if ($thumb_image != false) {
if (isset($imagesdata[$value][$val['f_id']])) {
if (isset($imagesdata[$value][$val['f_id']][1])) {
//allow plain text only
$image_title = html_specialchars(strip_tags($imagesdata[$value][$val['f_id']][1]));
}
if (isset($imagesdata[$value][$val['f_id']][2])) {
//we allow HTML in description
//$image_descr = html_specialchars(strip_tags($imagesdata[$value][$val['f_id']][2]));
$image_descr = html_specialchars($imagesdata[$value][$val['f_id']][2]);
}
开发者ID:uwe367,项目名称:phpwcms-slider-modul,代码行数:31,代码来源:ajax.form.php
示例8: render_cnt_template
$guestbook['c'] = render_cnt_template($guestbook['c'], 'NAME', html_specialchars($guestbook['row']['guestbook_name']));
$guestbook['c'] = render_cnt_template($guestbook['c'], 'MSG', nl2br($guestbook['row']['guestbook_msg']));
$guestbook['c'] = preg_replace_callback('/{TIMESTAMP:(.*)}/', 'guestbook_date_callback', $guestbook['c']);
// do gb image ;-)
$guestbook['entry_image'] = '';
if (isset($guestbook['imgdata']) && !empty($guestbook['row']['guestbook_image'])) {
if (file_exists($guestbook['image_dir'] . '/' . $guestbook['row']['guestbook_image'])) {
$thumb_image = false;
$thumb_img = '';
$thumb_image = get_cached_image(array("target_ext" => which_ext($guestbook['row']['guestbook_image']), "image_name" => $guestbook['row']['guestbook_image'], "image_dir" => $guestbook['image_dir'] . '/', "max_width" => $guestbook['imgdata'][0], "max_height" => $guestbook['imgdata'][1], "thumb_name" => md5($guestbook['row']['guestbook_image'] . $guestbook['imgdata'][0] . $guestbook['imgdata'][1] . $phpwcms["sharpen_level"] . $phpwcms['colorspace'])));
if ($thumb_image != false) {
$guestbook['entry_image'] = '<img src="' . PHPWCMS_IMAGES . $thumb_image[0] . '" ' . $thumb_image[3];
$guestbook['entry_image'] .= ' alt="' . html_specialchars($guestbook['row']['guestbook_imagename']) . '" />';
//zoom
if ($guestbook['imgdata'][2]) {
$zoominfo = get_cached_image(array("target_ext" => which_ext($guestbook['row']['guestbook_image']), "image_name" => $guestbook['row']['guestbook_image'], "image_dir" => $guestbook['image_dir'] . '/', "max_width" => $phpwcms["img_prev_width"], "max_height" => $phpwcms["img_prev_height"], "thumb_name" => md5($guestbook['row']['guestbook_image'] . $phpwcms["img_prev_width"] . $phpwcms["img_prev_height"] . $phpwcms["sharpen_level"] . $phpwcms['colorspace'])));
if ($zoominfo != false) {
$popup_img = 'image_zoom.php?' . getClickZoomImageParameter($zoominfo[0] . '?' . $zoominfo[3]);
$guestbook['entry_image'] = '<a href="' . $popup_img . '" onclick="window.open(\'' . $popup_img . "','previewpic','width=" . $zoominfo[1] . ",height=" . $zoominfo[2] . "');return false;" . '">' . $guestbook['entry_image'] . '</a>';
}
}
}
}
}
$guestbook['c'] = render_cnt_template($guestbook['c'], 'IMAGE', $guestbook['entry_image']);
$guestbook['entry_list'] .= $guestbook['c'];
$guestbook['counter']++;
}
mysql_free_result($guestbook['result']);
// initialize lightbox
if ($thumb_image != false) {
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:cnt18.article.inc.php
示例9: list_public
function list_public($pid, $dbcon, $vor, $zieldatei, $userID, $show_thumb = 1, $phpwcms)
{
$pid = intval($pid);
//Folder Listing für Public files
$sql = "SELECT f_id, f_name FROM " . DB_PREPEND . "phpwcms_file WHERE " . "f_pid=" . intval($pid) . " AND " . "f_public=1 AND f_aktiv=1 AND " . "f_uid=" . intval($userID) . " AND " . "f_kid=0 AND f_trash=0 ORDER BY f_sort, f_name";
$result = mysql_query($sql, $dbcon);
while ($row = mysql_fetch_array($result)) {
$dirname = html($row["f_name"]);
//Ermitteln des Aufklappwertes
$klapp_status = empty($_SESSION["pklapp"][$row["f_id"]]) ? 1 : 0;
//Ermitteln, ob überhaupt abhängige Dateien/Ordner existieren
$count_sql = "SELECT COUNT(f_id) FROM " . DB_PREPEND . "phpwcms_file WHERE " . "f_pid=" . $row["f_id"] . " AND " . "f_uid=" . intval($userID) . " AND " . "f_public=1 AND f_aktiv=1 AND " . "f_trash=0 LIMIT 1";
if ($count_result = mysql_query($count_sql, $dbcon)) {
if ($count_row = mysql_fetch_row($count_result)) {
$count = "<img src=\"img/leer.gif\" width=\"2\" height=\"1\">" . "<a href=\"" . $zieldatei . "&pklapp=" . $row["f_id"] . "|" . $klapp_status . "\">" . on_off($klapp_status, $dirname, 0) . "</a>";
$count_wert = $count_row[0];
}
mysql_free_result($count_result);
}
//Aufbau der Zeile
echo "<tr bgcolor=\"#EBF2F4\"><td colspan=\"2\"><img src=\"img/leer.gif\" height=\"1\" width=\"1\"></td></tr>\n";
//Abstand vor
echo "<tr bgcolor=\"#EBF2F4\">\n";
//Einleitung Tabellenzeile
echo "<td width=\"488\" class='msglist'>";
//Einleiten der Tabellenzelle
echo $count . "<img src=\"img/leer.gif\" height=\"1\" width=\"" . ($vor + 6) . "\" border=\"0\"><img src=\"img/icons/folder_zu.gif\" border=\"0\">";
//Zellinhalt 1. Spalte
echo "<img src=\"img/leer.gif\" height=\"1\" width=\"5\"><strong>" . $dirname;
//Zellinhalt 1. Spalte Fortsetzung
echo "</strong></td>\n";
//Schließen Zelle 1. Spalte
//Zelle 2. Spalte - vorgesehen für Buttons/Tasten Edit etc.
echo "<td width=\"50\" align=\"right\" class=\"msglist\">";
echo "<img src=\"img/leer.gif\" width=\"50\" height=\"1\">";
//Spacer
echo "</td>\n";
echo "</tr>\n";
//Abschluss Tabellenzeile
//Aufbau trennende Tabellen-Zeile
echo "<tr bgcolor=\"#EBF2F4\"><td colspan=\"2\"><img src=\"img/leer.gif\" height=\"1\" width=\"1\"></td></tr>\n";
//Abstand nach
echo "<tr><td colspan=\"2\"><img src=\"img/leer.gif\" height=\"1\" width=\"1\"></td></tr>\n";
//Trennlinie<img src='img/lines/line-lightgrey-dotted-538.gif'>
//Weiter, wenn Unterstruktur
if (!$klapp_status && $count_wert) {
//$vor."<img src='img/leer.gif' height=1 width=18 border=0>"
list_public($row["f_id"], $dbcon, $vor + 18, $zieldatei, $userID, $show_thumb, $phpwcms);
//Listing eventuell im Verzeichnis enthaltener Dateien
$file_sql = "SELECT * FROM " . DB_PREPEND . "phpwcms_file WHERE f_pid=" . $row["f_id"] . " AND f_uid=" . intval($userID) . " AND f_public=1 AND f_aktiv=1 AND f_kid=1 AND f_trash=0 ORDER BY f_sort, f_name";
if ($file_result = mysql_query($file_sql, $dbcon) or die("error while listing files")) {
$file_durchlauf = 0;
while ($file_row = mysql_fetch_array($file_result)) {
$filename = html($file_row["f_name"]);
if (!$file_durchlauf) {
//Aufbau der Zeile zum Einfließen der Filelisten-Tabelle
echo "<tr bgcolor=\"#F5F8F9\"><td colspan=\"2\"><table width=\"538\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
} else {
echo "<tr bgcolor=\"#FFFFFF\"><td colspan=\"5\"><img src=\"img/leer.gif\" height=\"1\" width=\"1\"></td></tr>\n";
}
echo "<tr>\n";
echo "<td width=\"" . ($vor + 37) . "\" class=\"msglist\"><img src=\"img/leer.gif\" height=\"1\" width=\"" . ($vor + 37) . "\" border=\"0\"></td>\n";
echo "<td width=\"13\" class=\"msglist\">";
echo "<img src=\"img/icons/small_" . extimg($file_row["f_ext"]) . "\" border=\"0\"";
echo ' onmouseover="Tip(\'ID: ' . $file_row["f_id"] . '<br>Sort: ' . $file_row["f_sort"] . '\');" onmouseout="UnTip()" alt=""';
echo "></td>\n";
echo "<td width=\"" . (473 - $vor) . "\" class=\"msglist\"><img src=\"img/leer.gif\" height=\"1\" width=\"5\">";
//438-$vor
echo "<a href=\"fileinfo.php?public&fid=" . $file_row["f_id"];
echo "\" target=\"_blank\" onclick=\"flevPopupLink(this.href,'filedetail','scrollbars=yes,resizable=yes,width=500,height=400',1);return document.MM_returnValue;\">";
echo $filename . "</a>";
echo "</td>\n";
echo "<td width=\"15\" align=\"right\" class=\"msglist\">";
echo "<a href=\"include/inc_act/act_download.php?pl=1&dl=" . $file_row["f_id"];
echo "\" target=\"_blank\" title=\"" . $GLOBALS['BL']['be_fprivfunc_dlfile'] . ": " . $filename . "\">";
echo "<img src=\"img/button/download_disc.gif\" border=0></a>";
//target='_blank'
echo "<img src=\"img/leer.gif\" width=\"2\" height=\"1\">";
//Spacer
echo "</td>\n";
//Ende Aufbau
echo "</tr>\n";
if ($_SESSION["wcs_user_thumb"]) {
$thumb_image = get_cached_image(array("target_ext" => $file_row["f_ext"], "image_name" => $file_row["f_hash"] . '.' . $file_row["f_ext"], "thumb_name" => md5($file_row["f_hash"] . $phpwcms["img_list_width"] . $phpwcms["img_list_height"] . $phpwcms["sharpen_level"] . $phpwcms['colorspace'])));
if ($thumb_image != false) {
echo "<tr>\n";
echo "<td width=\"" . ($vor + 37) . "\"><img src=\"img/leer.gif\" height=\"1\" width=\"" . ($vor + 37) . "\" border=\"0\"></td>\n";
echo "<td width=\"13\"><img src=\"img/leer.gif\" height=\"1\" width=\"1\" border=\"0\"></td>\n<td width=\"";
echo 473 - $vor . "\"><img src=\"img/leer.gif\" height=\"1\" width=\"6\"><a href=\"fileinfo.php?public&fid=";
echo $file_row["f_id"] . "\" target=\"_blank\" onclick=\"flevPopupLink(this.href,'filedetail','scrollbars=";
echo "yes,resizable=yes,width=500,height=400',1); return document.MM_returnValue;\">";
echo '<img src="' . PHPWCMS_IMAGES . $thumb_image[0] . '" border="0" ' . $thumb_image[3];
echo ' onmouseover="Tip(\'ID: ' . $file_row["f_id"] . '\');" onmouseout="UnTip()" alt=""';
echo "></a></td>\n";
echo "<td width=\"15\"><img src=\"img/leer.gif\" height=\"1\" width=\"1\" border=\"0\"></td>\n</tr>\n";
echo "<tr><td colspan=\"4\"><img src=\"img/leer.gif\" height=\"2\" width=\"1\" border=\"0\"></td>\n</tr>\n";
}
}
$file_durchlauf++;
}
//.........这里部分代码省略.........
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:101,代码来源:files.public-functions.inc.php
示例10: isset
<tr>
<td valign="top"><select name="shopprod_images[]" size="<?php
$img_count = isset($plugin['data']['shopprod_images']) && is_array($plugin['data']['shopprod_images']) ? count($plugin['data']['shopprod_images']) : 0;
echo $img_count + 5;
?>
" multiple="multiple" class="f11 width360" id="shopprod_images">
<?php
$img_thumbs = '';
$imgx = 0;
if ($img_count) {
// browse images and list available
// will be visible only when aceessible
foreach ($plugin['data']['shopprod_images'] as $key => $value) {
// 0 :1 :2 :3 :4 :5 :6 :7 :8
// dbid:filename:hash:extension:width:height:caption:position:zoom
$thumb_image = get_cached_image(array("target_ext" => $plugin['data']['shopprod_images'][$key]['f_ext'], "image_name" => $plugin['data']['shopprod_images'][$key]['f_hash'] . '.' . $plugin['data']['shopprod_images'][$key]['f_ext'], "thumb_name" => md5($plugin['data']['shopprod_images'][$key]['f_hash'] . $phpwcms["img_list_width"] . $phpwcms["img_list_height"] . $phpwcms["sharpen_level"] . $phpwcms['colorspace'])));
if ($thumb_image != false) {
// image found
echo '<option value="' . $plugin['data']['shopprod_images'][$key]['f_id'] . '">';
$img_name = html_specialchars($plugin['data']['shopprod_images'][$key]['f_name']);
echo $img_name . '</option>' . LF;
if ($imgx == 4) {
$img_thumbs .= '<br /><img src="img/leer.gif" alt="" border="0" width="1" height="2" /><br />';
$imgx = 0;
}
if ($imgx) {
$img_thumbs .= '<img src="img/leer.gif" alt="" border="0" width="2" height="1" />';
}
$img_thumbs .= '<img src="' . PHPWCMS_IMAGES . $thumb_image[0] . '" border="0" ' . $thumb_image[3] . ' alt="' . $img_name . '" title="' . $img_name . '" />';
$plugin['data']['shopprod_caption'][] = html_specialchars($plugin['data']['shopprod_images'][$key]['caption']);
$imgx++;
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:edit.products.inc.php
示例11: switch
// do it for jpg, png or gif only
switch ($content['files_result'][$_files_x]['f_ext']) {
case 'tif':
case 'tiff':
case 'pdf':
case 'psd':
case 'eps':
if ($GLOBALS['phpwcms']['image_library'] == 'gd2' || $GLOBALS['phpwcms']['image_library'] == 'gd') {
break;
}
case 'bmp':
$target_ext = 'jpg';
case 'gif':
case 'jpg':
case 'png':
$_files_image = get_cached_image(array("target_ext" => $target_ext, "image_name" => $content['files_result'][$_files_x]['f_hash'] . '.' . $content['files_result'][$_files_x]['f_ext'], "max_width" => $_file_info[4][0], "max_height" => $_file_info[4][1], "thumb_name" => md5($content['files_result'][$_files_x]['f_hash'] . $_file_info[4][0] . $_file_info[4][1] . $phpwcms["sharpen_level"] . $_file_info[4][2] . $phpwcms['colorspace']), 'crop_image' => $_file_info[4][2]));
break;
}
}
// render {FILE_IMAGE_%} RT
if ($_files_get_imagesize) {
$_files_get_imagesize = @getimagesize(PHPWCMS_ROOT . '/' . PHPWCMS_FILES . $content['files_result'][$_files_x]['f_hash'] . '.' . $content['files_result'][$_files_x]['f_ext']);
if (isset($_files_get_imagesize[0])) {
$_files_entries[$fkey] = render_cnt_template($_files_entries[$fkey], 'FILE_IMAGE_WIDTH', $_files_get_imagesize[0]);
$_files_entries[$fkey] = render_cnt_template($_files_entries[$fkey], 'FILE_IMAGE_HEIGHT', $_files_get_imagesize[1]);
$_files_entries[$fkey] = render_cnt_template($_files_entries[$fkey], 'FILE_IMAGE_MIME', isset($_files_get_imagesize['mime']) ? $_files_get_imagesize['mime'] : '');
if (isset($_files_get_imagesize['channels'])) {
switch ($_files_get_imagesize['channels']) {
case 3:
$_files_get_imagesize['channels'] = 'RGB';
break;
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:cnt7.article.inc.php
示例12: intval
$sql .= " OR f_uid=" . intval($_SESSION["wcs_user_id"]);
}
$sql .= ") LIMIT 1";
} else {
//private file
$sql = "SELECT * FROM " . DB_PREPEND . "phpwcms_file WHERE f_id=" . $file_id . ' AND ';
$sql .= "f_kid=1 AND f_trash IN (0, 1) ";
if (empty($_SESSION["wcs_user_admin"])) {
$sql .= "AND f_uid=" . intval($_SESSION["wcs_user_id"]) . ' ';
}
$sql .= "LIMIT 1";
}
if ($result = mysql_query($sql, $db) or die("error")) {
if ($row = mysql_fetch_assoc($result)) {
$filename = html_specialchars($row["f_name"]);
$thumb_image = get_cached_image(array("target_ext" => $row["f_ext"], "image_name" => $row["f_hash"] . '.' . $row["f_ext"], "thumb_name" => md5($row["f_hash"] . '538538' . $phpwcms["sharpen_level"] . $phpwcms['colorspace']), "max_width" => 538, "max_height" => 538));
?>
<!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><?php
echo $BL['FILEINFO_TITLE'];
?>
: <?php
echo $filename;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php
echo PHPWCMS_CHARSET;
?>
" />
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:fileinfo.php
示例13: get_cached_image
$content['reference']['ref_list'] .= ' align="right" valign="bottom"';
break;
}
$content['reference']['ref_list'] .= '>';
if ($content['reference']["zoom"]) {
// build additional reference popup images
$zoominfo = get_cached_image(array("target_ext" => $content['reference']["list"][$captkey][3], "image_name" => $content['reference']["list"][$captkey][2] . '.' . $content['reference']["list"][$captkey][3], "max_width" => $phpwcms["img_prev_width"], "max_height" => $phpwcms["img_prev_height"], "thumb_name" => md5($content['reference']["list"][$captkey][2] . $phpwcms["img_prev_width"] . $phpwcms["img_prev_height"] . $phpwcms["sharpen_level"] . $phpwcms['colorspace'])));
if ($zoominfo != false) {
$popup_link = 'image_zoom.php?' . getClickZoomImageParameter($zoominfo[0] . '?' . $zoominfo[3]);
$content['reference']['x5'] = '<a href="' . $popup_link . '" onclick="window.open(\'' . $popup_link . "','previewpic','width=" . $zoominfo[1] . ",height=" . $zoominfo[2] . "');return false;\">";
$content['reference']['x6'] = '</a>';
}
}
$content['reference']['ref_list'] .= $content['reference']['x5'];
$over_image = get_cached_image(array("target_ext" => $content['reference']["list"][$captkey][3], "image_name" => $content['reference']["list"][$captkey][2] . '.' . $content['reference']["list"][$captkey][3], "max_width" => $content['reference']["list"][$captkey][4], "max_height" => $content['reference']["list"][$captkey][5], "thumb_name" => md5($content['reference']["list"][$captkey][2] . $content['reference']["list"][$captkey][4] . $content['reference']["list"][$captkey][5] . $phpwcms["sharpen_level"] . $phpwcms['colorspace'])));
$thumb_image = get_cached_image(array("target_ext" => $content['reference']["list"][$captkey][3], "image_name" => $content['reference']["list"][$captkey][2] . '.' . $content['reference']["list"][$captkey][3], "max_width" => $content['reference']["temp_list_width"], "max_height" => $content['reference']["temp_list_height"], "thumb_name" => md5($content['reference']["list"][$captkey][2] . $content['reference']["temp_list_width"] . $content['reference']["temp_list_height"] . $phpwcms["sharpen_level"] . $phpwcms['colorspace'])));
if ($thumb_image != false) {
initFrontendJS();
if (!empty($content['reference']['caption_list'][$captkey])) {
$img_name = $content['reference']['caption_list'][$captkey];
} else {
$img_name = html_specialchars($content['reference']["list"][$captkey][1]);
}
$content['reference']['ref_list'] .= '<img src="' . PHPWCMS_IMAGES . $thumb_image[0];
$content['reference']['ref_list'] .= '" border="' . $content['reference']['border'] . '" ';
$content['reference']['ref_list'] .= $thumb_image[3] . ' alt="' . $img_name . '" title="' . $img_name;
$content['reference']['ref_list'] .= '" id="' . $content['reference']['ref_id'] . 'a' . $captkey;
$content['reference']['ref_list'] .= '" name="' . $content['reference']['ref_id'] . 'a' . $captkey . '" ';
// switch large image onmouseover
$content['reference']['ref_list'] .= 'onmouseover="';
if ($over_image != false) {
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:cnt50.article.inc.php
示例14: die
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
// Reference
$cinfo["result"] = $row["acontent_title"] ? cut_string($row["acontent_title"], '…', 55) : "";
$cinfo["result"] .= $cinfo["result"] && $row["acontent_subtitle"] ? " / " : "";
$cinfo["result"] .= $row["acontent_subtitle"] ? cut_string($row["acontent_subtitle"], '…', 55) : "";
$reference = unserialize($row["acontent_form"]);
if (is_array($reference["list"]) && count($reference["list"])) {
$imgx = 0;
$img_thumbs = '';
$cinfo_img = '';
// browse images and list available
// will be visible only when aceessible
foreach ($reference["list"] as $key => $value) {
$thumb_image = get_cached_image(array("target_ext" => $reference["list"][$key][3], "image_name" => $reference["list"][$key][2] . '.' . $reference["list"][$key][3], "thumb_name" => md5($reference["list"][$key][2] . $phpwcms["img_list_width"] . $phpwcms["img_list_height"] . $phpwcms["sharpen_level"] . $phpwcms['colorspace'])));
if ($thumb_image != false) {
if ($imgx == 4) {
$cinfo_img .= '<br><img src="img/leer.gif" alt="" border="0" width="1" height="2"><br>';
$imgx = 0;
}
if ($imgx) {
$cinfo_img .= '<img src="img/leer.gif" alt="" border="0" width="2" height="1">';
}
$cinfo_img .= '<img src="' . PHPWCMS_IMAGES . $thumb_image[0] . '" border="0" ' . $thumb_image[3] . ' alt="' . html($reference["list"][$key][1]) . '">';
$imgx++;
}
}
if ($imgx) {
if ($cinfo["result"]) {
$cinfo["result"] .= '<br>';
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:31,代码来源:cnt50.list.inc.php
示例15: list_private
//.........这里部分代码省略.........
$file_row["edit"] = '<a href="' . $zieldatei . "&editfile=" . $file_row["f_id"] . '" title="' . $GLOBALS['BL']['be_fprivfunc_editfile'] . ": " . $filename . '">';
if (!$file_durchlauf) {
//Aufbau der Zeile zum Einfließen der Filelisten-Tavbelle
echo "<tr bgcolor=\"#F5F8F9\"><td colspan=\"2\"><table width=\"538\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<!-- start file list: private-functions //-->\n";
} else {
echo "<tr bgcolor=\"#FFFFFF\"><td colspan=\"5\"><img src=\"img/leer.gif\" border=\"0\" alt=\"\" /></td></tr>\n";
}
echo "<tr>\n";
echo "<td width=\"" . ($vor + 37) . "\" class=\"msglist\"><img src=\"img/leer.gif\" height=\"1\" width=\"" . ($vor + 37) . "\" border=\"0\" alt=\"\" /></td>\n";
echo "<td width=\"13\" class=\"msglist\">";
echo "<img src=\"img/icons/small_" . extimg($file_row["f_ext"]) . "\" border=\"0\" ";
echo 'onmouseover="Tip(\'ID: ' . $file_row["f_id"] . '<br>Sort: ' . $file_row["f_sort"];
echo '<br>Name: ' . html($file_row["f_name"]);
if ($file_row["f_copyright"]) {
echo '<br>©: ' . html($file_row["f_copyright"]);
}
echo '\');" onmouseout="UnTip()" alt=""';
echo " /></td>\n";
echo "<td width=\"" . (388 - $vor) . "\" class=\"msglist\"><img src=\"img/leer.gif\" height=\"1\" width=\"5\" border=\"0\" alt=\"\" />";
//echo "<a href=\"fileinfo.php?fid=".$file_row["f_id"];
//echo "\" target=\"_blank\" onclick=\"flevPopupLink(this.href,'filedetail','scrollbars=yes,resizable=yes,width=500,height=400',1);return document.MM_returnValue;\">";
echo $file_row["edit"] . $filename . "</a></td>\n";
//Aufbauen Buttonleiste für jeweilige Datei
echo "<td width=\"100\" align=\"right\" class=\"msglist\&quo
|
请发表评论