I've included the surrounding code to make it easier to find. I wanted it to stand out more in the staff section if the user had entered a valid username/password combination, so I had to make a change to the HTML tag stripping on the display page to allow two special cases.
modules/tickets/client_submit.php
Code:
$template->assign("cclist", $_recipients);
$template->assign("recipientcount", $_recipientcount);
/************************************
EuphRO Account Verification Modification
Written by Scott Kennedy
************************************/
$euphAccount = $_POST['98c56cd3c0'];
$euphPass = $_POST['4e36c66e60'];
$euphDb = mysql_connect('host', 'user', 'pass');
mysql_select_db('ragnarok', $euphDb);
$euphResult = mysql_query("SELECT `user_pass` FROM `login` WHERE `userid` LIKE '{$euphAccount}'", $euphDb);
$euphRow = mysql_fetch_assoc($euphResult);
$_POST['4e36c66e60'] = (md5($euphPass) == $euphRow['user_pass']) ? '<font color="green">VERIFIED</font>' : '<font color="red">NOT VERIFIED</font>';
//mysql_close($euphDb); //this line results in none of the custom fields being saved to the database
//End of EuphRO AV Mod
updateCustomFields(CUSTOMFIELD_USERTICKET, $_ticketiddata[0], $_POST["departmentid"]);
//Mahesh Slaria: Staff & user ticket creation
updateCustomFields(CUSTOMFIELD_STAFFUSERTICKET, $_ticketiddata[0], $_POST["departmentid"]);
modules/tickets/staff_viewticket.php
Code:
foreach ($val["fields"] as $fieldkey=>$fieldval)
{
unset($fieldvalue);
if (_is_array($fieldval["fieldvalue"]))
{
foreach ($fieldval["fieldvalue"] as $fkey=>$fval)
{
/************************************
EuphRO Account Verification Colour Modification
Written by Scott Kennedy
************************************/
if ($fval == '<font color="green">VERIFIED</font>' || $fval == '<font color="red">NOT VERIFIED</font>')
{
$fieldvalue .= $fval."<BR />";
}
else
{
$fieldvalue .= htmlspecialchars($fval)."<BR />";
}
//$fieldvalue .= htmlspecialchars($fval)."<BR />"; //original code
//End of EuphRO AVC Mod
}
} else {
/************************************
EuphRO Account Verification Colour Modification
Written by Scott Kennedy
************************************/
if ($fieldval["fieldvalue"] == '<font color="green">VERIFIED</font>' || $fieldval["fieldvalue"] == '<font color="red">NOT VERIFIED</font>')
{
$fieldvalue = nl2br($fieldval["fieldvalue"]);
}
else
{
$fieldvalue = nl2br(htmlspecialchars($fieldval["fieldvalue"]));
}
//$fieldvalue = nl2br(htmlspecialchars($fieldval["fieldvalue"])); //original code
//End of EuphRO AVC Mod
}
$infolist[] = array($fieldval["title"].":", autoLink($fieldvalue));
}