- 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로 처리하도록 준비
111 lines
3.9 KiB
PHP
111 lines
3.9 KiB
PHP
<?php
|
|
include "lib.php";
|
|
include "func.php";
|
|
//////////////////////////장수성격//////////////////////////////////////////////
|
|
//은둔 안전 유지 재간 출세 할거 정복 패권 의협 대의 왕좌
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
//로그인 검사
|
|
CheckLogin();
|
|
$connect = dbConn();
|
|
|
|
if(getUserGrade() < 5) {
|
|
echo "
|
|
<html>
|
|
<head>
|
|
<title>관리메뉴</title>
|
|
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
|
<link rel=stylesheet href=css/common.css type=text/css>
|
|
</head>
|
|
<body>
|
|
관리자가 아닙니다.<br>
|
|
";
|
|
echo banner();
|
|
echo "
|
|
</body>
|
|
</html>";
|
|
|
|
exit();
|
|
}
|
|
|
|
$query = "select year,month,turnterm,isUnited from game where no='1'";
|
|
$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),"");
|
|
$admin = MYDB_fetch_array($result);
|
|
|
|
if($admin['isUnited'] == 0) {
|
|
$query = "select no from general where npc<2 and age>50";
|
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
$count = MYDB_num_rows($result);
|
|
|
|
for($i=0; $i < $count; $i++) {
|
|
$general = MYDB_fetch_array($result);
|
|
CheckHall($connect, $general['no']);
|
|
}
|
|
}
|
|
|
|
//이벤트3 : NPC추가
|
|
//////////////////////////장수//////////////////////////////////////////////////
|
|
// 이름 통 무 지 꿈 특기
|
|
$gencount = 2001;
|
|
for($k=1; $k <= 200; $k++) {
|
|
if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; }
|
|
else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; }
|
|
RegGeneral3($connect,$admin['turnterm'],$gencount, 0, 0, "무명장{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++;
|
|
}
|
|
|
|
//////////////////////////장수 끝///////////////////////////////////////////////
|
|
|
|
//////////////////////////이벤트///////////////////////////////////////////////
|
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<L><b>【이벤트】</b></>각지에서 인재들이 <M>등장</>합니다!";
|
|
$history[] = "<C>●</>{$admin['year']}년 {$admin['month']}월:<L><b>【이벤트】</b></>중원 통일에 보탬이 될듯 합니다!";
|
|
pushHistory($history);
|
|
|
|
echo "<script>location.replace('./');</script>";
|
|
|
|
function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$special,$msg="") {
|
|
$name = "ⓝ".$name;
|
|
$turntime = getRandTurn($turnterm);
|
|
$personal = CharCall($personal);
|
|
$special = SpecCall($special);
|
|
if($special >= 40) { $special2 = $special; $special = 0; }
|
|
else { $special2 = 0; }
|
|
$city = rand()%94 + 1;
|
|
$age = 15;
|
|
$specage = $age;
|
|
$specage2 = $age;
|
|
$killturn = 9999;
|
|
$experience = $age * 100;
|
|
$dedication = $age * 100;
|
|
$npc = 2;
|
|
$npcmatch = rand() % 150 + 1;
|
|
$picture = 'default.jpg';
|
|
$crew = 0;
|
|
$crewtype = rand() % 3;
|
|
$dex0 = rand() % 18000;
|
|
$dex10 = rand() % 18000;
|
|
$dex20 = rand() % 18000;
|
|
$dex30 = rand() % 18000;
|
|
$dex40 = rand() % 18000;
|
|
//장수
|
|
@MYDB_query("
|
|
insert into general (
|
|
npcid,npc,npc_org,npcmatch,name,picture,nation,city,
|
|
leader,power,intel,experience,dedication,
|
|
level,gold,rice,crew,crewtype,train,atmos,tnmt,
|
|
weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg,
|
|
makelimit,
|
|
dex0, dex10, dex20, dex30, dex40
|
|
) values (
|
|
'$gencount','$npc','$npc','$npcmatch','$name','$picture','$nation','$city',
|
|
'$leader','$power','$intel','$experience','$dedication',
|
|
'$level','1000','1000','$crew','$crewtype','100','100','0',
|
|
'0','0','0','$turntime','$killturn','$age','1',
|
|
'$personal','$special','$specage','$special2','$specage2','$msg',
|
|
'0',
|
|
'$dex0', '$dex10', '$dex20', '$dex30', '$dex40'
|
|
)",
|
|
$connect
|
|
) or Error(__LINE__.MYDB_error($connect),"");
|
|
}
|
|
|