コード例 #1
0
ファイル: helpers.php プロジェクト: pfefferle/IndieNews
function partial($template, $data, $debug = false)
{
    global $app;
    if ($debug) {
        $tpl = new Savant3(\Slim\Extras\Views\Savant::$savantOptions);
        echo '<pre>' . $tpl->fetch($template . '.php') . '</pre>';
        return '';
    }
    ob_start();
    $tpl = new Savant3(\Slim\Extras\Views\Savant::$savantOptions);
    foreach ($data as $k => $v) {
        $tpl->{$k} = $v;
    }
    $tpl->display($template . '.php');
    return ob_get_clean();
}
コード例 #2
0
 public static function render($filename, $data = NULL)
 {
     if (!$filename) {
         throw new Exception('A valid template filename is required for the template to be rendered.');
         exit;
     }
     $tpl = new Savant3();
     $tpl->date = date('Y');
     $tpl->version = Titanium::VERSION;
     //$tpl->memory_limit = ini_get('memory_limit');
     if (is_array($data)) {
         foreach ($data as $k => $v) {
             $tpl->{$k} = $v;
         }
     }
     return $tpl->fetch('templates/' . $filename);
 }
コード例 #3
0
$id = $_SESSION['user_id'];
$email = $_SESSION['email'];
// set search path for templates
$tpl->addPath('template', '../template');
// Create a title.
$template_path = "../template/";
$resource_path = "../";
$title = "Site Status Update";
$meta_description = "Welcome to CoinCod - a unique auction system built to draw everyone closer to their dream products.";
$admin_link = "<div id='admin_menu'>\n\t\t\t\t<a href='../user_profile/?id={$id}'>Profile</a>&ndash;\n        \t\t<a href='../admin_site/product_form.php'>Add Product </a>&ndash;\n\t\t\t\t<a href='../admin_site/user_list.php'>User Listing</a>&ndash;\n\t\t\t\t<a href='../admin_site/sitestatus_updateform.php'>Site Status</a>\n\t\t\t</div></br>";
$status_update = '<form action="status_updatefunc.php" enctype="multipart/form-data" name="myForm" id="myForm" method="post">
			<td>
				<select id="status" name="status" size="1">
					<option value="Well as usual running like charm.">Well as usual running like charm.</option>
					<option value="Website Maintenance! Temporary Down!">Website Maintenance! Temporary Down!</option>
				</select>
			</td>
			<input type="submit" name="button" class="form_button" value="Update" />
		</form>';
$contentContainer = array(array("title" => $title, "content" => $id == 1 ? $admin_link . $status_update : $status_update, "bottom_image" => ''));
// Assign values to the Savant instance.
$tpl->template_path = $template_path;
$tpl->resource_path = $resource_path;
$tpl->title = $title;
$tpl->meta_description = $meta_description;
$tpl->content_container = $contentContainer;
// Display a template using the assigned values.
$tpl->login = $tpl->fetch($template_path . 'login.tpl.php');
$tpl->header = $tpl->fetch($template_path . 'header.tpl.php');
$tpl->footer = $tpl->fetch($template_path . 'footer.tpl.php');
$tpl->display($template_path . 'main.tpl.php');
コード例 #4
0
ファイル: index.php プロジェクト: nvcWilson/Savant-CoinCod
<?php

