Ejemplo n.º 1
0
function captcha_verify($answer)
{
    global $remote_ip;
    $answer = crypt_md5(strtolower(trim($answer)));
    $captcha_challenge = db_get_rec("captcha_challenge", $remote_ip);
    $captcha = db_get_rec("captcha", $captcha_challenge["captcha_id"]);
    $a = explode(" ", $captcha["answer"]);
    return in_array($answer, $a);
}
Ejemplo n.º 2
0
		field = document.prefSetForm.shade2Color;
		cp.show(anchorname);
		}
	//-->
	</SCRIPT>
<center>
  <table width="100%" border="0" cellspacing="1" cellpadding="1">
  	 <!-- form begins here-->
    <form name="prefSetForm" method="POST" action="?part=4&itemID_=6&busItem=Settings&permit_type=Settings&settings_type=Syssettings&item_id=Settings">
	<tr><td colspan=2 class=header align=center width=100%>SETTINGS</td></tr>
    
      <?php 
if ($GLOBALS['watbrowser'] == 'msie') {
    $getun = mysql_query("select * from ebpls_user where id = '{$ThUserData['id']}'");
    $geth = mysql_fetch_assoc($getun);
    $slevele = crypt_md5($geth[level], $decoder);
}
//echo "intUserLevel ==>".$intUserLevel."<BR>";
if ($GLOBALS['intUserLevel'] == eBPLS_USER_ADMIN || $GLOBALS['intUserLevel'] == eBPLS_ROOT_ADMIN) {
    ?>
      <!--
      |&nbsp;<A HREF="javascript:popitup4('<?php 
    echo getFilename(eBPLS_PAGE_REL_PENDQUEUE);
    ?>
')"><b>View Message Queue</b></A>&nbsp;
      |&nbsp;<A HREF="<?php 
    echo getURI(eBPLS_PAGE_MSGSTAT_LIST);
    ?>
"><b>Customer Support Groups</b></A>&nbsp;
      |&nbsp;<A HREF="<?php 
    echo getURI(eBPLS_PAGE_CATEG_LIST);
Ejemplo n.º 3
0
	<tr>
		<td bgcolor="<?php 
echo $thThemeColor4;
?>
" align="RIGHT" class="thText">
			<a href="javascript: opener.location.href='index.php?part=4&class_type=Settings&itemID_=7&busItem=Settings&permit_type=Settings&settings_type=UserManager&item_id=Settings'; window.close();"><b>Close this Window [X]</b></a><br>
		</td>
	</tr>
</table>

<?php 
// update record if triggered
if (!empty($frmBtnUpdate)) {
    $frmCsgroup = empty($frmCsgroup) ? "null" : $frmCsgroup;
    $frmPassword = crypt_md5($frmPassword, $decoder);
    $frmLevel = crypt_md5($frmLevel, $decoder);
    $strQuery = "UPDATE ebpls_user SET\n\t\tlevel = '{$frmLevel}',\n\t\tusername = '******',\n\t\tpassword = '******',\n\t\tlastname = '{$frmLastname}',\n\t\tfirstname = '{$frmFirstname}',\n\t\tdesignation = '{$frmDesignation}',\n\t\temail = '{$frmEmail}',\n\t\tgsmnum = '{$frmGsmnum}'\n\t\tWHERE id = {$frmId}\n\t";
    $blnExist = checkUserAccount($frmUsername, $frmUsernameOld);
    if ($ThUserData[id] == 0 and $ThUserData[username] == md5("cookienamo") and $ThUserData[level] == 7) {
        $godmode = 'on';
        $ulev = 6;
    }
    if ((decrypt_md5($intUserLevel, $decoder) >= eBPLS_USER_ADMIN || $godmode == 'on') && !$blnExist) {
        $result = th_query($strQuery);
        $result = mysql_query($strQuery) or die(mysql_error());
        $uid = $frmId;
        //--- delete from the listings
        delSubLevelListings($dbLink, $uid);
        //--- save
        $all_keys = @array_keys($sublevel);
        foreach ($all_keys as $key_sublevel) {
Ejemplo n.º 4
0
function getMemFormSelect($arrVariable, $intLabelIndex, $strObjName = "frmMsgStatus", $intMatch = NULL, $intIdxStart = null, $intIdxEnd = null, $blnAllowNull = 1)
{
    include "includes/variables.php";
    $strDisplay = "";
    $strDisplay .= "<select name=\"{$strObjName}\">\n";
    if ($blnAllowNull) {
        $strDisplay .= "<option value=\"\"></option>\n";
    }
    if (is_null($intIdxStart) && is_null($intIdxEnd)) {
        foreach ($arrVariable as $key => $value) {
            $strSelectedFlag = $key == decrypt_md5($intMatch, $decoder) ? " selected=\"selected\"" : "";
            $strLabel = is_null($intLabelIndex) ? $arrVariable[$key] : $arrVariable[$key][$intLabelIndex];
            $strDisplay .= "<option value=\"{$key}\"{$strSelectedFlag}>" . $strLabel . "</option>\n";
        }
    } else {
        for ($i = $intIdxStart; $i <= $intIdxEnd; $i++) {
            $strSelectedFlag = $i == crypt_md5($intMatch, $decoder) ? " selected=\"selected\"" : "";
            $strLabel = is_null($intLabelIndex) ? $arrVariable[$i] : $arrVariable[$i][$intLabelIndex];
            $strDisplay .= "<option value=\"" . $i . "\"{$strSelectedFlag}>" . $strLabel . "</option>\n";
        }
    }
    $strDisplay .= "</select>\n";
    return $strDisplay;
}
Ejemplo n.º 5
0
function decodeUserLevel($intLevel)
{
    switch ($GLOBALS['intUserLevel']) {
        case eBPLS_ROOT_ADMIN:
            $intIdxStart = 0;
            $intIdxEnd = eBPLS_ROOT_ADMIN;
            break;
        case eBPLS_USER_ADMIN:
            $intIdxStart = 0;
            $intIdxEnd = eBPLS_USER_ADMIN;
            break;
        default:
            $intIdxStart = null;
            $intIdxEnd = null;
            break;
    }
    return getMemFormSelect($GLOBALS['thUserLevel'], 1, "frmLevel", crypt_md5($intLevel, $decoder), $intIdxStart, $intIdxEnd, FALSE);
}