本文整理汇总了PHP中dbstuff类的典型用法代码示例。如果您正苦于以下问题:PHP dbstuff类的具体用法?PHP dbstuff怎么用?PHP dbstuff使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了dbstuff类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: update_user_credit
public function update_user_credit($mobile, $credit)
{
//$mobile = '18782963909';
//$credit = 1;
$db = new dbstuff();
$db->connect(UC_DBHOST, UC_DBUSER, UC_DBPW, UC_DBNAME, 0);
$sql = "SELECT `uid` FROM " . DZ_DBTABLEPRE . "common_member WHERE `username`={$mobile}";
$result = $db->query($sql);
if ($db->num_rows($result) == 0) {
return false;
} else {
$row = $db->fetch_array($result);
$uid = $row['uid'];
$sql = "SELECT * FROM " . DZ_DBTABLEPRE . "common_member_count WHERE `uid`={$uid}";
$result = $db->query($sql);
if ($db->num_rows($result) == 0) {
return false;
} else {
$row = $db->fetch_array($result);
if ($row['extcredits2'] < $credit) {
return false;
} else {
//print_r($row);$row['extcredits2'] = 376;
$new_credit = $row['extcredits2'] - $credit;
$sql = 'UPDATE ' . DZ_DBTABLEPRE . "common_member_count SET extcredits2='{$new_credit}' WHERE uid='{$uid}'";
$re = $db->query($sql);
if ($db->num_rows($re) == 0) {
return false;
} else {
return true;
}
}
}
}
}
开发者ID:shuai959980629,项目名称:TTDV1,代码行数:35,代码来源:Dcredit_model.php
示例2: getImCount
function getImCount()
{
$db_uch = new dbstuff();
$db_uch->charset = dbcharset;
$db_uch->connect(dbhost, dbuser, dbpw, dbname, pconnect);
$result = $db_uch->result($db_uch->query("SELECT COUNT(*) FROM " . tname("spacefield") . " WHERE qq <> ''"), 0);
return $result;
}
开发者ID:BGCX261,项目名称:ziuziu-cn-svn-to-git,代码行数:8,代码来源:doing.php
示例3: UcenterLogin
public function UcenterLogin($data)
{
$db = new dbstuff();
$db->connect(UC_DBHOST, UC_DBUSER, UC_DBPW, UC_DBNAME, 0);
list($uid, $username, $email) = uc_get_user($data['username']);
if (is_null($uid)) {
$_data['email'] = $data['email'];
$_data['username'] = $data['username'];
$_data['password'] = $data['password'];
$_data['user_id'] = $data['user_id'];
$uid = self::UcenterReg($_data);
return self::UcenterLogin($data);
} else {
$ucsynlogin = uc_user_synlogin($uid);
}
//var_dump($uid);
return $ucsynlogin;
}
开发者ID:shuai959980629,项目名称:TTDV1,代码行数:18,代码来源:Ucenter_model.php
示例4: loadmultiserver
function loadmultiserver($type = '') {
global $db, $dbcharset, $multiserver;
$type = empty($type) && defined('CURSCRIPT') ? CURSCRIPT : $type;
static $sdb = null;
if($type && !empty($multiserver['enable'][$type])) {
if(!is_a($sdb, 'dbstuff')) $sdb = new dbstuff();
if($sdb->link > 0) {
return $sdb;
} elseif($sdb->link === null && (!empty($multiserver['slave']['dbhost']) || !empty($multiserver[$type]['dbhost']))) {
$setting = !empty($multiserver[$type]['host']) ? $multiserver[$type] : $multiserver['slave'];
$sdb->connect($setting['dbhost'], $setting['dbuser'], $setting['dbpw'], $setting['dbname'], $setting['pconnect'], false, $dbcharset);
if($sdb->link) {
return $sdb;
} else {
$sdb->link = -32767;
}
}
}
return $db;
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:20,代码来源:index.php
示例5: check_authority
function check_authority()
{
require GAME_ROOT . './include/modules/core/sys/config/server.config.php';
$_COOKIE = gstrfilter($_COOKIE);
$cuser = $_COOKIE[$gtablepre . 'user'];
$cpass = $_COOKIE[$gtablepre . 'pass'];
require GAME_ROOT . './include/db_' . $database . '.class.php';
$db = new dbstuff();
$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
unset($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
$result = $db->query("SELECT * FROM {$gtablepre}users WHERE username='{$cuser}'");
if (!$db->num_rows($result)) {
echo "<span><font color=\"red\">Cookie无效,请登录。</font></span><br>";
die;
}
$udata = $db->fetch_array($result);
if ($udata['password'] != $cpass) {
echo "<span><font color=\"red\">Cookie无效,请登录。</font></span><br>";
die;
} elseif ($udata['groupid'] < 9 && $cuser !== $gamefounder) {
echo "<span><font color=\"red\">要求至少9权限。</font></span><br>";
die;
}
unset($db);
unset($cuser);
unset($cpass);
unset($udata);
unset($result);
}
开发者ID:winddramon,项目名称:dts,代码行数:29,代码来源:modulemng.php
示例6: define
$db_pre = $config['tablepre'];
$dbuser = $config['db'][1]['dbuser'];
$dbpasswd = $config['db'][1]['dbpwd'];
$file_expire = $config['session_expire'];
$lang_type = $config['lang_type'];
$cookie_pre = $config['cookie_pre'];
$tpl_name = $config['tpl_name'];
}
define('DBCHARSET', $dbcharset);
define('SiteUrl', $site_url);
if ($version != '20130705') {
@header("Content-type: text/html; charset=UTF-8");
echo "已经安装完成或版本错误,本程序只适用于“ShopNC 2.4”的系统。";
exit;
}
$db = new dbstuff();
if (strtoupper(DBCHARSET) == 'GBK') {
$dbcharset = 'gbk';
} else {
$dbcharset = 'utf8';
}
$dbserver = $dbserver . ":" . $dbserver_port;
$db->connect($dbserver, $dbuser, $dbpasswd, $dbname, $dbcharset);
$tablepre = $db_pre;
$current = $_GET['act'];
if (is_file('../config.ini.php') && $current != '2') {
@header("Content-type: text/html; charset=UTF-8");
echo "您已经安装过微商城模块。";
exit;
}
//新增表
开发者ID:hyperbolaa,项目名称:shopnc,代码行数:31,代码来源:index.php
示例7: error_reporting
<?php
error_reporting(7);
define('IN_ET', TRUE);
include '../include/etfunctions.func.php';
include '../include/db_mysql.class.php';
include '../config.inc.php';
$db = new dbstuff();
$db->connect($server, $db_username, $db_password, $db_name, $pconnect, true);
@mysql_query("set names utf8");
include 'include/global.func.php';
//if(preg_match('/(mozilla|m3gate|winwap|openwave|Opera)/i', $_SERVER['HTTP_USER_AGENT']) && !preg_match('/(SymbianOS)/i', $_SERVER['HTTP_USER_AGENT'])) {
// header("Location: ../index.php");
//}
$op = $_GET['op'] ? $_GET['op'] : "index";
$addtime = time();
$action = $_POST['action'];
$act = $_GET['act'];
$page = $_GET['page'] ? $_GET['page'] : 1;
//login
$ulmtem = explode("\t", authcode($_COOKIE["wapcookie"], 'DECODE'));
if ($ulmtem) {
$query = $db->query("SELECT user_id,user_name,nickname,user_head FROM et_users where user_id='{$ulmtem['0']}' && password='{$ulmtem['1']}'");
$user = $db->fetch_array($query);
$user['user_head'] = $user['user_head'] ? "{$webaddr}/attachments/head/" . $user['user_head'] : "{$webaddr}/images/noavatar.jpg";
}
if (!$user['user_id']) {
$head = "EasyTalk微博客 随时随地";
} else {
$head = "欢迎您," . $user['nickname'];
}
开发者ID:kbglobal51,项目名称:yii-trackstar-sample,代码行数:31,代码来源:index.php
示例8: dbstuff
<hr noshade align="center" width="100%" size="1">
</td>
</tr>
<tr>
<td><b><font color="#FF0000">></font><font color="#000000"> <?php
echo $lang['select_db'];
?>
</font></b></td>
</tr>
<?php
include './config.inc.php';
if (empty($dbcharset) && ($charset == 'gbk' || $charset == 'big5')) {
$dbcharset = $charset;
}
include './include/db_' . $database . '.class.php';
$db = new dbstuff();
$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
$db->select_db($dbname);
echo " <tr>\n";
echo " <td>{$lang['select_db']} {$dbname} " . result(1, 0) . "</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td>\n";
echo " <hr noshade align=\"center\" width=\"100%\" size=\"1\">\n";
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td><b><font color=\"#FF0000\">></font><font color=\"#000000\"> {$lang['create_table']}</font></b></td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td>\n";
开发者ID:winddramon,项目名称:dts,代码行数:31,代码来源:install.php
示例9: define
@set_magic_quotes_runtime(0);
define('IN_DISCUZ', TRUE);
define('ROOT_PATH', dirname(__FILE__) . '/../');
@(include_once ROOT_PATH . './config/config_global.php');
define('CHARSET', $_config['output']['charset']);
define('DBCHARSET', $_config['db']['1']['dbcharset']);
$lock_file = ROOT_PATH . './data/restore.lock';
if (file_exists($lock_file)) {
show_msg('restored_error');
}
require_once ROOT_PATH . './source/discuz_version.php';
$operation = trim(getgpc('operation', 'G'));
$operation = $operation ? $operation : 'import';
$phpself = htmlspecialchars($_SERVER['SCRIPT_NAME'] ? $_SERVER['SCRIPT_NAME'] : $_SERVER['PHP_SELF']);
$siteurl = htmlspecialchars('http://' . $_SERVER['HTTP_HOST'] . preg_replace("/\\/+(api)?\\/*\$/i", '', substr($phpself, 0, strrpos($phpself, '/'))) . '/');
$db = new dbstuff();
if (!@$db->connect($_config['db']['1']['dbhost'], $_config['db']['1']['dbuser'], $_config['db']['1']['dbpw'], $_config['db']['1']['dbname'], $_config['db']['1']['dbcharset'])) {
show_msg('connect_error');
}
if ($operation == 'import') {
if (!submitcheck('importsubmit', 1)) {
$exportlog = $exportsize = $exportziplog = array();
check_exportfile($exportlog, $exportziplog, $exportsize);
if (empty($exportlog) && empty($exportziplog)) {
show_msg('backup_file_unexist');
}
show_importfile_list($exportlog, $exportziplog, $exportsize);
} else {
$readerror = 0;
$datafile_vol1 = trim(getgpc('datafile_vol1'));
if ($datafile_vol1) {
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:restore.php
示例10: exit
$db->query("UPDATE {$tablepre}members SET username='{$usernamenew}' WHERE uid='{$uid}'");
exit(API_RETURN_SUCCEED);
} elseif ($action == 'updatepw') {
!API_UPDATEPW && exit(API_RETURN_FORBIDDEN);
//更改用户密码
exit(API_RETURN_SUCCEED);
} elseif ($action == 'gettag') {
!API_GETTAG && exit(API_RETURN_FORBIDDEN);
//获取标签 API 接口
$return = array($name, array());
echo uc_serialize($return, 1);
} elseif ($action == 'synlogin' && $_GET['time'] == $get['time']) {
!API_SYNLOGIN && exit(API_RETURN_FORBIDDEN);
//同步登录 API 接口
include './include/db_mysql.class.php';
$db = new dbstuff();
$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
unset($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
$uid = intval($get['uid']);
$query = $db->query("SELECT uid, username FROM {$tablepre}members WHERE uid='{$uid}'");
if ($member = $db->fetch_array($query)) {
header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
dsetcookie('Example_auth', authcode($member['uid'] . "\t" . $member['username'], 'ENCODE'), 86400 * 365);
}
} elseif ($action == 'synlogout') {
!API_SYNLOGOUT && exit(API_RETURN_FORBIDDEN);
//同步登出 API 接口
header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
dsetcookie('Example_auth', '', -86400 * 365);
} elseif ($action == 'updatebadwords') {
!API_UPDATEBADWORDS && exit(API_RETURN_FORBIDDEN);
开发者ID:ablozhou,项目名称:hairnet,代码行数:31,代码来源:uc.php
示例11: dbstuff
<?php
/**
* UCenter 应用程序开发 Example
*
* 应用程序有自己的用户表,用户登录的 Example 代码
* 使用到的接口函数:
* uc_user_login() 必须,判断登录用户的有效性
* uc_authcode() 可选,借用用户中心的函数加解密激活字串和 Cookie
* uc_user_synlogin() 可选,生成同步登录的代码
*/
include '../config.inc.php';
include '../include/db_mysql.class.php';
$db = new dbstuff();
$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
unset($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
include '../cta_client/client.php';
if (!empty($_GET['submit'])) {
if (stripos($_POST['username'], "@")) {
list($uid, $username, $password, $email) = uc_user_login($_POST['username'], $_POST['password'], 2);
} else {
//通过接口判断登录帐号的正确性,返回值为数组
list($uid, $username, $password, $email) = uc_user_login($_POST['username'], $_POST['password']);
}
setcookie('Cta_auth', '', -86400);
if ($uid > 0) {
if (!$db->result_first("SELECT count(*) FROM {$tablepre}members WHERE uid='{$uid}'")) {
//判断用户是否存在于用户表,不存在则跳转到激活页面
$auth = rawurlencode(uc_authcode("{$username}\t" . time(), 'ENCODE'));
echo '您需要需要激活该帐号,才能进入本应用程序<br><a href="' . $_SERVER['PHP_SELF'] . '?fun=register&action=activation&auth=' . $auth . '">继续</a>';
exit;
开发者ID:kiah2008,项目名称:coordinate-talk.website,代码行数:31,代码来源:login_db.php
示例12: define
<?php
define('IN_DISCUZ', true);
include_once '../../config.inc.php';
require_once '../../include/global.func.php';
require_once '../../include/db_' . $database . '.class.php';
$uid = $_GET['uid'];
$buyer = $_GET['buyer'];
$price = $_GET['price'];
$amount = $_GET['amount'];
$orderid = $_GET['orderid'];
$submitdate = $_GET['submitdate'];
$db = new dbstuff();
$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect, true, $dbcharset);
$db->select_db($dbname);
$settings = array();
$query = $db->query("SELECT * FROM {$tablepre}settings");
while ($setting = $db->fetch_array($query)) {
$settings[$setting['variable']] = $setting['value'];
}
$settings['creditstrans'] = explode(',', $settings['creditstrans']);
$extcredits = $settings['creditstrans'][0];
updatecredits($uid, array($extcredits => $amount));
$timestamp = time();
$db->query("INSERT INTO {$tablepre}creditslog (uid, fromto, sendcredits, receivecredits, send, receive, dateline, operation)VALUES ({$uid}, '{$buyer}', 0, {$extcredits}, 0, {$amount}, {$timestamp}, 'AFD')");
$db->query("UPDATE {$tablepre}orders SET status = '2', confirmdate = {$timestamp} WHERE orderid = '{$orderid}'");
开发者ID:aaron1102,项目名称:ecbank,代码行数:26,代码来源:greenworld.func.php
示例13: show_msg
}
if (strpos($tablepre, '.') !== false) {
show_msg('tablepre_invalid', $tablepre, 0);
}
if ($username && $password) {
if (strlen($username) > 15 || preg_match("/^\$|^c:\\con\\con\$| |[,\"\\s\t\\<\\>&]|^游客|^Guest/is", $username)) {
show_msg('admin_username_invalid', $username, 0);
}
} else {
show_msg('admininfo_invalid', '', 0);
}
show_header();
$confstatus = config_edit();
if ($confstatus['status'] == 1) {
//入库
$db = new dbstuff();
$db->connect($dbhost . ":" . $dbport, $dbuser, $dbpw, $dbname, DBCHARSET);
$sqlfile = 'sql/data.sql';
$sql = file_get_contents($sqlfile);
$sql = str_replace("\r\n", "\n", $sql);
show_install();
runquery($sql);
$sqlfile = 'sql/other.sql';
$sql = file_get_contents($sqlfile);
$sql = str_replace("\r\n", "\n", $sql);
runquery($sql);
//系统设置中网站名称的修改
/**
* 转码
*/
if (strtoupper(DBCHARSET) == 'GBK') {
开发者ID:liuguogen,项目名称:weixin,代码行数:31,代码来源:index.php
示例14: explode
exit;
}
$t = explode("@", $mailadres);
if (!$t[1]) {
echo "<script>alert('电子邮件格式不正确!');history.go(-1);</script>";
exit;
}
if ($password1 != $password2) {
echo "<script>alert('两次输入的密码不正确!');history.go(-1);</script>";
exit;
}
if ($password1 == $password2 && $_POST['password1']) {
$web_name3 = "EasyTalk 安装";
include $template->getfile('install.htm');
include '../config.inc.php';
$sql = file_get_contents($sqlfile);
$db = new dbstuff();
$db->connect($server, $db_username, $db_password, $db_name, $pconnect, true);
@mysql_query("set names utf8");
runquery($sql);
$db->query("INSERT INTO et_users (user_name,nickname,password,mailadres,signupdate,isadmin) VALUES ('{$username}','{$nickname}','{$password2}','{$mailadres}','{$addtime}','1')");
@touch($lockfile);
exit;
} else {
echo "<script>alert('密码输入不正确,请重新输入!');history.go(-1);</script>";
exit;
}
}
//模板和Foot
$web_name3 = "EasyTalk 安装";
include $template->getfile('install.htm');
开发者ID:kbglobal51,项目名称:yii-trackstar-sample,代码行数:31,代码来源:install.php
示例15: isset
$iscompact = isset($_GET["compact"]) ? $_GET["compact"] == '1' : false;
// 检测是否所有数据客户端都发送了
if (!isset($_GET["port"]) || !isset($_GET["downloaded"]) || !isset($_GET["uploaded"]) || !isset($_GET["left"])) {
show_error("BT客户端发送了错误的数据。");
}
$downloaded = (double) $_GET["downloaded"];
$uploaded = (double) $_GET["uploaded"];
$left = (double) $_GET["left"];
$port = $_GET["port"];
$ip = getip();
$pid = AddSlashes(StripSlashes($pid));
if ($pid == "" || !$pid) {
show_error("请重新下载种子,种子的tracker是不合法的。");
}
// connect to db 连接数据库
$db = new dbstuff();
$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
// connection is done ok 连接完成
$agent = mysql_real_escape_string($_SERVER["HTTP_USER_AGENT"]);
$respid = $db->query("SELECT pid,uid FROM {$tablepre}xbtit_users WHERE pid='" . $pid . "' LIMIT 1");
if (!$respid || mysql_num_rows($respid) != 1) {
show_error("错误的pid值,用户不存在。请重新下载。");
}
$rowpid = mysql_fetch_assoc($respid);
$pid = $rowpid["pid"];
$uid = $rowpid["uid"];
$res_tor = $db->query("SELECT * FROM {$tablepre}xbtit_files WHERE info_hash='" . $info_hash . "' limit 1");
if (mysql_num_rows($res_tor) == 0) {
show_error("种子还未上传到服务器,请到论坛重新上传。");
//种子不在服务器上面
} else {
开发者ID:zzszms,项目名称:sikemi,代码行数:31,代码来源:announce.php
示例16: dbstuff
<?php
include_once './common.php';
include_once './class/db_mysql.class.php';
@(include_once './uc_client/client.php');
$devdb = new dbstuff();
$devdb->charset = 'utf8';
$devdb->connect('200.200.0.24', 'root', 'pr', 'sangfordedecmsv56utf', 0);
$catemap = array('技术支持' => array('id' => '196', 'type' => 'rdp'), '预研技能' => array('id' => '195', 'type' => 'rdp'), '测试技能' => array('id' => '194', 'type' => 'rdp'), '编码技能' => array('id' => '193', 'type' => 'rdp'), '设计技能' => array('id' => '193', 'type' => 'rdp'), '项目管理' => array('id' => '191', 'type' => 'rdp'), '产品规划' => array('id' => '190', 'type' => 'rdp'), 'C/C++编程' => array('id' => '197', 'type' => 'devtech'), '工具使用' => array('id' => '202', 'type' => 'devtech'), 'Windows开发' => array('id' => '200', 'type' => 'devtech'), 'Linux内核驱动' => array('id' => '199', 'type' => 'devtech'), 'Linux开发' => array('id' => '198', 'type' => 'devtech'), '调试技术' => array('id' => '201', 'type' => 'devtech'), '数据库' => array('id' => '203', 'type' => 'devtech'), '算法设计' => array('id' => '204', 'type' => 'devtech'), '协议分析' => array('id' => '205', 'type' => 'devtech'), '网络编程' => array('id' => '206', 'type' => 'devtech'), '性能优化' => array('id' => '207', 'type' => 'devtech'), '手机开发' => array('id' => '208', 'type' => 'devtech'), 'AC' => array('id' => '52', 'type' => 'modules'), 'WOC' => array('id' => '58', 'type' => 'modules'), '其他' => array('id' => '52', 'type' => 'modules'), '知识管理' => array('id' => '191', 'type' => 'rdp'), '常用命令' => array('id' => '198', 'type' => 'devtech'), '应用识别' => array('id' => '52', 'type' => 'modules'), '版本经理' => array('id' => '191', 'type' => 'rdp'), '用户认证' => array('id' => '52', 'type' => 'modules'), '企业文化' => array('id' => '1', 'type' => 'news'), '研发规范' => array('id' => '192', 'type' => 'rdp'), '开发工具' => array('id' => '202', 'type' => 'devtech'), '开发流程' => array('id' => '192', 'type' => 'rdp'), '部门风采' => array('id' => '1', 'type' => 'news'), 'SSL' => array('id' => '56', 'type' => 'modules'));
$reg_msg = array('-1' => '用户名非法', '-2' => '注册信息包括不允许的词', '-3' => '用户名已存在', '-4' => 'Email地址格式非法', '-5' => 'Email地址没有注册', '-6' => 'Email地址已被注册');
$cnt = 0;
$sqlstr = 'SELECT * FROM dede_member';
$query = $devdb->query($sqlstr);
while ($user = $devdb->fetch_array($query)) {
//用户处理
echo '<br />处理用户:' . $user['userid'] . '...';
$newuid = uc_user_register($user['userid'], $user['pwd'], $user['email']);
if ($newuid <= 0) {
if ($newuid == -3) {
echo '用户已存在,用户ID为:';
list($newuid, $username, $email) = uc_get_user($user['userid']);
echo $newuid . ' 原用户ID为:' . $user['mid'] . '<br />';
} else {
echo '<font color="red">注册用户失败:' . $reg_msg[$newuid] . ',跳过...</font><br />';
$sqlstr0 = "SELECT * FROM dede_archives WHERE mid='" . $user['mid'] . "'";
$query0 = $devdb->query($sqlstr0);
while ($res0 = $devdb->fetch_array($query0)) {
echo '其发表文章:' . $res0['title'] . '<br />';
}
continue;
}
} else {
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:fix_up.php
示例17: gwSpcheck
include_once '../../config.inc.php';
require_once '../../include/global.func.php';
require_once '../../include/db_' . $database . '.class.php';
include_once '../../forumdata/cache/plugin_greenworld.php';
$chk = $_DPLUGIN['greenworld']['vars']['ecpay_chk'];
function gwSpcheck($s, $U)
{
$a = substr($U, 0, 1) . substr($U, 2, 1) . substr($U, 4, 1);
$b = substr($U, 1, 1) . substr($U, 3, 1) . substr($U, 5, 1);
$c = $s % $U + $s + $a + $b;
return $c;
}
$TOkSi = $_REQUEST['process_time'] + $_REQUEST['gwsr'] + $_REQUEST['amount'];
$my_spcheck = gwSpcheck($chk, $TOkSi);
$res_str = "<center><div style='background-color:white'>";
$db = new dbstuff();
$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect, true, $dbcharset);
$db->select_db($dbname);
$orderid = $_REQUEST['orderid'];
$status = 1;
$buyer = $_REQUEST['buyer'];
$uid = $_REQUEST['uid'];
$amount = $_REQUEST['amount'];
$price = $_REQUEST['price'];
$submitdate = $_REQUEST['submitdate'];
$db->query("INSERT INTO {$tablepre}orders (orderid, status, buyer, admin, uid, amount, price, submitdate, confirmdate)VALUES ('{$orderid}', '{$status}', '{$buyer}', 'admin', {$uid}, {$amount}, {$price}, {$submitdate}, 0)");
$amt = 0;
$query = $db->query("SELECT * FROM {$tablepre}orders WHERE orderid = '{$orderid}'");
while ($t = $db->fetch_array($query)) {
$amt = $t['amount'];
}
开发者ID:aaron1102,项目名称:ecbank,代码行数:31,代码来源:ecpay_reply.php
示例18: header
<?php
header('Content-Type:text/html;charset=GB2312');
error_reporting(7);
define('IN_ET', TRUE);
define('ET_ROOT', dirname(__FILE__));
include ET_ROOT . "/include/db_mysql.class.php";
include 'config.inc.php';
$db = new dbstuff();
$db->connect($server, $db_username, $db_password, $db_name, $pconnect, true, "GBK");
@mysql_query("set names GBK");
mysql_query("alter table et_users add musicaddr varchar(200) default NULL");
mysql_query("alter table et_users add qq int(15) default NULL");
mysql_query("alter table et_users add msn varchar(50) default NULL");
mysql_query("alter table et_users add gtalk varchar(50) default NULL");
mysql_query("alter table et_users add getmsgtype varchar(10) default NULL");
mysql_query("alter table et_album change face_photo face_photo varchar(30) default NULL");
mysql_query("alter table et_photos change pt_name pt_name varchar(30) not NULL");
echo "Éý¼¶Íê³É£¡";
开发者ID:BGCX067,项目名称:eztalk-svn-to-git,代码行数:19,代码来源:updateb12b2.php
示例19: exit
exit('database_errno_2003' . $error);
} else {
exit('database_connect_error' . $error);
}
}
if (mysql_get_server_info() > '4.1') {
mysql_query("CREATE DATABASE IF NOT EXISTS `{$dbname}` DEFAULT CHARACTER SET " . DBCHARSET, $link);
} else {
mysql_query("CREATE DATABASE IF NOT EXISTS `{$dbname}`", $link);
}
if (mysql_errno()) {
exit('database_errno_1044' . mysql_error());
}
mysql_close($link);
//创建数据表
$db = new dbstuff();
$db->connect($dbhost, $dbuser, $dbpw, $dbname, DBCHARSET);
$sqlfile = 'quan.sql';
$sql = file_get_contents($sqlfile);
$sql = str_replace("\r\n", "\n", $sql);
include $template->getfile('step_3');
}
function create_db_conf()
{
$dbinfo = $_POST['dbinfo'];
$value = "array(\"DB_TYPE\"=> \"mysql\",\n";
$value .= "\"DB_HOST\"=> \"{$dbinfo['dbhost']}\",\n";
$value .= "\"DB_NAME\"=>\"{$dbinfo['dbname']}\",\n";
$value .= "\"DB_USER\"=>\"{$dbinfo['dbuser']}\",\n";
$value .= "\"DB_PWD\"=>\"{$dbinfo['dbpw']}\",\n";
$value .= "\"DB_PORT\"=>\"{$dbinfo['dbport']}\",\n";
开发者ID:yunsite,项目名称:tp-coupon,代码行数:31,代码来源:step_3.php
示例20: get_magic_quotes_gpc
}
require GAME_ROOT . '/include/global.func.php';
$magic_quotes_gpc = get_magic_quotes_gpc();
extract(gstrfilter($_COOKIE));
extract(gstrfilter($_POST));
unset($_GET);
$_FILES = gstrfilter($_FILES);
require GAME_ROOT . '/config.inc.php';
$errorinfo ? error_reporting(E_ALL) : error_reporting(0);
$now = time() + $moveut * 3600 + $moveutmin * 60;
list($sec, $min, $hour, $day, $month, $year, $wday) = explode(',', date("s,i,H,j,n,Y,w", $now));
//if($attackevasive) {
// include_once GAME_ROOT.'./include/security.inc.php';
//}
require GAME_ROOT . '/include/db_' . $database . '.class.php';
$db = new dbstuff();
$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
//$db->select_db($dbname);
unset($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
//require GAME_ROOT.'./gamedata/system.php';
//require config('resources',$gamecfg);
//require config('gamecfg',$gamecfg);
echo 'a';
//include GAME_ROOT.'./gamedata/gameinfo.php';
echo $q . '<br>';
//echo $db->query($q);
$q = "UPDATE {$tablepre}users SET achievement='' WHERE uid>0";
echo $db->query($q);
$q = "ALTER TABLE {$tablepre}users ADD titles text NOT NULL default '' AFTER achievement";
//echo $db->query($q);
$q = "ALTER TABLE {$tablepre}users ADD title text NOT NULL default '' AFTER title";
开发者ID:jiangtiandao,项目名称:phpdts,代码行数:31,代码来源:clear.php
注:本文中的dbstuff类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论