- Joined
- Jan 11, 2009
- Messages
- 505
- Reaction score
- 8
Edit: I spoke too soon...
It opens a text box with this:
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>$title</title> <meta http-equiv="keywords" content="$keyword" /> <meta http-equiv="description" content="$description" /> <meta http-equiv="Content-Type" content="text/html; charset=$encoding" /> </head> <body> <script src="languages/$language.js" type="text/javascript"></script> <script src="javascript/aliboard.js" type="text/javascript"></script> <script type="text/javascript"> <!-- JAVASCRIPT_CODES --> </script> <link href="themes/default/stylesheet/main-style.css" rel="stylesheet" type="text/css" /> <div style="width:auto;" align="center"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td> <center> <div class="header"></div> <div class="navigation_border"> <div id="mytabsmenu" class="tabsmenuclass"> <ul> <li><a href="http://www.trasion.com/index.html" rel="gotsubmenu">Homepage</a></li> <li><a href="http://www.trasion.com/communityforum/" rel="gotsubmenu">Community</a></li> <li><a href="http://www.trasion.com/software.html" rel="gotsubmenu">Software</a></li> <li><a href="http://www.trasion.com/customise.html" rel="gotsubmenu">Customise</a></li> <li><a href="http://www.trasion.com/supportforum/" rel="gotsubmenu">Blogs</a></li> <li><a href="http://www.trasion.com/developers.html" rel="gotsubmenu">Developers</a></li> <li><a href="http://www.trasion.com/contactus.html" rel="gotsubmenu">Contact Us</a></li> </ul> </div> </div> <div class="tabsmenucontentclass"> </div></center> <div class="content_border" style="text-align:left"><div class="content"> <!-- BEGIN_TOP_LINKS --> <!-- BEGIN_GUEST_TOP_LINKS --> <div style="width:auto;border:#737373 solid 1px;border-top:0px;border-bottom:0px;padding:8px;padding-left:4px;padding-right:4px;font-family:tahoma;font-size:8pt;height:14px;background-color:#EEEEEE;" align="left"> <span style="margin-left:10px;float:left"><b><a href="search.php">Search</a></b> | <b>$login_link</b> | Current Time is $current_time</span> <span style="margin-right:10px;float:right"><b>$register_link</b></span> </div> <div class="navigate" style="width:auto;border:#737373 solid 1px;border-top:0px;padding:4px;font-family:tahoma;font-size:8pt;height:14px;background-color:#e6e6e6"> <span style="margin-left:10px;font-weight:bold;float:left">$navigate</span> <span style="margin-right:10px;font-weight:bold;float:right"></span> </div> <!-- END_GUEST_TOP_LINKS --> <!-- BEGIN_REGISTERED_TOP_LINKS --> <div style="width:auto;border:#737373 solid 1px;border-top:0px;border-bottom:0px;padding:8px;padding-left:4px;padding-right:4px;font-family:tahoma;font-size:8pt;height:14px;background-color:#EEEEEE;" align="left"> <div align="right" style="width:auto;height:14px;"> <span style="margin-left:10px;float:left"><b><a href="search.php">Search</a></b> | <b>$user_cp_link</b> | Current Time is $current_time</span> <span style="float:right;margin-right:10px;"><b>$signout_link</b></span> </div> </div> <div class="navigate" style="width:auto;border:#737373 solid 1px;border-top:0px;padding:4px;font-family:tahoma;font-size:8pt;height:14px;background-color:#e6e6e6; background-position: bottom;background-repeat:repeat-x" align="left"> <span style="margin-left:10px;font-weight:bold;float:left">$navigate</span> <span style="margin-right:10px;font-weight:bold;float:right"></span> </div> <!-- END_REGISTERED_TOP_LINKS --> <!-- END_TOP_LINKS --> <!-- BEGIN_ERROR_REPORT --> <div class="error_div" align="left"> <!-- BEGIN_ERROR_ITEM --> <li>$error_item</li> <!-- END_ERROR_ITEM --> </div> <!-- END_ERROR_REPORT --> <!-- BEGIN_DONE_REPORT --> <div class="done_div" align="left"> <!-- BEGIN_DONE_ITEM --> <li>$error_item</li> <!-- END_DONE_ITEM --> </div> <!-- END_DONE_REPORT -->
If I edit it, it changes to:
Code:<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\"> <head> <title>site- $title</title> <meta http-equiv=\"keywords\" content=\"$keyword\" /> <meta http-equiv=\"description\" content=\"$description\" /> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=$encoding\" /> </head> <body> <script src=\"languages/$language.js\" type=\"text/javascript\"></script> <script src=\"javascript/aliboard.js\" type=\"text/javascript\"></script> <script type=\"text/javascript\"> <!-- JAVASCRIPT_CODES --> </script> <link href=\"themes/default/stylesheet/main-style.css\" rel=\"stylesheet\" type=\"text/css\" /> <div style=\"width:auto;\" align=\"center\"> <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"> <tr> <td> <center> <div class=\"header\"></div> <div class=\"navigation_border\"> <div id=\"mytabsmenu\" class=\"tabsmenuclass\"> <ul> <li><a href=\"http://www.trasion.com/index.html\" rel=\"gotsubmenu\">Homepage</a></li> <li><a href=\"http://www.trasion.com/communityforum/\" rel=\"gotsubmenu\">Community</a></li> <li><a href=\"http://www.trasion.com/software.html\" rel=\"gotsubmenu\">Software</a></li> <li><a href=\"http://www.trasion.com/customise.html\" rel=\"gotsubmenu\">Customise</a></li> <li><a href=\"http://www.trasion.com/supportforum/\" rel=\"gotsubmenu\">Blogs</a></li> <li><a href=\"http://www.trasion.com/developers.html\" rel=\"gotsubmenu\">Developers</a></li> <li><a href=\"http://www.trasion.com/contactus.html\" rel=\"gotsubmenu\">Contact Us</a></li> </ul> </div> </div> <div class=\"tabsmenucontentclass\"> </div></center> <div class=\"content_border\" style=\"text-align:left\"><div class=\"content\"> <!-- BEGIN_TOP_LINKS --> <!-- BEGIN_GUEST_TOP_LINKS --> <div style=\"width:auto;border:#737373 solid 1px;border-top:0px;border-bottom:0px;padding:8px;padding-left:4px;padding-right:4px;font-family:tahoma;font-size:8pt;height:14px;background-color:#EEEEEE;\" align=\"left\"> <span style=\"margin-left:10px;float:left\"><b><a href=\"search.php\">Search</a></b> | <b>$login_link</b> | Current Time is $current_time</span> <span style=\"margin-right:10px;float:right\"><b>$register_link</b></span> </div> <div class=\"navigate\" style=\"width:auto;border:#737373 solid 1px;border-top:0px;padding:4px;font-family:tahoma;font-size:8pt;height:14px;background-color:#e6e6e6\"> <span style=\"margin-left:10px;font-weight:bold;float:left\">$navigate</span> <span style=\"margin-right:10px;font-weight:bold;float:right\"></span> </div> <!-- END_GUEST_TOP_LINKS --> <!-- BEGIN_REGISTERED_TOP_LINKS --> <div style=\"width:auto;border:#737373 solid 1px;border-top:0px;border-bottom:0px;padding:8px;padding-left:4px;padding-right:4px;font-family:tahoma;font-size:8pt;height:14px;background-color:#EEEEEE;\" align=\"left\"> <div align=\"right\" style=\"width:auto;height:14px;\"> <span style=\"margin-left:10px;float:left\"><b><a href=\"search.php\">Search</a></b> | <b>$user_cp_link</b> | Current Time is $current_time</span> <span style=\"float:right;margin-right:10px;\"><b>$signout_link</b></span> </div> </div> <div class=\"navigate\" style=\"width:auto;border:#737373 solid 1px;border-top:0px;padding:4px;font-family:tahoma;font-size:8pt;height:14px;background-color:#e6e6e6; background-position: bottom;background-repeat:repeat-x\" align=\"left\"> <span style=\"margin-left:10px;font-weight:bold;float:left\">$navigate</span> <span style=\"margin-right:10px;font-weight:bold;float:right\"></span> </div> <!-- END_REGISTERED_TOP_LINKS --> <!-- END_TOP_LINKS --> <!-- BEGIN_ERROR_REPORT --> <div class=\"error_div\" align=\"left\"> <!-- BEGIN_ERROR_ITEM --> <li>$error_item</li> <!-- END_ERROR_ITEM --> </div> <!-- END_ERROR_REPORT --> <!-- BEGIN_DONE_REPORT --> <div class=\"done_div\" align=\"left\"> <!-- BEGIN_DONE_ITEM --> <li>$error_item</li> <!-- END_DONE_ITEM --> </div> <!-- END_DONE_REPORT -->
And messes up the whole website header...
Excuse me, I forgot to add stripclashes.
Code:
<?php
if(isset($_POST['submit']))
{
$file = "theme/file.html";
$handle = fopen($file, 'w');
$data = [B]stripcslashes($_POST['string']);[/B]
fwrite($handle, $data);
print "Data Written!";
fclose($handle);
}
$file = "theme/file.html";
$data = file_get_contents($file);
?>

