Example #1
0
<?php

/* vim: set expandtab tabstop=4 shiftwidth=4: */
//
// +----------------------------------------------------------------------+
// | MoleCMS                                                              |
// +----------------------------------------------------------------------+
// | Copyright (c) 2000-2002 MoleManMedia Tim Franz                       |
// +----------------------------------------------------------------------+
// | Authors: Tim Franz <*****@*****.**>                               |
// +----------------------------------------------------------------------+
//
// $Id: rubbertv.php,v 1.1 2002/08/07 09:25:45 moleman Exp $
define('TPL_RUBBERTV', 'modules/' . $module . '/rubbertv.tpl.html');
$tpl2 = new IntegratedTemplateExtension();
$tpl2->loadTemplateFile(TPL_RUBBERTV);
$tpl2->setVariable("CATEGORY_COLOR", "turquoise");
$tpl2->setvariable("HEADING", $lang->translate('rubbertv'));
$table['video'] = $cfg['table']['video'];
$table['video_details'] = $cfg['table']['video_details'];
$query = "select * from {$table['video']},{$table['video_details']}\nwhere {$table['video']}.id={$table['video_details']}.id_video order by id_video";
$db_res = $db_con->Query($query);
$oldid = 0;
while ($row = $db_res->fetchrow(DB_FETCHMODE_OBJECT)) {
    if ($row->id_video != $oldid) {
        $tpl2->parse("VIDEO");
        $oldid = $row->id_video;
    }
    $tpl2->setvariable("NAME", $row->name);
    $tpl2->setvariable("DESCRIPTION", $row->beschreibung);
    $tpl2->setcurrentblock("DETAILS");
 /** initializes the template class
  */
 function initTemplate()
 {
     include_once 'HTML/Template/ITX.php';
     $tpl = new IntegratedTemplateExtension($this->cfg['path']['template']);
     $tpl->loadTemplateFile($_tplset . '/' . $this->cfg['template']['base']);
     $tpl->setCallbackFunction('tr', 'tpl_translate');
     $tpl->performCallback();
 }
Example #3
0
define("LC_LANG", HTTP::negotiateLanguage($langSupported, 'en'));
$langSelected = 'rc_' . LC_LANG;
include_once $cfg['path']['i18n'] . LC_LANG . ".php";
$lang = new $langSelected();
$heute = date("Ymd", time());
// current date
/*
 * Template
 */
function tpl_translate($args)
{
    global $lang;
    return $lang->translate($args[0]);
}
$_tplset = 'screen';
$tpl = new IntegratedTemplateExtension($cfg['path']['template']);
$tpl->loadTemplateFile($_tplset . '/' . $cfg['template']['base']);
$tpl->setCallbackFunction('tr', 'tpl_translate');
$tpl->performCallback();
/*
 * Opens database connection
 */
$db_con = DB::connect($cfg['database']['dsn']);
//$db_con->setErrorHandling(PEAR_ERROR_CALLBACK, "DBcatchError");
if (DB::isError($db_con)) {
    die($db_con->getMessage());
}
$db_con->setFetchMode(DB_FETCHMODE_OBJECT);
$menu = new mms_template_menu();
//$th=new treehelper;
if (BANNER_ADS) {
Example #4
0
<?php

/* vim: set expandtab tabstop=4 shiftwidth=4: */
//
// +----------------------------------------------------------------------+
// | MoleCMS                                                              |
// +----------------------------------------------------------------------+
// | Copyright (c) 2000-2002 MoleManMedia Tim Franz                       |
// +----------------------------------------------------------------------+
// | Authors: Tim Franz <*****@*****.**>                               |
// +----------------------------------------------------------------------+
//
// $Id: search.php,v 1.1 2002/08/07 09:25:42 moleman Exp $
require_once 'HTML_OOH_Form/form.php';
define('TPL_SEARCH', 'modules/' . $module . "/search.tpl.html");
$tpl2 = new IntegratedTemplateExtension();
$tpl2->loadTemplateFile(TPL_SEARCH);
$tbl_artikel = $table["artikel"];
$frm = new form("", "GET", url(array('module' => 'news', 'action' => 'search')), "");
$frm->addElement(array('type' => "text", 'name' => "wort1"));
$frm->addElement(array('type' => "hidden", 'name' => "module", 'value' => 'news'));
$frm->addElement(array('type' => "hidden", 'name' => 'action', 'value' => 'search'));
$frm->addElement(array("type" => "radio", "name" => "verknuepfung", "elname" => "verknuepfung_and", 'checked' => true, "value" => "AND"));
$frm->addElement(array("type" => "radio", "name" => "verknuepfung", "elname" => "verknuepfung_or", "value" => "OR"));
$frm->addElement(array("type" => "submit", "name" => "go", "value" => "suchen"));
$tpl2->setVariable(array("FORMULARSTART" => $frm->getStart() . $frm->getElement('module') . $frm->getElement('action'), "SUCHFELD" => $frm->getElement("wort1"), "SUCHE_UND" => $frm->getElement("verknuepfung", "verknuepfung_and") . "and", "SUCHE_ODER" => $frm->getElement("verknuepfung", "verknuepfung_or") . "or", "GO" => $frm->getElement("go"), "FORMULARENDE" => $frm->getFinish()));
if ($go) {
    function baueSuchabfrage($suchworte = "", $verknuepfung = "AND")
    {
        global $cfg;
        $tbl_artikel = $cfg['table']['news'];