baseDir . "/hako-main.php"; $BACK_TO_TOP = "{$init->tagBig_}トップへ戻る{$init->_tagBig}"; $ISLAND_TURN; // ターン数 //-------------------------------------------------------------------- class Hako extends HakoIO { var $islandList; // 島リスト var $targetList; // ターゲットの島リスト var $defaultTarget; // 目標補足用ターゲット function readIslands(&$cgi) { global $init; $m = $this->readIslandsFile($cgi); $this->islandList = $this->getIslandList($cgi->dataSet['defaultID']); if($init->targetIsland == 1) { // 目標の島 所有の島が選択されたリスト $this->targetList = $this->islandList; } else { // 順位がTOPの島が選択された状態のリスト $this->targetList = $this->getIslandList($cgi->dataSet['defaultTarget']); } return $m; } //--------------------------------------------------- // 島リスト生成 //--------------------------------------------------- function getIslandList($select = 0) { global $init; $list = ""; for($i = 0; $i < $this->islandNumber; $i++) { if($init->allyUse) { $name = Util::islandName($this->islands[$i], $this->ally, $this->idToAllyNumber); // 同盟マークを追加 } else { $name = $this->islands[$i]['name']; } $id = $this->islands[$i]['id']; // 攻撃目標をあらかじめ自分の島にする if(empty($this->defaultTarget)) {$this->defaultTarget = $id;} if($id == $select) { $s = "selected"; } else { $s = ""; } if($init->allyUse) { $list .= "\n"; // 同盟マークを追加 } else { $list .= "\n"; } } return $list; } //--------------------------------------------------- // 賞に関するリストを生成 //--------------------------------------------------- function getPrizeList($prize) { global $init; list($flags, $monsters, $turns) = split(",", $prize, 3); $turns = split(",", $turns); $prizeList = ""; // ターン杯 $max = -1; $nameList = ""; if($turns[0] != "") { for($k = 0; $k < count($turns) - 1; $k++) { $nameList .= "[{$turns[$k]}] "; $max = $k; } } if($max != -1) { $prizeList .= "\"$nameList\" "; } // 賞 $f = 1; for($k = 1; $k < count($init->prizeName); $k++) { if($flags & $f) { $prizeList .= "\"{$init-prizeName[$k]}\" width=\"16\" height=\"16\"> "; } $f = $f << 1; } // 倒した怪獣リスト $f = 1; $max = -1; $nameList = ""; for($k = 0; $k < $init->monsterNumber; $k++) { if($monsters & $f) { $nameList .= "[{$init->monsterName[$k]}] "; $max = $k; } $f = $f << 1; } if($max != -1) { $prizeList .= "\"{$nameList}\" "; } return $prizeList; } //------------------------------------------------------------------ //--------------------------------------------------- // 地形に関するデータ生成 //--------------------------------------------------- function landString($l, $lv, $x, $y, $mode, $comStr) { global $init; $point = "({$x},{$y})"; $naviExp = "''"; if($x < $init->islandSize / 2) $naviPos = 0; else $naviPos = 1; switch($l) { case $init->landSea: switch($lv) { case 1: // 浅瀬 $image = 'land14.gif'; $naviTitle = '浅瀬'; break; case 2: // 工作船 $image = 'ship.gif'; $naviTitle = $init->shipName[0]; break; case 3: // 漁船 $image = 'fishingboat.gif'; $naviTitle = $init->shipName[1]; break; case 4: // 海底探索船 $image = 'ship2.gif'; $naviTitle = $init->shipName[2]; break; case 5: // 戦艦 $image = 'senkan.gif'; $naviTitle = $init->shipName[3]; break; case 255: // 海賊船 $image = 'viking.gif'; $naviTitle = '海賊船'; break; default: // 海 $image = 'land0.gif'; $naviTitle = '海'; } break; case $init->landSeaCity: // 海底都市 $image = 'SeaCity.gif'; $naviTitle = '海底都市'; $naviText = "{$lv}{$init->unitPop}"; break; case $init->landFroCity: // 海上都市 $image = 'FroCity.gif'; $naviTitle = '海上都市'; $naviText = "{$lv}{$init->unitPop}"; break; case $init->landPort: // 港 $image = 'port.gif'; $naviTitle = '港'; break; case $init->landRail: // 線路 $image = "rail{$lv}.gif"; $naviTitle = '線路'; break; case $init->landStat: // 駅 $image = 'stat.gif'; $naviTitle = '駅'; break; case $init->landTrain: // 電車 $image = "train{$lv}.gif"; $naviTitle = '電車'; break; case $init->landZorasu: // 海怪獣 $image = 'zorasu.gif'; $naviTitle = 'ぞらす'; break; case $init->landSeaSide: // 海岸 $image = 'sunahama.gif'; $naviTitle = '砂浜'; break; case $init->landSeaResort: // 海の家 if($lv < 30) { $image = 'umi1.gif'; $naviTitle = '海の家'; } else if($lv < 100) { $image = 'umi2.gif'; $naviTitle = '民宿'; } else { $image = 'umi3.gif'; $naviTitle = 'リゾートホテル'; } $naviText = "収入:{$lv}{$init->unitPop}
"; break; case $init->landSoccer: // スタジアム $image = 'stadium.gif'; $naviTitle = 'スタジアム'; break; case $init->landPark: // 遊園地 $image = "park{$lv}.gif"; $naviTitle = '遊園地'; break; case $init->landFusya: // 風車 $image = 'fusya.gif'; $naviTitle = '風車'; break; case $init->landSyoubou: // 消防署 $image = 'syoubou.gif'; $naviTitle = '消防署'; break; case $init->landSsyoubou: // 海底消防署 $image = 'syoubou2.gif'; $naviTitle = '海底消防署'; break; case $init->landNursery: // 養殖場 $image = 'Nursery.gif'; $naviTitle = '養殖場'; $naviText = "{$lv}0{$init->unitPop}規模"; break; case $init->landWaste: // 荒地 if($lv == 1) { $image = 'land13.gif'; // 着弾点 } else { $image = 'land1.gif'; } $naviTitle = '荒地'; break; case $init->landPlains: // 平地 $image = 'land2.gif'; $naviTitle = '平地'; break; case $init->landPoll: // 汚染土壌 $image = 'poll.gif'; $naviTitle = '汚染土壌'; $naviText = "汚染レベル{$lv}"; break; case $init->landForest: // 森 if($mode == 1) { $image = 'land6.gif'; $naviText= "${lv}{$init->unitTree}"; } else { // 観光者の場合は木の本数隠す $image = 'land6.gif'; } $naviTitle = '森'; break; case $init->landTown: // 町 $p; $n; if($lv < 30) { $p = 3; $naviTitle = '村'; } else if($lv < 100) { $p = 4; $naviTitle = '町'; } else if($lv < 200) { $p = 5; $naviTitle = '都市'; } else { $p = 52; $naviTitle = '大都市'; } $image = "land{$p}.gif"; $naviText = "{$lv}{$init->unitPop}"; break; case $init->landProcity: // 防災都市 if($lv < 110) { $naviTitle = '防災都市ランクE'; } else if($lv < 130) { $naviTitle = '防災都市ランクD'; } else if($lv < 160) { $naviTitle = '防災都市ランクC'; } else if($lv < 200) { $naviTitle = '防災都市ランクB'; } else { $naviTitle = '防災都市ランクA'; } $image = "bousai.gif"; $naviText = "{$lv}{$init->unitPop}"; break; case $init->landNewtown: // ニュータウン $level = Util::expToLevel($l, $lv); $nwork = (int)($lv/15); $image = 'new.gif'; $naviTitle = 'ニュータウン'; $naviText = "{$lv}{$init->unitPop}/職場{$nwork}0{$init->unitPop}"; break; case $init->landBigtown: // 現代都市 $level = Util::expToLevel($l, $lv); $mwork = (int)($lv/20); $lwork = (int)($lv/30); $image = 'big.gif'; $naviTitle = '現代都市'; $naviText = "{$lv}{$init->unitPop}/職場{$lwork}0{$init->unitPop}/農場{$mwork}0{$init->unitPop}"; break; case $init->landFarm: // 農場 $image = 'land7.gif'; $naviTitle = '農場'; $naviText = "{$lv}0{$init->unitPop}規模"; if($lv > 25) { // ドーム型農場 $image = 'land71.gif'; $naviTitle = 'ドーム型農場'; } break; case $init->landSfarm: // 海底農場 $image = 'land72.gif'; $naviTitle = '海底農場'; $naviText = "{$lv}0{$init->unitPop}規模"; break; case $init->landFactory: // 工場 $image = 'land8.gif'; $naviTitle = '工場'; $naviText = "{$lv}0{$init->unitPop}規模"; if($lv > 100) { // 大工場 $image = 'land82.gif'; $naviTitle = '大工場'; } break; case $init->landCommerce: // 商業ビル $image = 'commerce.gif'; $naviTitle = '商業ビル'; $naviText = "{$lv}0{$init->unitPop}規模"; if($lv > 150) { // 本社ビル $image = 'commerce2.gif'; $naviTitle = '本社ビル'; } break; case $init->landHatuden: // 発電所 $image = 'hatuden.gif'; $naviTitle = '発電所'; $naviText = "{$lv}000kw"; if($lv > 100) { // 大型発電所 $image = 'hatuden2.gif'; $naviTitle = '大型発電所'; } break; case $init->landBank: // 銀行 $image = 'bank.gif'; $naviTitle = '銀行'; break; case $init->landBase: if($mode == 0 || $mode == 2) { // 観光者の場合は森のふり $image = 'land6.gif'; $naviTitle = '森'; } else { // ミサイル基地 $level = Util::expToLevel($l, $lv); $image = 'land9.gif'; $naviTitle = 'ミサイル基地'; $naviText = "レベル ${level} / 経験値 {$lv}"; } break; case $init->landSbase: // 海底基地 if($mode == 0 || $mode == 2) { // 観光者の場合は海のふり $image = 'land0.gif'; $naviTitle = '海'; } else { $level = Util::expToLevel($l, $lv); $image = 'land12.gif'; $naviTitle = '海底基地'; $naviText = "レベル ${level} / 経験値 {$lv}"; } break; case $init->landDefence: // 防衛施設 if($mode == 0 || $mode == 2) { $image = 'land10.gif'; $naviTitle = '防衛施設'; } else { $image = 'land10.gif'; $naviTitle = '防衛施設'; $naviText = "耐久力 {$lv}"; } break; case $init->landHaribote: // ハリボテ $image = 'land10.gif'; if($mode == 0 || $mode == 2) { // 観光者の場合は防衛施設のふり $naviTitle = '防衛施設'; } else { $naviTitle = 'ハリボテ'; } break; case $init->landSdefence: // 海底防衛施設 if($mode == 0 || $mode == 2) { $image = 'land102.gif'; $naviTitle = '海底防衛施設'; } else { $image = 'land102.gif'; $naviTitle = '海底防衛施設'; $naviText = "耐久力 {$lv}"; } break; case $init->landOil: // 海底油田 $image = 'land16.gif'; $naviTitle = '海底油田'; break; case $init->landMountain: // 山 if($lv > 0) { $image = 'land15.gif'; $naviTitle = '採掘場'; $naviText = "{$lv}0{$init->unitPop}規模"; } else { $image = 'land11.gif'; $naviTitle = '山'; } break; case $init->landMyhome: // 自宅 $image = "home{$lv}.gif"; $naviTitle = 'マイホーム'; $naviText = "{$lv}人家族"; break; case $init->landMonument: // 記念碑 $image = "monument{$lv}.gif"; $naviTitle = '記念碑'; $naviText = $init->monumentName[$lv]; break; case $init->landMonster: case $init->landSleeper: // 怪獣 $monsSpec = Util::monsterSpec($lv); $spec = $monsSpec['kind']; $special = $init->monsterSpecial[$spec]; $image = "monster{$spec}.gif"; if($l == $init->landSleeper) { $naviTitle = '怪獣(睡眠中)'; } else { $naviTitle = '怪獣'; } // 硬化中? if((($special & 0x4) && (($this->islandTurn % 2) == 1)) || (($special & 0x10) && (($this->islandTurn % 2) == 0))) { // 硬化中 $image = $init->monsterImage[$monsSpec['kind']]; } $naviText = "怪獣{$monsSpec['name']}(体力{$monsSpec['hp']})"; } if($mode == 1 || $mode == 2) { print ""; $naviText = "{$comStr}\\n{$naviText}"; } print "\"{$point}"; // 座標設定閉じ if($mode == 1 || $mode == 2) print ""; } } //-------------------------------------------------------------------- class LogIO { var $logPool = array(); var $secretLogPool = array(); var $lateLogPool = array(); //--------------------------------------------------- // ログファイルを後ろにずらす //--------------------------------------------------- function slideBackLogFile() { global $init; for($i = $init->logMax - 1; $i >= 0; $i--) { $j = $i + 1; $s = "{$init->dirName}/hakojima.log{$i}"; $d = "{$init->dirName}/hakojima.log{$j}"; if(is_file($s)) { if(is_file($d)) unlink($d); rename($s, $d); } } } //--------------------------------------------------- // 最近の出来事を出力 //--------------------------------------------------- function logFilePrint($num = 0, $id = 0, $mode = 0) { global $init; $fileName = $init->dirName . "/hakojima.log" . $num; if(!is_file($fileName)) { return; } $fp = fopen($fileName, "r"); Util::lockr($fp); while($line = chop(fgets($fp, READ_LINE))) { list($m, $turn, $id1, $id2, $message) = split(",", $line, 5); if($m == 1) { if(($mode == 0) || ($id1 != $id)) { continue; } $m = "(機密)"; } else { $m = ""; } if($id != 0) { if(($id != $id1) && ($id != $id2)) { continue; } } print "{$init->tagNumber_}ターン{$turn}{$m}{$init->_tagNumber}:{$message}
\n"; } Util::unlock($fp); fclose($fp); } //--------------------------------------------------- // 発見の記録を出力 //--------------------------------------------------- function historyPrint() { global $init; $fileName = $init->dirName . "/hakojima.his"; if(!is_file($fileName)) { return; } $fp = fopen($fileName, "r"); Util::lockr($fp); $history = array(); $k = 0; while($line = chop(fgets($fp, READ_LINE))) { array_push($history, $line); $k++; } for($i = 0; $i < $k; $i++) { list($turn, $his) = split(",", array_pop($history), 2); print "{$init->tagNumber_}ターン{$turn}{$init->_tagNumber}:$his
\n"; } } //--------------------------------------------------- // 発見の記録を保存 //--------------------------------------------------- function history($str) { global $init; $fileName = "{$init->dirName}/hakojima.his"; if(!is_file($fileName)) touch($fileName); $fp = fopen($fileName, "a"); Util::lockw($fp); fputs($fp, "{$GLOBALS['ISLAND_TURN']},{$str}\n"); Util::unlock($fp); fclose($fp); // chmod($fileName, 0666); } //--------------------------------------------------- // 発見の記録ログ調整 //--------------------------------------------------- function historyTrim() { global $init; $fileName = "{$init->dirName}/hakojima.his"; if(is_file($fileName)) { $fp = fopen($fileName, "r"); Util::lockr($fp); $line = array(); while($l = chop(fgets($fp, READ_LINE))) { array_push($line, $l); $count++; } Util::unlock($fp); fclose($fp); if($count > $init->historyMax) { if(!is_file($fileName)) touch($fileName); $fp = fopen($fileName, "w"); Util::lockw($fp); for($i = ($count - $init->historyMax); $i < $count; $i++) { fputs($fp, "{$line[$i]}\n"); } Util::unlock($fp); fclose($fp); // chmod($fileName, 0666); } } } //--------------------------------------------------- // ログ //--------------------------------------------------- function out($str, $id = "", $tid = "") { array_push($this->logPool, "0,{$GLOBALS['ISLAND_TURN']},{$id},{$tid},{$str}"); } //--------------------------------------------------- // 機密ログ //--------------------------------------------------- function secret($str, $id = "", $tid = "") { array_push($this->secretLogPool,"1,{$GLOBALS['ISLAND_TURN']},{$id},{$tid},{$str}"); } //--------------------------------------------------- // 遅延ログ //--------------------------------------------------- function late($str, $id = "", $tid = "") { array_push($this->lateLogPool,"0,{$GLOBALS['ISLAND_TURN']},{$id},{$tid},{$str}"); } //--------------------------------------------------- // ログ書き出し //--------------------------------------------------- function flush() { global $init; $fileName = "{$init->dirName}/hakojima.log0"; if(!is_file($fileName)) touch($fileName); $fp = fopen($fileName, "w"); Util::lockw($fp); // 全部逆順にして書き出す if(!empty($this->secretLogPool)) { for($i = count($this->secretLogPool) - 1; $i >= 0; $i--) { fputs($fp, "{$this->secretLogPool[$i]}\n"); } } if(!empty($this->lateLogPool)) { for($i = count($this->lateLogPool) - 1; $i >= 0; $i--) { fputs($fp, "{$this->lateLogPool[$i]}\n"); } } if(!empty($this->logPool)) { for($i = count($this->logPool) - 1; $i >= 0; $i--) { fputs($fp, "{$this->logPool[$i]}\n"); } } Util::unlock($fp); fclose($fp); // chmod($fileName, 0666); } //--------------------------------------------------- // お知らせを出力 //--------------------------------------------------- function infoPrint() { global $init; if($init->infoFile == "") return; $fileName = "{$init->infoFile}"; if(!is_file($fileName)) return; $fp = fopen($fileName, "r"); while($line = fgets($fp, READ_LINE)) { $line = chop($line); print "{$line}
\n"; } fclose($fp); } } //-------------------------------------------------------------------- class Cgi { var $mode = ""; var $dataSet = array(); //--------------------------------------------------- // POST、GETのデータを取得 //--------------------------------------------------- function parseInputData() { global $init; $this->mode = $_POST['mode']; if(!empty($_POST)) { while(list($name, $value) = each($_POST)) { // $value = Util::sjis_convert($value); // 半角カナがあれば全角に変換して返す // $value = i18n_ja_jp_hantozen($value,"KHV"); $value = str_replace(",", "", $value); $value = JcodeConvert($value, 0, 2); $value = HANtoZEN_SJIS($value); if($init->stripslashes == true) { $this->dataSet["{$name}"] = stripslashes($value); } else { $this->dataSet["{$name}"] = $value; } } } if(!empty($this->dataSet['IMGLINE'])) { $neo = $this->dataSet['IMGLINE']; if(strcmp($neo, 'delete') == 0) { $neo = $init->imgDir; } else { $neo = str_replace("\\", "/", $neo); $neo = preg_replace("/\/[\w\.]+\.gif/", "", $neo); $neo = 'file:///' . $neo; } $this->dataSet['IMG'] = $neo; } if(!empty($_GET['Sight'])) { $this->mode = "print"; $this->dataSet['ISLANDID'] = $_GET['Sight']; } if(!empty($_GET['target'])) { $this->mode = "targetView"; $this->dataSet['ISLANDID'] = $_GET['target']; } if($_GET['mode'] == "conf") { $this->mode = "conf"; } if($_GET['mode'] == "log") { $this->mode = "log"; } $init->adminMode = 0; if(empty($_GET['AdminButton'])) { if(Util::checkPassword("", $this->dataSet['PASSWORD'])) { $init->adminMode = 1; } } if($this->mode == "turn") { // この段階で mode に turn がセットされるのは不正アクセスがある場合のみなのでクリアする $this->mode = ''; } if(!empty($_GET['islandListStart'])) { $this->dataSet['islandListStart'] = $_GET['islandListStart']; } else { $this->dataSet['islandListStart'] = 1; } $this->dataSet["ISLANDNAME"] = jsubstr($this->dataSet["ISLANDNAME"], 0, 16); $this->dataSet["MESSAGE"] = jsubstr($this->dataSet["MESSAGE"], 0, 60); $this->dataSet["LBBSMESSAGE"] = jsubstr($this->dataSet["LBBSMESSAGE"], 0, 60); } function lastModified() { global $init; // Last Modifiedヘッダを出力 /* if($this->mode == "Sight") { $fileName = "{$init->dirName}/island.{$this->dataSet['ISLANDID']}"; } else { $fileName = "{$init->dirName}/hakojima.dat"; } */ $fileName = "{$init->dirName}/hakojima.dat"; $time_stamp = filemtime($fileName); $time = gmdate("D, d M Y G:i:s", $time_stamp); header ("Last-Modified: $time GMT"); $this->modifiedSinces($time_stamp); } function modifiedSinces($time) { $modsince = $_SERVER{'HTTP_IF_MODIFIED_SINCE'}; $ms = gmdate("D, d M Y G:i:s", $time) . " GMT"; if($modsince == $ms) // RFC 822 header ("HTTP/1.1 304 Not Modified\n"); $ms = gmdate("l, d-M-y G:i:s", $time) . " GMT"; if($modsince == $ms) // RFC 850 header ("HTTP/1.1 304 Not Modified\n"); $ms = gmdate("D M j G:i:s Y", $time); if($modsince == $ms) // ANSI C's asctime() format header ("HTTP/1.1 304 Not Modified\n"); } //--------------------------------------------------- // COOKIEを取得 //--------------------------------------------------- function getCookies() { if(!empty($_COOKIE)) { while(list($name, $value) = each($_COOKIE)) { switch($name) { case "OWNISLANDID": $this->dataSet['defaultID'] = $value; break; case "OWNISLANDPASSWORD": $this->dataSet['defaultPassword'] = $value; break; case "TARGETISLANDID": $this->dataSet['defaultTarget'] = $value; break; case "LBBSNAME": $this->dataSet['defaultName'] = $value; break; case "LBBSCOLOR": $this->dataSet['defaultColor'] = $value; break; case "POINTX": $this->dataSet['defaultX'] = $value; break; case "POINTY": $this->dataSet['defaultY'] = $value; break; case "COMMAND": $this->dataSet['defaultKind'] = $value; break; case "DEVELOPEMODE": $this->dataSet['defaultDevelopeMode'] = $value; break; case "SKIN": $this->dataSet['defaultSkin'] = $value; break; case "IMG": $this->dataSet['defaultImg'] = $value; break; } } } } //--------------------------------------------------- // COOKIEを生成 //--------------------------------------------------- function setCookies() { $time = time() + 30 * 86400; // 現在 + 30日有効 // Cookieの設定 & POSTで入力されたデータで、Cookieから取得したデータを更新 if($this->dataSet['ISLANDID'] && $this->mode == "owner") { setcookie("OWNISLANDID",$this->dataSet['ISLANDID'], $time); $this->dataSet['defaultID'] = $this->dataSet['ISLANDID']; } if($this->dataSet['PASSWORD']) { setcookie("OWNISLANDPASSWORD",$this->dataSet['PASSWORD'], $time); $this->dataSet['defaultPassword'] = $this->dataSet['PASSWORD']; } if($this->dataSet['TARGETID']) { setcookie("TARGETISLANDID",$this->dataSet['TARGETID'], $time); $this->dataSet['defaultTarget'] = $this->dataSet['TARGETID']; } if($this->dataSet['LBBSNAME']) { setcookie("LBBSNAME",$this->dataSet['LBBSNAME'], $time); $this->dataSet['defaultName'] = $this->dataSet['LBBSNAME']; } if($this->dataSet['LBBSCOLOR']) { setcookie("LBBSCOLOR",$this->dataSet['LBBSCOLOR'], $time); $this->dataSet['defaultColor'] = $this->dataSet['LBBSCOLOR']; } if($this->dataSet['POINTX']) { setcookie("POINTX",$this->dataSet['POINTX'], $time); $this->dataSet['defaultX'] = $this->dataSet['POINTX']; } if($this->dataSet['POINTY']) { setcookie("POINTY",$this->dataSet['POINTY'], $time); $this->dataSet['defaultY'] = $this->dataSet['POINTY']; } if($this->dataSet['COMMAND']) { setcookie("COMMAND",$this->dataSet['COMMAND'], $time); $this->dataSet['defaultKind'] = $this->dataSet['COMMAND']; } if($this->dataSet['DEVELOPEMODE']) { setcookie("DEVELOPEMODE",$this->dataSet['DEVELOPEMODE'], $time); $this->dataSet['defaultDevelopeMode'] = $this->dataSet['DEVELOPEMODE']; } if($this->dataSet['SKIN']) { setcookie("SKIN",$this->dataSet['SKIN'], $time); $this->dataSet['defaultSkin'] = $this->dataSet['SKIN']; } if($this->dataSet['IMG']) { setcookie("IMG",$this->dataSet['IMG'], $time); $this->dataSet['defaultImg'] = $this->dataSet['IMG']; } } } //-------------------------------------------------------------------- class Main { function execute() { $hako = new Hako; $cgi = new Cgi; $cgi->parseInputData(); $cgi->getCookies(); if(!$hako->readIslands($cgi)) { HTML::header($cgi->dataSet); Error::noDataFile(); HTML::footer(); exit(); } $cgi->setCookies(); $cgi->lastModified(); if($cgi->dataSet['DEVELOPEMODE'] == "java") { $html = new HtmlJS; $com = new MakeJS; } else { $html = new HtmlMap; $com = new Make; } switch($cgi->mode) { case "turn": $turn = new Turn; $html = new HtmlTop; $html->header($cgi->dataSet); $turn->turnMain($hako, $cgi->dataSet); $html->main($hako, $cgi->dataSet); // ターン処理後、TOPページopen $html->footer(); break; case "owner": $html->header($cgi->dataSet); $html->owner($hako, $cgi->dataSet); $html->footer(); break; case "command": $html->header($cgi->dataSet); $com->commandMain($hako, $cgi->dataSet); $html->footer(); break; case "new": $html->header($cgi->dataSet); $com->newIsland($hako, $cgi->dataSet); $html->footer(); break; case "comment": $html->header($cgi->dataSet); $com->commentMain($hako, $cgi->dataSet); $html->footer(); break; case "print": $html->header($cgi->dataSet); $html->visitor($hako, $cgi->dataSet); $html->footer(); break; case "targetView": $html->header($cgi->dataSet); $html->printTarget($hako, $cgi->dataSet); $html->footer(); break; case "change": $html->header($cgi->dataSet); $com->changeMain($hako, $cgi->dataSet); $html->footer(); break; case "ChangeOwnerName": $html->header($cgi->dataSet); $com->changeOwnerName($hako, $cgi->dataSet); $html->footer(); break; case "lbbs": $lbbs = new Make; $html->header($cgi->dataSet); $lbbs->localBbsMain($hako, $cgi->dataSet); $html->footer(); break; case "skin": $html = new HtmlSetted; $html->header($cgi->dataSet); $html->setSkin(); $html->footer(); break; case "imgset": $html = new HtmlSetted; $html->header($cgi->dataSet); $html->setImg(); $html->footer(); break; case "conf": $html = new HtmlTop; $html->header($cgi->dataSet); $html->regist($hako, $cgi->dataSet); $html->footer(); break; case "log": $html = new HtmlTop; $html->header($cgi->dataSet); $html->log(); $html->footer(); break; default: $html = new HtmlTop; $html->header($cgi->dataSet); $html->main($hako, $cgi->dataSet); $html->footer(); } exit(); } } $start = new Main; $start->execute(); ?>