function _showAllMat() { $materie = new Materii(getdbh()); $result['materii'] = $materie->fetchMaterii(); $data['msg'][] = View::do_fetch(VIEW_PATH . 'showAllMat.tpl.php', $result); View::do_dump(VIEW_PATH . 'layout.php', $data); }
function _about($mode = "version") { $form = View::do_fetch(VIEW_PATH . 'student/' . $mode . '.php'); //$data['body'][]='<h2>Add New Topic</h2>'; $data['body'][] = $form; View::do_dump(VIEW_PATH . 'layouts/student.php', $data); }
function _index() { loginRequireMgmt(); $data['pagename'] = 'Welcome'; $data['body'][] = View::do_fetch(VIEW_PATH . 'mgmt_main/index.php'); View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data); }
function edit() { $idval = $this->input->get['id']; $data['pagename'] = ''; $this->editproduct = new productModel(); $res = $this->editproduct->retrieve($idval); $data['pro_row'] = $res; $this->maincategory = new maincategoryModel(); $res1 = $this->maincategory->select(); $data['maincat_row'] = $res1; $this->category = new categoryModel(); $res2 = $this->category->select(); $data['cat_row'] = $res2; $this->subcategory = new subcategoryModel(); $res3 = $this->subcategory->select(); $data['subcat_row'] = $res3; $this->producttypefound = new producttypeModel(); $resproducttype = $this->producttypefound->select(); $data['row_type'] = $resproducttype; $this->featurefound = new featureModel(); $resfeaturefound = $this->featurefound->select(); $data['row_feature'] = $resfeaturefound; $data['body'][] = View::do_fetch(VIEW_PATH . 'admin/product/editproduct.php', $data); $data['foot'][] = 'footer of K-MVC'; View::do_dump(VIEW_PATH . 'layouts/homelayout.php', $data); }
function _edit_score($OID = 0, $CID = 0) { loginRequireMgmt(); if (!loginCheckPermission(USER::MGMT_TEAM)) { redirect("errors/401"); } $item = "Team"; $urlPrefix = "mgmt_team"; $object = new Team(); $object->retrieve($OID, $CID); if (!$object->exists()) { $data['body'][] = "<p>{$item} Not Found!</p>"; } else { $fdata['form_heading'] = "Edit {$item} Score"; $fdata['object'] = $object; $fdata['actionUrl'] = myUrl("{$urlPrefix}/ops_update_score"); $fdata['actionLabel'] = "Submit"; $fdata['cancelUrl'] = myUrl("{$urlPrefix}/manage"); $fdata['cancelLabel'] = "Cancel"; $form = View::do_fetch(VIEW_PATH . "{$urlPrefix}/score_form.php", $fdata); $data['head'][] = View::do_fetch(VIEW_PATH . "{$urlPrefix}/score_form_js.php"); $data['body'][] = "<h2>Edit {$item} Score</h2>"; $data['body'][] = $form; } View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data); }
function _show($OID = 0, $CID = 0) { loginRequireMgmt(); if (!loginCheckPermission(USER::MGMT_HMB_DATA)) { redirect("errors/401"); } $item = "HMB Data"; $urlPrefix = "mgmt_hmb_data"; $object = new HMBData(); $object->retrieve($OID, $CID); if (!$object->exists()) { $data['body'][] = "<p>{$item} Not Found!</p>"; } else { $fdata['form_heading'] = "Test {$item} -- Todo remove this"; $fdata['object'] = $object; $fdata['actionUrl'] = myUrl("{$urlPrefix}/ops_update"); $fdata['actionLabel'] = "Submit"; $fdata['cancelUrl'] = myUrl("{$urlPrefix}/manage"); $fdata['cancelLabel'] = "Back"; $form = View::do_fetch(VIEW_PATH . "{$urlPrefix}/show.php", $fdata); //$data['head'][]=View::do_fetch(VIEW_PATH."$urlPrefix/form_js.php"); $data['body'][] = "<h2>Show {$item}</h2>"; $data['body'][] = $form; } View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data); }
function _show_materii() { $materii = new Materii(getdbh()); $allMaterii = $materii->fetchGroupaAndMateria(); $result['materii'] = $allMaterii; $data['msg'][] = View::do_fetch(VIEW_PATH . 'afisare_materii.tpl.php', $result); View::do_dump(VIEW_PATH . 'layout.php', $data); }
function _login($username = '') { $data['pagename'] = 'Please Login'; $data['body'][] = '<h2>Please Login to Proceed</h2><br />'; $data['body'][] = View::do_fetch(VIEW_PATH . 'mgmt_main/login_form.php', array('username' => $username)); $data['body'][] = '<p>You can login with username="******" and password="******".<br />If that doesnt work try resetting the user database first.</p>'; View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data); }
function _addMaterii() { isUserLoggedIn(); $user = new User(getdbh()); $result['profesori'] = $user->fetchByType('profesor'); $data['msg'][] = View::do_fetch(VIEW_PATH . 'addMaterii.tpl.php', $result); View::do_dump(VIEW_PATH . 'layout.php', $data); }
function _resetdb() { $fdata['actionUrl'] = myUrl('ops/resetdb'); $fdata['cancelUrl'] = myUrl('mgmt_main/index'); $data['pagename'] = 'Reset Database'; $data['body'][] = '<h2>Warning Submitting this form will reset the Database</h2><br/>'; $data['body'][] = View::do_fetch(VIEW_PATH . 'mgmt_main/resetdb_form.php', $fdata); View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data); }
function _show_grup() { isUserLoggedIn(); $grupa = new Grupa(getdbh()); $allGroups = $grupa->fetchAll(); $result['grupa'] = $allGroups; $data['msg'][] = View::do_fetch(VIEW_PATH . 'afisare_grupa.tpl.php', $result); View::do_dump(VIEW_PATH . 'layout.php', $data); }
function _show_users() { isUserLoggedIn(); $user = new User(getdbh()); $user_details = $user->fetchAll(); $result['user'] = $user_details; $data['msg'][] = View::do_fetch(VIEW_PATH . 'afisare_user.tpl.php', $result); View::do_dump(VIEW_PATH . 'layout.php', $data); }
function _about($mode = "version") { //loginRequireMgmt(); //if (!loginCheckPermission(USER::MGMT_TOPIC)) redirect("errors/401"); $form = View::do_fetch(VIEW_PATH . 'mgmt_main/' . $mode . '.php'); //$data['body'][]='<h2>Add New Topic</h2>'; $data['body'][] = $form; View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data); }
function user() { $data['pagename'] = ''; $this->studentlist = new adminloginModel(); //$data['body'][]=View::do_fetch(VIEW_PATH.'admin/main/homeheader.php',$data); $data['body'][] = View::do_fetch(VIEW_PATH . 'users/brandz/index.php', $data); $data['foot'][] = 'footer of K-MVC'; View::do_dump(VIEW_PATH . 'layouts/layout.php', $data); }
function _loaddb() { $fdata['actionUrl'] = myUrl('mgmt_cpa_data/ops_loaddb'); $fdata['cancelUrl'] = myUrl('mgmt_cpa_data/index'); $data['pagename'] = 'Load Database'; $data['body'][] = '<h2>Warning Submitting this form will replace all existing CPS data in the Database</h2><br/>'; $data['body'][] = View::do_fetch(VIEW_PATH . 'mgmt_cpa_data/loaddb.php', $fdata); View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data); }
function _clear_scores() { $fdata['actionUrl'] = myUrl('ops/clear_scores'); $fdata['cancelUrl'] = myUrl('mgmt_main/index'); $data['pagename'] = 'Clear Scores'; $data['body'][] = '<h2>Warning Submitting this form will clear all scoring data the Database</h2><br/>'; $data['body'][] = View::do_fetch(VIEW_PATH . 'mgmt_main/clear_scores_form.php', $fdata); View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data); }
function tinindex() { $data['pagename'] = ''; $this->tin = new tinModel(); $res = $this->tin->select(); $data['tin'] = $res; $data['body'][] = View::do_fetch(VIEW_PATH . 'tax/tin.php', $data); $data['foot'][] = 'footer of K-MVC'; View::do_dump(VIEW_PATH . 'layouts/homelayout.php', $data); }
function _addTemaView() { isUserLoggedIn(); if (getUserType() == 'profesor') { $grupa = new Grupa(getdbh()); $result['grupa'] = $grupa->fetchAll(); $data['msg'][] = View::do_fetch(VIEW_PATH . 'addTema.tpl.php', $result); View::do_dump(VIEW_PATH . 'layout.php', $data); } }
function _showGrupaDetails($id = 0, $numeGrupa = '') { isUserLoggedIn(); $grupa = new Grupa(getdbh()); $result['users'] = $grupa->fetchGrupaUsers($id); $result['nume'] = $numeGrupa; $result['id'] = $id; $data['msg'][] = View::do_fetch(VIEW_PATH . 'showGrupaDetails.tpl.php', $result); View::do_dump(VIEW_PATH . 'layout.php', $data); }
function render() { $output = View::do_fetch(getPath('views/main/sitemap.php'), $this->data); // write the sitemap writeFile(APP . 'public/sitemap.xml', $output, 'w'); // write the compressed sitemap writeFile(APP . 'public/sitemap.xml.gz', $output, 'w9'); // view the Sitemap XML //header('Location: ./sitemap.xml'); }
function _addGrupaUsers($id = 0) { isUserLoggedIn(); $user = new User(getdbh()); $getUsers = $user->fetchAll(); $result['user'] = $getUsers; $result['grupaID'] = $id; $data['msg'][] = View::do_fetch(VIEW_PATH . 'addUserGrupa.tpl.php', $result); View::do_dump(VIEW_PATH . 'layout.php', $data); }
function edit() { $idval = $this->input->get['id']; $data['pagename'] = ''; $this->editmaincategory = new maincategoryModel(); $res = $this->editmaincategory->retrieve($idval); $data['row'] = $res; $data['body'][] = View::do_fetch(VIEW_PATH . 'maincategory/editmaincategory.php', $data); $data['foot'][] = 'footer of K-MVC'; View::do_dump(VIEW_PATH . 'layouts/homelayout.php', $data); }
function edit() { $idval = $this->input->get['id']; $data['pagename'] = ''; $this->pincodefound = new pincodeModel(); $res = $this->pincodefound->retrieve($idval); $data['row'] = $res; $data['body'][] = View::do_fetch(VIEW_PATH . 'pincode/editpincode.php', $data); $data['foot'][] = 'footer of K-MVC'; View::do_dump(VIEW_PATH . 'layouts/homelayout.php', $data); }
function edit() { $idval = $this->input->get['id']; $data['pagename'] = ''; $this->editimage = new bannerimageModel(); $res = $this->editimage->retrieve($idval); $data['image_row'] = $res; $data['body'][] = View::do_fetch(VIEW_PATH . 'admin/bannerimage/editbannerimage.php', $data); $data['foot'][] = 'footer of K-MVC'; View::do_dump(VIEW_PATH . 'layouts/homelayout.php', $data); }
function edit() { $idval = $this->input->get['id']; $data['pagename'] = ''; $this->editcolor = new colorModel(); $res = $this->editcolor->retrieve($idval); $data['row'] = $res; $data['body'][] = View::do_fetch(VIEW_PATH . 'admin/color/editcolor.php', $data); $data['foot'][] = 'footer of K-MVC'; View::do_dump(VIEW_PATH . 'layouts/homelayout.php', $data); }
function edit() { $idval = $this->input->get['id']; $data['pagename'] = ''; $this->editspecialbox = new specialboxModel(); $res = $this->editspecialbox->retrieve($idval); $data['row'] = $res; $data['body'][] = View::do_fetch(VIEW_PATH . 'specialbox/editspecialbox.php', $data); $data['foot'][] = 'footer of K-MVC'; View::do_dump(VIEW_PATH . 'layouts/homelayout.php', $data); }
function _loaddb() { if (!loginCheckPermission(USER::MGMT_EXT_DATA)) { redirect("errors/401"); } $fdata['actionUrl'] = myUrl('mgmt_ext_data/ops_loaddb'); $fdata['cancelUrl'] = myUrl('mgmt_ext_data/index'); $data['pagename'] = 'Load Database'; $data['body'][] = '<h2>Warning Submitting this form will replace all existing EXT data in the Database</h2><br/>'; $data['body'][] = View::do_fetch(VIEW_PATH . 'mgmt_ext_data/loaddb.php', $fdata); View::do_dump(VIEW_PATH . 'layouts/mgmtlayout.php', $data); }
function _add() { require_login(); $user = new User(); $fdata['form_heading'] = 'Add User'; $fdata['user'] = $user; $form = View::do_fetch(VIEW_PATH . 'users/edit.php', $fdata); $data['head'][] = View::do_fetch(VIEW_PATH . 'users/edit_js.php'); $data['body'][] = '<h2>Add New User</h2>'; $data['body'][] = $form; View::do_dump(VIEW_PATH . 'layouts/mainlayout.php', $data); }
function _showNews() { isUserLoggedIn(); if (getUserType() == 'admin' || getUserType() == 'profesor') { $noutate = new Noutati(getdbh()); $result['noutate'] = $noutate->fetchAll(); $data['msg'][] = View::do_fetch(VIEW_PATH . 'noutatiProf.tpl.php', $result); View::do_dump(VIEW_PATH . 'layout.php', $data); } else { $noutate = new Noutati(getdbh()); $result['noutate'] = $noutate->fetchAll(); $data['msg'][] = View::do_fetch(VIEW_PATH . 'noutatiStudent.tpl.php', $result); View::do_dump(VIEW_PATH . 'layout.php', $data); } }
function getofferproduct() { $this->offerproductfound = new offerModel(); $res = $this->offerproductfound->select(); $data['offrow'] = $res; $this->productfound = new productModel(); $res = $this->productfound->select(); $data['row'] = $res; $this->brand = new brandModel(); $res3 = $this->brand->select(); $data['row3'] = $res3; $data['body'][] = View::do_fetch(VIEW_PATH . 'awne/offerproduct.php', $data); $data['foot'][] = 'footer of K-MVC'; View::do_dump(VIEW_PATH . 'layouts/blank.php', $data); }