Execute($sql); if(!$rs) { showErrorMsg($conn->ErrorMsg()); } if(!$rs->RecordCount()) { $sql = "INSERT INTO visitors (ipaddress,visit_date,last_update) VALUES ('$ip',NOW(),NOW())"; $rs = $conn->Execute($sql); if(!$rs) { showErrorMsg($conn->ErrorMsg()); } } else { $sql = "UPDATE visitors SET pageview=pageview+1,last_update=NOW() WHERE ipaddress='$ip' and visit_date='$visit_date'"; $rs = $conn->Execute($sql); if(!$rs) { showErrorMsg($conn->ErrorMsg()); } } } function showFlags() { global $lang_list; ?>
$lang_name) { ?>
$value); } else { $value = unserialize($value); } if($devider == '') { foreach($lang_list as $lang_id => $lang_name) { ?>
$value); } elseif(!is_array($value)) { $value = unserialize($value); } switch($type) { case 'text': foreach($lang_list as $lang_id => $lang_name) { ?>
$lang_name) { ?>
$b) { $key = pack("H*",md5($key)); } $key = str_pad($key, $b, chr(0x00)); $ipad = str_pad('', $b, chr(0x36)); $opad = str_pad('', $b, chr(0x5c)); $k_ipad = $key ^ $ipad ; $k_opad = $key ^ $opad; return md5($k_opad . pack("H*",md5($k_ipad . $data))); } /* function hmac ($key, $data) { return (bin2hex (mhash(MHASH_MD5, $data, $key))); } */ function CalculateFP ($loginid, $x_tran_key, $amount, $sequence, $tstamp, $currency = "") { return (hmac ($x_tran_key, $loginid . "^" . $sequence . "^" . $tstamp . "^" . $amount . "^" . $currency)); } function InsertFP ($loginid, $x_tran_key, $amount, $sequence, $tstamp, $currency = "") { $tstamp = time (); $fingerprint = hmac ($x_tran_key, $loginid . "^" . $sequence . "^" . $tstamp . "^" . $amount . "^" . $currency); echo ('' ); echo ('' ); echo ('' ); return (0); } function showSamanMsg($msg) { include(ROOT_DIR . "/templates/" . CURRENT_SKIN . "/saman.error.php"); die(); } function redirectPage($page,$msg = '') { global $conn; ?>