// Load the Savant3 class file and create an instance.
require_once '../Savant3.php';
// initialize template engine
$tpl = new Savant3();
// set search path for templates
$tpl->addPath('template', '../template');
// Create a title.
$template_path = "../template/";
$resource_path = "../";
$title = "Buy Tokens";
$meta_description = "Welcome to CoinCod - a unique auction system built to draw everyone closer to their dream products.";
$contentContainer = array(array("title" => $title, "content" => '<div class="buy_tokens">Choose your package by clicking on the button. Please take note that your payment is processed using Paypal. You will also receive a notification e-mail from CoinCod on this transaction.
			</div>' . $tpl->fetch($template_path . 'buy_token.tpl.php'), "bottom_image" => '<img class="bottom" src="../template/template_image/bottom/buy_tokens.png" alt="tokens shopping">'));
// Assign values to the Savant instance.
$tpl->template_path = $template_path;
$tpl->resource_path = $resource_path;
$tpl->title = $title;
$tpl->meta_description = $meta_description;
$tpl->content_container = $contentContainer;
// Display a template using the assigned values.
$tpl->login = $tpl->fetch($template_path . 'login.tpl.php');
$tpl->header = $tpl->fetch($template_path . 'header.tpl.php');
$tpl->footer = $tpl->fetch($template_path . 'footer.tpl.php');
$tpl->display($template_path . 'main.tpl.php');
コード例 #5
0
 /**
  * @inheritdoc
  */
 public function fetch($template)
 {
     return $this->savant->fetch($template . self::$TEMPLATE_EXTENSION);
 }
コード例 #6
0
<?php

// Load the Savant3 class file and create an instance.
require_once '../Savant3.php';
// initialize template engine
$tpl = new Savant3();
// set search path for templates
$tpl->addPath('template', '../template');
// Create a title.
$template_path = "../template/";
$resource_path = "../";
$title = "Registration";
$meta_description = "Welcome to CoinCod - a unique auction system built to draw everyone closer to their dream products.";
$contentContainer = array(array("title" => $title, "content" => $tpl->regact = $tpl->fetch($template_path . 'register_act.tpl.php'), "bottom_image" => '<div class="location"><img src="../template/template_image/bottom/location.png" alt="pointer"></div>'));
// Assign values to the Savant instance.
$tpl->template_path = $template_path;
$tpl->resource_path = $resource_path;
$tpl->title = $title;
$tpl->meta_description = $meta_description;
$tpl->content_container = $contentContainer;
// Display a template using the assigned values.
$tpl->login = $tpl->fetch($template_path . 'login.tpl.php');
$tpl->header = $tpl->fetch($template_path . 'header.tpl.php');
$tpl->footer = $tpl->fetch($template_path . 'footer.tpl.php');
$tpl->display($template_path . 'main.tpl.php');
コード例 #7
0
ファイル: index.php プロジェクト: nvcWilson/Savant-CoinCod
$contentContainer = array(array("title" => $title, "content" => '<section class="answer">
		<ol>
        
		<li><a name="Question1">What is CoinCod?</a></li>
        Coincod is a revolutionary auction concept. The basic idea is to offer brand new products at very attractive prices. Or we rather term it as "UnAffordable To Affordable".
        
		<li><a name="Question2">How does CoinCod work?</a></li>
        Every day Coincod sells new branded products at incredibly low prices in auctions. With each placed bid, the price of the auctioned item decreases or increases by 1 cent ($0.01). Once an auction has started and you bid, we reset the countdown back to its limit time. If no-one else bids before the clock has reached countdown, you win the auction item at a bargain price!
        
		<li><a name="Question3">How can I start using CoinCod?</a></li>
        You need to register as a user at coincod.com. It will take you 1 minute. After a successful completion you can buy bids on our site and participate in any auctions you wish. 
        
		<li><a name="Question4">How do I participate in the auction?</a></li>
        In order to participate you need to submit a bid in an ongoing auction. You can either place a bid by sending a text message from your mobile phone or by bidding through a Coincod online account. Creating a Coincod account is easy, simply click on "sign up" and follow the instructions. Once registered, you can upload bids on your account through all channels (e.g. e-banking) that are available.
        
		<li><a name="Question5">There is an auction that ended today and now I see it re-listed. Why?</a></li>
        True, there is a possibility that it might happen. This is when the auction winner turns out to be fraudulent – for example someone who has registered multiple accounts in our system without entering any personal data and automatically received free bids for each username created. All bids by such fraud users will be considered void and the auction will be re-listed from the same point when it ended so that real users can have a possibility to win it. Our support team is doing its best on a daily basis to filter such cases.

		</ol>
		</section>  <!--end div faq-->', "bottom_image" => '<img class="bottom" src="../../template/template_image/bottom/faq.png" alt="questions">'));
// Assign values to the Savant instance.
$tpl->template_path = $template_path;
$tpl->resource_path = $resource_path;
$tpl->title = $title;
$tpl->meta_description = $meta_description;
$tpl->content_container = $contentContainer;
// Display a template using the assigned values.
$tpl->login = $tpl->fetch('login.tpl.php');
$tpl->header = $tpl->fetch('header.tpl.php');
$tpl->footer = $tpl->fetch('footer.tpl.php');
$tpl->display('main.tpl.php');
コード例 #8
0
<?php

// Load the Savant3 class file and create an instance.
require_once '../Savant3.php';
session_start();
// initialize template engine
$tpl = new Savant3();
$id = $_SESSION['user_id'];
$email = $_SESSION['email'];
// set search path for templates
$tpl->addPath('template', '../template');
// Create a title.
$template_path = "../template/";
$resource_path = "../";
$title = "Product Information";
$meta_description = "Welcome to CoinCod - a unique auction system built to draw everyone closer to their dream products.";
$admin_link = "<div id='admin_menu'>\n\t\t\t\t<a href='../user_profile/?id={$id}'>Profile</a>&ndash;\n        \t\t<a href='../admin_site/product_form.php'>Add Product </a>&ndash;\n\t\t\t\t<a href='../admin_site/user_list.php'>User Listing</a>&ndash;\n\t\t\t\t<a href='../admin_site/sitestatus_updateform.php'>Site Status</a>\n\t\t\t</div></br>";
$product_form = $tpl->fetch($template_path . 'product_form.tpl.php');
$contentContainer = array(array("title" => $title, "content" => $id == 1 ? $admin_link . $product_form : $product_form, "bottom_image" => ''));
// Assign values to the Savant instance.
$tpl->template_path = $template_path;
$tpl->resource_path = $resource_path;
$tpl->title = $title;
$tpl->meta_description = $meta_description;
$tpl->content_container = $contentContainer;
// Display a template using the assigned values.
$tpl->login = $tpl->fetch($template_path . 'login.tpl.php');
$tpl->header = $tpl->fetch($template_path . 'header.tpl.php');
$tpl->footer = $tpl->fetch($template_path . 'footer.tpl.php');
$tpl->display($template_path . 'main.tpl.php');
コード例 #9
0
$id = $_SESSION['user_id'];
$email = $_SESSION['email'];
// set search path for templates
$tpl->addPath('template', '../template');
// Create a title.
$template_path = "../template/";
$resource_path = "../";
$title = "User Listing";
$meta_description = "Welcome to CoinCod - a unique auction system built to draw everyone closer to their dream products.";
$admin_link = "<div id='admin_menu'>\n\t\t\t\t<a href='../user_profile/?id={$id}'>Profile</a>&ndash;\n        \t\t<a href='../admin_site/product_form.php'>Add Product </a>&ndash;\n\t\t\t\t<a href='../admin_site/user_list.php'>User Listing</a>&ndash;\n\t\t\t\t<a href='../admin_site/sitestatus_updateform.php'>Site Status</a>\n\t\t\t</div></br>";
$status_update = '<div class="title_bold"><table border="0">
						  <tr width="100">
						  <td width="100">User Id</td>
						  <td width="100">Username</td>
						  <td width="150">Email</td>
						  <td width="100">Date Register</td>
						  <td width="100">Token</td>
						  </tr>
						  </table></div>' . $tpl->fetch($template_path . 'userlist.tpl.php');
$contentContainer = array(array("title" => $title, "content" => $id == 1 ? $admin_link . $status_update : $status_update, "bottom_image" => ''));
// Assign values to the Savant instance.
$tpl->template_path = $template_path;
$tpl->resource_path = $resource_path;
$tpl->title = $title;
$tpl->meta_description = $meta_description;
$tpl->content_container = $contentContainer;
// Display a template using the assigned values.
$tpl->login = $tpl->fetch($template_path . 'login.tpl.php');
$tpl->header = $tpl->fetch($template_path . 'header.tpl.php');
$tpl->footer = $tpl->fetch($template_path . 'footer.tpl.php');
$tpl->display($template_path . 'main.tpl.php');
コード例 #10
0
ファイル: index.php プロジェクト: nvcVincent/Savant-CoinCod
<?php

// Load the Savant3 class file and create an instance.
require_once '../Savant3.php';
session_start();
$id = $_SESSION['user_id'];
// initialize template engine
$tpl = new Savant3();
// set search path for templates
$tpl->addPath('template', '../template');
// Create a title.
$template_path = "../template/";
$resource_path = "../";
$title = "User Profile Information";
$meta_description = "Welcome to CoinCod - a unique auction system built to draw everyone closer to their dream products.";
$admin_link = "<div id='admin_menu'>\n\t\t\t\t<a href='../user_profile/?id={$id}'>Profile</a>&ndash;\n        \t\t<a href='../admin_site/product_form.php'>Add Product </a>&ndash;\n\t\t\t\t<a href='../admin_site/user_list.php'>User Listing</a>&ndash;\n\t\t\t\t<a href='../admin_site/sitestatus_updateform.php'>Site Status</a>\n\t\t\t</div></br>";
$contentContainer = array(array("title" => $title, "content" => $id == 1 ? $admin_link : '', "bottom_image" => ''));
// Assign values to the Savant instance.
$tpl->template_path = $template_path;
$tpl->resource_path = $resource_path;
$tpl->title = $title;
$tpl->meta_description = $meta_description;
$tpl->content_container = $contentContainer;
// Display a template using the assigned values.
$tpl->login = $tpl->fetch($template_path . 'login.tpl.php');
$tpl->header = $tpl->fetch($template_path . 'header.tpl.php');
$tpl->footer = $tpl->fetch($template_path . 'footer.tpl.php');
$tpl->user_profile = $tpl->fetch($template_path . 'user_profile.tpl.php');
$tpl->display($template_path . 'main.tpl.php');
コード例 #11
0
ファイル: index.php プロジェクト: sdgdsffdsfff/Tracer-2
<?php

/*!
 * Tracer is an XDebug trace output analyzer. It takes the trace output from 
 * XDebug and makes it pretty and easy to read allowing the developer to quickly
 * identify bottlenecks and areas of optimization.
 * 
 * @author Mark Litchfield <*****@*****.**>
 * @version 0.1-alpha
 */
require_once 'tracer.config.php';
$tpl = new Savant3();
$tpl->file_list = new TraceFileList($_ENV['xdebug']['trace_output_dir']);
$fields = array('file' => FILTER_SANITIZE_STRING, 'memory_alert' => FILTER_VALIDATE_FLOAT, 'time_alert' => FILTER_VALIDATE_FLOAT);
$post = filter_input_array(INPUT_POST, $fields);
if (isset($post['file'])) {
    $tpl->post = $post;
    $tpl->output = $tpl->fetch('/template/output.html.php');
}
$tpl->trace_form = $tpl->fetch('/template/trace-form.html.php');
$tpl->display('template/base.html.php');
コード例 #12
0
ファイル: index.php プロジェクト: anishsheela/php-sample-apps
                            } else {
                                display_item();
                            }
                        }
                    }
                }
            } else {
                if ($page == "getdetails") {
                    require_once "./include/getdetails.inc";
                } else {
                    if (isset($_POST['Bill'])) {
                        bill();
                    } else {
                        if (isset($_GET['view'])) {
                            if ($_GET['view'] != NULL) {
                                display_bill($_GET['view']);
                            } else {
                                global $tpl;
                                $tpl->title = "Bill Details";
                                $tpl->content = $tpl->fetch("./template/billno.php.tpl");
                                $tpl->display("./template/index.php.tpl");
                            }
                        } else {
                            generate_bill();
                        }
                    }
                }
            }
        }
    }
}
コード例 #13
0
ファイル: index.php プロジェクト: nvcWilson/Savant-CoinCod
<?php

