| 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 `tblCertificate` where `id`='$id'");
$array_tblsite = mysql_fetch_assoc($rs_tblsite);
foreach($array_tblsite as $key=>$value) {
$$key = $value;
}
}
else{
$mode = "Add";
$mode2 = "ADD";
$mode1 = "Add";
}
?>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript">
$(function() {
$(".delImg").click(function() {
var feildName = $(this).attr('id');
var id = $(this).attr('name');
$.ajax({
type: "POST",
url: "ajax/delImg.php",
data: "feildName="+feildName+"&id="+id,
success: function(msg){
if(msg==1){
$('#'+feildName+'img').hide();
}
}
});
});
});
</script>
<LINK href="mel.css" type=text/css rel=stylesheet>
<LINK href="sdmenu.css" type=text/css rel=stylesheet>
<table width="94%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form action="write_certificate.php" method="post" enctype="multipart/form-data" name="add_treasure_form" onsubmit="MM_validateForm('media','','R'); return document.MM_returnValue">
<fieldset>
<legend>CERTIFICATE ADD FORM</legend>
<table width="97%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td height="26" class="general">Certificate :</td>
<td height="26"><input name="certificate" type="text" class="textfield" id="certificate" value="<?=$heading;?>" size="55"/></td>
</tr>
<tr>
<td height="26" class="general">Description :</td>
<td height="26"> </td>
</tr>
<tr>
<td height="26" colspan="2" class="general"><?
include_once("fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor("description") ;
$oFCKeditor->BasePath = "fckeditor/" ;
$oFCKeditor->Value = @stripslashes(@$description);
$oFCKeditor->Height = 400 ;
$oFCKeditor->Width = 700 ;
$oFCKeditor->Create() ;
?> </td>
</tr>
<?php
if($_REQUEST["mode"]=="Edit"){ ?>
<tr>
<td colspan='100%'>
<table width="97%" border="0" cellspacing="2" cellpadding="0">
<?php for($i=1;$i<=10;$i++) { ?>
<tr>
<td width="25%" height="26" class="general">Image<?php echo $i; ?> :</td>
<td width="25%" height="26"><input name="certImage[]" type="file" id="image"></td>
<td width="25%" height="26">
<?php if($array_tblsite['pic'.$i] != ''){ ?>
<img src="../cat_images/certificates/<?php echo $array_tblsite['pic'.$i] ;?>" width="50" height="50" id='pic<?=$i?>img'>
<?php } ?>
</td>
<td width="25%" height="26" class="general delImg" style='cursor:pointer;' id='pic<?=$i?>' name='<?php echo $array_tblsite['id'] ;?>'>Delete</td>
</tr>
<?php } ?>
</table>
</td>
</tr>
<?php }
else{ ?>
<?php for($i=1;$i<=10;$i++) { ?>
<tr>
<td width="42%" height="26" class="general">Image<?php echo $i; ?> :</td>
<td width="58%" height="26"><input name="certImage[]" type="file" id="image"></td>
</tr>
<?php } } ?>
<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>