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


PHP toimage函数代码示例

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


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

示例1: doMobileMypage

 public function doMobileMypage()
 {
     global $_W, $_GPC;
     $foo = $_GPC['foo'];
     $openid = $_W['openid'];
     if (!empty($openid)) {
         $user = pdo_fetch('SELECT * FROM' . tablename('mc_mapping_fans') . " WHERE openid = :openid", array(':openid' => $openid));
     }
     if ($foo == 'show') {
         if (!empty($openid)) {
             $pageIndex = max(1, intval($_GPC['page']));
             $pageSize = 10;
             $total = pdo_fetchcolumn("SELECT count(*) FROM " . tablename($this->tab_items) . " WHERE uniacid = :uniacid", array(':uniacid' => $_W['uniacid']));
             $uniacid = $_W['uniacid'];
             $listall = pdo_fetchall('SELECT t1.id,img,summary,voice,t2.nickname,t1.openid FROM' . tablename($this->tab_items) . " AS t1 JOIN " . tablename('mc_mapping_fans') . " AS t2 ON t1.openid = t2.openid WHERE t1.uniacid = {$uniacid} AND t1.openid  = '{$openid}' LIMIT " . ($pageIndex - 1) * $pageSize . ',' . $pageSize);
             $result = array();
             $result['isok'] = true;
             if ($total - $pageSize * $pageIndex < 0) {
                 $result['hasMore'] = false;
             } else {
                 $result['hasMore'] = true;
             }
             foreach ($listall as $key => $value) {
                 $tempList[] = array('index' => $key, 'id' => $value['id'], 'face' => toimage($value['img']), 'voicePath' => toimage($value['voice']));
             }
             $result['list'] = $tempList;
             return json_encode($result);
         }
     }
     include $this->template('mypage');
 }
开发者ID:eduNeusoft,项目名称:weixin,代码行数:31,代码来源:site.php

示例2: fieldsFormDisplay

 public function fieldsFormDisplay($rid = 0)
 {
     global $_W;
     if ($rid) {
         $activity = pdo_fetch("SELECT id, title, photo, smalltext FROM " . tablename('feng_dialect') . " WHERE rid = :rid", array(':rid' => $rid));
         $activity['photo'] = toimage($activity['photo']);
     }
     include $this->template('form');
 }
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:9,代码来源:module.php

示例3: respond

 public function respond()
 {
     $content = $this->message['content'];
     //这里定义此模块进行消息处理时的具体过程, 请查看微赞文档来编写你的代码
     $rid = $this->rule;
     $rule = pdo_fetch('select * from ' . tablename($this->modulename . '_rule') . " where rid='{$rid}'");
     if (!empty($rule)) {
         return $this->respNews(array(array('title' => $rule['stitle'], 'description' => $rule['sdesc'], 'picurl' => toimage($rule['sthumb']), 'url' => $this->createMobileUrl('index', array('rid' => $rid)))));
     }
 }
开发者ID:eduNeusoft,项目名称:weixin,代码行数:10,代码来源:processor.php

示例4: respond

 public function respond()
 {
     global $_W;
     $rid = $this->rule;
     $from = $this->message['from'];
     $weid = $_W['uniacid'];
     //当前公众号ID
     //推送分享图文内容
     $sql = "SELECT title,description,start_time,end_time,picture,status FROM " . tablename($this->table_reply) . " WHERE `rid`=:rid LIMIT 1";
     $row = pdo_fetch($sql, array(':rid' => $rid));
     if ($row == false) {
         return $this->respText("活动已取消...");
     }
     //查询是否被屏蔽
     $lists = pdo_fetch("SELECT status FROM " . tablename($this->table_list) . " WHERE from_user = '" . $from . "' and weid = '" . $weid . "' and rid= '" . $rid . "' order by `status` asc");
     if (!empty($lists)) {
         //查询是否有记录
         if ($lists['status'] == 0) {
             $message = "亲," . $row['title'] . "活动中您可能有作弊行为已被管理员暂停了!请联系" . $_W['account']['name'] . "";
             return $this->respText($message);
         }
     }
     //查询是否被屏蔽
     //查询是否中奖
     $lists = pdo_fetch("SELECT zhongjiang FROM " . tablename($this->table_list) . " WHERE from_user = '" . $from . "' and weid = '" . $weid . "' and rid= '" . $rid . "' order by `zhongjiang` desc");
     if (!empty($lists)) {
         if ($lists['zhongjiang'] == 1) {
             $zhongjiang = "亲!恭喜中奖了,请点击查看!";
         }
     }
     //查询是否中奖
     //查询是否开始活动
     $now = time();
     if ($now < $row['start_time']) {
         $message = "亲," . $row['title'] . "还没有开始,请于" . date("Y-m-d H:i:s", $row['start_time']) . "参加活动";
         return $this->respText($message);
     }
     //查询是否开始活动
     //查询是否结束
     if ($now > $row['end_time']) {
         $zhongjiang .= "亲," . $row['title'] . "活动已结束了!";
     }
     //查询是否结束
     //查询是否暂停
     if ($row['status'] == 0) {
         $zhongjiang .= "亲," . $row['title'] . "活动暂停了!";
     }
     //查询是否暂停
     //转换图片路径
     $picture = toimage($row['picture']);
     //转换图片路径
     //显示图文回复内容
     return $this->respNews(array('Title' => $row['title'], 'Description' => htmlspecialchars_decode($row['description']) . $zhongjiang, 'PicUrl' => $picture, 'Url' => $this->createMobileUrl('chailihe', array('rid' => $rid, 'chufa' => 1, 'from_user' => base64_encode(authcode($from, 'ENCODE'))))));
 }
