if ($dat["type"] == "animal") { echo "• Состояние животного: не голодно"; } if (!empty($dat["descs"])) { echo "<br><font color=brown>Наложены заклятия:</font> " . str_replace("\n", "<br>", $dat["descs"]) . "<BR>"; } if ($dat["to_book"]) { echo "<small><font color=brown>Использовать магию можно только в бою</font></small>"; } echo "</td></tr></table>"; } } //-------------------------------------------------------------------- if ($_GET["type"] == "edit") { if ($_GET["dubl_id"]) { DuplicateMySQLRecord("paltar", "id", $_GET["dubl_id"]); } if (!$_GET["item_id"] && !$_GET["edit_id"]) { $db_items = "paltar"; if (!$_GET["otdel"]) { $otdel = "sword"; } else { $otdel = $_GET["otdel"]; } if ($_GET["sort"] == 1) { $str = " and art=1 "; } else { if ($_GET["sort"] == 2) { $str = " and art=2 "; } else { if ($_GET["sort"] == 3) {
/* Modal: Confirm NPC Delete */ if ($_GET['npc_delete_confirm']) { $Content .= ' <center> <button type="button" class="btn btn-default btn-sm red btn-xs" onclick="do_npc_confirm(' . $_GET['npc_delete_confirm'] . ')"><i class="fa fa-times"></i> Confirm Delete </button> </center>'; echo Modal('NPC Confirm Delete', $Content, ''); } /* Confirm NPC Copy */ if ($_GET['do_npc_copy_confirm']) { $copies_to_make = $_GET['copies_to_make']; $starting_insert = $_GET['starting_insert']; # echo var_dump($_GET); echo 'Copied NPC to the following:<br>'; for ($i = 0; $i < $copies_to_make; $i++) { echo DuplicateMySQLRecord("npc_types", "id", $_GET['do_npc_copy_confirm'], $starting_insert); $starting_insert++; echo '<br>'; } } /* Modal : Copy NPC Function */ if ($_GET['npc_copy']) { /* Get Last ID Available before doing an Insert */ $query = "SELECT\n t1.ID + 1 AS next_id\n FROM npc_types t1\n LEFT JOIN npc_types t2\n ON t1.ID + 1 = t2.ID\n WHERE t2.ID IS NULL\n ORDER BY next_id DESC\n LIMIT 1"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $last_insert = $row['next_id']; } $Content .= ' <center> <table class="table-bordered table-striped table-condensed flip-content" style="width:500px">