Resulta tengo este codigo :
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
function Sh(web){
$.get(web);
}
</script>
</head>
<body>
<?
class Functions_Admin{
private $db;
private $fnut;
// CONSTRUCTO2
function __construct() {
require_once './connection/connect.php';
$this->db = new DB_Connect();
$this->db->connect();
}
// DESTRUCTOR
function __destruct() {
}
/// ADMIN SPLODERS ///
public function Sploder($met,$sid,$uid){
$sqs = mysql_query("SELECT xx FROM xxx WHERE sid='$sid' ");
if($srow = mysql_fetch_assoc($sqs)){ $surl = $srow["surl"]; }
$sqlevel = mysql_query("SELECT xx FROM xxx WHERE uid='$uid' ");
if($row = mysql_fetch_assoc($sqlevel)){ $level = $row["ulevel"]; }
if($met == 0){ // INACTIVE SPLODER
if($level == 1 || $level == 2){ $data = "/?api=0"; }
else{ return "NO PERMS TO INACTIVE ACTION..."; exit(); }
}else if($met == 1){ // ACTIVE
if($level == 1 || $level == 2){ $data = "/?api=1"; }
else{ return "NO PERMS TO ACTIVE ACTION..."; exit(); }
}else if($met == 2){ // RESET
if($level == 1 || $level == 2){ $data = "/?api=2"; }
else{ return "NO PERMS TO RESET ACTION..."; exit(); }
}else if($met == 3){ //
if($level == 1 || $level == 2){ $data = "/?api=3"; }
else{ return "NO PERMS TO BAN ACTION..."; exit(); }
}else if($met == 4){
if($level == 1 || $level == 2){ $data = "/?api=2";}
else{ return "NO PERMS TO UNBAN ACTION..."; exit(); }
}else if($met == 5){
if($level == 2){ $data = "/?api=4"; mysql_query("DELETE FROM xxx WHERE sid='$sid'"); }
else{ return "NO PERMS TO DELETE ACTION..."; exit(); }
}
// aqui me genera una url de la siguiente manera http://miweb.es/?api=x
$turl = $surl.$data;
echo '<script>Sh("'.$turl.'");</script>';
//////////////
}
}
?>
</body>
</html>
Gracias de Antemano,
Tukymix