function processChpasswd ( ) { $oU = $_SESSION["oU"]; $response_cont = read_template($GLOBALS["_TPL_PATH"] . "response.tpl"); $oC = new clsConnection($GLOBALS["DBHOST"], $GLOBALS["DBNAME_UMS"], $GLOBALS["DBUSER_UMS"], $GLOBALS["DBPASS_UMS"]); if ($oC->c && $oC->errmsg == "" && isset($_POST["Continue"])) { $db = $GLOBALS["DBNAME_UMS"]; $qstring = "select umuser.UsLogin, umuser.UsPassword from $db.umuser where umuser.UsID = " . $oU->userID . " and umuser.UsPassword = '******'"; $dbres = mysql_query($qstring, $oC->c); $startup = "if (parent.ResetCurPWD) {parent.alertRejectMsg('ÃËÑʼèÒ¹à´ÔÁäÁè¶Ù¡µéͧ - ¡ÃسҾÔÁ¾ìãËÁè '); parent.ResetCurPWD();}"; if (mysql_num_rows($dbres) > 0 && trim($_POST["NewPW1"]) == trim($_POST["NewPW2"])) { mysql_query("update $db.umuser set UsPassword = '******' where umuser.UsID = " . $oU->userID, $oC->c); if (mysql_affected_rows($oC->c) != 1) $startup = "if (parent.ResetCurPWD) {parent.alertRejectMsg('ÃËÑʼèÒ¹ãËÁèµÃ§¡ÑºÃËÑʼèÒ¹à´ÔÁ - ¡ÃسҾÔÁ¾ìãËÁè '); parent.ResetCurPWD();}"; else $startup = "if (parent.ResetCurPWD) {parent.alertRejectMsg('¡ÒÃá¡éä¢ÃËÑʼèÒ¹ÊÓàÃç¨áÅéÇ - ¡ÃسÒãªéÃËÑʼèÒ¹ãËÁè㹡ÒÃà¢éÒãªéÃкº¤ÃÑ駵èÍä» '); parent.ResetCurPWD(); parent.location.replace('" . "http://" . $GLOBALS["_INFO_INDEX"] . "?__m=config');}"; } bind_content(array("JSFILE" => "js/blank.js", "STARTCODE" => $startup, "RESTAGS" => " "), $response_cont); echo $response_cont; $oC->Disconnect(); } }
function GetExtendedJS ( ) { $JSExtScript = ""; $script_tag = "<script type=\"text/javascript\" language=\"JavaScript\" src=\"{JS_PATH}\"></script>\n"; if (isset($GLOBALS["_EXTENDED_JS"]) && is_array($GLOBALS["_EXTENDED_JS"])) { $gbRefn = &$GLOBALS["_EXTENDED_JS"]; $ext_length = count($gbRefn); for ($i = 0; $i < $ext_length; $i++) { $tmp_script = $script_tag; if (!is_file($gbRefn[$i])) $tmp_script = "<!-- ``{JS_PATH}'' - File not found! -->\n"; bind_content(array("JS_PATH" => $gbRefn[$i]), $tmp_script); $JSExtScript .= $tmp_script; } } return $JSExtScript; }