开发者ID:6662680,项目名称:qday_wx,代码行数:54,代码来源:processor.php

示例5: site_slide_search

function site_slide_search($params = array())
{
    global $_GPC, $_W;
    extract($params);
    $sql = "SELECT * FROM " . tablename('site_slide') . " WHERE weid = '{$_W['weid']}' ORDER BY id DESC LIMIT {$limit}";
    $list = pdo_fetchall($sql);
    if (!empty($list)) {
        foreach ($list as &$row) {
            $row['url'] = strexists($row['url'], 'http') ? $row['url'] : $_W['siteroot'] . $row['url'];
            $row['thumb'] = toimage($row['thumb']);
        }
    }
    return $list;
}
开发者ID:yunsite,项目名称:my-we7,代码行数:14,代码来源:site.mod.php

示例6: respond

 public function respond()
 {
     $content = $this->message['content'];
     //这里定义此模块进行消息处理时的具体过程, 请查看微赞文档来编写你的代码
     $reply = pdo_fetchall("SELECT * FROM " . tablename('album_reply') . " WHERE rid = :rid", array(':rid' => $this->rule));
     if (!empty($reply)) {
         foreach ($reply as $row) {
             $albumids[$row['albumid']] = $row['albumid'];
         }
         $album = pdo_fetchall("SELECT id, title, thumb, content FROM " . tablename('album') . " WHERE id IN (" . implode(',', $albumids) . ")", array(), 'id');
         $response = array();
         foreach ($reply as $row) {
             $row = $album[$row['albumid']];
             $response[] = array('title' => $row['title'], 'description' => $row['content'], 'picurl' => toimage($row['thumb']), 'url' => $this->buildSiteUrl($this->createMobileUrl('detail', array('id' => $row['id']))));
         }
         return $this->respNews($response);
     }
 }
开发者ID:aspnmy,项目名称:weizan,代码行数:18,代码来源:processor.php

示例7: doWebQuery

 public function doWebQuery()
 {
     global $_W, $_GPC;
     $kwd = $_GPC['keyword'];
     $sql = 'SELECT * FROM ' . tablename('ewei_exam_paper') . ' WHERE `weid`=:weid AND `title` LIKE :title';
     $params = array();
     $params[':weid'] = $_W['uniacid'];
     $params[':title'] = "%{$kwd}%";
     $ds = pdo_fetchall($sql, $params);
     foreach ($ds as &$row) {
         $r = array();
         $r['id'] = $row['id'];
         $r['title'] = $row['title'];
         $r['content'] = cutstr($row['description'], 30, '...');
         $r['thumb'] = toimage($row['thumb']);
         $row['entry'] = $r;
     }
     include $this->template('query');
 }
开发者ID:eduNeusoft,项目名称:weixin,代码行数:19,代码来源:site.php

示例8: doMobileList

 public function doMobileList()
 {
     global $_GPC, $_W;
     $weid = $_W['uniacid'];
     $set = pdo_fetch("SELECT * FROM " . tablename('fineness_sysset') . " WHERE weid=:weid limit 1", array(':weid' => $weid));
     $cid = intval($_GPC['cid']);
     $category = pdo_fetch("SELECT * FROM " . tablename('fineness_article_category') . " WHERE id = '{$cid}'");
     $advlist = pdo_fetchall('SELECT * FROM ' . tablename('fineness_adv') . " WHERE weid=:weid and pid ='{$cid}' ", array(':weid' => $weid));
     $result = pdo_fetchall("SELECT * FROM " . tablename('fineness_article_category') . " WHERE uniacid ={$weid} AND parentid = {$cid} ORDER BY displayorder ASC, id ASC ");
     //独立选择分类模板
     $title = $category['name'];
     $op = $_GPC['op'];
     if (!empty($category['thumb'])) {
         $shareimg = toimage($category['thumb']);
     } else {
         $shareimg = IA_ROOT . '/addons/amouse_article/icon.jpg';
     }
     $childid = $_GPC['childid'];
     $list = pdo_fetchall("SELECT * FROM " . tablename('fineness_article') . " WHERE weid={$weid} AND pcate={$cid} AND ccate={$childid} ORDER BY displayorder ASC ");
     $url = $_W['siteroot'] . "app/" . substr($this->createMobileUrl('Index', array('cid' => $cid, 'uniacid' => $weid), true), 2);
     include $this->template('themes/list14');
 }
开发者ID:eduNeusoft,项目名称:weixin,代码行数:22,代码来源:site.php

示例9: respond

 public function respond()
 {
     global $_W;
     $rid = $this->rule;
     $from_user = $this->message['from'];
     $sql = "SELECT title,description,start_picurl,isshow,starttime,endtime,end_theme,end_instruction,end_picurl FROM " . tablename('stonefish_planting_reply') . " WHERE `rid`=:rid LIMIT 1";
     $row = pdo_fetch($sql, array(':rid' => $rid));
     if ($row == false) {
         return $this->respText("活动已取消...");
     }
     if ($row['isshow'] == 0) {
         return $this->respText("活动暂停,请稍后...");
     }
     if ($row['starttime'] > time()) {
         return $this->respText("活动未开始,请等待...");
     }
     $endtime = $row['endtime'];
     if ($endtime < time()) {
         return $this->respNews(array('Title' => $row['end_theme'], 'Description' => $row['end_instruction'], 'PicUrl' => toimage($row['end_picurl']), 'Url' => $this->createMobileUrl('index', array('rid' => $rid, 'from_user' => base64_encode(authcode($from_user, 'ENCODE'))))));
     } else {
         return $this->respNews(array('Title' => $row['title'], 'Description' => $row['description'], 'PicUrl' => toimage($row['start_picurl']), 'Url' => $this->createMobileUrl('index', array('rid' => $rid, 'from_user' => base64_encode(authcode($from_user, 'ENCODE'))))));
     }
 }
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:23,代码来源:processor.php

示例10: doMobileDetail

 public function doMobileDetail()
 {
     global $_GPC, $_W;
     $id = intval($_GPC['id']);
     $weid = $_W['uniacid'];
     $set = pdo_fetch("SELECT * FROM " . tablename('fineness_sysset') . " WHERE weid=:weid limit 1", array(':weid' => $weid));
     $detail = pdo_fetch("SELECT * FROM " . tablename('fineness_article') . " WHERE `id`=:id and weid=:weid", array(':id' => $id, ':weid' => $weid));
     $shareimg = toimage($detail['thumb']);
     $url = $_W['siteroot'] . "app/" . substr($this->createMobileUrl('detail', array('id' => $id, 'uniacid' => $weid), true), 2);
     if ($detail['bg_music_switch'] == 1) {
         if (strexists($detail['musicurl'], 'http://') || strexists($detail['musicurl'], 'https://')) {
             $detail['musicurl'] = $detail['musicurl'];
         } else {
             $detail['musicurl'] = $_W['attachurl'] . $detail['musicurl'];
         }
     }
     if (!empty($detail['outLink'])) {
         if (strtolower(substr($detail['outLink'], 0, 4)) != 'tel:' && !strexists($detail['outLink'], 'http://') && !strexists($detail['outLink'], 'https://')) {
             $detail['outLink'] = $_W['siteroot'] . 'app/' . $detail['outLink'];
         }
         header('Location: ' . $detail['outLink']);
         exit;
     }
     $op = $_GPC['op'];
     if ($op == 'wemedia') {
         $wechat = pdo_fetch("SELECT * FROM " . tablename('account_wechats') . " WHERE acid=:acid AND uniacid=:uniacid limit 1", array(':acid' => $weid, ':uniacid' => $weid));
         include $this->template('themes/detail5');
         exit;
     }
     $wechat = pdo_fetch("SELECT * FROM " . tablename('account_wechats') . " WHERE acid=:acid AND uniacid=:uniacid limit 1", array(':acid' => $weid, ':uniacid' => $weid));
     if (!empty($detail['template'])) {
         include $this->template($detail['templatefile']);
         exit;
     }
     include $this->template('detail');
 }
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:36,代码来源:site.php

示例11: tpl_form_field_image

function tpl_form_field_image($name, $value = '', $default = './resource/image/module-nopic-small.jpg')
{
    $s = '';
    if (!defined('INCLUDE_KINDEDITOR')) {
        $s = '
		<script type="text/javascript" src="./resource/script/kindeditor/kindeditor-min.js"></script>
		<script type="text/javascript" src="./resource/script/kindeditor/lang/zh_CN.js"></script>
		<link type="text/css" rel="stylesheet" href="./resource/script/kindeditor/themes/default/default.css" />';
    }
    if (strexists($name, '[')) {
        $id = str_replace(array('[', ']'), '_', $name);
    } else {
        $id = $name;
    }
    $val = $default;
    if (!empty($value)) {
        $val = toimage($value);
    }
    $s .= '
	<div style="display:block; margin-top:5px;" class="input-append">
	<input type="text" value="' . $value . '" name="' . $name . '" id="upload-image-url-' . $id . '" class="span3" autocomplete="off">
	<input type="hidden" value="" name="' . $name . '_old" id="upload-image-url-' . $id . '-old">
	<button class="btn" type="button" id="upload-image-' . $id . '">选择图片</button>
	</div>
	<div id="upload-image-preview-' . $id . '" style="margin-top:10px;"><img src="' . $val . '" width="100" onload="thumb(this)" /></div>
	<script type="text/javascript">
	function thumb(obj) {
		if (obj.height > obj.width) { obj.style.height = "100px"; obj.style.width = "auto"}
	}
	var editor = KindEditor.editor({
		allowFileManager : true,
		uploadJson : "./index.php?act=attachment&do=upload",
		fileManagerJson : "./index.php?act=attachment&do=manager",
		afterUpload : function(url, data) {
		}
	});
	$("#upload-image-' . $id . '").click(function() {
		editor.loadPlugin("image", function() {
			editor.plugin.imageDialog({
				tabIndex : 1,
				imageUrl : $("#upload-image-url-' . $id . '").val(),
				clickFn : function(url) {
					editor.hideDialog();
					var val = url;
					if(url.toLowerCase().indexOf("http://") == -1 && url.toLowerCase().indexOf("https://") == -1) {
						var filename = /images(.*)/.exec(url);
						if(filename && filename[0]) {
							val = filename[0];
						}
					}
					$("#upload-image-url-' . $id . '-old").val($("#upload-image-url-' . $id . '").val());
					$("#upload-image-url-' . $id . '").val(val);
					$("#upload-image-preview-' . $id . '").html(\'<img src="\'+url+\'" width="100"  onload="thumb(this)" />\');
				}
			});
		});
	});
	</script>';
    define('INCLUDE_KINDEDITOR', true);
    return $s;
}
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:61,代码来源:tpl.func.php

示例12: time

$now = time();
if ($now - $reply['xuninum_time'] > $reply['xuninumtime']) {
    pdo_update($this->table_reply, array('xuninum_time' => $now, 'xuninum' => $reply['xuninum'] + mt_rand($reply['xuninuminitial'], $reply['xuninumending'])), array('rid' => $rid));
}
//虚拟人数据配置
//参与活动人数
$totals = $reply['xuninum'] + pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename($this->table_users) . ' WHERE uniacid=:uniacid and rid=:rid', array(':uniacid' => $uniacid, ':rid' => $rid));
//参与活动人数
//查询分享标题以及内容变量
$reply['sharetitle'] = $this->get_share($uniacid, $rid, $from_user, $reply['sharetitle']);
$reply['sharecontent'] = $this->get_share($uniacid, $rid, $from_user, $reply['sharecontent']);
//整理数据进行页面显示
$myavatar = $avatar;
$mynickname = $nickname;
$shareurl = $_W['siteroot'] . 'app/' . $this->createMobileUrl('shareuserview', array('rid' => $rid, 'duli' => '1', 'fromuser' => $from_user, 'tfrom_user' => $tfrom_user));
//分享URL
$shouquan = base64_encode($_SERVER['HTTP_HOST'] . 'anquan_ma_photosvote');
//$title = $unrname . ' 的投票详情!';
$unrname = !empty($user['realname']) ? $user['realname'] : $user['nickname'];
$title = $unrname . '正在参加' . $reply['title'] . ',快来为' . $unrname . '投票及拉票吧!';
$sharetitle = $unrname . '正在参加' . $reply['title'] . ',快来为' . $unrname . '投票及拉票吧!';
$sharecontent = $unrname . '正在参加' . $reply['title'] . ',快来为' . $unrname . '投票及拉票吧!';
$picture = toimage($reply['sharephoto']);
$_share['link'] = $_W['siteroot'] . 'app/' . $this->createMobileUrl('shareuserview', array('rid' => $rid, 'duli' => '1', 'fromuser' => $from_user, 'tfrom_user' => $tfrom_user));
//分享URL
$_share['title'] = $unrname . '正在参加' . $reply['title'] . ',快来为' . $unrname . '投票及拉票吧!';
$_share['content'] = $unrname . '正在参加' . $reply['title'] . ',快来为' . $unrname . '投票及拉票吧!';
//$_share['imgUrl'] = !empty($user['photo']) ? toimage($user['photo']) : toimage($user['avatar']);
$_share['imgUrl'] = !empty($user['avatar']) ? toimage($user['avatar']) : toimage($user['photo']);
$toye = $this->_stopllq('tuser');
include $this->template($toye);
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:31,代码来源:tuser.php

