$inst_table = new Table("cc_tariffgroup", "id"); $FG_TABLE_CLAUSE = "tariffgroupname = '$value'"; $list_group = $inst_table -> Get_list ($handle, $FG_TABLE_CLAUSE, "", "", "", "", "", "", "", 10); $id = $list_group[0][0]; if($id > 0){ echo "<a href=\"call-pnl-report.php?group_id=$id&report_type=2\">$value</a>"; }else{ echo $value; } } if(!isset($group_id)){ if ($report_type==1){ $HD_Form -> AddViewElement(gettext("Group"), "name", "*", "center", "SORT", "19","", "", "", "", "", "linktonext_1"); }elseif($report_type==2){ $HD_Form -> AddViewElement(gettext("Callplan"),"name", "*", "center", "SORT", "19","", "", "", "", "", "linktonext_2"); } } else { $HD_Form -> AddViewElement(gettext("Country"), "name", "*", "center", "SORT", "19","", "", "", "", "", ""); } $HD_Form -> AddViewElement(gettext("CallCount"), "call_count", "*", "center", "SORT", "30"); $HD_Form -> AddViewElement(gettext("Minutes"), "time_minutes", "*", "center", "SORT", "30"); $HD_Form -> AddViewElement(gettext("Toll Free Cost"), "tall_free_buy_cost", "*", "center", "SORT", "30","", "", "", "", "", "display_2dec"); $HD_Form -> AddViewElement(gettext("Pay Phone Cost"), "pay_phone_buy_cost", "*", "center", "SORT",30,"", "", "", "", "", "display_2dec" ); $HD_Form -> AddViewElement(gettext("Origination Cost"), "orig_only", "*", "center", "SORT", "30","", "", "", "", "", "display_2dec"); $HD_Form -> AddViewElement(gettext("Credits"), "credits", "*", "center", "SORT", "30","", "", "", "", "", "display_2dec"); $HD_Form -> AddViewElement(gettext("Total Cost"),"orig_total", "*", "center", "SORT", "30","", "", "", "", "", "display_2dec"); $HD_Form -> AddViewElement(gettext("Toll Free Revenu"),"tall_free_sell_cost","*", "center", "SORT", "30","", "", "", "", "", "display_2dec"); $HD_Form -> AddViewElement(gettext("Pay Phone Revenu"),"pay_phone_sell_cost","*", "center", "SORT", "30","", "", "", "", "", "display_2dec");
$current_page = 0; } $HD_Form = new FormHandler("cc_call t1 LEFT OUTER JOIN cc_trunk t3 ON t1.id_trunk = t3.id_trunk", "Calls"); $HD_Form->setDBHandler(DbConnect()); $HD_Form->init(); $HD_Form->FG_DEBUG = 0; $HD_Form->FG_TABLE_DEFAULT_ORDER = "starttime"; $HD_Form->FG_TABLE_DEFAULT_SENS = "DESC"; $HD_Form->FG_LIMITE_DISPLAY = 30; $yesno = array(); $yesno["1"] = array(gettext("Yes"), "1"); $yesno["0"] = array(gettext("No"), "0"); $HD_Form->CV_DISPLAY_FILTER_ABOVE_TABLE = FALSE; $HD_Form->CV_DISPLAY_LINE_TITLE_ABOVE_TABLE = false; $HD_Form->CV_DO_ARCHIVE_ALL = true; $HD_Form->AddViewElement(gettext("ID"), "id", "3%", "center", "sort"); $HD_Form->AddViewElement(gettext("Calldate"), "starttime", "15%", "center", "SORT", "19", "", "", "", "", "", "display_dateformat"); $HD_Form->AddViewElement(gettext("CalledNumber"), "calledstation", "15%", "center", "SORT", "30", "", "", "", "", "", "remove_prefix"); $HD_Form->AddViewElement(gettext("Destination"), "destination", "15%", "center", "SORT", "30", "", "", "", "", "", "remove_prefix"); $HD_Form->AddViewElement(gettext("Duration"), "sessiontime", "7%", "center", "SORT", "30", "", "", "", "", "", "display_minute"); $HD_Form->AddViewElement(gettext("CardUsed"), "username", "11%", "center", "SORT", "", "30", "", "", "", "", "linktocustomer"); $HD_Form->AddViewElement(gettext("terminatecauseid"), "terminatecauseid", "10%", "center", "SORT", "30"); $HD_Form->AddViewElement(gettext("IAX/SIP"), "sipiax", "6%", "center", "SORT", "", "list", $yesno); $HD_Form->AddViewElement(gettext("InitialRate"), "calledrate", "10%", "center", "SORT", "30", "", "", "", "", "", "display_2dec"); $HD_Form->AddViewElement(gettext("Cost"), "sessionbill", "10%", "center", "SORT", "30", "", "", "", "", "", "display_2bill"); $FG_COL_QUERY = 'id, starttime, calledstation, destination, real_sessiontime, card_id, terminatecauseid, sipiax, buycost, sessionbill'; $HD_Form->FieldViewElement($FG_COL_QUERY); if ($posted == 1) { $SQLcmd = ''; $SQLcmd = do_field($SQLcmd, 'src', 'src'); $SQLcmd = do_field($SQLcmd, 'dst', 'calledstation');
<?php getpost_ifset(array('id', 'cid', 'outbound_cid_group', 'activated')); $HD_Form = new FormHandler("cc_outbound_cid_list", "cid"); $HD_Form->FG_DEBUG = 0; $HD_Form->FG_TABLE_ID = "id"; $HD_Form->FG_TABLE_DEFAULT_ORDER = "cid"; $HD_Form->FG_TABLE_DEFAULT_SENS = "DESC"; $HD_Form->FG_LIST_ADDING_BUTTON1 = true; $HD_Form->FG_LIST_ADDING_BUTTON_LINK1 = "A2B_entity_outbound_cid.php?form_action=ask-add&atmenu=cidgroup§ion=" . $_SESSION["menu_section"]; $HD_Form->FG_LIST_ADDING_BUTTON_ALT1 = $HD_Form->FG_LIST_ADDING_BUTTON_MSG1 = gettext("Add CallerID"); $HD_Form->FG_LIST_ADDING_BUTTON_IMG1 = Images_Path . "/server_connect.png"; $actived_list = Constants::getActivationList(); $HD_Form->AddViewElement(gettext("CID"), "cid", "30%", "center", "sort"); $HD_Form->AddViewElement(gettext("CIDGROUP"), "outbound_cid_group", "30%", "center", "sort", "15", "lie", "cc_outbound_cid_group", "group_name", "id='%id'", "%1"); $HD_Form->AddViewElement(gettext("STATUS"), "activated", "15%", "center", "sort", "", "list", $actived_list); $HD_Form->FieldViewElement('cid, outbound_cid_group, activated'); $HD_Form->CV_NO_FIELDS = gettext("THERE ARE NO") . " " . strtoupper($HD_Form->FG_INSTANCE_NAME) . " " . gettext("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; $HD_Form->FG_ADDITION = true; $HD_Form->FG_EDITION = true; $HD_Form->FG_DELETION = true; $HD_Form->FG_SPLITABLE_FIELD = 'cid'; // TODO integrate in Framework if ($form_action == "ask-add") { $begin_date = date("Y"); $begin_date_plus = date("Y") + 25; $end_date = date("-m-d H:i:s"); $comp_date = "value='" . $begin_date . $end_date . "'";
// Code Here for Deleting the Dependent Records // Dependent Tables $HD_Form -> FG_FK_DELETE_ALLOWED = true; $HD_Form -> FG_FK_DELETE_CONFIRM = true; $HD_Form->FG_FK_DELETE_OR_UPDATE = true; $HD_Form -> FG_FK_WARNONLY = true; $HD_Form -> FG_FK_TABLENAMES = array("cc_outbound_cid_list"); $HD_Form -> FG_FK_EDITION_CLAUSE = array(" outbound_cid_group "); $HD_Form -> FG_FK_DELETE_MESSAGE = gettext("You have some CID using this CID Group! Please comfirm that you really want to remove this CID Group ? "); $HD_Form -> AddViewElement(gettext("ID"), "id", "5%", "center", "sort"); $HD_Form -> AddViewElement(gettext("DIDGROUP NAME"), "group_name", "20%", "center", "sort"); $HD_Form -> AddViewElement(gettext("CREATION DATE"), "creationdate", "20%", "center", "sort", "30", "", "", "", "", "display_dateformat"); // added a parameter to append FG_TABLE_ID ( by default ) or disable 0. $HD_Form -> FieldViewElement ('id, group_name, creationdate'); $HD_Form -> CV_NO_FIELDS = gettext("THERE IS NO ".strtoupper($HD_Form->FG_INSTANCE_NAME)." 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; $HD_Form -> FG_EDITION = true; $HD_Form -> FG_DELETION = true; $HD_Form -> FG_ADDITION = true;
$expire_list["2"] = array(gettext("EXPIRE DAYS SINCE FIRST USE"), "2"); $expire_list["3"] = array(gettext("EXPIRE DAYS SINCE CREATION"), "3"); $actived_list = array(); $actived_list["t"] = array(gettext("On"), "t"); $actived_list["f"] = array(gettext("Off"), "f"); $yesno = array(); $yesno["1"] = array(gettext("Yes"), "1"); $yesno["0"] = array(gettext("No"), "0"); $invoiceday_list = array(); for ($k = 0; $k <= 28; $k++) { $invoiceday_list["{$k}"] = array("{$k}", "{$k}"); } $HD_Form->CV_DISPLAY_FILTER_ABOVE_TABLE = FALSE; $HD_Form->CV_DISPLAY_LINE_TITLE_ABOVE_TABLE = false; $HD_Form->CV_DO_ARCHIVE_ALL = true; $HD_Form->AddViewElement(gettext("ID"), "id", "3%", "center", "sort"); $HD_Form->AddViewElement(gettext("ACCOUNT NUMBER"), "username", "20%", "center", "sort", "", "30", "", "", "", "", "linktocustomer"); $HD_Form->AddViewElement("<acronym title=\"" . gettext("BALANCE") . "\">" . gettext("BA") . "</acronym>", "credit", "5%", "center", "sort", "", "", "", "", "", "", "display_2dec"); $HD_Form->AddViewElement(gettext("LASTNAME"), "lastname", "10%", "center", "sort", "15"); $HD_Form->AddViewElement(gettext("STATUS"), "status", "8%", "center", "sort", "", "list", $cardstatus_list_acronym); $HD_Form->AddViewElement(gettext("LG"), "language", "10%", "center", "sort"); $HD_Form->AddViewElement(gettext("USE"), "inuse", "8%", "center", "sort"); $HD_Form->AddViewElement("<acronym title=\"" . gettext("CURRENCY") . "\">" . gettext("CUR") . "</acronym>", "currency", "8%", "center", "sort", "", "list", $currency_list_key); $HD_Form->AddViewElement(gettext("SIP"), "sip_buddy", "10%", "center", "sort", "", "list", $yesno); $HD_Form->AddViewElement(gettext("IAX"), "iax_buddy", "10%", "center", "sort", "", "list", $yesno); $HD_Form->AddViewElement("<acronym title=\"AMOUNT OF CALL DONE\">" . gettext("ACD") . "</acronym>", "nbused", "10%", "center", "sort"); $FG_COL_QUERY = 'id, username, credit, lastname, status, language, inuse, currency, sip_buddy, iax_buddy, nbused'; $HD_Form->FieldViewElement($FG_COL_QUERY); $HD_Form->CV_NO_FIELDS = gettext("NO CUSTOMER SEARCHED!"); $HD_Form->FG_LIMITE_DISPLAY = 30; $HD_Form->FG_FILTER_SEARCH_FORM = true;