//管理ログイン if (isset($login_err)) { echo $login_err; } echo $form->start(); echo $form->load_xml_file($form_login_xml); echo $form->close(); ?> 管理者ユーザー名とパスワードを入力してください </body> </html> <?php } else { //ログイン済 $part_hidden = array('part' => 'input', 'type' => 'hidden', 'name' => 'zone', 'value' => $zone_id); $data->select_all($zone); $part = array('part' => 'select', 'name' => 'group', 'selected' => $zone_id); while ($row = $data->fetch()) { $part["option"]["{$row["id"]}"] = str_pad($row["id"], 3, "0", STR_PAD_LEFT) . ":" . $row["name"]; } ?> <h3>* * Monster List * *</h3> <?php echo $form->start(); echo $form->build($part_hidden); echo $form->submit("logout", "ログアウト"); ?> <div> モンスターリストに新規追加<br> <?php echo $form->load_xml_file($form_add_xml);
?> <body> <h3>* * Class Data * *</h3> <?php echo $form->start(); echo $form->submit("logout", "ログアウト"); ?> <div> ゾーンデータに新規追加<br> <?php echo $form->load_xml_file($form_add_xml); ?> </div> <hr> <?php $data->select_all($table); while ($row = $data->fetch()) { ?> <hr> <div> <?php echo $form->load_xml_string(xml_zone_form_upd($row)); ?> </div> <?php } ?> <hr> <?php echo $data->rows(); ?>
//ログイン if (isset($_SERVER["REQUEST_METHOD"]) == "POST") { if (isset($_POST["submit_login"])) { $_SESSION["user"] = $_POST["user"]; $_SESSION["pass"] = $_POST["pass"]; } } $form = new Form($_SERVER["PHP_SELF"], "POST", "multipart/form-data"); if (isset($_SESSION["user"]) && isset($_SESSION["pass"])) { $data = new AdminData($_SESSION["user"], $_SESSION["pass"], "ezdata"); if (!$data->is_admin || mysqli_connect_error()) { session_destroy(); $login_err = "<div style=\"color:#F00;\">ログイン情報が間違っています</div>"; } $table = isset($_POST["table"]) ? $_POST["table"] : "FIG"; $data->select_all("class"); $select_part = array('part' => 'select', 'name' => 'table', 'selected' => $table); while ($row = $data->fetch()) { $select_part["option"]["{$row["nameS"]}"] = $row["name"]; } } if (isset($_SERVER["REQUEST_METHOD"]) == "POST" && !isset($login_err)) { // ログアウト if (isset($_POST["submit_logout"])) { session_destroy(); selfpage(); } // 新規作成 if (isset($_POST["submit_add"])) { $cols = array("lv", "hp", "sp", "str", "vit", "dex", "agi", "wis", "wil"); foreach ($cols as $col) {