새 세부 서버 인스톨러 준비
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* ../scenario/scenario_$scenarioIdx.json에 구성에 따라 동적 지도를 보여주는 코드
|
||||
*/
|
||||
function getScenarioMap(int $scenarioIdx){
|
||||
|
||||
}
|
||||
+20
-83
@@ -1,96 +1,33 @@
|
||||
<?php
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
if(getUserGrade(true) < 5){
|
||||
die('관리자 아님');
|
||||
}
|
||||
|
||||
if(file_exists("d_setting/conf.php")) error("이미 conf.php가 생성되어 있습니다.<br><br>재설치하려면 해당 파일을 지우세요");
|
||||
|
||||
@chmod(".",0707);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
<title>설치</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<script src="../e_lib/jquery-3.2.1.min.js"></script>
|
||||
<script src="../e_lib/bootstrap.bundle.min.js"></script>
|
||||
<script src="../e_lib/jquery.validate.min.js"></script>
|
||||
<script src="js/common.js"></script>
|
||||
<script src="js/base_map.js"></script>
|
||||
<script src="js/map.js"></script>
|
||||
<script src="js/install.js"></script>
|
||||
<link href="css/normalize.css" rel="stylesheet">
|
||||
<link type="text/css" rel="stylesheet" href="../e_lib/bootstrap.min.css">
|
||||
<link href="css/map.css" rel="stylesheet">
|
||||
<link href="css/install.css" rel="stylesheet">
|
||||
</head>
|
||||
<body bgcolor=#000000 text=#ffffff>
|
||||
<script>
|
||||
function check_submit() {
|
||||
if(!document.license.accept.checked) {
|
||||
alert("라이센스를 읽으시고 동의하시는 분만 삼모넷을 사용하실수 있습니다.\n\n라이센스를 모두 읽으신후 라이센스에 동의하시면 체크를 하신후 설치시작하세요");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function check_view() {
|
||||
if(document.license.accept.checked) {
|
||||
if(confirm("라이센스를 모두 읽으시고 동의를 하십니까?")) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<br><br><br>
|
||||
<div align=center>
|
||||
<form name=license>
|
||||
<table cellpadding=3 cellspacing=0 width=600 border=0>
|
||||
<tr>
|
||||
<td height=30 colspan=3><img src=<?=$images;?>/inst_top.gif></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
<img src=<?=$images;?>/inst_step1.gif>
|
||||
<textarea cols=90 rows=15 readonly><?php include "license.txt"; ?></textarea>
|
||||
<br>
|
||||
<input type=checkbox name=accept value=1 onclick="return check_view()"> 위의 라이센스를 모두 읽었으며 동의합니다
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
<tr>
|
||||
<td><br>
|
||||
<img src=<?=$images;?>/inst_step1-2.gif><br><br><br><div align=center>
|
||||
<?php
|
||||
if(fileperms(".")==16839||fileperms(".")==16895) $check="1";
|
||||
if(!$check) {
|
||||
echo "
|
||||
<font color=red>현재 707로 퍼미션이 되어 있지 않습니다. 텔넷이나 FTP에서 퍼미션을 조정하세요.</font>
|
||||
<br>
|
||||
<br>
|
||||
<div align=center>
|
||||
<table border=0>
|
||||
<tr>
|
||||
<form method=post action={$_SERVER['PHP_SELF']}>
|
||||
<td align=center height=30>
|
||||
<input type=submit value='퍼미션 조정하였습니다' style=height:20px;>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
";
|
||||
} else {
|
||||
echo "
|
||||
<br><br><div align=center>
|
||||
<table border=0>
|
||||
<tr>
|
||||
<form method=post action=install1.php onsubmit='return check_submit()'>
|
||||
<td align=center height=30>
|
||||
<input type=submit text='inst_b_1' border=0 align=absmiddle>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
";
|
||||
}
|
||||
?>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<body>
|
||||
<div id="scenario_map" style="width:698px;height:520px;">
|
||||
<?=getMapHtml()?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
require(__DIR__.'/../f_func/func.php');
|
||||
require(__DIR__.'/../f_config/SESSION.php');
|
||||
require('func_install.php');
|
||||
|
||||
use utilphp\util as util;
|
||||
|
||||
if($SESSION->getGrade() < 5){
|
||||
returnJson([
|
||||
'result'=>false,
|
||||
'reason'=>'충분한 권한을 가지고 있지 않습니다.'
|
||||
]);
|
||||
}
|
||||
|
||||
$scenarioIdx = toInt(util::array_get($_GET['scenarioIdx']));
|
||||
|
||||
if($scenarioIdx === null){
|
||||
returnJson([
|
||||
'result'=>false,
|
||||
'reason'=>'올바르지 않은 scenarioIdx'
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
<?php
|
||||
include "lib.php";
|
||||
include "schema.php";
|
||||
include "func.php";
|
||||
|
||||
use utilphp\util as util;
|
||||
|
||||
if(getUserGrade(true) < 5){
|
||||
die('관리자 아님');
|
||||
}
|
||||
|
||||
if(file_exists("d_setting/conf.php")) error("이미 conf.php가 생성되어 있습니다.<br><br>재설치하려면 해당 파일을 지우세요");
|
||||
|
||||
|
||||
$hostname = util::array_get($_POST['hostname'], '');
|
||||
$user_id = util::array_get($_POST['user_id'], '');
|
||||
$password = util::array_get($_POST['password'], '');
|
||||
$dbname = util::array_get($_POST['dbname'], '');
|
||||
|
||||
// 호스트네임, 아이디, DB네임, 비밀번호의 공백여부 검사
|
||||
if(isBlank($hostname)) Error("HostName을 입력하세요","");
|
||||
if(isBlank($user_id)) Error("User ID 를 입력하세요","");
|
||||
if(isBlank($dbname)) Error("DB NAME을 입력하세요","");
|
||||
|
||||
// DB에 커넥트 하고 DB NAME으로 select DB
|
||||
$connect = MYDB_connect($hostname,$user_id,$password) or Error("MySQL-DB Connect<br>Error!!!","");
|
||||
if(MYDB_error($connect)) Error(__LINE__.MYDB_error($connect),"");
|
||||
MYDB_select_db($dbname, $connect) or Error("MySQL-DB Select<br>Error!!!","");
|
||||
|
||||
delInDir("logs");
|
||||
@unlink("data/connected.php");
|
||||
|
||||
// 관리자 테이블 삭제
|
||||
if(isTable($connect, "game", $dbname)) @MYDB_query("drop table game", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 락 테이블 삭제
|
||||
if(isTable($connect, "plock", $dbname)) @MYDB_query("drop table plock", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 장수 테이블 삭제
|
||||
if(isTable($connect, "general", $dbname)) @MYDB_query("drop table general", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 국가 테이블 삭제
|
||||
if(isTable($connect, "nation", $dbname)) @MYDB_query("drop table nation", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 도시 테이블 삭제
|
||||
if(isTable($connect, "city", $dbname)) @MYDB_query("drop table city", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 부대 테이블 삭제
|
||||
if(isTable($connect, "troop", $dbname)) @MYDB_query("drop table troop", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 토큰 테이블 삭제
|
||||
if(isTable($connect, "token",$dbname)) @MYDB_query("drop table token", $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
// 외교 테이블 삭제
|
||||
if(isTable($connect, "diplomacy", $dbname)) @MYDB_query("drop table diplomacy", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 토너먼트 테이블 삭제
|
||||
if(isTable($connect, "tournament", $dbname)) @MYDB_query("drop table tournament", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 거래 테이블 삭제
|
||||
if(isTable($connect, "auction", $dbname)) @MYDB_query("drop table auction", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 통계 테이블 삭제
|
||||
if(isTable($connect, "statistic",$dbname)) @MYDB_query("drop table statistic", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 연감 테이블 삭제
|
||||
if(isTable($connect, "history",$dbname)) @MYDB_query("drop table history", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 메시지 테이블 삭제
|
||||
if(isTable($connect, "message",$dbname)) @MYDB_query("drop table message", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
|
||||
// 관리자 테이블 생성
|
||||
if(!isTable($connect, "game", $dbname)) @MYDB_query($game_schema, $connect) or Error("create game ".MYDB_error($connect),"");
|
||||
// 락 테이블 생성
|
||||
if(!isTable($connect, "plock", $dbname)) @MYDB_query($plock_schema, $connect) or Error("create plock ".MYDB_error($connect),"");
|
||||
// 장수 테이블 생성
|
||||
if(!isTable($connect, "general", $dbname)) @MYDB_query($general_schema, $connect) or Error("create general ".MYDB_error($connect),"");
|
||||
// 국가 테이블 생성
|
||||
if(!isTable($connect, "nation", $dbname)) @MYDB_query($nation_schema, $connect) or Error("create nation ".MYDB_error($connect),"");
|
||||
// 도시 테이블 생성
|
||||
if(!isTable($connect, "city", $dbname)) @MYDB_query($city_schema, $connect) or Error("create city ".MYDB_error($connect),"");
|
||||
// 부대 테이블 생성
|
||||
if(!isTable($connect, "troop", $dbname)) @MYDB_query($troop_schema, $connect) or Error("create troop ".MYDB_error($connect),"");
|
||||
// 토큰 테이블 생성
|
||||
if(!isTable($connect, "token",$dbname)) @MYDB_query($token_schema, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
// 외교 테이블 생성
|
||||
if(!isTable($connect, "diplomacy", $dbname)) @MYDB_query($diplomacy_schema, $connect) or Error("create diplomacy ".MYDB_error($connect),"");
|
||||
// 전당 테이블 생성
|
||||
if(!isTable($connect, "hall", $dbname)) {
|
||||
MYDB_query($hall_schema, $connect) or Error("create hall ".MYDB_error($connect),"");
|
||||
for($i=0; $i < 21; $i++) {
|
||||
for($j=0; $j < 10; $j++) {
|
||||
MYDB_query("insert into hall (type, rank) values ({$i}, {$j})", $connect);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 메시지 테이블 생성
|
||||
if(!isTable($connect, "message", $dbname)) {
|
||||
MYDB_query($message_schema, $connect) or Error("create message ".MYDB_error($connect),"");
|
||||
}
|
||||
|
||||
// 왕조 테이블 생성
|
||||
if(!isTable($connect, "emperior",$dbname)) @MYDB_query($emperior_schema, $connect) or Error("create emperior ".MYDB_error($connect),"");
|
||||
// 토너먼트 테이블 생성
|
||||
if(!isTable($connect, "tournament",$dbname)) @MYDB_query($tournament_schema, $connect) or Error("create tournament ".MYDB_error($connect),"");
|
||||
// 거래 테이블 생성
|
||||
if(!isTable($connect, "auction",$dbname)) @MYDB_query($auction_schema, $connect) or Error("create auction ".MYDB_error($connect),"");
|
||||
// 통계 테이블 생성
|
||||
if(!isTable($connect, "statistic",$dbname)) @MYDB_query($statistic_schema, $connect) or Error("create statistic ".MYDB_error($connect),"");
|
||||
// 연감 테이블 생성
|
||||
if(!isTable($connect, "history",$dbname)) @MYDB_query($history_schema, $connect) or Error("create history ".MYDB_error($connect),"");
|
||||
|
||||
// 파일로 DB 정보 저장
|
||||
//TODO:Template로 기록
|
||||
|
||||
@mkdir("data",0707);
|
||||
@chmod("data",0707);
|
||||
@chmod("d_setting/conf.php",0707);
|
||||
|
||||
$temp=MYDB_fetch_array(MYDB_query("select count(*) from general where level = '1'", $connect));
|
||||
|
||||
MYDB_close($connect);
|
||||
|
||||
//echo "<script>location.replace('install2.php');</script>";
|
||||
echo 'install2.php';//TODO:debug all and replace
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
function showCityGeneral(cityIdx){
|
||||
|
||||
}
|
||||
|
||||
function loadScenarioPreview(scenarioIdx){
|
||||
$(function(){
|
||||
reloadWorldMap({
|
||||
clickableAll:true,
|
||||
selectCallback:showCityGeneral,
|
||||
hrefTemplate:'#',
|
||||
neutralView:true,
|
||||
showMe:false,
|
||||
targetJson:'j_get_scenario_map.php?scenarioIdx={0}'.format(scenarioIdx)
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
loadScenarioPreview(8);
|
||||
})
|
||||
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
include "lib.php";
|
||||
|
||||
if(getUserGrade(true) < 5){
|
||||
die('관리자 아님');
|
||||
}
|
||||
|
||||
if(file_exists("d_setting/conf.php")) error("이미 conf.php가 생성되어 있습니다.<br><br>재설치하려면 해당 파일을 지우세요");
|
||||
|
||||
@chmod(".",0707);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
||||
</head>
|
||||
<body bgcolor=#000000 text=#ffffff>
|
||||
<script>
|
||||
function check_submit() {
|
||||
if(!document.license.accept.checked) {
|
||||
alert("라이센스를 읽으시고 동의하시는 분만 삼모넷을 사용하실수 있습니다.\n\n라이센스를 모두 읽으신후 라이센스에 동의하시면 체크를 하신후 설치시작하세요");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function check_view() {
|
||||
if(document.license.accept.checked) {
|
||||
if(confirm("라이센스를 모두 읽으시고 동의를 하십니까?")) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<br><br><br>
|
||||
<div align=center>
|
||||
<form name=license>
|
||||
<table cellpadding=3 cellspacing=0 width=600 border=0>
|
||||
<tr>
|
||||
<td height=30 colspan=3><img src=<?=$images;?>/inst_top.gif></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
<img src=<?=$images;?>/inst_step1.gif>
|
||||
<textarea cols=90 rows=15 readonly><?php include "license.txt"; ?></textarea>
|
||||
<br>
|
||||
<input type=checkbox name=accept value=1 onclick="return check_view()"> 위의 라이센스를 모두 읽었으며 동의합니다
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
<tr>
|
||||
<td><br>
|
||||
<img src=<?=$images;?>/inst_step1-2.gif><br><br><br><div align=center>
|
||||
<?php
|
||||
if(fileperms(".")==16839||fileperms(".")==16895) $check="1";
|
||||
if(!$check) {
|
||||
echo "
|
||||
<font color=red>현재 707로 퍼미션이 되어 있지 않습니다. 텔넷이나 FTP에서 퍼미션을 조정하세요.</font>
|
||||
<br>
|
||||
<br>
|
||||
<div align=center>
|
||||
<table border=0>
|
||||
<tr>
|
||||
<form method=post action={$_SERVER['PHP_SELF']}>
|
||||
<td align=center height=30>
|
||||
<input type=submit value='퍼미션 조정하였습니다' style=height:20px;>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
";
|
||||
} else {
|
||||
echo "
|
||||
<br><br><div align=center>
|
||||
<table border=0>
|
||||
<tr>
|
||||
<form method=post action=install1.php onsubmit='return check_submit()'>
|
||||
<td align=center height=30>
|
||||
<input type=submit text='inst_b_1' border=0 align=absmiddle>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
";
|
||||
}
|
||||
?>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
include "lib.php";
|
||||
include "schema.php";
|
||||
include "func.php";
|
||||
|
||||
use utilphp\util as util;
|
||||
|
||||
if(getUserGrade(true) < 5){
|
||||
die('관리자 아님');
|
||||
}
|
||||
|
||||
if(file_exists("d_setting/conf.php")) error("이미 conf.php가 생성되어 있습니다.<br><br>재설치하려면 해당 파일을 지우세요");
|
||||
|
||||
|
||||
$hostname = util::array_get($_POST['hostname'], '');
|
||||
$user_id = util::array_get($_POST['user_id'], '');
|
||||
$password = util::array_get($_POST['password'], '');
|
||||
$dbname = util::array_get($_POST['dbname'], '');
|
||||
|
||||
// 호스트네임, 아이디, DB네임, 비밀번호의 공백여부 검사
|
||||
if(isBlank($hostname)) Error("HostName을 입력하세요","");
|
||||
if(isBlank($user_id)) Error("User ID 를 입력하세요","");
|
||||
if(isBlank($dbname)) Error("DB NAME을 입력하세요","");
|
||||
|
||||
// DB에 커넥트 하고 DB NAME으로 select DB
|
||||
$connect = MYDB_connect($hostname,$user_id,$password) or Error("MySQL-DB Connect<br>Error!!!","");
|
||||
if(MYDB_error($connect)) Error(__LINE__.MYDB_error($connect),"");
|
||||
MYDB_select_db($dbname, $connect) or Error("MySQL-DB Select<br>Error!!!","");
|
||||
|
||||
delInDir("logs");
|
||||
@unlink("data/connected.php");
|
||||
|
||||
// 관리자 테이블 삭제
|
||||
if(isTable($connect, "game", $dbname)) @MYDB_query("drop table game", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 락 테이블 삭제
|
||||
if(isTable($connect, "plock", $dbname)) @MYDB_query("drop table plock", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 장수 테이블 삭제
|
||||
if(isTable($connect, "general", $dbname)) @MYDB_query("drop table general", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 국가 테이블 삭제
|
||||
if(isTable($connect, "nation", $dbname)) @MYDB_query("drop table nation", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 도시 테이블 삭제
|
||||
if(isTable($connect, "city", $dbname)) @MYDB_query("drop table city", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 부대 테이블 삭제
|
||||
if(isTable($connect, "troop", $dbname)) @MYDB_query("drop table troop", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 토큰 테이블 삭제
|
||||
if(isTable($connect, "token",$dbname)) @MYDB_query("drop table token", $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
// 외교 테이블 삭제
|
||||
if(isTable($connect, "diplomacy", $dbname)) @MYDB_query("drop table diplomacy", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 토너먼트 테이블 삭제
|
||||
if(isTable($connect, "tournament", $dbname)) @MYDB_query("drop table tournament", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 거래 테이블 삭제
|
||||
if(isTable($connect, "auction", $dbname)) @MYDB_query("drop table auction", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 통계 테이블 삭제
|
||||
if(isTable($connect, "statistic",$dbname)) @MYDB_query("drop table statistic", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 연감 테이블 삭제
|
||||
if(isTable($connect, "history",$dbname)) @MYDB_query("drop table history", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
// 메시지 테이블 삭제
|
||||
if(isTable($connect, "message",$dbname)) @MYDB_query("drop table message", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
|
||||
// 관리자 테이블 생성
|
||||
if(!isTable($connect, "game", $dbname)) @MYDB_query($game_schema, $connect) or Error("create game ".MYDB_error($connect),"");
|
||||
// 락 테이블 생성
|
||||
if(!isTable($connect, "plock", $dbname)) @MYDB_query($plock_schema, $connect) or Error("create plock ".MYDB_error($connect),"");
|
||||
// 장수 테이블 생성
|
||||
if(!isTable($connect, "general", $dbname)) @MYDB_query($general_schema, $connect) or Error("create general ".MYDB_error($connect),"");
|
||||
// 국가 테이블 생성
|
||||
if(!isTable($connect, "nation", $dbname)) @MYDB_query($nation_schema, $connect) or Error("create nation ".MYDB_error($connect),"");
|
||||
// 도시 테이블 생성
|
||||
if(!isTable($connect, "city", $dbname)) @MYDB_query($city_schema, $connect) or Error("create city ".MYDB_error($connect),"");
|
||||
// 부대 테이블 생성
|
||||
if(!isTable($connect, "troop", $dbname)) @MYDB_query($troop_schema, $connect) or Error("create troop ".MYDB_error($connect),"");
|
||||
// 토큰 테이블 생성
|
||||
if(!isTable($connect, "token",$dbname)) @MYDB_query($token_schema, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
// 외교 테이블 생성
|
||||
if(!isTable($connect, "diplomacy", $dbname)) @MYDB_query($diplomacy_schema, $connect) or Error("create diplomacy ".MYDB_error($connect),"");
|
||||
// 전당 테이블 생성
|
||||
if(!isTable($connect, "hall", $dbname)) {
|
||||
MYDB_query($hall_schema, $connect) or Error("create hall ".MYDB_error($connect),"");
|
||||
for($i=0; $i < 21; $i++) {
|
||||
for($j=0; $j < 10; $j++) {
|
||||
MYDB_query("insert into hall (type, rank) values ({$i}, {$j})", $connect);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 메시지 테이블 생성
|
||||
if(!isTable($connect, "message", $dbname)) {
|
||||
MYDB_query($message_schema, $connect) or Error("create message ".MYDB_error($connect),"");
|
||||
}
|
||||
|
||||
// 왕조 테이블 생성
|
||||
if(!isTable($connect, "emperior",$dbname)) @MYDB_query($emperior_schema, $connect) or Error("create emperior ".MYDB_error($connect),"");
|
||||
// 토너먼트 테이블 생성
|
||||
if(!isTable($connect, "tournament",$dbname)) @MYDB_query($tournament_schema, $connect) or Error("create tournament ".MYDB_error($connect),"");
|
||||
// 거래 테이블 생성
|
||||
if(!isTable($connect, "auction",$dbname)) @MYDB_query($auction_schema, $connect) or Error("create auction ".MYDB_error($connect),"");
|
||||
// 통계 테이블 생성
|
||||
if(!isTable($connect, "statistic",$dbname)) @MYDB_query($statistic_schema, $connect) or Error("create statistic ".MYDB_error($connect),"");
|
||||
// 연감 테이블 생성
|
||||
if(!isTable($connect, "history",$dbname)) @MYDB_query($history_schema, $connect) or Error("create history ".MYDB_error($connect),"");
|
||||
|
||||
// 파일로 DB 정보 저장
|
||||
//TODO:Template로 기록
|
||||
|
||||
@mkdir("data",0707);
|
||||
@chmod("data",0707);
|
||||
@chmod("d_setting/conf.php",0707);
|
||||
|
||||
$temp=MYDB_fetch_array(MYDB_query("select count(*) from general where level = '1'", $connect));
|
||||
|
||||
MYDB_close($connect);
|
||||
|
||||
//echo "<script>location.replace('install2.php');</script>";
|
||||
echo 'install2.php';//TODO:debug all and replace
|
||||
Reference in New Issue
Block a user