reenadak

index page of login script

Sep 25th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.13 KB | None | 0 0
  1. <?php require_once 'app/init.php';
  2.  
  3. $links = DB::table('short_url')
  4.         ->select('slug', 'url', 'title', 'rating')
  5.         ->orderBy('slug', 'asc')
  6.         ->where('rating', '>', 2.51)
  7.         ->limit(24)
  8.         ->get();
  9. ?>
  10.  
  11. <?php echo View::make('header')->render() ?>
  12.  
  13. <div class="jumbotron" style="text-align: center; background: none;">
  14.  
  15.     <div style="margin-top: 50px;">
  16.         <?php if (Auth::guest()): ?>
  17.             <a href="login.php" class="btn btn-primary"><?php _e('main.login') ?></a> &nbsp;
  18.             <a href="signup.php" class="btn btn-primary"><?php _e('main.signup') ?></a>
  19.         <?php endif ?>     
  20.     </div>
  21.  
  22.     <div style="min-height: 100px"><p>
  23.         <?php
  24.             $num = 0;
  25.             foreach ($links as $link)
  26.             {
  27.                 $r = 0.4 * abs($link->rating - 2.5 ) + 0.5;
  28.                 echo "<a href='" .$link->url. "' title='" .$link->title. "' target=_new style='font-size: ".$r."em;'>" . $link->slug . "</a> &nbsp; ";
  29.                 echo (++$num%4==0) ? "<p>" : " | &nbsp; ";
  30.             }
  31.         ?>
  32.         <p>&nbsp;<br><ul class="footer-links"><li><a href='http://notes.bz/mate/short_url.php' title='Edit links above'><b>edit</b></a></li></ul>
  33.     </div>
  34. </div>
  35.  
  36. <?php echo View::make('footer')->render() ?>
Add Comment
Please, Sign In to add comment