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


PHP lazy_get_data函数代码示例

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


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

示例1: get_iforum_originate_data

function get_iforum_originate_data($para = NULL)
{
    $uid = format_uid();
    $para = unserialize($para);
    $data['title'] = isset($para['title']) && strip_tags($para['title']) != '' ? strip_tags($para['title']) : '我发起的';
    $data['num'] = $num = isset($para['num']) && intval($para['num']) > 0 ? intval($para['num']) : 5;
    $data['new_page'] = isset($para['new_page']) && intval($para['new_page']) > 0 ? intval($para['new_page']) : 0;
    $days = isset($para['days']) && intval($para['days']) > 0 ? intval($para['days']) : 0;
    if ($days == 0 || $days == '') {
        $days = NULL;
    } else {
        $day = date('Y-m-d H:i:s', strtotime(' - ' . $days . ' days '));
        $days = " AND `time` > '{$day}' ";
    }
    $list = lazy_get_data("SELECT * FROM `app_iforum_posts`  WHERE `parent_id` = '0' AND `is_active` = '1' AND `uid` = '" . intval($uid) . "' {$days} ORDER BY `time` DESC LIMIT 0 , {$num}");
    if ($list) {
        foreach ($list as $v) {
            $uids[$v['uid']] = $v['uid'];
            $uids[$v['last_uid']] = $v['last_uid'];
        }
        $data['names'] = get_name_by_uids($uids);
    }
    $data['list'] = $list;
    return $data;
}
开发者ID:yunsite,项目名称:easysns,代码行数:25,代码来源:code.php

示例2: get_system_activeuser_data

function get_system_activeuser_data($para = NULL)
{
    $uid = format_uid();
    $para = unserialize($para);
    $data['title'] = isset($para['title']) && strip_tags($para['title']) != '' ? strip_tags($para['title']) : '活跃会员';
    $days = isset($para['days']) && intval($para['days']) > 0 ? intval($para['days']) : 0;
    $data['linenum'] = isset($para['linenum']) && intval($para['linenum']) > 0 ? intval($para['linenum']) : 3;
    $data['aid'] = $aid = strip_tags($para['aid']) != '' ? strip_tags($para['aid']) : 'all';
    if ($aid == 'all') {
        $where = "WHERE 1";
    } else {
        $where = "WHERE `u2_app_aid` = '" . $aid . "'";
    }
    if ($days == 0 || $days == '') {
        $days = NULL;
    }
    $day = date('Y-m-d H:i:s', strtotime('- ' . $days . ' days'));
    $days = "AND `u2_time` > '" . $day . "'";
    $feed = lazy_get_data("SELECT *,COUNT(`u2_action`) AS `num` FROM `u2_mini_feed` {$where} {$days} GROUP BY `u2_uid` ORDER BY `num` DESC");
    if ($feed) {
        foreach ($feed as $k => $v) {
            $uids[] = $v['u2_uid'];
        }
        //print_r( $uids );
        $data['users'] = lazy_get_data("SELECT * FROM `u2_user` WHERE `id` IN (" . join(',', $uids) . ")");
    }
    return $data;
}
开发者ID:yunsite,项目名称:easysns,代码行数:28,代码来源:code.php

示例3: get_iforum_restore_data

function get_iforum_restore_data($para = NULL)
{
    $uid = format_uid();
    $para = unserialize($para);
    $data['title'] = isset($para['title']) && strip_tags($para['title']) != '' ? strip_tags($para['title']) : '我回复的';
    $limit = isset($para['limit']) && intval($para['limit']) > 0 ? intval($para['limit']) : 5;
    $data['new_page'] = isset($para['new_page']) && intval($para['new_page']) > 0 ? intval($para['new_page']) : 0;
    $days = isset($para['days']) && intval($para['days']) > 0 ? intval($para['days']) : 0;
    if ($days == 0 || $days == '') {
        $days = NULL;
    } else {
        $day = date('Y-m-d H:i:s', strtotime(' - ' . $days . ' days '));
        $days = " AND `time` > '{$day}' ";
    }
    $uids = lazy_get_vars("SELECT `parent_id` FROM `app_iforum_posts`  WHERE `parent_id` > 0 AND `uid` = '" . intval($uid) . "' AND `del_uid` = '0' {$days} GROUP BY `parent_id` ORDER BY `id` DESC LIMIT  {$limit}");
    $list = array();
    if ($uids) {
        $list = lazy_get_data("SELECT * FROM `app_iforum_posts` WHERE `id` IN (" . join(',', $uids) . ") and `parent_id` = 0 AND `is_active` = '1' ORDER BY `last_post_time` DESC LIMIT {$limit}");
        foreach ($list as $v) {
            $uids[$v['uid']] = $v['uid'];
            $uids[$v['last_uid']] = $v['last_uid'];
        }
        $data['names'] = get_name_by_uids($uids);
    }
    $data['list'] = $list;
    return $data;
}
开发者ID:yunsite,项目名称:easysns,代码行数:27,代码来源:code.php

