<?php

use CodeIgniter\Router\RouteCollection;

/**
 * @var RouteCollection $routes
 */
//$routes->get('/', 'Page::index');
$routes->post('/admin/login/loginCheck', 'admin\\Login::loginCheck');

$routes->get('/admin/pages', 'admin\\Pages::index');
$routes->get('/admin/pages/getData', 'admin\\Pages::getData');
$routes->post('/admin/pages/addForm', 'admin\\Pages::addForm');
$routes->post('/admin/pages/checkDuplicatePagename', 'admin\\Pages::checkDuplicatePagename');
$routes->post('/admin/pages/addDataProcess', 'admin\\Pages::addDataProcess');
$routes->post('/admin/pages/deleteDataProcess', 'admin\\Pages::deleteDataProcess');

$routes->get('/admin/header', 'admin\\Header::index');
$routes->get('/admin/header/getData', 'admin\\Header::getData');
$routes->post('/admin/header/addForm', 'admin\\Header::addForm');
$routes->post('/admin/header/addDataProcess', 'admin\\Header::addDataProcess');
$routes->post('/admin/header/deleteDataProcess', 'admin\\Header::deleteDataProcess');
$routes->post('/admin/header/deleteCSS', 'admin\\Header::deleteCSS');
$routes->post('/admin/header/deleteImage', 'admin\\Header::deleteImage');

$routes->get('/admin/content', 'admin\\Content::index');
$routes->get('/admin/content/getData', 'admin\\Content::getData');
$routes->post('/admin/content/addForm', 'admin\\Content::addForm');
$routes->post('/admin/content/addDataProcess', 'admin\\Content::addDataProcess');
$routes->post('/admin/content/deleteDataProcess', 'admin\\Content::deleteDataProcess');
$routes->post('/admin/content/deleteCSS', 'admin\\Content::deleteCSS');
$routes->post('/admin/content/deleteImage', 'admin\\Content::deleteImage');

$routes->get('/admin/footer', 'admin\\Footer::index');
$routes->get('/admin/footer/getData', 'admin\\Footer::getData');
$routes->post('/admin/footer/addForm', 'admin\\Footer::addForm');
$routes->post('/admin/footer/addDataProcess', 'admin\\Footer::addDataProcess');
$routes->post('/admin/footer/deleteDataProcess', 'admin\\Footer::deleteDataProcess');
$routes->post('/admin/footer/deleteJS', 'admin\\Footer::deleteJS');
$routes->post('/admin/footer/deleteImage', 'admin\\Footer::deleteImage');

$routes->get('/admin/menu', 'admin\\Menu::index');
$routes->post('/admin/menu/addForm', 'admin\\Menu::addForm');
$routes->post('/admin/menu/addDataProcess', 'admin\\Menu::addDataProcess');
$routes->get('/admin/menu/getData', 'admin\\Menu::getData');
$routes->post('/admin/menu/deleteDataProcess', 'admin\\Menu::deleteDataProcess');

$routes->get('/admin/submenu', 'admin\\Submenu::index');
$routes->post('/admin/submenu/addForm', 'admin\\Submenu::addForm');
$routes->post('/admin/submenu/addDataProcess', 'admin\\Submenu::addDataProcess');
$routes->get('/admin/submenu/getData', 'admin\\Submenu::getData');
$routes->post('/admin/submenu/deleteDataProcess', 'admin\\Submenu::deleteDataProcess');

$routes->get('/admin/preview', 'admin\\Preview::index');
$routes->get('/admin/preview/getData', 'admin\\Preview::getData');


$routes->get('/admin/login/logout', 'admin\\Login::logout');
$routes->get('/admin/login', 'admin\\Login::index');
$routes->get('/admin', 'admin\\Login::index');
$routes->get('(:any)', 'Page::index');
$routes->post('/admin/login/changePassword', 'admin\\Login::changePassword');

