当前位置: 首页>>代码示例>>PHP>>正文


PHP hg_fetchimgurl函数代码示例

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


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

示例1: format_ad_material

function format_ad_material($mat, $mtype = '', $imgwidth = '', $imgheight = '')
{
    //素材路径
    $murl = '';
    //素材原始数组
    if (!is_array($mat)) {
        $isserial = unserialize($mat);
    }
    if ($isserial) {
        $mat = $isserial;
    }
    switch ($mtype) {
        case 'image':
            $murl = hg_fetchimgurl($mat, $imgwidth, $imgheight);
            break;
        case 'flash':
            $murl = hg_fetchimgurl($mat);
            break;
        case 'video':
            $murl = hg_fetchimgurl($mat['img'], $imgwidth, $imgheight);
            break;
        case 'text':
        case 'javascript':
            return $mat;
        default:
            return '';
    }
    return $murl;
}
开发者ID:h3len,项目名称:Project,代码行数:29,代码来源:functions.php

示例2: get_content

 public function get_content($field, $tablename, $array_field, $condition, $offset, $count, $data = array())
 {
     $result = array();
     $sql = "SELECT " . $field . " FROM " . DB_PREFIX . $tablename . " WHERE 1 " . $condition . " LIMIT " . $offset . " , " . $count;
     $info = $this->db->query($sql);
     if ($array_field_arr = explode(',', $array_field)) {
         while ($row = $this->db->fetch_array($info)) {
             $tag = true;
             foreach ($array_field_arr as $v) {
                 $row[$v] = unserialize($row[$v]) ? unserialize($row[$v]) : $row[$v];
                 if (0 && !empty($data['indexpic'])) {
                     if ($v == 'pic' && !empty($row[$v])) {
                         $indexpic = hg_fetchimgurl($data['indexpic']);
                         $nowpic = hg_fetchimgurl($row[$v]);
                         if ($indexpic == $nowpic) {
                             $tag = false;
                         }
                     }
                 }
             }
             if ($tag) {
                 $result[] = $row;
             }
         }
     } else {
         while ($row = $this->db->fetch_array($info)) {
             $result[] = $row;
         }
     }
     $result = to_htmlspecialchars_decode($result);
     return $result;
 }
开发者ID:h3len,项目名称:Project,代码行数:32,代码来源:get_content.class.php

示例3: show

 public function show()
 {
     $host = $this->settings['App_publishsys']['host'];
     $dir = $this->settings['App_publishsys']['dir'] . 'admin/';
     $curl = new curl($host, $dir);
     $curl->setSubmitType('post');
     $curl->initPostData();
     $curl->addRequestData('a', 'show');
     $curl->addRequestData('sign', '1');
     $curl->addRequestData('count', '1000');
     $layout_info = $curl->request('layout.php');
     if ($layout_info && is_array($layout_info)) {
         foreach ($layout_info as $k => $v) {
             if ($v['indexpic']) {
                 $v['indexpic'] = $v['indexpic'] ? hg_fetchimgurl($v['indexpic'], 0, 0) : '';
             }
             $layouts[$v['id']] = $v;
         }
     }
     $list_fields = array('id' => array('title' => 'ID', 'exper' => '$v[id]'), 'indexpic' => array('title' => '示意图', 'exper' => '$v[indexpic]'), 'name' => array('title' => '名称', 'exper' => '$v[title]'));
     $op = array('pub_setting' => array('name' => '发布', 'brief' => '', 'attr' => ' onclick="return hg_ajax_post(this, \'发布\', 1);"', 'link' => '?a=publish'));
     $batch_op = array('update' => array('name' => '发布', 'brief' => '', 'attr' => ' onclick="return hg_ajax_batchpost(this, \'publish\', \'发布\', 1,\'\',\'\',\'ajax\');"'));
     $str = 'var gBatchAction = new Array();gBatchAction[\'publish\'] = \'?a=publish\';';
     hg_add_head_element('js-c', $str);
     $this->tpl->addHeaderCode(hg_add_head_element('echo'));
     $this->tpl->addVar('list_fields', $list_fields);
     $this->tpl->addVar('op', $op);
     $this->tpl->addVar('batch_op', $batch_op);
     $this->tpl->addVar('primary_key', 'sign');
     $this->tpl->addVar('list', $layouts);
     $this->tpl->outTemplate('layout');
 }
