• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_pic_url函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_pic_url函数的典型用法代码示例。如果您正苦于以下问题:PHP get_pic_url函数的具体用法?PHP get_pic_url怎么用?PHP get_pic_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_pic_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: cpgUserLastComment

function cpgUserLastComment($uid)
{
    global $CONFIG, $FORBIDDEN_SET;
    $result = cpg_db_query("SELECT COUNT(*), MAX(msg_id) FROM {$CONFIG['TABLE_COMMENTS']} AS c INNER JOIN {$CONFIG['TABLE_PICTURES']} AS p ON p.pid = c.pid WHERE approval = 'YES' AND author_id = '{$uid}' {$FORBIDDEN_SET}");
    list($comment_count, $lastcom_id) = mysql_fetch_row($result);
    mysql_free_result($result);
    $lastComArray = array('count' => 0);
    if ($comment_count) {
        $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight, msg_author, UNIX_TIMESTAMP(msg_date) as msg_date, msg_body FROM {$CONFIG['TABLE_COMMENTS']} AS c INNER JOIN {$CONFIG['TABLE_PICTURES']} AS p ON p.pid = c.pid WHERE msg_id = {$lastcom_id}";
        $result = cpg_db_query($sql);
        if (mysql_num_rows($result)) {
            $row = mysql_fetch_assoc($result);
            $pic_url = get_pic_url($row, 'thumb');
            if (!is_image($row['filename'])) {
                $image_info = cpg_getimagesize(urldecode($pic_url));
                $row['pwidth'] = $image_info[0];
                $row['pheight'] = $image_info[1];
            }
            $image_size = compute_img_size($row['pwidth'], $row['pheight'], $CONFIG['thumb_width']);
            $lastcom = '<img src="' . $pic_url . '" class="image"' . $image_size['geom'] . ' border="0" alt="" />';
            $lastComArray = array('thumb' => $lastcom, 'comment' => $row['msg_body'], 'msg_date' => $row['msg_date'], 'count' => $comment_count);
        }
        mysql_free_result($result);
    }
    return $lastComArray;
}
开发者ID:stephenjschaefer,项目名称:APlusPhotography,代码行数:26,代码来源:profile.php


示例2: album_share_codes_main

function album_share_codes_main()
{
    $superCage = Inspekt::makeSuperCage();
    if ($superCage->get->testInt('album')) {
        global $CONFIG;
        $aid = $superCage->get->getInt('album');
        $result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE aid = '{$aid}'");
        if (mysql_num_rows($result) > 0) {
            while ($row = mysql_fetch_assoc($result)) {
                $url = $CONFIG['ecards_more_pic_target'] . 'displayimage.php?pid=' . $row['pid'];
                $thumb = $CONFIG['ecards_more_pic_target'] . get_pic_url($row, 'thumb');
                $content1 .= '[url=' . $url . '][img]' . $thumb . '[/img][/url]' . "\n";
                $content2 .= '<a href="' . $url . '"><img src="' . $thumb . ' /></a>' . "\n";
            }
            starttable(-1, 'Share codes for <i>all files</i> in this album');
            echo <<<EOT
                <tr>
                    <td class="tableb">
                        <tt>[url][img][/url]</tt>: <textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">{$content1}</textarea>
                        <br />
                        <tt>&lt;a&gt;&lt;img&gt;&lt;/a&gt;</tt>: <textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">{$content2}</textarea>
                    </td>
                </tr>
EOT;
            endtable();
        }
    }
}
开发者ID:phill104,项目名称:branches,代码行数:28,代码来源:codebase.php


示例3: cpgUserLastComment

function cpgUserLastComment($uid)
{
    global $CONFIG;
    $result = cpg_db_query("SELECT count(*), MAX(msg_id) FROM {$CONFIG['TABLE_COMMENTS']} as c, {$CONFIG['TABLE_PICTURES']} as p WHERE c.pid = p.pid AND approval='YES' AND author_id = '{$uid}' {$FORBIDDEN_SET}");
    $nbEnr = mysql_fetch_array($result);
    $comment_count = $nbEnr[0];
    $lastcom_id = $nbEnr[1];
    mysql_free_result($result);
    $lastcom = '';
    if ($comment_count) {
        $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight, msg_author, UNIX_TIMESTAMP(msg_date) as msg_date, msg_body, approval " . "FROM {$CONFIG['TABLE_COMMENTS']} AS c, {$CONFIG['TABLE_PICTURES']} AS p " . "WHERE msg_id='" . $lastcom_id . "' AND approval = 'YES' AND c.pid = p.pid";
        $result = cpg_db_query($sql);
        if (mysql_num_rows($result)) {
            $row = mysql_fetch_array($result);
            mysql_free_result($result);
            $pic_url = get_pic_url($row, 'thumb');
            if (!is_image($row['filename'])) {
                $image_info = cpg_getimagesize(urldecode($pic_url));
                $row['pwidth'] = $image_info[0];
                $row['pheight'] = $image_info[1];
            }
            $image_size = compute_img_size($row['pwidth'], $row['pheight'], $CONFIG['thumb_width']);
            $mime_content = cpg_get_type($row['filename']);
            $lastcom = '<img src="' . $pic_url . '" class="image"' . $image_size['geom'] . ' border="0" alt="" />';
        }
    }
    $lastComArray = array();
    $lastComArray['thumb'] = $lastcom;
    $lastComArray['comment'] = $row['msg_body'];
    $lastComArray['msg_date'] = $row['msg_date'];
    $lastComArray['count'] = $comment_count;
    return $lastComArray;
}
开发者ID:phill104,项目名称:branches,代码行数:33,代码来源:profile.php


