Changeset 681

Show
Ignore:
Timestamp:
04/29/08 03:47:33 (7 months ago)
Author:
areski
Message:

small erros

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.3/A2BCustomer_UI/lib/adodb/perf/perf-mysql.inc.php

    r1 r681  
    270270                        return 0; 
    271271                } 
    272                 return 0; 
    273272        } 
    274273         
  • branches/1.3/A2Billing_AGI/libs_a2billing/adodb/perf/perf-mysql.inc.php

    r1 r681  
    270270                        return 0; 
    271271                } 
    272                 return 0; 
    273272        } 
    274273         
  • branches/1.3/A2Billing_UI/api/display_ratecard.php

    r622 r681  
    6969// CHECK KEY 
    7070if ($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 
     72if (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
    7979 
    8080//** 
     
    104104        else $sqlclause.=" AND ".$addclause; 
    105105} 
     106 
    106107//end set default 
    107108trim($field_to_display); 
     
    120121$DISPLAY_LETTER=false; 
    121122 
    122 if (DB_TYPE == "postgres"){             
     123if (DB_TYPE == "postgres") { 
    123124                $REG_EXP = "~*"; 
    124 }else
     125} else
    125126                $REG_EXP = "REGEXP"; 
    126127} 
     
    149150 
    150151 
    151 if (isset($tariffgroupid) && strlen($tariffgroupid)!=0)
     152if (isset($tariffgroupid) && strlen($tariffgroupid)!=0)
    152153        $FG_TABLE_NAME="cc_ratecard t1, cc_tariffplan t4, cc_tariffgroup t5, cc_tariffgroup_plan t6"; 
    153154        add_clause($FG_TABLE_CLAUSE,"t4.id = t6.idtariffplan AND t6.idtariffplan=t1.idtariffplan AND t6.idtariffgroup = '$tariffgroupid'"); 
    154 }else
     155} else
    155156        $FG_TABLE_NAME="cc_ratecard t1"; 
    156157         
    157         if (isset($ratecardid) && strlen($ratecardid)!=0){  
     158        if (isset($ratecardid) && strlen($ratecardid)!=0) {  
    158159                $FG_TABLE_NAME="cc_ratecard t1, cc_tariffplan t4"; 
    159160                add_clause($FG_TABLE_CLAUSE,"t4.id = '$ratecardid' AND t1.idtariffplan = t4.id"); 
     
    168169// this variable specifie the debug type (0 => nothing, 1 => sql result, 2 => boucle checking, 3 other value checking) 
    169170$FG_DEBUG = 0; 
    170  
    171 // The variable FG_TABLE_NAME define the table name to use 
    172  
    173  
    174 //$link = DbConnect(); 
    175171$DBHandle  = DbConnect(); 
    176  
    177172 
    178173// First Name of the column in the html page, second name of the field 
    179174$FG_TABLE_COL = array(); 
    180175 
    181 if (count($column)==count($field) && count($field)==count($type) && count($column) != 0) 
    182 {     for ($i=0; $i<count($column); $i++){ 
     176if (count($column)==count($field) && count($field)==count($type) && count($column) != 0) { 
     177      for ($i=0; $i<count($column); $i++){ 
    183178                switch ($type[$i]) { 
    184179                        case "money": 
     
    225220$instance_table = new Table($FG_TABLE_NAME, $FG_COL_QUERY); 
    226221$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 
    228223$country_table = new Table("cc_country","countryname"); 
    229224$country_list = $country_table -> Get_list ($DBHandle); 
     
    234229$nb_record = $list_nrecord[0][0]; 
    235230 
    236 if ($nb_record<=$FG_LIMITE_DISPLAY){  
     231if ($nb_record<=$FG_LIMITE_DISPLAY) { 
    237232        $nb_record_max=1; 
    238 }else{  
    239         if ($nb_record % $FG_LIMITE_DISPLAY == 0)
     233} else { 
     234        if ($nb_record % $FG_LIMITE_DISPLAY == 0)
    240235                $nb_record_max=(intval($nb_record/$FG_LIMITE_DISPLAY)); 
    241         }else
     236        } else
    242237                $nb_record_max=(intval($nb_record/$FG_LIMITE_DISPLAY)+1); 
    243238        }        
     
    266261</script> 
    267262 
    268 <?php if ($fullhtmlpage){ ?> 
     263<?php if ($fullhtmlpage) { ?> 
    269264<html><head> 
    270265<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
     
    298293                                <?php   } ?></select><input name="btn01" type="button"  align="top" value="Search" class="button" onclick="JavaScript:Search('btn01');"> 
    299294                </div> 
    300                 <?php } if ($DISPLAY_LETTER){?> 
     295                <?php } if ($DISPLAY_LETTER){ ?> 
    301296                <div class="searchelement"  align="left"> 
    302297                        <?php echo gettext("select the first letter of the country you are looking for");?><br> 
     
    407402 
    408403</html> 
    409 <?php } 
     404<?php  
     405        } 
    410406?> 
  • branches/1.3/A2Billing_UI/lib/adodb/perf/perf-mysql.inc.php

    r1 r681  
    270270                        return 0; 
    271271                } 
    272                 return 0; 
    273272        } 
    274273         


Google