Beispiel #1
0
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Testing Lib</title>
    <?php 
require_once "_loader.php";
?>
  </head>
  <body>
    <?php 
folderContentWithoutDots("net");
echo "<br>";
$g = new \Lib\Gravatar("*****@*****.**");
echo $g->createImgTag();
$g->setDefault("mm");
$g->useDefault();
echo $g->createImgTag();
echo "<br>";
$t = new \Lib\Twitter();
echo $t->tweetByID("539790403290271744");
echo $t->tweetByURL("https://twitter.com/jack/status/20");
echo $t->lastTweet("DJohnny");
?>
  </body>
</html>
Beispiel #2
0
<?php

require_once 'config.php';
$user = new \Lib\User();
$twitter = new \Lib\Twitter();
$db = new \Lib\Db($dbFile);
$dao = new \Lib\Dao();
$dao->setDb($db);
$page = isset($_GET['page']) ? strip_tags($_GET['page']) : '';
$param = isset($_GET['param']) ? strip_tags($_GET['param']) : 0;
$template = null;
$vars = array();
$baseUrl = 'http://' . $_SERVER['HTTP_HOST'];
// Default meta data
$metadata = array('ogTitle' => 'Lolgh', 'ogType' => 'website', 'ogImage' => $baseUrl . '/img/icon.png', 'ogUrl' => $baseUrl, 'ogDescription' => 'The LolGH strips are typically random and unordered strips depicting some isolated, stupid and funny events in Ghana, Africa and the world. Just jokes really!!! :)', 'twitterCard' => 'summary', 'twitterUrl' => $baseUrl, 'twitterTitle' => 'LolGH', 'twitterDescription' => 'The LolGH strips are typically random and unordered strips depicting some isolated, stupid and funny events in Ghana, Africa and the world. Just jokes really!!! :)', 'twitterImage' => $baseUrl . '/img/icon.png');
// Frontend Controller
switch ($page) {
    case '':
        // Custom meta data
        $pageUrl = $baseUrl;
        $recentToon = $dao->fetchRecentToon();
        $recentComic = $dao->fetchRecentComic();
        $template = '@frontend/index.html';
        $vars['pageTitle'] = 'A laugh a day...';
        $vars['tweets'] = $twitter->getTimeLine();
        $vars['recentToon'] = $recentToon;
        $vars['recentComic'] = $recentComic;
        break;
    case 'contact':
        if ($_POST) {
            $subject = 'Lolgh Contact';