示例4: run

/**
 * Created by PhpStorm.
 * User: m_xuelu
 * Date: 2015/7/7
 * Time: 20:33
 */
function run()
{
    header('Content-Type:text/html;charset=utf-8');
    date_default_timezone_set('PRC');
    //set time zone
    //图片保存目录 pic save path
    define('PATH_DOWNLOAD', './download/');
    save_dir(PATH_DOWNLOAD);
    set_time_limit(0);
    $city_url = "http://wd.koudai.com/wd/cate/getList?param={%22userID%22:%22337474108%22}&callback=jsonpcallback_1436277342180_5235922697465867&ver=2015070700014";
    //验证curl模块
    if (!function_exists('curl_init')) {
        echo "执行失败!请先安装curl扩展!\n";
        exit;
    }
    //获取城市目录
    $city = get_mulu($city_url);
    echo "获取城市:" . $city['status'] . "  耗时:" . $city['time'] . "\n";
    //解析目录jsonp数据
    $city = get_items($city['res']);
    //开始循环城市
    foreach ($city['result'] as $city) {
        $city_dir = PATH_DOWNLOAD . $city['cate_name'] . "/";
        save_dir(get_gbk($city_dir));
        echo "开始处理 " . $city['cate_name'] . "  城市ID:" . $city['cate_id'] . "\n";
        $url = "http://wd.koudai.com/wd/cate/getItems?param={%22userID%22:%22337474108%22,%22cate_id%22:%22" . $city['cate_id'] . "%22,%22limitStart%22:0,%22limitNum%22:10}&callback=jsonpcallback_1436278044036_6557131321169436&ver=2015070700014";
        $mulu = get_mulu($url);
        echo "--获取目录状态:" . $mulu['status'] . ",耗时:" . $mulu['time'] . "\n";
        //解析目录jsonp数据
        $items = get_items($mulu['res']);
        foreach ($items['result'] as $item) {
            //保存目录
            $name = str_replace(" ", "", $item['itemName']);
            $name = str_replace("/", "", $name);
            $name = str_replace(".", "", $name);
            $name = str_replace("\r", "", $name);
            $name = str_replace("\n", "", $name);
            $girl_dir = $city_dir . $name . "/";
            save_dir(get_gbk($girl_dir));
            //解析二级页面
            $second_url = "http://weidian.com/wd/item/getPubInfo?param={%22itemID%22:" . $item['itemID'] . ",%22page%22:1}&callback=jsonpcallback_1436279264909_6875134997535497&ver=2015070700014";
            $senond_mulu = get_mulu($second_url);
            $s_items = get_items($senond_mulu['res']);
            echo "----二级目录:" . $item['itemName'] . "  图片数量:" . count($s_items['result']['Imgs']) . "\n";
            echo "----开始下载...\n";
            $index = 1;
            foreach ($s_items['result']['Imgs'] as $pic) {
                //对地址进行处理
                $pic_url = get_pic_url($pic);
                //写入图片文件
                save_file($pic_url, $girl_dir, $index++);
            }
            unset($url);
        }
    }
}
开发者ID:xuelu520,项目名称:pachong,代码行数:62,代码来源:weidian20150707.php


示例5: pixaco_add

function pixaco_add($pic_data)
{
    global $CONFIG;
    //select the langfile, if! fallback
    if (!file_exists("plugins/pixaco/lang/{$CONFIG['lang']}.php")) {
        $CONFIG['lang'] = 'english';
    }
    require "plugins/pixaco/lang/{$CONFIG['lang']}.php";
    //get the fullsize pic URL
    $fullsize_url = get_pic_url($pic_data);
    $button_def = '';
    $link_data = '<a href="javascript:;" onclick="MM_openBrWindow(\'http://www.pixaco.de/services/httpbridge.aspx?smm=cookie&cmd=addimage&url0=' . $CONFIG['ecards_more_pic_target'] . $fullsize_url . '\',\'popup\',\'width=310,height=250,menubar=no,status=no,scrollbars=no,resizable=yes,left=50,top=50\');">' . $lang_plugin_pixaco['add_item'] . '</a>';
    //add that generated code to the html and return
    $pic_data['html'] = $pic_data['html'] . $link_data;
    return $pic_data;
}
开发者ID:phill104,项目名称:branches,代码行数:16,代码来源:codebase.php


示例6: bbcode_add_data

function bbcode_add_data($pic_data)
{
    //$pic_data
    global $CONFIG;
    //here we define a var that holds the copy to clipboard javascript
    //unfortunately the Firefox security settings do not allow clipboard copy to work without modifying prefs...
    //therefore only a msg pops up if a user uses netscape/ firefox and presses the copy button
    $script_data = <<<EOT

<script language="javascript" type="text/javascript">
<!--
function copy_clip(bb_text)
{
 if (window.clipboardData) 
   {
   \twindow.clipboardData.setData("Text", bb_text);
   }
   else if (window.netscape) 
   { 
   \talert("Due to Firefox secutrity settings it is not possible to use the copy button. Please manually copy the bb code with 3 fast left clicks into the textara. Then press ctrl+c");
   }
   return false;
}
//-->
</script>
EOT;
    $fullsize_url = get_pic_url($pic_data);
    //here we grab the url to the fullsized pic
    $thumb_url = get_pic_url($pic_data, 'thumb');
    //thumb url
    $pic_data['title'] ? $name = $pic_data['title'] : ($name = 'No Title');
    //chcking if the pic has a title, if not we set it to 'No title'
    //here we define the actual bbcode coppermine path + the path to the pic $img_url is for the version that displays the thumb, $name_url is for a txt link with the ikmage title
    $img_url = '[url=' . $CONFIG['ecards_more_pic_target'] . $fullsize_url . '][IMG]' . $CONFIG['ecards_more_pic_target'] . $thumb_url . '[/IMG][/url]';
    $name_url = '[url=' . $CONFIG['ecards_more_pic_target'] . $fullsize_url . ']' . $name . '[/url]';
    //this just brings everything in form... we create a table etc.
    $bbcode_data = '<table align="center" width="' . $CONFIG['picture_width'] . '">' . $script_data . '<tr>';
    $bbcode_data .= '<td>[url][img][/url]</td>';
    $bbcode_data .= '<td><textarea name="bbcode" rows="1" cols="40" style="overflow:off;">' . $img_url . '</textarea><input type="button" value="Copy" onclick=\'copy_clip("' . $img_url . '")\'></td>';
    $bbcode_data .= '</tr><tr>';
    $bbcode_data .= '<td>[url]title[/url]</td>';
    $bbcode_data .= '<td><textarea name="bbcode" rows="1" cols="40">' . $name_url . '</textarea><input type="button" value="Copy" onclick=\'copy_clip("' . $name_url . '")\'></td>';
    $bbcode_data .= '</tr></table>';
    //finally we add the created stuff to the picture data and return it to coppermine
    $pic_data['html'] = $pic_data['html'] . $bbcode_data;
    return $pic_data;
}
开发者ID:phill104,项目名称:branches,代码行数:47,代码来源:codebase.php


示例7: embed_code_file_info

function embed_code_file_info($info)
{
    global $CONFIG, $CURRENT_PIC_DATA;
    // The weird comparision is because only picture_width is stored
    $resize_method = $CONFIG['picture_use'] == "thumb" ? $CONFIG['thumb_use'] == "ex" ? "any" : $CONFIG['thumb_use'] : $CONFIG['picture_use'];
    if ($resize_method == 'ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width']) {
        $use_intermediate = true;
    } elseif ($resize_method == 'wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']) {
        $use_intermediate = true;
    } elseif ($resize_method == 'any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']) {
        $use_intermediate = true;
    } else {
        $use_intermediate = false;
    }
    $file['thumb'] = $CONFIG['ecards_more_pic_target'] . get_pic_url($CURRENT_PIC_DATA, 'thumb');
    $file['fullsize'] = $CONFIG['ecards_more_pic_target'] . get_pic_url($CURRENT_PIC_DATA, 'fullsize');
    if ($use_intermediate) {
        $file['normal'] = $CONFIG['ecards_more_pic_target'] . get_pic_url($CURRENT_PIC_DATA, 'normal');
        if (strpos($normal, 'images/thumbs/thumb_nopic.png')) {
            $file['normal'] = $file['fullsize'];
        }
    } else {
        $file['normal'] = $file['fullsize'];
    }
    $url = $CONFIG['ecards_more_pic_target'] . 'displayimage.php?pid=' . $CURRENT_PIC_DATA['pid'];
    if ($CONFIG['plugin_embed_code_fullsized_view'] == 1) {
        $url .= "&amp;fullsize=1";
    }
    foreach (plugin_embed_code_config_options() as $option => $text) {
        if ($CONFIG[$option] == 1 && $option != 'plugin_embed_code_fullsized_view') {
            $option_parts = explode("_", $option);
            $textarea = '<textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">';
            if ($option_parts[3] == 'bb') {
                $textarea .= '[url=' . $url . '][img]' . $file[$option_parts[4]] . '[/img][/url]</textarea>';
            } elseif ($option_parts[3] == 'html') {
                $textarea .= '&lt;a href="' . $url . '"&gt;&lt;img src="' . $file[$option_parts[4]] . '" /&gt;&lt;/a&gt;</textarea>';
            }
            $info[$text] = $textarea;
        }
    }
    return $info;
}
开发者ID:phill104,项目名称:branches,代码行数:42,代码来源:codebase.php


示例8: die

  $Revision$
**********************************************/
if (!defined('IN_COPPERMINE')) {
    die('Not in Coppermine...');
}
//////////////////// Variables //////////////////////////////
// used texts
$txt['bigger'] = ">";
$txt['smaller'] = "<";
$txt['up'] = "^";
$txt['down'] = "v";
$txt['closewindow'] = "Close window";
$result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE pid = '{$pid}'");
$CURRENT_PIC = mysql_fetch_array($result);
mysql_free_result($result);
$pic_url = get_pic_url($CURRENT_PIC, 'fullsize');
echo <<<cropUIjs
<script language="javascript" type="text/javascript" src="dhtmlLib.js"></script>
<script language="javascript" type="text/javascript">
<!--

function libinit(){
        obj=new lib_obj('cropDiv')
        obj.dragdrop()
        objImg =new lib_obj('imgDiv')
        //alert (objImg.x + "-" + objImg.y);
        obj.moveIt(objImg.x,objImg.y)
}

function cropCheck(crA){
  //alert (obj.x + "-" + obj.y);
开发者ID:CatBerg-TestOrg,项目名称:coppermine_1.6.x,代码行数:31,代码来源:crop.inc.php


示例9: COUNT

$pic_count = $nbEnr[0];
// if we have more than 1000 pictures, we limit the number of picture returned
// by the SELECT statement as ORDER BY RAND() is time consuming
if ($pic_count > 1000) {
    $result = $db->sql_query("SELECT COUNT(*) from " . $cpg_prefix . "pictures WHERE approved = 1");
    $nbEnr = $db->sql_fetchrow($result);
    $total_count = $nbEnr[0];
    $granularity = floor($total_count / 1000);
    $cor_gran = ceil($total_count / $pic_count);
    srand(time());
    for ($i = 1; $i <= $cor_gran; $i++) {
        $random_num_set = rand(0, $granularity) . ', ';
    }
    $random_num_set = substr($random_num_set, 0, -2);
    $result = $db->sql_query("SELECT pid, filepath, filename, p.aid, p.title FROM " . $cpg_prefix . "pictures AS p INNER JOIN " . $cpg_prefix . "albums AS a ON (p.aid = a.aid AND " . VIS_GROUPS . ") WHERE randpos IN ({$random_num_set}) AND approved=1 GROUP BY pid ORDER BY RAND() DESC LIMIT {$limit}");
} else {
    $result = $db->sql_query("SELECT pid, filepath, filename, p.aid, p.title FROM " . $cpg_prefix . "pictures AS p INNER JOIN " . $cpg_prefix . "albums AS a ON (p.aid = a.aid AND " . VIS_GROUPS . ") WHERE approved=1 GROUP BY pid ORDER BY RAND() DESC LIMIT {$limit}");
}
while ($row = $db->sql_fetchrow($result)) {
    if ($CONFIG['seo_alts'] == 0) {
        $thumb_title = $row['filename'];
    } else {
        if ($row['title'] != '') {
            $thumb_title = $row['title'];
        } else {
            $thumb_title = substr($row['filename'], 0, -4);
        }
    }
    $content .= '<td align="center" valign="baseline"><a href="' . URL::index($cpg_dir . '&amp;file=displayimage&amp;album=' . $row['aid'] . '&amp;pid=' . $row["pid"]) . '"><img src="' . get_pic_url($row, 'thumb') . '" border="0" alt="' . $thumb_title . '" title="' . $thumb_title . '" /><br />' . $thumb_title . '</a></td>';
}
$content .= '</tr><tr align="center"><td colspan="' . $limit . '" valign="baseline"><a href="' . URL::index($cpg_dir) . '">' . _coppermineLANG . '</a></td></tr></table>';
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:block-CPG-center-Random_pictures.php


示例10: floor

    $row['pheight'] = floor($CONFIG['thumb_width'] * 2 / 3);
}
$smilies = generate_smilies();
echo <<<EOT
<form method="post" name="post" id="cpgform" action="{$CPG_PHP_SELF}?album={$album}&amp;pid={$pid}">
EOT;
starttable("100%", $icon_array['ecard'] . $lang_ecard_php['title'], 3);
echo <<<EOT
    <tr>
        <td class="tableh2" colspan="2">
            <strong>{$lang_ecard_php['from']}</strong>
        </td>
        <td rowspan="6" align="center" valign="top" class="tableb">
EOT;
if (is_flash($row['filename'])) {
    $n_picname = get_pic_url($row, 'fullsize');
    echo <<<EOT
            <object id="SWFlash"  classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" type="application/x-shockwave-flash" width="{$thumb_size['width']}" height="{$thumb_size['height']}">
                <param name="autostart" value="true" />
                <param name="src" value="{$n_picname}" />
            </object>
EOT;
} else {
    echo <<<EOT
            <a href="displayimage.php?pid={$pid}">
                <img src="{$thumb_pic_url}" width="{$thumb_size['width']}" height="{$thumb_size['height']}" alt="" vspace="8" border="0" class="image" />
            </a>
EOT;
}
echo <<<EOT
        </td>
开发者ID:CatBerg-TestOrg,项目名称:coppermine,代码行数:31,代码来源:ecard.php


示例11: theme_display_fullsize_pic