// Load the Savant3 class file and create an instance.
require_once '../Savant3.php';
// initialize template engine
$tpl = new Savant3();
// set search path for templates
$tpl->addPath('template', '../template');
// Create a title.
$template_path = "../template/";
$resource_path = "../";
$title = "Login";
$meta_description = "Welcome to CoinCod - a unique auction system built to draw everyone closer to their dream products.";
$contentContainer = array(array("title" => $title, "content" => $tpl->fetch($template_path . 'loginform.tpl.php'), "bottom_image" => ''));
// Assign values to the Savant instance.
$tpl->template_path = $template_path;
$tpl->resource_path = $resource_path;
$tpl->title = $title;
$tpl->meta_description = $meta_description;
$tpl->content_container = $contentContainer;
// Display a template using the assigned values.
$tpl->login = $tpl->fetch($template_path . 'login.tpl.php');
$tpl->header = $tpl->fetch($template_path . 'header.tpl.php');
$tpl->footer = $tpl->fetch($template_path . 'footer.tpl.php');
$tpl->display($template_path . 'main.tpl.php');
コード例 #14
0
<?php

// Load the Savant3 class file and create an instance.
require_once '../Savant3.php';
// initialize template engine
$tpl = new Savant3();
// set search path for templates
$tpl->addPath('template', '../template');
// Create a title.
$template_path = "../template/";
$resource_path = "../";
$title = "CoinCod";
$meta_description = "Welcome to CoinCod - a unique auction system built to draw everyone closer to their dream products.";
$contentContainer = array(array("title" => "", "content" => "", "bottom_image" => ""));
// Assign values to the Savant instance.
$tpl->template_path = $template_path;
$tpl->resource_path = $resource_path;
$tpl->title = $title;
$tpl->meta_description = $meta_description;
$tpl->content_container = $contentContainer;
// Display a template using the assigned values.
$tpl->login = $tpl->fetch($template_path . 'login.tpl.php');
$tpl->header = $tpl->fetch($template_path . 'header.tpl.php');
$tpl->footer = $tpl->fetch($template_path . 'footer.tpl.php');
$tpl->product_desc = $tpl->fetch($template_path . 'product_description.tpl.php');
$tpl->display($template_path . 'main.tpl.php');
コード例 #15
0
ファイル: index.php プロジェクト: nvcWilson/Savant-CoinCod
<?php

