| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/rsdgroup/adminPanel/ |
Upload File : |
<?php
include_once("session.php");
include_once("settings.php");
include_once("functions.php");
if($_REQUEST["mode"]=="Edit")
{
$mode="Edit";
$mode2="EDIT";
$mode1="Update";
$id=$_REQUEST['id'];
$rs_tblsite=mysql_query("select * from `tblCategory` where `Category_Id`='$id'");
$array_tblsite=mysql_fetch_array($rs_tblsite);
$Id=$array_tblsite['Category_Id'];
$Species_Id=$array_tblsite['Species_Id'];
$Category_Name=$array_tblsite['Category_Name'];
$Category_Description=$array_tblsite['Category_Description'];
$Benefits_Usage=$array_tblsite['Benefits_Usage'];
$Tag_Line=$array_tblsite['Tag_Line'];
$Category_Image=$array_tblsite['Category_Image'];
$OrderOfApperance=$array_tblsite['OrderOfApperance'];
$banner_image=$array_tblsite['banner_image'];
$Page_title=$array_tblsite['Page_title'];
$Meta_keyword=$array_tblsite['Meta_keyword'];
$Meta_description=$array_tblsite['Meta_description'];
$status=$array_tblsite['status'];
}
else
{
$mode="Add";
$mode2="ADD";
$mode1="Add";
}
?>
<!--<LINK href="mel.css" type=text/css rel=stylesheet>
<LINK href="sdmenu.css" type=text/css rel=stylesheet>
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>--->
<script type="text/javascript">
function validate()
{
var speciesid = document.getElementById("Species_Id").value;
var Category_Name = document.getElementById("Category_Name").value;
if(speciesid === "")
{
alert("Please select brand");
document.getElementById("Species_Id").focus();
return false;
}
if(Category_Name ==="") {
alert("Please select Category Name");
document.getElementById("Category_Name").focus();
return false;
}
return true;
}
</script>
<table width="94%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form action="write_category.php" method="post" enctype="multipart/form-data" name="add_Category_form" onsubmit="return validate();">
<fieldset>
<legend>CATEGORY
<?=$mode2?>
FORM</legend>
<table width="97%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td height="26" class="general" >Brand Name : </td>
<td height="26">
<?=listdisplaydropdownvalues('Species_Id','Species_Id','tblSpecies','Species_Name',$Species_Id);?>
</td>
</tr>
<tr>
<td width="29%" height="26" class="general"> Category Name :</td>
<td width="71%" height="26" ><input name="Category_Name" type="text" class="textfield" id="Category_Name" value="<?=$Category_Name;?>" size="35" maxlength="100"/></td>
</tr>
<tr>
<td height="26" class="general">Image :</td>
<td height="26"><input type="file" name="image" class="textfield"> <?php if($Category_Image!="") { ?><img src="../cat_images/catBg/<?=$Category_Image;?>" width="189" height="81"> <?php } ?></td>
</tr>
<tr>
<td width="29%" height="26" class="general"> Tag Line :</td>
<td width="71%" height="26" ><input name="Tag_Line" type="text" class="textfield" id="Tag_Line" value="<?=$Tag_Line;?>" size="35" maxlength="255"/></td>
</tr>
<tr>
<td height="26" class="general">Description :</td>
<td height="26"> </td>
</tr>
<tr>
<td height="26" colspan='2'>
<?php
include_once("fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor("Category_Description") ;
$oFCKeditor->BasePath = "fckeditor/" ;
$oFCKeditor->Value = @stripslashes(@$Category_Description);
$oFCKeditor->Height = 300 ;
$oFCKeditor->Width = 700 ;
$oFCKeditor->Config['EnterMode'] = 'br';
$oFCKeditor->Create() ;
?>
</td>
</tr>
<tr>
<td width="29%" height="26" class="general">Benefits & Usage :<br/> <span style="color:lightgray;">Separate Points following by '###'</span></td>
<td width="71%" height="26" >
<textarea name="Benefits_Usage" id="Benefits_Usage" rows="10" cols="67"><?php echo isset($Benefits_Usage)?$Benefits_Usage:''; ?></textarea>
</td>
</tr>
<tr>
<td height="26" class="general">Banner Image :</td>
<td height="26"><input type="file" name="banner_image" class="textfield"> <?php if($banner_image!="") { ?><img src="../cat_images/catBannerImage/<?=$banner_image;?>" width="189" height="81"> <?php } ?></td>
</tr>
<tr>
<td width="29%" height="26" class="general"> Order Of Apperance :</td>
<td width="71%" height="26" ><input name="OrderOfApperance" type="text" class="textfield" id="OrderOfApperance" value="<?=$OrderOfApperance;?>" size="35" maxlength="255"/></td>
</tr>
<tr>
<td width="29%" height="26" class="general">Meta Title :<br/></td>
<td width="71%" height="26" >
<textarea name="Page_title" id="Page_title" rows="5" cols="30" size="35" maxlength="255"/><?php echo $Page_title;?></textarea>
</td>
</tr>
<tr>
<td width="29%" height="26" class="general">Meta Keyword :<br/></td>
<td width="71%" height="26" >
<textarea name="Meta_keyword" id="Meta_keyword" rows="5" cols="30" size="35" maxlength="255"/><?php echo $Meta_keyword;?></textarea>
</td>
</tr>
<tr>
<td width="29%" height="26" class="general">Meta Description :<br/></td>
<td width="71%" height="26" >
<textarea name="Meta_description" id="Meta_description" rows="5" cols="30" size="35" maxlength="255"/><?php echo $Meta_description;?></textarea>
</td>
</tr>
<tr>
<td width="29%" height="26" class="general">Status :</td>
<td>
<select name="status" class="textfield" id="status"/>
<option value="Active" <?php if($Status == "Active") { echo "selected";}?>>Active</option>
<option value="Deactive" <?php if($Status == "Deactive") { echo "selected";}?>>Deactive</option>
</select>
</td>
</tr>
<tr align="center">
<td height="26" colspan="2"><label for="label">
<input type="hidden" name="id" value="<?=$_REQUEST['id']?>" />
<input type="submit" name="Submit" value=" Save " class="button" />
<input type="reset" name="Submit" value="Reset" class="button" />
<input name="mode" type="hidden" id="mode" value="<?=$_REQUEST['mode']?>" />
</label></td>
</tr>
</table>
</fieldset>
</form></td>
</tr>
</table>