示例4: plist

 function plist($cid, $start, $limit)
 {
     if ($cid > 0) {
         $this->db->select('*')->from('u2_content')->where('u2_cate', $cid)->where('u2_is_active', 1)->orderby('id', 'DESC')->limit($limit, $start);
     } else {
         $this->db->select('*')->from('u2_content')->where('u2_is_active', 1)->orderby('id', 'DESC')->limit($limit, $start);
     }
     return lazy_get_data();
 }
开发者ID:yunsite,项目名称:easysns,代码行数:9,代码来源:pro_model.php

示例5: get_system_newuser_data

function get_system_newuser_data($para = NULL)
{
    $para = unserialize($para);
    $limit = isset($para['limit']) && intval($para['limit']) > 0 ? intval($para['limit']) : 9;
    $cpl = isset($para['cpl']) && intval($para['cpl']) > 0 ? intval($para['cpl']) : 3;
    $data['title'] = (isset($para['title']) && strip_tags($para['title'])) != '' ? strip_tags($para['title']) : 'New Members';
    $CI =& get_instance();
    $CI->db->select('*')->from('u2_user')->orderby('id', 'desc')->limit($limit);
    $data['members'] = array_chunk(lazy_get_data(), $cpl);
    return $data;
}
开发者ID:yunsite,项目名称:easysns,代码行数:11,代码来源:code.php

示例6: iforum_get_cates

function iforum_get_cates($fid)
{
    $cates = array();
    $list = lazy_get_data("select * from app_iforum_cate where fid = '{$fid}' order by `key` ");
    if ($list) {
        foreach ($list as $v) {
            $cates[$v['key']] = $v;
        }
    }
    return $cates;
}
开发者ID:yunsite,项目名称:easysns,代码行数:11,代码来源:function.php

示例7: index

 function index()
 {
     //$data = array();
     $data['ci_top_title'] = '微件列表';
     $args = func_get_args();
     if (isset($args[2])) {
         $search = strip_tags(trim($args[2]));
         $search = urldecode($search);
     } else {
         $search = strip_tags(trim(v('search')));
     }
     $data['search'] = $search;
     $type = intval(v('type'));
     if ($args) {
         $mid = intval($args[0]);
     }
     if (!isset($mid) || $mid == '') {
         $mid = $type;
     }
     //
     if ($mid == '0') {
         $where = " AND `name` LIKE '%" . $search . "%' ";
         //$data['name'] = '全部范围';
     } elseif ($mid > '0') {
         $where = " AND `mid` = '" . intval($mid) . "' AND `name` LIKE '%" . $search . "%'";
         $name = lazy_get_var("SELECT `name` FROM `u2_plugs` WHERE 1 AND `id` = '" . intval($mid) . "'");
         if (!$name) {
             info_page('错误的组件ID');
         }
     } else {
         info_page('错误的组件ID');
     }
     $data['mid'] = $mid;
     $data['plugs_name'] = lazy_get_data("SELECT * FROM `u2_plugs`");
     $data['page'] = $page = !isset($args[1]) || intval($args[1]) < 1 ? 1 : intval($args[1]);
     $limit = 5;
     $start = ($page - 1) * $limit;
     $item = lazy_get_data("SELECT sql_calc_found_rows * FROM `u2_plugs_widget` WHERE 1 {$where} ORDER BY `id` DESC  LIMIT {$start},{$limit}");
     $all = get_count();
     $data['item'] = $item;
     //$type = urlencode( $type );
     $base = '/plugs/index/' . $mid;
     $page_all = ceil($all / $limit);
     $text = urlencode($search);
     $data['pager'] = get_pager($page, $page_all, $base, $text);
     $data['is_admin'] = is_admin() ? true : false;
     $domain = _sess('domain');
     if ($domain != '') {
         $data['domain'] = $domain;
     }
     $this->view('list', $data);
 }
开发者ID:yunsite,项目名称:easysns,代码行数:52,代码来源:plugs.php

示例8: get_system_news_data

