function __construct($c) { if (isset($_SESSION["tradewithgeorgia_company_type"]) && $_SESSION["tradewithgeorgia_company_type"] != "manufacturer") { $redirect = new redirect(); $redirect->go(WEBSITE); die; } else { $this->template($c); } }
function __construct($c) { if (isset($_SESSION["expired_sessioned_time"]) && !empty($_SESSION["expired_sessioned_time"])) { $time = time(); $new_expire = $time + $c['session.expire.time']; if ($_SESSION["expired_sessioned_time"] < $time) { unset($_SESSION["expired_sessioned_time"]); session_destroy(); $redirect = new redirect(); $redirect->go(); } else { $_SESSION["expired_sessioned_time"] = $new_expire; } } }
public function user($c) { if (isset($_POST['username'], $_POST['password'], $_POST["captcha"]) && !empty($_POST["username"]) && !empty($_POST["password"]) && !empty($_POST["captcha"]) && $_POST["captcha"] == $_SESSION['encoded']) { $user = strip_tags($_POST['username']); $pass = md5($_POST['password']); $conn = $this->conn($c); // PDO connection try { $sql = "SELECT `id`,`namelname`,`user_type`,`logtime`,`log` FROM `studio404_users` WHERE `username`=:username AND `password`=:password AND `status`!=:status AND (`user_type`=:administrator OR `user_type`=:subadmin)"; $query = $conn->prepare($sql); $query->execute(array(":username" => $user, ":password" => $pass, ":administrator" => "administrator", ":subadmin" => "sub admin", ":status" => 1)); $u_row = $query->fetch(PDO::FETCH_ASSOC); } catch (Exception $e) { die("Check user error !"); } if ($u_row["user_type"]) { //user exists $_SESSION["user404_id"] = $u_row["id"]; $_SESSION["user404"] = $user; $_SESSION["expired_sessioned_time"] = time() + $c['session.expire.time']; $_SESSION["user_type"] = $u_row["user_type"]; $_SESSION["logtime"] = $u_row["logtime"]; $_SESSION["log"] = $u_row["log"] + 1; $_SESSION['C'] = $c; $sql_update = "UPDATE `studio404_users` SET `logtime`=:logtime, `log`=:log WHERE `username`=:username AND `password`=:password AND `status`!=:status "; $query_update = $conn->prepare($sql_update); $query_update->execute(array(":logtime" => time(), ":log" => $_SESSION["log"], ":username" => $user, ":password" => $pass, ":status" => 1)); // insert log $this->insert_log_info($c, $user, $u_row["namelname"]); $actual_link = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; $redirect = new redirect(); $redirect->go($actual_link); } else { $this->out = true; } } else { $this->out = true; } return $this->out; }
public function template($c, $page) { $conn = $this->conn($c); // connection $cache = new cache(); $text_general = $cache->index($c, "text_general"); $data["text_general"] = json_decode($text_general, true); /* contact_page_data */ $contact_page_data = $cache->index($c, "contact_page_data"); $data["contact_data"] = json_decode($contact_page_data, true); /* sector */ $sector = $cache->index($c, "sector"); $data["sector"] = json_decode($sector); /* languages */ $languages = $cache->index($c, "languages"); $data["languages"] = json_decode($languages); /* language variables */ $language_data = $cache->index($c, "language_data"); $language_data = json_decode($language_data); $model_template_makevars = new model_template_makevars(); $data["language_data"] = $model_template_makevars->vars($language_data); /* website menu header & footer */ $menu_array = $cache->index($c, "main_menu"); $menu_array = json_decode($menu_array); $model_template_main_menu = new model_template_main_menu(); $data["main_menu"] = $model_template_main_menu->nav($menu_array, "header"); $data["footer_menu"] = $model_template_main_menu->nav($menu_array, "footer"); /* components */ $components = $cache->index($c, "components"); $data["components"] = json_decode($components); $data["get_view"] = Input::method("GET", "view") ? Input::method("GET", "view") : ''; $data["get_type"] = Input::method("GET", "type") ? urlencode(Input::method("GET", "type")) : ''; $data["get_sector"] = Input::method("GET", "sector") ? Input::method("GET", "sector") : ''; $data["get_search"] = Input::method("GET", "search") ? Input::method("GET", "search") : ''; $data["get_pn"] = Input::method("GET", "pn") ? Input::method("GET", "pn") : 1; $data["get_token"] = Input::method("GET", "token") ? Input::method("GET", "token") : ''; $db_count = new db_count(); $data["count"] = $db_count->retrieve($c, 'studio404_module_item', ' `status`!=1 AND `visibility`=2 AND `module_idx`=5'); $limit = ' LIMIT ' . ($data["get_pn"] - 1) * 10 . ', 10'; $orderBy = ' ORDER BY `studio404_module_item`.`date` DESC'; $sector = $data["get_sector"] && is_numeric($data["get_sector"]) ? ' FIND_IN_SET(' . $data["get_sector"] . ',`studio404_module_item`.`sector_id`) AND ' : ''; $ctype = $data["get_type"] ? '`studio404_users`.`company_type`="' . $data["get_type"] . '" AND ' : ''; $type = $data["get_view"] ? '`studio404_module_item`.`type`="' . $data["get_view"] . '" AND ' : ''; $search = !empty($data["get_search"]) ? '`studio404_module_item`.`title` LIKE "%' . $data["get_search"] . '%" AND ' : ''; try { $sql = 'SELECT `studio404_module_item`.`id`, `studio404_module_item`.`idx`, `studio404_module_item`.`date`, `studio404_module_item`.`title`, `studio404_module_item`.`type`, `studio404_module_item`.`long_description`, `studio404_users`.`id` AS users_id, `studio404_users`.`namelname` AS users_name, `studio404_users`.`company_type` AS su_companytype, (SELECT `title` FROM `studio404_pages` WHERE `studio404_pages`.`idx`=`studio404_module_item`.`sector_id` AND `lang`=:lang) AS sector_name FROM `studio404_module_item`, `studio404_users` WHERE `studio404_module_item`.`module_idx`=5 AND ' . $sector . ' ' . $type . ' ' . $search . ' `studio404_module_item`.`visibility`=:two AND `studio404_module_item`.`status`!=:one AND `studio404_module_item`.`insert_admin`=`studio404_users`.`id` AND ' . $ctype . ' `studio404_users`.`status`!=:one ' . $orderBy . ' ' . $limit . ' '; // echo $sql; $prepare = $conn->prepare($sql); $prepare->execute(array(":lang" => LANG_ID, ":two" => 2, ":one" => 1)); $data["fetch"] = $prepare->fetchAll(PDO::FETCH_ASSOC); } catch (Exception $e) { $redirect = new redirect(); $redirect->go(WEBSITE); die; } @(include $c["website.directory"] . "/businessportal.php"); }
$LANG = $obj->url("segment", 1); $get_ip = new get_ip(); $ip = $get_ip->ip; if (empty($LANG)) { // just domain name $LANG = $c['main.language']; } else { if (!in_array($LANG, $c['languages.array']) && $LANG != "image" && $LANG != $c['admin.slug']) { $welcome_class = $c["welcome.page.slug"]; $main_language = $c['main.language']; $redirect = new redirect(); $redirect->go(WEBSITE . $main_language . "/" . $welcome_class); } else { if ($LANG == $c['admin.slug']) { $redirect = new redirect(); $redirect->go(WEBSITE . $c['main.language'] . "/" . $c['admin.slug']); } } } $get_lang_id = new get_lang_id(); $lang_id = $get_lang_id->id($c, $LANG); define('LANG', $LANG); define('LANG_ID', $lang_id); define('PRE_VIEW', $c["product.view.pre.slug"]); define('PRE_GALLERY', $c["gallery.view.pre.slug"]); define('WEB_DIR', $c["website.directory"]); define('TEMPLATE', WEBSITE . $c["website.directory"] . '/'); define('MAIN_DIR', WEBSITE . LANG . '/'); define('MAIN_PAGE', MAIN_DIR . "home"); define('ADMIN_SLUG', $c['admin.slug']); $controller = new controller($c);
public function requestx($c) { $data = ""; if (isset($_POST) && count($_POST) > 0 || isset($_GET['down']) || isset($_GET['up']) || isset($_GET['remove'])) { $files = glob(DIR . '_cache/*'); // get all file names foreach ($files as $file) { // iterate files if (is_file($file)) { @unlink($file); } // delete file } } if (isset($_POST["admin_login"])) { // if submited $model_check_user = new model_check_user(); $data["login_try"] = $model_check_user->user($c); } if (isset($_POST['admin_change_password'])) { // if password change $model_change_admin_password = new model_change_admin_password(); $data["outMessage"] = $model_change_admin_password->change($c); } if (isset($_POST['add_email'])) { $model_admin_emaillist = new model_admin_emaillist(); $model_admin_emaillist->add($c); $data["outMessage"] = $model_admin_emaillist->outMessage; } if (isset($_POST['edit_email'])) { $model_admin_emaillist = new model_admin_emaillist(); $model_admin_emaillist->edit($c); $data["outMessage"] = $model_admin_emaillist->outMessage; } if (isset($_GET['remove']) && isset($_GET['action']) && $_GET['action'] == "showemails") { $model_admin_emaillist = new model_admin_emaillist(); $model_admin_emaillist->removeMe($c); if ($model_admin_emaillist->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=showemails&id=' . $_GET['id']); } } if (isset($_POST['newsletter_send'])) { $model_admin_menageemails = new model_admin_menageemails(); $model_admin_menageemails->addSendEmail($c); $data["outMessage"] = $model_admin_menageemails->outMessage; } if (isset($_POST['admin_change_profile'])) { $model_admin_profile = new model_admin_profile(); $model_admin_profile->updateMe($c); $data["outMessage"] = $model_admin_profile->outMessage; } if (isset($_POST['add_admin'])) { $model_admin_adduser = new model_admin_adduser(); $data["outMessage"] = $model_admin_adduser->add($c); } if (isset($_POST['add_emailgroup'])) { $model_admin_menageemails = new model_admin_menageemails(); $model_admin_menageemails->add($c); $data["outMessage"] = $model_admin_menageemails->outMessage; } if (isset($_POST['edit_emailgroup'])) { $model_admin_menageemails = new model_admin_menageemails(); $model_admin_menageemails->edit($c); $data["outMessage"] = $model_admin_menageemails->outMessage; } if (isset($_POST['add_website_user'])) { $model_admin_adduser = new model_admin_adduser(); $data["outMessage"] = $model_admin_adduser->addwebsiteuser($c); } if (isset($_POST['edit_admin'])) { $model_admin_editprofile = new model_admin_editprofile(); $model_admin_editprofile->edit($c); $data["outMessage"] = $model_admin_editprofile->outMessage; } if (isset($_POST['newsletter_main'])) { $model_admin_newslettermain = new model_admin_newslettermain(); $model_admin_newslettermain->edit_main($c); $data["outMessage"] = $model_admin_newslettermain->outMessage; } if (isset($_POST['edit_website_user'])) { $model_admin_editprofile = new model_admin_editprofile(); $model_admin_editprofile->wedit($c); $data["outMessage"] = $model_admin_editprofile->outMessage; } if (isset($_GET['remove']) && isset($_GET['action']) && $_GET['action'] == "userList") { $model_admin_editprofile = new model_admin_editprofile(); $model_admin_editprofile->removeMe($c); if ($model_admin_editprofile->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=userList'); } } if (isset($_GET['remove']) && isset($_GET['action']) && $_GET['action'] == "managedemails") { $model_admin_menageemails = new model_admin_menageemails(); $model_admin_menageemails->removeMe($c); if ($model_admin_menageemails->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=managedemails'); } } if (isset($_GET['remove']) && isset($_GET['action']) && $_GET['action'] == "wuserList") { $model_admin_editprofile = new model_admin_editprofile(); $model_admin_editprofile->removeMe($c); if ($model_admin_editprofile->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=wuserList'); } } if (isset($_GET['remove']) && isset($_GET['action']) && $_GET['action'] == "catalogModule" && isset($_GET['rcidx'])) { $model_admin_editcatalogsitem = new model_admin_editcatalogsitem(); $model_admin_editcatalogsitem->removeMe($c); if ($model_admin_editcatalogsitem->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=catalogModule&type=catalogpage&id=' . $_GET['id'] . '&super=' . $_GET['super'] . '&token=' . $_SESSION['token']); } } if (isset($_GET['remove']) && isset($_GET['action']) && $_GET['action'] == "log") { $model_admin_logs = new model_admin_logs(); $model_admin_logs->removeMe($c); if ($model_admin_logs->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=log'); } } if (isset($_POST['add_admin_userrights'])) { $model_admin_userrights = new model_admin_userrights(); $model_admin_userrights->update_admin_right($c); $data["outMessage"] = $model_admin_userrights->outMessage; } if (isset($_POST['edit_admin_userrights'])) { $model_admin_userrights = new model_admin_userrights(); $model_admin_userrights->edit($c); $data["outMessage"] = $model_admin_userrights->outMessage; } if (isset($_GET['remove']) && isset($_GET['action']) && $_GET['action'] == "userRights") { $model_admin_userrights = new model_admin_userrights(); $model_admin_userrights->removeMe($c); if ($model_admin_userrights->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=userRights'); } } if (isset($_POST['convert_text'])) { $input = (string) $_POST['input']; if (isset($_POST['convertMethod']) && !empty($_POST['convertMethod']) && $_POST['convertMethod'] == "englishToGeorgian") { $converter = new converter(); $data['output'] = $converter->englishToGeorgian($input); } else { if (isset($_POST['convertMethod']) && !empty($_POST['convertMethod']) && $_POST['convertMethod'] == "removeTags") { $converter = new converter(); $data['output'] = $converter->removeTags($input); } else { if (isset($_POST['convertMethod']) && !empty($_POST['convertMethod']) && $_POST['convertMethod'] == "removeSpace") { $converter = new converter(); $data['output'] = $converter->compress($input); } } } } if (isset($_POST['page_managment'])) { $model_admin_editMenuManagment = new model_admin_editMenuManagment(); $model_admin_editMenuManagment->edit($c); $data["outMessage"] = $model_admin_editMenuManagment->outMessage; } if (isset($_POST['add_pageManager'])) { $model_admin_menumanagment = new model_admin_menumanagment(); $data["outMessage"] = $model_admin_menumanagment->add($c); } if (isset($_GET['remove']) && isset($_GET['action']) && $_GET['action'] == "menuManagment") { $model_admin_editMenuManagment = new model_admin_editMenuManagment(); $model_admin_editMenuManagment->removeMe($c); if ($model_admin_editMenuManagment->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=menuManagment'); } } if (isset($_GET['remove']) && isset($_GET['action']) && $_GET['action'] == "newsModule") { $model_admin_editnewsitem = new model_admin_editnewsitem(); $model_admin_editnewsitem->removeMe($c); if ($model_admin_editnewsitem->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=newsModule&type=newspage&id=' . $_GET['id'] . '&super=' . $_GET['super'] . '&token=' . $_SESSION['token']); } } if (isset($_POST['add_page'])) { $model_admin_addpage = new model_admin_addpage(); $data["outMessage"] = $model_admin_addpage->add($c); } if (isset($_POST['add_news'])) { $model_admin_addnews = new model_admin_addnews(); $data["outMessage"] = $model_admin_addnews->add($c); } if (isset($_POST['add_catalog'])) { $model_admin_addcatalog = new model_admin_addcatalog(); $data["outMessage"] = $model_admin_addcatalog->add($c); } if (isset($_GET['visibilitychnage'], $_GET['action'], $_GET['type'], $_GET['id'], $_GET['token']) && $_GET['visibilitychnage'] == "true" && is_numeric($_GET['id']) && $_GET['token'] === $_SESSION['token']) { if (isset($_GET['newsidx']) || isset($_GET['catalogidx'])) { $action = isset($_GET['newsidx']) ? "newsModule" : "catalogModule"; $pagetype = $_GET['type']; $_SESSION['token'] = md5(sha1(time())); $model_admin_changeVisibility = new model_admin_changeVisibility(); $model_admin_changeVisibility->change_news($c); if ($model_admin_changeVisibility->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=' . $action . '&type=' . $pagetype . '&id=' . $_GET['id'] . '&super=' . $_GET['super'] . '&token=' . $_SESSION['token']); } } else { if (isset($_GET["mediaidx"])) { $action = "gallery"; $pagetype = $_GET['type']; $_SESSION['token'] = md5(sha1(time())); $model_admin_changeVisibility = new model_admin_changeVisibility(); $model_admin_changeVisibility->change_media($c); if ($model_admin_changeVisibility->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=' . $action . '&type=' . $pagetype . '&id=' . $_GET['id'] . '&super=' . $_GET['super'] . '&token=' . $_SESSION['token']); } } } } else { if (isset($_GET['visibilitychnage'], $_GET['super'], $_GET['token']) && $_GET['visibilitychnage'] == "true" && is_numeric($_GET['super'])) { $model_admin_changeVisibility = new model_admin_changeVisibility(); $model_admin_changeVisibility->change($c); if ($model_admin_changeVisibility->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=sitemap&super=' . $_GET['super']); } } } if (isset($_GET['visibilitychnage'], $_GET["wuserid"]) && $_GET['visibilitychnage'] == "true" && $_GET['token'] === $_SESSION['token']) { $_SESSION['token'] = md5(sha1(time())); $model_admin_changeVisibility = new model_admin_changeVisibility(); $model_admin_changeVisibility->changeUserAllowed($c); if ($model_admin_changeVisibility->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=wuserList'); } } if (isset($_GET['remove']) && isset($_GET['action']) && $_GET['action'] == "sitemap") { $model_admin_editMenuManagment = new model_admin_editMenuManagment(); $model_admin_editMenuManagment->removeMe($c); if ($model_admin_editMenuManagment->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=sitemap&super=' . $_GET['super']); } } if (isset($_POST['edit_page'])) { $model_admin_editMenuManagment = new model_admin_editMenuManagment(); $model_admin_editMenuManagment->editPage($c); $data["outMessage"] = $model_admin_editMenuManagment->outMessage; } if (isset($_GET['up']) || isset($_GET['down']) && $_GET['token'] === $_SESSION['token']) { $model_admin_changeposition = new model_admin_changeposition(); if ($_GET['action'] != "catalogModule" && $_GET['action'] != "componentModule" && $_GET['action'] != "gallery") { $model_admin_changeposition->act($c); $_SESSION['token'] = md5(sha1(time())); } else { if ($_GET['action'] == "componentModule") { $model_admin_changeposition->act_component($c); $_SESSION['token'] = md5(sha1(time())); } else { if ($_GET['action'] == "gallery") { $model_admin_changeposition->act_gallery($c); $_SESSION['token'] = md5(sha1(time())); } else { $model_admin_changeposition->act_catalog($c); $_SESSION['token'] = md5(sha1(time())); } } } $data["outMessage"] = $model_admin_changeposition->outMessage; } if (isset($_POST['edit_news_item'])) { $model_admin_editnewsitem = new model_admin_editnewsitem(); $model_admin_editnewsitem->edit($c); $data["outMessage"] = $model_admin_editnewsitem->outMessage; } if (isset($_POST['edit_catalog_item'])) { $model_admin_editcatalogsitem = new model_admin_editcatalogsitem(); $model_admin_editcatalogsitem->edit($c); $data["outMessage"] = $model_admin_editcatalogsitem->outMessage; } if (isset($_POST['edit_media_item'])) { $model_admin_editmediaitem = new model_admin_editmediaitem(); $model_admin_editmediaitem->edit($c); $data["outMessage"] = $model_admin_editmediaitem->outMessage; } if (isset($_POST['edit_vectormap'])) { $model_admin_vectormap = new model_admin_vectormap(); $model_admin_vectormap->edit($c); $data["outMessage"] = $model_admin_vectormap->outMessage; } if (isset($_POST['add_catalog_more_info'])) { $model_admin_addcatalogmoreinfo = new model_admin_addcatalogmoreinfo(); $model_admin_addcatalogmoreinfo->add($c); $data['outMessage'] = $model_admin_addcatalogmoreinfo->outMessage; } if (isset($_GET['remove'], $_GET['action'], $_GET['cridxremove']) && $_GET['action'] == "catalogMoreInfo") { $model_admin_addcatalogmoreinfo = new model_admin_addcatalogmoreinfo(); $model_admin_addcatalogmoreinfo->removeMe($c); if ($model_admin_addcatalogmoreinfo->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=catalogMoreInfo'); } } if (isset($_POST['edit_catalog_more_info'], $_GET['id']) && is_numeric($_GET['id'])) { $model_admin_catalogmoreinfo = new model_admin_catalogmoreinfo(); $model_admin_catalogmoreinfo->updateMe($c); $data["outMessage"] = $model_admin_catalogmoreinfo->outMessage; } if (isset($_POST['add_components'])) { $model_admin_components = new model_admin_components(); $model_admin_components->add($c); $data['outMessage'] = $model_admin_components->outMessage; } if (isset($_GET['remove'], $_GET['action'], $_GET['comid']) && $_GET['action'] == "components") { $model_admin_components = new model_admin_components(); $model_admin_components->removeMe($c); if ($model_admin_components->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=components'); } } if (isset($_POST['edit_components'])) { $model_admin_components = new model_admin_components(); $model_admin_components->edit($c); $data['outMessage'] = $model_admin_components->outMessage; } if (isset($_POST['add_componentmodel'])) { $model_admin_componentsmodele = new model_admin_componentsmodele(); $model_admin_componentsmodele->add($c); $data['outMessage'] = $model_admin_componentsmodele->outMessage; } if (isset($_POST['edit_componentmodel'])) { $model_admin_componentsmodele = new model_admin_componentsmodele(); $model_admin_componentsmodele->edit($c); $data['outMessage'] = $model_admin_componentsmodele->outMessage; } if (isset($_GET['remove'], $_GET['action'], $_GET['commodelid']) && $_GET['action'] == "componentModule") { $model_admin_componentsmodele = new model_admin_componentsmodele(); $model_admin_componentsmodele->removeMe($c); if ($model_admin_componentsmodele->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=componentModule&id=' . $_GET['id'] . '&token=' . $_SESSION["token"]); } } if (isset($_POST['add_language'], $_GET['action']) && $_GET['action'] == "addlanguage") { $model_admin_languages = new model_admin_languages(); $model_admin_languages->add($c); $data['outMessage'] = $model_admin_languages->outMessage; } if (isset($_POST['edit_language'], $_GET['action'], $_GET["id"]) && $_GET['action'] == "editLanguage") { $model_admin_languages = new model_admin_languages(); $model_admin_languages->edit($c); $data['outMessage'] = $model_admin_languages->outMessage; } if (isset($_GET['remove'], $_GET['action'], $_GET['langid']) && $_GET['action'] == "languages") { $model_admin_languages = new model_admin_languages(); $model_admin_languages->removeMe($c); if ($model_admin_languages->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=languages'); } } if (isset($_POST['add_language_data'], $_GET['action']) && $_GET['action'] == "addlanguageData") { $model_admin_languageData = new model_admin_languageData(); $model_admin_languageData->add($c); $data['outMessage'] = $model_admin_languageData->outMessage; } if (isset($_POST['add_invoce'], $_GET['action']) && $_GET['action'] == "addInvoice") { $model_admin_invoices = new model_admin_invoices(); $model_admin_invoices->add($c); $data['outMessage'] = $model_admin_invoices->outMessage; } if (isset($_POST['edit_language_data'], $_GET['action']) && $_GET['action'] == "editLanguageData") { $model_admin_languageData = new model_admin_languageData(); $model_admin_languageData->edit($c); $data['outMessage'] = $model_admin_languageData->outMessage; } if (isset($_GET['remove'], $_GET['action'], $_GET['langdataid']) && $_GET['action'] == "languageData") { $model_admin_languageData = new model_admin_languageData(); $model_admin_languageData->removeMe($c); if ($model_admin_languageData->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=languageData'); } } if (isset($_POST["edit_invoce"], $_GET["action"]) && $_GET["action"] == "editInvoice") { $model_admin_invoices = new model_admin_invoices(); $model_admin_invoices->edit($c); $data['outMessage'] = $model_admin_invoices->outMessage; } if (isset($_GET['remove'], $_GET['action'], $_GET['rinvoice']) && $_GET['action'] == "invoices") { $model_admin_invoices = new model_admin_invoices(); $model_admin_invoices->removeMe($c); if ($model_admin_invoices->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=invoices'); } } if (isset($_GET['remove'], $_GET['action'], $_GET['rmidx']) && $_GET['action'] == "gallery") { $model_admin_gallery = new model_admin_gallery(); $model_admin_gallery->removeMe($c); if ($model_admin_gallery->outMessage == 1) { $redirect = new redirect(); $redirect->go('?action=gallery&type=' . $_GET['type'] . '&id=' . $_GET['id'] . '&super=' . $_GET['super'] . '&token=' . $_SESSION["token"]); } } if (isset($_POST['add_chart'])) { $model_admin_charts = new model_admin_charts(); $data["outMessage"] = $model_admin_charts->add($c); } if (isset($_POST['add_gallery'])) { $model_admin_addgallery = new model_admin_addgallery(); $data["outMessage"] = $model_admin_addgallery->add($c); } if (isset($_POST['edit_comments'])) { $model_admin_comments = new model_admin_comments(); $data["outMessage"] = $model_admin_comments->edit($c); } if (isset($_POST['add_comments'])) { $model_admin_comments = new model_admin_comments(); $data["outMessage"] = $model_admin_comments->add($c); } if (isset($_POST['edit_user_statements'])) { $model_admin_fusersstat = new model_admin_fusersstat(); $data["outMessage"] = $model_admin_fusersstat->edit($c); } if (isset($_GET['removeComment']) && is_numeric($_GET['removeComment'])) { $model_admin_comments = new model_admin_comments(); if ($model_admin_comments->removeMe($c)) { $redirect = new redirect(); $redirect->go('?action=comments&type=' . $_GET['type'] . '&id=' . $_GET['id'] . '&cidx=' . $_GET['cidx'] . '&super=' . $_GET['super'] . '&token=' . $_SESSION['token']); } } if (isset($_POST['execute_create_csv'])) { $module_admin_create_csv = new module_admin_create_csv(); if (!isset($_GET['usertype'])) { $data["outMessage"] = $module_admin_create_csv->create($c); } else { if (isset($_GET['usertype'])) { $data["outMessage"] = $module_admin_create_csv->create_user_template($c); } } } return $data; }
public function view($obj, $c) { // post and get request handler $model_admin_requests = new model_admin_requests(); $data = $model_admin_requests->requestx($c); // select page managed menu $model_admin_selectManagedMenu = new model_admin_selectManagedMenu(); $data["managed_pages"] = $model_admin_selectManagedMenu->select($c); $data["managed_pages2"] = $model_admin_selectManagedMenu->select($c, true); // breadcrups module $model_admin_breadcrups = new model_admin_breadcrups(); $data["breadcrups"] = $model_admin_breadcrups->get($c); // get componemt menu $model_admin_components = new model_admin_components(); $data["components"] = $model_admin_components->select_components_menu($c); $action = filter_input(INPUT_GET, "action"); if (isset($_SESSION["user404"]) && !empty($_SESSION["user404"])) { if (isset($action) && $action == "mainMenu") { $data["website_title"] = "Welcome / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_mainmenu.php"); } else { if (isset($action) && $action == "addAdmin") { $data["website_title"] = "Add admin / Admin Panel - v: " . $c['cmsversion']; $model_admin_select_admintypes = new model_admin_select_admintypes(); $data["admin_types"] = $model_admin_select_admintypes->select($c); @(include "view/view_admin_addAdmin.php"); } else { if (isset($action) && $action == "userList") { $data["website_title"] = "Admin users / Admin Panel - v: " . $c['cmsversion']; $model_admin_select = new model_admin_select(); $admin_list = $model_admin_select->select_admins($c); $data['table'] = $admin_list['table']; $data['pager'] = $admin_list['pager']; @(include "view/view_admin_userlist.php"); } else { if (isset($action) && $action == "wuserList") { $data["website_title"] = "Website users / Admin Panel - v: " . $c['cmsversion']; $model_admin_select = new model_admin_select(); $admin_list = $model_admin_select->select_websiteusers($c); $data['table'] = $admin_list['table']; $data['pager'] = $admin_list['pager']; @(include "view/view_admin_wuserlist.php"); } else { if (isset($action) && $action == "waddUser") { $data["website_title"] = "Add website user / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addwebsiteuser.php"); } else { if (isset($action) && $action == "weditprofile") { $data["website_title"] = "Edit website user / Admin Panel - v: " . $c['cmsversion']; $model_admin_editprofile = new model_admin_editprofile(); $_SESSION["token"] = $_GET['token']; $data["profile"] = $model_admin_editprofile->select_profile2($c); @(include "view/view_admin_editwebsiteuser.php"); } else { if (isset($action) && $action == "editprofile") { $data["website_title"] = "Edit profile / Admin Panel - v: " . $c['cmsversion']; $model_admin_editprofile = new model_admin_editprofile(); $data["profile"] = $model_admin_editprofile->select_profile($c); $model_admin_select_admintypes = new model_admin_select_admintypes(); $data["admin_types"] = $model_admin_select_admintypes->select($c); @(include "view/view_admin_editprofile.php"); } else { if (isset($action) && $action == "changePassword") { $data["website_title"] = "Change Password / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_changePassword.php"); } else { if (isset($action) && $action == "profileSettings") { $model_admin_profile = new model_admin_profile(); $data["profile"] = $model_admin_profile->selectAdminProfile($c); $data["website_title"] = "Profile settings / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_profileSettings.php"); } else { if (isset($action) && $action == "signout") { unset($_SESSION["user404"]); $redirect = new redirect(); $redirect->go("?action=login"); } else { if (isset($action) && $action == "userRights") { $data["website_title"] = "User rights / Admin Panel - v: " . $c['cmsversion']; $model_admin_userrights = new model_admin_userrights(); $admin_rightgroups = $model_admin_userrights->select_admins_rightgroups($c); $data['table'] = $admin_rightgroups['table']; $data['pager'] = $admin_rightgroups['pager']; @(include "view/view_admin_userRights.php"); } else { if (isset($action) && $action == "addAdminRights") { $data["website_title"] = "Add admin user rights / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_rights.php"); } else { if (isset($action) && $action == "editAdminRights") { $data["website_title"] = "Edit admin user rights / Admin Panel - v: " . $c['cmsversion']; $model_admin_userrights = new model_admin_userrights(); $data["user_rights"] = $model_admin_userrights->select_userright($c); @(include "view/view_admin_editAdminRights.php"); } else { if ($_GET['action'] == "log") { $data["website_title"] = "Logs / Admin Panel - v: " . $c['cmsversion']; $model_admin_logs = new model_admin_logs(); $admin_logs = $model_admin_logs->select_admin_logs($c); $data['table'] = $admin_logs['table']; $data['pager'] = $admin_logs['pager']; @(include "view/view_admin_log.php"); } else { if ($_GET['action'] == "textConverter") { $data["website_title"] = "Text converter / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_textconverter.php"); } else { if ($_GET['action'] == "menuManagment") { $data["website_title"] = "Page managment/ Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_menumanagment = new model_admin_menumanagment(); $admin_list = $model_admin_menumanagment->select_menus($c); $data['table'] = $admin_list['table']; $data['pager'] = $admin_list['pager']; @(include "view/view_admin_pagemanagment.php"); } else { if (isset($action) && $action == "editMenuManagment") { $data["website_title"] = "Edit page managment / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_editMenuManagment = new model_admin_editMenuManagment(); $data["pagesManagment"] = $model_admin_editMenuManagment->select_editMenuManagment($c); @(include "view/view_admin_editMenuManagment.php"); } else { if (isset($action) && $action == "addPageManagment") { $data["website_title"] = "Add page managment / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addMenuManagment.php"); } else { if (isset($action) && $action == "sitemap") { $data["website_title"] = "Sitemap / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_menumanagment = new model_admin_menumanagment(); $admin_list = $model_admin_menumanagment->select_sub($c); $data['table'] = $admin_list['table']; $data['pager'] = $admin_list['pager']; @(include "view/view_admin_sitemap.php"); } else { if (isset($action) && $action == "addSitemapItem") { $data["website_title"] = "Add Sitemap Item / Admin Panel - v: " . $c['cmsversion']; // $model_admin_selectLanguage = new model_admin_selectLanguage(); // $data["language_select"] = $model_admin_selectLanguage->select_option($c); $check_super = new check_super(); $super_exists = $check_super->super($c); if (!$super_exists) { $data["outMessage"] = 2; } else { if (isset($_GET['super'], $_GET['sub'])) { $pre_slug = new pre_slug(); $pre_slug_method = $pre_slug->slug($c, $_GET['super'], $_GET['sub']); if (is_array($pre_slug_method)) { $reverse = array_reverse($pre_slug_method); $data['pre_slug'] = implode("/", $reverse); } } } @(include "view/view_admin_addSitemapItem.php"); } else { if (isset($action) && $action == "editSitemap") { $data["website_title"] = "Edit sitemap / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $edit_page_interface = new edit_page_interface(); $data["interface"] = $edit_page_interface->out_interface($c); @(include "view/view_admin_editSiteMap.php"); } else { if (isset($action) && $action == "newsModule") { $data["website_title"] = "News module / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_newsmodule = new model_admin_newsmodule(); $news_list = $model_admin_newsmodule->select_list($c); $data['table'] = $news_list['table']; $data['pager'] = $news_list['pager']; @(include "view/view_admin_news_module.php"); } else { if (isset($action) && $action == "addNews" && isset($_GET['newsidx'])) { $data["website_title"] = "Add news / Admin Panel - v: " . $c['cmsversion']; $news_slug = new news_slug(); $data["pre_slug"] = $news_slug->slug($c); @(include "view/view_admin_addnews.php"); } else { if (isset($action) && $action == "addCatalog" && isset($_GET['catalogidx'])) { $data["website_title"] = "Add catalog / Admin Panel - v: " . $c['cmsversion']; $news_slug = new news_slug(); $data["pre_slug"] = $news_slug->slug($c); @(include "view/view_admin_addcatalog.php"); } else { if (isset($action) && $action == "catalogModule") { $data["website_title"] = "Catalog module / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_catalogmodule = new model_admin_catalogmodule(); $news_list = $model_admin_catalogmodule->select_list($c); $data['table'] = $news_list['table']; $data['pager'] = $news_list['pager']; @(include "view/view_admin_catalog_module.php"); } else { if (isset($action) && $action == "editNewsItem") { $data["website_title"] = "Edit news item / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $edit_page_interface = new edit_page_interface(); $data["interface"] = $edit_page_interface->out_interface($c); @(include "view/view_admin_editNewsItem.php"); } else { if (isset($action) && $action == "editCatalogItem") { $data["website_title"] = "Edit catalog item / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $edit_page_interface = new edit_page_interface(); $data["interface"] = $edit_page_interface->out_interface($c); @(include "view/view_admin_editCatalogItem.php"); } else { if (isset($action) && $action == "catalogMoreInfo") { $data["website_title"] = "Catalog more info / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_catalogmoreinfo = new model_admin_catalogmoreinfo(); $news_list = $model_admin_catalogmoreinfo->select_list_all($c); $data['table'] = $news_list['table']; $data['pager'] = $news_list['pager']; @(include "view/view_admin_catalogmoreinfo.php"); } else { if (isset($action) && $action == "addCatalogMoreInfo") { $data["website_title"] = "Add catalog more info / Admin Panel - v: " . $c['cmsversion']; $model_admin_catalogmodule = new model_admin_catalogmodule(); $data["catalogs"] = $model_admin_catalogmodule->getcatalogs($c); @(include "view/view_admin_addcatalogmoreinfo.php"); } else { if (isset($action, $_GET['id']) && is_numeric($_GET['id']) && $action == "editCatalogMoreInfo") { $data["website_title"] = "Edit catalog more info / Admin Panel - v: " . $c['cmsversion']; $model_admin_catalogmoreinfo = new model_admin_catalogmoreinfo(); $data['info'] = $model_admin_catalogmoreinfo->select_one($c, $_GET['id']); $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_catalogmodule = new model_admin_catalogmodule(); $data["catalogs"] = $model_admin_catalogmodule->getcatalogs($c); @(include "view/view_admin_editcatalogmoreinfo.php"); } else { if (isset($action) && $action == "components") { $data["website_title"] = "Components / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_components = new model_admin_components(); $components = $model_admin_components->select($c); $data['table'] = $components['table']; $data['pager'] = $components['pager']; @(include "view/view_admin_components.php"); } else { if (isset($action) && $action == "addComponents") { $data["website_title"] = "Add components / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addcomponents.php"); } else { if (isset($action) && $action == "editComponents") { $data["website_title"] = "Edit components / Admin Panel - v: " . $c['cmsversion']; $edit_page_interface = new edit_page_interface(); $data["interface"] = $edit_page_interface->general_form_components($c); @(include "view/view_admin_editcomponents.php"); } else { if (isset($action) && $action == "componentModule") { $data["website_title"] = "Component module / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_componentsmodele = new model_admin_componentsmodele(); $components = $model_admin_componentsmodele->select($c); $data['table'] = $components['table']; $data['pager'] = $components['pager']; @(include "view/view_admin_componentsmodel.php"); } else { if (isset($action) && $action == "addComponentsModule") { $data["website_title"] = "Add components module / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addcomponentsmodule.php"); } else { if (isset($action) && $action == "editComponentsModule") { $data["website_title"] = "Edit components module / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_componentsmodele = new model_admin_componentsmodele(); $data["select"] = $model_admin_componentsmodele->select_one($c); @(include "view/view_admin_editcomponentsmodule.php"); } else { if (isset($action) && $action == "languages") { $data["website_title"] = "Languages / Admin Panel - v: " . $c['cmsversion']; $model_admin_languages = new model_admin_languages(); $languages = $model_admin_languages->select($c); $data['table'] = $languages['table']; $data['pager'] = $languages['pager']; @(include "view/view_admin_languages.php"); } else { if (isset($action) && $action == "addlanguage") { $data["website_title"] = "Add language / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addlanguage.php"); } else { if (isset($action) && $action == "editLanguage") { $data["website_title"] = "Edit language / Admin Panel - v: " . $c['cmsversion']; $model_admin_languages = new model_admin_languages(); $data["info"] = $model_admin_languages->select_one($c); @(include "view/view_admin_editlanguage.php"); } else { if (isset($action) && $action == "languageData") { $data["website_title"] = "Language data / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_languageData = new model_admin_languageData(); $languages = $model_admin_languageData->select($c); $data['table'] = $languages['table']; $data['pager'] = $languages['pager']; @(include "view/view_admin_languageData.php"); } else { if (isset($action) && $action == "addlanguageData") { $data["website_title"] = "Add language data / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addlanguageData.php"); } else { if (isset($action) && $action == "editLanguageData") { $data["website_title"] = "Edit language data / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_languageData = new model_admin_languageData(); $data["info"] = $model_admin_languageData->select_one($c); @(include "view/view_admin_editlanguagedata.php"); } else { if (isset($action) && $action == "charts") { $data["website_title"] = "Charts / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_charts = new model_admin_charts(); $invoices = $model_admin_charts->select($c); $data['table'] = $invoices['table']; $data['pager'] = $invoices['pager']; @(include "view/view_admin_charts.php"); } else { if (isset($action) && $action == "addChart") { $data["website_title"] = "Add Chart / Admin Panel - v: " . $c['cmsversion']; // $model_admin_charts = new model_admin_charts(); // $invoices = $model_admin_charts->select($c); // $data['table'] = $invoices['table']; // $data['pager'] = $invoices['pager']; @(include "view/view_admin_charts_add.php"); //addChart } else { if (isset($action) && $action == "emailnewsletter") { $data["website_title"] = "Email newsletter / Admin Panel - v: " . $c['cmsversion']; $model_admin_newslettermain = new model_admin_newslettermain(); $data["info"] = $model_admin_newslettermain->select_main($c); $data["email_limit"] = $c["max.send.email.per.day"]; @(include "view/view_admin_emailnewsletter.php"); } else { if (isset($action) && $action == "invoices") { $data["website_title"] = "Invoices / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_invoices = new model_admin_invoices(); $invoices = $model_admin_invoices->select($c); $data['table'] = $invoices['table']; $data['pager'] = $invoices['pager']; @(include "view/view_admin_invoices.php"); } else { if (isset($action) && $action == "addInvoice") { $data["website_title"] = "Add invoice / Admin Panel - v: " . $c['cmsversion']; $lang = new model_admin_languageData(); $data["webhosting"] = $lang->l("webhosting"); $data["creatingawebsite"] = $lang->l("creatingawebsite"); $data["gadaxdilia"] = $lang->l("gadaxdilia"); $data["gadasaxdeli"] = $lang->l("gadasaxdeli"); $data["otherservice"] = $lang->l("otherservice"); $model_admin_select = new model_admin_select(); $data["fetch"] = $model_admin_select->select_admin_names_for_invoice($c); @(include "view/view_admin_addinvoice.php"); } else { if (isset($action) && $action == "editInvoice") { $data["website_title"] = "Edit invoice / Admin Panel - v: " . $c['cmsversion']; $lang = new model_admin_languageData(); $data["webhosting"] = $lang->l("webhosting"); $data["creatingawebsite"] = $lang->l("creatingawebsite"); $data["gadaxdilia"] = $lang->l("gadaxdilia"); $data["gadasaxdeli"] = $lang->l("gadasaxdeli"); $data["otherservice"] = $lang->l("otherservice"); $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_invoices = new model_admin_invoices(); $data["info"] = $model_admin_invoices->select_one($c); @(include "view/view_admin_editinvoice.php"); } else { if (isset($action) && $action == "gallery") { $data["website_title"] = "Gallery module / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_gallery = new model_admin_gallery(); $news_list = $model_admin_gallery->select($c); $data['table'] = $news_list['table']; $data['pager'] = $news_list['pager']; @(include "view/view_admin_gallery.php"); } else { if (isset($action) && $action == "addGallery" && isset($_GET['mediaidx'])) { $data["website_title"] = "Add gallery / Admin Panel - v: " . $c['cmsversion']; $news_slug = new news_slug(); $data["pre_slug"] = $news_slug->slug($c); @(include "view/view_admin_addgallery.php"); } else { if (isset($action) && $action == "editMediaItem") { $data["website_title"] = "Edit gallery item / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $edit_page_interface = new edit_page_interface(); $data["interface"] = $edit_page_interface->out_interface($c); @(include "view/view_admin_editMediaItem.php"); } else { if (isset($action) && $action == "vectormap") { $data["website_title"] = "Vector map / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_vectormap = new model_admin_vectormap(); $map = $model_admin_vectormap->select($c); $data['table'] = $map['table']; $data['pager'] = $map['pager']; @(include "view/view_admin_map.php"); } else { if (isset($action) && $action == "managedemails") { $data["website_title"] = "Manage emails / Admin Panel - v: " . $c['cmsversion']; $model_admin_menageemails = new model_admin_menageemails(); $groups = $model_admin_menageemails->select($c); $data['table'] = $groups['table']; $data['pager'] = $groups['pager']; @(include "view/view_admin_menageemails.php"); } else { if (isset($action) && $action == "editVectorMap") { $data["website_title"] = "Edit trade map / Admin Panel - v: " . $c['cmsversion']; $lang = new model_admin_languageData(); $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_vectormap = new model_admin_vectormap(); $data["select"] = $model_admin_vectormap->select_one($c); @(include "view/view_admin_editvectormap.php"); } else { if (isset($action) && $action == "addEmailGroup") { $data["website_title"] = "Add email groups / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addemailgroups.php"); } else { if (isset($action) && $action == "editEmailGroup") { $data["website_title"] = "Edit email groups / Admin Panel - v: " . $c['cmsversion']; $model_admin_menageemails = new model_admin_menageemails(); $data['info'] = $model_admin_menageemails->select_one($c); @(include "view/view_admin_editemailgroups.php"); } else { if (isset($action) && $action == "showemails") { $data["website_title"] = "Email list / Admin Panel - v: " . $c['cmsversion']; $model_admin_emaillist = new model_admin_emaillist(); $groups = $model_admin_emaillist->select($c); $data['table'] = $groups['table']; $data['pager'] = $groups['pager']; @(include "view/view_admin_menageemailLiss.php"); } else { if (isset($action) && $action == "addEmail") { $data["website_title"] = "Add email / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addemail.php"); } else { if (isset($action) && $action == "editEmail") { $data["website_title"] = "Edit email / Admin Panel - v: " . $c['cmsversion']; $model_admin_emaillist = new model_admin_emaillist(); $data['info'] = $model_admin_emaillist->select_one($c); @(include "view/view_admin_editemail.php"); } else { if (isset($action) && $action == "outbox") { $data["website_title"] = "Outbox / Admin Panel - v: " . $c['cmsversion']; $model_admin_emaillist = new model_admin_emaillist(); $outbox = $model_admin_emaillist->outbox($c); $data['table'] = $outbox['table']; $data['pager'] = $outbox['pager']; @(include "view/view_admin_outbox.php"); } else { if (isset($action) && $action == "comments") { $data["website_title"] = "Comments / Admin Panel - v: " . $c['cmsversion']; $model_admin_comments = new model_admin_comments(); $outbox = $model_admin_comments->get_comments($c); $data['table'] = $outbox['table']; $data['pager'] = $outbox['pager']; @(include "view/view_admin_comments.php"); } else { if (isset($action) && $action == "editComments") { $data["website_title"] = "Edit comments / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_comments = new model_admin_comments(); $data["data"] = $model_admin_comments->select_one($c); @(include "view/view_admin_editComments.php"); } else { if (isset($action) && $action == "addComments") { $data["website_title"] = "Add comments / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addComments.php"); } else { if (isset($action) && $action == "fusersstat") { $data["website_title"] = "Front users & statements / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_fusersstat = new model_admin_fusersstat(); if (isset($_GET['remove'], $_GET['rmid'], $_GET['load']) && $_GET['remove'] == "true" && is_numeric($_GET['rmid'])) { $true = false; if ($_GET['load'] == "users") { $true = $model_admin_fusersstat->removeMe($c, 'users'); $url = WEBSITE . LANG . '/' . ADMIN_SLUG . '?action=fusersstat&load=users'; } else { if ($_GET['load'] == "products") { $true = $model_admin_fusersstat->removeMe($c, 'products'); $url = WEBSITE . LANG . '/' . ADMIN_SLUG . '?action=fusersstat&load=products'; } else { if ($_GET['load'] == "services") { $true = $model_admin_fusersstat->removeMe($c, 'services'); $url = WEBSITE . LANG . '/' . ADMIN_SLUG . '?action=fusersstat&load=services'; } else { if ($_GET['load'] == "enquires") { $true = $model_admin_fusersstat->removeMe($c, 'enquires'); $url = WEBSITE . LANG . '/' . ADMIN_SLUG . '?action=fusersstat&load=enquires'; } } } } if ($true) { redirect::url($url); } } $db_counter = new db_counter(); $data["user_count"] = $db_counter->sq($c, '`id`', '`studio404_users`', '`user_type`="website" AND `status`!=1'); $data["product_count"] = $db_counter->sq($c, '`id`', '`studio404_module_item`', '`module_idx`=3 AND `status`!=1'); $data["service_count"] = $db_counter->sq($c, '`id`', '`studio404_module_item`', '`module_idx`=4 AND `status`!=1'); $data["enquire_count"] = $db_counter->sq($c, '`id`', '`studio404_module_item`', '`module_idx`=5 AND `status`!=1'); if (isset($_GET["load"]) && $_GET["load"] == "products") { $data["active"] = "products"; $outbox = $model_admin_fusersstat->get_products($c); } else { if (isset($_GET["load"]) && $_GET["load"] == "services") { $data["active"] = "services"; $outbox = $model_admin_fusersstat->get_services($c); } else { if (isset($_GET["load"]) && $_GET["load"] == "enquires") { $data["active"] = "enquires"; $outbox = $model_admin_fusersstat->get_enquires($c); } else { $data["active"] = "users"; $outbox = $model_admin_fusersstat->get_users($c); } } } $data['table'] = $outbox['table']; $data['pager'] = $outbox['pager']; @(include "view/view_admin_fusersstat.php"); } else { if (isset($action) && $action == "edituserstats") { $data["website_title"] = "Edit users statement / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_fusersstat = new model_admin_fusersstat(); $data["data"] = $model_admin_fusersstat->select_one($c); if ($data["data"]) { @(include "view/view_admin_edituserstats.php"); } else { redirect::url(WEBSITE . LANG . '/' . ADMIN_SLUG . '?action=welcome'); } } else { if (isset($action) && $action == "exelator") { $data["website_title"] = "Exelator / Admin Panel - v: " . $c['cmsversion']; $model_admin_showtables = new model_admin_showtables(); $data["table"] = $model_admin_showtables->showtables($c); $model_admin_sqlcommand = new model_admin_sqlcommand(); if (isset($_GET['load']) && $_GET['load'] == "template_trademap") { //echo "a"; $data["sqlcommand"] = $model_admin_sqlcommand->trademap($c); } else { if (isset($_GET['load'], $_GET['usertype']) && $_GET['load'] == "template_users" && !empty($_GET['usertype'])) { $data["sqlcommand"] = $model_admin_sqlcommand->template($c, "users", $_GET['usertype']); } else { $data["sqlcommand"] = $model_admin_sqlcommand->load($c); } } @(include "view/view_admin_exelator.php"); //redirect::url(WEBSITE.LANG.'/'.ADMIN_SLUG.'?action=welcome'); } else { if (isset($action) && $action == "filemanager") { $data["website_title"] = "File manager / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_filemanager.php"); } else { $data["website_title"] = "Welcome / Admin Panel - v: " . $c['cmsversion']; $data["c"] = $c; $userData = new userData(); $data["userIp"] = $userData->getUserIP(); @(include "view/view_admin_home.php"); } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } else { $data["website_title"] = "Login / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_login.php"); } }
$welcome_class = $c["welcome.page.slug"]; $main_language = $c['main.language']; $redirect = new redirect(); $redirect->go(WEBSITE . $main_language . "/" . $welcome_class); } else { if ($LANG == $c['admin.slug']) { redirect::url(WEBSITE . $c['main.language'] . "/" . $c['admin.slug']); } } } $get_ip = new get_ip(); $ip = $get_ip->ip; if (empty($LANG)) { // just domain name $redirect = new redirect(); $redirect->go(WEBSITE . $c['main.language'] . "/" . $c["welcome.page.slug"]); } /* insert log */ // $file_manipulate = new file_manipulate(); // $file_manipulate->insertLog("[".$ip."][".date("d-m-Y G:m:s")."] - ".WEBSITE_.$actual_link); /* token */ $_SESSION["token_generator"] = ustring::random(10); /* ** some more define */ $get_lang_id = new get_lang_id(); $lang_id = $get_lang_id->id($c, $LANG); define('LANG', $LANG); define('LANG_ID', $lang_id);
$obj = new url_controll(); // url controlls /* ** important variables if more language edit this line */ $LANG = $obj->url("segment", 1); $get_ip = new get_ip(); $ip = $get_ip->ip; if (empty($LANG)) { // just domain name $country = new country(); $country_detect = $country->get($ip); $welcome_class = $country_detect == "GE" ? $c["welcome.page.slug"] : 'welcome'; $main_language = $country_detect == "GE" ? $c['main.language'] : 'en'; $redirect = new redirect(); $redirect->go(WEBSITE . $main_language . "/" . $welcome_class); } /* insert log */ // $file_manipulate = new file_manipulate(); // $file_manipulate->insertLog("[".$ip."][".date("d-m-Y G:m:s")."] - ".WEBSITE_.$actual_link); /* token */ $_SESSION["token_generator"] = ustring::random(10); /* ** some more define */ $get_lang_id = new get_lang_id(); $lang_id = $get_lang_id->id($c, $LANG); define('LANG', $LANG); define('LANG_ID', $lang_id);
public function template($c) { $conn = $this->conn($c); // connection $cache = new cache(); $text_general = $cache->index($c, "text_general"); $data["text_general"] = json_decode($text_general, true); /* languages */ $languages = $cache->index($c, "languages"); $data["languages"] = json_decode($languages); /* contact_page_data */ $contact_page_data = $cache->index($c, "contact_page_data"); $data["contact_data"] = json_decode($contact_page_data, true); /* language variables */ $language_data = $cache->index($c, "language_data"); $language_data = json_decode($language_data); $model_template_makevars = new model_template_makevars(); $data["language_data"] = $model_template_makevars->vars($language_data); /* website menu header & footer */ $menu_array = $cache->index($c, "main_menu"); $menu_array = json_decode($menu_array); $model_template_main_menu = new model_template_main_menu(); $data["main_menu"] = $model_template_main_menu->nav($menu_array, "header"); $data["footer_menu"] = $model_template_main_menu->nav($menu_array, "footer"); /* breadcrups */ $breadcrups = $cache->index($c, "breadcrups"); $data["breadcrups"] = json_decode($breadcrups); /* components */ $components = $cache->index($c, "components"); $data["components"] = json_decode($components); /* countries */ $countries = $cache->index($c, "countries"); $data["countries"] = json_decode($countries); /* users statements */ $model_template_userstatements = new model_template_userstatements(); $data["userstatements"] = $model_template_userstatements->stats($c, Input::method("GET", "t"), Input::method("GET", "i")); /* productinside */ if (Input::method("GET", "p")) { $productinside = $cache->index($c, "productinside"); $data["productinside"] = json_decode($productinside); } $doerror = false; /*company*/ if (Input::method("GET", "t") == "manufacturer" || Input::method("GET", "t") == "serviceprovider" || Input::method("GET", "t") == "company" || Input::method("GET", "t") == "individual") { if (Input::method("GET", "t") == "manufacturer") { $columns = ' `studio404_users`.`namelname`, `studio404_users`.`picture`, `studio404_users`.`sector_id`, `studio404_users`.`sub_sector_id`, `studio404_users`.`products`, `studio404_users`.`export_markets_id`, `studio404_users`.`certificates`, `studio404_users`.`production_capacity`, `studio404_users`.`established_in`, `studio404_users`.`number_of_employes`, `studio404_users`.`address`, `studio404_users`.`mobile`, `studio404_users`.`office_phone`, `studio404_users`.`email`, `studio404_users`.`web_address`, `studio404_users`.`contact_person`, `studio404_users`.`ad_position1`, `studio404_users`.`ad_email1`, `studio404_users`.`ad_person2`, `studio404_users`.`ad_position2`, `studio404_users`.`ad_mobile2`, `studio404_users`.`ad_email2`, `studio404_users`.`ad_upload_catalog`, `studio404_users`.`about` '; } else { if (Input::method("GET", "t") == "serviceprovider") { $columns = ' `studio404_users`.`namelname`, `studio404_users`.`picture`, `studio404_users`.`sector_id`, `studio404_users`.`sub_sector_id`, `studio404_users`.`products`, `studio404_users`.`export_markets_id`, `studio404_users`.`certificates`, `studio404_users`.`production_capacity`, `studio404_users`.`established_in`, `studio404_users`.`number_of_employes`, `studio404_users`.`address`, `studio404_users`.`mobile`, `studio404_users`.`office_phone`, `studio404_users`.`email`, `studio404_users`.`web_address`, `studio404_users`.`contact_person`, `studio404_users`.`ad_position1`, `studio404_users`.`ad_email1`, `studio404_users`.`ad_person2`, `studio404_users`.`ad_position2`, `studio404_users`.`ad_mobile2`, `studio404_users`.`ad_email2`, `studio404_users`.`ad_upload_catalog`, `studio404_users`.`about` '; } else { if (Input::method("GET", "t") == "company") { $columns = ' `studio404_users`.`namelname`, `studio404_users`.`address`, `studio404_users`.`mobile`, `studio404_users`.`office_phone`, `studio404_users`.`email`, `studio404_users`.`web_address`, `studio404_users`.`contact_person`, `studio404_users`.`ad_position1`, `studio404_users`.`ad_email1`, `studio404_users`.`ad_person2`, `studio404_users`.`ad_position2`, `studio404_users`.`ad_mobile2`, `studio404_users`.`ad_email2` '; } else { if (Input::method("GET", "t") == "individual") { $columns = ' `studio404_users`.`namelname`, `studio404_users`.`address`, `studio404_users`.`mobile`, `studio404_users`.`office_phone`, `studio404_users`.`email`, `studio404_users`.`web_address` '; } } } } $data["get_type"] = Input::method("GET", "t"); } else { $doerror = true; $redirect = new redirect(); $redirect->go(WEBSITE); die; } $data["get_view"] = (int) Input::method("GET", "i"); $data["get_product"] = (int) Input::method("GET", "p"); $data["get_token"] = Input::method("GET", "token") ? Input::method("GET", "token") : ''; $sql = 'SELECT ' . $columns . ' FROM `studio404_users` WHERE `studio404_users`.`user_type`=:user_type AND `studio404_users`.`company_type`=:company_type AND `studio404_users`.`id`=:idx AND `studio404_users`.`allow`!=:one AND `studio404_users`.`status`!=:one '; $prepare = $conn->prepare($sql); $prepare->execute(array(":user_type" => 'website', ":company_type" => $data["get_type"], ":idx" => $data["get_view"], ":one" => 1)); if ($prepare->rowCount() > 0) { $data["fetch"] = $prepare->fetch(PDO::FETCH_ASSOC); $retrieve_users_info = new retrieve_users_info(); @(include $c["website.directory"] . "/user.php"); } else { $doerror = true; $redirect = new redirect(); $redirect->go(WEBSITE); die; } }
public function act_gallery($c) { $conn = $this->conn($c); // get current item position and media_idx $sql = 'SELECT `media_idx`, `position` FROM `studio404_media_item` WHERE `idx`=:idx AND `lang`=:lang AND `status`!=:status'; $prepare = $conn->prepare($sql); $prepare->execute(array(":idx" => $_GET['midx'], ":lang" => LANG_ID, ":status" => 1)); $fetch = $prepare->fetch(PDO::FETCH_ASSOC); $position = $fetch['position']; $media_idx = $fetch['media_idx']; if (isset($_GET['action'], $_GET['type'], $_GET['id'], $_GET['midx'], $_GET['super'], $_GET['token'], $_GET['up']) && is_numeric($_GET['id']) && is_numeric($_GET['midx']) && $_GET['token'] == $_SESSION['token']) { //make current to zero $sqlz = 'UPDATE `studio404_media_item` SET `position`=:position WHERE `idx`=:idx AND `status`!=:status'; $preparez = $conn->prepare($sqlz); $preparez->execute(array(":position" => 0, ":idx" => $_GET['midx'], ":status" => 1)); $minusposition = $position - 1; // change upper item position to current $sqlu = 'UPDATE `studio404_media_item` SET `position`=:newposition WHERE `position`=:position AND `media_idx`=:media_idx AND `status`!=:status'; $prepareu = $conn->prepare($sqlu); $prepareu->execute(array(":newposition" => $position, ":position" => $minusposition, ":media_idx" => $media_idx, ":status" => 1)); // update current to minus one $sqlc = 'UPDATE `studio404_media_item` SET `position`=:newposition2 WHERE `position`=:zeroposition2 AND `media_idx`=:media_idx AND `status`!=:status'; $preparec = $conn->prepare($sqlc); $preparec->execute(array(":newposition2" => $minusposition, ":zeroposition2" => 0, ":media_idx" => $media_idx, ":status" => 1)); } if (isset($_GET['action'], $_GET['type'], $_GET['id'], $_GET['midx'], $_GET['super'], $_GET['token'], $_GET['down']) && is_numeric($_GET['id']) && is_numeric($_GET['midx']) && $_GET['token'] == $_SESSION['token']) { //make current to zero $sqlz = 'UPDATE `studio404_media_item` SET `position`=:position WHERE `idx`=:idx AND `status`!=:status'; $preparez = $conn->prepare($sqlz); $preparez->execute(array(":position" => 0, ":idx" => $_GET['midx'], ":status" => 1)); $minusposition = $position + 1; // change upper item position to current $sqlu = 'UPDATE `studio404_media_item` SET `position`=:newposition WHERE `position`=:position AND `media_idx`=:media_idx AND `status`!=:status'; $prepareu = $conn->prepare($sqlu); $prepareu->execute(array(":newposition" => $position, ":position" => $minusposition, ":media_idx" => $media_idx, ":status" => 1)); // update current to minus one $sqlc = 'UPDATE `studio404_media_item` SET `position`=:newposition2 WHERE `position`=:zeroposition2 AND `media_idx`=:media_idx AND `status`!=:status'; $preparec = $conn->prepare($sqlc); $preparec->execute(array(":newposition2" => $minusposition, ":zeroposition2" => 0, ":media_idx" => $media_idx, ":status" => 1)); } $_SESSION['token'] = md5(sha1(time())); $go = '?action=' . $_GET['action'] . '&type=' . $_GET['type'] . '&id=' . $_GET['id'] . '&super=' . $_GET['super'] . '&token=' . $_SESSION['token']; $redirect = new redirect(); $redirect->go($go); }
public function view($obj, $c) { // post and get request handler $model_admin_requests = new model_admin_requests(); $data = $model_admin_requests->requestx($c); // select page managed menu $model_admin_selectManagedMenu = new model_admin_selectManagedMenu(); $data["managed_pages"] = $model_admin_selectManagedMenu->select($c); $data["managed_pages2"] = $model_admin_selectManagedMenu->select($c, true); // breadcrups module $model_admin_breadcrups = new model_admin_breadcrups(); $data["breadcrups"] = $model_admin_breadcrups->get($c); // get componemt menu $model_admin_components = new model_admin_components(); $data["components"] = $model_admin_components->select_components_menu($c); $action = filter_input(INPUT_GET, "action"); if (isset($_SESSION["user404"]) && !empty($_SESSION["user404"])) { if (isset($action) && $action == "mainMenu") { $data["website_title"] = "Welcome / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_mainmenu.php"); } else { if (isset($action) && $action == "addAdmin") { $data["website_title"] = "Add admin / Admin Panel - v: " . $c['cmsversion']; $model_admin_select_admintypes = new model_admin_select_admintypes(); $data["admin_types"] = $model_admin_select_admintypes->select($c); @(include "view/view_admin_addAdmin.php"); } else { if (isset($action) && $action == "userList") { $data["website_title"] = "Admin users / Admin Panel - v: " . $c['cmsversion']; $model_admin_select = new model_admin_select(); $admin_list = $model_admin_select->select_admins($c); $data['table'] = $admin_list['table']; $data['pager'] = $admin_list['pager']; @(include "view/view_admin_userlist.php"); } else { if (isset($action) && $action == "wuserList") { $data["website_title"] = "Website users / Admin Panel - v: " . $c['cmsversion']; $model_admin_select = new model_admin_select(); $admin_list = $model_admin_select->select_websiteusers($c); $data['table'] = $admin_list['table']; $data['pager'] = $admin_list['pager']; @(include "view/view_admin_wuserlist.php"); } else { if (isset($action) && $action == "waddUser") { $data["website_title"] = "Add website user / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addwebsiteuser.php"); } else { if (isset($action) && $action == "weditprofile") { $data["website_title"] = "Edit website user / Admin Panel - v: " . $c['cmsversion']; $model_admin_editprofile = new model_admin_editprofile(); $_SESSION["token"] = $_GET['token']; $data["profile"] = $model_admin_editprofile->select_profile2($c); @(include "view/view_admin_editwebsiteuser.php"); } else { if (isset($action) && $action == "editprofile") { $data["website_title"] = "Edit profile / Admin Panel - v: " . $c['cmsversion']; $model_admin_editprofile = new model_admin_editprofile(); $data["profile"] = $model_admin_editprofile->select_profile($c); $model_admin_select_admintypes = new model_admin_select_admintypes(); $data["admin_types"] = $model_admin_select_admintypes->select($c); @(include "view/view_admin_editprofile.php"); } else { if (isset($action) && $action == "changePassword") { $data["website_title"] = "Change Password / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_changePassword.php"); } else { if (isset($action) && $action == "profileSettings") { $model_admin_profile = new model_admin_profile(); $data["profile"] = $model_admin_profile->selectAdminProfile($c); $data["website_title"] = "Profile settings / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_profileSettings.php"); } else { if (isset($action) && $action == "signout") { unset($_SESSION["user404"]); $redirect = new redirect(); $redirect->go("?action=login"); } else { if (isset($action) && $action == "userRights") { $data["website_title"] = "User rights / Admin Panel - v: " . $c['cmsversion']; $model_admin_userrights = new model_admin_userrights(); $admin_rightgroups = $model_admin_userrights->select_admins_rightgroups($c); $data['table'] = $admin_rightgroups['table']; $data['pager'] = $admin_rightgroups['pager']; @(include "view/view_admin_userRights.php"); } else { if (isset($action) && $action == "addAdminRights") { $data["website_title"] = "Add admin user rights / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_rights.php"); } else { if (isset($action) && $action == "editAdminRights") { $data["website_title"] = "Edit admin user rights / Admin Panel - v: " . $c['cmsversion']; $model_admin_userrights = new model_admin_userrights(); $data["user_rights"] = $model_admin_userrights->select_userright($c); @(include "view/view_admin_editAdminRights.php"); } else { if ($_GET['action'] == "log") { $data["website_title"] = "Logs / Admin Panel - v: " . $c['cmsversion']; $model_admin_logs = new model_admin_logs(); $admin_logs = $model_admin_logs->select_admin_logs($c); $data['table'] = $admin_logs['table']; $data['pager'] = $admin_logs['pager']; @(include "view/view_admin_log.php"); } else { if ($_GET['action'] == "textConverter") { $data["website_title"] = "Text converter / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_textconverter.php"); } else { if ($_GET['action'] == "menuManagment") { $data["website_title"] = "Page managment/ Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_menumanagment = new model_admin_menumanagment(); $admin_list = $model_admin_menumanagment->select_menus($c); $data['table'] = $admin_list['table']; $data['pager'] = $admin_list['pager']; @(include "view/view_admin_pagemanagment.php"); } else { if (isset($action) && $action == "editMenuManagment") { $data["website_title"] = "Edit page managment / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_editMenuManagment = new model_admin_editMenuManagment(); $data["pagesManagment"] = $model_admin_editMenuManagment->select_editMenuManagment($c); @(include "view/view_admin_editMenuManagment.php"); } else { if (isset($action) && $action == "addPageManagment") { $data["website_title"] = "Add page managment / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addMenuManagment.php"); } else { if (isset($action) && $action == "sitemap") { $data["website_title"] = "Sitemap / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_menumanagment = new model_admin_menumanagment(); $admin_list = $model_admin_menumanagment->select_sub($c); $data['table'] = $admin_list['table']; $data['pager'] = $admin_list['pager']; @(include "view/view_admin_sitemap.php"); } else { if (isset($action) && $action == "addSitemapItem") { $data["website_title"] = "Add Sitemap Item / Admin Panel - v: " . $c['cmsversion']; // $model_admin_selectLanguage = new model_admin_selectLanguage(); // $data["language_select"] = $model_admin_selectLanguage->select_option($c); $check_super = new check_super(); $super_exists = $check_super->super($c); if (!$super_exists) { $data["outMessage"] = 2; } else { if (isset($_GET['super'], $_GET['sub'])) { $pre_slug = new pre_slug(); $pre_slug_method = $pre_slug->slug($c, $_GET['super'], $_GET['sub']); if (is_array($pre_slug_method)) { $reverse = array_reverse($pre_slug_method); $data['pre_slug'] = implode("/", $reverse); } } } @(include "view/view_admin_addSitemapItem.php"); } else { if (isset($action) && $action == "editSitemap") { $data["website_title"] = "Edit sitemap / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $edit_page_interface = new edit_page_interface(); $data["interface"] = $edit_page_interface->out_interface($c); @(include "view/view_admin_editSiteMap.php"); } else { if (isset($action) && $action == "newsModule") { if (isset($_GET['type'], $_GET['newsidx'], $_GET['visibilitychnage'])) { $token = md5(sha1(time())); echo '<meta http-equiv="refresh" content="0; url=/en/eadmin?action=newsModule&type=' . $_GET['type'] . '&id=' . $_GET['id'] . '&super=' . $_GET['super'] . '&token=' . $token . '" />'; exit; } $data["website_title"] = "News module / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_newsmodule = new model_admin_newsmodule(); $news_list = $model_admin_newsmodule->select_list($c); $data['table'] = $news_list['table']; $data['pager'] = $news_list['pager']; @(include "view/view_admin_news_module.php"); } else { if (isset($action) && $action == "addNews" && isset($_GET['newsidx'])) { $data["website_title"] = "Add news / Admin Panel - v: " . $c['cmsversion']; $news_slug = new news_slug(); $data["pre_slug"] = $news_slug->slug($c); @(include "view/view_admin_addnews.php"); } else { if (isset($action) && $action == "addCatalog" && isset($_GET['catalogidx'])) { $data["website_title"] = "Add catalog / Admin Panel - v: " . $c['cmsversion']; $news_slug = new news_slug(); $data["pre_slug"] = $news_slug->slug($c); @(include "view/view_admin_addcatalog.php"); } else { if (isset($action) && $action == "catalogModule") { $data["website_title"] = "Catalog module / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_catalogmodule = new model_admin_catalogmodule(); $news_list = $model_admin_catalogmodule->select_list($c); $data['table'] = $news_list['table']; $data['pager'] = $news_list['pager']; @(include "view/view_admin_catalog_module.php"); } else { if (isset($action) && $action == "editNewsItem") { $data["website_title"] = "Edit news item / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $edit_page_interface = new edit_page_interface(); $data["interface"] = $edit_page_interface->out_interface($c); @(include "view/view_admin_editNewsItem.php"); } else { if (isset($action) && $action == "editCatalogItem") { $data["website_title"] = "Edit catalog item / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $edit_page_interface = new edit_page_interface(); $data["interface"] = $edit_page_interface->out_interface($c); @(include "view/view_admin_editCatalogItem.php"); } else { if (isset($action) && $action == "catalogMoreInfo") { $data["website_title"] = "Catalog more info / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_catalogmoreinfo = new model_admin_catalogmoreinfo(); $news_list = $model_admin_catalogmoreinfo->select_list_all($c); $data['table'] = $news_list['table']; $data['pager'] = $news_list['pager']; @(include "view/view_admin_catalogmoreinfo.php"); } else { if (isset($action) && $action == "addCatalogMoreInfo") { $data["website_title"] = "Add catalog more info / Admin Panel - v: " . $c['cmsversion']; $model_admin_catalogmodule = new model_admin_catalogmodule(); $data["catalogs"] = $model_admin_catalogmodule->getcatalogs($c); @(include "view/view_admin_addcatalogmoreinfo.php"); } else { if (isset($action, $_GET['id']) && is_numeric($_GET['id']) && $action == "editCatalogMoreInfo") { $data["website_title"] = "Edit catalog more info / Admin Panel - v: " . $c['cmsversion']; $model_admin_catalogmoreinfo = new model_admin_catalogmoreinfo(); $data['info'] = $model_admin_catalogmoreinfo->select_one($c, $_GET['id']); $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_catalogmodule = new model_admin_catalogmodule(); $data["catalogs"] = $model_admin_catalogmodule->getcatalogs($c); @(include "view/view_admin_editcatalogmoreinfo.php"); } else { if (isset($action) && $action == "components") { $data["website_title"] = "Components / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_components = new model_admin_components(); $components = $model_admin_components->select($c); $data['table'] = $components['table']; $data['pager'] = $components['pager']; @(include "view/view_admin_components.php"); } else { if (isset($action) && $action == "addComponents") { $data["website_title"] = "Add components / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addcomponents.php"); } else { if (isset($action) && $action == "editComponents") { $data["website_title"] = "Edit components / Admin Panel - v: " . $c['cmsversion']; $edit_page_interface = new edit_page_interface(); $data["interface"] = $edit_page_interface->general_form_components($c); @(include "view/view_admin_editcomponents.php"); } else { if (isset($action) && $action == "componentModule") { $data["website_title"] = "Component module / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_componentsmodele = new model_admin_componentsmodele(); $components = $model_admin_componentsmodele->select($c); $data['table'] = $components['table']; $data['pager'] = $components['pager']; @(include "view/view_admin_componentsmodel.php"); } else { if (isset($action) && $action == "addComponentsModule") { $data["website_title"] = "Add components module / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addcomponentsmodule.php"); } else { if (isset($action) && $action == "editComponentsModule") { $data["website_title"] = "Edit components module / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_componentsmodele = new model_admin_componentsmodele(); $data["select"] = $model_admin_componentsmodele->select_one($c); @(include "view/view_admin_editcomponentsmodule.php"); } else { if (isset($action) && $action == "languages") { $data["website_title"] = "Languages / Admin Panel - v: " . $c['cmsversion']; $model_admin_languages = new model_admin_languages(); $languages = $model_admin_languages->select($c); $data['table'] = $languages['table']; $data['pager'] = $languages['pager']; @(include "view/view_admin_languages.php"); } else { if (isset($action) && $action == "addlanguage") { $data["website_title"] = "Add language / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addlanguage.php"); } else { if (isset($action) && $action == "editLanguage") { $data["website_title"] = "Edit language / Admin Panel - v: " . $c['cmsversion']; $model_admin_languages = new model_admin_languages(); $data["info"] = $model_admin_languages->select_one($c); @(include "view/view_admin_editlanguage.php"); } else { if (isset($action) && $action == "languageData") { $data["website_title"] = "Language data / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_languageData = new model_admin_languageData(); $languages = $model_admin_languageData->select($c); $data['table'] = $languages['table']; $data['pager'] = $languages['pager']; @(include "view/view_admin_languageData.php"); } else { if (isset($action) && $action == "addlanguageData") { $data["website_title"] = "Add language data / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addlanguageData.php"); } else { if (isset($action) && $action == "editLanguageData") { $data["website_title"] = "Edit language data / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_languageData = new model_admin_languageData(); $data["info"] = $model_admin_languageData->select_one($c); @(include "view/view_admin_editlanguagedata.php"); } else { if (isset($action) && $action == "charts") { $data["website_title"] = "Charts / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_charts = new model_admin_charts(); $invoices = $model_admin_charts->select($c); $data['table'] = $invoices['table']; $data['pager'] = $invoices['pager']; @(include "view/view_admin_charts.php"); } else { if (isset($action) && $action == "addChart") { $data["website_title"] = "Add Chart / Admin Panel - v: " . $c['cmsversion']; // $model_admin_charts = new model_admin_charts(); // $invoices = $model_admin_charts->select($c); // $data['table'] = $invoices['table']; // $data['pager'] = $invoices['pager']; @(include "view/view_admin_charts_add.php"); //addChart } else { if (isset($action) && $action == "emailnewsletter") { $data["website_title"] = "Email newsletter / Admin Panel - v: " . $c['cmsversion']; $model_admin_newslettermain = new model_admin_newslettermain(); $data["info"] = $model_admin_newslettermain->select_main($c); $data["email_limit"] = $c["max.send.email.per.day"]; @(include "view/view_admin_emailnewsletter.php"); } else { if (isset($action) && $action == "invoices") { $data["website_title"] = "Invoices / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_invoices = new model_admin_invoices(); $invoices = $model_admin_invoices->select($c); $data['table'] = $invoices['table']; $data['pager'] = $invoices['pager']; @(include "view/view_admin_invoices.php"); } else { if (isset($action) && $action == "addInvoice") { $data["website_title"] = "Add invoice / Admin Panel - v: " . $c['cmsversion']; $lang = new model_admin_languageData(); $data["webhosting"] = $lang->l("webhosting"); $data["creatingawebsite"] = $lang->l("creatingawebsite"); $data["gadaxdilia"] = $lang->l("gadaxdilia"); $data["gadasaxdeli"] = $lang->l("gadasaxdeli"); $data["otherservice"] = $lang->l("otherservice"); $model_admin_select = new model_admin_select(); $data["fetch"] = $model_admin_select->select_admin_names_for_invoice($c); @(include "view/view_admin_addinvoice.php"); } else { if (isset($action) && $action == "editInvoice") { $data["website_title"] = "Edit invoice / Admin Panel - v: " . $c['cmsversion']; $lang = new model_admin_languageData(); $data["webhosting"] = $lang->l("webhosting"); $data["creatingawebsite"] = $lang->l("creatingawebsite"); $data["gadaxdilia"] = $lang->l("gadaxdilia"); $data["gadasaxdeli"] = $lang->l("gadasaxdeli"); $data["otherservice"] = $lang->l("otherservice"); $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_invoices = new model_admin_invoices(); $data["info"] = $model_admin_invoices->select_one($c); @(include "view/view_admin_editinvoice.php"); } else { if (isset($action) && $action == "gallery") { $data["website_title"] = "Gallery module / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_gallery = new model_admin_gallery(); $news_list = $model_admin_gallery->select($c); $data['table'] = $news_list['table']; $data['pager'] = $news_list['pager']; @(include "view/view_admin_gallery.php"); } else { if (isset($action) && $action == "addGallery" && isset($_GET['mediaidx'])) { $data["website_title"] = "Add gallery / Admin Panel - v: " . $c['cmsversion']; $news_slug = new news_slug(); $data["pre_slug"] = $news_slug->slug($c); @(include "view/view_admin_addgallery.php"); } else { if (isset($action) && $action == "editMediaItem") { $data["website_title"] = "Edit gallery item / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $edit_page_interface = new edit_page_interface(); $data["interface"] = $edit_page_interface->out_interface($c); @(include "view/view_admin_editMediaItem.php"); } else { if (isset($action) && $action == "vectormap") { $data["website_title"] = "Vector map / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_vectormap = new model_admin_vectormap(); $map = $model_admin_vectormap->select($c); $data['table'] = $map['table']; $data['pager'] = $map['pager']; @(include "view/view_admin_map.php"); } else { if (isset($action) && $action == "managedemails") { $data["website_title"] = "Manage emails / Admin Panel - v: " . $c['cmsversion']; $model_admin_menageemails = new model_admin_menageemails(); $groups = $model_admin_menageemails->select($c); $data['table'] = $groups['table']; $data['pager'] = $groups['pager']; @(include "view/view_admin_menageemails.php"); } else { if (isset($action) && $action == "editVectorMap") { $data["website_title"] = "Edit trade map / Admin Panel - v: " . $c['cmsversion']; $lang = new model_admin_languageData(); $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_vectormap = new model_admin_vectormap(); $data["select"] = $model_admin_vectormap->select_one($c); @(include "view/view_admin_editvectormap.php"); } else { if (isset($action) && $action == "addEmailGroup") { $data["website_title"] = "Add email groups / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addemailgroups.php"); } else { if (isset($action) && $action == "editEmailGroup") { $data["website_title"] = "Edit email groups / Admin Panel - v: " . $c['cmsversion']; $model_admin_menageemails = new model_admin_menageemails(); $data['info'] = $model_admin_menageemails->select_one($c); @(include "view/view_admin_editemailgroups.php"); } else { if (isset($action) && $action == "showemails") { $data["website_title"] = "Email list / Admin Panel - v: " . $c['cmsversion']; $model_admin_emaillist = new model_admin_emaillist(); $groups = $model_admin_emaillist->select($c); $data['table'] = $groups['table']; $data['pager'] = $groups['pager']; @(include "view/view_admin_menageemailLiss.php"); } else { if (isset($action) && $action == "addEmail") { $data["website_title"] = "Add email / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addemail.php"); } else { if (isset($action) && $action == "editEmail") { $data["website_title"] = "Edit email / Admin Panel - v: " . $c['cmsversion']; $model_admin_emaillist = new model_admin_emaillist(); $data['info'] = $model_admin_emaillist->select_one($c); @(include "view/view_admin_editemail.php"); } else { if (isset($action) && $action == "outbox") { $data["website_title"] = "Outbox / Admin Panel - v: " . $c['cmsversion']; $model_admin_emaillist = new model_admin_emaillist(); $outbox = $model_admin_emaillist->outbox($c); $data['table'] = $outbox['table']; $data['pager'] = $outbox['pager']; @(include "view/view_admin_outbox.php"); } else { if (isset($action) && $action == "comments") { $data["website_title"] = "Comments / Admin Panel - v: " . $c['cmsversion']; $model_admin_comments = new model_admin_comments(); $outbox = $model_admin_comments->get_comments($c); $data['table'] = $outbox['table']; $data['pager'] = $outbox['pager']; @(include "view/view_admin_comments.php"); } else { if (isset($action) && $action == "editComments") { $data["website_title"] = "Edit comments / Admin Panel - v: " . $c['cmsversion']; $model_admin_selectLanguage = new model_admin_selectLanguage(); $data["language_select"] = $model_admin_selectLanguage->select_option($c); $model_admin_comments = new model_admin_comments(); $data["data"] = $model_admin_comments->select_one($c); @(include "view/view_admin_editComments.php"); } else { if (isset($action) && $action == "addComments") { $data["website_title"] = "Add comments / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_addComments.php"); } else { if (isset($action) && $action == "filemanager") { $data["website_title"] = "File manager / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_filemanager.php"); } else { $data["website_title"] = "Welcome / Admin Panel - v: " . $c['cmsversion']; $data["c"] = $c; $userData = new userData(); $data["userIp"] = $userData->getUserIP(); @(include "view/view_admin_home.php"); } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } else { $data["website_title"] = "Login / Admin Panel - v: " . $c['cmsversion']; @(include "view/view_admin_login.php"); } }