开发者ID:h3len,项目名称:Project,代码行数:32,代码来源:admin_layout.php

示例4: detail

 public function detail($condition = '')
 {
     $sql = "SELECT * FROM " . DB_PREFIX . "manage_unit WHERE 1 " . $condition;
     $info = $this->db->query_first($sql);
     if (!$info) {
         return false;
     }
     $info['logo'] = hg_fetchimgurl(unserialize($info['logo']), 80, 60);
     return $info;
 }
开发者ID:h3len,项目名称:Project,代码行数:10,代码来源:manage_unit_mode.php

示例5: detail

 public function detail($id)
 {
     $condition = ' AND id =' . intval($id);
     $sql = 'SELECT * FROM ' . DB_PREFIX . 'staricon WHERE 1' . $condition;
     $starinfo = $this->db->query_first($sql);
     $starinfo['star'] = hg_fetchimgurl(unserialize($starinfo['star']));
     $starinfo['moon'] = hg_fetchimgurl(unserialize($starinfo['moon']));
     $starinfo['sun'] = hg_fetchimgurl(unserialize($starinfo['sun']));
     return $starinfo;
 }
开发者ID:h3len,项目名称:Project,代码行数:10,代码来源:member_staricon.class.php

示例6: callBack

 public function callBack()
 {
     $video_info = json_decode(html_entity_decode($this->input['data']), 1);
     if (!$video_info['id']) {
         $this->errorOutput(NO_VIDEO_ID);
         //没有视频id
     }
     if (!$video_info['callback_data'] || !$video_info['callback_data']['tv_play_id']) {
         $this->errorOutput(NO_TV_PLAY_ID);
         //没有电视剧id
     }
     $video_id = $video_info['id'];
     $tv_play_id = $video_info['callback_data']['tv_play_id'];
     $img_info = $video_info['img'];
     $title = $video_info['callback_data']['title'];
     $index_num = $video_info['callback_data']['index_num'];
     //转码成功回调
     if ($video_info['callback_data']['after_callback']) {
         //更新剧集转码状态
         $sql = "UPDATE " . DB_PREFIX . "tv_episode SET transcode_status = 1 WHERE tv_play_id = " . $tv_play_id . " AND video_id = " . $video_id;
         $this->db->query($sql);
         //查询电视剧的信息
         $tv_play_info = $this->mode->get_tv_play_info($tv_play_id);
         $tv_play_info = $tv_play_info[0];
         //设置了逐集发布
         if ($tv_play_info && $tv_play_info['publish_auto']) {
             $column_id_arr = array();
             if ($tv_play_info['column_id']) {
                 $column_id_arr = array_keys(unserialize($tv_play_info['column_id']));
             }
             //审核
             if (intval($tv_play_info['status']) == 2 && !empty($column_id_arr)) {
                 if (!empty($tv_play_info['expand_id'])) {
                     $op = "update";
                     publish_insert_query($tv_play_info, $op, $column_id_arr);
                     $this->insertQueueToLivmediaByVideoID($tv_play_id, $video_id, 'insert', $column_id_arr, $tv_play_info['column_id'], $tv_play_info['pub_time']);
                 }
             }
         }
         return true;
     }
     $data = array('tv_play_id' => $tv_play_id, 'video_id' => $video_id, 'title' => $title, 'index_num' => $index_num, 'img' => serialize($img_info), 'user_name' => $this->user['user_name'], 'user_id' => $this->user['user_id'], 'org_id' => $this->user['org_id'], 'create_time' => TIMENOW, 'update_time' => TIMENOW, 'ip' => hg_getip());
     //开始绑定剧集
     $ret = $this->mode->createEpisode($data);
     if ($ret) {
         $data['id'] = $ret['id'];
         $this->addLogs('新增剧集', '', $data, '新增剧集:' . $ret['id']);
         //返回的数据
         $data['img_index'] = hg_fetchimgurl($img_info);
         $data['title'] = $ret['title'];
         $data['index_num'] = $ret['index_num'];
         $this->addItem($data);
         $this->output();
     }
 }
开发者ID:h3len,项目名称:Project,代码行数:55,代码来源:tv_episode_upload_callback.php

