로컬에서 돌아가도록 초기세팅
This commit is contained in:
parent
4ac3b5da39
commit
f68db6c7f2
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
date_default_timezone_set('America/Toronto');
|
date_default_timezone_set('America/Toronto');
|
||||||
|
|
||||||
if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1") {
|
if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1" || $_SERVER["REMOTE_ADDR"] == "::1" || str_contains($_SERVER["HTTP_HOST"], "localhost")) {
|
||||||
$host = "localhost";
|
$host = "localhost";
|
||||||
$user = "ifreshy_goi";
|
$user = "goiintra_root";
|
||||||
$pw = "L0C2CKN5GHHY";
|
$pw = "L0C2CKN5GHHY";
|
||||||
$dbName = "ifreshy_goi";
|
$dbName = "goiintra_db";
|
||||||
} else if ($_SERVER['HTTP_HOST'] == "goi.ifreshy.com") {
|
} else if ($_SERVER['HTTP_HOST'] == "goi.ifreshy.com") {
|
||||||
$host = "localhost";
|
$host = "localhost";
|
||||||
$user = "ifreshy_goi";
|
$user = "ifreshy_goi";
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1") {
|
if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1" || $_SERVER["REMOTE_ADDR"] == "::1" || str_contains($_SERVER["HTTP_HOST"], "localhost")) {
|
||||||
$DB_HOST = "localhost";
|
$DB_HOST = "localhost";
|
||||||
$DB_NAME = "ifreshy_goi";
|
$DB_NAME = "goiintra_db";
|
||||||
$DB_USER = "ifreshy_goi";
|
$DB_USER = "goiintra_root";
|
||||||
$DB_PASSWORD = "L0C2CKN5GHHY";
|
$DB_PASSWORD = "L0C2CKN5GHHY";
|
||||||
|
|
||||||
if ($pdo = new PDO('mysql:host=localhost;dbname=ifreshy_goi', $DB_USER, $DB_PASSWORD))
|
if ($pdo = new PDO('mysql:host=localhost;dbname=goiintra_db', $DB_USER, $DB_PASSWORD))
|
||||||
{echo "";}else{echo "bad news";}
|
{echo "";}else{echo "bad news";}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if ($_SERVER['HTTP_HOST'] == "goi.ifreshy.com") {
|
else if ($_SERVER['HTTP_HOST'] == "goi.ifreshy.com") {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ include getenv("DOCUMENT_ROOT")."/include/session_include.php";
|
||||||
|
|
||||||
$confirmID = trim($_POST['confirmID']);
|
$confirmID = trim($_POST['confirmID']);
|
||||||
$confirmPW = $_POST['confirmPW'];
|
$confirmPW = $_POST['confirmPW'];
|
||||||
|
$action = $_POST['action'] ?? $_GET['action'] ?? '';
|
||||||
|
|
||||||
if($action == "login") {
|
if($action == "login") {
|
||||||
|
|
||||||
|
|
@ -34,7 +35,7 @@ if($action == "login") {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1") {
|
if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1" || $_SERVER["REMOTE_ADDR"] == "::1") {
|
||||||
$res['success'] = 1;
|
$res['success'] = 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue