예제 #1
0
        $_module = 'rubbergame';
        break;
    case 'infolinks':
        $_module = 'infolinks';
        break;
    case 'jobs':
        $_module = 'jobs';
        break;
    default:
        // $_module='notfound';
        $_module = 'news';
}
include 'modules/' . $_module . '/' . $_module . $cfg['suffix']['code'];
// append
$tpl->setVariable("LEFTNAV", $nav->get());
$tpl->setvariable($content);
$tpl->show();
$cache->endPrint(+1000);
if (DEBUG) {
    echo 'cache miss<br>';
}
/*}
else {
    $cache->printContent();
    if(DEBUG){
        echo 'cache hit<br>';
    }
}     */
if (BENCHMARK) {
    $timer->stop();
    echo '<small>php created this page in ' . $timer->timeElapsed() . ' seconds</small>';
예제 #2
0
/* 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);
    $tpl2->setvariable("LC_PLAYERS", $lang->translate('mediaplayer'));
예제 #3
0
            $zaehler = 0;
            while (list($key, $aktuellesWort) = each($suchArray)) {
                $zaehler++;
                if (!empty($aktuellesWort)) {
                    if ($zaehler != $anzahlSuchworte) {
                        $abfrage .= "((LOWER(ueberschrift) LIKE '%{$aktuellesWort}%') OR\n\t\t\t\t\t (LOWER(abstract) LIKE '%{$aktuellesWort}%') OR\n\t\t\t\t\t (LOWER(schlagworte) LIKE '%{$aktuellesWort}%') OR\n\t\t\t\t\t (LOWER(text) LIKE '%{$aktuellesWort}%'))" . $verknuepfung;
                    } else {
                        $abfrage .= "((LOWER(ueberschrift) LIKE '%{$aktuellesWort}%') OR\n\t\t\t\t\t (LOWER(abstract) LIKE '%{$aktuellesWort}%') OR\n\t\t\t\t\t (LOWER(schlagworte) LIKE '%{$aktuellesWort}%') OR\n\t\t\t\t\t (LOWER(text) LIKE '%{$aktuellesWort}%'))";
                    }
                }
            }
        }
        return $abfrage;
    }
    global $abfrage;
    global $verknuepfungsmode;
    global $suchwort;
    global $anzahl_datensaetze;
    global $weiter_link;
    $abfrage = baueSuchabfrage($wort1, $verknuepfung);
    $aktuelle_abfrage = $abfrage . "ORDER BY releasedate DESC";
    $db_res = $db_con->query($aktuelle_abfrage);
    $tpl2->setCurrentBlock("ZEILE");
    $tpl2->setvariable("NUMRESULTS", "Anzahl Datensätze: " . $db_res->numRows());
    $tpl2->setVariable("CATEGORY_COLOR", "red");
    while ($row = $db_res->fetchrow(DB_FETCHMODE_OBJECT)) {
        $tpl2->setvariable(array("UEBERSCHRIFT" => '<a class="red" href="' . url(array('module' => 'news', 'action' => 'article', 'id' => $row->id_artikel)) . '">' . $row->ueberschrift . '</a>', "ABSTRACT" => $row->abstract == "0" ? "" : $row->abstract . "<br>", "TEXT" => substr($row->text, 0, 150) . " ...<a class=\"red\" href=\"" . url(array('module' => 'news', 'action' => 'article', 'id' => $row->id_artikel)) . "\">" . $lang->translate('more') . "</a>", "RELEASEDATE" => $row->releasedate));
        $tpl2->parseCurrentBlock();
    }
}
$content["CONTENT"] = $tpl2->get();