? GR0V Shell

GR0V shell

Linux node1.dnscloudserver.in 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64

Path : /home/yogsadhna/public_html/admin/
File Upload :
Current File : /home/yogsadhna/public_html/admin/editProduct.php

<? include "include/header.php";
if($_POST)
{
extract($_POST);
echo $new;

$obj->query("update product set `proName`='$name', `isbn`='$isbn',`author`='$author',`publisher`='$publisher',`year`='$year',`pages`='$pages',`price`='$price',`new`='$new',`best`='$best',`forth`='$forth',`award`='$award',`flash`='$flash',`bestseller`='$bestseller' where `productId`='".$_GET['eid']."'");
if($_FILES['image1']['name'])
{
$imageName=$_GET['id']."-".$_FILES['image1']['name'];
$source=$_FILES['image1']['tmp_name'];
 move_uploaded_file($source, "product_images/".$imageName);
 $obj->query("update product set `proImage`='$imageName' where `productId`='".$_GET['eid']."'");

}
if($_FILES['imagethum']['name'])
{
$imageName=$_GET['id']."-".$_FILES['imagethum']['name'];
$source=$_FILES['imagethum']['tmp_name'];
move_uploaded_file($source, "produt_thum/".$imageName);
$obj->query("update product set `proThum`='$imageName' where `productId`='".$_GET['eid']."'");
}
}
if($_GET['id'])
{ 
$res=$obj->query("select * from category where `catId`='".$_GET['id']."'");
$cat=$obj->fetch_query($res);
$results=$obj->query("select * from product where `productId`='".$_GET['eid']."'");
$rows=$obj->fetch_query($results);
}
?>
   <!--main page-->
  <?
