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


PHP dbex::getRs方法代码示例

本文整理汇总了PHP中dbex::getRs方法的典型用法代码示例。如果您正苦于以下问题:PHP dbex::getRs方法的具体用法?PHP dbex::getRs怎么用?PHP dbex::getRs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dbex的用法示例。


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

示例1: blog_sort_by_uid

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;
}
开发者ID:omusico,项目名称:Social,代码行数:12,代码来源:blog_sort.php

示例2: message_get_remind

function message_get_remind($is_focus, $num)
{
    $limit = intval($num) ? " limit {$num} " : "";
    $result_rs = array();
    $dbo = new dbex();
    dbplugin('r');
    $uid = get_sess_userid();
    global $tablePreStr;
    $t_remind = $tablePreStr . "remind";
    $sql = "select * from {$t_remind} where user_id={$uid} and is_focus={$is_focus} order by id desc {$limit} ";
    $result_rs = $dbo->getRs($sql);
    return $result_rs;
}
开发者ID:omusico,项目名称:Social,代码行数:13,代码来源:message_get.php

示例3: scrip_notice_get

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;
}
开发者ID:omusico,项目名称:Social,代码行数:17,代码来源:scrip_notice.php

示例4: pals_self_by_online

function pals_self_by_online($fields = "*", $num = "")
{
    $num = intval($num);
    $limit = '';
    if ($num != 0) {
        $limit = " limit {$num} ";
    }
    $fields = filt_fields($fields);
    $pals_id_str = get_sess_mypals();
    global $tablePreStr;
    $t_online = $tablePreStr . "online";
    $result_rs = array();
    $dbo = new dbex();
    dbplugin('r');
    $sql = " select {$fields} from {$t_online} where user_id in ({$pals_id_str}) and hidden = 0 order by active_time desc {$limit} ";
    return $dbo->getRs($sql);
}
开发者ID:omusico,项目名称:Social,代码行数:17,代码来源:pals_self.php

示例5: group_self_by_pals

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);
}
开发者ID:omusico,项目名称:Social,代码行数:18,代码来源:group_self.php

示例6: modulelp

