亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? class.rateengine.php

?? asterisk用 的voip記費軟件
?? PHP
?? 第 1 頁 / 共 3 頁
字號:
						" WHERE $CLAUSE_DATE AND id_cc_card = '".$A2B->id_card."' AND id_cc_package_offer = '$id_cc_package_offer' ";								$pack_result = $A2B -> instance_table -> SQLExec ($A2B -> DBHandle, $QUERY);												if (is_array($pack_result) && count($pack_result)>0){					$freetimetocall_used = $pack_result[0][0];				}else{					$freetimetocall_used = 0;				}								$A2B -> write_log ('line:'.__LINE__." - PACK USED TIME : $QUERY ; RESULT -> $freetimetocall_used");				if ($this -> debug_st) echo ('line:'.__LINE__." - PACK USED TIME : $QUERY ; RESULT -> $freetimetocall_used");								$this -> freetimetocall_left[$K] = $freetimetocall - $freetimetocall_used;				if ($this -> freetimetocall_left[$K] < 0) $this -> freetimetocall_left[$K] = 0;							}		}		if ($this -> debug_st) print_r($this -> freetimetocall_left);		// ****************  END PACKAGE PARAMETERS ****************  				$credit -= $connectcharge;		$credit -= $disconnectcharge;		//$credit -= ($initblock/60)*$rateinitial;				$this -> ratecard_obj[$K]['timeout']=0;				// CHECK IF THE USER IS ALLOW TO CALL WITH ITS CREDIT AMOUNT		if ($credit < $A2B->agiconfig['min_credit_2call']){			return "ERROR CT1";  //NO ENOUGH CREDIT TO CALL THIS NUMBER		}				// if ($rateinitial==0) return "ERROR RATEINITIAL($rateinitial)";		$TIMEOUT = 0;				if ($rateinitial<=0){			$this -> ratecard_obj[$K]['timeout']= $A2B->agiconfig['maxtime_tocall_negatif_free_route']; // 90 min			if ($this -> debug_st) print_r($this -> ratecard_obj[$K]);			return $TIMEOUT;		}						// 2 KIND OF CALCULATION : PROGRESSIVE RATE & FLAT RATE		// IF FLAT RATE 		if (empty($chargea) || $chargea==0 || empty($timechargea) || $timechargea==0 ){						$num_min = $credit/$rateinitial;						if ($this -> debug_st) echo "num_min:$num_min ($credit/$rateinitial)\n";						$num_sec = intval($num_min * 60);			if ($this -> debug_st) echo "num_sec:$num_sec \n";						if ($billingblock > 0) {				$mod_sec = $num_sec % $billingblock; 					$num_sec=$num_sec-$mod_sec;			}						$TIMEOUT = $num_sec;				// IF PROGRESSIVE RATE 		}else{			if ($this -> debug_st) echo "CYCLE A	TIMEOUT:$TIMEOUT\n";			// CYCLE A			$credit -= $stepchargea;						//if ($credit<=0) return "ERROR CT2";		//NO ENOUGH CREDIT TO CALL THIS NUMBER			if ($credit<=0){				if ($this -> freetimetocall_left[$K] > 0){					$this -> ratecard_obj[$K]['timeout'] = $this -> freetimetocall_left[$K];					if ($this -> debug_st) print_r($this -> ratecard_obj[$K]);					return $this -> freetimetocall_left[$K];				}else{					return "ERROR CT2";		//NO ENOUGH CREDIT TO CALL THIS NUMBER				}							}			if (!($chargea>0)) return "ERROR CHARGEA($chargea)";			$num_min = $credit/$chargea;			if ($this -> debug_st) echo "			CYCLEA num_min:$num_min ($credit/$chargea)\n";						$num_sec = intval($num_min * 60);			if ($this -> debug_st) echo "			CYCLEA num_sec:$num_sec \n";			if ($billingblocka > 0) {				$mod_sec = $num_sec % $billingblocka;				$num_sec=$num_sec-$mod_sec;			}									if (($num_sec>$timechargea) && !(empty($chargeb) || $chargeb==0 || empty($timechargeb) || $timechargeb==0) ){				$TIMEOUT += $timechargea;				$credit -= ($chargea/60) * $timechargea;				if ($this -> debug_st) echo "		CYCLE B		TIMEOUT:$TIMEOUT\n";				// CYCLE B				$credit -= $stepchargeb;				if ($credit<=0){					$this -> ratecard_obj[$K]['timeout'] = $TIMEOUT + $this -> freetimetocall_left[$K];					return $TIMEOUT + $this -> freetimetocall_left[$K];		//NO ENOUGH CREDIT TO GO TO THE CYCLE B				}								if (!($chargeb>0)) return "ERROR CHARGEB($chargeb)";				$num_min = $credit/$chargeb;				if ($this -> debug_st) echo "			CYCLEB num_min:$num_min ($credit/$chargeb)\n";							$num_sec = intval($num_min * 60);				if ($this -> debug_st) echo "			CYCLEB num_sec:$num_sec \n";				if ($billingblockb > 0) {					$mod_sec = $num_sec % $billingblockb;					$num_sec=$num_sec-$mod_sec;				} 				if (($num_sec>$timechargeb) && !(empty($chargec) || $chargec==0 || empty($timechargec) || $timechargec==0) )				{					$TIMEOUT += $timechargeb;					$credit -= ($chargeb/60) * $timechargeb;											if ($this -> debug_st) echo "				CYCLE C		TIMEOUT:$TIMEOUT\n";					// CYCLE C					$credit -= $stepchargec;					if ($credit<=0){						$this -> ratecard_obj[$K]['timeout'] = $TIMEOUT + $this -> freetimetocall_left[$K];						return $TIMEOUT + $this -> freetimetocall_left[$K];		//NO ENOUGH CREDIT TO GO TO THE CYCLE C					}										if (!($chargec>0)) return "ERROR CHARGEC($chargec)";					$num_min = $credit/$chargec;					if ($this -> debug_st) echo "			CYCLEC num_min:$num_min ($credit/$chargec)\n";								$num_sec = intval($num_min * 60);					if ($this -> debug_st) echo "			CYCLEC num_sec:$num_sec \n";					if ($billingblockc > 0) {						$mod_sec = $num_sec % $billingblockc;						$num_sec=$num_sec-$mod_sec; 					}																		if (($num_sec>$timechargec)){						if ($this -> debug_st) echo "		OUT CYCLE C		TIMEOUT:$TIMEOUT\n";						$TIMEOUT += $timechargec;						$credit -= ($chargec/60) * $timechargec;														// IF CYCLE C IS FINISH USE THE RATEINITIAL														$num_min = $credit/$rateinitial;						if ($this -> debug_st) echo "			OUT CYCLEC num_min:$num_min ($credit/$rateinitial)\n";									$num_sec = intval($num_min * 60);						if ($this -> debug_st) echo "			OUT CYCLEC num_sec:$num_sec \n";						if ($billingblock > 0) {							$mod_sec = $num_sec % $billingblock;							$num_sec=$num_sec-$mod_sec;						}						$TIMEOUT += $num_sec;														// THIS IS THE END												}else{						$TIMEOUT += $num_sec;					}														}else{											if (($num_sec>$timechargeb)){						$TIMEOUT += $timechargeb;						if ($this -> debug_st) echo "		OUT CYCLE B		TIMEOUT:$TIMEOUT\n";						$credit -= ($chargeb/60) * $timechargeb;													// IF CYCLE B IS FINISH USE THE RATEINITIAL						$num_min = $credit/$rateinitial;						if ($this -> debug_st) echo "			OUT CYCLEB num_min:$num_min ($credit/$rateinitial)\n";									$num_sec = intval($num_min * 60);						if ($this -> debug_st) echo "			OUT CYCLEB num_sec:$num_sec \n";						if ($billingblock > 0) {							$mod_sec = $num_sec % $billingblock;							$num_sec=$num_sec-$mod_sec; 						}														$TIMEOUT += $num_sec;															// THIS IS THE END											}else{						$TIMEOUT += $num_sec;					}											}						}else{								if (($num_sec>$timechargea)){									$TIMEOUT += $timechargea;					if ($this -> debug_st) echo "		OUT CYCLE A		TIMEOUT:$TIMEOUT\n";					$credit -= ($chargea/60) * $timechargea;										// IF CYCLE A IS FINISH USE THE RATEINITIAL					$num_min = $credit/$rateinitial;					if ($this -> debug_st) echo "			OUT CYCLEA num_min:$num_min ($credit/$rateinitial)\n";								$num_sec = intval($num_min * 60);					if ($this -> debug_st) echo "			OUT CYCLEA num_sec:$num_sec \n";;					if ($billingblock > 0) {						$mod_sec = $num_sec % $billingblock;						$num_sec=$num_sec-$mod_sec; 					}										$TIMEOUT += $num_sec;													// THIS IS THE END								}else{					$TIMEOUT += $num_sec;				}						}				}		$this -> ratecard_obj[$K]['timeout']=$TIMEOUT + $this -> freetimetocall_left[$K];		if ($this -> debug_st) print_r($this -> ratecard_obj[$K]);		RETURN $TIMEOUT + $this -> freetimetocall_left[$K];	}	/*		RATE ENGINE - CALCUL COST OF THE CALL		* CALCUL THE CREDIT COSUMED BY THE CALL	*/	function rate_engine_calculcost (&$A2B, $callduration, $K=0, $freetimetocall_used){			$K = $this->usedratecard;		$buyrate = round(abs($this -> ratecard_obj[$K][9]),4);		$buyrateinitblock = $this -> ratecard_obj[$K][10];		$buyrateincrement = $this -> ratecard_obj[$K][11];				$rateinitial = round(abs($this -> ratecard_obj[$K][12]),4);		$initblock = $this -> ratecard_obj[$K][13];		$billingblock = $this -> ratecard_obj[$K][14];			$connectcharge = round(abs($this -> ratecard_obj[$K][15]),4);		$disconnectcharge = round(abs($this -> ratecard_obj[$K][16]),4);			$stepchargea = $this -> ratecard_obj[$K][17]; 		$chargea = round(abs($this -> ratecard_obj[$K][18]),4);		$timechargea = $this -> ratecard_obj[$K][19];		$billingblocka = $this -> ratecard_obj[$K][20];			$stepchargeb = $this -> ratecard_obj[$K][21];		$chargeb = round(abs($this -> ratecard_obj[$K][22]),4);		$timechargeb = $this -> ratecard_obj[$K][23];		$billingblockb = $this -> ratecard_obj[$K][24];			$stepchargec = $this -> ratecard_obj[$K][25];		$chargec = round(abs($this -> ratecard_obj[$K][26]),4);			$timechargec = $this -> ratecard_obj[$K][27];		$billingblockc = $this -> ratecard_obj[$K][28];				if (!is_numeric($freetimetocall_used)) $freetimetocall_used=0;				if ($this -> debug_st)  echo "CALLDURATION: $callduration - freetimetocall_used=$freetimetocall_used\n\n";		$A2B -> debug( WRITELOG, $agi, __FILE__, __LINE__, "[CC_RATE_ENGINE_CALCULCOST: K=$K - CALLDURATION:$callduration - freetimetocall_used=$freetimetocall_used]");				$cost =0;		$cost -= $connectcharge;		$cost -= $disconnectcharge;				// CALCULATION BUYRATE COST		$buyratecallduration = $callduration;				$buyratecost =0;		if ($buyratecallduration<$buyrateinitblock) $buyratecallduration=$buyrateinitblock;		if ($buyrateincrement > 0) {				$mod_sec = $buyratecallduration % $buyrateincrement;			if ($mod_sec>0) $buyratecallduration += ($buyrateincrement - $mod_sec);		}				$buyratecost -= ($buyratecallduration/60) * $buyrate;		if ($this -> debug_st)  echo "1. cost: $cost\n buyratecost:$buyratecost\n";				$callduration = $callduration - $freetimetocall_used;				// 2 KIND OF CALCULATION : PROGRESSIVE RATE & FLAT RATE		// IF FLAT RATE 		if (empty($chargea) || $chargea==0 || empty($timechargea) || $timechargea==0 ){					if ($callduration<$initblock) $callduration=$initblock;						if ($billingblock > 0) {					$mod_sec = $callduration % $billingblock;  				if ($mod_sec>0) $callduration += ($billingblock - $mod_sec);			}						$cost -= ($callduration/60) * $rateinitial;				if ($this -> debug_st)  echo "1.a cost: $cost\n";			$A2B -> debug( WRITELOG, $agi, __FILE__, __LINE__, "[TEMP - CC_RATE_ENGINE_CALCULCOST: 1. COST: $cost]:[ ($callduration/60) * $rateinitial ]");				// IF PROGRESSIVE RATE 		}else{			if ($this -> debug_st) echo "CYCLE A	COST:$cost\n";			// CYCLE A			$cost -= $stepchargea;			if ($this -> debug_st)  echo "1.A cost: $cost\n\n";						if ($callduration>$timechargea){ $duration_report = $callduration-$timechargea; $callduration=$timechargea; }						if ($billingblocka > 0) {					$mod_sec = $callduration % $billingblocka;  				if ($mod_sec>0) $callduration += ($billingblocka - $mod_sec);			}			$cost -= ($callduration/60) * $chargea;						if (($duration_report>0) && !(empty($chargeb) || $chargeb==0 || empty($timechargeb) || $timechargeb==0) )			{				$callduration=$duration_report;				$duration_report=0;												// CYCLE B				$cost -= $stepchargeb;				if ($this -> debug_st)  echo "1.B cost: $cost\n\n";									if ($callduration>$timechargeb){ 					$duration_report = $callduration-$timechargeb; 					$callduration=$timechargeb;				}									if ($billingblockb > 0) {						$mod_sec = $callduration % $billingblockb;  					if ($mod_sec>0) $callduration += ($billingblockb - $mod_sec);				}				$cost -= ($callduration/60) * $chargeb; // change chargea -> chargeb thanks to Abbas :D									if (($duration_report>0) && !(empty($chargec) || $chargec==0 || empty($timechargec) || $timechargec==0) )				{											$callduration=$duration_report;					$duration_report=0;																	// CYCLE C					$cost -= $stepchargec;					if ($this -> debug_st)  echo "1.C cost: $cost\n\n";												if ($callduration>$timechargec){ 						$duration_report = $callduration-$timechargec; 						$callduration=$timechargec; 					}												if ($billingblockc > 0) {							$mod_sec = $callduration % $billingblockc;  						if ($mod_sec>0) $callduration += ($billingblockc - $mod_sec);					}					$cost -= ($callduration/60) * $chargec;											}			}						if ($duration_report>0){							if ($duration_report<$initblock) $duration_report=$initblock;						if ($billingblock > 0) {						$mod_sec = $duration_report % $billingblock;  					if ($mod_sec>0) $duration_report += ($billingblock - $mod_sec);				}								$cost -= ($duration_report/60) * $rateinitial;								$A2B -> debug( WRITELOG, $agi, __FILE__, __LINE__, "[TEMP - CC_RATE_ENGINE_CALCULCOST: 2. DURATION_REPORT:$duration_report - COST: $cost]");			}					}		$cost = round($cost,4);		if ($this -> debug_st)  echo "FINAL COST: $cost\n\n";		$A2B -> debug( WRITELOG, $agi, __FILE__, __LINE__, "[CC_RATE_ENGINE_CALCULCOST: K=$K - BUYCOST: $buyratecost - SELLING COST: $cost]");		$this -> lastcost = $cost;		$this -> lastbuycost = $buyratecost;	}    /* 		SORT_ASC : Tri en ordre ascendant      	SORT_DESC : Tri en ordre descendant	*/	function array_csort() 	{  		$args = func_get_args();		$marray = array_shift($args);		$i=0;		$msortline = "return(array_multisort(";		foreach ($args as $arg) {			$i++;			if (is_string($arg)) {				foreach ($marray as $row) {					$sortarr[$i][] = $row[$arg];				}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区视频| 91猫先生在线| 91久久精品一区二区二区| 日韩欧美亚洲另类制服综合在线| 中文字幕在线免费不卡| 蜜臀久久99精品久久久画质超高清| 99视频超级精品| 久久久久97国产精华液好用吗| 天天综合色天天综合色h| 99re这里都是精品| 欧美国产日韩亚洲一区| 国产在线精品一区二区三区不卡| 欧美日韩三级在线| 亚洲一区二区三区精品在线| 99麻豆久久久国产精品免费优播| 久久久天堂av| 国产精品亚洲а∨天堂免在线| 欧美成人video| 欧美亚洲精品一区| 久久精品这里都是精品| 日韩二区在线观看| 欧美日韩一本到| 一级日本不卡的影视| 一本色道久久综合亚洲aⅴ蜜桃 | 91一区二区在线| 国产欧美日产一区| 波多野结衣亚洲| 国产精品国产三级国产普通话99| 国产一区二区三区综合| 国产偷v国产偷v亚洲高清| 成人综合在线网站| 欧美国产一区视频在线观看| 不卡电影免费在线播放一区| 中文字幕在线不卡一区 | 国产精品456| 国产日韩欧美在线一区| 成人高清免费观看| 亚洲另类春色校园小说| 色哟哟精品一区| 亚洲成在人线在线播放| 日韩欧美一卡二卡| 国产一区二区三区在线观看精品| 欧美极品少妇xxxxⅹ高跟鞋| 成人精品电影在线观看| 亚洲精品菠萝久久久久久久| 欧美日韩一区二区在线视频| 日韩**一区毛片| 国产婷婷色一区二区三区四区| 99久久精品国产一区二区三区| 亚洲激情综合网| 91一区在线观看| 成人免费视频免费观看| 国产精品视频看| 99久久精品国产观看| 亚洲成人在线网站| 精品日韩成人av| www.欧美精品一二区| 亚洲国产欧美日韩另类综合| 日韩免费电影一区| 91看片淫黄大片一级在线观看| 亚洲一区二区三区四区中文字幕 | 亚洲欧美日韩在线不卡| 欧美日韩中字一区| 久久99九九99精品| 欧美日韩国产片| 亚洲午夜成aⅴ人片| 日韩午夜在线播放| 99精品欧美一区二区三区综合在线| 亚洲高清不卡在线观看| 久久综合九色综合97婷婷| 在线视频综合导航| 狠狠色丁香婷综合久久| 一区二区三区日韩欧美| 久久久影院官网| 欧美美女bb生活片| av电影在线观看完整版一区二区| 日本在线不卡一区| 亚洲精选视频在线| 国产香蕉久久精品综合网| 欧美精品久久一区二区三区 | 日本免费新一区视频| 国产精品毛片大码女人| 日韩久久精品一区| 欧美三级三级三级爽爽爽| 国产成人日日夜夜| 久草在线在线精品观看| 亚洲一区二区三区影院| 亚洲视频每日更新| 国产校园另类小说区| 精品久久久久久久久久久久包黑料 | 成人av电影在线播放| 久久99国产精品久久99| 天堂久久久久va久久久久| 亚洲精品乱码久久久久久久久 | 91尤物视频在线观看| 国产乱码精品一区二区三| 日韩高清不卡一区二区三区| 亚洲一区二区3| 亚洲欧美偷拍另类a∨色屁股| 国产欧美精品一区二区色综合朱莉| 日韩午夜精品电影| 日韩一区二区在线看| 欧美精品自拍偷拍动漫精品| 在线观看日韩高清av| 色综合久久久久| 色欧美日韩亚洲| 色视频成人在线观看免| 色悠悠亚洲一区二区| 色欧美日韩亚洲| 欧洲视频一区二区| 精品视频免费在线| 欧美影院一区二区三区| 欧美日韩中文字幕一区二区| 欧美日韩在线亚洲一区蜜芽| 欧美三级视频在线播放| 91精品国产综合久久久久久 | 91超碰这里只有精品国产| 日本福利一区二区| 在线中文字幕一区二区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 在线精品视频免费播放| 欧美日韩国产成人在线免费| 在线电影欧美成精品| 欧美一区二区免费视频| 日韩精品一区二区三区中文不卡| 亚洲精品一区在线观看| 国产亚洲欧洲997久久综合| 国产精品视频麻豆| 亚洲狠狠丁香婷婷综合久久久| 午夜精品aaa| 国产一区二区毛片| 99精品视频在线免费观看| 欧美日韩视频在线第一区 | 制服丝袜亚洲网站| 精品国产髙清在线看国产毛片| 国产三级三级三级精品8ⅰ区| 亚洲人成伊人成综合网小说| 日韩精彩视频在线观看| 国产在线视频精品一区| 99re热视频这里只精品| 欧美日韩国产a| 精品国产免费人成在线观看| 国产精品国产三级国产三级人妇 | 精品国产乱码久久久久久闺蜜 | 奇米色一区二区| 成人免费看视频| 欧美日韩国产一级| 国产欧美日韩久久| 首页欧美精品中文字幕| 丁香亚洲综合激情啪啪综合| 欧美婷婷六月丁香综合色| 欧美精品一区男女天堂| 亚洲精品成人少妇| 国产精品一区二区无线| 欧美日韩一卡二卡三卡| 亚洲国产精品v| 日韩精品一区第一页| www.色精品| 欧美成人女星排行榜| 亚洲精品日韩专区silk| 国产一区二区三区蝌蚪| 91国产视频在线观看| 国产欧美日韩另类视频免费观看| 日韩av电影一区| 91久久国产最好的精华液| 国产午夜精品久久| 秋霞电影一区二区| 欧美最新大片在线看| 国产女主播一区| 麻豆中文一区二区| 欧美日韩视频不卡| 亚洲蜜臀av乱码久久精品蜜桃| 国产精品小仙女| 欧美一级黄色录像| 亚洲成人精品一区二区| av在线综合网| 国产盗摄视频一区二区三区| 91成人免费在线| 国产精品的网站| 国产高清不卡一区二区| 日韩一区二区免费在线观看| 一级做a爱片久久| 91黄色激情网站| 亚洲欧美偷拍另类a∨色屁股| 成人自拍视频在线观看| 亚洲精品在线网站| 免费的成人av| 欧美精品777| 亚洲成人av在线电影| 欧美自拍丝袜亚洲| 一区二区在线观看视频| 色婷婷综合五月| 一区二区三区久久久| 色悠久久久久综合欧美99| 亚洲欧美日韩在线不卡| 色诱亚洲精品久久久久久| 亚洲综合在线免费观看| 欧美亚日韩国产aⅴ精品中极品| 《视频一区视频二区| 欧美色老头old∨ideo|