Exemple #1
0
 public function sendConfirmation($userAttr)
 {
     $mail = Mail::getInstance();
     $mail->setTo($userAttr['email']);
     $mail->setFrom();
     $mail->setSubject('Your account is created succussful');
     $view = new View(HOME . DS . 'views' . DS . 'confirm.tpl');
     $view->set('user', $userAttr);
     $view->set('url', APP_URL . '/activate.php?token=' . $userAttr['confirmation_code']);
     $mail->setTemplate($view->content());
     return $mail->send();
 }
Exemple #2
0
 public static function render2($cntrllr, $view, $data = [])
 {
     // Module::$module;
     self::$content = "";
     if (!isset($_GET['view'])) {
         self::$content = "app/views/" . $view . "-view.php";
     } else {
         if (View::isValid()) {
             self::$content = "app/views/" . $view . "/widget-default.php";
         } else {
             View::Error("<b>404 NOT FOUND</b> View <b>" . $view . "</b> folder  !!");
         }
     }
     if ($cntrllr->default_layout != "") {
         include "app/layouts/layout.php";
     }
 }
Exemple #3
0
	<head>
		<title><?php 
echo APPNAME;
?>
</title>
		<link href="/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
		<link href="/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
		<link href="/assets/css/style.css" rel="stylesheet" />
		<?php 
View::stylesheets();
?>
	</head>
	<body>
		<div class="container" id="main-content">
			<?php 
View::content();
?>
		</div>
		
		<footer class="text-center" id="footer">
			<hr />
			<small class="text-muted">Copyright &copy; <?php 
echo date('Y');
?>
. All Rights Reserved.</small>
		</footer>
		
		<script type="text/javascript" src="/assets/js/jquery-1.10.1.min.js"></script>
		<script type="text/javascript" src="/assets/bootstrap/js/bootstrap.min.js"></script>
		<?php 
View::javascripts();
<?php

/**
 * File: index.php
 * User: zacharydubois
 * Date: 2016-01-04
 * Time: 20:47
 * Project: Digital-Footprint-Profile
 */
namespace dfp;

// Create objects.
$config = new Config();
$view = new View($config);
$nav = new Nav($config);
// Create nav (Index is empty).
$nav->setActive('');
// Tell view the nav array.
$view->navArray($nav->navArray());
// Tell view what template and content.
$view->tpl('index');
$view->content(array('title' => 'Welcome | Digital Footprint Profile', 'sessionLink' => Utility::buildFullLink($config, true, 'session')));
echo $view->render();
function view_yield()
{
    return View::content();
}
/**
 * Envia la salida en buffer al navegador
 *
 */
function content()
{
    View::content();
}
<?php

/**
 * File: about.php
 * User: zacharydubois
 * Date: 2016-01-04
 * Time: 20:47
 * Project: Digital-Footprint-Profile
 */
namespace dfp;

// Create objects.
$config = new Config();
$view = new View($config);
$nav = new Nav($config);
// Create nav.
$nav->setActive('about');
// Tell view the nav array.
$view->navArray($nav->navArray());
// Tell view what template and content.
$view->tpl('about');
$view->content(array('title' => 'About | Digital Footprint Profile'));
echo $view->render();
Exemple #8
0
 function draw_main($content)
 {
     self::$content = $content;
     $attributes = array("id" => HTML_CONTENT, "class" => HTML_CONTENT_CLASS);
     $main_start = BuildHTML::start_element(self::$div, $attributes);
     $main_end = BuildHTML::end_element(self::$div);
     echo $main_start;
     echo self::$content;
     echo $main_end;
 }
Exemple #9
0
 /**
  * 
  * @param string $content
  * @author Nanhe Kumar <*****@*****.**>
  */
 public static function setContent($content)
 {
     self::$content = $content;
 }
