the first off is a text editor, i need it to edit, well files.
it works fine until i use =" and then it replaces it with =\"
here is the code:
<?php
$filename = "/home/nateprs/public_html/torrentcheck/include/notes.inc.php";
$me = "admin-notes.php";
// END OF SIMPLE CONFIGURATION SETTINGS
?>
<? include("include/page_header.inc.php"); ?><? include("include/editheads.php"); ?><BR><BR>
<?php
$data = $_POST["data"];
$pw = $_POST["pw"];
if(!$mode){ $mode = "start"; }
if($mode == "start"){
$handle = fopen($filename,"r");
$filedata = fread($handle,filesize($filename));
fclose($handle);
echo<<<END
<form action=$me method=post>
<textarea name=data cols=75 rows=25>$filedata</textarea><br>
<input type=hidden name=mode value=save>
<input type=hidden name=pw value="$prpw">
<input type=submit value="Save Data.">
</form>
END;
}
if($mode == "save"){
$handle = fopen($filename,"w");
$filedata = fwrite($handle,$data);
fclose($handle);
echo "File data saved OK!<br><br>";
$handle = fopen($filename,"r");
$filedata = fread($handle,filesize($filename));
fclose($handle);
echo<<<END
<form action=$me method=post>
<textarea name=data cols=75 rows=25>$filedata</textarea><br>
<input type=hidden name=mode value=save>
<input type=hidden name=pw value="$prpw">
<input type=submit value="Save Data.">
</form>
END;
}
?>
The second code is this:
// UPLOADERS (COLOR WHITE)
$users=array() ;
$users[0]="weedmonsta" ;
$users[1]="PRSBOY" ;
// ADMIN GROUP FOR UPLOADERS (BOLD)
$admingrp=array() ;
$admingrp[0]="weedmonsta" ;
$admingrp[1]="PRSBOY" ;
if ($row["username"]) {
if($row["username"] == $uploader)
print("<td class=\"r2\" align=center><font size=1 color=white>" . (isset($row["username"]) ? htmlspecialchars($row["username"]) : "<i>(unknown)</i>") . "</td>\n");
else
print("<td class=\"r2\" align=center><font size=2>" . (isset($row["username"]) ? htmlspecialchars($row["username"]) : "<i>(unknown)</i>") . "</td>\n");
}
i jsut cant get it to work using the array 🙁
any help would be greatly appreciated 🙂