$m_langpackage = new modulelp();
$u_langpackage = new uilp();
$ad_langpackage = new adminmenulp();
if (get_session('admin_group') != 'superadmin') {
    echo $ri_langpackage->ri_refuse;
    exit;
}
//数据库读写
$dbo = new dbex();
dbtarget('w', $dbServs);
$user_group = get_argg('user_group');
//数据表定义
$t_frontgroup = $tablePreStr . "frontgroup";
$t_users = $tablePreStr . "users";
$sql = "select gid,name from {$t_frontgroup}";
$groups = $dbo->getRs($sql);
$options = "<option value=\"\" selected>" . $ri_langpackage->ri_choose . "</option>";
$group_array = array();
if ($groups) {
    foreach ($groups as $group) {
        $selected = '';
        if ($user_group == $group['gid']) {
            $selected = 'selected';
        }
        $options .= '<option value="' . $group['gid'] . '" ' . $selected . '>' . $group['name'] . '</option>';
        $group_array[$group['gid']] = $group['name'];
    }
}
if (get_args("op") == 'upd') {
    $group = get_args('group');
    $user_id = intval(get_args('user_id'));
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:user_manager.php

示例7: dbtarget

    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 {
        echo "<script>parent.Dialog.alert('" . $pl_langpackage->pl_update_false . "')</script>";
    }
}
if (!is_null($path)) {
    //检测是不是有数据库文件
    dbtarget('r', $dbServs);
    $sql = "select *  from {$plugin_table} where name='{$path}'";
    $plugin = $dbo->getRs($sql);
    if (is_array($plugin)) {
        if (isset($plugin[0]['autoorder']) && $plugin[0]['autoorder'] == 1) {
            $autoorder = "checked";
        } else {
            $autoorder = "";
        }
        if (isset($plugin[0]['valid']) && $plugin[0]['valid'] == 1) {
            $valid = "checked";
        } else {
            $valid = "";
        }
        echo <<<EOD
<form method="post" name="uploadform" action="?path={$path}&operator=update">
\t<table width="100%" border="0">
\t  <tr>
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:update_plugin.php

示例8: dbex

$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'] . "\",";
}
//定义写操作
dbtarget('w', $dbServs);
foreach ($cho as $value) {
    if (short_check($value) != '') {
        $cho_value = short_check($value);
        $sql = "update {$t_polloption} set votenum=votenum+1 where oid={$cho_value}";
        $dbo->exeUpdate($sql);
    }
}
//加分过程
if (!empty($total_credit) && !empty($per_int)) {
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:poll_submit.action.php

示例9: dbex

$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('s_id', 'user_id', 'user_name');
$like_array = array();
$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);
//设置分页
$share_rs = $dbo->getRs($sql);
$page_total = $dbo->totalPage;
//分页总数
//按字段排序
$o_def = '';
$o_add_time = '';
if (!get_argg('order_by') || get_argg('order_by') == "shareid") {
    $o_def = "selected";
}
if (get_argg('order_by') == "add_time") {
    $o_add_time = "selected";
}
//显示控制
$isset_data = "";
$none_data = "content_none";
$isNull = 0;
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:share_list.php

示例10: array

$mp_sort_list = array();
$sql = "select * from {$t_mypals} where user_id={$user_id} and accepted > 0 ";
if ($sort_id != '') {
    $str = $mp_langpackage->mp_whole;
    $show_none_str = $mp_langpackage->mp_sort_pals;
    $sql .= " and pals_sort_id = {$sort_id} ";
} else {
    if ($search_name != '') {
        $show_none_str = $mp_langpackage->mp_none_search;
        $sql .= " and pals_name like '%{$search_name}%' ";
    }
}
$sql .= " order by pals_sort_id desc ";
$dbo->setPages(20, $page_num);
//设置分页
$mp_list_rs = $dbo->getRs($sql);
$page_total = $dbo->totalPage;
//分页总数
$none_data = "content_none";
$isNull = 0;
if (empty($mp_list_rs)) {
    $none_data = "";
    $isNull = 1;
}
$mp_sort_list = api_proxy("pals_sort");
//取得好友圈分类
?>
<!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">
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:pals_list.php

示例11: XMLOperator

 }
 if ($autoorder) {
     $plugin->removeChild($autoorder);
 }
 if ($valid) {
     $plugin->removeChild($valid);
 }
 $dom->formatOutput = true;
 $dom->save("{$plugin_base}/{$path}/plugin.xml");
 //清除权限资源
 $xmlpath = $webRoot . "plugins/resources.xml";
 $xml = new XMLOperator($xmlpath);
 if ($xml->query("//group[@id='plugin_{$path}']")) {
     $sql = "select id,rights from {$t_backgroup} where rights like '%{$path}_%'";
     dbtarget('r', $dbServs);
     $groups = $dbo->getRs($sql);
     dbtarget('w', $dbServs);
     if (!empty($groups)) {
         foreach ($groups as $group) {
             $rights = preg_replace("/{$path}[^,]+(,?)/", "", $group['rights']);
             if (substr($rights, -1) == ',') {
                 $rights = substr($rights, 0, -1);
             }
             $sql = "update {$t_backgroup} set rights='{$rights}' where id={$group['id']}";
             $dbo->exeUpdate($sql);
         }
     }
     $xml->delNode("//group[@id='plugin_{$path}']");
     $xml->save($xmlpath);
 }
 $xmlpath = $webRoot . "plugins/front_resources.xml";
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:unload_plugin.php

