|
|
@@ -137,11 +137,39 @@ function STATYSTYKA_TABELE() {
|
|
|
$sqlList[]=" update USERS2_MARKETING set T_OPER='NIEWIADOMO' where T_OPER=''";
|
|
|
$sqlList[]=" update USERS2_MARKETING set TV_OPER='NIEWIADOMO' where TV_OPER=''";
|
|
|
$sqlList[]=" update USERS2_MARKETING set I_OPER='NIEWIADOMO' where I_OPER=''";
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ { //posprzatanie filtrow operatorow - todo tabela konkurencji
|
|
|
+ $oper_fix['%ORAN%']='ORANGE';
|
|
|
+ $oper_fix['%T%MOBLILE%']='T-MOBLILE';
|
|
|
+ $oper_fix['%TP%LIVE%BOX%']='ORANGE';
|
|
|
+ $oper_fix['%TP%ORANE%']='ORANGE';
|
|
|
+ $oper_fix['%BRAK%']='BRAK';
|
|
|
+ $oper_fix['CANAL%']='CANAL-PLUS';
|
|
|
+ $oper_fix['%CYFRA%']='CYFRA-PLUS';
|
|
|
+ $oper_fix['KABL%WKA']='INNY';
|
|
|
+ $oper_fix['NAZ%EMNA']='DVBC';
|
|
|
+ $oper_fix['NC%']='NC-PLUS';
|
|
|
+ $oper_fix['POLSAT%']='POLSAT';
|
|
|
+ $oper_fix['POLAT']='POLSAT';
|
|
|
+ $oper_fix['SATELITA%']='DVB-S';
|
|
|
+ $oper_fix['POLAT']='POLSAT';
|
|
|
+ $oper_fix['S__UZBOWY']='INNY';
|
|
|
+ $oper_fix['POLAT']='POLSAT';
|
|
|
+
|
|
|
+
|
|
|
+ foreach($oper_fix as $filtr=>$set) {
|
|
|
+ $sqlList[]="update I_OPER set '".$set."' where I_OPER like '".$filtr."'" ;
|
|
|
+ $sqlList[]="update TV_OPER set '".$set."' where I_OPER like '".$filtr."'" ;
|
|
|
+ $sqlList[]="update T_OPER set '".$set."' where I_OPER like '".$filtr."'" ;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
{ //stworzenie widoku bledow w USERS2_MARKETING dot budynkow
|
|
|
@@ -362,16 +390,16 @@ function STATYSTYKA_TABELE() {
|
|
|
$res_OPERS=$db->query($sql_OPERS);
|
|
|
while($row_OPERS=$db->fetch($res_OPERS)) {
|
|
|
if(strlen($row_OPERS->OPERS)>0)
|
|
|
- if(!in_array(strtolower(preg_replace('/[^a-zA-Z0-9_]/','_',$row_OPERS->OPERS), $COLSFORSTATS_OPERS)))
|
|
|
- if(!in_array(strtoupper(preg_replace('/[^a-zA-Z0-9_]/','_',$row_OPERS->OPERS), $COLSFORSTATS_OPERS)))
|
|
|
- if(!in_array(preg_replace('/[^a-zA-Z0-9_]/','_',$row_OPERS->OPERS, $COLSFORSTATS_OPERS))) {
|
|
|
+ if(!in_array(strtolower(preg_replace('/[^a-zA-Z0-9_\-]/','_',$row_OPERS->OPERS), $COLSFORSTATS_OPERS)))
|
|
|
+ if(!in_array(strtoupper(preg_replace('/[^a-zA-Z0-9_\-]/','_',$row_OPERS->OPERS), $COLSFORSTATS_OPERS)))
|
|
|
+ if(!in_array(preg_replace('/[^a-zA-Z0-9_\-]/','_',$row_OPERS->OPERS, $COLSFORSTATS_OPERS))) {
|
|
|
//echo "dodaje ".strtoupper(preg_replace('/[^a-zA-Z0-9\-_]/','_',$row_OPERS->OPERS));
|
|
|
$COLSFORSTATS_OPERS[]=strtoupper(preg_replace('/[^a-zA-Z0-9_]/','_',$row_OPERS->OPERS));
|
|
|
}
|
|
|
- if($row_OPERS->OPERS!=preg_replace('/[^a-zA-Z0-9_]/','_',$row_OPERS->OPERS)) {
|
|
|
+ if($row_OPERS->OPERS!=preg_replace('/[^a-zA-Z0-9_\-]/','_',$row_OPERS->OPERS)) {
|
|
|
//aktualizacja w bazie nazwy operatora aby byla bez dziwnych znakow
|
|
|
foreach($COLSFORSTATS as $FFS) {
|
|
|
- $sql_upd="update USERS2_MARKETING set `{$FFS}_OPER`='".strtoupper(preg_replace('/[^a-zA-Z0-9_]/','_',$row_OPERS->OPERS))."' where `{$FFS}_OPER`='".$row_OPERS->OPERS."'";
|
|
|
+ $sql_upd="update USERS2_MARKETING set `{$FFS}_OPER`='".strtoupper(preg_replace('/[^a-zA-Z0-9_\-]/','_',$row_OPERS->OPERS))."' where `{$FFS}_OPER`='".$row_OPERS->OPERS."'";
|
|
|
$res = $db->query($sql_upd);
|
|
|
if ($db->has_errors()) {
|
|
|
$errors = true;
|