// Load the Savant3 class file and create an instance.
require_once '../Savant3.php';
// initialize template engine
$tpl = new Savant3();
// set search path for templates
$tpl->addPath('template', '../template');
// Create a title.
$template_path = "../template/";
$resource_path = "../";
$title = "Site Status";
$meta_description = "Welcome to CoinCod - a unique auction system built to draw everyone closer to their dream products.";
$contentContainer = array(array("title" => $title, "content" => $tpl->fetch($template_path . 'status.tpl.php'), "bottom_image" => '<img class="bottom" src="../template/template_image/bottom/site_status.png" alt="communicating">'));
// Assign values to the Savant instance.
$tpl->template_path = $template_path;
$tpl->resource_path = $resource_path;
$tpl->title = $title;
$tpl->meta_description = $meta_description;
$tpl->content_container = $contentContainer;
// Display a template using the assigned values.
$tpl->login = $tpl->fetch($template_path . 'login.tpl.php');
$tpl->header = $tpl->fetch($template_path . 'header.tpl.php');
$tpl->footer = $tpl->fetch($template_path . 'footer.tpl.php');
$tpl->display($template_path . 'main.tpl.php');
コード例 #16
0
ファイル: index.php プロジェクト: nvcWilson/Savant-CoinCod
<?php

// Load the Savant3 class file and create an instance.
require_once '../Savant3.php';
// initialize template engine
$tpl = new Savant3();
// set search path for templates
$tpl->addPath('template', '../template');
// Create a title.
$template_path = "../template/";
$resource_path = "../";
$title = "Forgot Password";
$meta_description = "Welcome to CoinCod - a unique auction system built to draw everyone closer to their dream products.";
$contentContainer = array(array("title" => "Identify Your Account", "content" => $tpl->fetch($template_path . 'fpass.tpl.php'), "bottom_image" => ''));
// Assign values to the Savant instance.
$tpl->template_path = $template_path;
$tpl->resource_path = $resource_path;
$tpl->title = $title;
$tpl->meta_description = $meta_description;
$tpl->content_container = $contentContainer;
// Display a template using the assigned values.
$tpl->login = $tpl->fetch($template_path . 'login.tpl.php');
$tpl->header = $tpl->fetch($template_path . 'header.tpl.php');
$tpl->footer = $tpl->fetch($template_path . 'footer.tpl.php');
$tpl->display($template_path . 'main.tpl.php');