コード例 #1
0
ファイル: index.php プロジェクト: BackupTheBerlios/molecms
            $action = $params['action'] . '/' . $params['id'] . '.html';
        } else {
            $action = $params['action'] . '.html';
        }
        $url = '/' . $module . $action;
    }
    return $url;
}
// end func url
//$content["MENU_ROWS"] = toc_toplevel();
$content["MENU_ROWS"] = $topMenu->get('rows');
include_once 'modules/news/mod_op_overview.php';
$news = new newsOverview();
$news->setLimit(5);
$content['RIGHTNAV'] = $news->get();
$tpl->setVariable("LC_AKTUELLES", $lang->translate('Aktuelles'));
$nav = new mms_nav($cfg['path']['template'] . "/" . $_tplset . '/leftnav.tpl.html');
$nav->setTitle('Navigation');
$nav->setImage('pic/tastatur.jpg');
//$nav->setMenu(toc_sublevel(2));
switch ($_GET['module']) {
    case 'company':
        $_module = 'company';
        break;
    case 'product':
        $_module = 'product';
        break;
    case 'news':
        $_module = 'news';
        break;
    case 'compound':
コード例 #2
0
ファイル: rubbertv.php プロジェクト: BackupTheBerlios/molecms
/* 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");
    $tpl2->setvariable("FORMAT", $row->format);
コード例 #3
0
ファイル: search.php プロジェクト: BackupTheBerlios/molecms
// +----------------------------------------------------------------------+
//
// $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'];
        //falls nichts eingetragen wurde
        if (empty($suchworte)) {
            return false;
        }
        //HTML-Dekodierung,
        $suchworte = trim(urldecode($suchworte));
        //mehrere Leerzeichen durch eines ersetzen
        $suchworte = ereg_replace("([  ]+)", " ", $suchworte);
        //Suchworte in Array extrahieren
        //Fall 1: Nur ein Suchwort, d.h. keine Leerzeichen