| 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 `tblProduct` where `Product_Id`='$id'");
$array_tblsite=mysql_fetch_assoc($rs_tblsite);
$Id=$array_tblsite['Product_Id'];
$Species_Id=$array_tblsite['Species_Id'];
$Category_Id =$array_tblsite['Category_Id'];
$Product_Name=$array_tblsite['Product_Name'];
$Product_Image=$array_tblsite['Product_Image'];
$Product_Header=$array_tblsite['Product_Header'];
$Large_Image=$array_tblsite['Large_Image'];
$Medium_Image=$array_tblsite['Medium_Image'];
$Small_Image=$array_tblsite['Small_Image'];
$Product_Description=$array_tblsite['Product_Description'];
$Benefits_Usage=$array_tblsite['Benefits_Usage'];
$Tag_Line=$array_tblsite['Tag_Line'];
$Benefits=$array_tblsite['Benefits'];
$DOSAGE=$array_tblsite['DOSAGE'];
foreach($array_tblsite as $key=>$value)
{
$$key=$value;
}
}
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>
<script>
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</script>
<script language="javascript" type="text/javascript" src="<?=_WWWROOT?>/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "exact",
elements : "Product_Description",
save_callback : "customSave",
content_css : "example_advanced.css",
extended_valid_elements : "a[href|target|name]",
plugins : "table",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
//invalid_elements : "a",
theme_advanced_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1", // Theme specific setting CSS classes
//execcommand_callback : "myCustomExecCommandHandler",
debug : false
});
// Custom event handler
function myCustomExecCommandHandler(editor_id, elm, command, user_interface, value) {
var linkElm, imageElm, inst;
switch (command) {
case "mceLink":
inst = tinyMCE.getInstanceById(editor_id);
linkElm = tinyMCE.getParentElement(inst.selection.getFocusElement(), "a");
if (linkElm)
alert("Link dialog has been overriden. Found link href: " + tinyMCE.getAttrib(linkElm, "href"));
else
alert("Link dialog has been overriden.");
return true;
case "mceImage":
inst = tinyMCE.getInstanceById(editor_id);
imageElm = tinyMCE.getParentElement(inst.selection.getFocusElement(), "img");
if (imageElm)
alert("Image dialog has been overriden. Found image src: " + tinyMCE.getAttrib(imageElm, "src"));
else
alert("Image dialog has been overriden.");
return true;
}
return false; // Pass to next handler in chain
}
// Custom save callback, gets called when the contents is to be submitted
function customSave(id, content) {
}
</script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "exact",
elements : "Benefits",
save_callback : "customSave",
content_css : "example_advanced.css",
extended_valid_elements : "a[href|target|name]",
plugins : "table",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
//invalid_elements : "a",
theme_advanced_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1", // Theme specific setting CSS classes
//execcommand_callback : "myCustomExecCommandHandler",
debug : false
});
// Custom event handler
function myCustomExecCommandHandler(editor_id, elm, command, user_interface, value) {
var linkElm, imageElm, inst;
switch (command) {
case "mceLink":
inst = tinyMCE.getInstanceById(editor_id);
linkElm = tinyMCE.getParentElement(inst.selection.getFocusElement(), "a");
if (linkElm)
alert("Link dialog has been overriden. Found link href: " + tinyMCE.getAttrib(linkElm, "href"));
else
alert("Link dialog has been overriden.");
return true;
case "mceImage":
inst = tinyMCE.getInstanceById(editor_id);
imageElm = tinyMCE.getParentElement(inst.selection.getFocusElement(), "img");
if (imageElm)
alert("Image dialog has been overriden. Found image src: " + tinyMCE.getAttrib(imageElm, "src"));
else
alert("Image dialog has been overriden.");
return true;
}
return false; // Pass to next handler in chain
}
// Custom save callback, gets called when the contents is to be submitted
function customSave(id, content) {
}
</script><script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "exact",
elements : "Dosage",
save_callback : "customSave",
content_css : "example_advanced.css",
extended_valid_elements : "a[href|target|name]",
plugins : "table",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
//invalid_elements : "a",
theme_advanced_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1", // Theme specific setting CSS classes
//execcommand_callback : "myCustomExecCommandHandler",
debug : false
});
// Custom event handler
function myCustomExecCommandHandler(editor_id, elm, command, user_interface, value) {
var linkElm, imageElm, inst;
switch (command) {
case "mceLink":
inst = tinyMCE.getInstanceById(editor_id);
linkElm = tinyMCE.getParentElement(inst.selection.getFocusElement(), "a");
if (linkElm)
alert("Link dialog has been overriden. Found link href: " + tinyMCE.getAttrib(linkElm, "href"));
else
alert("Link dialog has been overriden.");
return true;
case "mceImage":
inst = tinyMCE.getInstanceById(editor_id);
imageElm = tinyMCE.getParentElement(inst.selection.getFocusElement(), "img");
if (imageElm)
alert("Image dialog has been overriden. Found image src: " + tinyMCE.getAttrib(imageElm, "src"));
else
alert("Image dialog has been overriden.");
return true;
}
return false; // Pass to next handler in chain
}
// Custom save callback, gets called when the contents is to be submitted
function customSave(id, content) {
}
</script>
<script language="JavaScript" src="ajax.js"></script>
<table width="94%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form action="write_product.php" method="post" enctype="multipart/form-data" name="add_product_form" onsubmit="MM_validateForm('Product_Name','','R');return document.MM_returnValue">
<fieldset>
<legend>PRODUCT
<?=$mode2?>
FORM</legend>
<table width="97%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td height="22" class="general">Brand Name :</td>
<td height="22" >
<?=listdisplaydropdownvaluesspecies('Species_Id',$Species_Id,'cat1');?> </td>
</tr>
<tr>
<td width="31%" height="22" class="general"> Category Name :</td>
<td width="69%" height="22" > <div id="cat1">
<?=listdisplaydropdownvaluescataegory('Category_Id',$Category_Id,$Species_Id);?>
</div></td>
</tr>
<tr>
<td height="22" class="general">Product Name :</td>
<td height="22"><input name="Product_Name" type="text" class="textfield" id="Product_Name" value="<?=$Product_Name;?>" size="35"/></td>
</tr>
<tr>
<td height="22" class="general">Image :</td>
<td height="22"><input name="image" type="file" class="textfield" maxlength="2000">
<?php if($Product_Image!="") { ?>
<img src="../cat_images/products/<?=$Product_Image;?>" width="174" height="65">
<?php } ?> </td>
</tr>
<tr>
<td height="22" class="general">Availability Image(Large) :</td>
<td height="22"><input name="Large_Image" type="file" class="textfield" maxlength="2000">
<?php if($Large_Image!="") { ?>
<img src="../cat_images/products/<?=$Large_Image;?>" width="174" height="65">
<?php } ?>
</td>
</tr>
<tr>
<td height="22" class="general">Volume (Large) :</td>
<td height="22"><input name="Large_vol" type="text" class="textfield" id="Large_Vol" value="<?=$Large_vol;?>" size="35"/></td>
</tr>
<tr>
<td height="22" class="general">Availability Image(Medium) :</td>
<td height="22"><input name="Medium_Image" type="file" class="textfield" maxlength="2000">
<?php if($Medium_Image!="") { ?>
<img src="../cat_images/products/<?=$Medium_Image;?>" width="174" height="65">
<?php } ?>
</td>
</tr>
<tr>
<td height="22" class="general">Volume (Medium) :</td>
<td height="22"><input name="Medium_vol" type="text" class="textfield" id="Medium_vol" value="<?=$Medium_vol;?>" size="35"/></td>
</tr>
<tr>
<td height="22" class="general">Availability Image(Small) :</td>
<td height="22"><input name="Small_Image" type="file" class="textfield" maxlength="2000">
<?php if($Small_Image!="") { ?>
<img src="../cat_images/products/<?=$Small_Image;?>" width="174" height="65">
<?php } ?>
</td>
</tr>
<tr>
<td height="22" class="general">Volume (Small) :</td>
<td height="22"><input name="Small_vol" type="text" class="textfield" id="Small_vol" value="<?=$Small_vol;?>" size="35"/></td>
</tr>
<!-- <tr>
<td height="22" class="general">Product Header Image:</td>
<td height="22"><input name="header" type="file" class="textfield" id="header" maxlength="2000">
<?php if($Product_Header!="") { ?>
<img src="../cat_images/<?=$Product_Header;?>" width="174" height="65">
<?php } ?> </td>
</tr> -->
<tr>
<td height="22" class="general">Tag Line:</td>
<td height="22"><input name="Tag_Line" type="text" class="textfield" id="Tag_Line" value="<?php echo isset($Tag_Line)?$Tag_Line:'';?>" size="35"/></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("Product_Description") ;
$oFCKeditor->BasePath = "fckeditor/" ;
$oFCKeditor->Value = @stripslashes(@$Product_Description);
$oFCKeditor->Height = 400 ;
$oFCKeditor->Width = 700 ;
$oFCKeditor->Config['EnterMode'] = 'br'; // turn off auto <p> tags wrapping content
$oFCKeditor->Create() ;
?>
</td>
</tr>
<tr>
<td height="26" class="general">Composition :</td>
<td height="26"> </td>
</tr>
<tr>
<td height="26" colspan='2'>
<?php
include_once("fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor("Product_Composition") ;
$oFCKeditor->BasePath = "fckeditor/" ;
$oFCKeditor->Value = @stripslashes(@$Product_Composition);
$oFCKeditor->Height = 400 ;
$oFCKeditor->Width = 700 ;
//$oFCKeditor->ToolbarSet = 'Basic';
//$oFCKeditor->Config['EnterMode'] = 'br'; // turn off auto <p> tags wrapping content
$oFCKeditor->Create() ;
?>
</td>
</tr>
<tr>
<td height="26" class="general">Shelf Life :</td>
<td height="26"> </td>
</tr>
<tr>
<td height="26" colspan='2'>
<?php
include_once("fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor("Product_Shelf_Life") ;
$oFCKeditor->BasePath = "fckeditor/" ;
$oFCKeditor->Value = @stripslashes(@$Product_Shelf_Life);
$oFCKeditor->Height = 400 ;
$oFCKeditor->Width = 700 ;
// $oFCKeditor->Config['EnterMode'] = 'br'; // turn off auto <p> tags wrapping content
$oFCKeditor->Create() ;
?>
</td>
</tr>
<tr>
<td height="26" class="general">Storage Condition :</td>
<td height="26"> </td>
</tr>
<tr>
<td height="26" colspan='2'>
<?php
include_once("fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor("Product_Storage_Condition") ;
$oFCKeditor->BasePath = "fckeditor/" ;
$oFCKeditor->Value = @stripslashes(@$Product_Storage_Condition);
$oFCKeditor->Height = 400 ;
$oFCKeditor->Width = 700 ;
// $oFCKeditor->Config['EnterMode'] = 'br'; // turn off auto <p> tags wrapping content
$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">Benefits :</td>
<td height="26"><textarea name="Benefits" class="textfield" cols="65" rows="10" id="Benefits"><?=stripslashes($Benefits);?></textarea></td>
</tr>
<tr>
<td height="22" class="general">Dosage :</td>
<td height="26"><textarea name="Dosage" class="textfield" cols="65" rows="10" id="Dosage"><?=stripslashes($DOSAGE);?>
</textarea></td>
</tr> -->
<tr>
<td height="26" class="general">Meta Title :</td>
<td height="26" class="general"><input name="metaTitle" type="text" class="textfield" id="metaTitle" value="<?=$metaTitle;?>" size="50" maxlength="255"/></td>
</tr>
<tr>
<td height="26" class="general">Meta Keyword :</td>
<td height="26" class="general"><input name="metaKeyword" type="text" class="textfield" id="metaKeyword" value="<?=$metaKeyword;?>" size="50" maxlength="255"/></td>
</tr>
<tr>
<td height="26" class="general">Meta Description :</td>
<td height="26" class="general"><textarea name="metaDescription" class="textfield" cols="65" rows="5" id="metaDescription"><?=stripslashes($metaDescription)?>
</textarea></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>