public static function submitFeedback()
 {
     $captcha = Core::validate(self::getVar('captcha'));
     $right_code = Session::getSessionVariable('security_code');
     Session::unsetSessionVariable('security_code');
     if ($captcha != $right_code) {
         Core::printErrorJson('Incorrect captcha');
         exit;
     }
     $usr = self::getCurrentUser(1);
     if (!isset($usr)) {
         header('Location: /');
         exit;
     }
     $feedback = array();
     $feedback['type'] = Core::validate(self::getVar('trouble-type'));
     $feedback['message'] = Core::validate(self::getVar('trouble'));
     $feedback['email'] = Core::validate(self::getVar('email'));
     $fbModel = new Feedback();
     $fbModel->setUID($usr->getId());
     $fbModel->setType($feedback['type']);
     $fbModel->setMessage($feedback['message']);
     $fbModel->setEmail($feedback['email']);
     $fbModel->insert();
     Core::printSuccessJson('Your ticket is active now!');
 }