|
|
@@ -243,15 +243,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)))
|
|
|
- $COLSFORSTATS_OPERS[]=strtolower(preg_replace('/[^a-zA-Z0-9\-_]/','_',$row_OPERS->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 "<br> 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)) {
|
|
|
//aktualizacja w bazie nazwy operatora aby byla bez dziwnych znakow
|
|
|
foreach($COLSFORSTATS as $FFS) {
|
|
|
- $sql_upd="update USERS2_MARKETING set `{$FFS}_OPER`='".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;
|