示例13: toimage

        "sendFriendLink": "<?php 
echo $loclurl;
?>
",
        "fTitle": "<?php 
echo $reply['title'];
?>
",
        "fContent": "<?php 
echo $reply['description'];
?>
"
    };
    var shareData = {
        "imgUrl" : '<?php 
echo toimage($reply['share_txt']);
?>
',
        "link" : window.eso_shareData.sendFriendLink,
        "title" : '<?php 
echo $reply['share_title'];
?>
',
        "desc" : '<?php 
echo $reply['share_desc'];
?>
'
    };
    if (!shareData.imgUrl) {
        shareData.imgUrl = window.eso_shareData.imgUrl;
    }
开发者ID:nsoff,项目名称:wdlcms,代码行数:31,代码来源:2_default.tpl.php

示例14: defined

/**
 * 女神来了模块定义
 *
 * @author 微赞科技
 * @url http://bbs.wdlcms.com/
 */
defined('IN_IA') or exit('Access Denied');
header('Content-type: application/json');
$fmmid = random(16);
$now = time();
$udata = array('uniacid' => $uniacid, 'rid' => $rid, 'from_user' => $from_user, 'fmmid' => $fmmid, 'mediaid' => $_POST['serverId'], 'timelength' => $_GPC['timelength'], 'ip' => getip(), 'createtime' => $now);
if ($udata['mediaid']) {
    $voice = $this->downloadVoice($udata['mediaid'], $fmmid);
    if ($qiniu['isqiniu']) {
        $nfilename = 'FMVOICE' . date('YmdHis') . random(16) . '.amr';
        $upurl = toimage($voice);
        $username = pdo_fetch("SELECT * FROM " . tablename($this->table_users_name) . " WHERE uniacid = :uniacid and from_user = :from_user and rid = :rid", array(':uniacid' => $uniacid, ':from_user' => $from_user, ':rid' => $rid));
        $audiotype = 'voice';
        $qiniuaudios = $this->fmqnaudios($nfilename, $qiniu, $upurl, $audiotype, $username);
        $nfilenamefop = $qiniuaudios['nfilenamefop'];
        if ($qiniuaudios['success'] == '-1') {
            //	var_dump($err);
            $fmdata = array("success" => -1, "msg" => $qiniuaudios['msg']);
            echo json_encode($fmdata);
            exit;
        } else {
            $insertdata = array();
            if ($qiniuaudios['success'] == '-2') {
                //var_dump($err);
                $fmdata = array("success" => -1, "msg" => $qiniuaudios['msg']);
                echo json_encode($fmdata);
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:31,代码来源:saverecord.php

示例15: array

;url=<?php 
echo $this->createMobileUrl('index', array('rid' => $rid));
?>
">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=yes;" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <meta content="email=no" name="format-detection" />
</head>
<style>
    body{background:<?php 
echo $reply['bgcolor'];
?>
;color:<?php 
echo $reply['textcolor'];
?>
;}
	img{max-width:100%!important;}
    body,div{margin:0; padding:0;}
</style>
<body>
<div style="position:absolute; width:100%; height:100%; z-index:-1"><img style="position:fixed;" src="<?php 
echo toimage($reply['homepic']);
?>
" width="100%" height="100%" /></div>
<?php 
!empty($this) && $this instanceof WeModuleSite ? include $this->template('jssdkhide', TEMPLATE_INCLUDEPATH) : (include template('jssdkhide', TEMPLATE_INCLUDEPATH));
?>
</body>
</html>
开发者ID:6662680,项目名称:qday_wx,代码行数:31,代码来源:3_homepictime.tpl.php


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