Example #1
1
 function generate($template, $data = null)
 {
     $this->load_library('rain.tpl.class');
     raintpl::$tpl_dir = ROOT . "/application/templates/email/";
     // template directory
     $tpl = new raintpl();
     //include Rain TPL
     if (isset($data)) {
         $data = Utils::decode($data);
         $tpl->assign($data);
     }
     if (!get_config('email.debug_templates')) {
         $this->message = @$tpl->draw($template, true);
     } else {
         $this->message = $tpl->draw($template, true);
     }
     // draw the template
 }
Example #2
0
<?php

if ($user->data['user_id'] == ANONYMOUS) {
    error_box("Erreur", "Vous devez être connecté pour accèder à cette page.", "index.php");
    exit;
}
$tpl = new raintpl();
if (!empty($user->data['partner']) && !empty($user->data['tokken'])) {
    $tpl->assign("link", "https://steamcommunity.com/tradeoffer/new/?partner=" . $user->data['partner'] . "&token=" . $user->data['tokken'] . "");
}
draw($tpl->draw("page_trade", $return_string = true), "Mise à jour");
Example #3
0
<?php

$tpl = new raintpl();
$tpl->assign('steamid', str_replace("STEAM_0", "STEAM_1", $user->data['steamid']));
draw($tpl->draw("page_roleplay", $return_string = true), "roleplay", array("angular.route.min.js", "heatmap.min.js", "jquery.maphilight.js", "angular.dnd.min.js"));
Example #4
0
<?php

$tpl = new raintpl();
$tpl->assign('steamid', str_replace("STEAM_0", "STEAM_1", $user->data['steamid']));
$tpl->assign('isAdmin', group_memberships(19, $user->data['user_id'], true) || group_memberships(18, $user->data['user_id'], true) ? 1 : 0);
draw($tpl->draw("page_roleplay", $return_string = true), "roleplay", array("angular.route.min.js", "heatmap.min.js", "jquery.maphilight.js", "angular.dnd.min.js"));
Example #5
0
    print "blabla";
    print_r($_GET);
    die;
}
$content = file_get_contents($_GET['page']);
$content = str_replace("{{{year}}}", date("Y"), $content);
$content = str_replace("{{{fullname}}}", "Mémîks", $content);
$content = str_replace("\n", "<br>", $content);
raintpl::$tpl_dir = './tpl/';
// template directory
raintpl::$cache_dir = "./cache/";
// cache directory
raintpl::$base_url = url();
// base URL of blog
raintpl::configure('path_replace', false);
raintpl::configure('debug', true);
$tpl = new raintpl();
//include Rain TPL
$tpl->assign("title", $_GET['page']);
$tpl->assign("content", $content);
$tpl->assign("isLogged", Session::isLogged());
if (Session::isLogged()) {
    $tpl->assign("username", $_SESSION['username']);
    $tpl->assign("logpage", "./log.php?logout");
    $tpl->assign("logname", "Logout");
} else {
    $tpl->assign("logpage", "./log.php");
    $tpl->assign("logname", "Login");
}
$tpl->draw("display");
// draw the template
Example #6
0
    define('MOBILEDEV', true);
} else {
    define('MOBILEDEV', false);
}
/*define('MOBILEDEV', false);*/
$AJAX = get_AJAX($mob);
//echo $_SESSION['mobile_enable'];
require_once ENGINE_DIR . '/classes/template/inc/rain.tpl.class.php';
//include Rain TPL
$tpl = new raintpl();
raintpl::$tpl_dir = ENGINE_DIR . '/template/AdminLTE-2.3.0/';
raintpl::$cache_dir = ENGINE_DIR . '/tmp/';
raintpl::configure('tpl_ext', 'html');
raintpl::configure('base_url', $CONFIG['base_url']);
raintpl::configure('path_replace', false);
$tpl->assign("THEMEDIR", "/root/template");
$rd = array(0 => "progress-success", 1 => "progress-warning", 2 => "progress-danger", 3 => "", 4 => "progress-success", 5 => "progress-success");
$tpl->assign("RANDOMBAR", $rd[mt_rand(0, 5)]);
$tpl->assign("alert", "NAN");
//if(MOBILEDEV) raintpl::$tpl_dir = ROOT_DIR.'/root/template/mobile/';
//
//if($_GET['ajax']==2) raintpl::$tpl_dir = ROOT_DIR.'/root/template/ajax/';
if (AJAXTPL) {
    raintpl::$tpl_dir = ROOT_DIR . '/root/template/ajax/';
}
//if($_GET['ajax']==1) raintpl::$tpl_dir = ROOT_DIR.'/root/template/frame/';
$HEAD = "\n\t<script type=\"text/javascript\">\n\tfunction goBack()\n\t  {\n\t  window.history.back()\n\t  }\n\t</script>";
if (LOGINED == "1") {
    require_once ENGINE_DIR . '/classes/net.ipcalc.php';
    if (isset($_POST['s'])) {
        $section = $_POST['s'];
Example #7
0
<?php

include_once 'includes/homematic.php';
include_once 'includes/rain.tpl.class.php';
$home = new HomeMaticInstance();
$tempset["regular"] = new tempsetInstance();
$tempset["regular"]->addTemp("07:00", 19, $tempset["regular"]->presetWorkday);
$tempset["regular"]->addTemp("09:00", 17, $tempset["regular"]->presetWorkday);
$tempset["regular"]->addTemp("18:00", 19, $tempset["regular"]->presetWorkday);
$tempset["regular"]->addTemp("23:00", 17, $tempset["regular"]->presetWorkday);
$tempset["regular"]->addTemp("08:00", 20, $tempset["regular"]->presetWeekend);
$tempset["regular"]->addTemp("11:00", 17, $tempset["regular"]->presetWorkday);
$tempset["nothome"] = new tempsetInstance();
$tempset["nothome"]->addTemp("01:00", 17);
raintpl::$tpl_dir = "tpl/";
raintpl::$cache_dir = "/tmp/";
raintpl::$base_url = "/";
raintpl::$path_replace = true;
$tpl = new raintpl();
$tpl->assign("deviceList", $home->getAllDevices(true));
$tpl->draw('index');
Example #8
0
<?php

include_once 'includes/sio-call-mgmt.php';
include_once 'includes/rain.tpl.class.php';
include_once 'config/config.inc.php';
$sio = new sioCallMgmt();
raintpl::$tpl_dir = "tpl/";
raintpl::$cache_dir = "/tmp/";
raintpl::$base_url = "/sio-call-mgmt/";
raintpl::$path_replace = true;
$tpl = new raintpl();
session_start();
if (!empty($_SESSION["isAuthenticated"]) && $_SESSION["isAuthenticated"]) {
    $tpl->assign("authenticated", true);
    $sio->setUserId($_SESSION["userId"]);
    $tpl->assign("userDetails", $sio->getUserDetails());
} else {
    $tpl->assign("authenticated", false);
}
#$tpl->assign("settings",$sio->getSettings());
$tpl->draw('index');
Example #9
0
function generate_page($url, $title, $content)
{
    global $CSS_STYLE;
    raintpl::$tpl_dir = './tpl/';
    // template directory
    raintpl::$cache_dir = "./cache/";
    // cache directory
    raintpl::$base_url = url();
    // base URL of blog
    raintpl::configure('path_replace', false);
    raintpl::configure('debug', true);
    $tpl = new raintpl();
    //include Rain TPL
    $tpl->assign("url", $url);
    $tpl->assign("tinyurl", md5($url));
    $tpl->assign("title", $title);
    $tpl->assign("isLogged", Session::isLogged());
    if (Session::isLogged()) {
        $tpl->assign("username", $_SESSION['username']);
        $tpl->assign("logpage", "./log.php?logout");
        $tpl->assign("logname", "Logout");
    } else {
        $tpl->assign("logpage", "./log.php");
        $tpl->assign("logname", "Login");
    }
    $tpl->assign("content", $content);
    $tpl->assign("version", VERSION);
    $tpl->draw("article");
    // draw the template
}