				<div class="postui post-title">
	<h2><span>Adăugare itm/Itemshop</span></h2>
</div>
<div class="postui post-con">
	<div class="con-wrap">
	
<?PHP
include("inc/drepturi.php");
if(isset($_SESSION['user']) && isset($_SESSION['pass']) && $_SESSION['admin'] >=$drepturi['adauga_itm'])
{
include 'inc/daten.inc.php';
?>


<h4></h4>

<?PHP
 
    if(isset($_POST['submit']) && $_POST['submit']=="Creaza") {
	
	
 	
            $sqlCmd="INSERT INTO itemshop.itemshop
            (itemid,itemname,beschreibung,value,coins,jd,cat,socket0,socket1,socket2,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6)
              VALUES
              ('".$_POST['COD']."','".$_POST['Name']."','".$_POST['desc']."','".$_POST['COD']."','".$_POST['monede']."','".$_POST['jetoane']."','".$_POST['cat']."','".$_POST['socket0']."','".$_POST['socket1']."','".$_POST['socket2']."','".$_POST['boni0']."','".$_POST['boniv0']."','".$_POST['boni1']."','".$_POST['boniv1']."','".$_POST['boni2']."','".$_POST['boniv2']."','".$_POST['boni3']."','".$_POST['boniv3']."','".$_POST['boni4']."','".$_POST['boniv4']."','".$_POST['boni5']."','".$_POST['boniv5']."','".$_POST['boni6']."','".$_POST['boniv6']."')";
            $sqlQry = mysql_query($sqlCmd) or die(mysql_error());

			 if($sqlQry) {
              echo succes("Itemul a fost adăugat cu succes!");
            }
		}
  
  
  
?>
<form action="" method="POST">
  <table>
    <tr>
      <th class="topLine">Cod Item:</th>
      <td class="tdunkel"><input type="text" name="COD" size="11" value="" maxlength="11" class="iRg_input"/></td>
    </tr>
	
	    <tr>
      <th class="topLine">Nume Item:</th>
      <td class="tdunkel"><input type="text" name="Name" size="11" value="" maxlength="11" class="iRg_input"/></td>
    </tr>
	
		    <tr>
      <th class="topLine">Descriere:</th>
      <td class="tdunkel"><input type="text" name="desc" size="50" value="" maxlength="200" class="iRg_input"/></td>
    </tr>
	
	
			    <tr>
      <th class="topLine">Monede dragon:</th>
      <td class="tdunkel"><input type="text" name="monede" size="11" value="0" maxlength="11" class="iRg_input"/></td>
    </tr>
	
				    <tr>
      <th class="topLine">Jetoane dragon:</th>
      <td class="tdunkel"><input type="text" name="jetoane" size="11" value="0" maxlength="11" class="iRg_input"/></td>
    </tr>
	
	    <tr>
		
				    <tr>
      <th class="topLine">Categoria:</th>
      <td class="tdunkel"><input type="text" name="cat" size="11" value="" maxlength="11" class="iRg_input"/></td>
    </tr>
	
    </tr>
	
	

    <tr>
      <th class="topLine">Stone #1:</th>
      <td class="thell">
        <select name="socket0"  class="iRg_input">
          <?PHP
            foreach($itemSteine AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
      </td>
    </tr>
    <tr>
      <th class="topLine">Stone #2:</th>
      <td class="tdunkel">
        <select name="socket1"  class="iRg_input">
          <?PHP
            foreach($itemSteine AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
      </td>
    </tr>
    <tr>
      <th class="topLine">Stone #3:</th>
      <td class="thell">
        <select name="socket2"  class="iRg_input">
          <?PHP
            foreach($itemSteine AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
      </td>
    </tr>
    <tr>
      <th class="topLine">Bonus #1:</th>
      <td class="tdunkel">
        <select name="boni0"  class="iRg_input">
          <?PHP
            foreach($itemBoni AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
        <input type="text" name="boniv0" size="6" maxlength="6"  class="iRg_input"/>
      </td>
    </tr>
    <tr>
      <th class="topLine">Bonus #2:</th>
      <td class="thell">
        <select name="boni1"  class="iRg_input">
          <?PHP
            foreach($itemBoni AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
        <input type="text" name="boniv1" size="6" maxlength="6"  class="iRg_input"/>
      </td>
    </tr>
    <tr>
      <th class="topLine">Bonus #3:</th>
      <td class="tdunkel">
        <select name="boni2" class="iRg_input">
          <?PHP
            foreach($itemBoni AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
        <input type="text" name="boniv2" size="6" maxlength="6"  class="iRg_input"/>
      </td>
    </tr>
    <tr>
      <th class="topLine">Bonus #4:</th>
      <td class="thell">
        <select name="boni3"  class="iRg_input">
          <?PHP
            foreach($itemBoni AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
        <input type="text" name="boniv3" size="6" maxlength="6"  class="iRg_input"/>
      </td>
    </tr>
    <tr>
      <th class="topLine">Bonus #5:</th>
      <td class="tdunkel">
        <select name="boni4" class="iRg_input">
          <?PHP
            foreach($itemBoni AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
        <input type="text" name="boniv4" size="6" maxlength="6"  class="iRg_input"/>

      </td>
    </tr>
    <tr>
      <th class="topLine">Bonus #6:</th>
      <td class="thell">
        <select name="boni5"  class="iRg_input">
          <?PHP
            foreach($itemBoni AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
        <input type="text" name="boniv5" size="6" maxlength="6"  class="iRg_input"/>
      </td>
    </tr>
    <tr>
      <th class="topLine">Bonus #7:</th>
      <td class="tdunkel">
        <select name="boni6"  class="iRg_input">
          <?PHP
            foreach($itemBoni AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
        <input type="text" name="boniv6" size="6" maxlength="6"  class="iRg_input"/>
      </td>
    </tr>
    <tr>
      <th class="topLine" colspan="2" style="text-align:center;">
      <br /><input type="submit" value="Creaza" name="submit" class="buton"/> &bull; <input type="reset" value="Reset" class="buton"/></th>
    </tr>
  </table>
</form>
<?php } else { echo error("Zona restrictionata.Drepturi de acces insuficiente.");}?><a href="index.php?page=panou-admin">&laquo; Inapoi la panou administrare</a>

		</div>						
</div> 							
<div class="postui post-end"></div>
