Esempio n. 1
0
 function get_restricted_notices($restrict_sets)
 {
     if ($this->restricted_notices == "") {
         if (count($restrict_sets)) {
             $tab = array();
             for ($i = 0; $i < count($restrict_sets); $i++) {
                 $set = new \connector_out_set($restrict_sets[$i]);
                 $tab = array_merge($tab, $set->get_values());
                 $tab = array_unique($tab);
             }
             $this->restricted_notices = implode(",", $tab);
             $tab = array();
         } else {
             $query = "select notice_id from notices";
             $result = pmb_mysql_query($query);
             if (pmb_mysql_num_rows($result)) {
                 while ($row = pmb_mysql_fetch_object($result)) {
                     if ($this->restricted_notices) {
                         $this->restricted_notices .= ",";
                     }
                     $this->restricted_notices .= $row->notice_id;
                 }
             }
         }
     }
 }