Exemple #10
0
 function draw_main($content)
 {
     self::$content = $content;
     $attributes = array("id" => HTML_CONTENT, "class" => HTML_CONTENT_CLASS);
     $main_start = BuildHTML::start_element(self::$div, $attributes);
     $main_end = BuildHTML::end_element(self::$div);
     echo $main_start;
     //NB: we'll need to add a plugin handler for content types etc - eg: for images, texts etc...
     echo self::$content;
     echo $main_end;
 }
// Session
$session = new Session($config);
if ($session->getTMP('allowNext') !== true) {
    header('Location: ' . Utility::buildFullLink($config, false, 'session'));
} else {
    // View
    $nav = new Nav($config);
    $nav->setActive('list');
    $view = new View($config);
    $view->tpl('list');
    $view->navArray($nav->navArray(true));
    // Parse
    $parse = new Parse();
    // List array
    $list = array();
    $total = 0;
    $flagged = 0;
    foreach ($session->get('posts') as $post) {
        $content = preg_replace('/(\\n)/', ' ', $post['content']);
        $parse->parse($content);
        $score = $parse->score();
        $tags = $parse->tags();
        if ($score >= 3) {
            $list[] = array('url' => $post['url'], 'score' => $score, 'tags' => $tags, 'content' => $content);
            $flagged++;
        }
        $total++;
    }
    $view->content(array('title' => 'Your Posts | Digital Footprint Profile', 'posts' => $list, 'total' => $total, 'flagged' => $flagged));
    echo $view->render();
}
 public function editardoc()
 {
     View::content('editardoc');
 }
<?php

/**
 * File: terms.php
 * User: zacharydubois
 * Date: 2016-01-04
 * Time: 20:47
 * Project: Digital-Footprint-Profile
 */
namespace dfp;

// Create objects.
$config = new Config();
$view = new View($config);
$nav = new Nav($config);
// Create nav.
$nav->setActive('terms');
// Tell view the nav array.
$view->navArray($nav->navArray());
// Tell view what template and content.
$view->tpl('terms');
$view->content(array('title' => 'Terms | Digital Footprint Profile'));
echo $view->render();
<?php

/**
 * File: privacy.php
 * User: zacharydubois
 * Date: 2016-01-04
 * Time: 20:48
 * Project: Digital-Footprint-Profile
 */
namespace dfp;

// Create objects.
$config = new Config();
$view = new View($config);
$nav = new Nav($config);
// Create nav.
$nav->setActive('privacy');
// Tell view the nav array.
$view->navArray($nav->navArray());
// Tell view what template and content.
$view->tpl('privacy');
$view->content(array('title' => 'Privacy | Digital Footprint Profile'));
echo $view->render();
 */
namespace dfp;

// Create config
$config = new Config();
// Create session instance.
$session = new Session($config);
// Create Nav
$nav = new Nav($config);
$nav->setActive('session');
// Create view.
$view = new View($config);
$view->navArray($nav->navArray(true));
$view->tpl('session');
// Twitter
if ($session->getTMP('twitter_name') === false) {
    $twitter = new Twitter($config, $session);
    $twitterButton = array('url' => $twitter->authorizeURL(), 'text' => 'Login with Twitter', 'classes' => '');
} else {
    $twitterButton = array('url' => '#', 'text' => 'Twitter: @' . $session->getTMP('twitter_name'), 'classes' => 'disabled');
}
// Facebook
if ($session->getTMP('facebook_name') === false) {
    $facebook = new Facebook($config, $session);
    $facebookButton = array('url' => $facebook->authorizeURL(), 'text' => 'Login with Facebook', 'classes' => '');
} else {
    $facebookButton = array('url' => '#', 'text' => 'Facebook: ' . $session->getTMP('facebook_name'), 'classes' => 'disabled');
}
// Render and return
$view->content(array('title' => 'Start | Digital Footprint Profile', 'listURL' => Utility::buildFullLink($config, false, 'session/list'), 'loginButtons' => array($twitterButton, $facebookButton)));
echo $view->render();