public function institutionaddAction() { require_once 'models/table/Tutoredit.php'; if (isset($_POST['submit'])) { $institute = new Institution(); $newid = $institute->Addinstitution($_POST); $helper = new Helper(); $helper->addUserInstitutionRights($helper->myid, $newid); # $instituteid = ($_POST[edittable])?$_POST['editid']:$institute->Addinstitution($_POST); $this->_redirect(Settings::$COUNTRY_BASE_URL . "/institution/institutionedit/id/" . $newid); # echo ("<script language=\"JavaScript\">location.replace('institutionedit/id/" . $instituteid . "');</script>\n"); # exit; } # CREATING HELPER $helper = new Helper(); # GETTING CADRES $listcadre = $helper->getCadres(); $this->view->assign('getcadre', $listcadre); # GETTING INSTITUTION TYPES $types = $helper->getInstitutionTypes(); $this->view->assign('institutiontypes', $types); $this->viewAssignEscaped('locations', Location::getAll()); $this->view->assign('action', ''); $sponsors = $helper->getSponsors(); $this->view->assign('lookupsponsors', $sponsors); # GETTING LOOKUPS $this->view->assign('lookupdegrees', $helper->getDegrees()); }