$deleteOrders->setTable($table);
    $deleteOrders->setId($num);
    $deleteOrders->delete();
    if ($del) {
        echo "DELETE OK";
        echo "<HTML><HEAD>\n          <META HTTP-EQUIV='Refresh' CONTENT='0; URL=answerController.php'>\n          </HEAD></HTML>";
        exit;
    }
    exit;
}
//Заявки
if (isset($approveState)) {
    require 'phpmailer/PHPMailerAutoload.php';
    require_once 'classes/Approve.php';
    $table = "statements";
    $approveTableStatements = new Approve();
    $approveTableStatements->setId($numOfState);
    $approveTableStatements->setTable($table);
    $approveTableStatements->setAnswered($answered);
    $approveTableStatements->approve();
    $mailer = new PHPMailer();
    $mailer->isSMTP();
    $mailer->Host = 'smtp.mail.ru';
    $mailer->SMTPAuth = true;
    $mailer->Username = '******';
    //Логин
    $mailer->Password = '******';
    //пароль
    $mailer->SMTPSecure = 'ssl';
    $mailer->Port = '465';
    $mailer->CharSet = 'UTF-8';
    $deleteReview->setId($shit);
    $deleteReview->setTable($table);
    $deleteReview->delete();
    if ($btnDelete) {
        echo "DELETE OK";
        echo "<HTML><HEAD>\n          <META HTTP-EQUIV='Refresh' CONTENT='0; URL=answerController.php'>\n          </HEAD></HTML>";
        exit;
    }
    exit;
}
//Заказы
if (isset($approve)) {
    require 'phpmailer/PHPMailerAutoload.php';
    require_once 'classes/Approve.php';
    $table = "orders";
    $approveOrders = new Approve();
    $approveOrders->setTable($table);
    $approveOrders->setAnswered($answered);
    $approveOrders->setId($num);
    $approveOrders->approve();
    $mailer = new PHPMailer();
    $mailer->isSMTP();
    $mailer->Host = 'smtp.mail.ru';
    $mailer->SMTPAuth = true;
    $mailer->Username = '******';
    //Логин
    $mailer->Password = '******';
    //пароль
    $mailer->SMTPSecure = 'ssl';
    $mailer->Port = '465';
    $mailer->CharSet = 'UTF-8';