HTM Editor

DJBod

New Member
Messages
12
Reaction score
0
Points
0
Hey,

In File Manager, i ticked a HTM/HTML File then clicked HTML Editor &

"?php header("Content-type","text/html; charset=iso-8859-1"); ?>
<?php ob_start() ?>
<?php
if ($_GET['randomId'] != "BzsnAYhBesMv1ScvBJAHJnjqGaK2timpJma0F77H29RHnqw6nF6E4LumPWM0JAw1h8WgELTytnvc3m5L5r61tCj0q3IrXuPobYHAKKwSS54vsqJuYt9luIwt2eMEgacxojMDARQKiIOHv1_nd3ykkxs2YUY48MQQ6d39WC4ktx_X6khqwa4ffDyDDZZjV41imC1BMcIGyDkYEyCc9NYs34dafnBgPVtdtrJJjUMIWJUp9Qvob1MYLmdJuWJCvYCD") {
echo "Access Denied";
exit();
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Editing advertise.htm</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">body {background-color:threedface; border: 0px 0px; padding: 0px 0px; margin: 0px 0px}</style>
</head>
<body>
<div align="center">
<script language="javascript">
<!--//
// this function updates the code in the textarea and then closes this window
function do_save() {
var code = htmlCode.getCode();
document.open();
document.write('<html><form METHOD="POST" name=mform action="http://*****/frontend/x3/filemanager/savehtmlfile.html"><input type="hidden" name="udir" value="/home/****/public_html/m"><input type="hidden" name="ufile" value="advertise.htm"><input type="hidden" name="dir" value="%2fhome%2f****%2fpublic_html%2fm"><input type="hidden" name="file" value="advertise.htm"><input type="hidden" name="doubledecode" value="1">Saving&nbsp;....<br /><br ><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><textarea name=page rows=1 cols=1></textarea></form></html>');
document.close();
document.mform.page.value = code;
document.mform.submit();
}
function do_abort() {
var code = htmlCode.getCode();
document.open();
document.write('<html><form METHOD="POST" name="mform" action="http://*******/frontend/x3/filemanager/aborthtmlfile.html"><input type="hidden" name="dir" value="/home/****/public_html/m"><input type="hidden" name="file" value="advertise.htm">Aborting Edit&nbsp;....</form></html>');
document.close();
document.mform.submit();
}
//-->
</script>
<?php
// make sure these includes point correctly:
include_once ('/usr/local/cpanel/base/3rdparty/WysiwygPro/editor_files/config.php');
include_once ('/usr/local/cpanel/base/3rdparty/WysiwygPro/editor_files/editor_class.php');

// create a new instance of the wysiwygPro class:
$editor = new wysiwygPro();

// add a custom save button:
$editor->addbutton('Save', 'before:print', 'do_save();', WP_WEB_DIRECTORY.'images/save.gif', 22, 22, 'undo');

// add a custom cancel button:
$editor->addbutton('Cancel', 'before:print', 'do_abort();', WP_WEB_DIRECTORY.'images/cancel.gif', 22, 22, 'undo');

$body = '<html>
<head>
<title></title>
</head>


<body bgcolor="#FFFFFF">

</body>


</html>
';

$editor->set_code($body);

// add a spacer:
$editor->addspacer('', 'after:cancel');

$editor->set_charset('iso-8859-1');

// print the editor to the browser:
$editor->print_editor('100%','450');

?>
</div>
</body>
</html>
<?php ob_end_flush() ?>

And i hate editing files using Code Editor
 

resa1983

New Member
Messages
6
Reaction score
0
Points
0
This is the same issue I was having & posted about a few weeks ago.

Attempting to use CPanel's HTML Editor - instead of having the HTML Editor pop up, it popped up with the Editor's php coding.

This only seems to be a problem with the latest CPanel version (and only started happening since the update), and the CPanel's forums say how to fix this issue.

Essentially unless we have access to change permissions of folders (which I don't think we do?), we can't edit any html page which is within a sub-folder.
So for example I could edit wowtanaris.pcriot.com/crafting.htm file via the HTML editor with no issues.. But attempting to edit wowtanaris.pcriot.com/crafting_sheets/sheet001.htm will give the error.

Note: IE will give a 404 error saying page not found, while Firefox gives the HTML editor's code (php).
 

DJBod

New Member
Messages
12
Reaction score
0
Points
0
Hey,

has the HTML Editor been fixed or is it still under going fixing?
 
Top