Having trouble with this php code, can’t edit pages its greyed out and can’t press submit… im sure its a simple fix please help!!
<?php
header("Cache-Control: no-cache, must-revalidate");
include 'domain.php';
echo "";
echo "
";
$pid=$_GET['pid'];
$pid=str_replace(" ", "-", $pid);
$d=$_GET['d'];
$mn=$_GET['mn'];
$afolder = "pages";
if ($d=="a"){
$afolder="articles";
}
$pt = "ego.asp";
$pit = "Preview News Letter";
// $pce = "pages/empty.htm";
$tp = "News Letter";
$nid = $_COOKIE['nid'];
$srid = $_COOKIE['srid'];
if ($srid!=""){
$xml= simplexml_load_file($sitexmlpath . 'reps.xml');
$mypath = "//eid[@u='" . $srid . "']";
$myId = $xml->xpath($mypath);
$myt = (string)$myId[0]['t'];
$myn = (string)$myId[0]['n'];
$mym = (string)$myId[0]['m'];
if ($myt=="a")
$smt = " [ registered administrator ]";
if ($myt=="r")
$smt = " [ registered sales rep ]";
if ($myt=="w")
$smt = " [ registered work from home ]";
if ($srid!=$nid && $myt!="")
$smt .= " [ client management mode -
exit logout ]";
}
if ($myt=="a")
{
if ($pid!="")
{
if ($mn=="on")
$amn = "nl-";
$itemfilename = $afolder . "/" . $amn . $pid . ".htm";
if (file_exists($itemfilename)) {
$pce= $itemfilename;
}
$nowediting = "editing:
" .$amn . $pid;
$pt = "submiteditor.php";
$pit = "Save Page";
$tp = "Page Editor [
back -
admin ] *nb
copy and paste ONLY from notepad - NOT word etc..";
$styles="";
}
?>
<?php echo $tp; ?>
Style
Normal
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Address
Formatted
Definition Term
Font
Arial
Arial Black
Arial Narrow
Comic Sans MS
Courier New
System
Tahoma
Times New Roman
Verdana
Wingdings
Size
1
2
3
4
5
6
7
8
10
12
14
|
|
<?php echo $nowediting; ?> |
|
|
|
|
|
|
|
<?php
}
else
{
echo "Please Login";
}
?>