<!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" />

<?php
include('../include/session.php');


?>
<script language="JavaScript" src="../jscript/md5.min.js"  type="text/javascript"></script> 
<script language="JavaScript" src="../jscript/numbers_only_decimal.js"  type="text/javascript"></script> 
<script language="JavaScript" src="../jscript/gen_validatorv4_2.js"  type="text/javascript" xml:space="preserve"></script>  


<style>
input.imagebutton{
	background-color:#E1E1E1;
	width: 100px;
	height: 24px;
	border:solid;
	border-width:1px;
	border-color:#39A751;
	cursor:pointer;
	color:#000000;
	font:bold 12px Arial;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	-moz-box-shadow:0px 0px 0px #CCC;
	-webkit-box-shadow:0px 0px 0px #CCC;
	box-shadow:0px 0px 0px #CCC;
}

input.imagebutton:hover{
	background-color:#E4E4E4;
	width: 100px;
	height: 24px;
	border:solid;
	border-width:2px;
	border-color:#39A751;
	cursor:pointer;
	color:#000000;
	font:bold 12px Arial;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	-moz-box-shadow:5px 5px 5px #666;
	-webkit-box-shadow:5px 5px 5px #666;
	box-shadow:5px 5px 5px #666;
}

label.label_std{
	margin-left:5px;
    line-height:20px;
	padding-top:6px;
    color:#000;
    text-shadow:1px 1px 1px #fff;
    font:bold 12px Arial;
}

#table_display {
	font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
	color:#000;
	font-size:12px;
	font-weight:normal;
}

input.text200{
    background:#FFF;
    border: 1px solid #12574E;
    padding: 2px;
    width:200px;
	height:20px;
	color:#000;
}
input.text200:focus{
     border-color:#12574E;
}

</style>

<?php

//include('../include/db.php');

$store_item_id = $_GET['store_item_id'];


$table_name = $_SESSION['db_prefix']."_store_items";
$item_name_query = "SELECT item_name  FROM $table_name WHERE store_item_id = '".$store_item_id."' ";
$item_name_result = $con->query($item_name_query);
$row = mysqli_fetch_assoc($item_name_result);
$item_name = $row["item_name"];

?>




<script type="text/javascript">
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
</script>
</head>
<body onload="document.getElementById('password_text').value='';">

<label class="label_std">Rename store item to:</label> <br />
   
    <form action='../edit_windows/store_item_name_edit_save.php' method="GET" name="form2" target="_top" id="form2">
    <table id="table_display">
     <tr>
       <script>recycle_id=[];</script>
      <td align="center">
       <input type="text" name="item_name_text" id="item_name_text" class="text200" value="<?php echo $item_name ?>" autocomplete="off"/></td>
      </tr>
    <tr>
      <td height="45" align="center">
        <input name="store_item_id_text" type="hidden" value="<?php echo $store_item_id ?>" />
      <input name="input" type="submit" value="Rename" class="imagebutton"  />
      <br />
      <br />
      <div style="float:left;"><img src="../images/exclamation_mark_red_small.png" width="20" height="32" /></div>
      <div><label style="color:#F00; font-weight:bold;">Renaming the store item can corrupt data. Use it with care!</label></div></td>
      </tr>
  </table>
</form>

</body>
</html>