function theme_display_fullsize_pic()
{
    global $CONFIG, $THEME_DIR, $ALBUM_SET;
    global $lang_errors, $lang_fullsize_popup, $lang_charset;
    if (isset($_GET['picfile'])) {
        if (!GALLERY_ADMIN_MODE) {
            cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
        }
        $picfile = $_GET['picfile'];
        $picname = $CONFIG['fullpath'] . $picfile;
        $imagesize = @getimagesize($picname);
        $imagedata = array('name' => $picfile, 'path' => path2url($picname), 'geometry' => $imagesize[3]);
    } elseif (isset($_GET['pid'])) {
        $pid = (int) $_GET['pid'];
        $sql = "SELECT * " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='{$pid}' {$ALBUM_SET}";
        $result = cpg_db_query($sql);
        if (!mysql_num_rows($result)) {
            cpg_die(ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__);
        }
        $row = mysql_fetch_array($result);
        $pic_url = get_pic_url($row, 'fullsize');
        $geom = 'width="' . $row['pwidth'] . '" height="' . $row['pheight'] . '"';
        $imagedata = array('name' => $row['filename'], 'path' => $pic_url, 'geometry' => $geom);
    }
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=<?php 
    echo $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'];
    ?>
" />
  <title><?php 
    echo $CONFIG['gallery_name'];
    ?>
: <?php 
    echo $lang_fullsize_popup['click_to_close'];
    ?>
</title>
  <style type="text/css">
    body { margin: 0; padding: 0; background-color: gray; }
    img { margin:0; padding:0; border:0; }
    #content { margin:0 auto; padding:0; border:0; }
    table { border:0; width:<?php 
    echo $row['pwidth'];
    ?>
px; height:<?php 
    echo $row['pheight'];
    ?>
px; border-collapse:collapse}
    td {         vertical-align: middle; text-align:center; }
  </style>
  <script type="text/javascript" src="scripts.js"></script>
  </head>
  <body style="margin:0px; padding:0px; background-color: gray;">
    <script language="JavaScript" type="text/JavaScript">
      adjust_popup();
    </script>
<?php 
    if ($CONFIG['transparent_overlay'] == 1) {
        ?>
    <table cellpadding="0" cellspacing="0" align="center" style="padding:0px;">
      <tr>
              <?php 
        echo '<td align="center" valign="middle" background="' . htmlspecialchars($imagedata['path']) . '" ' . $imagedata['geometry'] . ' class="image">';
        echo '<div id="content">';
        echo '<a href="javascript: window.close()" style="border:none"><img src="images/image.gif?id=' . floor(rand() * 1000 + rand()) . '&amp;fullsize=yes" ' . $imagedata['geometry'] . ' alt="' . htmlspecialchars($imagedata['name']) . '" title="' . htmlspecialchars($imagedata['name']) . "\n" . $lang_fullsize_popup['click_to_close'] . '" /></a><br />' . "\n";
        ?>
          </div>
        </td>
      </tr>
    </table>
<?php 
    } else {
        ?>
    <table class="fullsize">
      <tr>
        <td>
          <div id="content">
              <?php 
        echo '<a href="javascript: window.close()"><img src="' . htmlspecialchars($imagedata['path']) . '" ' . $imagedata['geometry'] . 'alt="' . htmlspecialchars($imagedata['name']) . '" title="' . htmlspecialchars($imagedata['name']) . "\n" . $lang_fullsize_popup['click_to_close'] . '" /></a><br />' . "\n";
        ?>
          </div>
        </td>
      </tr>
    </table>
<?php 
    }
    ?>
  </body>
</html>
<?php 
}
开发者ID:phill104,项目名称:branches,代码行数:93,代码来源:theme.php


示例12: ON

$cpg_block = true;
require "modules/" . $cpg_dir . "/include/load.inc";
$cpg_block = false;
$limit = $CONFIG['thumbcols'];
//number of thumbs
// $limit = 5; //number of pictures
$content = '';
// END USER DEFINEABLES
$result = $db->sql_query("SELECT pid, filepath, filename, p.aid, pic_rating, p.votes, p.title FROM " . $cpg_prefix . "pictures AS p INNER JOIN " . $cpg_prefix . "albums AS a ON (p.aid = a.aid AND " . VIS_GROUPS . ") WHERE approved=1 AND p.votes >= '{$CONFIG['min_votes_for_rating']}' GROUP BY pid ORDER BY ROUND((pic_rating+1)/2000) DESC, p.votes DESC LIMIT {$limit}");
$content .= '<br /><table width="100%" cols="' . $limit . '" border="0" cellpadding="0" cellspacing="0"><tr align="center">';
$pic = 0;
while ($row = $db->sql_fetchrow($result)) {
    if (defined('THEME_HAS_RATING_GRAPHICS')) {
        $theme_prefix = $CONFIG['theme'] . '/';
    } else {
        $theme_prefix = '';
    }
    $caption = '<img src="' . $CPG_M_DIR . '/' . $theme_prefix . 'images/rating' . round($row["pic_rating"] / 2000) . '.gif" align="center" alt="" />' . '<br />' . sprintf($lang_get_pic_data['n_votes'], $row['votes']) . '<br />';
    if ($CONFIG['seo_alts'] == 0) {
        $thumb_title = $row['filename'];
    } else {
        if ($row['title'] != '') {
            $thumb_title = $row['title'];
        } else {
            $thumb_title = substr($row['filename'], 0, -4);
        }
    }
    $content .= '<td align="center" valign="baseline"><a href="' . URL::index($cpg_dir . '&amp;file=displayimage&amp;meta=toprated&amp;cat=0&amp;pos=' . $pic) . '"><img src="' . get_pic_url($row, 'thumb') . '" alt="' . $thumb_title . '" title="' . $thumb_title . '" /><br />' . $caption . '</a></td>';
    $pic++;
}
$content .= '</tr><tr><td colspan="' . $limit . '" valign="baseline" align="center"><a href = "' . URL::index($cpg_dir) . '">' . _coppermineLANG . '</a></td></tr></table>';
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:block-CPG-center-Top_rate_pictures.php


