Changeset 681
- Timestamp:
- 04/29/08 03:47:33 (7 months ago)
- Files:
-
- branches/1.3/A2BCustomer_UI/lib/adodb/perf/perf-mysql.inc.php (modified) (1 diff)
- branches/1.3/A2Billing_AGI/libs_a2billing/adodb/perf/perf-mysql.inc.php (modified) (1 diff)
- branches/1.3/A2Billing_UI/api/display_ratecard.php (modified) (10 diffs)
- branches/1.3/A2Billing_UI/lib/adodb/perf/perf-mysql.inc.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.3/A2BCustomer_UI/lib/adodb/perf/perf-mysql.inc.php
r1 r681 270 270 return 0; 271 271 } 272 return 0;273 272 } 274 273 branches/1.3/A2Billing_AGI/libs_a2billing/adodb/perf/perf-mysql.inc.php
r1 r681 270 270 return 0; 271 271 } 272 return 0;273 272 } 274 273 branches/1.3/A2Billing_UI/api/display_ratecard.php
r622 r681 69 69 // CHECK KEY 70 70 if ($FG_DEBUG > 0) echo "<br> md5(".md5($security_key).") !== $key"; 71 if (md5($security_key) !== $key || strlen($security_key)==0) 72 {73 mail($email_alarm, "ALARM : RATE CARD API - CODE_ERROR 2", $mail_content);74 if ($FG_DEBUG > 0) echo ("[" . date("Y/m/d G:i:s", mktime()) . "] "."[$productid] - CODE_ERROR 2"."\n");75 //error_log ("[" . date("Y/m/d G:i:s", mktime()) . "].CODE_ERROR 2"."\n", 3, $logfile);76 echo("400 Bad Request");77 exit();78 } 71 72 if (md5($security_key) !== $key || strlen($security_key)==0) { 73 mail($email_alarm, "ALARM : RATE CARD API - CODE_ERROR 2", $mail_content); 74 if ($FG_DEBUG > 0) echo ("[" . date("Y/m/d G:i:s", mktime()) . "] "."[$productid] - CODE_ERROR 2"."\n"); 75 //error_log ("[" . date("Y/m/d G:i:s", mktime()) . "].CODE_ERROR 2"."\n", 3, $logfile); 76 echo("400 Bad Request"); 77 exit(); 78 } 79 79 80 80 //** … … 104 104 else $sqlclause.=" AND ".$addclause; 105 105 } 106 106 107 //end set default 107 108 trim($field_to_display); … … 120 121 $DISPLAY_LETTER=false; 121 122 122 if (DB_TYPE == "postgres") {123 if (DB_TYPE == "postgres") { 123 124 $REG_EXP = "~*"; 124 } else{125 } else { 125 126 $REG_EXP = "REGEXP"; 126 127 } … … 149 150 150 151 151 if (isset($tariffgroupid) && strlen($tariffgroupid)!=0) {152 if (isset($tariffgroupid) && strlen($tariffgroupid)!=0) { 152 153 $FG_TABLE_NAME="cc_ratecard t1, cc_tariffplan t4, cc_tariffgroup t5, cc_tariffgroup_plan t6"; 153 154 add_clause($FG_TABLE_CLAUSE,"t4.id = t6.idtariffplan AND t6.idtariffplan=t1.idtariffplan AND t6.idtariffgroup = '$tariffgroupid'"); 154 } else{155 } else { 155 156 $FG_TABLE_NAME="cc_ratecard t1"; 156 157 157 if (isset($ratecardid) && strlen($ratecardid)!=0) {158 if (isset($ratecardid) && strlen($ratecardid)!=0) { 158 159 $FG_TABLE_NAME="cc_ratecard t1, cc_tariffplan t4"; 159 160 add_clause($FG_TABLE_CLAUSE,"t4.id = '$ratecardid' AND t1.idtariffplan = t4.id"); … … 168 169 // this variable specifie the debug type (0 => nothing, 1 => sql result, 2 => boucle checking, 3 other value checking) 169 170 $FG_DEBUG = 0; 170 171 // The variable FG_TABLE_NAME define the table name to use172 173 174 //$link = DbConnect();175 171 $DBHandle = DbConnect(); 176 177 172 178 173 // First Name of the column in the html page, second name of the field 179 174 $FG_TABLE_COL = array(); 180 175 181 if (count($column)==count($field) && count($field)==count($type) && count($column) != 0) 182 {for ($i=0; $i<count($column); $i++){176 if (count($column)==count($field) && count($field)==count($type) && count($column) != 0) { 177 for ($i=0; $i<count($column); $i++){ 183 178 switch ($type[$i]) { 184 179 case "money": … … 225 220 $instance_table = new Table($FG_TABLE_NAME, $FG_COL_QUERY); 226 221 $list = $instance_table -> Get_list ($DBHandle, $FG_TABLE_CLAUSE, $order, $sens, null, null, $FG_LIMITE_DISPLAY, $current_page*$FG_LIMITE_DISPLAY, NULL, $caching_query); 227 { 222 228 223 $country_table = new Table("cc_country","countryname"); 229 224 $country_list = $country_table -> Get_list ($DBHandle); … … 234 229 $nb_record = $list_nrecord[0][0]; 235 230 236 if ($nb_record<=$FG_LIMITE_DISPLAY) {231 if ($nb_record<=$FG_LIMITE_DISPLAY) { 237 232 $nb_record_max=1; 238 } else{239 if ($nb_record % $FG_LIMITE_DISPLAY == 0) {233 } else { 234 if ($nb_record % $FG_LIMITE_DISPLAY == 0) { 240 235 $nb_record_max=(intval($nb_record/$FG_LIMITE_DISPLAY)); 241 } else{236 } else { 242 237 $nb_record_max=(intval($nb_record/$FG_LIMITE_DISPLAY)+1); 243 238 } … … 266 261 </script> 267 262 268 <?php if ($fullhtmlpage) { ?>263 <?php if ($fullhtmlpage) { ?> 269 264 <html><head> 270 265 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> … … 298 293 <?php } ?></select><input name="btn01" type="button" align="top" value="Search" class="button" onclick="JavaScript:Search('btn01');"> 299 294 </div> 300 <?php } if ($DISPLAY_LETTER){ ?>295 <?php } if ($DISPLAY_LETTER){ ?> 301 296 <div class="searchelement" align="left"> 302 297 <?php echo gettext("select the first letter of the country you are looking for");?><br> … … 407 402 408 403 </html> 409 <?php } 404 <?php 405 } 410 406 ?> branches/1.3/A2Billing_UI/lib/adodb/perf/perf-mysql.inc.php
r1 r681 270 270 return 0; 271 271 } 272 return 0;273 272 } 274 273