function get_system_news_data($para = NULL)
{
    $para = unserialize($para);
    $data['title'] = isset($para['title']) && strip_tags($para['title']) != '' ? strip_tags($para['title']) : '新鲜事';
    $days = isset($para['days']) && intval($para['days']) > 0 ? intval($para['days']) : 0;
    $limit = isset($para['limit']) && intval($para['limit']) > 0 ? intval($para['limit']) : 10;
    $where = NULL;
    if ($days > 0) {
        $where = " where `u2_time` > '" . date("Y-m-d", strtotime(" - {$days} days")) . "' ";
    }
    $data['items'] = lazy_get_data("select * from `u2_mini_feed` {$where} order by `id` desc limit {$limit} ");
    return $data;
}
开发者ID:yunsite,项目名称:easysns,代码行数:13,代码来源:code.php

示例9: get_friends_by_uid

function get_friends_by_uid($uid = NULL)
{
    $uid = format_uid($uid);
    $where = "(`u2_uid1` = '" . $uid . "'  AND `is_active` = '1' )OR( `u2_uid2` = '" . $uid . "' AND `is_active` = '1')";
    $sql = "SELECT * FROM `u2_fans` where {$where} LIMIT 500 ";
    $fans = lazy_get_data($sql);
    $fid = array();
    if (isset($fans[0]) && is_array($fans[0])) {
        foreach ($fans as $f) {
            if ($f['u2_uid1'] == $uid) {
                $fid[] = $f['u2_uid2'];
            } else {
                $fid[] = $f['u2_uid1'];
            }
        }
    }
    return $fid;
}
开发者ID:yunsite,项目名称:easysns,代码行数:18,代码来源:function.php

示例10: index

 function index()
 {
     set_time_limit(0);
     $limit = 1000;
     $step = 11;
     $start = ($step - 1) * $limit;
     $sql = "SELECT DISTINCT cid FROM `app_icase_pictures` limit {$start},{$limit} ";
     $temp = lazy_get_data($sql);
     $this->load->database();
     if ($temp) {
         foreach ($temp as $v) {
             $data['id'] = $v['cid'];
             $this->db->insert('temp', $data);
         }
     }
     $step++;
     echo $step;
     die;
 }
开发者ID:yunsite,项目名称:easysns,代码行数:19,代码来源:box.php

示例11: get_state_html_by_id

function get_state_html_by_id($id)
{
    $mid = intval(app_config('mid'));
    $html = NULL;
    $votes = array();
    $state = app_config('model_state');
    $keys = array();
    if ($state) {
        $app = explode('|', $state);
        $i = 0;
        foreach ($app as $v) {
            $v = trim($v);
            if ($v) {
                $keys[] = " `text` = '{$v}' ";
            }
        }
    }
    if ($keys) {
        $first = trim($app[0]);
        $data = lazy_get_data("select `text` , count(*) as c from `u2_vote` where(" . join('or', $keys) . ") and `tid` = '{$id}' and `mid` = '{$mid}' group by `text` ");
        if ($data) {
            $html .= '<h5 class="w2">谁' . $first . '这' . app_config('model_name') . '</h5><br/>';
            foreach ($data as $v) {
                if ($v['text'] == $first) {
                    $uids = lazy_get_vars("select `uid` from `u2_vote` where `text` = '{$first}' and `tid` = '{$id}' and `mid` = '{$mid}' limit 3 ");
                    $names = get_name_by_uids($uids);
                    foreach ($uids as $v) {
                        $html .= '<div class="app_user_div"><center><a href="/user/space/' . $v . '" target="_blank"><img src="' . show_user_icon('normal', $v) . '" class="icon" /><br/>' . $names[$v]['u2_nickname'] . '</a></center></div>';
                    }
                    $html .= '<br clear="all"/>';
                    if ($v['c'] > 3) {
                        $html .= '<a href="/app/native/' . $GLOBALS['app'] . '/votepeople/' . $id . '/' . urlencode($first) . '"> > 还有' . ($v['c'] - 3) . '人' . $first . '</a><br/>';
                    }
                } else {
                    $html .= '<a href="/app/native/' . $GLOBALS['app'] . '/votepeople/' . $id . '/' . urlencode($v['text']) . '"> > ' . $v['c'] . '人' . $v['text'] . '</a><br/>';
                }
            }
        }
    }
    return $html;
}
开发者ID:yunsite,项目名称:easysns,代码行数:41,代码来源:function.php

示例12: get_system_plugs_data

