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


PHP get_cover函数代码示例

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


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

示例1: _thumb_media_id

 function _thumb_media_id($cover_id)
 {
     $cover = get_cover($cover_id);
     $driver = C('PICTURE_UPLOAD_DRIVER');
     if ($driver != 'Local' && !file_exists(SITE_PATH . $cover['path'])) {
         // 先把图片下载到本地
         $pathinfo = pathinfo(SITE_PATH . $cover['path']);
         mkdirs($pathinfo['dirname']);
         $content = wp_file_get_contents($cover['url']);
         $res = file_put_contents(SITE_PATH . $cover['path'], $content);
         if ($res) {
             return '';
         }
     }
     $path = $cover['path'];
     if (!$path) {
         return '';
     }
     $param['type'] = 'thumb';
     $param['media'] = '@' . realpath(SITE_PATH . $path);
     $url = 'https://api.weixin.qq.com/cgi-bin/material/add_material?access_token=' . get_access_token();
     $res = post_data($url, $param, true);
     if (isset($res['errcode']) && $res['errcode'] != 0) {
         return '';
     }
     $map['cover_id'] = $cover_id;
     $map['manager_id'] = $this->mid;
     $this->where($map)->setField('thumb_media_id', $res['media_id']);
     return $res['media_id'];
 }
开发者ID:walkingmanc,项目名称:weshop,代码行数:30,代码来源:MaterialModel.class.php

示例2: render

 public function render($data)
 {
     $content = '<span class="bld">' . $data['field']['alias'] . '</span>:';
     //检测是否过期隐藏
     if ($data['overed'] && $data['field']['over_hidden']) {
         $content .= '<span class="cred" id="' . $data['data']['field']['name'] . '">过期隐藏</span>';
         return $content;
     }
     $content .= '<span  id="' . $data['data']['field']['name'] . '">';
     switch ($data['field']['input_type']) {
         case IT_SINGLE_TEXT:
             //单行文本
         //单行文本
         case IT_MULTI_TEXT:
             //多行文本
             $content .= op_h($data['data']['data'][0]);
             break;
         case IT_EDITOR:
             //编辑器
             $content .= "<br/>" . op_h($data['data']['data'][0]);
             break;
         case IT_DATE:
             //日期
             $content .= date('Y-m-d', $data['data']['data'][0]);
             //dump($data['data']['data'][0]);exit;
             break;
             //选择框
         //选择框
         case IT_SELECT:
             //下拉框
             $content .= op_t($data['data']['data'][0]);
             break;
         case IT_RADIO:
             //单选框
             $content .= op_t($data['data']['data'][0]);
             break;
         case IT_PIC:
             //单图片
             if (intval($data['data']['data'][0]) == 0) {
                 return '';
             }
             $content .= '<a class="pic_field" target="_blank" href="' . get_cover($data['data']['data'][0], 'path') . '"><img title="点击查看大图"  class="pic_size" src="' . getThumbImageById($data['data']['data'][0], 100, 100) . '"></a>';
             break;
         case IT_CHECKBOX:
             $content .= $data['data']['data'][0] . '&nbsp;&nbsp;';
             break;
     }
     $content .= '</span>';
     echo $content;
 }
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:50,代码来源:DisplayRenderWidget.class.php

示例3: reformatData

 function reformatData($project)
 {
     $data['project_index'] = $project['id'];
     //项目编号
     $data['project_name'] = $project['project_name'];
     //项目名称
     $data['project_stage'] = $this->stageConvertor($project['stage']);
     //项目阶段
     $data['project_type'] = get_code_name($project['industry']);
     //项目类型
     $data['project_abstract'] = $project['abstract'];
     //项目简介
     $data['project_cover'] = 'http://' . $_SERVER['HTTP_HOST'] . get_cover($project['cover'], 'path');
     //封面url
     $data['project_province'] = getDistrict($project['province']);
     //省
     $data['project_city'] = getDistrict($project['city']);
     //市
     $data['project_companyname'] = $project['company_name'];
     //公司名称
     $data['project_leader'] = get_membername($project['leader_id']);
     //项目发起人
     $data['project_financinglimit'] = $project['need_fund'];
     //目标融资额
     if ($data['project_stage'] == 1) {
         $data['project_valuation'] = 0;
         //项目最终估值
     } else {
         $data['project_valuation'] = M('ProjectFund')->where(array('project_id' => $project['id']))->getField('final_valuation');
         //项目最终估值
     }
     $data['project_mininvestment'] = $project['follow_fund'];
     //起投额
     $data['project_raisedfund'] = $project['has_fund'];
     //完成金额
     $data['project_investornumber'] = $project['investor_count'];
     //投资人数
     $data['project_detailurl'] = 'http://' . $_SERVER['HTTP_HOST'] . '/project/detail/id/' . $project['id'];
     //项目url
     $data['project_details'] = M('ProjectInfo')->where(array('project_id' => $project['id']))->getField('description');
     //项目详细详情
     $data['project_details'] = str_replace('"/Uploads', '"http://' . $_SERVER['HTTP_HOST'] . "/Uploads/", $data['project_details']);
     if ($project['team']) {
         $data['project_team'] = $project['team'];
     }
     return $data;
 }
开发者ID:rainly123,项目名称:zyzm,代码行数:47,代码来源:ProjectInfoModel.class.php

示例4: update

 public function update()
 {
     $id = $_GET['id'];
     if (!$id) {
         echo '非法操作';
         exit;
     }
     $v = D('ProjectInfoView')->where(array('p.stage' => array('egt', 1), 'p.status' => 9, 'p.id' => $id))->find();
     if (!$v) {
         echo '指定项目不存在。';
         exit;
     }
     include_once APP_PATH . 'Admin/zczj/zczj.api.php';
     //===============初始化==================//
     $options = array('debug' => true, 'UserName' => 'jumuzhongchou', 'PassWord' => 'jumuzhongchou123', 'PlatId' => 2);
     $zczj = new \zczj($options);
     $var = get_cover($v['cover']);
     $filename = basename(APP_PATH . substr($var['path'], 1));
     //echo $filename;
     //echo getimagesize(substr($var['path'], 1)); die();
     //echo @file_get_contents(substr($var['path'], 1)); die();
     if ($v['stage'] == 1) {
         $state = 1;
     } else {
         if ($v['stage'] == 4) {
             $state = 2;
         } else {
             if ($v['stage'] >= 8) {
                 $state = 3;
             }
         }
     }
     $desc = str_replace('"/Uploads/', '"http://www.dreammove.cn/Uploads/', $v['description']);
     $pics = M('ProjectTemp')->where(array('project_id' => $id, 'temp_type' => 1))->order('sort')->limit(6)->select();
     foreach ($pics as $k1 => $v1) {
         $path = get_cover($v1['info_key'], 'path');
         $desc = $desc . '<p><img src="http://www.dreammove.cn' . $path . '"/></p>';
     }
     $projects = array('PlatProjectID' => $v['id'], 'projectName' => $v['project_name'], 'description' => $desc, 'currentAmount' => $v['has_fund'], 'targetAmount' => $v['need_fund'], 'endTime' => NULL, 'targetDay' => 30, 'projectSponsor' => get_membername($v['uid']), 'support' => $v['follow'], 'state' => $state, 'projectCategoryId' => 23673, 'fileBytes' => @file_get_contents(substr($var['path'], 1)), 'fileName' => $filename, 'url' => "http://www.dreammove.cn/Project/detail/id/" . $v['id'] . '.html');
     $ret = $zczj->projectsAdd($projects);
     //dump($ret); die();
     if ($ret->Result) {
         echo "处理成功.";
     } else {
         echo $ret->Message;
     }
 }
开发者ID:rainly123,项目名称:zyzm,代码行数:47,代码来源:ZczjController.class.php

示例5: show

 public function show()
 {
     $visa_id = I('get.id');
     if (empty($visa_id)) {
         $this->error();
     }
     $Visa = M('Visa');
     $map = array();
     $map['visa_id'] = $visa_id;
     $map['status'] = 1;
     $detail = $Visa->where($map)->find();
     $detail['image'] = get_cover($detail['cover_id'], 'path');
     $detail['is_yaoqing'] = $detail['is_yaoqing'] ? '需要' : '不需要';
     $detail['is_mianshi'] = $detail['is_mianshi'] ? '需要' : '不需要';
     $this->assign('detail', $detail);
     $this->display();
 }
