Esempio n. 1
0
         } else {
             $content = AlertMessage('alert-success', Language::Word('request is accepted'));
             RequestOnRegister::Delete($_POST['id']);
         }
     }
     break;
 case UserBlock::$type:
     $usr_block = UserBlock::FetchFromAssoc($_POST);
     if ($usr_block === NULL) {
         $content = AlertMessage('alert-danger', Language::Word('error while user block adding'));
     } else {
         $glob_id = 0;
         if (isset($_POST['glob_id'])) {
             $glob_id = $_POST['glob_id'];
         }
         if (UserBlock::InsertToDB($usr_block, $_POST['language'], $glob_id)) {
             $content = AlertMessage('alert-success', Language::Word('user block is successfully added'));
         } else {
             $content = AlertMessage('alert-danger', Language::Word('error during user block inserting'));
         }
     }
     break;
 case Article::$type:
     $assoc = $_POST;
     $assoc['author_id'] = $_POST['id'];
     unset($assoc['id']);
     $article = Article::FetchFromAssoc($assoc);
     if ($article === NULL) {
         $content = AlertMessage('alert-danger', Language::Word('error while article adding'));
     } else {
         $glob_id = 0;