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; }
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(); }
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; }
<?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);
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']);
<?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) . "'");
<?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');
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');
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(); }
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);
<?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; }
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('您没有权限进行此操作'); } }
<?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 . '');
function get_ticket_by_id($id) { $this->db->select('*')->from('app_iticket_items')->where('id', $id)->limit('1'); return lazy_get_line(); }
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;
private function feedig_auto_update() { $ifeed = lazy_get_line("SELECT * FROM `u2_app` WHERE `aid` = 'ifeedig' LIMIT 1"); if ($ifeed) { $ftime = file_get_contents(dirname(__FILE__) . '/feed_auto.txt'); if ($ftime) { $time = date('Y-m-d H:i:s', time() - app_config('update_time', $ifeed['u2_folder'])); if ($time > $ftime) { $info = lazy_get_data("SELECT * FROM `app_feed`"); foreach ($info as $k => $v) { $feed = $v['feed']; $tid = $v['tid']; $id = $v['id']; $state = $v['state']; $fuid = $v['uid']; if (!empty($feed)) { $CI =& get_instance(); $CI->load->library('simplepie'); $CI->simplepie->set_feed_url($feed); $CI->simplepie->init(); $items = $CI->simplepie->get_items(); foreach ($items as $item) { $title = $item->get_title(); // $desp = $item->get_content(); // $link = $item->get_link(); $date = date('Y-m-d H:i:s', strtotime($item->get_date())); $unistring = md5($link) . $date; $itid = lazy_get_var("SELECT `tid` FROM `app_feed_item` WHERE `unistring` = '" . $unistring . "'"); if ($itid > 0) { //update $sql = "UPDATE `app_feed_item` SET `tid` = '" . intval($itid) . "',"; $sql .= " `fid` = '" . intval($id) . "', `title` = " . s($title) . ","; $sql .= "`desp` = " . s($desp) . ",`time` = " . s($date) . ", `link` = " . s($link) . ""; $sql .= "WHERE `unistring` = '" . $unistring . "' LIMIT 1 "; lazy_run_sql($sql); } else { //insert $sql = "INSERT INTO `app_feed_item` (`tid`, `fid`, `title`,"; $sql .= " `desp`, `time`, `link`, `state`, `unistring`, `admin_uid`)"; $sql .= "VALUES ('" . intval($tid) . "', '" . intval($id) . "', " . s($title) . ","; $sql .= " " . s($desp) . ", " . s($date) . " , " . s($link) . ","; $sql .= "'" . $state . "', " . s($unistring) . ", '" . intval($fuid) . "')"; lazy_run_sql($sql); } lazy_run_sql("UPDATE `app_feed` SET `time` = '" . date('Y-m-d H:i:s') . "' WHERE `id` = '" . $id . "'"); } } } file_put_contents(dirname(__FILE__) . '/feed_auto.txt', date('Y-m-d H:i:s')); } } else { file_put_contents(dirname(__FILE__) . '/feed_auto.txt', date('Y-m-d H:i:s')); } } }
die('请登录后查看'); } // $fid = array_shift($args); $user = lazy_get_line("SELECT * FROM `u2_user` WHERE `id` = '" . format_uid() . "' LIMIT 1"); $user['sex'] = $user['u2_sex']; $on = lazy_get_data("SELECT * FROM `app_ihome_cloth_on` WHERE `uid` = '" . format_uid() . "' ORDER BY `cate` ASC LIMIT 20 "); if (is_array($on)) { foreach ($on as $item) { $strs[$item['cate']] = $item['fid']; $fids[] = $item['fid']; } } if ($fid > 0) { // 首先判断是要 $item = lazy_get_line("SELECT * FROM `app_ishop_items` WHERE `fid` = '" . intval($fid) . "' LIMIT 1"); if ($item['fid'] < 1) { die('错误的商品id'); } // 如果已经穿了套装 又选择了 有单件的 裙子 裤子 或者 上衣 if ($strs['5'] && ($item['cate'] == 4 || $item['cate'] == 3 || $item['cate'] == 2 || $item['cate'] == 10)) { lazy_run_sql("DELETE FROM `app_ihome_cloth_on` WHERE `uid` = '" . format_uid() . "' AND `cate` = 5 "); unset($strs['5']); } // 如果已经穿了套装 又选择了 有单件的 裙子 裤子 或者 上衣 或者套装 if ($strs['10'] && ($item['cate'] == 4 || $item['cate'] == 3 || $item['cate'] == 2 || $item['cate'] == 5 || $item['cate'] == 1)) { lazy_run_sql("DELETE FROM `app_ihome_cloth_on` WHERE `uid` = '" . format_uid() . "' AND `cate` = 10 "); unset($strs['10']); } // 裙子 if ($item['cate'] == 4 || $item['cate'] == 3 || $item['cate'] == 5 || $item['cate'] == 10) {
<?php if (!is_login()) { die('请登陆后操作'); } include_once dirname(__FILE__) . '/function.php'; $id = intval(array_shift($args)); $floor = intval(array_shift($args)); $line = lazy_get_line("SELECT * FROM `app_iforum_posts` WHERE id = '{$id}' AND `is_active` = 1 LIMIT 1"); if (!$line) { die('错误的参数'); } $post_uid = $line['parent_id'] ? lazy_get_var("SELECT `uid` FROM `app_iforum_posts` WHERE id = '{$line['parent_id']}' AND `parent_id` = '0' AND `is_active` = 1 LIMIT 1") : $line['uid']; $uid = format_uid(); if (!is_admin() && $uid != $line['uid'] && $uid != $post_uid) { die('你没有权限进行此操作'); } $del_uid = $uid; lazy_run_sql("update `app_iforum_posts` set `del_uid` = '{$uid}' WHERE id = '{$id}' LIMIT 1 "); echo '成功删除文章'; $name = $uid == $post_uid ? '楼主' : ($uid == $line['uid'] ? '发布者' : '管理员'); $js_data[] = '$("display_img_' . $id . '").setHTML("")'; $js_data[] = '$("display_info_' . $id . '").setHTML(\'<span class="r">' . show_floor($floor) . '</span><del>该楼已被' . $name . '删除</del>\')'; echo '<script>' . join(';', $js_data) . ';</script>'; ?>
<?php //include_once( dirname( __FILE__ ) . '/function.php' ); $mid = app_config('mid'); if (!is_login()) { info_page('请登录后查看'); } $id = intval(array_shift($args)); $num = intval(array_shift($args)); $uid = format_uid(); $shop_line = lazy_get_line("SELECT * FROM `app_shopcart` WHERE `id` = '" . intval($id) . "' LIMIT 1"); if (!$shop_line) { die('error_id'); } if ($shop_line['uid'] != $uid) { die('error_user'); } if ($num == '0' || empty($num)) { die('0'); } else { lazy_run_sql("UPDATE `app_shopcart` SET `num` = '" . intval($num) . "' WHERE `id` = '" . intval($id) . "' AND `uid` = '" . intval($uid) . "'"); echo $num; die; }
<?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"); if (!$data['user']) { $sql = "insert into app_ihome_user ( uid,g,gold,hp,hp_max )values('" . format_uid() . "','0','0','0','0') "; lazy_run_sql($sql); } layout($data, 'default', 'app');
<?php if (!is_login()) { die('请登陆后操作!'); } include_once dirname(__FILE__) . '/function.php'; $id = array_shift($args); $uid = format_uid(); $js_data = array(); $use = '装备'; $count = lazy_get_var("select `count` from `global_user_items` where `uid` = '{$uid}' and `iid` = '{$id}' limit 1"); if ($count < 1) { die('你没有此物品'); } $item = lazy_get_line("select * FROM `global_items` WHERE `id` = '{$id}' limit 1 "); if (!$item) { die('没有找道具资料'); } //装备检查 $weared = lazy_get_var("select count(*) from `global_items_carry` where `iid`='{$id}' and `uid` = '{$uid}' "); if ($weared) { die('你已经携带了此道具'); } $weared_count = lazy_get_var("select count(*) from `global_items_carry` where `uid` = '{$uid}' "); if ($weared_count >= 5) { die('你已经不能再携带东西了'); } if ($count == '1') { lazy_run_sql("DELETE FROM `global_user_items` WHERE `uid` ='{$uid}' and `iid` = '{$id}' limit 1 "); $js_data[] = '$("item_' . $id . '").remove()'; $js_data[] = '$("baggage_count").value =parseInt($("baggage_count").value) - 1 ';
<?php include_once dirname(__FILE__) . '/function.php'; $data['ci_top_title'] = '修改' . app_config('model_name') . '评论'; if (!is_login()) { info_page('请登录后查看!'); } $cid = intval(array_shift($args)); $uid = format_uid(); $data['com'] = $com = lazy_get_line("SELECT sql_calc_found_rows * FROM `u2_comment` WHERE `id` = '" . intval($cid) . "' "); $num = get_count(); if ($com['uid'] != $uid) { info_page('你没有权限进行此操作!'); } if ($num == '0') { info_page('参数错误!'); } layout($data, 'default', 'app');
function pic() { $data['ci_top_title'] = '效果图'; $args = func_get_args(); if (!isset($args[0])) { info_page('组件ID不能为空!'); } $pid = intval($args[0]); $tid = isset($args[1]) && intval($args[1]) != '' ? $args[1] : 1; if ($tid == '1') { $sql = "SELECT `name`,`big_pic` FROM `u2_plugs` WHERE `id` = '" . $pid . "' LIMIT 1"; } else { $sql = "SELECT `name`,`big_pic` FROM `u2_plugs_widget` WHERE `id` = '" . $pid . "' LIMIT 1"; } $item = lazy_get_line($sql); if (!$item) { info_page('组件ID错误!'); } $data['item'] = $item; $this->view('pic', $data); }
<?php include_once dirname(__FILE__) . '/function.php'; if (!is_login()) { info_page('请登录后查看'); } $fid = intval(array_shift($args)); $tab_type = array_shift($args); $tab_type = !$tab_type ? 'basic' : $tab_type; $fid = $fid < 1 ? 1 : $fid; $data = array(); $data['forum'] = lazy_get_line("SELECT * from `app_iforum_status` where `id` = '{$fid}' and `is_active` = '1' limit 1"); if (!$data['forum']) { info_page('错误的论坛id'); } $data['fid'] = $fid; $data['ci_top_title'] = '修改论坛'; $data['cates'] = iforum_get_cates($fid); $data['tab_type'] = $tab_type; $data['tab_array'] = array('basic' => '基础设置', 'cates' => '分类设置'); layout($data, 'default', 'app');
function hp_cron_jobs() { if (is_login()) { $sql = "SELECT * FROM `app_ihome_user` WHERE `uid` = '" . format_uid() . "' LIMIT 1"; $line = lazy_get_line($sql); if ($line['uid'] > 0) { if ($line['hp'] < $line['hp_max']) { $sql = "UPDATE `app_ihome_user` SET `hp` = `hp` + 1 WHERE `uid` = '" . format_uid() . "' LIMIT 1"; lazy_run_sql($sql); } } } }
function get_shop_draft_item() { $uid = format_uid(); $this->db->select('*')->from('u2_shop_items')->where('is_active', '0')->where('uid', $uid)->limit(1); $line = lazy_get_line(); if (!$line) { $data = array(); $data['is_active'] = 0; $data['uid'] = $uid; $data['time'] = date("Y-m-d H:i:s"); $this->db->insert('u2_shop_items', $data); //$data['id'] = $this->db->insert_id(); $this->db->select('*')->from('u2_shop_items')->where('is_active', '0')->where('uid', $uid)->limit(1); $line = lazy_get_line(); } return $line; }
<?php include_once dirname(__FILE__) . '/function.php'; if (!is_login()) { info_page('请登录后查看'); } $cid = intval(array_shift($args)); $uid = format_uid(); $lines = lazy_get_line("SELECT sql_calc_found_rows `tid` FROM `u2_comment` WHERE `id` = '" . intval($cid) . "' AND `uid` = '" . intval($uid) . "'"); $num = get_count(); if ($num == '0') { info_page('你没有权限进行此次操作或参数错误!'); } lazy_run_sql("DELETE FROM `u2_comment_vote` WHERE `cid` = '" . intval($cid) . "'"); lazy_run_sql("DELETE FROM `u2_comment_reply` WHERE `cid` = '" . intval($cid) . "'"); lazy_run_sql("DELETE FROM `u2_comment` WHERE `id` = '" . intval($cid) . "'"); lazy_run_sql("UPDATE `app_content_{$mid}` SET `comnum` = `comnum`-1 WHERE `id` = '" . intval($tid) . "'"); header('Location: /app/native/' . $GLOBALS['app'] . '/display/' . $lines['tid'] . ''); die; ?>
function get_form_info_by_id($fid) { $this->db->select('*')->from('w2_form')->where('id', $fid)->limit(1); return lazy_get_line(); }
if (!is_login()) { info_page('请登录后查看'); } $data = array(); $data['ci_top_title'] = '邀请好友'; $tab_type = 'index'; $data['type'] = array_shift($args); $data['tab_type'] = $tab_type; $data['tab_array'] = $tab_array; if ($data['type'] == 'link') { if (c('register_is_open')) { $show = '<input id="show_link" name="show_link" value="http://' . $_SERVER['HTTP_HOST'] . '/user/register/invuid/' . format_uid() . '" class="text" style="width:300px;"> <input type="button" value="复制" class="button" onclick="app_copy_value(\'show_link\')">'; } elseif (c('invite_active')) { $invite = lazy_get_line("select * from u2_invite where u2_is_use = '0' and u2_uid = '" . format_uid() . "' and u2_is_copied = '0' limit 1 "); if (!$invite) { $CI =& get_instance(); $CI->load->model('Invite_model', 'invite', TRUE); $CI->invite->buy(1); $invite = lazy_get_line("select id , u2_invite_code from u2_invite where u2_uid = '" . format_uid() . "' and u2_is_use = '0' and u2_is_copied = '0' LIMIT 1 "); } $icode = $invite['u2_invite_code']; $show = '<input id="show_link" name="show_link" value="http://' . $_SERVER['HTTP_HOST'] . '/gate/index/' . $icode . '" class="text" style="width:300px;"> <input type="button" value="复制" class="button" onclick="app_copy_icode_link(\'' . $invite['id'] . '\')">'; } else { $show = '对不起,目前本网站禁止注册'; } $data['show'] = $show; } layout($data, 'default', 'app'); ?>