Example #1
0
        if (Input::get('reject')) {
            $delete = $user->delete([['id', '=', Input::get('id')], ['vateir_status', '<>', 1], ['vateir_status', '<>', 2]]);
            if ($delete) {
                Session::flash('success', 'Application approved');
                Redirect::to('./');
            }
        } elseif (Input::get('approve')) {
            if (Input::get('vateir_status') == 3) {
                $test = $user->update(['controllers.vateir_status' => '2', 'controllers.grou' => '10'], [['controllers.id', '=', Input::get('id')]]);
                if (!$t->findStudent(Input::get('id'))) {
                    if ($controller->rating > 7) {
                        $rating = $user->getRealRating(Input::get('id'));
                    } else {
                        $rating = $controller->rating;
                    }
                    $program = $t->program($rating);
                    $studentMake = $t->createStudent(array('cid' => Input::get('id'), 'program' => $program));
                }
                Session::flash('success', 'Application approved');
                Redirect::to('./');
            }
        }
    } catch (Exception $e) {
        echo $e->getMessage();
    }
} else {
    $controller = $a->incoming(Input::get('id'))[0];
    if ($controller) {
        ?>

	<div class="row">