function check()
  {
   echo "hidsf";
  }
  ?>

   <link href="style.css" rel="stylesheet" type="text/css">
   
   
  	     <table width="100%" border="0" cellspacing="2" cellpadding="3">
           <tr>
             <td width="20%" class="border" valign="top"><? include "include/leftmenu.php" ?></td>
             <td bgcolor="#e6e4ef" id="welcomenote" valign="top">
			 <table cellpadding="5" cellspacing="0" border="0"  class="normaltext" align="center" width="80%">
			   <tr bgcolor="#FFFFFF" height="30"><td align="center" colspan="2"><strong>Edit <?=$cat->catName?> Product</strong></td></tr>
			   <tr height="40"><td colspan="2" id="error">&nbsp;<?=$msg?></td></tr>
			   <form name="product" action="" method="post" onSubmit="return validproduct()" enctype="multipart/form-data">
			   <tr bgcolor="#EEEEEE"><td class="textboxcap">Name Of Product</td>
			     <td><input name="name"  type="text" class="inputboxp" value="<?=$rows->proName?>"></td>
			   </tr>
			   <tr><td colspan="2">&nbsp;</td></tr>
  <tr bgcolor="#EEEEEE"><td class="textboxcap">ISBN</td>
			     <td><input name="isbn"  type="text" class="inputboxp" value="<?=$rows->isbn?>"></td>
			   </tr>
			   <tr><td colspan="2">&nbsp;</td></tr>
               
               <tr bgcolor="#EEEEEE"><td class="textboxcap">author</td>
			     <td><input name="author"  type="text" class="inputboxp" value="<?=$rows->author?>"></td>
			   </tr>
			   <tr><td colspan="2">&nbsp;</td></tr>
               
                 <tr bgcolor="#EEEEEE"><td class="textboxcap">Publisher</td>
			     <td><input name="publisher"  type="text" class="inputboxp" value="<?=$rows->publisher?>"></td>
			   </tr>
			   <tr><td colspan="2">&nbsp;</td></tr>
               
                 <tr bgcolor="#EEEEEE"><td class="textboxcap">Year</td>
			     <td><input name="year"  type="text" class="inputboxp" value="<?=$rows->year?>"></td>
			   </tr>
			   <tr><td colspan="2">&nbsp;</td></tr>
               
                   <tr bgcolor="#EEEEEE"><td class="textboxcap">Pages</td>
			     <td><input name="pages"  type="text" class="inputboxp" value="<?=$rows->pages?>"></td>
			   </tr>
			   <tr><td colspan="2">&nbsp;</td></tr>
               
                <tr bgcolor="#EEEEEE"><td class="textboxcap">Price</td>
			     <td><input name="price"  type="text" class="inputboxp" value="<?=$rows->price?>"></td>
			   </tr>
			   <tr><td colspan="2">&nbsp;</td></tr>
               
                 <tr bgcolor="#EEEEEE"><td class="textboxcap">Binding</td>
			     <td><input type="checkbox" name="hardbound" id="checkbox" value="1" />
			     Hardbound 
			     <input type="checkbox" name="paperback" id="checkbox2"  value="1"/>
			     Paperback</td>
			   </tr>
                <tr><td colspan="2">&nbsp;</td></tr>
               <tr bgcolor="#EEEEEE">
			     <td class="textboxcap">Features</td>
			     <td><label>
                 
			       <input type="checkbox" name="new" id="check1"  <? if($rows->new=='1'||$rows->new=='on') { echo 'checked="checked"';}?> onclick="if(this.checked){value="1";} else {value="0"; exit;}"/>
			     New Release 
			     <input type="checkbox" name="best" id="checkbox3" <? if($rows->best=='1'||$rows->best=='on') { echo 'checked="checked"';}?> <? if($rows->best=='1') { echo 'checked="checked"';}?> onclick="if(this.checked){value="1";} else {value="0"; exit;}"/>
			     Bestselling
			      <br />
		         <input type="checkbox" name="forth" id="checkbox2" value="1" <? if($rows->forth=='1'||$rows->forth=='on') { echo 'checked="checked"';}?> onclick="if(this.checked){value="1";} else {value="0"; exit;}"/>
			      Forthcoming<br />
                <input type="checkbox" name="award" id="checkbox4" value="1" <? if($rows->award=='1'||$rows->award=='on') { echo 'checked="checked"';}?> onclick="if(this.checked){value="1";} else {value="0"; exit;}"/>
			      Award
			     Winning Book</label></td>
               </tr>
                <tr><td colspan="2">&nbsp;</td></tr>
               <tr bgcolor="#EEEEEE">
			     <td class="textboxcap">HomePage Display</td>
			     <td><label>
                 
			       <input type="checkbox" name="flash" id="check1"  <? if($rows->flash=='1'||$rows->flash=='on') { echo 'checked="checked"';}?> onclick="if(this.checked){value="1";} else {value="0"; exit;}"/>
			     Flash Gallery[15]
			     <input type="checkbox" name="bestseller" id="checkbox3" <? if($rows->bestseller=='1'||$rows->bestseller=='on') { echo 'checked="checked"';}?> <? if($rows->bestseller=='1') { echo 'checked="checked"';}?> onclick="if(this.checked){value="1";} else {value="0"; exit;}"/>
			     Bestseller
			      [6]<br />
		         <br />
			     </label></td>
               </tr>
               
			   <tr><td colspan="2">&nbsp;</td></tr>
			   <tr bgcolor="#EEEEEE"><td class="textboxcap">Upload Image</td><td><input name="image1" type="file" class="inputbox" value=""><br /><?=$rows->proImage ?></td></tr>
			   <tr><td colspan="2">&nbsp;</td></tr>
			   <tr bgcolor="#EEEEEE"><td class="textboxcap">Upload Thumbnail</td><td><input name="imagethum" type="file" class="inputbox" value=""><br /><?=$rows->proThum?></td></tr>
			   <tr height="40"><td colspan="2">&nbsp;</td></tr>
			   <tr><td colspan="2" align="center">
			   <input type="hidden" value="<?=$cat->catId?>" name="ptype">
			   <input name="submit"  type="image" src="images/Submit.jpg" class="submitbox" value="Submit"></td></tr>
			   </form>
			   </table>
			 </td>
           </tr>
        </table>
 <!--end main page-->
	  <? include "include/footer.php";?>

T1KUS90T
  root-grov@65.21.25.53:~$