function get_system_plugs_data($para = NULL)
{
    $para = unserialize($para);
    $page = 1;
    if (isset($para['args'])) {
        $page = intval(array_shift($para['args']));
    }
    $page = $page < 1 ? 1 : $page;
    $data['title'] = isset($para['title']) && strip_tags($para['title']) != '' ? strip_tags($para['title']) : '组件';
    $limit = isset($para['limit']) && intval($para['limit']) > 0 ? intval($para['limit']) : 5;
    $start = ($page - 1) * $limit;
    $data['lines'] = 4;
    $apps = lazy_get_data("SELECT sql_calc_found_rows * FROM `u2_plugs` WHERE `is_active` = 1 ORDER BY `has_widget` DESC LIMIT {$start},{$limit} ");
    $all = get_count();
    $wid = intval($GLOBALS['widget_id']);
    $page_all = ceil($all / $limit);
    $data['pager'] = get_widget_pager($wid, $page, $page_all);
    if ($apps) {
        foreach ($apps as $k => $v) {
            $aids[$v['aid']] = $v['aid'];
            $uids[$v['uid']] = $v['uid'];
        }
        if ($uids) {
            $data['names'] = get_name_by_uids($uids);
        }
        $data['aids'] = $aids;
        $data['apps'] = $apps;
    }
    $wids = lazy_get_data("SELECT * FROM `u2_plugs_widget`");
    if ($wids) {
        $data['wids'] = $wids;
    }
    $domain = _sess('domain');
    if ($domain != '') {
        $data['domain'] = $domain;
    }
    if (is_login()) {
        $data['is_login'] = true;
    }
    return $data;
}
开发者ID:yunsite,项目名称:easysns,代码行数:41,代码来源:code.php

示例13: get_iforum_hit_data

function get_iforum_hit_data($para = NULL)
{
    $uid = format_uid();
    $para = unserialize($para);
    $limit = isset($para['limit']) && intval($para['limit']) > 0 ? intval($para['limit']) : 5;
    $type = isset($para['type']) && intval($para['type']) != '' ? intval($para['type']) : 1;
    $data['new_page'] = isset($para['new_page']) && intval($para['new_page']) > 0 ? intval($para['new_page']) : 0;
    $days = isset($para['days']) && intval($para['days']) > 0 ? intval($para['days']) : 0;
    if ($days == 0 || $days == '') {
        $days = NULL;
    } else {
        $day = date('Y-m-d H:i:s', strtotime(' - ' . $days . ' days '));
        $days = " AND `time` > '{$day}' ";
    }
    if (isset($para['title']) && strip_tags($para['title']) != '') {
        $data['title'] = strip_tags($para['title']);
    } else {
        if ($type == 2) {
            $data['title'] = '回复最多的';
        } else {
            $data['title'] = '点击最多的';
        }
    }
    if ($type == 2) {
        $at = "ORDER BY `app_iforum_posts`.`reply` DESC";
    } else {
        $at = "ORDER BY `app_iforum_posts`.`hit` DESC";
    }
    $list = lazy_get_data("SELECT * FROM `app_iforum_posts` WHERE `parent_id` = '0' AND `is_active` = '1' {$days} {$at} LIMIT {$limit}");
    if ($list) {
        foreach ($list as $v) {
            $uids[$v['uid']] = $v['uid'];
            $uids[$v['last_uid']] = $v['last_uid'];
        }
        $data['names'] = get_name_by_uids($uids);
    }
    $data['list'] = $list;
    return $data;
}
开发者ID:yunsite,项目名称:easysns,代码行数:39,代码来源:code.php

示例14: get_shop_orders

 function get_shop_orders($start = 0, $limit = 10)
 {
     $this->db->select('sql_calc_found_rows *')->from('app_shoporder')->orderby('id', 'desc')->limit($limit, $start);
     return lazy_get_data();
 }
开发者ID:yunsite,项目名称:easysns,代码行数:5,代码来源:admin_model.php

示例15: array_shift

$data['fselect'] = $titles;
$view = array_shift($args);
if ($view == 'add') {
    $data['view'] = 'add';
}
//分类ID
$tnum = intval($view);
if ($tnum != '0') {
    if (!in_array($tnum, $tits)) {
        info_page('错误的分类');
    }
    $where = "AND `tid` = '" . intval($tnum) . "'";
    $data['tnum'] = $tnum;
}
//待处理
$waiting = lazy_get_data("SELECT * FROM `app_feed_recommend` ORDER BY `timeline` DESC LIMIT 30 ");
if ($waiting) {
    $data['content'] = $content = $waiting;
    foreach ($content as $k => $v) {
        $uids[] = $v['uid'];
        $times[$v['id']] = time2Units($v['timeline']);
    }
    $data['unames'] = get_name_by_uids($uids);
    $data['waiting'] = $waiting;
    $data['times'] = $times;
}
//列表
$data['list'] = lazy_get_data("SELECT * FROM `app_feed` WHERE 1 {$where} ORDER BY `time` DESC");
$files = @file_get_contents(dirname(__FILE__) . '/snap.info.txt');
$data['snap'] = unserialize($files);
layout($data, 'default', 'app');
开发者ID:yunsite,项目名称:easysns,代码行数:31,代码来源:feed.php


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