Ejemplo n.º 1
0
<?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);
    }
Ejemplo n.º 2
0
<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);
    include '../../TABLE_INSTALL.php';