示例7: fortuneinfo

 public function fortuneinfo($fun)
 {
     $sql = 'SELECT * FROM ' . DB_PREFIX . 'astro_app_fortuneinfo WHERE astrofun = ' . '\'' . $fun . '\'';
     $res = $this->db->query_first($sql);
     $astrofunimg = unserialize($res['astrofunimg']) ? unserialize($res['astrofunimg']) : array();
     $astrofun['astrofuncn'] = $res['astrofuncn'];
     $astrofun['astrofunimg'] = hg_fetchimgurl($astrofunimg);
     $astrofun['fortuneinfostart'] = date("Y年m月d日", $res['fortuneinfostart']);
     $astrofun['fortuneinfoend'] = date("Y年m月d日", $res['fortuneinfoend']);
     return $astrofun;
 }
开发者ID:h3len,项目名称:Project,代码行数:11,代码来源:constellation.class.php

示例8: get_tuji_image

 public function get_tuji_image()
 {
     if (!$this->input['id']) {
         $this->errorOutput(NOID);
     }
     $sql = "SELECT COUNT(*) AS total_num FROM " . DB_PREFIX . "pics WHERE tuji_id = '" . intval($this->input['id']) . "'";
     $arr = $this->db->query_first($sql);
     //如果该图集里面没有图片
     $return = array();
     if (!$arr['total_num']) {
         $return['pic_url'] = 0;
         $return['total_num'] = 0;
         $return['nochild'] = 1;
         $return['prev_page'] = 0;
         $return['next_page'] = 0;
         $return['current_page'] = 0;
         $return['over'] = 1;
     } else {
         $start = intval($this->input['start']);
         if ($start > intval($arr['total_num']) - 1) {
             $start = intval($arr['total_num']) - 1;
         }
         $order = " ORDER BY p.order_id ASC ";
         $sql = "SELECT p.*,t.default_comment,t.is_namecomment FROM " . DB_PREFIX . "pics p LEFT JOIN " . DB_PREFIX . "tuji t ON t.id = p.tuji_id WHERE p.tuji_id = '" . intval($this->input['id']) . "' {$order} LIMIT {$start},1";
         /*
         $order = " ORDER BY order_id ASC ";
         $sql = "SELECT * FROM ".DB_PREFIX."pics WHERE tuji_id = '".intval($this->input['id'])."' {$order} LIMIT {$start},1";
         */
         $return = $this->db->query_first($sql);
         $return['img_info'] = unserialize($return['img_info']);
         $return['pic_url'] = hg_fetchimgurl($return['img_info']);
         $return['total_num'] = $arr['total_num'];
         $current_page = $start;
         $last_page = intval($arr['total_num']) - 1;
         /*下一页*/
         $over = 0;
         if ($current_page == $last_page) {
             $over = 1;
             $return['next_page'] = $current_page;
         } else {
             $return['next_page'] = $current_page + 1;
         }
         /*前一页*/
         if ($current_page == 0) {
             $return['prev_page'] = 0;
         } else {
             $return['prev_page'] = $current_page - 1;
         }
         $return['current_page'] = intval($current_page) + 1;
         $return['over'] = $over;
     }
     $this->addItem($return);
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:54,代码来源:tuji_request_opration.php

示例9: detail

 function detail()
 {
     $id = intval($this->input['id']);
     $sql = "SELECT * FROM " . DB_PREFIX . "astro_app_fortuneinfo WHERE id = " . $id;
     $info = $this->db->query_first($sql);
     $info['astrofunimg'] = unserialize($info['astrofunimg']);
     $info['logo'] = hg_fetchimgurl($info['astrofunimg']);
     $info['fortuneinfostart'] = date("Y年m月d日", $info['fortuneinfostart']);
     $info['fortuneinfoend'] = date("Y年m月d日", $info['fortuneinfoend']);
     $this->addItem($info);
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:12,代码来源:fortuneinfo.php

示例10: detail

 public function detail()
 {
     $ret = array();
     $id = intval($this->input['id']) ? intval($this->input['id']) : 0;
     if (!empty($id)) {
         $ret = $this->obj->detail($id);
         $ret['logo_info'] = unserialize($ret['logo_info']);
         $ret['logo_url'] = hg_fetchimgurl($ret['logo_info'], 100, 100);
     }
     $this->addItem($ret);
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:12,代码来源:sort.php

示例11: show

 public function show($condition = '', $orderby = '', $limit = '')
 {
     $sql = "SELECT * FROM " . DB_PREFIX . "guest  WHERE 1 " . $condition . $orderby . $limit;
     $q = $this->db->query($sql);
     $info = array();
     while ($r = $this->db->fetch_array($q)) {
         $r['create_time'] = date('Y-m-d H:i', $r['create_time']);
         $r['avatar'] = $r['avatar'] ? @unserialize($r['avatar']) : array();
         $r['avatar_url'] = $r['avatar'] ? hg_fetchimgurl($r['avatar']) : '';
         $info[] = $r;
     }
     return $info;
 }
开发者ID:h3len,项目名称:Project,代码行数:13,代码来源:guest_mode.php

示例12: show

 public function show($condition = '', $orderby = '', $limit = '')
 {
     $sql = "SELECT m.*,a.guest_type FROM " . DB_PREFIX . "member m LEFT JOIN " . DB_PREFIX . "activation_code a ON a.id = m.activate_code_id WHERE 1 " . $condition . $orderby . $limit;
     $q = $this->db->query($sql);
     $info = array();
     while ($r = $this->db->fetch_array($q)) {
         $r['create_time'] = date('Y-m-d H:i', $r['create_time']);
         $r['avatar'] = $r['avatar'] ? @unserialize($r['avatar']) : array();
         $r['avatar_url'] = $r['avatar'] ? hg_fetchimgurl($r['avatar']) : '';
         $info[] = $r;
     }
     return $info;
 }
开发者ID:h3len,项目名称:Project,代码行数:13,代码来源:member_mode.php

示例13: detail

 public function detail()
 {
     $id = isset($this->input['id']) ? intval($this->input['id']) : 0;
     if ($id <= 0) {
         $this->errorOutput(PARAM_WRONG);
     }
     $sql = "SELECT ai.appid as id,ai.*,ci.* FROM " . DB_PREFIX . "authinfo as ai LEFT JOIN " . DB_PREFIX . "custominfo as ci ON ci.appid=ai.appid WHERE ai.appid =" . $id;
     $data = $this->db->query_first($sql);
     $data['avatar'] = hg_fetchimgurl(maybe_unserialize($data['avatar']), '40', '30');
     $data['create_time'] = date('Y-m-d H:i:s', $data['create_time']);
     $data['update_time'] = date('Y-m-d H:i:s', $data['update_time']);
     $this->addItem($data);
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:14,代码来源:custom_manage.php

示例14: show

 public function show()
 {
     $this->verify_setting_prms();
     $condition = $this->get_condition();
     $sql = 'SELECT * FROM ' . DB_PREFIX . 'staricon WHERE 1' . $condition . ' ORDER BY id DESC';
     $query = $this->db->query($sql);
     while ($ret = $this->db->fetch_array($query)) {
         $ret['star'] = hg_fetchimgurl(unserialize($ret['star']));
         $ret['moon'] = hg_fetchimgurl(unserialize($ret['moon']));
         $ret['sun'] = hg_fetchimgurl(unserialize($ret['sun']));
         $this->addItem($ret);
     }
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:14,代码来源:member_staricon.php

示例15: show

 public function show()
 {
     $sql = 'SELECT id,astrofun,astrofun,astrofuncn,astrofunimg,fortuneinfostart,fortuneinfoend FROM ' . DB_PREFIX . 'astro_app_fortuneinfo WHERE 1 ';
     $query = $this->db->query($sql);
     $data = array();
     while ($row = $this->db->fetch_array($query)) {
         $row['astrofunimg'] = unserialize($row['astrofunimg']);
         $row['logo'] = hg_fetchimgurl($row['astrofunimg']);
         $row['fortuneinfostart'] = date("Y年m月d日", $row['fortuneinfostart']);
         $row['fortuneinfoend'] = date("Y年m月d日", $row['fortuneinfoend']);
         $data[$row['id']] = $row;
     }
     return $data;
 }
开发者ID:h3len,项目名称:Project,代码行数:14,代码来源:fortuneinfo.class.php


注:本文中的hg_fetchimgurl函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。