Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use wcf\system\session\SessionHandler;
- $db_samp_host = '';//sampserver mysql ip
- $db_samp_user = '';//sampserver mysql user
- $db_samp_pass = '';//sampserver mysql passwort
- $db_samp_database = '';//sampserver mysql datenbank
- $samp_link = mysql_connect($db_samp_host,$db_samp_user,$db_samp_pass,true) or die('Unable to establish a DB connection');
- mysql_select_db($db_samp_database,$samp_link);
- //
- if(isset($_GET["funktion"]))
- {
- if($_GET["funktion"] == "create") //Forum Account erstellen
- {
- if(isset($_GET["sampdbid"]) & isset($_GET["sampname"]) & isset($_GET["email"]) & isset($_GET["pw"]))//info.php?funktion=create&sampdbid=SAMPDBID&sampname=SAMPNAME&email=E-MAILADRESSE&pw=IGPASSWORT
- {
- $sql = "SELECT * FROM accounts WHERE ID= '".$_GET['sampdbid']."'";
- $result = mysql_query($sql);
- $userdata = mysql_fetch_array($result);
- if($userdata["Name"] == $_GET["sampname"])
- {
- require_once 'funktionen.php';
- SAMPWBB4::Create($_GET["sampname"],$_GET["pw"],$_GET["email"]);
- }
- }
- }
- elseif($_GET["funktion"] == "update") //Forumrechte updaten
- {
- if(isset($_GET["sampdbid"]) & isset($_GET["sampname"]))//info.php?funktion=update&sampdbid=SAMPDBID&sampname=SAMPNAME
- {
- $sql = "SELECT * FROM accounts WHERE ID= '".$_GET['sampdbid']."'";
- $result = mysql_query($sql);
- $userdata = mysql_fetch_array($result);
- if($userdata["Name"] == $_GET["sampname"])
- {
- require_once 'funktionen.php';
- SAMPWBB4::Update($userdata["WBBID"],$userdata["TeamLevel"],$userdata["Name"]);
- }
- }
- }
- elseif($_GET["funktion"] == "banuser") //Forumaccount bannen
- {
- if(isset($_GET["sampdbid"]) & isset($_GET["sampname"]) & isset($_GET["reason"]) & isset($_GET["banname"]))//info.php?funktion=ban&sampdbid=SAMPDBID&sampname=SAMPNAME&reason=GRUND&banname=Nico
- {
- $sql = "SELECT * FROM accounts WHERE ID= '".$_GET['sampdbid']."'";
- $result = mysql_query($sql);
- $userdata = mysql_fetch_array($result);
- if($userdata["Name"] == $_GET["sampname"])
- {
- require_once 'funktionen.php';
- SAMPWBB4::BanUser($userdata["WBBID"],$userdata["Name"],$_GET["reason"],$_GET["banname"]);
- }
- }
- }
- elseif($_GET["funktion"] == "unbanuser") //Forumaccount entbannen
- {
- if(isset($_GET["sampdbid"]) & isset($_GET["sampname"]))//info.php?funktion=unban&sampdbid=SAMPDBID&sampname=SAMPNAME
- {
- $sql = "SELECT * FROM accounts WHERE ID= '".$_GET['sampdbid']."'";
- $result = mysql_query($sql);
- $userdata = mysql_fetch_array($result);
- if($userdata["Name"] == $_GET["sampname"])
- {
- require_once 'funktionen.php';
- SAMPWBB4::UnBanUser($userdata["WBBID"]);
- }
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement