public static function deleteConnection() { // gives deleteConntection in Using.model content id and user id and deletes it from database. require_once 'Using.model.php'; $usingMdl = new UsingModel(); $usingMdl->deleteConnection($_POST['deleteConnectionID'], $_SESSION['userID']); header('Location: /Fantastic-Teaching/?/User/profile'); }
public static function profile() { require_once 'Goals.model.php'; require_once 'Using.model.php'; $goalsMdl = new GoalsModel(); $usingMdl = new UsingModel(); if ($_SESSION['userLevel'] == "Premium") { $data = array('templates' => array('header.html', 'menu.html', 'admin.html', 'goals.html', 'viewArticleUses.html', 'footer.html'), 'goals' => $goalsMdl->viewGoals($_SESSION['userID']), 'viewArticleUses' => $usingMdl->viewArticleUses($_SESSION['userID']), 'userID' => $_SESSION['userID'], 'user' => $_SESSION['username'], 'userLevel' => $_SESSION['userLevel']); } elseif ($_SESSION['userLevel'] == "Free") { $data = array('templates' => array('header.html', 'menu.html', 'admin.html', 'footer.html'), 'userID' => $_SESSION['userID'], 'user' => $_SESSION['username'], 'userLevel' => $_SESSION['userLevel']); } return $data; }