Jetzt hab ich ein anderes Login Script genommen und editiert doch wieder das gleiche Problem?!
Ich steig da nicht mehr durch...
Fehlermeldungen:
Notice: Undefined variable: sgkicker in C:\xampp\htdocs\test2\admin\save.php on line 351
Notice: Undefined variable: prebuys in C:\xampp\htdocs\test2\admin\save.php on line 351
Notice: Undefined variable: minlevel in C:\xampp\htdocs\test2\admin\save.php on line 351
Notice: Undefined variable: maxrecon in C:\xampp\htdocs\test2\admin\save.php on line 351
Notice: Undefined variable: maxassi in C:\xampp\htdocs\test2\admin\save.php on line 351
Notice: Undefined variable: maxengi in C:\xampp\htdocs\test2\admin\save.php on line 351
Notice: Undefined variable: maxmedic in C:\xampp\htdocs\test2\admin\save.php on line 351
PHP Code
edit.php
<?php
include_once 'admin-class.php';
$admin = new itg_admin();
$admin->_authenticate();
?>
<!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">
<!--
*********************************
Loginsystem 1.0 Beta
Powered by
www.marlight-music.de
*********************************
-->
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="author" content="Marlight - www.marlight-music.de"/>
<meta name="generator" content="www.marlight-music.de"/>
<title>[3E] Auto Kicker Web Panel</title>
<body style="background-image:url(http://cdn.battlefield.play4free.com/de/static/20130805100055/images/web/bg_web-splash-spring2.jpg)">
<style type="text/css">
html, body{
background: #dfdfdf;
margin: 0;
padding: 0;
color: #000;
font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
}
div.login{
width: 250px;
border: 1px #666 solid;
border-radius: 12px;
margin: auto;
background: #f0f0f0;
margin-top: 15%;
padding: 10px;
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1),
-1px 1px 4px rgba(0, 0, 0, 0.1),
1px -1px 4px rgba(0, 0, 0, 0.1),
-1px -1px 4px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1),
-1px 1px 4px rgba(0, 0, 0, 0.1),
1px -1px 4px rgba(0, 0, 0, 0.1),
-1px -1px 4px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1),
-1px 1px 4px rgba(0, 0, 0, 0.1),
1px -1px 4px rgba(0, 0, 0, 0.1),
-1px -1px 4px rgba(0, 0, 0, 0.1);
}
.txt{
width: 90%;
outline: 0;
border: 1px #aaa solid;
padding: 3px 5px 3px 5px;
}
.txt:hover .txt:focus{
border: 1px #111 solid;
}
input.button{
padding: 3px;
padding-left: 8px;
padding-right: 8px;
}
.cursor{
cursor: pointer;
}
.label{
font-size: 12px;
}
a{
color: #000;
font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
text-decoration:underline;
}
a:hover{
text-decoration:none;
color: #444;
}
a.login{
padding-left: 24px;
}
/* Save */
div.main{
width: 1000px;
margin: auto;
}
div.header{
width: 100%;
height: 150px;
background: url('http://www.mymegaupload.de/download/header.png') #efefef repeat-x scroll center center;
border: 1px #666 solid;
border-bottom: 0;
}
div.menu{
width: 100%;
height: 40px;
border: 1px #666 solid;
background: #efefef;
border-top: 0;
}
div.body{
width: 980px;;
min-height: 400px;
border: 1px #666 solid;
border-top: 0;
background: #efefef;
padding: 10px;
}
a.menu{
color: #000;
display: block;
padding: 10px 10px 0px 10px;
text-decoration:none;
background: #fff;
border-right: 1px #666 solid;
min-width: 100px;
height: 30px;
text-align: center;
float: left;
}
a.menu:hover{
background: #2bb0ed;
}
div.welcome_user{
width: 99%;
text-align: right;
height: 25px;
margin-top: 125px;
}
table.profil{
width: 450px;
border: 1px #666 solid;
border-radius: 12px;
margin: auto;
background: #f0f0f0;
margin-top: 5%;
padding: 10px;
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1),
-1px 1px 4px rgba(0, 0, 0, 0.1),
1px -1px 4px rgba(0, 0, 0, 0.1),
-1px -1px 4px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1),
-1px 1px 4px rgba(0, 0, 0, 0.1),
1px -1px 4px rgba(0, 0, 0, 0.1),
-1px -1px 4px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1),
-1px 1px 4px rgba(0, 0, 0, 0.1),
1px -1px 4px rgba(0, 0, 0, 0.1),
-1px -1px 4px rgba(0, 0, 0, 0.1);
}
.error{
color: #aa0000;
}
.noterror{
color: #00aa00;
}
</style>
</head>
<body>
<div class="main">
<div class="header">
<div class="welcome_user"><strong><?php echo $admin->get_nicename(); ?></strong></div>
</div>
<div class="menu">
<a onclick="javascript:window.location.href='home.php'" value="home" class="menu">Home</a>
<a onclick="javascript:window.location.href='tool.php'" value="tool" class="menu">Server Tool</a>
<a onclick="javascript:window.location.href='logout.php'" value="logout" class="menu">Logout</a>
</div>
<body>
<div class="body">
<h3 align="center"><br/>Edit Configurations</h3>
<form method="POST" action="save.php" >
<table class="profil" cellpadding="4" cellspacing="0">
<tr>
<td>Allgemeine Einstellungen</td>
<td>Wenn Sie eine Box leer lassen wird dieses Modul deaktiviert!</td>
</tr>
<tr>
<td><input type="checkbox" class="cursor" name="prebuy"/> <label class="cursor label" for="prebuy">PreBuy Kick</label>
</tr>
<tr>
<td><input type="checkbox" class="cursor" name="sgkick" /> <label class="cursor label" for="sgkick">Shotgun Kick</label>
</tr>
<tr>
<td>Mindest Level eingeben (Bei -2 ist System deaktiviert):</td>
<td><input type="text" name="minlevel" maxlength="20" class="txt"/></td>
</tr>
<td>Class Limiter</td>
</tr><tr>
<td>Max Recon:</td>
<td><input type="text" name="maxrecon" maxlength="20" class="txt"/></td>
</tr><tr>
<td>Max Engineer:</td>
<td><input type="text" name="maxengi" maxlength="20" class="txt"/></td>
</tr><tr>
<td>Max Medic:</td>
<td><input type="text" name="maxmedic" maxlength="20" class="txt"/></td>
</tr><tr>
<td>Max Assault:</td>
<td><input type="text" name="maxassi" maxlength="20" class="txt"/></td>
</tr><tr>
<td>Weapon Limiter</td>
</tr><tr>
<td>Self Config Weapon 1</td>
<td><input type="text" name="waffe1" maxlength="20" class="txt"/></td>
<td><input type="checkbox" class="cursor" name="waffek1" /> <label class="cursor label" for="waffek1">Aktiviert/Deaktiviert</label>
</tr><tr>
<td>Self Config Weapon 2</td>
<td><input type="text" name="waffe2" maxlength="20" class="txt"/></td>
<td><input type="checkbox" class="cursor" name="waffek2" /> <label class="cursor label" for="waffek2">Aktiviert/Deaktiviert</label>
</tr><tr>
<td>Self Config Weapon 3</td>
<td><input type="text" name="waffe3" maxlength="20" class="txt"/></td>
<td><input type="checkbox" class="cursor" name="waffek3" /> <label class="cursor label" for="waffek3">Aktiviert/Deaktiviert</label>
</tr><tr>
<td>Self Config Weapon 4</td>
<td><input type="text" name="waffe4" maxlength="20" class="txt"/></td>
<td><input type="checkbox" class="cursor" name="waffek4" /> <label class="cursor label" for="waffek4">Aktiviert/Deaktiviert</label>
</tr>
<tr>
<td></td>
<td><input type="button" onclick="javascript:window.location.href='save.php'" value="Save" /></td>
</tr>
</table>
</form>
<br/>
<br/>
</html>
<?php
if(isset($_POST['sgkick']))
{
$sgkicker= $_POST['sgkick'];
}
if(isset($_POST['prebuy']))
{
$prebuys = $_POST['prebuy'];
}
if(isset($_POST['waffek1']))
{
$waffek1 = $_POST['waffek1'];
}
if(isset($_POST['waffek2']))
{
$waffe2 = $_POST['waffek2'];
}
if(isset($_POST['waffek3']))
{
$waffe3 = $_POST['waffek3'];
}
if(isset($_POST['waffek4']))
{
$waffe4 = $_POST['waffek4'];
}
if(isset($_POST['waffe4']))
{
$waffek4 = $_POST['waffe4'];
}
if(isset($_POST['waffe3']))
{
$waffek3 = $_POST['waffe3'];
}
if(isset($_POST['waffe2']))
{
$waffek2 = $_POST['waffe2'];
}
if(isset($_POST['waffe1']))
{
$waffek1 = $_POST['waffe1'];
}
if(isset($_SESSION['maxrecon']))
{
$maxrecon = $_SESSION['maxrecon'];
}
if(isset($_POST['maxmedic']))
{
$maxmedic = $_POST['maxmedic'];
}
if(isset($_POST['maxengi']))
{
$maxengi = $_POST['maxengi'];
}
if(isset($_POST['maxassi']))
{
$maxassi = $_POST['maxassi'];
}
if(isset($_POST['minlevel']))
{
$minlevel = $_POST['minlevel'];
}
?>
Alles anzeigen
Save.php
<?php
include_once 'admin-class.php';
$admin = new itg_admin();
$admin->_authenticate();
?>
<!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">
<!--
*********************************
Loginsystem 1.0 Beta
Powered by
www.marlight-music.de
*********************************
-->
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="author" content="Marlight - www.marlight-music.de"/>
<meta name="generator" content="www.marlight-music.de"/>
<title>[3E] Auto Kicker Web Panel</title>
<body style="background-image:url(http://cdn.battlefield.play4free.com/de/static/20130805100055/images/web/bg_web-splash-spring2.jpg)">
<style type="text/css">
html, body{
background: #dfdfdf;
margin: 0;
padding: 0;
color: #000;
font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
}
div.login{
width: 250px;
border: 1px #666 solid;
border-radius: 12px;
margin: auto;
background: #f0f0f0;
margin-top: 15%;
padding: 10px;
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1),
-1px 1px 4px rgba(0, 0, 0, 0.1),
1px -1px 4px rgba(0, 0, 0, 0.1),
-1px -1px 4px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1),
-1px 1px 4px rgba(0, 0, 0, 0.1),
1px -1px 4px rgba(0, 0, 0, 0.1),
-1px -1px 4px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1),
-1px 1px 4px rgba(0, 0, 0, 0.1),
1px -1px 4px rgba(0, 0, 0, 0.1),
-1px -1px 4px rgba(0, 0, 0, 0.1);
}
.txt{
width: 90%;
outline: 0;
border: 1px #aaa solid;
padding: 3px 5px 3px 5px;
}
.txt:hover .txt:focus{
border: 1px #111 solid;
}
input.button{
padding: 3px;
padding-left: 8px;
padding-right: 8px;
}
.cursor{
cursor: pointer;
}
.label{
font-size: 12px;
}
a{
color: #000;
font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
text-decoration:underline;
}
a:hover{
text-decoration:none;
color: #444;
}
a.login{
padding-left: 24px;
}
/* Save */
div.main{
width: 1000px;
margin: auto;
}
div.header{
width: 100%;
height: 150px;
background: url('http://www.mymegaupload.de/download/header.png') #efefef repeat-x scroll center center;
border: 1px #666 solid;
border-bottom: 0;
}
div.menu{
width: 100%;
height: 40px;
border: 1px #666 solid;
background: #efefef;
border-top: 0;
}
div.body{
width: 980px;;
min-height: 400px;
border: 1px #666 solid;
border-top: 0;
background: #efefef;
padding: 10px;
}
a.menu{
color: #000;
display: block;
padding: 10px 10px 0px 10px;
text-decoration:none;
background: #fff;
border-right: 1px #666 solid;
min-width: 100px;
height: 30px;
text-align: center;
float: left;
}
a.menu:hover{
background: #2bb0ed;
}
div.welcome_user{
width: 99%;
text-align: right;
height: 25px;
margin-top: 125px;
}
table.profil{
width: 450px;
border: 1px #666 solid;
border-radius: 12px;
margin: auto;
background: #f0f0f0;
margin-top: 5%;
padding: 10px;
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1),
-1px 1px 4px rgba(0, 0, 0, 0.1),
1px -1px 4px rgba(0, 0, 0, 0.1),
-1px -1px 4px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1),
-1px 1px 4px rgba(0, 0, 0, 0.1),
1px -1px 4px rgba(0, 0, 0, 0.1),
-1px -1px 4px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1),
-1px 1px 4px rgba(0, 0, 0, 0.1),
1px -1px 4px rgba(0, 0, 0, 0.1),
-1px -1px 4px rgba(0, 0, 0, 0.1);
}
.error{
color: #aa0000;
}
.noterror{
color: #00aa00;
}
</style>
</head>
<body>
<div class="main">
<div class="header">
<div class="welcome_user"><strong><?php echo $admin->get_nicename(); ?></strong></div>
</div>
<div class="menu">
<a onclick="javascript:window.location.href='home.php'" value="home" class="menu">Home</a>
<a onclick="javascript:window.location.href='tool.php'" value="tool" class="menu">Server Tool</a>
<a onclick="javascript:window.location.href='logout.php'" value="logout" class="menu">Logout</a>
</div>
<?php
/*
if(isset($_POST['sgkick']))
{
$sgkicker= $_POST['sgkick'];
}
else
{
$sgkicker= $_POST['sgkick'];
}
if(isset($_POST['prebuy']))
{
$prebuys = $_POST['prebuy'];
}
else
{
$prebuys = $_POST['prebuy'];
}
if(isset($_POST['waffek1']))
{
$waffek1 = $_POST['waffek1'];
}
else
{
$waffe1= 0;
}
if(isset($_POST['waffek2']))
{
$waffe2 = $_POST['waffek2'];
}
else
{
$waffe2= 0;
}
if(isset($_POST['waffek3']))
{
$waffe3 = $_POST['waffek3'];
}
else
{
$waffe3= 0;
}
if(isset($_POST['waffek4']))
{
$waffe4 = $_POST['waffek4'];
}
else
{
$waffe4= 0;
}
if(isset($_POST['waffe4']))
{
$waffek4 = $_POST['waffe4'];
}
else
{
$waffek4= 0;
}
if(isset($_POST['waffe3']))
{
$waffek3 = $_POST['waffe3'];
}
else
{
$waffek3= 0;
}
if(isset($_POST['waffe2']))
{
$waffek2 = $_POST['waffe2'];
}
else
{
$waffek2= 0;
}
if(isset($_POST['waffe1']))
{
$waffek1 = $_POST['waffe1'];
}
else
{
$waffek1= 0;
}
if(isset($_SESSION['maxrecon']))
{
$maxrecon = $_SESSION['maxrecon'];
}
else
{
$maxrecon= 0;
}
if(isset($_POST['maxmedic']))
{
$maxmedic = $_POST['maxmedic'];
}
else
{
$maxmedic= 0;
}
if(isset($_POST['maxengi']))
{
$maxengi = $_POST['maxengi'];
}
else
{
$maxengi= 0;
}
if(isset($_POST['maxassi']))
{
$maxassi = $_POST['maxassi'];
}
else
{
$maxassi= 0;
}
if(isset($_POST['minlevel']))
{
$minlevel = $_POST['minlevel'];
}
else
{
$minlevel= -2;
}*/
$datenbank = mysql_connect(, or die ("Verbindung fehlgeschlagen: ".mysql_error());
mysql_select_db('tool');
$id = 0;
if(strpos($_SESSION['admin_login'], "swashata") !== false)
{
$id = 1;
}
if(strpos($_SESSION['admin_login'], "3EServer1") !== false)
{
$id = 1;
}
if(strpos($_SESSION['admin_login'], "3EServer2") !== false)
{
$id = 2;
}
if(strpos($_SESSION['admin_login'], "3EServer3") !== false)
{
$id = 3;
}
if(strpos($_SESSION['admin_login'], "BUGServer") !== false)
{
$id = 6;
}
if(strpos($_SESSION['admin_login'], "WOGServer") !== false)
{
$id = 5;
}
if(strpos($_SESSION['admin_login'], "UGSServer") !== false)
{
$id = 4;
}
$sql_befehl = "UPDATE tool SET sgkick=$sgkicker, prebuy=$prebuys, minlevel=$minlevel, maxrecon=$maxrecon, maxassi=$maxassi, maxengi=$maxengi, maxmedic=$maxmedic WHERE id = '".$id."'";
$speich=mysql_query($sql_befehl) or die("Fehler: ".mysql_error());
mysql_close();
if($speich)
{
$error = "Sucessfull!";
} else {
$error = "ERROR!";
}
if($id == 0)
{
$error = "You are not activated to Edit anything!";
}
?>
<body>
<div class="body">
<h3 align="center"><br/></h3>
<table class="profil" cellpadding="4" cellspacing="0">
<tr>
<td><?php echo $error; ?></td>
<td></td>
<td></td>
<td><input type="button" onclick="javascript:window.location.href='home.php'" value="Continue" /></td>
</tr>
</body>
</html>
Alles anzeigen
Das da bei der save.php Sachen auskommentiert wurden und bei edit.php hinzugefügt weis ich, da habe ich rumprobiert.
Ich bin den Schritten gefolgt doch komme nicht weiter --> Im Forum fragen.
Bitte um schnelle Hilfe
MfG