this is my router.php:
<?php
$router = new \Phalcon\Mvc\Router(false);
$router->setUriSource(\Phalcon\Mvc\Router::URI_SOURCE_SERVER_REQUEST_URI);
$router->setDefaultController('login');
$router->setDefaultAction('index');
/**
- Standard MVC routes
*/
$router->add('/', []);
$router->add(
'/:controller',
[
'controller' => 1
]
);
$router->add(
'/:controller/:action',
[
'controller' => 1,
'action' => 2
]
);
$router->add(
'/:controller/:action/:params',
[
'controller' => 1,
'action' => 2,
'params' => 3
]
);
$router->add('/error/:action', array(
'controller' => 'error',
'action' => 1
)
);
$router->add('/index', array(
'controller' => 'index',
'action' => 'index'
)
);
$router->add('/home', array(
'controller' => 'index',
'action' => 'index'
)
);
$router->add('/games', array(
'controller' => 'soldigames',
'action' => 'index'
)
);
$router->add('/sponsorships', array(
'controller' => 'sponsorships',
'action' => 'index'
)
);
$router->add('/view-images', array(
'controller' => 'images',
'action' => 'index'
)
);
$router->add('/users/show', array(
'controller' => 'users',
'action' => 'regular'
)
);
$router->add('/queue/show', array(
'controller' => 'users',
'action' => 'queue'
)
);
$router->add('/winners', array(
'controller' => 'userswinners',
'action' => 'index'
)
);
$router->add('/reports', array(
'controller' => 'reports',
'action' => 'index'
)
);
$router->add('/myZone', array(
'controller' => 'admins',
'action' => 'index'
)
);
$router->add('/viewAllAdmins', array(
'controller' => 'admins',
'action' => 'viewAll'
)
);
$router->add('/login', array(
'controller' => 'login',
'action' => 'logout'
)
);
$router->add('/login/forgotPass', array(
'controller' => 'login',
'action' => 'forgotPass'
)
);
$router->add('/lock', array(
'controller' => 'lock',
'action' => 'locked'
)
);
$router->add('/logout', array(
'controller' => 'login',
'action' => 'logout'
)
);
$router->addGet("/keepalive", "Lock::keepalive"); // Keep Alive the session
$router->addGet("/soldigames/getData", "Soldigames::show"); //manage game times
$router->addGet("/sponsorships/getData", "Sponsorships::show"); //manage sponsorships
$router->addGet("/view-images/getData", "Images::show"); // View all images
$router->addGet("/view-images/del/{id}", "Images::del"); // Delete image
$router->addGet("/reports/getData", "Reports::show"); // View all reported images
$router->addGet("/users/regular/getData", "Users::showRegular"); // View all regular users
$router->addGet("/users/regular/edit/{id}", "Users::r_edit"); // Manage regular users -> GET
$router->addPost("/regular/edit/{id}", "Users::r_edit"); // Manage regular users -> POST
$router->addGet("/users/regular/del/{id}", "Users::r_del"); // Delete regular users
$router->addGet("/users/queue/getData", "Users::showQueue"); // View all queue users
$router->addGet("/users/queue/edit/{id}", "Users::q_edit"); // Manage queue users -> GET
$router->addPost("/queue/edit/{id}", "Users::q_edit"); // Manage queue users -> POST
$router->addGet("/users/queue/del/{id}", "Users::q_del"); // Delete queue users
$router->addGet("/winners/getData", "Userswinners::show"); // View all winners
$router->addGet("/admins/getData", "Admins::show"); // View all administrators
/**
return $router;
?>