开发者ID:bjjfsd,项目名称:youweihui,代码行数:17,代码来源:VisaController.class.php

示例6: _after_find

 /**
  * 查找后置操作
  * @author jry <598821125@qq.com>
  */
 protected function _after_find(&$result, $options)
 {
     $result['avatar_url'] = get_cover($result['avatar'], 'avatar');
     // 用户识别label
     if (D('Admin/Module')->where('name="User" and status="1"')->count()) {
         $cert_info = D('User/Cert')->isCert($result['id']);
     }
     if ($cert_info) {
         $result['label'] = $cert_info['cert_title'] . '(' . $result['id'];
     } else {
         $result['label'] = $result['nickname'] . '(' . $result['id'];
     }
     if ($result['email']) {
         $result['label'] = $result['label'] . '-' . $result['email'];
     }
     $result['label'] = $result['label'] . ')';
 }
开发者ID:applemin,项目名称:tangguo,代码行数:21,代码来源:UserModel.class.php

示例7: show

 public function show($id = 0)
 {
     if (empty($id)) {
         $this->error('无效参数');
     }
     $Line = M('Line');
     $line_info = $Line->find($id);
     // 线路信息
     $line_info['images'] = explode(',', $line_info['images']);
     foreach ($line_info['images'] as $key => $val) {
         $line_info['images'][$key] = get_cover($val, 'path');
     }
     $line_info['xingcheng'] = unserialize($line_info['xingcheng']);
     $line_info['remark'] = unserialize($line_info['remark']);
     // 套餐信息
     $map = array('line_id' => $id, 'end_time' => array('egt', strtotime('+' . $line_info['earlier_date'] . 'day')));
     $line_tc = M('LineTc')->where($map)->select();
     if (empty($line_tc)) {
         $this->error('没有报价方案');
     }
     $default_tc = array();
     foreach ($line_tc as $key => $value) {
         if ($value['is_default']) {
             $default_tc = $value;
             break;
         }
     }
     if (empty($default_tc)) {
         $default_tc = $line_tc[0];
     }
     $map = array('product_id' => $id, 'status' => 1);
     $comment_lists = M('Comment')->where($map)->select();
     $this->assign('comment_lists', $comment_lists);
     $this->assign('line_info', $line_info);
     $this->assign('line_tc', $line_tc);
     $this->assign('default_tc', $default_tc);
     $this->display();
 }
开发者ID:lampge,项目名称:youweihui,代码行数:38,代码来源:LineController.class.php

示例8: detail

 public function detail($id = 0)
 {
     if (!($id && is_numeric($id))) {
         echo json_e('', 2);
         exit;
     }
     $Document = D('Document');
     $info = $Document->detail($id);
     //        多张图片预留处理
     /*        if(!empty($info['pics'])){
                 $pics= explode(',',$info['pics']);
             }else {
                 $pics = "";
             }*/
     $pic = get_cover($info['cover_id']);
     $info['path'] = $pic['path'];
     if (!$info) {
         echo json_e();
         exit;
     } else {
         echo json_e($info);
         exit;
     }
 }
开发者ID:gitchenze,项目名称:soloshop,代码行数:24,代码来源:InterfaceController.class.php