示例13: array

        <a href="{$_SERVER['PHP_SELF']}?start={$start}&amp;count={$count}&amp;sort=comment_a"><img src="images/ascending.gif" width="9" height="9" border="0" alt="" title="{$lang_reviewcom_php['comment_a']}" /></a>
        <a href="{$_SERVER['PHP_SELF']}?start={$start}&amp;count={$count}&amp;sort=comment_d"><img src="images/descending.gif" width="9" height="9" border="0" alt="" title="{$lang_reviewcom_php['comment_d']}" /></a>
        </td>
        <td class="tableh2" valign="top">{$lang_reviewcom_php['file']}
        <a href="{$_SERVER['PHP_SELF']}?start={$start}&amp;count={$count}&amp;sort=file_a"><img src="images/ascending.gif" width="9" height="9" border="0" alt="" title="{$lang_reviewcom_php['file_a']}" /></a>
        <a href="{$_SERVER['PHP_SELF']}?start={$start}&amp;count={$count}&amp;sort=file_d"><img src="images/descending.gif" width="9" height="9" border="0" alt="" title="{$lang_reviewcom_php['file_d']}" /></a>
        </td>
        </tr>

EOT;
$sort_codes = array('name_a' => 'msg_author ASC', 'name_d' => 'msg_author DESC', 'date_a' => 'msg_id ASC', 'date_d' => 'msg_id DESC', 'comment_a' => 'msg_body ASC', 'comment_d' => 'msg_body DESC', 'file_a' => 'pid ASC', 'file_d' => 'pid DESC');
$sort = !isset($_GET['sort']) || !isset($sort_codes[$_GET['sort']]) ? 'date_d' : $_GET['sort'];
$result = cpg_db_query("SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, {$CONFIG['TABLE_COMMENTS']}.pid as pid, aid, filepath, filename, url_prefix, pwidth, pheight FROM {$CONFIG['TABLE_COMMENTS']}, {$CONFIG['TABLE_PICTURES']} WHERE {$CONFIG['TABLE_COMMENTS']}.pid = {$CONFIG['TABLE_PICTURES']}.pid ORDER BY {$sort_codes[$sort]} LIMIT {$start}, {$count}");
$rowcounter = 0;
while ($row = mysql_fetch_array($result)) {
    $thumb_url = get_pic_url($row, 'thumb');
    if (!is_image($row['filename'])) {
        $image_info = getimagesize($thumb_url);
        $row['pwidth'] = $image_info[0];
        $row['pheight'] = $image_info[1];
    }
    $image_size = compute_img_size($row['pwidth'], $row['pheight'], $CONFIG['alb_list_thumb_size']);
    $thumb_link = 'displayimage.php?pos=' . -$row['pid'];
    $msg_date = localised_date($row['msg_date'], $comment_date_fmt);
    $msg_body = bb_decode(process_smilies($row['msg_body']));
    $rowcounter++;
    if ($rowcounter >= 2) {
        //let the row colors alternate, for now they are the same
        $rowcounter = 0;
        $tableclass = 'tableb';
        // change to "tableh2_compact" or similar for alternation
开发者ID:alencarmo,项目名称:OCF,代码行数:31,代码来源:reviewcom.php


示例14: html_picture

function html_picture()
{
    global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER, $CPG_M_DIR;
    global $album, $template_display_picture;
    $pid = $CURRENT_PIC_DATA['pid'];
    // $ina is where the Registered Only picture is
    $ina = "{$CPG_M_DIR}/images/ina.jpg";
    // Check for anon picture viewing - only for registered user, admin, or if admin allows anon access to full size images
    if (USER_ID > 1 or $CONFIG['allow_anon_fullsize'] or USER_IS_ADMIN) {
        // Add 1 to hit counter unless the user reloaded the page
        if (!isset($USER['liv']) || !is_array($USER['liv'])) {
            $USER['liv'] = array();
        }
        // Add 1 to hit counter
        if ($album != "lasthits" && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
            add_hit($pid);
            if (count($USER['liv']) > 4) {
                array_shift($USER['liv']);
            }
            //pass by ref depreciated in 4.3.9 array_push($USER['liv'], $pid);
            $USER['liv'][] = $pid;
        }
        if ($CONFIG['make_intermediate'] && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']) {
            $picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
        } else {
            $picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
        }
        $picture_menu = USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID || GALLERY_ADMIN_MODE || $CURRENT_PIC_DATA['owner_id'] == USER_ID ? html_picture_menu($pid) : '';
        $image_size = compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);
        $pic_title = '';
        if ($CURRENT_PIC_DATA['title'] != '') {
            $pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
        }
        if ($CURRENT_PIC_DATA['caption'] != '') {
            $pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
        }
        if ($CURRENT_PIC_DATA['keywords'] != '') {
            $pic_title .= KEYWORDS . ": " . $CURRENT_PIC_DATA['keywords'];
        }
        if (isset($image_size['reduced'])) {
            $CONFIG['justso'] = 0;
            if ($CONFIG['justso']) {
                //require_once('jspw.js');
                $winsizeX = $CURRENT_PIC_DATA['pwidth'] + 16;
                $winsizeY = $CURRENT_PIC_DATA['pheight'] + 16;
                $hug = 'hug image';
                $hugwidth = '4';
                $bgclr = '#000000';
                $alt = CLICK_TO_CLOSE;
                // $lang_fullsize_popup[1];
                $pic_html = '<a href="' . URL::index("&amp;file=justsofullsize&amp;pid={$pid}", false, true) . '" target="' . uniqid(rand()) . "\" onclick=\"JustSoPicWindow('" . URL::index("&amp;file=justsofullsize&amp;pid={$pid}", false, true) . "','{$winsizeX}','{$winsizeY}','{$alt}','{$bgclr}','{$hug}','{$hugwidth}');return false\">";
            } else {
                $winsizeX = $CURRENT_PIC_DATA['pwidth'] + 16;
                $winsizeY = $CURRENT_PIC_DATA['pheight'] + 16;
                $pic_html = '<a href="' . URL::index("&amp;file=displayimagepopup&amp;pid={$pid}&amp;fullsize=1", true, true) . '" target="' . uniqid(rand()) . "\" onclick=\"imgpop('" . URL::index("&amp;file=displayimagepopup&amp;pid={$pid}&amp;fullsize=1", true, true) . "','" . uniqid(rand()) . "','resizable=yes,scrollbars=yes,width={$winsizeX},height={$winsizeY},left=0,top=0');return false\">";
                //toolbar=yes,status=yes,
                $pic_title = VIEW_FS . "\n ============== \n" . $pic_title;
                //added by gaugau
            }
            $pic_html .= "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"{$pic_title}\" title=\"{$pic_title}\" /><br />";
            $pic_html .= "</a>\n";
        } else {
            $pic_html = "<img src=\"" . $picture_url . "\" {$image_size['geom']} alt=\"{$pic_title}\" title=\"{$pic_title}\" class=\"image\" border=\"0\" /><br />\n";
        }
        if (!$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
            template_extract_block($template_display_picture, 'img_desc');
        } else {
            if (!$CURRENT_PIC_DATA['title']) {
                template_extract_block($template_display_picture, 'title');
            }
            if (!$CURRENT_PIC_DATA['caption']) {
                template_extract_block($template_display_picture, 'caption');
            }
        }
    } else {
        $imagesize = getimagesize($ina);
        $image_size = compute_img_size($imagesize[0], $imagesize[1], $CONFIG['picture_width']);
        $pic_html = '<a href="' . NEWUSER_URL . '">';
        $pic_html .= "<img src=\"" . $ina . "\" {$image_size['geom']} alt=\"Click to register\" title=\"Click to register\" class=\"image\" border=\"0\" /></a><br />";
        $picture_menu = "";
        $CURRENT_PIC_DATA['title'] = MEMBERS_ONLY;
        $CURRENT_PIC_DATA['caption'] = '';
    }
    $params = array('{CELL_HEIGHT}' => '100', '{IMAGE}' => $pic_html, '{ADMIN_MENU}' => $picture_menu, '{TITLE}' => $CURRENT_PIC_DATA['title'], '{CAPTION}' => decode_bbcode($CURRENT_PIC_DATA['caption']));
    return template_eval($template_display_picture, $params);
}
开发者ID:cbsistem,项目名称:nexos,代码行数:86,代码来源:displayimage.php


示例15: list_cat_albums

/**
* list_cat_albums()
*
* This has been added to list the albums in a category, used for showing first level albums, largely a repetition of code elsewhere
* Redone for a cleaner approach
* @param integer $cat Category id for which albums are needed
*/
function list_cat_albums($cat, $catdata)
{
    global $CONFIG, $lang_date, $FORBIDDEN_SET_DATA;
    global $lang_list_albums;
    $PAGE = 1;
    if ($cat == 0) {
        return '';
    }
    $cat_owner_id = $cat > 10000 ? 10000 - $cat : 10001;
    $cpg_nopic_data = cpg_get_system_thumb('nopic.jpg', $cat_owner_id);
    $cpg_privatepic_data = cpg_get_system_thumb('private.jpg', $cat_owner_id);
    $alb_per_page = $CONFIG['albums_per_page'];
    //unused code {SaWey}
    /*$maxTab = $CONFIG['max_tabs'];
    
        $album_filter = '';
        $pic_filter = '';
    
        if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) {
            $album_filter = ' and ' . str_replace('p.', 'a.', $FORBIDDEN_SET);
            $pic_filter = ' and ' . $FORBIDDEN_SET;
        }*/
    $nbAlb = $catdata['details']['alb_count'];
    if ($nbAlb == 0) {
        return;
    }
    $totalPages = ceil($nbAlb / $alb_per_page);
    $alb_list = array();
    $approved = ' AND approved=\'YES\'';
    $forbidden_set_string = count($FORBIDDEN_SET_DATA) > 0 ? ' AND aid NOT IN (' . implode(', ', $FORBIDDEN_SET_DATA) . ')' : '';
    $last_pids = array();
    $last_pid_data = array();
    foreach ($catdata['subalbums'] as $aid => $album) {
        if ($CONFIG['link_pic_count'] == 1 || $album['pic_count'] == 0) {
            if (!empty($album['keyword'])) {
                $keyword = $album['keyword'] ? "AND (keywords like '%" . addslashes($album['keyword']) . "%' {$forbidden_set_string})" : '';
                $query = "SELECT count(pid) AS link_pic_count, max(pid) AS link_last_pid, max(ctime) AS link_last_upload " . " FROM {$CONFIG['TABLE_PICTURES']} " . " WHERE ((aid != '{$aid}' {$forbidden_set_string}) {$keyword}) {$approved}";
                $result = cpg_db_query($query);
                $link_stat = $result->fetchAssoc(true);
                $catdata['subalbums'][$aid]['link_pic_count'] = $link_stat['link_pic_count'];
                $catdata['subalbums'][$aid]['last_pid'] = !empty($album['last_pid']) && $album['last_pid'] > $link_stat['link_last_pid'] ? $album['last_pid'] : $link_stat['link_last_pid'];
                if ($CONFIG['link_last_upload'] && $link_stat['link_pic_count'] > 0) {
                    $catdata['subalbums'][$aid]['last_upload'] = $album['last_upload'] > $link_stat['link_last_upload'] ? $album['last_upload'] : $link_stat['link_last_upload'];
                }
            }
        }
        if ($catdata['subalbums'][$aid]['last_pid']) {
            $last_pids[] = $catdata['subalbums'][$aid]['last_pid'];
        }
        if ($album['thumb'] > 0) {
            $last_pids[] = $album['thumb'];
        }
    }
    if (count($last_pids)) {
        $result = cpg_db_query("SELECT pid, filepath, filename, url_prefix, pwidth, pheight FROM {$CONFIG['TABLE_PICTURES']} WHERE pid IN (" . implode(',', $last_pids) . ")");
        while ($row = $result->fetchAssoc()) {
            $last_pid_data[$row['pid']] = $row;
            unset($last_pid_data[$row['pid']]['pid']);
        }
        $result->free();
    }
    unset($last_pids);
    foreach ($catdata['subalbums'] as $aid => $album) {
        // Inserts a thumbnail if the album contains 1 or more images
        //unused code {SaWey}
        //$visibility = $album['visibility'];
        $keyword = $album['keyword'] ? "OR (keywords like '%" . addslashes($album['keyword']) . "%' {$forbidden_set_string})" : '';
        if (!in_array($aid, $FORBIDDEN_SET_DATA) || $CONFIG['allow_private_albums'] == 0) {
            //test for visibility
            if ($album['pic_count'] > 0 || !empty($album['link_pic_count'])) {
                if (!empty($last_pid_data[$album['thumb']]['filename'])) {
                    $picture = $last_pid_data[$album['thumb']];
                } elseif ($album['thumb'] < 0) {
                    $sql = "SELECT filepath, filename, url_prefix, pwidth, pheight " . "FROM {$CONFIG['TABLE_PICTURES']} WHERE ((aid = '{$aid}' {$forbidden_set_string}) {$keyword}) {$approved} " . "ORDER BY RAND() LIMIT 0,1";
                    $result = cpg_db_query($sql);
                    $picture = $result->fetchAssoc(true);
                } else {
                    $picture = $last_pid_data[$album['last_pid']];
                }
                $pic_url = get_pic_url($picture, 'thumb');
                if (!is_image($picture['filename'])) {
                    $image_info = cpg_getimagesize(urldecode($pic_url));
                    $picture['pwidth'] = $image_info[0];
                    $picture['pheight'] = $image_info[1];
                }
                //thumb cropping
                if (array_key_exists('system_icon', $picture) && $picture['system_icon'] == true) {
                    $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size'], true, 'cat_thumb');
                } else {
                    $image_size = compute_img_size($picture['pwidth'], $picture['pheight'], $CONFIG['alb_list_thumb_size'], false, 'cat_thumb');
                }
                $alb_list[$aid]['thumb_pic'] = "<img src=\"" . $pic_url . "\" class=\"image thumbnail\" {$image_size['geom']} border=\"0\" alt=\"{$picture['filename']}\" />";
            } else {
//.........这里部分代码省略.........
开发者ID:CatBerg-TestOrg,项目名称:coppermine,代码行数:101,代码来源:index.php


示例16: display_film_strip

function display_film_strip($album, $cat, $pos)
{
    global $CONFIG, $AUTHORIZED, $HTTP_GET_VARS;
    global $album_date_fmt, $lang_display_thumbnails, $lang_errors, $lang_byte_units;
    $max_item = $CONFIG['max_film_strip_items'];
    //$thumb_per_page = $pos+$CONFIG['max_film_strip_items'];
    $thumb_per_page = $max_item * 2;
    $l_limit = max(0, $pos - $CONFIG['max_film_strip_items']);
    $new_pos = max(0, $pos - $l_limit);
    $pic_data = get_pic_data($album, $thumb_count, $album_name, $l_limit, $thumb_per_page);
    if (count($pic_data) < $max_item) {
        $max_item = count($pic_data);
    }
    $lower_limit = 3;
    if (!isset($pic_data[$new_pos + 1])) {
        $lower_limit = $new_pos - $max_item + 1;
    } else {
        if (!isset($pic_data[$new_pos + 2])) {
            $lower_limit = $new_pos - $max_item + 2;
        } else {
            if (!isset($pic_data[$new_pos - 1])) {
                $lower_limit = $new_pos;
            } else {
                $hf = $max_item / 2 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_picture函数代码示例发布时间:2022-05-15
下一篇:
PHP get_pic函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap