루트DB를 관리하는 방식을 통째로 변경

- DB 불러오는 방식을 기존의 set.php에서 conf.php의 getRootDB()를 이용하도록 변경
- ADODB 에 기반한 _DB 클래스 폐기
- DBS.php 폐기
- _Setting 클래스 용도 변경
- 서버 목록 정의 방식을 하나로 모음
- 로그인시 세션에 사용자 등급을 추가
- "참여"(donation) 관련 코드 전면 제거
- 서버 리셋시 부운영자 비밀번호 문제 수정
- 서버 오픈,닫힘 여부를 새 서버 목록 정의 방식에 따르도록 수정
- DBS.php가 폐기 되었으므로 서버 오픈시 기본 정보를 json으로 받아오도록 하기 위하여 기본 준비
-  기존에 남아있던 세부 서버 로그인 처리 파일을 제거(enterPost.php)
- DBS.php 삭제로 전콘 변경시에도 각 서버로 json 호출을 하도록 하는 방식으로 준비
- 전콘을 수동으로 서버에 올린뒤 처리할 수 있도록 하던 legacy 코드 제거
- general 테이블에서 userlevel 컬럼을 삭제하고, 세션에 기록된 userGrade를 이용하도록 변경
- 벌점 제한을 모든 유저 공통으로 하도록 수정
- 세부 서버 리셋을 json ajax로 처리하도록 준비
This commit is contained in:
2018-03-07 00:59:31 +09:00
parent e8a9f73611
commit 0c9be5c53f
115 changed files with 1169 additions and 2217 deletions
+15 -60
View File
@@ -2,78 +2,33 @@
require_once('_common.php');
class _Setting {
private $basepath;
private $settingFile;
private $isExist = 0;
private $dbHost;
private $dbId;
private $dbPw;
private $dbName;
private $mailHost;
private $mailPort;
private $mailId;
private $mailPw;
private $mailAddr;
private $exist = 0;
public function __construct($filename) {
$this->settingFile = $filename;
public function __construct($basepath) {
$this->basepath = realpath($basepath);
$this->settingFile = realpath($basepath.D_SETTING.W.'conf.php');
if(file_exists($filename)) {
$this->isExist = 1;
$f = @file($filename);
$this->dbHost = trim(str_replace("\n", "", $f[1]));
$this->dbId = trim(str_replace("\n", "", $f[2]));
$this->dbPw = trim(str_replace("\n", "", $f[3]));
$this->dbName = trim(str_replace("\n", "", $f[4]));
if(count($f) > 10){
$this->mailHost = trim(str_replace("\n", "", $f[5]));
$this->mailPort = trim(str_replace("\n", "", $f[6]));
$this->mailId = trim(str_replace("\n", "", $f[7]));
$this->mailPw = trim(str_replace("\n", "", $f[8]));
$this->mailAddr = trim(str_replace("\n", "", $f[9]));
}
if(file_exists($this->settingFile)) {
$this->exist = 1;
}
}
public function IsExist() {
return $this->isExist;
public function isExist() {
return $this->exist;
}
public function DBHost() {
return $this->dbHost;
public function getShortName(){
return basename($this->basepath);
}
public function DBId() {
return $this->dbId;
public function getBasePath(){
return $this->basepath;
}
public function DBPw() {
return $this->dbPw;
}
public function DBName() {
return $this->dbName;
}
public function MailHost() {
return $this->mailHost;
}
public function MailPort() {
return $this->mailPort;
}
public function MailId() {
return $this->mailId;
}
public function MailPw() {
return $this->mailPw;
}
public function MailAddr() {
return $this->mailAddr;
public function getSettingFile() {
return $this->settingFile;
}
}