本文整理汇总了PHP中mysqlSetup函数的典型用法代码示例。如果您正苦于以下问题:PHP mysqlSetup函数的具体用法?PHP mysqlSetup怎么用?PHP mysqlSetup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mysqlSetup函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: escapes
escapes('start', 0);
}
$where = '';
$matchColl = new MatchCollection("AND");
$owner = '+ALL';
$project = '+ALL';
if (isset($_GET['owner']) && $_GET['owner'] != '+ALL') {
escapes('owner', $_GET['owner']);
$matchColl->addMatch(new Match('user', $mowner));
}
if (isset($_GET['project']) && $_GET['project'] != '+ALL') {
escapes('project', $_GET['project']);
$matchColl->addMatch(new Match('name', $mproject));
}
$whereSQL = $matchColl->toSQL();
mysqlSetup();
$sqlquery = "SELECT DISTINCT `user` " . "FROM `pb_blog` ORDER BY `user` ASC";
$result = mysql_query($sqlquery) or die('Invalid query: ' . mysql_error());
?>
<table>
<tr>
<td>
<form name="selectOwner" method="get" action="<?php
echo $_SERVER['PHP_SELF'];
?>
">
<input type="hidden" name="start" value="<?php
echo $start;
?>
" />
开发者ID:noahrichards,项目名称:pb,代码行数:31,代码来源:latestPosts.php
示例2: htmlentities
<title> Welcome to DSL FAITH </title>
<style type="text/css">
<?php
echo htmlentities(file_get_contents('faith_style.css', true));
?>
</style>
</head>
<table cellspacing="0" cellpadding="0" width="750px">
<tr>
<td>
<?php
require_once 'func.php';
require_once 'vars.php';
require_once 'facebook.php';
try {
mysqlSetup($db);
$facebook = new Facebook($appapikey, $appsecret);
$user_id = $facebook->require_login();
$results = mysql_query("SELECT transform_add.transform_add_id,\n\t\t\t\t\t\t\t\t transform_add.add_uid_a,\n\t\t\t\t\t\t\t\t transform_add.add_time,\n\t\t\t\t\t\t\t\t transform_add.social_path,\n\t\t\t\t\t\t\t\t transform_add.status\n\t\t\t\t\t\t\t\t from transform_add\n\t\t\t\t\t\t\t\t where transform_add.add_uid_b = {$user_id} AND\n\t\t\t\t\t\t\t\t \t transform_add.status = 0\n\t\t\t\t\t\t\t\t order by transform_add.add_time DESC", $db);
$div_counter = 0;
while ($row = mysql_fetch_array($results)) {
$div_counter++;
}
display_header_links($div_counter, $user_id);
} catch (Exception $e) {
echo 'Caught database exception: ', $e->getMessage(), "\n";
}
?>
</td>
</tr>
<tr>
开发者ID:naken,项目名称:faith,代码行数:31,代码来源:service_privacy_shield.php
示例3: faith_accessAllowed
function faith_accessAllowed($faith_uid, $faith_client_ip, $faith_app_id, $api_method, $api_array, $result)
{
if (!isset($faith_uid)) {
return false;
}
if (!isset($faith_client_ip)) {
return false;
}
if (!isset($faith_app_id)) {
return false;
}
if (!isset($api_method)) {
return false;
}
mysqlSetup($db);
$app_ip_addr = $_SERVER['REMOTE_ADDR'];
$api_blocked = mysql_query("SELECT Count(*) as CountAPI_Num\n\t\t\t\t\t\t \t\tfrom user_disable_api, restapi\n\t\t\t\t\t\t \t\twhere user_disable_api.uid = {$faith_uid} AND\n\t\t\t\t\t\t \t\t \t restapi.facebook_method = '{$api_method}' AND\n\t\t\t\t\t\t \t\t\t user_disable_api.restapi_id = restapi.id;", $db);
$api_blocked_row = mysql_fetch_array($api_blocked);
$CountAPI_Num = $api_blocked_row['CountAPI_Num'];
$app_blocked = mysql_query("SELECT Count(*) as CountAPP_Num\n\t\t\t\t\t\t \t\tfrom user_disable_app\n\t\t\t\t\t\t \t\twhere user_disable_app.uid = {$faith_uid} AND\n\t \t\t\t\t\t user_disable_app.app_id = {$faith_app_id};", $db);
$app_blocked_row = mysql_fetch_array($app_blocked);
$CountAPP_Num = $app_blocked_row['CountAPP_Num'];
$Count_Num = $CountAPI_Num + $CountAPP_Num;
fwrite($fh, "(restserver.php)Count_Num = {$Count_Num}\n");
$allowed = '1';
if ($Count_Num > 0) {
$allowed = '0';
}
$logging_setting = '0';
$results = mysql_query("SELECT logging_setting\n\t\t\t\t\t\t\t\t from setting_logging\n\t\t\t\t\t\t\t\t where uid = {$faith_uid}", $db);
while ($row = mysql_fetch_array($results)) {
$logging_setting = $row['logging_setting'];
}
if ($logging_setting == '2' || $logging_setting == '3') {
//$result = http_build_query($result);
if (gettype($result) == 'array') {
$array_str = '';
foreach ($result as $index => $value) {
$array_str = $array_str . ' { Array ' . $index . ' -> ';
if (gettype($value) == 'array') {
foreach ($value as $inner_index => $inner_value) {
$array_str = $array_str . ' [ Array ' . $inner_index . ' -> ';
if (gettype($inner_value) == 'array') {
foreach ($inner_value as $most_inner_index => $most_inner_value) {
$array_str = $array_str . ' ( Array ' . $most_inner_index . ' -> ' . $most_inner_value . ' ) ';
}
$array_str = $array_str . ' ] ';
} else {
$array_str = $array_str . $inner_value . ' ] ';
}
}
}
$array_str = $array_str . ' } ';
}
$result = $array_str;
}
$faith_dsl_replay = 44;
date_default_timezone_set('America/Los_Angeles');
$time_added = date("Y-m-d H:i:s");
$query = sprintf("INSERT INTO access_log (uid, \n\t\t\t\t\t\t\t\t\t\t\t\t app_id,\n\t\t\t\t\t\t\t\t\t\t\t\t allowed,\n\t\t\t\t\t\t\t\t\t\t\t\t access_time,\n\t\t\t\t\t\t\t\t\t\t\t\t logdetails,\n\t\t\t\t\t\t\t\t\t\t\t\t parameter,\n\t\t\t\t\t\t\t\t\t\t\t\t replay_type,\n\t\t\t\t\t\t\t\t\t\t\t\t api_id,\n\t\t\t\t\t\t\t\t\t\t\t\t app_ip_addr,\n\t\t\t\t\t\t\t\t\t\t\t\t user_ip_addr) \n\t\t\t\t\t\t\t\t\t\t\t\t VALUES('%s','%s','%s','%s','%s','%s','%s',(SELECT id FROM restapi where facebook_method = '{$api_method}'),INET_ATON('{$app_ip_addr}'),INET_ATON('{$faith_client_ip}'))", $faith_uid, mysql_real_escape_string($faith_app_id), mysql_real_escape_string($allowed), mysql_real_escape_string($time_added), mysql_real_escape_string($result), mysql_real_escape_string(json_encode($api_array)), mysql_real_escape_string($faith_dsl_replay));
if (!mysql_query($query)) {
return false;
}
}
if ($Count_Num > 0) {
return false;
}
return true;
}
开发者ID:naken,项目名称:faith,代码行数:69,代码来源:soap.php
注:本文中的mysqlSetup函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论