⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 add.php

📁 Time 4 Crime online
💻 PHP
字号:
<? 
$title = "Admin Panel ][ Voeg wapens/Armor toe!"; 
include("header.php"); 

if($stat['rank'] != "Admin") 
{ 
    print "You're not an admin."; 
    include("footer.php"); 
    exit; 
} 

echo "<a href=\"add.php?view=wapen\">Wapen</a> | <a href=\"add.php?view=armor\">Armor</a>"; 

if($_GET['view'] == "wapen") 
{ 
?> 

<br><br>Je voegt nu een <b>wapen</b> toe:<br> 

<form method="POST" action="add.php?view=wapen&step=add"> 
<input name="owner" type="hidden" value="0"> 
<input name="status" type="hidden" value="S"> 
<input name="type" type="hidden" value="W"> 

<? 
    // Hier boven maakt hij het wapen aan...! 
?> 

<table width="100%" border="0" cellpadding="0" cellspacing="0"> 
  <tr> 
    <td width="50%">Wapen naam:</td> 
    <td width="50%"> <input name="name" type="text"></td> 
  </tr> 
  <tr> 
    <td width="50%">Wapen power: </td> 
    <td width="50%"><input name="power" type="text"></td> 
  </tr> 
  <tr> 
    <td width="50%">Wapen prijs: </td><td width=50%> 
    <input name="cost" type="text"></td> 
  </tr> 
</table> 

<input type="submit" value="Klaar"> 
</form> 

<br><br>Made By: <a href=http://www.hardmp3.nl>Hardmp3.nl</a> 

<? 
    if($_POST['step'] == "add") 
    { 
        include("config.php"); 

        mysql_query("INSERT INTO equipment (name, power, cost, owner, status, type) VALUES ('" . $_POST['name'] . "','" . $_POST['power'] . "','" . $_POST['cost'] . "','" . $_POST['owner'] . "','S','W')") or die("Mislukt."); 

        echo "Okeey<br>\n"; 
        echo "Het wapen <b>" . $_POST['name'] . "</b> is succes vol toegevoegd.<br>\n"; 
        echo "<b>" . $_POST['name'] . "</b> heeft een kracht van <b>" . $_POST['power'] . "</b>,"; 
        echo "en kost <b>" . $_POST['cost'] . "</b> geld!"; 
    } 
} 

if($_GET['view'] == "armor") 
{ 
?> 

<br><br>Je voegt nu een <b>Armor</b> toe:<br> 

<form method="POST" action="add.php?view=armor&step=add"> 
<input name="owner" type="hidden" value="0"> 
<input name="status" type="hidden" value="S"> 
<input name="type" type="hidden" value="A"> 

<? 
    // Hier boven maakt hij de armor aan...! 
?> 

<table width="100%" border="0" cellpadding="0" cellspacing="0"> 
  <tr> 
    <td width="50%">Armor naam:</td> 
    <td width="50%"> <input name="name" type="text"></td> 
  </tr> 
  <tr> 
    <td width="50%">Armor power: </td> 
    <td width="50%"><input name="power" type="text"></td> 
  </tr> 
  <tr> 
    <td width="50%">Armor prijs: </td> 
    <td width="50%"><input name="cost" type="text"></td> 
  </tr> 
</table> 

<input type="submit" value="Klaar"> 
</form> 

<br><br>Made By: <a href=http://www.hardmp3.nl>Hardmp3.nl</a> 

<? 
    if($_POST['step'] == "add") 
    { 
           include("config.php"); 

        mysql_query("INSERT INTO equipment (name, power, cost, owner, status, type) VALUES ('" . $_POST['name'] . "','" . $_POST['power'] . "','" . $_POST['cost'] . "','" . $_POST['owner'] . "','S','A')") or die("Mislukt."); 

        echo "Okeey<br>\n"; 
        echo "De armor <b>" . $_POST['name'] . "</b> is succes vol toegevoegd.<br>\n"; 
        echo "<b>" . $_POST['name'] . "</b> heeft een kracht van <b>" . $_POST['power'] . "</b>,"; 
        echo "en kost <b>" . $_POST['cost'] . "</b> geld!"; 
    } 
} 

include("footer.php"); 
?> 
 
 
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -