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


PHP lazy_get_line函数代码示例

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


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

示例1: get_page_data

 function get_page_data($page_info)
 {
     if ($page_info['page_type'] == 2) {
         $data['u2_data']['cateid'] = $page_info['cateid'];
     }
     if ($page_info['page_type'] == 3) {
         $this->db->select('*')->from('u2_content')->where('id', intval($page_info['pro_id']))->limit('1');
         $pro = lazy_get_line();
         if (!$pro) {
             $data['u2_data']['cateid'] = 0;
             $data['u2_data']['pro_id'] = intval($page_info['pro_id']);
         } else {
             $data['u2_data']['cateid'] = $pro['u2_cate'];
             $data['u2_data']['pro_id'] = intval($page_info['pro_id']);
         }
     }
     $data['u2_link'] = NULL;
     if ($page_info['page_type'] == 4) {
         if (strpos($page_info['page_link'], 'http://') === false) {
             $page_info['page_link'] = 'http://' . $page_info['page_link'];
         }
         if (isset($page_info['new_window'])) {
             $u2_link['new_window'] = $page_info['new_window'];
         }
         $u2_link['link'] = $page_info['page_link'];
         $data['u2_link'] = serialize($u2_link);
     }
     $data['u2_data']['type'] = $page_info['page_type'];
     $data['u2_tag'] = $page_info['page_title'];
     $data['u2_data']['layout'] = $page_info['page_layout'];
     $data['u2_data']['widgets'] = array();
     $data['u2_data'] = serialize($data['u2_data']);
     return $data;
 }
开发者ID:yunsite,项目名称:easysns,代码行数:34,代码来源:riki_model.php

示例2: load_item

 function load_item($id, $actived = 1)
 {
     if ($actived) {
         $this->db->where('u2_is_active', 1);
     }
     $this->db->select('*')->from('u2_content')->where('id', $id)->limit(1);
     return lazy_get_line();
 }
开发者ID:yunsite,项目名称:easysns,代码行数:8,代码来源:pro_model.php

示例3: get_item

 function get_item($id)
 {
     $this->db->select("*")->from('u2_shop_items')->where('id', $id)->where('is_active', 1)->limit(1);
     $line = lazy_get_line();
     if (!$line) {
         return $line;
     }
     if ($line['type'] > 0) {
         $extra = array();
         $check = lazy_get_var("SHOW TABLES LIKE 'shop_extra_" . $line['type'] . "' ");
         if ($check) {
             $extra = lazy_get_line("select * from `shop_extra_" . $line['type'] . "` where `cid` = '{$line['id']}' limit 1 ");
         }
         $line['extra'] = $extra;
     }
     return $line;
 }
开发者ID:yunsite,项目名称:easysns,代码行数:17,代码来源:shop_model.php

示例4: info_page

<?php

if (!is_login()) {
    info_page('请登录后查看');
}
$id = intval(array_shift($args));
$return_page = intval(array_shift($args));
$return_key = intval(array_shift($args));
$item = lazy_get_line("SELECT * FROM `app_iforum_posts` WHERE id = '" . $id . "' AND `parent_id` = '0' AND `is_active` = 1 LIMIT 1");
if (!$item) {
    info_page('错误的参数');
}
$uid = format_uid();
if (!is_admin() && $uid != $item['uid']) {
    info_page('你没有权限进行此操作');
}
$sql = "update `app_iforum_posts` set `is_active` = '0'  where `id` = '" . $id . "' and `parent_id` = '0' ";
lazy_run_sql($sql);
header('Location: /app/native/' . $GLOBALS['app'] . '/index/' . $item['fid'] . '/' . $return_page . '/' . $return_key);
开发者ID:yunsite,项目名称:easysns,代码行数:19,代码来源:post_del.php

示例5: dirname

include_once dirname(__FILE__) . '/function.php';
if (!is_login()) {
    info_page('请登录后查看');
}
$uid = format_uid();
$folder = z(array_shift($args));
$cid = intval(array_shift($args));
$mid = app_config('mid', $folder);
$bind = app_config('bind', $folder);
if (!isset($mid)) {
    info_page('没有此表!');
}
if ($bind['price'] == '' || $bind['price'] <= '0') {
    info_page('价格错误!');
}
foreach ($bind as $k => $v) {
    $selected[] = " `{$v}` as {$k} ";
}
$com = lazy_get_line("SELECT  " . join(',', $selected) . " FROM `app_content_{$mid}` WHERE `id` = '" . intval($cid) . "'");
$cnum = get_count();
if ($cnum == '0') {
    info_page('没有此件物品!');
}
$num = lazy_get_var("SELECT COUNT(*) FROM `app_shopcart` WHERE `cid` = '" . intval($cid) . "' AND `uid` = '" . intval($uid) . "'");
if ($num != '0') {
    lazy_run_sql("UPDATE `app_shopcart` SET `num` = `num`+1 WHERE `cid` = '" . intval($cid) . "' AND `uid` = '" . intval($uid) . "'");
} else {
    lazy_run_sql("INSERT INTO `app_shopcart` ( `uid`, `cid`, `name`, `desp`, `num`, `money`, `date`, `folder` ) VALUES ( '" . intval($uid) . "' , '" . intval($cid) . "' , " . s($com['title']) . " , " . s($com['desp']) . " , '1' , " . s($com['price']) . " , '" . date('Y-m-d H:i:s') . "' , " . s($folder) . " )");
}
header('Location: /app/native/' . $GLOBALS['app']);
开发者ID:yunsite,项目名称:easysns,代码行数:30,代码来源:insert.php

示例6: dirname

<?php

include_once dirname(__FILE__) . '/function.php';
if (!is_login()) {
    info_page('请登录后查看');
}
$id = intval(array_shift($args));
$wid = intval(array_shift($args));
$uid = format_uid();
$order = lazy_get_line("SELECT * FROM `app_shoporder` WHERE `id` = '" . intval($id) . "' AND `enter` = '0' LIMIT 1");
if (!$order) {
    info_page('您没有此条订单');
}
if ($uid != $order['uid']) {
    info_page('您没有权限进行此次操作!');
}
$ware = unserialize($order['ware']);
if (!in_array($ware[$wid], $ware)) {
    info_page('参数错误!');
}
unset($ware[$wid]);
$money_sum = 0;
foreach ($ware as $k => $v) {
    $money_sum = $money_sum + $v['num'] * $v['money'];
}
$money_end = $money_sum * ($agio / 100);
//应付
$stint = $money_sum - $money_end;
//节省
if (!isset($ware) || empty($ware)) {
    lazy_run_sql("DELETE FROM `app_shoporder` WHERE `id` = '" . intval($id) . "'");
开发者ID:yunsite,项目名称:easysns,代码行数:31,代码来源:ware_del.php

示例7: dirname

<?php

include_once dirname(__FILE__) . '/function.php';
if (!is_login()) {
    info_page('请登录后查看');
}
$data = array();
$data['ci_top_title'] = '社区银行';
$tab_type = 'index';
$data['tab_type'] = $tab_type;
$data['tab_array'] = $tab_array;
$data['user'] = lazy_get_line("SELECT * FROM `app_ihome_user` WHERE `uid` = '" . format_uid() . "' LIMIT 1");
$data['account'] = lazy_get_line("SELECT * FROM `app_ibank_account` WHERE `uid` = '" . format_uid() . "' LIMIT 1");
layout($data, 'default', 'app');
开发者ID:yunsite,项目名称:easysns,代码行数:14,代码来源:index.php

示例8: info_page

    info_page('请登录后查看');
}
if (v('email') == NULL) {
    info_page('请输入转账账号');
}
$money = intval(v('money'));
if ($money < 1) {
    info_page('请输入正确的金额');
}
$touid = lazy_get_var("select id from u2_user where u2_email = '" . z(v('email')) . "' ", db());
if (!$touid) {
    info_page('没有此用户');
}
if ($touid == _sess('id')) {
    info_page('不能对自己转账.');
}
$now = lazy_get_var("SELECT g FROM `app_ihome_user` WHERE `uid` = '" . format_uid() . "' LIMIT 1");
if ($now < $money) {
    info_page('你身上没有足够的现金.');
}
$sql = "update app_ihome_user set g = g - {$money} WHERE `uid` = '" . format_uid() . "' LIMIT 1";
lazy_run_sql($sql);
$sql = "select * from app_ibank_account where uid='{$touid}' limit 1";
if (is_array(lazy_get_line($sql))) {
    $sql = "update app_ibank_account set g_count = g_count + {$money} where uid='{$touid}' limit 1 ";
} else {
    ${$key} = $money;
    $sql = "insert into app_ibank_account (uid , g_count , glod_count )values ( '{$touid}','{$money}','0' ) ";
}
lazy_run_sql($sql);
info_page('已成功转账到您的指定的用户.', '/app/native/ibank/transfer');
开发者ID:yunsite,项目名称:easysns,代码行数:31,代码来源:trasave.php

示例9: get_user_info_by_email

 function get_user_info_by_email($email)
 {
     if (!$email) {
         return false;
     }
     $this->db->select('*')->from('u2_user')->where("LCASE(u2_email) = '" . strtolower($email) . "'")->limit('1');
     return lazy_get_line();
 }
开发者ID:yunsite,项目名称:easysns,代码行数:8,代码来源:user_model.php

示例10: info_page

