Esempio n. 1
0
 function __construct()
 {
     parent::__construct();
     if (!auth::isauth()) {
         header('location: login/authorize');
         exit;
     }
 }
Esempio n. 2
0
 function __construct()
 {
     if (auth::isauth()) {
         $_twitter = new TwitterOAuth(tw_consumer_key, tw_consumer_secret, auth::tw_token()['oauth_token'], auth::tw_token()['oauth_token_secret']);
     }
 }
Esempio n. 3
0
    </style>
  </head>
  <body>
   <div role='navigation' class='navbar navbar-default'>
     <div class='container'>
       <div class='navbar-header'>
         <button type='button' data-toggle='collapse' data-target='.navbar-collapse' class='navbar-toggle'><span class='sr-only'>Toggle navigation</span><span class='icon-bar'></span><span class='icon-bar'></span><span class='icon-bar'></span></button>
         <a href='/' class='navbar-brand'>Keepitter</a></div>
       <div class='navbar-collapse collapse'>
         <ul class='nav navbar-nav'>
           <li><a href='/insert'>keep a tweet</a></li>
         </ul>
         <ul class='nav navbar-nav navbar-right'>
           <?php 
if (auth::isauth()) {
    ?>
             <li class='dropdown'>
               <a href='#' data-toggle='dropdown' class='dropdown-toggle' id="profiler"><b><?php 
    echo auth::getuser()['name'];
    ?>
</b> (@<?php 
    echo auth::getuser()['screen_name'];
    ?>
)
                 <span class='caret'></span></a>
               <ul role='menu' class='dropdown-menu'>
                 <li><a href='/me'>me</a></li>
                 <li class='divider'></li>
                 <li><a href='/profile/kill'>log out</a></li>
               </ul>