本文整理汇总了PHP中isConnectDb函数的典型用法代码示例。如果您正苦于以下问题:PHP isConnectDb函数的具体用法?PHP isConnectDb怎么用?PHP isConnectDb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isConnectDb函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLink
<?php
if (!defined('__KIMS__')) {
exit;
}
if ($d['admin']['ssl_type'] == 1) {
if ($_SERVER['HTTPS'] != 'on') {
getLink($g['ssl_root'] . '/?' . $_SERVER['QUERY_STRING'], '', '', '');
}
}
$DB_CONNECT = isConnectDb($DB);
$g['mobile'] = isMobileConnect($_SERVER['HTTP_USER_AGENT']);
$g['device'] = $g['mobile'] && $_SESSION['pcmode'] != 'Y';
$my = array();
$my['level'] = 0;
if ($_SESSION['mbr_uid']) {
$my = array_merge(getUidData($table['s_mbrid'], $_SESSION['mbr_uid']), getDbData($table['s_mbrdata'], "memberuid='" . $_SESSION['mbr_uid'] . "'", '*'));
if ($my['pw'] != $_SESSION['mbr_pw']) {
exit;
}
$g['mysns'] = explode('|', $my['sns']);
}
if ($r) {
$_HS = getDbData($table['s_site'], "id='" . $r . "'", '*');
$s = $_HS['uid'];
}
if (!$s) {
if ($g['mobile']) {
$_HH = getDbData($table['s_mobile'], '', '*');
if ($_HH['usemobile'] == 1) {
$_HS = getUidData($table['s_site'], $_HH['startsite']);
示例2: isConnectDb
<?php
include './lib/root_init.php';
include '../conf/db_info.php';
include '../conf/db/' . $DB[kind] . '.php';
$DB_CONNECT = isConnectDb($DB[host], $DB[user], $DB[pass]);
$DB_USEMYDB = isSelecteDb($DB[name], $DB_CONNECT);
function getNumber($num)
{
if (strlen($num) == 11) {
return substr($num, 0, 3) . '-' . substr($num, 3, 4) . '-' . substr($num, 7, 4);
} else {
return substr($num, 0, 3) . '-' . substr($num, 3, 3) . '-' . substr($num, 6, 4);
}
}
if ($action == 'chagne_pass') {
if ($curr_pass == '' || $new_pass1 != $new_pass2) {
getLink("./index.php?query=login", "정상적인 접근이 아닙니다.", "");
}
$crypt_key = "ml5300a";
if ($curr_pass && crypt($curr_pass, $crypt_key) == $ROOT_PASS) {
$NEW_PASS = crypt($new_pass1, $crypt_key);
$fp = fopen('../conf/mkpass.php', 'w');
fwrite($fp, "<?\n");
fwrite($fp, "\$ROOT_PASS = \"{$NEW_PASS}\";\n");
fwrite($fp, "?>");
fclose($fp);
@chmod('../conf/mkpass.php', 0707);
setcookie("MyLootPass", $NEW_PASS, 0, "/");
getLink($THIS_FILE, "변경되었습니다.", $history);
}
示例3: isConnectDb
<INPUT TYPE=BUTTON VALUE='Cancel' style='width:70;' onclick='javascript:self.close();'>
<IMG SRC='.../../image/blank.gif' WIDTH=10 HEIGHT=5>
</TD>
</TR>
</FORM>
</TABLE>
<?php
}
?>
<?php
if ($step == 5) {
include '../../../conf/db/' . $kind . '.php';
$DB_CONNECT = isConnectDb($host, $user, $pass);
$DB_USEMYDB = isSelecteDb($name, $DB_CONNECT);
if (!$DB_CONNECT || !$DB_USEMYDB) {
echo "<SCRIPT LANGUAGE=JAVASCRIPT>\nwindow.alert('\\n\\nMYSQL 관련 입력정보가 일치하지 않아, 프로그램을 설치할 수 없습니다.\\n\\n돌아가셔서 입력정보를 다시한번 확인해 주십시오.\\n\\n');\nwindow.parent.location.href = './install.php?step=3';\n</SCRIPT>";
exit;
}
$fp = fopen('../../../conf/db_info.php', 'w');
fwrite($fp, "<?\n");
while (list($key, $val) = each($HTTP_POST_VARS)) {
if ($key != 'step' && $key != 'prev_bt' && $key != 'next_bt') {
fwrite($fp, "\$DB[{$key}] = \"{$val}\";\n");
}
}
fwrite($fp, "?>");
fclose($fp);
@chmod('../../../conf/db_info.php', 0707);