當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。