Changeset 289


Ignore:
Timestamp:
Jan 31, 2008, 5:39:57 PM (17 years ago)
Author:
bbtrash
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • minimanager/char.php

    r198 r289  
    3838      alert("Pozice postavy byla resetována!");
    3939    </script>';
     40  }
     41 
     42  if (array_key_exists('reset_xp', $_GET))
     43  {
     44              // poradi v data
     45              $poradi = 857;
     46              $poradi = $poradi - 1;
     47      $sql = new SQL;
     48      $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
     49      $sql_res = mysql_query("SELECT * FROM `character` WHERE `guid` = '".$_GET['id']."' LIMIT 1");
     50      $load_res = mysql_fetch_array($sql_res);
     51      $data_old = $load_res["data"];
     52      $pole = explode(" " , $data_old);
     53      $pole[$poradi] = "0";
     54      $save = mysql_query("UPDATE `character` SET  `data` = '".implode(" ",$pole)."' WHERE `guid` ='".$_GET['id']."' LIMIT 1");
     55      $sql_res_k = mysql_query("SELECT * FROM `character` WHERE `guid` = '".$_GET['id']."' LIMIT 1", $GLOBALS["dbspojeni"]);
     56      $load_res_k = mysql_fetch_array($sql_res_k);
     57      $pole_k = explode(" ",$load_res["data"]);
     58          if ($pole[$poradi] == "0")
     59          {
     60          echo "<script>alert(\"Pozice postavy byla resetována!\");</script>";
     61          }
    4062  }
    4163
Note: See TracChangeset for help on using the changeset viewer.