0byt3m1n1
Path:
/
data
/
17
/
1
/
18
/
11
/
1670011
/
user
/
1801231
/
htdocs
/
customtanningbed_dot_com_bc
/
admin
/
[
Home
]
File: Lotion_Package.php
<?php session_start(); $a2=$_SESSION['admin']; if($a2!=1) { echo "You are restricted to enter"; include("index.php");exit(); } include_once("config.php"); include("FCKeditor/fckeditor.php"); $oFCKeditor = new FCKeditor('content_text'); // Text field name where data should be stored ... Text Field $oFCKeditor->BasePath = 'FCKeditor/' ; $id=$_REQUEST['id']; if(!isset($id)) $id="main"; function edit() { $f1=$_FILES['thumb']['name']; $pro=$_REQUEST['content_text']; $tem_f1=$_FILES['thumb']['tmp_name']; $des_f1="../images/DYOP/".$f1; $sql="select * from lotion_package "; $rs1=mysql_query($sql); $row=mysql_fetch_array($rs1); if(empty($f1)) { $des_f1=$row['image']; } else { move_uploaded_file($tem_f1,$des_f1); } $sql1="update lotion_package set `image`='$des_f1', `product`='$pro'"; $rs=mysql_query($sql1); } function add() { $f1=$_FILES['thumb']['name']; $pro=$_REQUEST['content_text']; $tem_f1=$_FILES['thumb']['tmp_name']; $des_f1="../images/DYOP/S".$f1; $option=$_REQUEST['option']; move_uploaded_file($tem_f1,$des_f1); $sql="insert into lotion_package(`image`,`product`,`option`)values('$des_f1','$pro','$option')"; $rs=mysql_query($sql); } function del() { $id=$_REQUEST['mode']; $sql="delete fromlotion_package where `id`='$id'"; $rs=mysql_query($sql); } function editb() { $id=$_REQUEST['mode']; $option=$_REQUEST['option'];//echo $id; $sql="select * from tanningonline_lotionoption where `id`='$id'"; $rs1=mysql_query($sql); $row=mysql_fetch_array($rs1); if(empty($option)) { $option=$row['option']; } $sql1="update tanningonline_lotionoption set `option`='$option' where `id`='$id'"; $rs=mysql_query($sql1); } function addb() { $option=$_REQUEST['option']; $sql="insert into tanningonline_lotionoption(`option`)values('$option')"; $rs=mysql_query($sql); } function delb() { $id=$_REQUEST['mode']; $sql="delete from tanningonline_lotionoption where `id`='$id'"; $rs=mysql_query($sql); } if($_REQUEST['id']=="addrecord") { add();$id="main"; } if($_REQUEST['id']=="addbuck") { addb(); $id="main"; } if($_REQUEST['id']=="editbuck") { editb(); $id="main"; } if($_REQUEST['id']=="deloption") { delb(); $id="main"; } if($_REQUEST['id']=="del") { del();$id="main"; } if($_REQUEST['id']=="edit1") { edit(); $id="main"; } ?> <!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=iso-8859-1" /> <title>CUSTOM TANNING BED ADMIN PANEL</title> <link href="adminCSS.css" rel="stylesheet" type="text/css" /> </head> <body> <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="mainTableBorder"> <tr> <?php include_once("header.php")?> </tr> <tr> <td align="center" valign="top" class="menuItemsDeco"><?php include_once("menu.php")?><!--<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" class="mainSection">Menu Heads </td> </tr> <tr> <td> </td> </tr> <tr> <td class="menuHeader"><a href="Tropical_Rayz_SF_Series.php">Tropical Rayz SF Series</a></td> </tr> <tr> <td class="menuHeader"><a href="Tropical_Rayz_BF_Series.php">Tropical Rayz BF Series</a></td> </tr> <tr> <td class="menuHeader"><a href="Tropical_Rayz_WB_Series.php">Tropical Rayz WB Series</a></td> </tr> <tr> <td > </td> </tr> <tr> <td class="menuHeader"><a href="Perfect_Tan_SF_Series.php">Perfect Tan SF Series</a></td> </tr> <tr> <td class="menuHeader"><a href="Perfect_Tan_BF_Series.php">Perfect Tan BF Series</a></td> </tr> <tr> <td class="menuHeader"><a href="Perfect_Tan_WB_Series.php">Perfect Tan WB Series</a></td> </tr> <tr> <td> </td> </tr> <tr> <td align="center" valign="middle" class="menuHeader">Most Popular Package </td> </tr> <tr> <td class="submenuItem"><a href="Complete_ 7_ Bed_ Package.php">Complete 7 Bed Package</a></td> </tr> <tr> <td class="submenuItem"><a href="Complete_ 6_ Bed_ Package.php">Complete 6 Bed Package</a></td> </tr> <tr> <td class="submenuItem"><a href="Complete_ 5_ Bed_ Package.php">Complete 5 Bed Package</a></td> </tr> <tr> <td class="submenuItem"><a href="Complete_ 4_ Bed_ Package.php">Complete 4 Bed Package</a></td> </tr> <tr> <td class="submenuItem"><a href="Complete_ 3_ Bed_ Package.php">Complete 3 Bed Package</a></td> </tr> <tr> <td class="submenuItem"><a href="Complete_ 2_ Bed_ Package.php">Complete 2 Bed Package</a></td> </tr> <tr> <td> </td> </tr> <tr> <td align="center" valign="middle" class="menuHeader">Design Your Own Package </td> </tr> <tr> <td class="submenuItem"><a href="Choices_ Eqiupment.php">Choices Eqiupment</a></td> </tr> <tr> <td class="submenuItem"><a href="Salon_Walls.php">Salon Walls</a></td> </tr> <tr> <td class="submenuItem"><a href="Corporate_Identity_Package.php">Corporate Identity Package</a></td> </tr> <tr> <td class="submenuItem"><a href="Single_Room_Timer.php">Single Room Timer</a></td> </tr> <tr> <td class="submenuItem"><a href="Salon_Software.php">Salon Software</a></td> </tr> <tr> <td class="submenuItem"><a href="Lotion_Package.php">Lotion Package</a></td> </tr> <tr> <td class="submenuItem"><a href="E-Book.php">E-Book: How-To-Open-A-Salon</a></td> </tr> <tr> <td class="submenuItem"><a href="POS_ System.php">POS System</a></td> </tr> <tr> <td class="submenuItem"><a href="Wireless_Timing_System.php">Wireless Timing System</a></td> </tr> <tr> <td class="submenuItem"><a href="UV_Light_Meter.php">UV Light Meter</a></td> </tr> <tr> <td class="submenuItem"><a href="Freight_Factory_ Install.php">Freight+Factory Install</a></td> </tr> <tr> <td class="submenuItem"><a href="Buck_Boosters.php">Buck Boosters</a></td> </tr> <tr> <td class="submenuItem"><a href="Freight_Tailagte_Delivery.php">Freight-Tailagte Delivery</a></td> </tr> <tr> <td class="submenuItem"><a href="T-Max_Controller.php">T-Max Controller</a></td> </tr> <tr> <td class="submenuItem"><a href="Starte_ Package_Salon_Accessories.php">Starter Package: Salon Accessories</a></td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table>--></td> <td align="left" valign="top" class="dataArea"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><span class="menuHeader">Most Popular Package<br /> </span></td> </tr> <tr> <td align="center"></td> </tr><?php if($id=="main"){?> <tr> <td align="center" class="productTitile">Lotion Package</td> </tr> <tr> <td class="productInnerBoder"><form id="form3" name="form3" method="post" action=""> <input name="" type="hidden" value="" /> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr class="containHeader"> <td width="20%" align="center">Product Picture </td> <td width="36%" align="center">Product Description </td> <td width="27%" align="center">Edit</td> </tr> <?php $sql1="select * from lotion_package"; $rs=mysql_query($sql1); while($row=mysql_fetch_array($rs)) { ?> <tr> <td align="center" valign="top"><img src="<?php echo $row['image']?>" alt="" name="imageField" width="120" height="100" id="imageField" /></td> <td align="center" valign="top"><?php echo $row['product']?> </td> <td align="center" valign="top"><a href="Lotion_Package.php?id=editrec">Edit</a></td> </tr><?php }?> <tr> <td align="left" valign="top"> </td> <td align="left" valign="top"> </td> <td align="left" valign="top"> </td> </tr> </table> </form> </td> </tr> <!-- <td align="center"><span class="buttomDeco"><a href="Salon_Walls.php?id=addrec">Add Now </a></span></td>--> <td> </tr> <tr> <td align="center" class="productTitile">Your Option</td> </tr> <tr> <td class="productInnerBoder"><form action="<?php echo $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data" name="form2" id="form2"> <input type="hidden" name="id" value="edit" /> <input type="hidden" name="mode" value="<?php echo $id?>" /> <table width="100%" border="0" align="center" cellpadding="05" cellspacing="0"> <tr> <td width="46%">Option</td> <td width="18%"><label></label> Edit </td> <td width="36%">Delete</td> </tr> <?php $sql3="select * from tanningonline_lotionoption"; $rs3=mysql_query($sql3); while($row3=mysql_fetch_array($rs3)){ ?> <tr> <td><?php echo $row3['option']?></td> <td><label><a href="Lotion_Package.php?id=editoption&mode=<?php echo $row3['id'] ?>">Edit</a></label></td> <td><a href="Lotion_Package.php?id=deloption&mode=<?php echo $row3['id']?>">Delete</a></td> </tr><?php }?> </table> <p><a href="Lotion_Package.php?id=addoption">Add</a></p> </form> <p> <?php }?> </p> <?php if($id==="addoption") {?> <form name="frm" method="post" action="<?php $_SERVER['PHP_SELF'] ?>"> <p> <input type="hidden" name="id" value="addbuck" /> </p> <table class="productInnerBoder" width="46%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center" class="productTitile" colspan="2">Add Option</td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td width="45%"><strong>Add your new option </strong></td> <td width="55%"><label> <input name="option" type="text" id="option" /> </label> </td> </tr> <tr> <td colspan="2" align="center"> </td> </tr> <tr> <td align="center"><label></label> </td> <td align="left"><input name="submit" type="submit" value="ADD OPTIONS" /></td> </tr> </table> <p> </p> </form> <?php }?> <p> </p> <?php if($id=="editoption") { $id=$_REQUEST['mode']; $sql4="select * from tanningonline_lotionoption where `id`='$id'"; $rs4=mysql_query($sql4); $row4=mysql_fetch_array($rs4);?> <form action="<?php $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data" name="form2" id="form2"> <p> <input type="hidden" name="mode" value="<?php echo $id; ?>" /> <input type="hidden" name="id" value="editbuck" /> </p> <table class="productInnerBoder" width="60%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" align="center" class="productTitile">Edit Option</td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td width="39%">Edit your option value</td> <td width="61%"><label> <input name="option" type="text" id="option3" value="<?php echo $row4['option']?>"/> </label> </td> </tr> <tr> <td align="center"> </td> <td align="left"> </td> </tr> <tr> <td align="center"><label></label> </td> <td align="left"><input name="submit2" type="submit" value="EDIT YOUR OPTION" /></td> </tr> </table> <p> </p> </form><?php }?> <tr> <td align="center"> </td> </tr> <tr> <td align="center"> </td> </tr> <tr> <td align="center"> </td> </tr> <?php if($id=="editrec"){ $id1=$_REQUEST['mode'];?> <tr> <td align="center" class="productTitile">Lotion Package</td> </tr> <tr> <?php $sql1="select * from lotion_package"; $rs=mysql_query($sql1); $row=mysql_fetch_array($rs); ?> <td class="productInnerBoder"><form action="<?php echo $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data" name="form2" id="form2"> <input type="hidden" name="id" value="edit1" /> <table width="100%" border="0" align="center" cellpadding="05" cellspacing="0"> <tr> <td width="20%">Upload Your Image </td> <td width="80%"><label> <input type="file" name="thumb" /> </label></td><td><img src="<?php echo $row['image']?>" width="100" height="70" /></td> </tr> <tr> <td>Product Description </td> <td><label> <?php $oFCKeditor->Value=$row['product']; // You can put initial data at here to display $oFCKeditor->Create() ; ?> </label></td> </tr> <tr> <td> </td> <td><label> <input type="submit" name="Submit" value="Submit" /> </label></td> </tr> </table> </form> <?php }?> </td> </tr> <tr> <td> </td> </tr> <?php if($id=="addrec"){?> <tr> <td align="center" class="productTitile">Lotion Package</td> </tr> <tr> <td><form action="<?php $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data" name="form2" id="form2"> <input type="hidden" name="id" value="addrecord" /> <table width="100%" border="0" align="center" cellpadding="05" cellspacing="0"> <tr> <td width="20%">Upload Your Image </td> <td width="80%"><label> <input type="file" name="thumb" /> </label></td> </tr> <tr> <td>Product Description </td> <td><label> <?php $oFCKeditor->Value=''; // You can put initial data at here to display $oFCKeditor->Create() ; ?> </label></td> </tr> <tr> <td>Add Room </td> <td><label> <input type="text" name="option" /> </label></td> </tr> <tr> <td>Delete Room </td> <td><select name="select2" class="selectDeco"> <option>Select Room</option> <option value="1 Room">1 Room</option> <option value="2 Room">2 Room</option> <option value="3 Room">3 Room</option> <option value="4 Room">4 Room</option> <option value="5 Room">5 Room</option> <option value="7 Room">6 Room</option> <option value="8 Room">8 Room</option> </select></td> </tr> <tr> <td> </td> <td><label> <input type="submit" name="Submit22" value="Submit" /> </label></td> </tr> </table> </form></td><?php } ?> </tr> </table></td> </tr> </table> <?php include_once("poweredby.php")?> </body> </html>