reenadak icon

index page of login script

reenadak | PRO | 09/25/17 05:56:55 PM UTC | 0 ⭐ | 268 👁️ | Never ⏰ | []
PHP |

1.13 KB

|

None

|

0 👍

/

0 👎

<?php require_once 'app/init.php';
 
$links = DB::table('short_url')
        ->select('slug', 'url', 'title', 'rating')
        ->orderBy('slug', 'asc')
        ->where('rating', '>', 2.51)
        ->limit(24)
        ->get();
?>
 
<?php echo View::make('header')->render() ?>
 
<div class="jumbotron" style="text-align: center; background: none;">
 
    <div style="margin-top: 50px;">
        <?php if (Auth::guest()): ?>
            <a href="login.php" class="btn btn-primary"><?php _e('main.login') ?></a> &nbsp;
            <a href="signup.php" class="btn btn-primary"><?php _e('main.signup') ?></a>
        <?php endif ?>      
    </div>
 
    <div style="min-height: 100px"><p>
        <?php
            $num = 0;
            foreach ($links as $link)
            {
                $r = 0.4 * abs($link->rating - 2.5 ) + 0.5; 
                echo "<a href='" .$link->url. "' title='" .$link->title. "' target=_new style='font-size: ".$r."em;'>" . $link->slug . "</a> &nbsp; ";
                echo (++$num%4==0) ? "<p>" : " | &nbsp; ";
            }
        ?>
        <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>
    </div>
</div>
 
<?php echo View::make('footer')->render() ?>

Comments