Changeset 1090
- Timestamp:
- 10/03/08 03:40:21 (2 months ago)
- Files:
-
- trunk/admin/Public/call-log-customers.php (modified) (3 diffs)
- trunk/admin/Public/form_data/FG_var_card.inc (modified) (1 diff)
- trunk/common/lib/interface/constants.php (modified) (2 diffs)
- trunk/customer/call-history.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/admin/Public/call-log-customers.php
r1081 r1090 68 68 $list_calltype ["4"] = array ("CALLBACK", "4" ); 69 69 $list_calltype ["5"] = array ("PREDICT", "5" ); 70 71 $FG_TABLE_DEFAULT_ORDER = "t1.starttime"; 72 $FG_TABLE_DEFAULT_SENS = "DESC"; 73 70 74 71 75 $DBHandle = DbConnect (); … … 93 97 } 94 98 95 $FG_TABLE_DEFAULT_ORDER = "t1.starttime";96 $FG_TABLE_DEFAULT_SENS = "DESC";97 98 99 // This Variable store the argument for the SQL query 99 100 $FG_COL_QUERY = 't1.starttime, t1.src, t1.dnid ,t1.calledstation, t1.id_cc_prefix, t4.buyrate ,t4.rateinitial ,t1.sessiontime, t1.card_id, t3.trunkcode, t1.terminatecauseid, t1.sipiax, t1.buycost, t1.sessionbill, case when t1.sessionbill!=0 then ((t1.sessionbill-t1.buycost)/t1.sessionbill)*100 else NULL end as margin,case when t1.buycost!=0 then ((t1.sessionbill-t1.buycost)/t1.buycost)*100 else NULL end as markup'; … … 101 102 $FG_COL_QUERY .= ', t1.uniqueid'; 102 103 } 103 104 104 $FG_COL_QUERY_GRAPH = 't1.callstart, t1.duration'; 105 105 106 // The variable LIMITE_DISPLAY define the limit of record to display by page107 106 $FG_LIMITE_DISPLAY = 25; 108 109 // Number of column in the html table110 107 $FG_NB_TABLE_COL = count ( $FG_TABLE_COL ); 111 112 // The variable $FG_EDITION define if you want process to the edition of the database record113 108 $FG_EDITION = true; 114 115 //This variable will store the total number of column116 109 $FG_TOTAL_TABLE_COL = $FG_NB_TABLE_COL; 117 110 if ($FG_DELETION || $FG_EDITION) 118 111 $FG_TOTAL_TABLE_COL ++; 119 120 //This variable define the Title of the HTML table 112 121 113 $FG_HTML_TABLE_TITLE = gettext ( " - Call Logs - " ); 122 123 //This variable define the width of the HTML table124 114 $FG_HTML_TABLE_WIDTH = '98%'; 125 115 126 if ($FG_DEBUG == 3) 127 echo "<br>Table : $FG_TABLE_NAME - Col_query : $FG_COL_QUERY"; 116 128 117 $instance_table = new Table ( $FG_TABLE_NAME, $FG_COL_QUERY ); 129 118 $instance_table_graph = new Table ( $FG_TABLE_NAME, $FG_COL_QUERY_GRAPH ); trunk/admin/Public/form_data/FG_var_card.inc
r1082 r1090 76 76 77 77 $cardstatus_list = Constants::getCardStatus_List(); 78 79 78 $cardstatus_list_r = Constants::getCardStatus_Revert_List(); 80 81 79 $cardstatus_list_acronym = Constants::getCardStatus_Acronym_List(); 82 83 80 $typepaid_list = Constants::getPaidTypeList(); 84 81 trunk/common/lib/interface/constants.php
r1083 r1090 24 24 $yesno["0"] = array( gettext("No"), "0"); 25 25 return $yesno; 26 } 27 28 29 30 26 } 31 27 32 28 public static function getPeriodsList(){ … … 223 219 $cardstatus_list_acronym = array(); 224 220 $cardstatus_list_acronym["0"] = array( gettext("<acronym title=\"CANCELLED\">".gettext("CANCEL")."</acronym>"), "0"); 225 $cardstatus_list_acronym["1"] = array( gettext("<acronym title=\"ACTIVE \">".gettext("ACTIVE")."</acronym>"), "1");221 $cardstatus_list_acronym["1"] = array( gettext("<acronym title=\"ACTIVED\">".gettext("ACTIVED")."</acronym>"), "1"); 226 222 $cardstatus_list_acronym["2"] = array( gettext("<acronym title=\"NEW\">".gettext("NEW")."</acronym>"), "2"); 227 $cardstatus_list_acronym["3"] = array( gettext("<acronym title=\"WAITING-MAILCONFIRMATION\">".gettext("WAIT ")."</acronym>"), "3");223 $cardstatus_list_acronym["3"] = array( gettext("<acronym title=\"WAITING-MAILCONFIRMATION\">".gettext("WAITING")."</acronym>"), "3"); 228 224 $cardstatus_list_acronym["4"] = array( gettext("<acronym title=\"RESERVED\">".gettext("RESERV")."</acronym>"), "4"); 229 $cardstatus_list_acronym["5"] = array( gettext("<acronym title=\"EXPIRED\">".gettext("EXPIR")."</acronym>"), "5"); 230 $cardstatus_list_acronym["6"] = array( gettext("<acronym title=\"SUSPENDED FOR UNDERPAYMENT\">".gettext("UNDERPAY")."</acronym>"), "6"); 231 $cardstatus_list_acronym["7"] = array( gettext("<acronym title=\"SUSPENDED FOR LITIGATION\">".gettext("LITIG")."</acronym>"), "7"); 225 $cardstatus_list_acronym["5"] = array( gettext("<acronym title=\"EXPIRED\">".gettext("EXPIRED")."</acronym>"), "5"); 226 $cardstatus_list_acronym["6"] = array( gettext("<acronym title=\"SUSPENDED FOR UNDERPAYMENT\">".gettext("SUS-PAY")."</acronym>"), "6"); 227 $cardstatus_list_acronym["7"] = array( gettext("<acronym title=\"SUSPENDED FOR LITIGATION\">".gettext("SUS-LIT")."</acronym>"), "7"); 228 return $cardstatus_list_acronym; 232 229 } 233 230 trunk/customer/call-history.php
r1014 r1090 60 60 $DBHandle = DbConnect(); 61 61 62 // The variable Var_col would define the col that we want show in your table 63 // First Name of the column in the html page, second name of the field 62 $FG_TABLE_DEFAULT_ORDER = "t1.starttime"; 63 $FG_TABLE_DEFAULT_SENS = "DESC"; 64 64 65 $FG_TABLE_COL = array(); 65 66 67 66 $FG_TABLE_COL[]=array (gettext("Calldate"), "starttime", "14%", "center", "SORT", "19", "", "", "", "", "", "display_dateformat"); 68 67 $FG_TABLE_COL[]=array (gettext("Source"), "source", "12%", "center", "SORT", "30"); 69 68 $FG_TABLE_COL[]=array (gettext("PhoneNumber"), "calledstation", "12%", "center", "SORT", "30", "", "", "", "", "", "remove_prefix"); 70 $FG_TABLE_COL []=array (gettext("Destination"), "id_cc_prefix", "12%", "center", "SORT", "30", "", "", "", "", "", "remove_prefix");69 $FG_TABLE_COL [] = array (gettext ( "Destination" ), "id_cc_prefix", "10%", "center", "SORT", "15", "lie", "cc_prefix", "destination", "id='%id'", "%1" ); 71 70 $FG_TABLE_COL[]=array (gettext("Duration"), "sessiontime", "7%", "center", "SORT", "30", "", "", "", "", "", "display_minute"); 72 71 $FG_TABLE_COL[]=array ('<acronym title="'.gettext("Terminate Cause").'">'.gettext("TC").'</acronym>', "terminatecauseid", "7%", "center", "SORT", "", "list", $dialstatus_list); … … 75 74 $FG_TABLE_COL[]=array (gettext("Cost"), "sessionbill", "10%", "center", "SORT", "30", "", "", "", "", "", "display_2bill"); 76 75 77 78 $FG_TABLE_DEFAULT_ORDER = "t1.starttime"; 79 $FG_TABLE_DEFAULT_SENS = "DESC"; 80 81 // This Variable store the argument for the SQL query 82 $FG_COL_QUERY='t1.starttime, t1.src, t1.calledstation, t1.destination, t1.sessiontime, t1.terminatecauseid, t1.sipiax, t1.calledrate, t1.sessionbill'; 83 // t1.stoptime, 84 76 $FG_COL_QUERY='t1.starttime, t1.src, t1.calledstation, t1.id_cc_prefix, t1.sessiontime, t1.terminatecauseid, t1.sipiax, t1.calledrate, t1.sessionbill'; 85 77 $FG_COL_QUERY_GRAPH='t1.callstart, t1.duration'; 86 78 87 // The variable LIMITE_DISPLAY define the limit of record to display by page88 79 $FG_LIMITE_DISPLAY=25; 89 90 // Number of column in the html table91 80 $FG_NB_TABLE_COL=count($FG_TABLE_COL); 92 93 // The variable $FG_EDITION define if you want process to the edition of the database record94 81 $FG_EDITION=true; 95 96 //This variable will store the total number of column97 82 $FG_TOTAL_TABLE_COL = $FG_NB_TABLE_COL; 98 83 if ($FG_DELETION || $FG_EDITION) $FG_TOTAL_TABLE_COL++; 99 100 //This variable define the Title of the HTML table101 84 $FG_HTML_TABLE_TITLE=" - ".gettext("Call Logs")." - "; 102 103 //This variable define the width of the HTML table104 85 $FG_HTML_TABLE_WIDTH="98%"; 105 86 106 if ($FG_DEBUG == 3) echo "<br>Table : $FG_TABLE_NAME - Col_query : $FG_COL_QUERY";107 $instance_table = new Table($FG_TABLE_NAME, $FG_COL_QUERY);108 $instance_table_graph = new Table($FG_TABLE_NAME, $FG_COL_QUERY_GRAPH);87 if ($FG_DEBUG == 3) echo "<br>Table : $FG_TABLE_NAME - Col_query : $FG_COL_QUERY"; 88 $instance_table = new Table($FG_TABLE_NAME, $FG_COL_QUERY); 89 $instance_table_graph = new Table($FG_TABLE_NAME, $FG_COL_QUERY_GRAPH); 109 90 110 91 … … 114 95 } 115 96 116 if ($posted==1){ 117 118 $SQLcmd = ''; 119 120 $SQLcmd = do_field($SQLcmd, 'src', 'source'); 121 $SQLcmd = do_field($SQLcmd, 'dst', 'calledstation'); 122 123 124 } 125 126 127 $date_clause=''; 128 // Period (Month-Day) 97 if ($posted==1) { 98 $SQLcmd = ''; 99 $SQLcmd = do_field($SQLcmd, 'src', 'source'); 100 $SQLcmd = do_field($SQLcmd, 'dst', 'calledstation'); 101 } 102 103 104 $date_clause = ''; 129 105 if (DB_TYPE == "postgres"){ 130 106 $UNIX_TIMESTAMP = ""; … … 141 117 } 142 118 143 //echo "<br>$date_clause<br>";144 /*145 Month146 fromday today147 frommonth tomonth (true)148 fromstatsmonth tostatsmonth149 150 fromstatsday_sday151 fromstatsmonth_sday152 tostatsday_sday153 tostatsmonth_sday154 */155 156 157 119 158 120 if (strpos($SQLcmd, 'WHERE') > 0) { … … 199 161 200 162 if (!$nodisplay){ 201 $res = $DBHandle -> Execute($QUERY); 202 if ($res){ 203 $num = $res -> RecordCount(); 204 for($i=0;$i<$num;$i++) 205 { 206 $list_total_day [] =$res -> fetchRow(); 207 } 208 } 209 210 if ($FG_DEBUG == 3) echo "<br>Clause : $FG_TABLE_CLAUSE"; 211 $nb_record = $instance_table -> Table_count ($DBHandle, $FG_TABLE_CLAUSE); 212 if ($FG_DEBUG >= 1) var_dump ($list); 213 214 }//end IF nodisplay 215 216 if ($nb_record<=$FG_LIMITE_DISPLAY){ 163 $res = $DBHandle -> Execute($QUERY); 164 if ($res){ 165 $num = $res -> RecordCount(); 166 for($i=0;$i<$num;$i++) 167 { 168 $list_total_day [] =$res -> fetchRow(); 169 } 170 } 171 172 if ($FG_DEBUG == 3) echo "<br>Clause : $FG_TABLE_CLAUSE"; 173 $nb_record = $instance_table -> Table_count ($DBHandle, $FG_TABLE_CLAUSE); 174 if ($FG_DEBUG >= 1) var_dump ($list); 175 } 176 177 if ($nb_record<=$FG_LIMITE_DISPLAY) { 217 178 $nb_record_max=1; 218 } else{219 if ($nb_record % $FG_LIMITE_DISPLAY == 0) {179 } else { 180 if ($nb_record % $FG_LIMITE_DISPLAY == 0) { 220 181 $nb_record_max=(intval($nb_record/$FG_LIMITE_DISPLAY)); 221 } else{182 } else { 222 183 $nb_record_max=(intval($nb_record/$FG_LIMITE_DISPLAY)+1); 223 184 } 224 185 } 225 226 227 if ($FG_DEBUG == 3) echo "<br>Nb_record : $nb_record";228 if ($FG_DEBUG == 3) echo "<br>Nb_record_max : $nb_record_max";229 230 186 231 187 /*************************************************************/ … … 243 199 244 200 <?php 245 $smarty->display( 'main.tpl'); 246 247 248 201 202 $smarty->display( 'main.tpl'); 203 249 204 // #### HELP SECTION 250 205 echo $CC_help_balance_customer;
