Changeset 198 for minimanager/char.php


Ignore:
Timestamp:
Jan 9, 2008, 11:19:50 AM (17 years ago)
Author:
maron
Message:

Přidání resetování pozice do minimanageru

File:
1 edited

Legend:

Unmodified
Added
Removed
  • minimanager/char.php

    r178 r198  
    1313require_once("scripts/get_lib.php");
    1414require_once("scripts/defines.php");
     15
     16  //resetování postavy
     17  if (array_key_exists('reset', $_GET)) {
     18      $sql = new SQL;
     19      $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
     20     
     21      $sql_home = mysql_query("SELECT * FROM `character_homebind` WHERE `guid` = '".$_GET['id']."' LIMIT 1");
     22      $load_home = mysql_fetch_array($sql_home);
     23      $home_char_map         = $load_home["map"];
     24      $home_char_position_x  = $load_home["position_x"];
     25      $home_char_position_y  = $load_home["position_y"];
     26      $home_char_position_z  = $load_home["position_z"];
     27        if (isset($home_char_map) AND isset ($home_char_position_x) AND isset ($home_char_position_y) AND isset ($home_char_position_z))
     28        {
     29          mysql_query("UPDATE `character` SET
     30          `map` = '".$home_char_map."' ,
     31          `position_x` ='".$home_char_position_x."' ,
     32          `position_y` = '".$home_char_position_y."' ,
     33          `position_z` = '".$home_char_position_z."'
     34           WHERE `guid` ='".$_GET['id']."' LIMIT 1");
     35        }
     36    echo '
     37    <script>
     38      alert("Pozice postavy byla resetována!");
     39    </script>';
     40  }
     41
    1542
    1643//########################################################################################################################
Note: See TracChangeset for help on using the changeset viewer.