function save() { if (parent::_checkLogin(true)) { $path = $this->_get('p', 'pic'); if (!checkPath($path) || !in_array($path, array('goods', 'pic'))) { $path = 'pic'; } load('upload'); $myUpload = new Myupload(); $upload = $myUpload->upload($path); $upload = parent::_sendImageToYunServer($upload); //同步图片到云存储 if ($upload) { $upload = $upload[0]; if (!$upload) { echo json_encode(array('url' => '', 'fileType' => '', 'original' => '', 'state' => $myUpload->getErrorMsg())); } else { echo json_encode(array('url' => getImgUrl($upload['savepath']), 'fileType' => $upload['type'], 'original' => $upload['realname'], 'state' => 'SUCCESS')); } } } else { echo json_encode(array('url' => '', 'fileType' => '', 'original' => '', 'state' => '上传失败')); exit; } }
/** * 保存用户头像 * @param $uid int 用户UID * @param $picData object 头像数据流 * @return string 生成后的头像地址 */ function setAvatar($uid, $picData, $sync = false) { $fpath = avatarFile($uid, 132); if ($uid && $picData) { saveFile($fpath, $picData, true, $sync); } return getImgUrl($fpath); }
public function _getHomePage($cate = 1, $uagent = 1, $service = 1, $time = TIME) { $where = array('cate' => $cate, 'status' => 1, '$or' => array(array("starttime" => array('$lt' => (int) $time), "endtime" => array('$gt' => (int) $time)), array("endtime" => 0))); $result = $this->mongo->table('homepage')->findAll($where, array("sort" . $uagent => 1, "createtime" => 1)); $result = array_values($result); $rs = array(); foreach ($result as $k => $v) { if (!in_array($service, $v['service']) && $v['type'] == 'none') { //break; continue; unset($result[$k]); } if (!in_array($uagent, $v['uagent'])) { //break; continue; unset($result[$k]); } $idarr = (array) $v['_id']; switch ($v['template']) { case '1': $rs[] = array('template' => $v['template'], 'sort' . $uagent => $v['sort' . $uagent], 'title' => $v['content']['title'], 'color' => $v['content']['color'], '_id' => $idarr['$id']); break; case '2': $v = $this->_resetDetail($v, $service); $rs[] = array('template' => $v['template'], 'sort' . $uagent => $v['sort' . $uagent], 'mode' => $v['content']['mode'], 'para' => $v['content']['para'], 'image' => getImgUrl($v['content']['image']), 'goods_desc' => $v['content']['goods_desc'], 'goods_spec' => $v['content']['goods_spec'], 'goods_name' => $v['content']['goods_name'], 'price' => $v['content']['price'], 'original_price' => $v['content']['original_price'], 'sale_counts' => $v['content']['sale_counts'], 'goodinfo' => $v['content']['goodinfo'], '_id' => $idarr['$id']); break; case '3': $v = $this->_resetDetail($v, $service); $rs[] = array('template' => $v['template'], 'sort' . $uagent => $v['sort' . $uagent], 'mode' => $v['content']['mode'], 'para' => $v['content']['para'], 'image' => getImgUrl($v['content']['image']), 'title' => $v['content']['title'], 'subtitle' => $v['content']['subtitle'], '_id' => $idarr['$id']); break; case '4': foreach ($v['content'] as $kk => $vv) { $v['content'][$kk] = $this->_resetDetail($vv, $service); $v['content'][$kk]['image'] = getImgUrl($vv['image']); //z($v['content'][$kk]); } $rs[] = array('template' => $v['template'], 'sort' . $uagent => $v['sort' . $uagent], 'images' => $v['content'], '_id' => $idarr['$id']); break; } } return $rs; }
/** * @param $kikaku_content * jsonの出力 / 配列に入ったものを結合 / やり方がおかしい * @return string * @throws Exception */ protected function jsonOutput($kikaku_content) { $i = 0; $json_output = '[' . "\n"; foreach ($kikaku_content as $key => $value) { /*仕上げ処理*/ unset($this->kikaku_all[$key]->comment); //共通 $this->kikaku_all[$key]->img_address = getImgUrl($this->kikaku_all[$key]->project_type, $this->kikaku_all[$key]->project_number); $i++; //カンマ挿入用にループ数をカウント $json_output .= json_encode($this->kikaku_all[$key]); if (!(count($kikaku_content) == $i)) { $json_output .= ",\n"; } //最後の行にカンマを挿入しない } $json_output .= "\n" . ']'; //必要か!? $json_util = new JsonUtil(); return $json_util->jsonReFormat($json_output); }
function show() { $db = new db(); $info = $db->searchBookById($_GET['bid']); //判断空的情况 $comments = $db->getCommentByBid($_GET['bid'], 1); $info['bookUrl'] = url . 'index.php?action=download&bid=' . $info['bid'] . '.mobi'; $info['picUrl'] = getImgUrl($info['bid'] . '.jpg'); $smarty = new Smarty(); if (isset($_SESSION['kindle'])) { $smarty->assign('hasKindle', 'true'); $smarty->assign('kindle', $_SESSION['kindle']); } else { $smarty->assign('hasKindle', 'false'); $smarty->assign('kindle', ''); } $smarty->assign('logined', isLogined()); $smarty->assign('info', $info); $smarty->assign('comments', $comments); $smarty->display('libs/view/head.ctp'); $smarty->display('libs/view/detail.ctp'); $smarty->display('libs/view/tail.ctp'); }
mysql_select_db("nexusphp", $con); */ $sql = "update torrents set videoname='{$str}' where id='{$id}'"; $result = mysql_query($sql); $i = 0; //$arr=array(); //mysql_select_db("nexusphp", $con); $sql = "select * from torrents where id='{$id}'"; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { $array[$i] = $row['id']; $arr[$i] = $row['name']; $arra[$i] = $row['videoname']; //echo $arr[$i]; //$i++; } $imgurl = getImgUrl($getimgdescr); mysql_select_db("ekucms"); for ($j = 0; $j <= $i; $j++) { $a = date("Y-m-d H:i:s"); $b = strtotime($a); $sql = "insert into eku122x_bean(id,bean,ctrl) VALUES ('{$id}','{$doubanid}','0')"; $result = mysql_query($sql); $sql = "insert into eku122x_video (nexusphp,title,playurl,vodplay,videoname,addtime,cid,picurl) VALUES ('{$array[$j]}','{$name}','第一集','v6','{$arra[$j]}','{$b}','{$cid}','{$imgurl}')"; $result = mysql_query($sql); } //mysql_close($con); //--------------------------------------------------- ///////////////////////////////------------ die; //header("Location: " . get_protocol_prefix() . "$BASEURL/details.php?id=".htmlspecialchars($id)."&uploaded=1");
<div class="col-lg-2"> <?php if (isHave($servicelog['upload'])) { ?> <?php if (preg_match('/^.*?\\.(jpg|png|gif|jpeg|bmp|jpe)$/', $servicelog['upload'])) { ?> <img src="<?php echo getImgUrl($servicelog['upload']); ?> " /> <?php } else { ?> <p class="form-control"><a href="<?php echo getImgUrl($servicelog['upload']); ?> "><i class="fa fa-download"></i> 点击此处下载附件</a></p> <?php } ?> <?php } else { ?> <p class="form-control">无附件</p> <?php } ?> </div> </div>
?> <header id="header" class="navbar <?php if ($menuSetting['header']) { echo 'bg bg-black'; } ?> "> <ul class="nav navbar-nav navbar-avatar pull-right"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <span class="hidden-xs-only"><strong>[<?php echo $userGroup[$adminInfo['groupid']]; ?> ] <?php echo $adminInfo['username']; ?> </strong></span> <span class="thumb-small avatar inline"><img src="<?php echo getImgUrl('upload/avatar/noavatar_big.jpg'); ?> " alt="" class="img-circle" /></span> <b class="caret hidden-xs-only"></b> </a> <ul class="dropdown-menu pull-right"> <li><a href="<?php echo U('my/edit'); ?> ">个人资料</a></li> <li class="divider"></li> <li><a href="<?php echo U('login/logout'); ?> ">退出</a></li> </ul> </li> </ul>
function handle() { if (!isset($_GET['method']) || !isset($_GET['query'])) { header('location:' . url); } if ($_GET['method'] == 'name') { $db = new db(); $total = $db->countBookByName($_GET['query']); $totalPage = ceil($total / pagesize); $curPage = 1; if (isset($_GET['pg']) && $_GET['pg'] <= $totalPage) { $curPage = $_GET['pg']; } $result = $db->searchBookByName($_GET['query'], $curPage); } else { if ($_GET['method'] == 'author') { } else { if ($_GET['method'] == 'ISBN') { } else { header('location:' . url); } } } for ($i = 0; $i <= count($result) - 1; $i++) { $result[$i]['picSrc'] = getImgUrl($result[$i]['bid'] . '.jpg'); } $pageLink = array(); $tmp = array(); $tmp['flag'] = 'start'; $tmp['url'] = url . 'search/name/' . $_GET['query'] . '.html/pg=1'; array_push($pageLink, $tmp); $start = 1; if ($totalPage <= 10) { $start = 1; } else { $start = $curPage - 3; if ($start <= 0) { $start = 1; } if ($start + 9 > $totalPage) { $start = $totalPage - 9; } } $i = 1; for (; $start <= $totalPage && $i < 10; $start++, $i++) { $tmp = array(); if ($start == $curPage) { $tmp['flag'] = 'active'; } else { $tmp['flag'] = ''; } $tmp['url'] = url . 'search/name/' . $_GET['query'] . ".html/pg={$start}"; $tmp['pg'] = $start; array_push($pageLink, $tmp); } if ($start < $totalPage) { $tmp = array(); $tmp['flag'] = 'dot'; array_push($pageLink, $tmp); } $tmp = array(); $tmp['flag'] = 'end'; $tmp['url'] = url . 'search/name/' . $_GET['query'] . ".html/pg={$totalPage}"; array_push($pageLink, $tmp); $smarty = new Smarty(); $smarty->assign('pageLink', $pageLink); $smarty->assign('logined', isLogined()); $smarty->assign('result', $result); $smarty->display('libs/view/head.ctp'); $smarty->display('libs/view/search.ctp'); $smarty->display('libs/view/tail.ctp'); //print_r($_GET); }
<?php if (!defined('IN_XLP')) { exit('Access Denied!'); } /* * 分享类型配置文件 */ return array('default' => array('wx_name' => '结邻公社', 'wx_logo' => 'upload/pics/default_logo.jpg', 'wx_appid' => '', 'wx_qrcode' => 'upload/pics/default_qrcode.jpg', 'regUrl' => 'http://mp.weixin.qq.com/s?__biz=MzA5Njc2NjgyOA==&mid=200510413&idx=1&sn=602a08a77f3d2d494034b24c09eea1ed&scene=0#rd', 'tip' => array('title' => '用户未关注', 'content' => '您好,您还没有关注“' . WEB_TITLE . '”,现在关注立即享受小管家快送服务,还有更多惊喜!'), 'share' => array('title' => '下午茶,净菜,超市,每天有特价。快使唤小管家,享大优惠~', 'desc' => '时光短暂,不要辜负美好食光哦~', 'imgUrl' => getImgUrl('statics/default/images/steward/share_2.jpg'))), 'type' => array('news' => array('id' => 1, 'name' => '新闻'), 'event' => array('id' => 2, 'name' => '活动'), 'forum' => array('id' => 3, 'name' => '业主论坛'), 'carpool' => array('id' => 4, 'name' => '拼车'), 'housekeep' => array('id' => 5, 'name' => '家政'), 'sechand_trade' => array('id' => 6, 'name' => '二手置换'), 'scenery' => array('id' => 7, 'name' => '小区时景')), 'share' => array('title' => '我抢到心晴大红包,缠绵雨季要有好心晴~', 'desc' => '缠绵雨季 我好想你~结邻送你心晴红包~雨天遇见小管家,好心晴哟~', 'imgUrl' => 'http://wx.51jhome.com/statics/default/images/steward/2015/xinqing-share.jpg'));
margin:3px } .show-pop-content { overflow-y:scroll; overflow-x:hidden; table-layout: fixed; word-wrap:break-word; word-break:break-all; } </style> <div class="table-responsive show-pop-content" style="width:650px; height:400px;"> <section class="panel portlet-item"> <header class="panel-heading">商品详细信息</header> <ul class="list-group"> <li class="list-group-item" style="text-align:center"><img src="<?php echo getImgUrl($rs['goods_pic']); ?> " width="150" height="150"/></li> <li class="list-group-item"><strong>编号</strong>:<?php echo $rs['gid']; ?> </li> <li class="list-group-item"><strong>货号</strong>:<?php echo $rs['goods_sn']; ?> </li> <li class="list-group-item"><strong>类别</strong>:<?php echo $rs['cateName']; ?> </li> <li class="list-group-item"><strong>店铺</strong>:<?php
} ?> > <!----> <div class="form-group"> <label class="col-sm-1 control-label">用户头像</label> <div class="col-sm-3"> <input type="text" name="user_avatar" id="user_avatar" placeholder="" class="form-control" value="<?php echo $rs['user_avatar']; ?> " /> <span class="help-block">用户头像,标准尺寸132px*132px <?php if ($rs['user_avatar']) { ?> [<a rel="pop" class="red" target="_blank" href="<?php echo getImgUrl($rs['user_avatar']); ?> ">预览>></a>]<?php } ?> </span></div> <div class="col-sm-3"> <iframe width="280" height="24" src="<?php echo U('upload/index', array('id' => 'user_avatar')); ?> " scrolling="no" frameborder="0"></iframe> </div> </div> <div class="form-group"> <label class="col-sm-1 control-label">称呼</label> <div class="col-sm-3">
?> "><?php print $link['text']; ?> </a></li> <?php } ?> </ul> <?php } ?> <div class="clear"></div> <a href="index.html"><img class="logo" src="<?php print getImgUrl("main_logo.gif"); ?> " alt="Návrat na úvodní stránku" /></a> <div class="clear"></div> <div class="zalozky"> <?php if ($main->zalozky) { ?> <?php foreach ($main->zalozky as $link) { ?> <a href="<?php print $link->href; ?> " <?php
<div class="f_header"> <div class="kontakty"> IČO: 25115804<br /> DIČ: CZ25115804,<br /> Městský soud v Praze, Spis. zn.: C.51029<br /> tel.: +420 234 262 000 fax: +420 234 262 009<br /> e-mail: <a href="mailto:faktury@active24.cz">faktury@active24.cz</a> </div> <div class="adresa"> <strong>ACTIVE 24, s.r.o.</strong><br /> Sokolovská 394/17<br /> 186 00 Praha 8 - Karlín,<br /> Okres: Hlavní město Praha </div> <img class="logo" src="<?php print getImgUrl("logo.gif"); ?> " alt="Logo 250px/100px" /> <div class="clear"></div> </div> <h1>Fakrura <span>č. 123465789</span></h1> <div class="inbox"> <div class="odberatel"> <h2><?php print getString('Odběratel', 'main'); ?> <?php if (isset($faktura->odberatele) && count($faktura->odberatele)) { ?>
?> " /> <span class="help-block">品牌及连锁店的分店名称,没有则不填</span></div> </div> <div class="form-group"> <label class="col-sm-1 control-label">店铺LOGO</label> <div class="col-sm-3"> <input type="text" name="pic_url" id="pic_url" placeholder="" class="form-control" value="<?php echo $rs['pic_url']; ?> " /> <span class="help-block">请上传您的LOGO图标,标准尺寸150px*150px <?php if ($rs['pic_url']) { ?> [<a rel="pop" class="red" target="_blank" href="<?php echo getImgUrl($rs['pic_url']); ?> ">预览>></a>]<?php } ?> </span></div> <div class="col-sm-3"> <iframe width="280" height="24" src="<?php echo U('upload/index', array('id' => 'pic_url')); ?> " scrolling="no" frameborder="0"></iframe> </div> </div> <div class="form-group"> <label class="col-sm-1 control-label">所属区域</label> <div class="col-sm-3">
<?php header("Content-type: image/png"); require 'functions.php'; $username = $_GET['username']; $file = getImgUrl($username); readfile($file); exit(0);
<div class="col-lg-2"> <?php if (isHave($feedback['upload'])) { ?> <?php if (preg_match('/^.*?\\.(jpg|png|gif|jpeg|bmp|jpe)$/', $feedback['upload'])) { ?> <img src="<?php echo getImgUrl($feedback['upload']); ?> " /> <?php } else { ?> <p class="form-control"><a href="<?php echo getImgUrl($feedback['upload']); ?> "><i class="fa fa-download"></i> 点击此处下载附件</a></p> <?php } ?> <?php } else { ?> <p class="form-control">无附件</p> <?php } ?> </div> </div>
<ul class="list-group"> <li class="list-group-item" style="text-align:center"><?php if (isHave($rs['upload'])) { ?> <?php if (preg_match('/^.*?\\.(jpg|png|gif|jpeg|bmp|jpe)$/', $rs['upload'])) { ?> <img src="<?php echo getImgUrl($rs['upload']); ?> " width="150" height="150"/> <?php } else { ?> <p class="form-control"><a href="<?php echo getImgUrl($rs['upload']); ?> " target="_blank"><i class="fa fa-download"></i> 点击此处下载附件</a></p> <?php } ?> <?php } else { ?> <p class="form-control">无附件</p> <?php } ?> </li> <li class="list-group-item"><strong>编号</strong>:<?php
echo $rs['goodsData']; ?> , //获取商品数据 saleStatus = <?php echo $rs['sale_status']; ?> , //销售状态 saleTime = '<?php echo $rs['sale_time']; ?> '; var dataForWeixin = { appId: "", imgUrl: "<?php echo getImgUrl('statics/default/images/steward/share_2.jpg'); ?> ", path: "intro", title: "下午茶,净菜,超市,每天有特价。快使唤小管家,享大优惠~", desc: "时光短暂,不要辜负美好食光哦~", shareUrl: '<?php echo U("weixin/index/index"); ?> ', fakeid: "", callback: null }; $(function(){ getGoods(); $(document).on('click', '#quick-buy', function() {
?> " /> <span class="help-block"></span></div> </div> <div class="form-group"> <label class="col-sm-1 control-label">分享图片</label> <div class="col-sm-3"> <input type="text" name="imgUrl" id="imgUrl" placeholder="" class="form-control" value="<?php echo $rs['imgUrl']; ?> " /> <span class="help-block">LOGO图标,标准尺寸110px*110px <?php if ($rs['imgUrl']) { ?> [<a rel="pop" class="red" target="_blank" href="<?php echo strExists($rs['imgUrl'], 'http://') ? $rs['imgUrl'] : getImgUrl($rs['imgUrl']); ?> ">预览>></a>]<?php } ?> </span></div> <div class="col-sm-3"> <iframe width="280" height="24" src="<?php echo U('upload/index', array('id' => 'imgUrl')); ?> " scrolling="no" frameborder="0"></iframe> </div> </div> <div class="form-group"> <label class="col-sm-1 control-label">分享内容</label> <div class="col-sm-3">
function saveshare() { $title = $this->_post('title', ''); $imgUrl = $this->_post('imgUrl', ''); $desc = $this->_post('desc', ''); if ($title && $imgUrl && $desc) { F('steward/share_order', array('title' => $title, 'imgUrl' => strExists($imgUrl, 'http://') ? $imgUrl : getImgUrl($imgUrl), 'desc' => $desc)); $this->JsonReturn('操作成功', null, 1); } else { $this->JsonReturn('内容不能为空'); } }
<td> <?php if (isHave($value['upload'])) { ?> <?php if (preg_match('/^.*?\\.(jpg|png|gif|jpeg|bmp|jpe)$/', $value['upload'])) { ?> <a href="<?php echo getImgUrl($value['upload']); ?> " rel="pop">查看图片</a> <?php } else { ?> <a href="<?php echo getImgUrl($value['upload']); ?> " target="_blank">下载附件</a> <?php } // if preg_match end ?> <?php } // if isHave end ?> </td> <td><?php if ($value['order_id']) { echo $value['order_id']; } else {
function preview() { $id = $this->_getid('id', 0); if (!$id) { showError('参数丢失'); } $rs = M('ste_goods')->where(array('gid' => $id))->find(); if (!$rs) { showError('商品不存在'); } steadmin::$adminInfo['city_id'] = 3301; $goodPic = $rs['goods_pic']; $rs['goods_tips'] = parent::_getTipsGroupList($this->steSetting['goods_tips'], $rs['goods_tips']); $rs['goods_pic'] = getImgUrl(getThumb($goodPic, 0)); $rs['orig_pic'] = getImgUrl(getThumb($goodPic, 2)); if ($rs['is_realtime'] && $rs['booked_time']) { $rs['goods_desc'] = '<p><img src="' . getImgUrl('statics/default/images/steward/2015/presell_' . $rs['booked_time'] . '.png') . '"/></p><br/>' . $rs['goods_desc']; } $rs['goods_desc'] = htmlspecialchars_decode($rs['goods_desc']); $rs['is_delay'] = parent::_getShopName($rs['shop_id'], 'is_delay'); $rs['cate_name'] = parent::_getCateName($rs['cate_id']); $rs['shop_name'] = parent::_getShopName($rs['shop_id'], 'shop_name'); $rs['order_counts'] = $rs['order_counts'] * 3; ////2015-03-31 新增刷新销量 $list = explode(',', 'is_delay,gid,cate_id,shop_id,shop_name,goods_name,goods_subtitle,goods_spec,goods_tips,goods_pic,orig_pic,original_price,price_pre,price,goods_desc,order_counts,sale_counts,storage_counts,is_realtime,is_hot,is_new,is_recommend,is_limited,limit_counts'); foreach ($list as $val) { $rs['goodsData'][$val] = $rs[$val]; } $rs['goodsData'] = json_encode($rs['goodsData']); if (!$rs['status'] || $rs['status'] == 2) { $rs['sale_status'] = 0; } if ($rs['start_times'] <= TIME) { if ($rs['end_times'] < TIME) { $rs['sale_status'] = 0; } elseif ($rs['end_times'] >= TIME) { $rs['sale_status'] = 1; } } else { $rs['sale_status'] = 2; } $rs['sale_time'] = outTime($rs['start_times']); // z($rs); $this->assign(array('id' => $id, 'rs' => $rs, 'vid' => 0)); $this->display(); }