Beispiel #1
0
     $equipment = get_pets_equipmentset_entries();
     if ($pet) {
         foreach ($pet as $key => $value) {
             $body->set($key, $value);
         }
     }
     if ($equipment) {
         foreach ($equipment as $key => $value) {
             $body->set($key, $value);
         }
     }
     break;
 case 57:
     // Delete pet
     check_authorization();
     delete_pet();
     header("Location: index.php?editor=npc&z={$z}&zoneid={$zoneid}&npcid={$npcid}");
     exit;
 case 58:
     // Edit pet data
     check_authorization();
     $body = new Template("templates/npc/npc.edit.pet.tmpl.php");
     $body->set('currzone', $z);
     $body->set('currzoneid', $zoneid);
     $body->set('npcid', $npcid);
     $body->set('pet_naming', $pet_naming);
     $body->set('pet_control', $pet_control);
     $body->set('yesno', $yesno);
     $pet = get_pet_entry();
     if ($pet) {
         foreach ($pet as $key => $value) {
<?php

// connection to the database
include "connect_db.php";
include "functions.php";
delete_pet($con);
// header redirect index with a flag for delete and userpost
header('Location: http://localhost/natureoftomorrow/index.php?deleted=1&userpost=1');