本文整理汇总了PHP中url_implode函数的典型用法代码示例。如果您正苦于以下问题:PHP url_implode函数的具体用法?PHP url_implode怎么用?PHP url_implode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了url_implode函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: index
function index()
{
$per_page_num = min(500, max(20, (int) (isset($_GET['pn']) ? $_GET['pn'] : $_GET['per_page_num'])));
$gets = array('mod' => 'recdtopic', 'pn' => $this->Get['pn'], 'per_page_num' => $this->Get['per_page_num'], 'keyword' => $this->Get['keyword'], 'nickname' => $this->Get['nickname']);
$page_url = 'admin.php?' . url_implode($gets);
$where_sql = ' 1 AND tr.tid>0 ';
$keyword = trim($this->Get['keyword']);
if ($keyword) {
$_GET['highlight'] = $keyword;
$where_sql .= " AND " . build_like_query('t.content,t.content2', $keyword) . " ";
}
$nickname = trim($this->Get['nickname']);
if ($nickname) {
$sql = "select `username`,`nickname` from `" . TABLE_PREFIX . "members` where `nickname`='{$nickname}' limit 0,1";
$query = $this->DatabaseHandler->Query($sql);
$members = $query->GetRow();
$where_sql .= " AND `username`='{$members['username']}' ";
}
$count = DB::result_first("SELECT COUNT(*)\r\n\t\t\t\t\t\t\t\t FROM " . DB::table('topic') . " AS t\r\n\t\t\t\t\t\t\t\t LEFT JOIN " . DB::table('topic_recommend') . " AS tr\r\n\t\t\t\t\t\t\t\t ON t.tid=tr.tid\r\n\t\t\t\t\t\t\t\t WHERE {$where_sql}");
$topic_list = array();
if ($count) {
$page_arr = page($count, $per_page_num, $page_url, array('return' => 'array'));
$query = DB::query("SELECT t.*,tr.dateline AS recd_time,tr.expiration,tr.r_nickname\r\n\t\t\t\t\t\t\t\tFROM " . DB::table('topic') . " AS t\r\n\t\t\t\t\t\t\t\tLEFT JOIN " . DB::table('topic_recommend') . " AS tr\r\n\t\t\t\t\t\t\t\tON t.tid=tr.tid\r\n\t\t\t\t\t\t\t\tWHERE {$where_sql}\r\n\t\t\t\t\t\t\t\tORDER BY tr.dateline DESC\r\n\t\t\t\t\t\t\t\t{$page_arr['limit']} ");
while ($value = DB::fetch($query)) {
$value['recd_time'] = my_date_format2($value['recd_time']);
$topic_list[] = $value;
}
$topic_list = $this->TopicLogic->MakeAll($topic_list);
}
include template('admin/recdtopic');
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:31,代码来源:recdtopic.mod.php
示例2: Viewimg
function Viewimg()
{
$imgid = jget('pid');
$infos = jlogic('image')->get_uploadimg_byid($imgid);
$imginfo = $infos[$imgid];
if (!$imginfo) {
$this->Messager("不存在该图片", null);
}
if ($imginfo['albumid'] > 0 && !jlogic('image')->checkalbumbyid($imginfo['albumid'])) {
$this->Messager("您没有权限浏览该图片", null);
}
$imginfo['photo'] = $imginfo['site_url'] . '/' . str_replace('./', '', $imginfo['photo']);
$albumname = $imginfo['albumid'] > 0 ? jlogic('image')->get_albumname_byid($imginfo['albumid']) : '默认相册';
$imgname = $imginfo['description'] ? cut_str($imginfo['description'], 18) : $imginfo['name'];
$imgwidth = $imginfo['width'] > 800 ? 800 : $imginfo['width'];
$imgheight = $imginfo['width'] > 800 ? ceil($imginfo['height'] / $imginfo['width'] * 800) : $imginfo['height'];
$imgsize = $imginfo['filesize'] > 0 ? $imginfo['filesize'] < 1024 * 100 ? round($imginfo['filesize'] / 1024, 1) . 'K' : round($imginfo['filesize'] / (1024 * 1024), 1) . 'M' : '未知';
$imgtime = my_date_format($imginfo['dateline']);
if ($imginfo['uid'] == MEMBER_ID) {
$myclass = 'curr';
$allclass = '';
$navtitle = '<a href="' . jurl('index.php?mod=album') . '">我的相册</a> >> ' . '<a href="' . jurl('index.php?mod=album&aid=' . $imginfo['albumid']) . '">' . $albumname . '</a> >> ' . $imgname;
} else {
$myclass = '';
$allclass = 'curr';
$navtitle = '<a href="' . jurl('index.php?mod=album&code=list') . '">全部相册</a> >> ' . '<a href="' . jurl('index.php?mod=album&code=list&uid=' . $imginfo['uid']) . '">' . $imginfo['username'] . '的相册</a> >> ' . '<a href="' . jurl('index.php?mod=album&code=list&aid=' . $imginfo['albumid']) . '">' . $albumname . '</a> >> ' . $imgname;
}
$imgfrom = $imginfo['tid'] > 0 ? '<a href="' . jurl('index.php?mod=topic&code=' . $imginfo['tid']) . '">微博</a>' : ($imginfo['tid'] < 0 ? '私信' : '相册');
$this->item = 'topic_image';
$this->item_id = $imgid;
$albumid = $imginfo['albumid'];
$h_key = 'album';
$gets = array('mod' => 'album', 'code' => 'viewimg', 'pid' => $imgid);
$page_url = 'index.php?' . url_implode($gets);
$tids = jlogic('image')->get_topic_by_imageid($imgid);
$options = array('tid' => $tids, 'perpage' => 5, 'page_url' => $page_url);
$topic_info = jlogic('topic_list')->get_data($options);
$topic_list = array();
if (!empty($topic_info)) {
$topic_list = $topic_info['list'];
$page_arr['html'] = $topic_info['page']['html'];
}
$this->Title = '查看相册图片 - ' . $imginfo['name'];
$albums = jlogic('image')->getalbum();
include template("album_img");
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:46,代码来源:album.mod.php
示例3: index
function index()
{
$per_page_num = min(500, max(20, (int) (isset($_GET['pn']) ? $_GET['pn'] : $_GET['per_page_num'])));
$gets = array('mod' => 'vote', 'pn' => $this->Get['pn'], 'vid' => $this->Get['vid'], 'subject' => $this->Get['subject']);
$page_url = 'admin.php?' . url_implode($gets);
$where_sql = " 1 ";
$vid = $this->Get['vid'];
if (!empty($vid)) {
if (strpos($vid, ',') !== false) {
$vids = explode(',', $vid);
foreach ($vids as $key => $val) {
$vids[$key] = intval($val);
}
$where_sql .= " AND v.vid IN(" . jimplode($vids) . ") ";
} else {
$where_sql .= " AND v.vid=" . intval($vid) . " ";
}
}
$subject = $this->Get['subject'];
if (!empty($subject)) {
$subject_sql = addcslashes($subject, '_%');
$where_sql .= " AND v.subject like('%{$subject_sql}%') ";
$subject = jstripslashes($subject);
}
if ($this->Code == 'verify') {
$action = "admin.php?mod=vote&code=doverify";
$where_sql .= " AND v.verify = 0 ";
} elseif ($this->Code == 'index') {
$action = "admin.php?mod=vote&code=batch";
$where_sql .= " AND v.verify = 1 ";
}
$count = DB::result_first("SELECT COUNT(*) FROM " . DB::table("vote") . " v WHERE {$where_sql}");
$list = array();
if ($count) {
$page_arr = page($count, $per_page_num, $page_url, array('return' => 'array'), '20 50 100 200,500');
$query = DB::query("SELECT *,m.nickname\r\n\t\t\t\t\t\t\t\tFROM " . DB::table("vote") . " v\r\n\t\t\t\t\t\t\t\tLEFT JOIN " . DB::table("members") . " m ON m.uid = v.uid\r\n\t\t\t\t\t\t\t\tWHERE {$where_sql}\r\n\t\t\t\t\t\t\t\tORDER BY v.dateline DESC\r\n\t\t\t\t\t\t\t\t{$page_arr['limit']}");
while ($value = DB::fetch($query)) {
if ($value['recd']) {
$value['recd_checked'] = 'checked="checked"';
}
$list[] = $value;
}
}
include template('admin/vote');
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:45,代码来源:vote.mod.php
示例4: get_xindai_list
}
$result = get_xindai_list($money, $month, $data, $page);
$num = $result['count'];
$items = array();
foreach ($result['items'] as $value) {
$value['year_rate'] = round($value['year_rate'], 2);
$value['more'] = count(explode(',', $value['profession'])) > 3 ? 1 : 0;
$value['professions'] = reset(array_chunk(explode(',', $value['profession']), 3));
$items[] = $value;
}
$theurl = 'plugin.php?' . url_implode($_GET);
$sort_get = $_GET;
unset($sort_get['grade']);
unset($sort_get['total_interest']);
unset($sort_get['month_repay']);
$theurl_without_sort = 'plugin.php?' . url_implode($sort_get);
$start_limit = ($page - 1) * 10;
$multipage = multi($num, 10, $page, $theurl);
$maxpage = ceil($num / 10);
$seodata = array('bbname' => $_G['setting']['bbname'], 'xd_type' => lang('plugin/dzapp_haodai', 'xd_type_' . $_GET['xd_type']));
list($navtitle, $metadescription, $metakeywords) = get_seosetting('', $seodata, $dzapp_haodai_seo['search']);
include template('dzapp_haodai:search');
} elseif ($action == 'news') {
if (!$_GET['aid']) {
showmessage('dzapp_haodai:param_wrong');
}
$id = intval($_GET['aid']);
$result = get_article_detail($id);
if (!@(include_once DISCUZ_ROOT . './data/sysdata/cache_dzapp_haodai_dkzx_' . $city . '.php' || TIMESTAMP - filemtime(DISCUZ_ROOT . './data/sysdata/cache_dzapp_haodai_dkzx_' . $city . '.php') > $var['refreshtime'])) {
$dkzx_article = get_article_dkzx_list();
writetocache('dzapp_haodai_dkzx_' . $city, getcachevars(array('dkzx_article' => $dkzx_article)));
开发者ID:samyex6,项目名称:discuz3.2-lite,代码行数:31,代码来源:dzapp_haodai.inc.php
示例5: GetRewardList
function GetRewardList()
{
jfunc('app');
$item = "reward";
$item_id = intval(trim($this->Get['item_id']));
if ($item_id < 1) {
exit;
}
$gets = array('mod' => $item, 'code' => "detail", 'id' => $item_id);
$page_url = 'index.php?' . url_implode($gets);
$where = '';
$options = array('where' => $where, 'page' => true, 'perpage' => 5, 'page_url' => $page_url);
$topic_info = app_get_topic_list($item, $item_id, $options);
$topic_list = array();
if (!empty($topic_info)) {
$topic_list = $topic_info['list'];
$page_arr['html'] = $topic_info['page']['html'];
$no_from = true;
include template('topic_list_ajax');
}
exit;
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:22,代码来源:app.mod.php
示例6: view
function view()
{
$uid = MEMBER_ID;
$vid = empty($this->Get['vid']) ? 0 : intval($this->Get['vid']);
$newpoll = $hotpoll = $poll = $option = array();
$vote = $this->VoteLogic->id2voteinfo($vid);
if (empty($vote) || $vote['verify'] == 0 && MEMBER_ROLE_TYPE != 'admin') {
$this->Messager('当前投票不存在或正在审核中!');
}
$this->item_id = $vid;
$ret = $this->VoteLogic->process_detail($vote, MEMBER_ID);
extract($ret);
$member = jsg_member_info($vote['uid']);
if ($member['uid'] != MEMBER_ID) {
$fllow = chk_follow(MEMBER_ID, $member['uid']);
$follow_html = follow_html($member['uid'], $fllow);
$all_vote_btn = "他的全部投票";
} else {
$follow_html = '';
$all_vote_btn = "我的全部投票";
}
if ($member['uid'] == MEMBER_ID || MEMBER_ROLE_TYPE == 'admin') {
$exp_info = $this->VoteLogic->get_publish_form_param();
extract($exp_info);
}
$recd_list = $this->VoteLogic->get_recd_list();
jfunc('app');
$gets = array('mod' => 'vote', 'code' => 'view', 'vid' => $vid);
$page_url = 'index.php?' . url_implode($gets);
$options = array('page' => true, 'perpage' => 5, 'page_url' => $page_url);
$topic_info = app_get_topic_list($this->item, $vid, $options);
$topic_list = array();
if (!empty($topic_info)) {
$topic_list = $topic_info['list'];
$page_arr['html'] = $topic_info['page']['html'];
}
$params = array('item' => $this->item, 'item_id' => $vid, 'oc' => 'view');
$no_from = true;
$this->item = 'vote';
$this->item_id = $vid;
$set_qun_closed = 1;
$set_vote_closed = 1;
$expiration = FALSE;
if ($vote['expiration'] < TIMESTAMP) {
$expiration = true;
}
$this->Title = '投票 - ' . $vote['subject'];
include template("vote/vote_view");
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:49,代码来源:vote.mod.php
示例7: manage
function manage()
{
$op = trim($this->Get['op']);
if ($op == 'edit') {
$qid = intval(trim($this->Get['qid']));
if (empty($qid)) {
$this->Messager('请指定要编辑的微群');
}
$qun_info = $this->QunLogic->get_qun_info($qid);
if (empty($qun_info)) {
$this->Messager('当前群不存在或者已经被删除了');
}
$query = $this->DatabaseHandler->Query("select * from " . TABLE_PREFIX . "common_district where `upid` = '0' order by list");
while ($rsdb = $query->GetRow()) {
$province[$rsdb['id']]['value'] = $rsdb['id'];
$province[$rsdb['id']]['name'] = $rsdb['name'];
if ($qun_info['province'] == $rsdb['name']) {
$province_id = $rsdb['id'];
}
}
$province_list = $this->jishigou_form->Select("province", $province, $province_id, "onchange=\"changeProvince();\"");
if ($province_id) {
if ($qun_info['city']) {
$hid_city = DB::result_first("select id from " . TABLE_PREFIX . "common_district where name = '{$qun_info['city']}' and upid = '{$province_id}'");
}
}
Load::logic("qun");
$qunLogic = new QunLogic();
$themelist = $qunLogic->getQunThemeList();
if (empty($cat_ary['second'][$qun_info['cat_id']])) {
$catselect = $this->QunLogic->get_catselect($qun_info['cat_id'], 0);
} else {
$catselect = $this->QunLogic->get_catselect(0, $qun_info['cat_id']);
}
$tag = $this->QunLogic->get_qun_strtag($qid);
$icon = $this->QunLogic->qun_avatar($qid);
$checked = array();
$checked['gview_perm'][$qun_info['gview_perm']] = 'checked="checked"';
$checked['join_type'][$qun_info['join_type']] = 'checked="checked"';
$checked['recd'] = $qun_info['recd'] == 1 ? 'checked="checked"' : '';
$u_tips = $this->QunLogic->upload_tips();
$actions = "admin.php?mod=qun&code=domanage&op=edit";
include template('admin/qun_edit');
} else {
$perpage = 20;
$gets = array('mod' => 'qun', 'code' => 'manage');
$page_url = 'admin.php?' . url_implode($gets);
$level_ary = jconf::get('qun_level');
$where_sql = ' 1 ';
$qun_level = $this->Get['qun_level'];
if ($qun_level > 0) {
$cur_level = $level_ary[$qun_level];
$credits_higher = $cur_level['credits_higher'];
$credits_lower = $cur_level['credits_lower'];
$where_sql .= " AND q.credits<{$credits_lower} AND q.credits>={$credits_higher} ";
}
$qun_name = trim($this->Get['qun_name']);
if (!empty($qun_name)) {
$key_qun_name = jstripslashes($qun_name);
$q_sql = addcslashes($qun_name, '_%');
$where_sql .= " AND q.name LIKE('%{$q_sql}%') ";
}
$nickname = trim($this->Get['nickname']);
if (!empty($nickname)) {
$key_nickname = jstripslashes($nickname);
$n_sql = addcslashes($nickname, '_%');
$where_sql .= " AND m.nickname LIKE('%{$n_sql}%') ";
}
$timefrom = $this->Get['timefrom'];
if ($timefrom) {
$str_time_from = strtotime($timefrom);
$where_sql .= " and `dateline`>'{$str_time_from}'";
}
$timeto = $this->Get['timeto'];
if ($timeto) {
$str_time_to = strtotime($timeto);
$where_sql .= " and `dateline`<'{$str_time_to}'";
}
$count = DB::result_first("SELECT COUNT(*)\r\n\t\t\t\t\t\t\t\t\t FROM " . DB::table('qun') . " AS q\r\n\t\t\t\t\t\t\t\t\t LEFT JOIN " . DB::table('members') . " AS m\r\n\t\t\t\t\t\t\t\t\t ON q.founderuid=m.uid\r\n\t\t\t\t\t\t\t\t \t WHERE {$where_sql}");
$qun_list = array();
if ($count) {
$_config = array('return' => 'array');
$page_arr = page($count, $perpage, $page_url, $_config);
$cat_ary = jconf::get('qun_category');
$query = DB::query("SELECT q.*, m.nickname\r\n\t\t\t\t\t\t\t\t\tFROM " . DB::table('qun') . " AS q\r\n\t\t\t\t\t\t\t\t\tLEFT JOIN " . DB::table('members') . " AS m ON q.founderuid=m.uid\r\n\t\t\t\t\t\t\t\t\tWHERE {$where_sql}\r\n\t\t\t\t\t\t\t\t\tORDER BY dateline DESC\r\n\t\t\t\t\t\t\t\t\t{$page_arr['limit']}");
while ($value = DB::fetch($query)) {
$level = $this->QunLogic->qun_level($value['qid'], $value['credits']);
$value['level'] = $level['level_name'];
if ($parent_id = $cat_ary['second'][$value['cat_id']]['parent_id']) {
$value['top_cat'] = $cat_ary['first'][$parent_id]['cat_name'];
$value['top_cat_id'] = $parent_id;
$value['sub_cat'] = $cat_ary['second'][$value['cat_id']]['cat_name'];
} else {
$parent_id = $value['cat_id'];
$value['top_cat'] = $cat_ary['first'][$parent_id]['cat_name'];
$value['top_cat_id'] = $parent_id;
}
$value['dateline'] = my_date_format($value['dateline'], 'Y-m-d');
if ($value['recd']) {
$value['recd_checked'] = 'checked="checked"';
//.........这里部分代码省略.........
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:101,代码来源:qun.mod.php
示例8: exit
exit('Access Denied');
}
define('DZZSCRIPT', 'index.php');
$sharestatus = array('-4' => '已屏蔽', '-3' => '文件已删除', '-2' => '次数用尽', '-1' => '已过期', '0' => '正常');
$typearr = array('folder' => '目录', 'image' => '图片', 'document' => '文档', 'dzzdoc' => 'Dzz文档', 'video' => '视频', 'attach' => '附件', 'link' => '网址', 'url' => '其他');
$type = trim($_GET['type']);
$keyword = trim($_GET['keyword']);
$username = trim($_GET['username']);
$asc = isset($_GET['asc']) ? intval($_GET['asc']) : 1;
$uid = intval($_GET['uid']);
$order = in_array($_GET['order'], array('title', 'dateline', 'type', 'size', 'count')) ? trim($_GET['order']) : 'dateline';
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
$perpage = 20;
$start = ($page - 1) * $perpage;
$gets = array('mod' => 'share', 'type' => $type, 'keyword' => $keyword, 'order' => $order, 'asc' => $asc, 'uid' => $uid, 'username' => $username);
$theurl = BASESCRIPT . "?" . url_implode($gets);
$orderby = " order by {$order} " . ($asc ? 'DESC' : '');
$sql = "1";
$param = array('share');
if ($type) {
$sql .= " and type=%s";
$param[] = $type;
}
if ($keyword) {
$sql .= " and title LIKE %s";
$param[] = '%' . $keyword . '%';
}
if ($username) {
$sql .= " and username=%s";
$param[] = $username;
}
开发者ID:druphliu,项目名称:dzzoffice,代码行数:31,代码来源:index.php
示例9: empty
if (empty($_GET['view'])) {
$_GET['view'] = 'me';
}
$_GET['order'] = empty($_GET['order']) ? 'dateline' : $_GET['order'];
$allowviewuserthread = $_G['setting']['allowviewuserthread'];
$perpage = 20;
$start = ($page - 1) * $perpage;
ckstart($start, $perpage);
$list = array();
$userlist = array();
$hiddennum = $count = $pricount = 0;
$_GET['from'] = dhtmlspecialchars(preg_replace("/[^\\[A-Za-z0-9_\\]]/", '', $_GET['from']));
$gets = array('mod' => 'space', 'uid' => $space['uid'], 'do' => 'thread', 'fid' => $_GET['fid'], 'view' => $_GET['view'], 'type' => $_GET['type'], 'order' => $_GET['order'], 'fuid' => $_GET['fuid'], 'searchkey' => $_GET['searchkey'], 'from' => $_GET['from'], 'filter' => $_GET['filter']);
$theurl = 'home.php?' . url_implode($gets);
unset($gets['fid']);
$forumurl = 'home.php?' . url_implode($gets);
$multi = '';
$authorid = 0;
$replies = $closed = $displayorder = null;
$dglue = '=';
$vfid = $_GET['fid'] ? intval($_GET['fid']) : null;
require_once libfile('function/misc');
require_once libfile('function/forum');
loadcache(array('forums'));
$fids = $comma = '';
if ($_GET['view'] != 'me') {
$displayorder = 0;
$dglue = '>=';
}
$f_index = '';
$ordersql = 't.dateline DESC';
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:space_thread.php
示例10: GetRewardDetail
function GetRewardDetail()
{
$id = (int) get_param('id');
if ($id < 1) {
$this->Messager('你查看的有奖转发信息不存在或已删除', -1);
}
$reward = jlogic('reward')->getRewardInfo($id);
if (!$reward) {
$this->Messager('你查看的有奖转发信息不存在或已删除', -1);
}
if ($reward['rules']['tag']) {
$content = '#' . implode('##', $reward['rules']['tag']) . '#';
}
#有奖转发活动的参与者(显示N个)
$param = array('rid' => $id, 'limit' => 9);
$ret = jlogic('reward')->getRewardUser($param);
$play_member = $ret['user'];
$play_num = $ret['count'];
jfunc('app');
$gets = array('mod' => 'reward', 'code' => "detail", 'id' => $id);
$page_url = 'index.php?' . url_implode($gets);
$options = array('page' => true, 'perpage' => 5, 'page_url' => $page_url);
$topic_info = app_get_topic_list('reward', $id, $options);
$topic_list = array();
if (!empty($topic_info)) {
$topic_list = $topic_info['list'];
$page_arr['html'] = $topic_info['page']['html'];
$no_from = true;
}
$this->item = 'reward';
$this->item_id = $id;
$set_qun_closed = 1;
$set_event_closed = 1;
$set_fenlei_closed = 1;
$set_vote_closed = 1;
if (DB::result_first("select id from `" . TABLE_PREFIX . "reward_user` where uid = '" . MEMBER_ID . "' and rid='" . $this->item_id . "' and`on` = 1")) {
$isReward = true;
}
$member = jsg_member_info(MEMBER_ID);
$this->Title = cut_str($reward['title'], 10);
include_once template('reward/reward_datail');
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:42,代码来源:reward.mod.php
示例11: exit
* @Author http://www.jishigou.net $
*
* @Date 2014-01-03 17:38:36 107822614 926104608 1443 $
*/
if (!defined('IN_JISHIGOU')) {
exit('invalid request');
}
if ($ids = jimplode($this->Post['delete'])) {
$query = DB::query("SELECT `imageid` FROM " . DB::table('topic_shop') . " WHERE id IN ({$ids})");
while ($value = DB::fetch($query)) {
if ($value['imageid'] > 0) {
DB::query("DELETE FROM " . DB::table('topic_image') . " WHERE id = '" . $value['imageid'] . "'");
}
}
DB::query("DELETE FROM " . DB::table('topic_shop') . " WHERE id IN ({$ids})");
$this->Messager("商品删除成功", 'admin.php?mod=plugin&code=manage&identifier=shop&pmod=admincp');
}
$action = 'admin.php?mod=plugin&code=manage&identifier=shop&pmod=admincp';
$count = DB::result_first("SELECT count(*) FROM " . DB::table('topic_shop'));
$gets = array('mod' => 'plugin', 'code' => 'manage', 'identifier' => 'shop', 'pmod' => 'admincp');
$page_url = 'admin.php?' . url_implode($gets);
$per_page_num = 50;
$shops = array();
if ($count > 0) {
$page_arr = page($count, $per_page_num, $page_url, array('return' => 'array'));
$query = DB::query("SELECT * FROM " . DB::table('topic_shop') . " ORDER BY id DESC {$page_arr['limit']}");
while ($value = DB::fetch($query)) {
$value['dateline'] = date('Y-m-d H:i:s', $value['dateline']);
$shops[] = $value;
}
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:31,代码来源:admincp.inc.php
示例12: login
function login()
{
$t = (int) get_param('time');
$t = $t > 0 ? $t : 24;
$t_str = $t * 60 * 60;
$t_str = TIMESTAMP - $t_str;
$where = ' where ' . " `lastactivity` >= '{$t_str}' ";
$nickname = get_param('nickname');
if ($nickname) {
$where .= " and `nickname` = '{$nickname}' ";
}
$param = array('mod' => $this->Get['mod'], 'code' => 'login', 'time' => $t, 'nickname' => $nickname);
$url = 'admin.php?' . url_implode($param);
$members = array();
$count = DB::result_first(" select count(*) from `" . TABLE_PREFIX . "members` {$where} ");
if ($count > 0) {
$page = page($count, 50, $url, array('return' => 'array'));
$query = DB::query(" select `uid`,`username`,`nickname`,`lastactivity`,`lastip`,`last_ip_port`,`topic_count`,`province`,`city` from `" . TABLE_PREFIX . "members` {$where} order by `lastactivity` desc {$page['limit']} ");
while ($rs = DB::fetch($query)) {
$members[$rs['uid']] = $rs;
}
}
include template('admin/user_login');
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:24,代码来源:member.mod.php
示例13: view
function view()
{
$lid = jget('id', 'int', 'G');
if (!$this->LiveLogic->is_exists($lid)) {
return false;
}
$list = $this->LiveLogic->Getguest($lid);
$this->item = 'live';
$this->item_id = $item_id = $lid;
$ltype = $this->Get['list'] ? $this->Get['list'] : $this->Get['type'];
$live = $this->LiveLogic->id2liveinfo($lid, $list);
if (!in_array($ltype, array('g', 'h'))) {
if ($live['status_css'] == 'ico_notyet') {
$ltype = 'g';
} else {
$ltype = 'h';
}
}
$params = array('item' => 'live', 'item_id' => $lid);
$uids = array();
$gets = array('mod' => 'live', 'code' => 'view', 'type' => $ltype, 'id' => $lid);
$page_url = 'index.php?' . url_implode($gets);
$options = array('page' => true, 'perpage' => 20, 'page_url' => $page_url);
if (empty($live)) {
$this->Messager('当前直播不存在!');
} elseif ($live['all']) {
$defaust_value = ' 一起来说说#' . $live['livename'] . '#吧';
foreach ($live['all'] as $key => $val) {
$uids[$key] = $key;
}
if ($ltype == 'h') {
$options['where'] = " uid IN(" . jimplode($uids) . ") ";
} else {
$options['where'] = " uid NOT IN(" . jimplode($uids) . ") ";
}
$content = '#' . $live['livename'] . '#';
}
$is_live_hosts = in_array(MEMBER_ID, $uids) ? true : false;
$live_config = jconf::get('live');
if (MEMBER_STYLE_THREE_TOL) {
$member = $this->TopicLogic->GetMember(MEMBER_ID);
}
$param = array('limit' => '5');
$live_info = $this->LiveLogic->get_list($param);
if (!empty($live_info)) {
$live_count = $live_info['count'];
$live_list = $live_info['list'];
}
jfunc('app');
$topic_info = app_get_topic_list('live', $lid, $options);
$topic_list = array();
if (!empty($topic_info)) {
$topic_list = $topic_info['list'];
$page_arr['html'] = $topic_info['page']['html'];
$no_from = false;
if ($ltype == 'h' && !empty($topic_list)) {
foreach ($topic_list as $key => $val) {
$topic_list[$key]['user_css'] = 'live' . $this->LiveLogic->id2usertype($lid, $val['uid'], $list);
$topic_list[$key]['user_str'] = ' ';
}
}
$topic_count = $topic_info['count'];
}
$topic_count = $topic_count ? $topic_count : 0;
$this->Title = '直播 - ' . $live['livename'];
$albums = jlogic('image')->getalbum();
include template("live/live");
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:68,代码来源:live.mod.php
示例14: Main
function Main()
{
$code_ary = array('myblog', 'myhome', 'tag', 'qun', 'recd', 'other', 'bbs', 'cms', 'department', 'company', 'channel', 'topicnew', 'bcj');
if (!in_array($this->Code, $code_ary)) {
$tos = array('new' => 'index.php?mod=plaza', 'tc' => 'index.php?mod=plaza&code=new_tc', 'hotreply' => 'index.php?mod=plaza&code=hot_reply', 'hotforward' => 'index.php?mod=plaza&code=hot_forward', 'newreply' => 'index.php?mod=plaza&code=new_reply', 'newforward' => 'index.php?mod=plaza&code=new_forward', 'top' => 'index.php?mod=top&code=member', 'channellogin' => 'index.php?mod=channel');
if (isset($tos[$this->Code])) {
$this->Messager(null, $tos[$this->Code]);
exit;
}
unset($this->Code);
}
$channel_enable = jconf::get('channel') ? true : false;
$content_dstr = $this->Config['in_publish_notice_str'];
$content_ostr = $this->Config['on_publish_notice_str'];
if ('topic' == trim($this->Get['mod']) && empty($this->Get['code']) && empty($this->Get['mod_original'])) {
if (MEMBER_ID > 0) {
if ($this->Config['topic_home_page']) {
$this->Messager(null, $this->Config['topic_home_page']);
} else {
$this->Code = 'myhome';
}
} else {
$this->Messager('请<a onclick="ShowLoginDialog();return false;" title="快捷登录" rel="nofollow" href="index.php?mod=login" >点此登录</a>,
或<a href="index.php?mod=member">点此注册</a>一个帐号', null);
return;
}
}
$member = $this->_member();
if (!$member) {
$this->Messager('请<a onclick="ShowLoginDialog();return false;" title="快捷登录" rel="nofollow" href="index.php?mod=login" >点此登录</a>,
或<a href="index.php?mod=member">点此注册</a>一个帐号', null);
return false;
}
$title = '';
$per_page_num = 20;
$topic_uids = $topic_ids = $order_list = $where_list = $params = array();
$where = $order = $limit = "";
$cache_time = 0;
$cache_key = '';
$options = array();
$gets = array('mod' => $_GET['mod_original'] ? get_safe_code($_GET['mod_original']) : $this->Module, 'code' => $this->Code, 'type' => $this->Get['type'], 'gid' => $this->Get['gid'], 'qid' => $this->Get['qid'], 'chid' => $this->Get['chid'], 'view' => $this->Get['view'], 'filter' => $this->Get['filter'], 'orderby' => $this->Get['orderby']);
$options['page_url'] = "index.php?" . url_implode($gets);
unset($gets['type']);
$type_url = "index.php?" . url_implode($gets);
$params['uid'] = $uid = $member['uid'];
$is_personal = $uid == MEMBER_ID;
$params['is_personal'] = $is_personal;
$params['code'] = $this->Code;
if (!in_array($params['code'], $code_ary)) {
$params['code'] = 'myblog';
}
$page_str = $params['code'];
if ($params['code'] == 'bbs' || $params['code'] == 'cms') {
$page_str = 'myhome';
}
if (($show_topic_num = (int) $this->ShowConfig['topic'][$page_str]) > 0) {
$per_page_num = $show_topic_num;
}
$options['perpage'] = $per_page_num;
$groupname = '';
$groupid = 0;
$TopicListLogic = jlogic('topic_list');
#if NEDU
if (defined('NEDU_MOYO')) {
nui('jsg')->cindex($this, $params, $topic_list_get);
}
#endif
$sendMail = false;
$checkUser = false;
if ($this->Config['sendmailday'] > 0) {
if (!jsg_getcookie('mail_cookie')) {
jsg_setcookie('mail_cookie', TIMESTAMP, 300);
$sendMail = true;
}
if (!jsg_getcookie('check_user')) {
jsg_setcookie('check_user', TIMESTAMP, 86400);
$checkUser = true;
}
}
$tpl = 'topic_index';
if ('myhome' == $params['code']) {
$tpl = 'topic_myhome';
$topic_selected = 'myhome';
$type = get_param('type');
if ($type && !in_array($type, array('pic', 'video', 'music', 'vote', 'event'))) {
$type = '';
}
if ($type) {
$params['type'] = $type;
}
$gid = max(0, (int) get_param('gid'));
if ($gid) {
$params['gid'] = $gid;
}
$topic_myhome_time_limit = 0;
if ($this->Config['topic_myhome_time_limit'] > 0) {
$topic_myhome_time_limit = TIMESTAMP - $this->Config['topic_myhome_time_limit'] * 86400;
if ($topic_myhome_time_limit > 0) {
$options['dateline'] = $topic_myhome_time_limit;
}
//.........这里部分代码省略.........
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:101,代码来源:topic.mod.php
示例15: eventDetail
function eventDetail()
{
$id = intval($this->Get['id']);
load::logic('event');
$EventLogic = new EventLogic();
$param = array('where' => " a.id = '{$id}' ");
$return = $EventLogic->getEventInfo($param);
$rs = $return['event_list'][$id];
if (!$rs) {
$this->Messager("活动不存在或已删除", -1);
}
if (!$rs['verify'] || $rs['verify'] == 0) {
if ($rs['postman'] != MEMBER_ID) {
$this->Messager("活动还在审核中", -1);
}
}
$from = array();
if ($rs['item'] == 'qun' && $rs['item_id'] > 0) {
load::logic('qun');
$qun_logic = new QunLogic();
$qunInfo = $qun_logic->get_qun_info($rs['item_id']);
$rs['qunname'] = $qunInfo['name'];
$from['name'] = $this->Config[changeword][weiqun] . '--' . $rs['qunname'];
$from['url'] = get_full_url('', 'index.php?mod=qun&qid=' . $rs['item_id']);
} else {
#if NEDU
if (defined('NEDU_MOYO')) {
if ($rs['item'] && $rs['item_id']) {
$app = nlogic('com.object')->get_info($rs['item'], $rs['item_id']);
if ($app) {
$from = array('name' => $app['object_name'], 'url' => $app['object_url']);
}
}
}
#endif
}
$app_member_arr = $EventLogic->getAllUser(array('where' => " a.id = '{$id}' and a.app = 1 and a.play = 0 ", 'order' => " order by a.app_time ", 'limit' => " limit 6 "), 'app');
$app_count = $app_member_arr['count'];
$app_member = $app_member_arr['member'];
$play_member_arr = $EventLogic->getAllUser(array('where' => " a.id = '{$id}' and a.play = 1 ", 'order' => " order by a.play_time ", 'limit' => " limit 6 "), 'play');
$play_count = $play_member_arr['count'];
$play_member = $play_member_arr['member'];
$member = $this->Member;
if ($member['medal_id']) {
$medal_list = $this->TopicLogic->GetMedal($member['medal_id'], $member['uid']);
}
jfunc('app');
$gets = array('mod' => 'event', 'code' => "detail", 'id' => $id);
$page_url = 'index.php?' . url_implode($gets);
$options = array('page' => true, 'perpage' => 5, 'page_url' => $page_url);
$topic_info = app_get_topic_list('event', $id, $options);
$topic_list = array();
if (!empty($topic_info)) {
$topic_list = $topic_info['list'];
$page_arr['html'] = $topic_info['page']['html'];
$no_from = true;
}
$this->item = 'event';
$this->item_id = $id;
$set_qun_closed = 1;
$set_event_closed = 1;
$set_fenlei_closed = 1;
$this->Title = $rs['title'];
include template('event/event_dateil');
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:65,代码来源:event.mod.php
示例16: QunSearch
function QunSearch()
{
$qun_setting = $this->Config['qun_setting'];
if (!$qun_setting['qun_open']) {
$this->Messager("当前站点没有开放" . $this->Config[changeword][weiqun] . "功能");
}
$perpage = 10;
$q = trim($this->Get['q']);
$q = get_safe_code($q);
$gets = array('mod' => 'search', 'code' => 'qun', 'q' => $this->Get['q']);
$page_url = 'index.php?' . url_implode($gets);
$count = 0;
if (!empty($q)) {
$q = $this->_filterKeyword($q);
$search_keyword = $q;
$QunLogic = jlogic('qun');
$where = ' gview_perm=0 AND ' . build_like_query('name', $q) . ' ';
$order = " ORDER BY dateline DESC ";
$cache_time = 3600;
if ($cache_time > 0) {
$cache_key = "qun-search-{$q}";
if (false === ($qids = cache_db('mget', $cache_key))) {
$query = DB::query("SELECT `qid` FROM " . DB::table('qun') . " WHERE {$where} {$order} LIMIT {$this->cache_ids_limit} ");
$qids = array();
while (false != ($row = DB::fetch($query))) {
$qids[$row['qid']] = $row['qid'];
}
cache_db('mset', $cache_key, $qids, $cache_time);
}
$where = $qids ? " `gview_perm`='0' AND `qid` IN ('" . implode("','", $qids) . "') " : "";
}
$qun_list = array();
if ($where) {
$count = DB::result_first("SELECT COUNT(*) FROM " . DB::table('qun') . " WHERE {$where}");
if ($count > 0) {
$page_arr = page($count, $perpage, $page_url, array('return' => 'array'));
$query = DB::query("SELECT * FROM " . DB::table('qun') . " WHERE {$where} {$order} {$page_arr['limit']}");
while ($value = DB::fetch($query)) {
if (empty($value['icon'])) {
$value['icon'] = $QunLogic->qun_avatar($value['qid'], 's');
}
$value['dateline'] = my_date_format2($value['dateline']);
$qun_list[] = $value;
}
}
}
}
$member = jsg_member_info(MEMBER_ID);
if ($member['medal_id']) {
$medal_list = $this->TopicLogic->GetMedal($member['medal_id'], $member['uid']);
}
$this->Title = $this->Config[changeword][weiqun] . '搜索';
include template('social/search_list');
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:54,代码来源:search.mod.php
示例17: index
function index()
{
$config = jconf::get('talk');
if (!$config) {
$setting = true;
include template('admin/talk');
} else {
$per_page_num = min(500, max(20, (int) (isset($_GET['pn']) ? $_GET['pn'] : $_GET['per_page_num'])));
$gets = array('mod' => 'talk', 'pn' => $this->Get['pn']);
$page_url = 'admin.php?' . url_implode($gets);
$count = DB::result_first("SELECT COUNT(*) FROM " . DB::table("talk"));
$list = array();
if ($count) {
$page_arr = page($count, $per_page_num, $page_url, array('return' => 'array'), '20 50 100 200,500');
$query = DB::query("SELECT *\r\n\t\t\t\t\t\t\t\tFROM " . DB::table("talk") . "\r\n\t\t\t\t\t\t\t\tORDER BY lid DESC\r\n\t\t\t\t\t\t\t\t{$page_arr['limit']}");
$lids = array();
while ($value = DB::fetch($query)) {
$value['datetime'] = date('Y-m-d H:i', $value['starttime']) . ':' . date('Y-m-d H:i', $value['endtime']);
$lids[] = $value['lid'];
$list[$value['lid']] = $value;
}
$guestall = $this->TalkLogic->Getguest($lids);
foreach ($guestall as $key => $val) {
$h = '';
foreach ($val['guest'] as $k => $v) {
$h .= $v['nickname'] . ' ';
}
$list[$key]['guests'] = $h;
}
}
include template('admin/talk_index');
}
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:33,代码来源:talk.mod.php
-
bradtraversy/iweather: Ionic 3 mobile weather app
阅读:1582|2022-08-30
-
joaomh/curso-de-matlab
阅读:1146|2022-08-17
-
魔兽世界怀旧服已经开启两个多月了,但作为一个猎人玩家,抓到“断牙”,已经成为了一
阅读:1001|2022-11-06
-
rugk/mastodon-simplified-federation: Simplifies following and interacting with r
阅读:1078|2022-08-17
-
暑假到了,为了锻炼孩子的写作能力,很多老师都会要求孩子写日记。指导孩子写暑假日记
阅读:837|2022-07-30
-
Tangshitao/Dense-Scene-Matching: Learning Camera Localization via Dense Scene Ma
阅读:758|2022-08-16
-
在Delphi中动态建立数据库结构 刘军发--------------------------------------------
阅读:691|2022-07-18
-
相信不少果粉在对自己的设备进行某些操作时,都会碰到Respring,但这个 Respring 到底
阅读:361|2022-11-06
-
今天看harris角点实现的源码,在某一个版本中看到了这个函数,不是很理解,docordfilt
阅读:518|2022-07-18
-
lightningtgc/MProgress.js: Material Progress —Google Material Design Progress l
阅读:405|2022-08-17
|
请发表评论