function blog_read_base($fields = "*", $condition = "", $get_type = "", $num = "", $by_col = "log_id", $order = "desc", $cache = "", $cache_key = "") { global $tablePreStr; global $page_num; global $page_total; global $is_self; $is_pass = '******'; $is_admin = get_sess_admin(); $t_blog = $tablePreStr . "blog"; $result_rs = array(); $dbo = new dbex(); dbplugin('r'); $limit = $num ? " limit {$num} " : ""; $by_col = $by_col ? " {$by_col} " : " log_id "; $order = $order ? $order : "desc"; $get_type = $get_type == 'getRow' ? "getRow" : "getRs"; $is_pass = $is_self == 'Y' || $is_admin ? '1' : $is_pass; $sql = " select {$fields} from {$t_blog} where {$is_pass} {$condition} order by {$by_col} {$order} {$limit} "; if (empty($result_rs)) { if ($limit == '') { $dbo->setPages(20, $page_num); } $result_rs = $dbo->{$get_type}($sql); $page_total = $dbo->totalPage; } return $result_rs; }
function plugins_set_mine($id, $is_del = 0) { $id = intval($id); $is_del = intval($is_del); $val = ''; $uid = get_sess_userid(); global $tablePreStr; $t_users = $tablePreStr . "users"; $t_plugins = $tablePreStr . "plugins"; $result_rs = array(); $dbo = new dbex(); dbplugin('r'); $u_apps = get_sess_apps(); if ($is_del == 0) { if ($u_apps == '') { $val = $id; } else { $val = $u_apps . "," . $id; } } else { $val = str_replace(",{$id},", "", ",{$u_apps},"); } $sql = " update {$t_users} set use_apps = '{$val}' where user_id = {$uid} "; if ($dbo->exeUpdate($sql)) { set_sess_apps($val); if ($is_del == 0) { $sql = " update {$t_plugins} set use_num=use_num+1 where id={$id} "; } else { $sql = " update {$t_plugins} set use_num=use_num-1 where id={$id} "; } return $dbo->exeUpdate($sql); } else { return 0; } }
function msgboard_read_base($fields = "*", $condition = "", $get_type = "", $num = "", $by_col = "mess_id", $order = "desc", $cache = "", $cache_key = "") { global $tablePreStr; global $page_num; global $page_total; global $cachePages; $t_msgboard = $tablePreStr . "msgboard"; $result_rs = array(); $dbo = new dbex(); dbplugin('r'); $limit = $num ? " limit {$num} " : ""; $by_col = $by_col ? " {$by_col} " : " mess_id "; $order = $order ? $order : "desc"; $get_type = $get_type == 'getRow' ? "getRow" : "getRs"; $sql = " select {$fields} from {$t_msgboard} where {$condition} order by {$by_col} {$order} {$limit} "; /* 可以加入缓存机制 */ if (empty($result_rs)) { if ($limit == '') { $dbo->setPages(20, $page_num); } $result_rs = $dbo->{$get_type}($sql); $page_total = $dbo->totalPage; } return $result_rs; }
function msgboard_set($to_user_id) { global $tablePreStr; $dbo = new dbex(); dbplugin('w'); $t_message = $tablePreStr . "msgboard"; $sql = "update {$t_message} set readed=1 where to_user_id='{$to_user_id}'"; $dbo->exeUpdate($sql); }
function scrip_send($sender, $title, $content, $to_id, $scrip_id = '') { global $tablePreStr; $uid = get_sess_userid(); $uico = get_sess_userico(); $t_scrip = $tablePreStr . "msg_inbox"; $dbo = new dbex(); dbplugin('w'); $sql = "insert into {$t_scrip} (mess_title,mess_content,from_user,from_user_ico,user_id,add_time,from_user_id,mesinit_id)" . "value('{$title}','{$content}','{$sender}','{$uico}',{$to_id},NOW(),{$uid},'{$scrip_id}')"; return $dbo->exeUpdate($sql); }
function user_get_user_point($user_id) { global $tablePreStr; $t_users = $tablePreStr . "users"; $result_rs = array(); $dbo = new dbex(); dbplugin('r'); $sql = "select user_point from {$t_users} where user_id={$user_id}"; $result_rs = $dbo->getRow($sql); return $result_rs['user_point']; }
function user_self_by_total() { global $tablePreStr; $t_user = $tablePreStr . "users"; $result_rs = array(); $dbo = new dbex(); dbplugin('r'); $sql = "select count(*) as total from {$t_user}"; $result_rs = $dbo->getRow($sql); return $result_rs['total']; }
function user_set_update_user_point($user_id, $user_point) { global $tablePreStr; $t_users = $tablePreStr . "users"; $result_rs = array(); $dbo = new dbex(); dbplugin('w'); //update isns_users set user_point=2000 where user_id=1; $sql = "update {$t_users} set user_point={$user_point} where user_id={$user_id}"; $result_rs = $dbo->exeUpdate($sql); return $result_rs; }
function money_set_add_user_money($user_id, $consume_point, $exchange_datetime, $exchange_money) { global $tablePreStr; $t_money = $tablePreStr . "money"; $result_rs = array(); $dbo = new dbex(); dbplugin('w'); //insert into isns_money (user_id, consume_point, exchange_datetime, exchange_money) value (1, 10, '2015-08-11 15:55:23', 33); $sql = "insert into {$t_money} (user_id, consume_point, exchange_datetime, exchange_money) \n\t\t\tvalue ({$user_id}, {$consume_point}, '{$exchange_datetime}', {$exchange_money})"; $result_rs = $dbo->exeUpdate($sql); return $result_rs; }
function code_exists() { $is_admin = ''; $sendor_id = ''; $admin_id = get_session('admin_id'); if ($admin_id) { $is_admin = 1; $sendor_id = $admin_id; } else { $user_id = get_sess_userid(); if (!$user_id) { return false; exit; } $is_admin = 0; $sendor_id = $user_id; } if ($sendor_id != '' && $is_admin !== '') { global $inviteCodeValue; global $tablePreStr; global $inviteCodeLength; $t_invite_code = $tablePreStr . "invite_code"; $t_users = $tablePreStr . "users"; if ($is_admin == 0) { $user_info = api_proxy('user_self_by_uid', 'integral', $sendor_id); $intg = $user_info['integral']; if ($inviteCodeValue > $intg) { return false; } } $dbo = new dbex(); dbplugin('r'); $invite_code = randkeys($inviteCodeLength); $sql = "select id from {$t_invite_code} where code_txt='{$invite_code}'"; $is_exists = $dbo->getRow($sql); if ($is_exists['id']) { code_exists(); } else { $time = time(); $sql = "insert into {$t_invite_code} (sendor_id,code_txt,is_admin,add_time) values({$sendor_id},'{$invite_code}',0,{$time})"; $success = $dbo->exeUpdate($sql); if ($success) { if ($is_admin == 0) { $sql = "update {$t_users} set integral=integral-{$inviteCodeValue} where user_id={$sendor_id}"; $dbo->exeUpdate($sql); } return $invite_code; } else { return false; } } } }
function blog_sort_by_uid($id) { global $tablePreStr; $t_blog = $tablePreStr . "blog_sort"; $id = intval($id); $result_rs = array(); $dbo = new dbex(); dbplugin('r'); $sql = " select * from {$t_blog} where user_id = {$id} "; $result_rs = $dbo->getRs($sql); return $result_rs; }
function pals_sort($uid = '') { $uid = intval($uid); if ($uid == 0) { $uid = get_sess_userid(); } global $tablePreStr; $t_pals_sort = $tablePreStr . "pals_sort"; $result_rs = array(); $dbo = new dbex(); dbplugin('r'); $sql = " select * from {$t_pals_sort} where user_id={$uid} "; $result_rs = $dbo->getALL($sql); return $result_rs; }
function scrip_notice_get($fields = "*", $num = "", $condition = "") { global $tablePreStr; global $page_num; global $page_total; $fields = filt_fields($fields); $uid = get_sess_userid(); $t_scrip = $tablePreStr . "msg_inbox"; $result_rs = array(); $dbo = new dbex(); dbplugin('r'); $sql = " select {$fields} from {$t_scrip} where user_id = {$uid} and mesinit_id='' {$condition} order by mess_id desc "; $dbo->setPages(20, $page_num); $result_rs = $dbo->getRs($sql); $page_total = $dbo->totalPage; return $result_rs; }
function check_pri($holder, $exp = '') { $sess_uid = get_sess_userid(); $is_admin = get_sess_admin(); if ($sess_uid != $holder && !$is_admin) { if ($exp) { if (!$sess_uid) { return false; } if ($exp == '!all') { //全否定 return false; } if (strpos(",{$exp}", "{")) { //限定人 $per_str = preg_replace("/{([,\\d]+)}/", "\$1", $exp); if (strpos(",{$per_str}", ",{$sess_uid},")) { return true; } } if (strpos(",{$exp}", "[")) { //限定组 $sort_str = preg_replace("/\\[([,\\d]+)\\]/", "\$1", $exp); global $dbo; global $tablePreStr; global $dbServs; if (!$dbo) { $dbo = new dbex(); dbplugin('r'); } $table = $tablePreStr . "pals_mine"; $sql = "select pals_sort_id from {$table} where pals_id={$sess_uid} and user_id={$holder}"; $sort_id = $dbo->getRow($sql); $sess_sort_id = $sort_id['pals_sort_id']; if (strpos(",{$sort_str}", ",{$sess_sort_id},")) { return true; } } } else { return true; } } else { return true; } }
function message_get_affair_uid($id, $type = '', $num = 20) { $limit = intval($num) ? " limit {$num} " : ""; $type_str = filt_num_array($type); $id_str = filt_num_array($id); $sql_type = ""; if ($type_str != '') { $sql_type = " and mod_type in ({$type_str}) "; } global $tablePreStr; $t_recent_affair = $tablePreStr . "recent_affair"; $result_rs = array(); $dbo = new dbex(); dbplugin('r'); $sql = "select * from {$t_recent_affair} where user_id in ({$id_str}) {$sql_type} order by id desc {$limit} "; $result_rs = $dbo->getALL($sql); return $result_rs; }
function group_self_by_pals($fields = "*") { $fields = filt_fields($fields); $group_id_str = ''; global $tablePreStr; $t_group_members = $tablePreStr . "group_members"; $result_rs = array(); $dbo = new dbex(); dbplugin('r'); $pals_id = get_sess_mypals(); $sql = " select group_id from {$t_group_members} where user_id in ({$pals_id}) "; $group_data = $dbo->getRs($sql); foreach ($group_data as $rs) { $group_id_str .= $rs['group_id'] . ","; } $group_id_str = preg_replace("/,\$/", "", $group_id_str); return group_self_by_gid($fields, $group_id_str); }
function group_sub_read_base($fields = "*", $condition = "", $get_type = "", $num = "", $by_col = "subject_id", $order = "desc", $cache = "", $cache_key = "") { global $tablePreStr; global $page_num; global $page_total; $t_group_subject = $tablePreStr . "group_subject"; $result_rs = array(); $dbo = new dbex(); dbplugin('r'); $by_col = $by_col ? " {$by_col} " : " subject_id "; $order = $order ? $order : "desc"; $get_type = $get_type ? "getRow" : "getRs"; $sql = " select {$fields} from {$t_group_subject} where {$condition} order by {$by_col} {$order} "; if (empty($result_rs)) { $dbo->setPages(20, $page_num); $result_rs = $dbo->{$get_type}($sql); $page_total = $dbo->totalPage; } return $result_rs; }
function tag_relation($mod_id, $tag_id, $content_id, $type = 'add') { global $tablePreStr; global $dbo; $dbo = new dbex(); dbplugin('w'); $table = $tablePreStr . "tag_relation"; $tag_id = explode(',', $tag_id); foreach ($tag_id as $rs) { if ($rs != '') { if ($type == 'add') { $sql = "insert into {$table} (`id`,`mod_id`,`content_id`) values ({$rs},{$mod_id},{$content_id})"; } else { $sql = "delete from {$table} where content_id={$content_id} and id={$tag_id} and mod_id={$mod_id}"; } if (!$dbo->exeUpdate($sql)) { return 'error'; break; } } } }
require_once $webRoot . 'lib/saetv2.ex.class.php'; require_once $webRoot . 'lib/dbo.class.php'; require_once $webRoot . "foundation/status.php"; require_once $dbConfFile; // init $dbServs require_once $webRoot . 'foundation/debug.php'; if (!is_login()) { header($siteRoot . "index.php"); exit; } echo '<p><sup>说明:<br />通过调用api <a href="http://open.weibo.com/wiki/2/statuses/repost_by_me">repost_by_me</a> 来获取当前用户最新转发微博列表.<br />然后比对数据库中当前用户的任务记录.<br />问题:<br />1. repost_by_me 只能用户登录时自己调用;<br />2. repost_by_me获取所谓‘最新转发’,但是具体时间并没有说明,测试结果也比较诡异。包括since_id和max_id,都有待进一步测试。</p>'; echo '<hr />'; // 按照用户检查转发任务,测试版 // 从数据库中取出当前用户做过的转发任务的mid(同id) $uid = $_SESSION['uid']; $dbo = new dbex($dbServs); echo '<h3>我在微动力做转发任务产生的mid</h3>'; $sql = "select task_id, repost_mid, task_text from do_task JOIN task using(task_id) where user_id = {$uid} and status = 'finish' and type = 'forward' limit 10"; $sql_res = $dbo->getRs($sql); $task_weibo_mids = array(); if (0 != count($sql_res)) { foreach ($sql_res as $weibo) { echo '任务微博 -- ' . $weibo['task_text'] . '。<br />转发产生的mid -- ' . $weibo['repost_mid'] . '</p>'; $task_weibo_mids[$weibo['task_id']] = $weibo['repost_mid']; } } else { echo '<p>我最近没有在微动力上做任务</p>'; } // 通过api查询当前用户最近转发的微博id //var_dump($sql_res); echo '<hr />';
//语言包引入 $m_langpackage = new modulelp(); $ad_langpackage = new adminmenulp(); require "../foundation/fback_search.php"; $is_check = check_rights("c28"); if (!$is_check) { echo $m_langpackage->m_no_pri; exit; } $com_type_select = array("blog_comment" => $m_langpackage->m_blog, "group_subject_comment" => $m_langpackage->m_subject, "album_comment" => $m_langpackage->m_album, "photo_comment" => $m_langpackage->m_photo, "poll_comment" => $m_langpackage->m_poll, "share_comment" => $m_langpackage->m_share, "mood_comment" => $m_langpackage->m_mood); $com_type = array("photo_comment" => "photo_id", "mood_comment" => "mood_id", "share_comment" => "s_id", "poll_comment" => "p_id", "group_subject_comment" => "subject_id", "album_comment" => "album_id", "blog_comment" => "log_id"); $idtype = get_argg('idtype'); $com_table_str = $idtype ? $idtype : "blog_comment"; $t_table = $tablePreStr . $com_table_str; $con_id = $com_type[$com_table_str]; $dbo = new dbex(); dbtarget('w', $dbServs); //当前页面参数 $page_num = trim(get_argg('page')); //变量区 $c_orderby = short_check(get_argg('order_by')); $c_ordersc = short_check(get_argg('order_sc')); $c_perpage = get_argg('perpage') ? intval(get_argg('perpage')) : 20; $eq_array = array('host_id', 'visitor_id', 'visitor_name', $con_id); $like_array = array('content'); $date_array = array("add_time"); $num_array = array(); $sql = spell_sql($t_table, $eq_array, $like_array, $date_array, $num_array, $c_orderby, $c_ordersc); $dbo->setPages($c_perpage, $page_num); //设置分页 $com_rs = $dbo->getRs($sql);
$pl_langpackage = new pluginslp(); $plugin_table = $tablePreStr . "plugins"; $path = get_args('path'); $type = get_args('type'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" media="all" href="css/admin.css"> <title></title> </head> <body style="text-align:center"> <div style="width:100%;text-align:left" id="show" > <?php $dbo = new dbex(); if (!is_null(get_args('operator')) && get_args('operator') == 'update') { dbtarget('w', $dbServs); $valid = get_args('valid'); $autoorder = get_args('autoorder'); if (is_null($valid)) { $valid = 0; } if (is_null($autoorder)) { $autoorder = 0; } $sql = "update {$plugin_table} set autoorder={$autoorder},valid={$valid} where name='{$path}'"; if ($dbo->exeUpdate($sql) !== false) { comp_plugins_position(); echo "<script>parent.Dialog.alert('" . $pl_langpackage->pl_update_suc . "')</script>"; } else {
//引入语言包 $a_langpackage = new albumlp(); //变量取得 $album_id = short_check(get_argp('album_name')); $album_name = short_check(get_argp('album_ufor')); $user_id = get_sess_userid(); $user_name = get_sess_username(); $uico_url = get_sess_userico(); //用户头像 set_session('S_fs', array()); $photos_array = array(); //上传图片地址数组 //变量定义区 $t_photo = $tablePreStr . "photo"; $t_album = $tablePreStr . "album"; $dbo = new dbex(); //读写分离定义函数 dbtarget('w', $dbServs); //第二步,执行文件上传 $limcount = 5; //限制每次上传附件数量 $up_load_num = count($_FILES['attach']['name']); if ($up_load_num > $limcount) { global $a_langpackage; action_return(0, $a_langpackage->a_upload_maximum . $limcount . $a_langpackage->a_attachments, "-1"); } //检测上传相片是否都为空 $is_true = 0; for ($i = 0; $i < count($_FILES['attach']['name']); $i++) { if (!empty($_FILES['attach']['name'][$i])) { $is_true++;
<?php //引入语言包 $pr_langpackage = new privacylp(); //变量获得 $user_id = get_sess_userid(); $input_mess_para = short_check(get_argp('input_mess')); //数据表定义区 $t_users = $tablePreStr . "users"; $dbo = new dbex(); //读写分离定义函数 dbtarget('w', $dbServs); $sql = "update {$t_users} set inputmess_limit={$input_mess_para} where user_id={$user_id}"; $dbo->exeUpdate($sql); action_return(1, $pr_langpackage->pr_save_sec, "modules.php?app=pr_inputmess");
<?php require "session_check.php"; $user_id = get_argg('user_id'); $dbo = new dbex(); dbtarget('w', $dbServs); //引入语言包 $m_langpackage = new modulelp(); $ad_langpackage = new adminmenulp(); //表定义区 $t_users = $tablePreStr . "users"; $sql = "select user_name,user_ico,user_marry,user_qq,user_blood,birth_province,birth_year, birth_city ,reside_province , reside_city,user_email from {$t_users} where user_id='{$user_id}'"; $member_info = $dbo->getRow($sql); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" media="all" href="css/admin.css"> </head> <body> <div id="maincontent"> <div class="wrap"> <div class="infobox"> <h3><?php echo $member_info['user_name']; echo $m_langpackage->m_information; ?> </h3> <div class="content">
$is_admin = get_sess_admin(); if ($is_admin == '') { $main_URL = ""; $home_URL = "content_none"; } $page_num = trim(get_argg('page')); $key_word = short_check(get_argp('key_word')); //数据表定义 $t_users = $tablePreStr . "users"; $t_groups = $tablePreStr . "groups"; $t_group_members = $tablePreStr . "group_members"; $t_group_subject = $tablePreStr . "group_subject"; $t_group_subject_comment = $tablePreStr . "group_subject_comment"; //定义读操作 dbtarget('r', $dbServs); $dbo = new dbex(); $show_action = 0; //权限判断 $role = api_proxy("group_member_by_role", $group_id, $user_id); $role = $role[0]; if (($role == 0 || $role == 1) && isset($role)) { $show_action = 1; } $condition = "group_id={$group_id} and title like '%{$key_word}%'"; $order_by = "order by add_time desc"; $type = "getRs"; $dbo->setPages(20, $page_num); //设置分页 $subject_rs = get_db_data($dbo, $t_group_subject, $condition, $order_by, $type); $page_total = $dbo->totalPage; //分页总数
$per_int = short_check(get_argp('percredit')); $p_subject = short_check(get_argp('subject')); if (empty($anon)) { $anon = 0; } if (empty($cho)) { action_return(0, "{$pol_langpackage->pol_error}", -1); } //数据表定义区 $t_poll = $tablePreStr . "poll"; $t_polloption = $tablePreStr . "polloption"; $t_polluser = $tablePreStr . "polluser"; $t_users = $tablePreStr . "users"; //定义写操作 dbtarget('r', $dbServs); $dbo = new dbex(); $sql = "select username from {$t_polluser} where uid={$ses_uid} and pid={$pid}"; $is_poll = $dbo->getRow($sql); if (!empty($is_poll)) { action_return(0, "{$pol_langpackage->pol_repeat}", -1); } $option = ''; foreach ($cho as $v) { $option .= "," . $v; } $sql = "select `option` from {$t_polloption} where oid in(0.{$option})"; $option_rs = $dbo->getRs($sql); $cho_str = ''; foreach ($option_rs as $val) { $cho_str .= "\"" . $val['option'] . "\","; }
require "../foundation/fsqlseletiem_set.php"; $is_check = check_rights("c18"); if (!$is_check) { echo $m_langpackage->m_no_pri; exit; } //语言包引入 $m_langpackage = new modulelp(); $ad_langpackage = new adminmenulp(); $bp_langpackage = new back_publiclp(); require "../foundation/fback_search.php"; //表定义区 $t_subject = $tablePreStr . "group_subject"; $t_group = $tablePreStr . "groups"; $t_table = $t_subject . "," . $t_group; $dbo = new dbex(); dbtarget('w', $dbServs); //当前页面参数 $page_num = trim(get_argg('page')); //变量区 $c_orderby = short_check(get_argg('order_by')); $c_ordersc = short_check(get_argg('order_sc')); $c_perpage = get_argg('perpage') ? intval(get_argg('perpage')) : 20; $eq_array = array('user_id', 'group_id', 'subject_id'); $like_array = array("title", "user_name"); $date_array = array("add_time"); $num_array = array("comments", "hits"); $join_cond = "group_id"; $sql = spell_sql($t_table, $eq_array, $like_array, $date_array, $num_array, $c_orderby, $c_ordersc, $join_cond); //设置分页 $dbo->setPages($c_perpage, $page_num);
<?php //引入语言包 $u_langpackage = new userslp(); //变量获得 $user_id = get_sess_userid(); $ol_is_latent = intval(get_argg('is_hidden')); echo $ol_is_latent; //表声明区 $t_users = $tablePreStr . "users"; $t_online = $tablePreStr . "online"; $dbo = new dbex(); //读写分离定义函数 dbtarget('w', $dbServs); //更新online表 $sql = "update {$t_online} set `hidden`={$ol_is_latent} where user_id={$user_id};"; if ($dbo->exeUpdate($sql)) { set_sess_online($ol_is_latent); echo $u_langpackage->u_set_suc; } else { echo $u_langpackage->u_set_los; }
session_start(); /* * 本文件负责完善task表,因为填充测试数据时并没有填充完整的数据, * * 新的测试数据已经比较完整了,所以不许要运行此文件了。 * 此文件暂不升级了 * 此文件欠缺多次升级 */ /* get_task_avatar.php */ include_once '../config.php'; include_once $webRoot . 'lib/saetv2.ex.class.php'; include_once $webRoot . 'lib/dbo.class.php'; include_once $dbConfFile; include_once $webRoot . 'foundation/debug.php'; $c = new SaeTClientV2(WB_AKEY, WB_SKEY, $_SESSION['stoken']); $dbo = new dbex($dbServs); /* 获取关注任务的图标url */ $sql = "select task_id, task_sina_uid from task where type='follow' and (task_icon_url IS NULL OR task_screen_name IS NULL OR task_location IS NULL) limit 2"; $sql_res = $dbo->getRs($sql); foreach ($sql_res as $user) { $user_info = $c->show_user_by_id($user['task_sina_uid']); if_weiboapi_fail($user_info); $icon_url = $user_info['avatar_large']; $screen_name = $user_info['screen_name']; $location = $user_info['location']; // echo '<p><img src="'.$icon_url.'" />'.$location.$screen_name.'</p>'; $sql = "update task set task_icon_url='{$icon_url}', task_screen_name='{$screen_name}', task_location='{$location}' where task_id = {$user['task_id']} limit 1"; echo '<p>' . $sql . '</p>'; $dbo->query($sql); } /* 获取转发任务的小图标,微博内容,微博图片大url和小url */
$msgboards = $dbo->getRow($sql); $fu_id = $msgboards['from_user_id']; $to_uid = $msgboards['to_user_id']; //删除留言 $sql = "delete from {$t_table} where mess_id={$rs}"; if ($dbo->exeUpdate($sql)) { increase_integral($dbo, $int_del_com_msg, $fu_id); } } } else { //单条 //变量取得 $mess_id = intval(get_argg('mid')); $fu_id = intval(get_argg('fu_id')); $to_uid = intval(get_argg('to_uid')); //数据表定义区 $t_table = $tablePreStr . "msgboard"; $dbo = new dbex(); //读写分离定义函数 dbtarget('w', $dbServs); //删除留言 $sql = "delete from {$t_table} where mess_id={$mess_id}"; if ($dbo->exeUpdate($sql)) { increase_integral($dbo, $int_del_com_msg, $fu_id); echo $m_langpackage->m_del_suc; } } ?> <script language="javascript" type="text/javascript"> window.location.href='msgboard_list.php?order_by=mess_id&order_sc=desc'; </script>