if (!is_login()) {
    info_page('请登录后查看');
}
include_once dirname(__FILE__) . '/function.php';
$id = intval(array_shift($args));
$return_page = intval(array_shift($args));
$return_key = intval(array_shift($args));
$desp = v('desp');
if (!$desp) {
    info_page('回复内容不能为空');
}
$check = lazy_get_line("SELECT * FROM `app_iforum_posts` WHERE id = '{$id}' AND `is_active` = 1 AND `parent_id` = '0' LIMIT 1");
if (!$check) {
    info_page('错误的参数');
}
$forum = lazy_get_line("SELECT * from `app_iforum_status` where `id` = '{$check['fid']}' and `is_active` = '1' limit 1");
if (!$forum) {
    info_page('错误的论坛id');
}
$now = date("Y-m-d H:i:s");
lazy_run_sql("update `app_iforum_posts` set `reply` = `reply` + 1 , `last_post_time` = '{$now}' ,`last_uid` = '" . format_uid() . "' WHERE id = '{$id}' AND `is_active` = 1 AND `parent_id` = '0' LIMIT 1");
global $CI;
$CI->load->database();
$data['fid'] = $check['fid'];
$data['parent_id'] = $id;
$data['title'] = '';
$data['desp'] = r($desp);
$data['floor'] = intval(v('floor'));
$data['last_uid'] = $data['uid'] = format_uid();
$data['last_post_time'] = $data['time'] = $now;
$CI->db->insert('app_iforum_posts', $data);
开发者ID:yunsite,项目名称:easysns,代码行数:31,代码来源:reply.php

示例11: header

<?php

//include_once( dirname( __FILE__ ) . '/function.php'   );
header("Content-Type:text/xml;charset=utf-8");
header("Expires: Thu, 01 Jan 1970 00:00:01 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
if (!is_login()) {
    info_page('请登录后查看');
}
$id = intval(array_shift($args));
$lines = lazy_get_line("SELECT * FROM `app_shopuser` WHERE `id` = '" . intval($id) . "' LIMIT 1");
if (!$lines) {
    echo "0";
    die;
} else {
    $lines = json_encode($lines);
    echo $lines;
    die;
}
开发者ID:yunsite,项目名称:easysns,代码行数:20,代码来源:ajax_shopvote.php

示例12: shop_del_reply

 function shop_del_reply($id)
 {
     if (!is_login()) {
         die('请登陆后操作');
     }
     $id = intval($id);
     $line = lazy_get_line("select * from `u2_shop_replys` where `id` = '{$id}' limit 1 ");
     if (!$line) {
         die('错误的参数');
     }
     if (is_admin() || $line['uid'] == format_uid() && intval($line['ruid']) == 0) {
         lazy_run_sql("delete from `u2_shop_replys` where `id` = '{$id}' limit 1");
     } else {
         die('您没有权限进行此操作');
     }
 }
开发者ID:yunsite,项目名称:easysns,代码行数:16,代码来源:ajax.php

示例13: dirname

<?php

include_once dirname(__FILE__) . '/function.php';
if (!is_login()) {
    info_page('请登录后查看');
}
$cid = intval(v('cid'));
$desp = x(v('con'));
$uid = format_uid();
$com = lazy_get_line("SELECT * FROM `u2_comment` WHERE `id` = '" . intval($cid) . "' limit 1 ");
if (!$com) {
    info_page('没有此条记录!');
}
$tid = $com['tid'];
if (empty($desp)) {
    info_page('回复内容不能为空!');
}
lazy_run_sql("INSERT INTO `u2_comment_reply` ( `mid` ,`cid`, `tid`, `uid`, `content`, `time`) VALUES ( '" . intval($mid) . "','" . intval($cid) . "' , '" . intval($tid) . "' , '" . intval($uid) . "' , " . s($desp) . " , '" . date('Y-m-d H:i:s') . "')");
lazy_run_sql("UPDATE `u2_comment` SET `rcount` = `rcount`+1 WHERE `id` = '" . intval($cid) . "'");
header('Location: /app/native/' . $GLOBALS['app'] . '/com_display/' . $cid . '');
开发者ID:yunsite,项目名称:easysns,代码行数:20,代码来源:reply_save.php

示例14: get_ticket_by_id

 function get_ticket_by_id($id)
 {
     $this->db->select('*')->from('app_iticket_items')->where('id', $id)->limit('1');
     return lazy_get_line();
 }
开发者ID:yunsite,项目名称:easysns,代码行数:5,代码来源:ajax_model.php

示例15: header

header("Content-Type:text/xml;charset=utf-8");
header("Expires: Thu, 01 Jan 1970 00:00:01 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
if (!is_login()) {
    info_page('请登录后查看');
}
if (!is_admin()) {
    info_page('你没有权限进行此次操作!');
}
$id = intval(array_shift($args));
$contents = file_get_contents(dirname(__FILE__) . '/snap.info.txt');
$snap = unserialize($contents);
//
if (isset($snap[$id])) {
    unset($snap[$id]);
    $content = serialize($snap);
    file_put_contents(dirname(__FILE__) . '/snap.info.txt', $content);
    echo '2';
    die;
}
$info = lazy_get_line("SELECT * FROM `app_feed` WHERE `id` = '" . intval($id) . "' LIMIT 1");
if (!$info) {
    echo "error id";
    die;
}
$snap[$id] = $id;
$content = serialize($snap);
file_put_contents(dirname(__FILE__) . '/snap.info.txt', $content);
echo '1';
die;
开发者ID:yunsite,项目名称:easysns,代码行数:31,代码来源:ajax_change_img.php


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