Esempio n. 1
0
 if (frm_isset('streamrss')) {
     $ca = new caction();
     $ca->updatelist();
     $ca->createrss(true);
 } else {
     if (frm_isset('whatsnewrss')) {
         $gl = new genlist();
         $gl->whats_new(0, 30);
         $gl->outrss();
     } else {
         if (frm_isset('action')) {
             $action = frm_get('action');
             $match = true;
             switch ($action) {
                 case 'deactivatenetwork':
                     if ($valuser->isadmin()) {
                         $nid = frm_get('nid', 1);
                         if (is_numeric($nid)) {
                             $ndc = new networkdb();
                             $host = $ndc->getone($nid);
                             if ($host) {
                                 $host->setenabled(0);
                                 $host->update();
                                 $ndc = new networkdb();
                                 $hosts = $ndc->getenabled();
                                 if (count($hosts) == 0) {
                                     $setctl->set('activenetworkhosts', 0);
                                 }
                             }
                         }
                         refreshurl(PHPSELF . '?action=settingsview&page=4');
Esempio n. 2
0
         $gl = new genlist();
         $gl->whats_new(0, 30);
         $gl->outrss();
         die;
     }
 }
 if (isset($_GET['action']) || isset($_POST['action'])) {
     if (isset($_GET['action'])) {
         $action = $_GET['action'];
     } else {
         $action = $_POST['action'];
     }
     $match = true;
     switch ($action) {
         case 'deactivatenetwork':
             if ($valuser->isadmin()) {
                 $nid = $_GET['nid'];
                 if (is_numeric($nid)) {
                     $ndc = new networkdb();
                     $host = $ndc->getone($_GET['nid']);
                     if ($host) {
                         $host->setenabled(0);
                         $host->update();
                         $ndc = new networkdb();
                         $hosts = $ndc->getenabled();
                         if (count($hosts) == 0) {
                             $setctl->set('activenetworkhosts', 0);
                         }
                     }
                 }
                 refreshurl(PHPSELF . '?action=settingsview&page=4');