Warning: Unexpected character in input: ” (ASCII=92) state=1 in /home/revillu/public_html/boards/admin_formatuser.php on line 2
Parse error: parse error, unexpected T_STRING in /home/revillu/public_html/boards/admin_formatuser.php on line 2
HTe script works fine on my server but on another server it gives that error here it is
[code=php]
<?php
include(“common.php”);
if (checkAccess(“accessadmin”))
{
if ($action == “savenameformat”)
{
$navigationhead = “Update Name Formatting”;
$validcolourregex = “^#[0-9A-Fa-f]{6}$”;
$jregex = “^[0-9A-Fa-f]{6}$”;
$kregex = “^[A-Za-z]+$”;
// Make sure a valid colour code comes through for colour attributes.
// First, see if the same code we put into inputChoice() comes back
// from it.
$sethlcolour = inputChoice(“colours”, “hlcolour”, $hlcolour, “show”);
$settxtcolour = inputChoice(“colours”, “txtcolour”, $txtcolour, “show”);
$setbordercolour = inputChoice(“colours”, “txtcolour”, $bordercolour, “show”);
// Now check – if the same code DIDN’T come back, then validate it
// against $validcolourregex
if (($sethlcolour != $hlcolour) && (ereg($validcolourregex, $hlcolour) || ereg($jregex, $hlcolour) || ereg($kregex, $hlcolour)))
{ $sethlcolour = $hlcolour; }
if (($settxtcolour != $txtcolour) && (ereg($validcolourregex, $txtcolour) || ereg($jregex, $txtcolour) || ereg($kregex, $txtcolour)))
{ $settxtcolour = $txtcolour; }
if (($setbordercolour != $bordercolour) && (ereg($validcolourregex, $bordercolour) || ereg($jregex, $bordercolour) || ereg($kregex, $bordercolour)))
{ $setbordercolour = $bordercolour; }
$newsettings[hlcolour] = $sethlcolour;
$newsettings[txtcolour] = $settxtcolour;
$newsettings[stylebold] = $bold;
$newsettings[styleitalic] = $italic;
$newsettings[styleunderline] = $underline;
$newsettings[styleoverline] = $overline;
$newsettings[stylestrikethrough] = $strikethrough;
$newsettings[bottomborder] = $bottomborder;
$newsettings[topborder] = $topborder;
$newsettings[leftborder] = $leftborder;
$newsettings[rightborder] = $rightborder;
$newsettings[bordercolour] = $setbordercolour;
if ($sethlcolour || $settxtcolour || $bold || $italic || $underline || $overline || $strikethrough || $bottomborder || $topborder || $leftborder || $rightborder || $setbordercolour)
{
$vars[displayformat] = serialize($newsettings);
}
else
{
$vars[displayformat] = “”;
}
$update = updateUser($userid, $vars, “no”);
if ($update)
{
$sysmsg = “custom”;
$sysmsgcustomcontent = “The Users Name Display has been updated.”;
$action = “”;
}
else
{
$reason = “Err, something went wrong”;
$action = “”;
}
}
if ($action == “”)
{
$navigationhead = “Name Formatting”;
//print_r($formatsettings);
//echo “<BR>n”;
$hlcolour = $formatsettings[hlcolour];
$txtcolour = $formatsettings[txtcolour];
$bold = $formatsettings[stylebold];
$italic = $formatsettings[styleitalic];
// Legacy
$bottomborder = $formatsettings[styleunderline];
$topborder = $formatsettings[styleoverline];
$strikethrough = $formatsettings[stylestrikethrough];
// Border switches
$bottomborder = $formatsettings[bottomborder];
$topborder = $formatsettings[topborder];
$leftborder = $formatsettings[leftborder];
$rightborder = $formatsettings[rightborder];
$bordercolour = $formatsettings[bordercolour];
include(“elements/nameformat.php”);
$output = “<SPAN CLASS=’InputSection’>Change Name Colour</SPAN><BR>n”
.”<FORM ACTION=’$PHP_SELF’ METHOD=POST>n”
.”<b>Enter User ID to change format of</b><BR>”
.”<input type’text’ name=’userid’ value=’1′><BR>”
.inputHidden(“action”, “savenameformat”)
.$nameformatform
.”<P>n”
.inputSubmit(“Change Formatting”)
.”</FORM>n”;
}
}
else
{
$output=”You do not have access to this page”;
}
$pagecontents=$output;
include(“layout.php”);
?>