示例9: sendIssue

 public function sendIssue()
 {
     $this->requireLogin();
     $aIssue_id = I('issue_id', '', 'intval');
     $aId = I('id', 0, 'intval');
     $aCover_id = I('cover_id', '', 'intval');
     $aTitle = I('title', '', 'op_t');
     $aUrl = I('url', '', 'op_h');
     $aContent = I('content', '', 'op_h');
     $attach_id = I('attach_id', '', 'op_t');
     $attach_ids = explode(',', $attach_id);
     if (!$aCover_id) {
         $this->apiError('请上传封面。');
     }
     if ($aTitle == '') {
         $this->apiError('请输入标题。');
     }
     if ($aIssue_id == 0) {
         $this->apiError('请选择分类。');
     }
     if ($aContent == '') {
         $this->apiError('请输入内容。');
     }
     if ($aUrl == '') {
         $this->apiError('请输入网址。');
     }
     foreach ($attach_ids as $k => $v) {
         $aContent .= "<p><img src='" . get_cover($v, 'path') . "'/></p>";
     }
     unset($v);
     $aContent = str_replace("\\", '', $aContent);
     $isEdit = $aId ? true : false;
     $this->requireIssueAllowPublish($aIssue_id);
     if ($isEdit) {
         $data = array('id' => intval($aId), 'title' => $aTitle, 'content' => $aContent, 'parse' => 0, 'cover_id' => intval($aCover_id), 'issue_id' => intval($aIssue_id), 'url' => $aUrl);
         $result = D('Issue/IssueContent')->where(array('id' => $aId))->save($data);
         if (!$result) {
             $this->apiError('编辑失败:' . $this->getError());
         }
     } else {
         $data = array('uid' => is_login(), 'title' => $aTitle, 'content' => $aContent, 'parse' => 0, 'cover_id' => intval($aCover_id), 'issue_id' => intval($aIssue_id), 'url' => $aUrl);
         /*  $before = getMyScore();
             $tox_money_before = getMyToxMoney();*/
         $data = D('Issue/IssueContent')->create($data);
         if (!$data) {
             return false;
         }
         $result = D('Issue/IssueContent')->add($data);
         /*
                     $after = getMyScore();
                     $tox_money_after = getMyToxMoney();*/
         if (!$result) {
             $this->apiError('发表失败:' . $this->getError());
         }
         $aId = $result;
     }
     //显示成功消息
     /*$message = $isEdit ? '编辑成功。' : '发表成功。' . getScoreTip($before, $after) . getToxMoneyTip($tox_money_before, $tox_money_after);*/
     //返回成功消息
     $row = D('Issue/IssueContent')->where('id=' . $aId)->find();
     $this->apiSuccess($row);
 }
开发者ID:chenyongze,项目名称:bighaha,代码行数:62,代码来源:IssueController.class.php

示例10: isset

            </div>
        </div>
        
         <div class="form-item">
						<label class="item-label">战队图腾</label>
						<input type="file" id="upload_picture">
						<input type="hidden" name="cover" id="cover" value="<?php 
echo isset($team['cover']) && $team['cover'] !== "" ? $team['cover'] : '';
?>
"/>
						<div class="upload-img-box">
						<?php 
