Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //external file with function
- function getThemer($key,$id) {
- $themer = R::find("themers","id = ?",[$id]);
- echo json_encode(R::exportAll($themer));
- return true;
- }
- function countThemer(){
- echo "count";
- $count = R::exec( 'SELECT COUNT(id) FROM themers' );
- echo $count;
- }
- function allowed($key){
- $app = \Slim\Slim::getInstance();
- $params = $app->router()->getCurrentRoute()->getParams();
- if(!($params["key"]=="giulio"))
- $app->redirect ("http://google.com");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement