Example #1
0
 public function titulo($param = null)
 {
     //EXIBE O TITULO DA PÁGINA DE ACORDO COM O CONTEÚDO EM EXIBIÇÃO NA TELA
     if (App::area()) {
         if (App::pagina()) {
             $result = $this->db->select("\n\t\t\t\t\t\tSELECT post_title, post_date FROM wp_posts WHERE post_type = 'post'  and post_status = 'publish'  and post_name = '{$this->filter(App::pagina(), 'string')}'\n\t\t\t\t\t\t", array(), 'fetch');
             if (!empty($result['post_title'])) {
                 $return = utf8_encode($result['post_title']) . " ‹ " . utf8_encode($this->configs('blogname'));
             } else {
                 $return = strtoupper(App::area()) . " ‹ " . utf8_encode($this->configs('blogname'));
             }
         } else {
             $return = strtoupper(App::area()) . " ‹ " . utf8_encode($this->configs('blogname'));
         }
     } else {
         $return = utf8_encode($this->configs('blogname'));
     }
     return $return;
 }
 public function logout(Request $request, Response $response)
 {
     $this->helper->unsetAccessToken();
     return $response->withStatus(301)->withHeader('Location', '/' . self::AREA . '/auth');
 }