示例12: update_group

        echo $ri_langpackage->ri_isset_id;
        exit;
    }
} else {
    if (get_args('del') == 'del') {
        $sql = "delete from {$t_backgroup} where gid='{$id}'";
        $dbo->exeUpdate($sql);
    } else {
        if (get_args('update')) {
            $sql = "update {$t_backgroup} set name='{$value}' where gid='{$id}'";
            $dbo->exeUpdate($sql);
        }
    }
}
$sql = "select * from {$t_backgroup}";
$elements = $dbo->getRs($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" />
<title></title>
<link rel="stylesheet" type="text/css" media="all" href="../css/admin.css">
<script type='text/javascript' src='../../servtools/ajax_client/ajax.js'></script>
<script type='text/javascript'>
function update_group(id_value){
	var group_value=document.getElementById("value_"+id_value).value;
	if(group_value==''){
		alert('<?php 
echo $ri_langpackage->ri_user_wrong;
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:group_manager.php

示例13: dbtarget

                            dbtarget('w', $dbServs);
                            $sql = "insert into {$t_admin} (admin_name,admin_password,active_time,admin_group) values('{$name}','{$password}',now(),'{$group}')";
                            $dbo->exeUpdate($sql);
                        } else {
                            echo $ri_langpackage->ri_isset_user;
                        }
                    } else {
                        echo "<script>alert('" . $p_langpackage->p_differ . "')</script>";
                    }
                }
            }
        }
    }
}
$sql = "select * from {$t_admin}";
$admins = $dbo->getRs($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" />
<title></title>
<link rel="stylesheet" type="text/css" media="all" href="../css/admin.css">
</head>
<body>
<div id="maincontent">
    <div class="wrap">
        <div class="crumbs"><?php 
echo $ad_langpackage->ad_location;
?>
 &gt;&gt; <a href="javascript:void(0);"><?php 
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:admin_manager.php

示例14: dbex

//数据表定义区
$t_blog = $tablePreStr . "blog";
$t_uploadfile = $tablePreStr . "uploadfile";
$t_blog_comments = $tablePreStr . "blog_comment";
$dbo = new dbex();
//读写分离定义函数
dbtarget('r', $dbServs);
//删除blog内部的图片
$blog_content = api_proxy("blog_self_by_bid", "log_content", $ulog_id);
$blog_content = $blog_content['log_content'];
preg_match_all("/classId=\"\\d\"/", $blog_content, $match);
$match = preg_replace("/[classId=,\"]/", '', $match[0]);
if (!empty($match)) {
    $match = join(",", $match);
    $sql = "select file_src from {$t_uploadfile} where id in ({$match})";
    $file_src = $dbo->getRs($sql);
    foreach ($file_src as $rs) {
        unlink($rs['file_src']);
    }
}
//定义写操作
dbtarget('w', $dbServs);
if (!empty($match)) {
    $sql = "delete from {$t_uploadfile} where id in ({$match})";
    $dbo->exeUpdate($sql);
}
$sql = "delete from {$t_blog} where log_id={$ulog_id} and user_id={$user_id}";
if ($dbo->exeUpdate($sql) && mysql_affected_rows() > 0) {
    $sql = "delete from {$t_blog_comments} where log_id={$ulog_id}";
    $dbo->exeUpdate($sql);
    increase_integral($dbo, $int_del_blog, $user_id);
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:blog_del.action.php

示例15: intval

 //变量取得
 if (empty($album_id)) {
     $album_id = intval(get_argg('aid'));
     $user_id = intval(get_argg('uid'));
 }
 //删除相册功能
 //数据表定义区
 $t_album = $tablePreStr . "album";
 $t_photo = $tablePreStr . "photo";
 $t_photo_comment = $tablePreStr . "photo_comment";
 $t_album_comment = $tablePreStr . "album_comment";
 $dbo = new dbex();
 //读写分离定义方法
 dbtarget('r', $dbServs);
 $sql = "select * from {$t_photo} where album_id={$album_id}";
 $photo_rs = $dbo->getRs($sql);
 dbtarget('w', $dbServs);
 foreach ($photo_rs as $val) {
     @unlink('../' . $val['photo_src']);
     @unlink('../' . $val['photo_thumb_src']);
     increase_integral($dbo, $int_del_photo, $user_id);
     //删除照片相关评论
     $photo_id = $val['photo_id'];
     $sql = "delete from {$t_photo_comment} where photo_id ={$photo_id}";
     $dbo->exeUpdate($sql);
 }
 //删除相册有关照片
 $sql = "delete from {$t_photo} where album_id={$album_id}";
 $dbo->exeUpdate($sql);
 //删除相册相关评论
 $sql = "delete from {$t_album_comment} where album_id={$album_id}";
开发者ID:omusico,项目名称:Social,代码行数:31,代码来源:album_del.action.php


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