if (!empty($team['cover'])) {
    ?>
<div class="upload-pre-item"><img src="<?php 
    echo get_cover($team["cover"], 'url');
    ?>
"/></div><?php 
}
?>
						</div>
					</div>
					<script type="text/javascript">
					//上传图片
				    /* 初始化上传插件 */
					$("#upload_picture").uploadify({
				        "height"          : 30,
				        "swf"             : "/Public/static/uploadify/uploadify.swf",
				        "fileObjName"     : "download",
				        "buttonText"      : "上传图片",
				        "uploader"        : "<?php 
开发者ID:nullog,项目名称:zhanglubao,代码行数:31,代码来源:d27108124fc4c40dea75fecb6f4d8d97.php

示例11: isset

">
	</div>
</div>

<div class="form-item"><label class="item-label">大赛封面</label> <input
	type="file" id="upload_picture"> <input type="hidden"
	name="cover" id="cover" value="<?php 
echo isset($match['cover']) && $match['cover'] !== "" ? $match['cover'] : '';
?>
" />
<div class="upload-img-box"><?php 
if (!empty($match['cover'])) {
    ?>
<div class="upload-pre-item"><img
	src="<?php 
    echo get_cover($match["cover"], 'url');
    ?>
" /></div><?php 
}
?>
</div>
</div>
<script type="text/javascript">
					//上传图片
				    /* 初始化上传插件 */
					$("#upload_picture").uploadify({
				        "height"          : 30,
				        "swf"             : "/Public/static/uploadify/uploadify.swf",
				        "fileObjName"     : "download",
				        "buttonText"      : "上传图片",
				        "uploader"        : "<?php 
开发者ID:nullog,项目名称:zhanglubao,代码行数:31,代码来源:08128f39e1b95e9bf65669b9d9adad21.php

示例12: get_cover

                                <input type="hidden" name="config[<?php 
                    echo $o_key;
                    ?>
]" id="cover_id_<?php 
                    echo $o_key;
                    ?>
" value="<?php 
                    echo $form['value'];
                    ?>
"/>
                                <div class="upload-img-box">
                                  <?php 
                    if (!empty($form['value'])) {
                        ?>
<div class="upload-pre-item"><img width="120" height="120" src="/weiphp2.0<?php 
                        echo get_cover($form['value'], 'path');
                        ?>
"/></div><?php 
                    }
                    ?>
                                </div>
                              </div>
                              <script type="text/javascript">
                                    //上传图片
                                    /* 初始化上传插件 */
                                    $("#upload_picture_<?php 
                    echo $o_key;
                    ?>
").uploadify({
                                        "height"          : 120,
                                        "swf"             : "/weiphp2.0/Public/static/uploadify/uploadify.swf",
开发者ID:skylei,项目名称:sae_weiphp,代码行数:31,代码来源:cc8882575a2473af8ca684b4904c7d8e.php

示例13: get_cover

<td><?php 
                echo $order["place"];
                ?>
</td>
<td><?php 
                echo $order["url"];
                ?>
</td>

						

						 <td><img src="<?php 
                echo get_cover($order["icon"], 'path');
                ?>
"  width="100" height="50"/>(670*400) <a title="编辑" href="<?php 
                echo get_cover($order["icon"], 'path');
                ?>
" target='_blank'>查看大图</a></td>
                        <td><?php 
                echo $order["status"];
                ?>
</td>
                         <td><?php 
                echo date('Y-m-d H:i:s', $order["create_time"]);
                ?>
</td>
					<td>
                            <a title="编辑" href="<?php 
                echo U('edit?id=' . $order['id']);
                ?>
">编辑</a>
开发者ID:a1357479,项目名称:techan,代码行数:31,代码来源:176a5b3b0ba55302e03dbe584fc1f56b.php

示例14: show

 public function show($order_id = '')
 {
     if (empty($order_id)) {
         $this->error('非法参数...');
     }
     $order_info = M('Order')->where(array('order_id' => $order_id))->find();
     if (empty($order_info)) {
         $this->error('订单不存在...');
     }
     $order_info['reserve_info'] = unserialize($order_info['reserve_info']);
     $order_info['order_status_text'] = order_status_text($order_info['order_status']);
     $order_info['pay_status_text'] = pay_status_text($order_info['pay_status']);
     switch ($order_info['order_type']) {
         case 'line':
             $line = M('Line')->field('title,images,starting')->where(array('line_id' => $order_info['product_id']))->find();
             if ($line) {
                 $order_info['title'] = $line['title'];
                 $order_info['image'] = get_cover(array_shift(explode(',', $line['images'])), 'path');
                 $order_info['starting'] = $line['starting'];
             } else {
                 $order_info['title'] = '不存在';
                 $order_info['image'] = '';
                 $order_info['starting'] = '';
             }
             break;
         default:
             break;
     }
     // echo '<pre>'; print_r($order_info); echo '</pre>';
     $this->assign('order_info', $order_info);
     $this->meta_title = '线路列表';
     $this->display();
 }
开发者ID:lampge,项目名称:youweihui,代码行数:33,代码来源:OrderController.class.php

示例15: foreach

    $__LIST__ = $viewlist;
    if (count($__LIST__) == 0) {
        echo "";
    } else {
        foreach ($__LIST__ as $key => $vo) {
            $mod = $i % 2;
            ++$i;
            ?>
<dd><a class="details_right_img" href="<?php 
            echo U('Article/detail?id=' . $vo['id']);
            ?>
" title="<?php 
            echo $vo["title"];
            ?>
"><img src="<?php 
            echo get_cover($vo["cover_id"], 'path');
            ?>
"  alt="<?php 
            echo $vo["title"];
            ?>
" style="display: inline-block;"></a><a href="<?php 
            echo U('Article/detail?id=' . $vo['id']);
            ?>
" class="details_right_title" title="<?php 
            echo $vo["title"];
            ?>
"><?php 
            echo $vo["title"];
            ?>
</a><span class="fwb mcm_title_price">¥<span class="red"><?php 
            echo get_good_price($vo["id"]);
开发者ID:norain2050,项目名称:yershop,代码行数:31,代码来源:0a19fa9b4a7f23f256fc04046be7f2b6.php


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