fg_var_def_ratecard.inc

来自「asterisk用 的voip记费软件」· INC 代码 · 共 445 行 · 第 1/2 页

INC
445
字号
<?phpgetpost_ifset(array('id', 'idtariffplan', 'dialprefix', 'destination', 'buyrate', 'buyrateinitblock','buyrateincrement', 'rateinitial', 'initblock', 'billingblock', 'connectcharge', 'disconnectcharge','stepchargea', 'chargea', 'timechargea', 'billingblocka', 'stepchargeb', 'chargeb', 'timechargeb','billingblockb', 'stepchargec', 'chargec', 'timechargec', 'billingblockc', 'startdate', 'stopdate','starttime', 'endtime', 'id_trunk', 'freetimetocall_package_offer', 'musiconhold','tariffplan','posted','id_outbound_cidgroup'));$HD_Form = new FormHandler("cc_ratecard","Rates");$HD_Form -> FG_DEBUG = 0;$HD_Form -> FG_TABLE_DEFAULT_ORDER = " destination";$HD_Form -> FG_TABLE_DEFAULT_SENS = "ASC";$HD_Form->FG_FILTER_SEARCH_SESSION_NAME = 'entity_ratecard_selection';//echo "<b>def_ratecard = ".$_SESSION['def_ratecard']."</b><br><br>";if (isset($posted)){	$idtariff = explode('-:-',$tariffplan);	$HD_Form->FG_TOP_FILTER_NAME = str_replace ("-:-","",$idtariff[1]);	//echo "Debug hey ->".$HD_Form->FG_TOP_FILTER_NAME."<br>";	$HD_Form->FG_TOP_FILTER_VALUE = $idtariff[0];	$HD_Form -> FG_TABLE_CLAUSE = " idtariffplan='$HD_Form->FG_TOP_FILTER_VALUE' ";	$_SESSION['def_ratecard']=$HD_Form -> FG_TABLE_CLAUSE;}else{	$HD_Form -> FG_TOP_FILTER_NAME = 0;	$HD_Form -> FG_TABLE_CLAUSE = $_SESSION['def_ratecard'];}$musiconhold_list = array();$musiconhold_list[] = array( "No MusicOnHold", "");for ($i=1;$i<=NUM_MUSICONHOLD_CLASS;$i++){	$musiconhold_list[]  = array( "MUSICONHOLD CLASS ACC_$i", "acc_$i");}$yesno = array();$yesno["1"] = array( gettext("Yes"), "1");$yesno["0"] = array( gettext("No"), "0");$HD_Form -> AddViewElement(gettext("DESTINATION"), "destination", "17%", "center", "sort", "");$HD_Form -> AddViewElement("<acronym title=\"DIALING PREFIX\">".gettext("PREFIX")."</acronym>", "dialprefix", "10%", "center", "sort", "");//$HD_Form -> AddViewElement(gettext("PACKAGE"), "id_cc_package_offer", "11%", "center", "sort", "15", "lie", "cc_package_offer", "label", "id='%id'", "%1");$HD_Form -> AddViewElement("<acronym title=\"BUYING RATE\">".gettext("BR")."</acronym>", "buyrate", "4%", "center", "sort");$HD_Form -> AddViewElement("<acronym title=\"SELLING RATE\">".gettext("SR")."</acronym>", "rateinitial", "4%", "center", "sort");$HD_Form -> AddViewElement(gettext("START-DATE"), "startdate", "15%", "center", "sort", "19", "", "", "", "", "", "display_dateformat");$HD_Form -> AddViewElement(gettext("STOP-DATE"), "stopdate", "15%", "center", "sort", "19", "", "", "", "", "", "display_dateformat");$HD_Form -> AddViewElement("<acronym title=\"INITBLOCK\">".gettext("INITB")."</acronym>", "initblock", "4%", "center", "sort");$HD_Form -> AddViewElement("<acronym title=\"CONNECT CHARGE\">".gettext("CC")."</acronym>", "connectcharge", "4%", "center", "sort");$HD_Form -> AddViewElement(gettext("TRUNK"), "id_trunk", "12%", "center", "sort", "15", "lie", "cc_trunk", "trunkcode", "id_trunk='%id'", "%1");$HD_Form -> AddViewElement(gettext("<acronym title=\"FREE TIME TO CALL\">".gettext("FTC")."</acronym>"), "freetimetocall_package_offer", "3%", "center", "sort", "", "list", $yesno);//$HD_Form -> AddViewElement(gettext("CIDGroup"), "id_outbound_cidgroup", "12%", "center", "sort", "15", "lie", "cc_outbound_cid_group", "group_name", "id='%id'", "%1");$HD_Form -> FieldViewElement ('destination, dialprefix, buyrate, rateinitial, startdate, stopdate, initblock, connectcharge, id_trunk, freetimetocall_package_offer');$HD_Form -> CV_NO_FIELDS  = gettext("NO")." ".strtoupper($HD_Form->FG_INSTANCE_NAME)." ".gettext("HAVE BEEN CREATED."); $HD_Form -> CV_DISPLAY_LINE_TITLE_ABOVE_TABLE = false;$HD_Form -> CV_TEXT_TITLE_ABOVE_TABLE = '';$HD_Form -> CV_DISPLAY_FILTER_ABOVE_TABLE = false;// Search form$HD_Form -> FG_FILTER_SEARCH_FORM = true;$HD_Form -> FG_FILTER_SEARCH_TOP_TEXT = gettext("Define the criteria to search");$HD_Form -> FG_FILTER_SEARCH_1_TIME_TEXT = gettext("Start Date / Month");$HD_Form -> FG_FILTER_SEARCH_2_TIME_TEXT = gettext("Start Date / Day");$HD_Form -> FG_FILTER_SEARCH_2_TIME_FIELD = 'startdate';$HD_Form -> AddSearchElement_C1(gettext("DESTINATION"), 'destination','destinationtype');$HD_Form -> AddSearchElement_C1(gettext("PREFIX"),'dialprefix','dialprefixtype');$HD_Form -> AddSearchElement_C2(gettext("BUYRATE"),'buyrate1','buyrate1type','buyrate2','buyrate2type','buyrate');$HD_Form -> AddSearchElement_C2(gettext("RATE INITIAL"),'rateinitial1','rateinitial1type','rateinitial2','rateinitial2type','rateinitial');$HD_Form -> FG_FILTER_SEARCH_FORM_SELECT_TEXT = 'TRUNK';$HD_Form -> AddSearchElement_Select('SELECT TRUNK',"cc_trunk","id_trunk, trunkcode, providerip","","trunkcode","ASC","id_trunk");$HD_Form -> FG_EDITION = true;$HD_Form -> FG_DELETION = true;$HD_Form -> AddEditElement(gettext("RATECARD"),   "idtariffplan",	   '$value',	   "SELECT",	   "", "", "",	   "sql",		   "cc_tariffplan",	   "tariffname, id",		   "", "", "%1", "", "");$dialprefix_regexpress = '9';if ($form_action=="ask-edit" || $form_action=="edit"){	$dialprefix_regexpress = '13';}$HD_Form -> AddEditElement(gettext("DIALPREFIX"),   "dialprefix",   '$value',	   "POPUPVALUE",	   "size=50 maxlength=80",	   "$dialprefix_regexpress",   gettext("Insert the dialing prefix, such as for UK '44' or for US '1' "),   "" , "", "",	"", "" , "A2B_entity_prefix.php?popup_select=1&", ", 'prefix','width=550,height=340,top=20,left=100,scrollbars=1'", gettext("Define the destination prefix. i.e. 441 for UK Landlines. Use 'defaultprefix' to setup a rate for all destinations where a specific rate is is not provided. If you ADD a rate, NOT an EDIT, you can define a range of prefixes. <br>32484-32487 would match all dialled digits between 32484 and 32487, whereas prefixes separated by a comma e.g. 32484,32386,32488 would only match the individual prefixes listed."));$HD_Form -> AddEditElement(gettext("DESTINATION"),   "destination",   '$value',   "INPUT",   "size=30 maxlength=40",   "11",   gettext("Come on... Insert the destination name"),   "" , "", "",	"", "", "", "", gettext("Name for this call destination, for example : UK, Belgium Landline, Spain Mobile Telefonica, ...") );$HD_Form -> AddEditElement("BUYING RATE",   "buyrate",   '$value',   "INPUT",   "size=30 maxlength=20",   "12",   "Insert the buy rate",   "" , "", "",	"", "" , "", "", gettext("Set the carrier cost, the price you pay for minutes."), null, null, gettext("Define your purchase cost that you need to pay to your voip-provider to let your platform call this destination."));$HD_Form -> AddEditElement(gettext("BUYRATE MIN DURATION"),   "buyrateinitblock",   '$value',   "INPUT",   "size=30 maxlength=20",   "4",   gettext("Insert the buyrate init block"),   "" , "", "",	"", "", "" , "NO", gettext("Set the minimum duration charged by the carrier. (i.e. 30 secs)"));$HD_Form -> AddEditElement(gettext("BUYRATE BILLING BLOCK"),   "buyrateincrement",   '$value',   "INPUT",   "size=30 maxlength=20",   "4",   gettext("Insert the billing block"),   "" , "", "",	"", "", "" , "NO", gettext("Set the billing increment, in seconds (billing block), that the carrier applies. (ie 30 secs)"));$HD_Form -> AddEditElement(gettext("SELLING RATE"),   "rateinitial",   '$value',   "INPUT",   "size=30 maxlength=20",   "12",   gettext("Insert the initial rate"),   "" , "", "",	"", "" , "", "", gettext("The retail rate; or the cost per minute to apply to the customer, e.g. 0.02"), null, null, gettext("Define the selling cost for customers."));$HD_Form -> AddEditElement(gettext("SELLRATE MIN DURATION"),   "initblock",		   '$value',	   "INPUT",	   "size=30 maxlength=20",	   "4",	   gettext("Insert the init block"),   "" , "", "",	"", "", "", "NO", gettext("Set the minimum duration to charge the customer (ie 60 seconds)"));$HD_Form -> AddEditElement(gettext("SELLRATE BILLING BLOCK"),   "billingblock",   '$value',   "INPUT",   "size=30 maxlength=20",   "4",   gettext("Insert the billing block"),   "" , "", "",	"", "", "", "NO", gettext("Set the billing increment in seconds to bill your customer."));$HD_Form -> AddEditElement(gettext("CONNECT CHARGE"),   "connectcharge",   '$value',   "INPUT",   "size=30 maxlength=20",   "12",   gettext("Insert the connect charge"),   "" , "", "",	"", "", "" , "NO", gettext("Apply a connection charge"));$HD_Form -> AddEditElement(gettext("DISCONNECT CHARGE"),   "disconnectcharge",   '$value',   "INPUT",   "size=30 maxlength=20",   "12",   gettext("Insert the disconnect charge"),   "" , "", "",	"", "", "", "NO", gettext("Apply a disconnection charge" ));if (ADVANCED_MODE){	$HD_Form -> AddEditElement(gettext("STEPCHARGE A"),	   "stepchargea",	   '$value',	   "INPUT",	   "size=30 maxlength=20",	   "12",	   gettext("Insert the stepcharge A"),	   "" , "", "",	"", "", "", "NO", gettext("When entering in the cycle 'A', define the amount to charge for the entrance."), '', '', gettext("Below we have the section to create progressive rates. Progressive rate aims to bill the customer at various rates according the duration of the call. For instance you can define that you can to bill the customer 0.33dollars for the first 2 minutes and then you want to bill him 0.45dollars for the rest of the call." ));				$HD_Form -> AddEditElement(gettext("CHARGE A"),	   "chargea",	   '$value',	   "INPUT",	   "size=30 maxlength=20",	   "12",	   gettext("Insert the charge A"),	   "" , "", "",	"", "", "", "NO", gettext("When entering in the cycle 'A', define the rate to apply." ));		$HD_Form -> AddEditElement(gettext("TIMECHARGE A"),	   "timechargea",	   '$value',	   "INPUT",	   "size=30 maxlength=20",	   "4",	   gettext("Insert the time charge A"),	   "" , "", "",	"", "", "", "NO", gettext("Define the duration of the cycle 'A'." ));

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?