function renderAsString($menuNodeList, $level = 0)
 {
     $siteHelper = $this->getSiteHelper();
     $absolutePath = $siteHelper->getAbsolutePath();
     if (!class_exists('patTemplate')) {
         if (function_exists('jimport')) {
             jimport('pattemplate.patTemplate');
         } else {
             require_once $absolutePath . '/includes/patTemplate/patTemplate.php';
         }
     }
     $params = $this->params;
     $this->title = $params->get('title', '');
     $tmpl = new patTemplate();
     $tmpl->setBasedir($this->patTemplateDirectory);
     $tmpl->readTemplatesFromFile($this->patTemplateFile);
     $this->patTemplateSiteHome = $this->patTemplateDirectory;
     if (strlen($this->patTemplateSiteHome) >= strlen($absolutePath) && substr($this->patTemplateSiteHome, 0, strlen($absolutePath)) == $absolutePath) {
         $this->patTemplateSiteHome = $siteHelper->getUri(substr($this->patTemplateSiteHome, strlen($absolutePath) + 1));
     }
     $menuListContent = $this->processMenuNodeList($tmpl, $menuNodeList);
     $this->resetTemplate($tmpl, 'menu', $this->menuLevel);
     $tmpl->addVar('menu', 'MENU_LIST', $menuListContent);
     return $tmpl->getParsedTemplate('menu');
 }
示例#2
0
<?
/********** globale Includedateien *******************/
include_once('patTemplate.inc'); // Templatklasse

/******************* Testen Templat *************************/
if($HTTP_POST_VARS[testen] and $HTTP_POST_VARS[test]=='parsen'){
	$tmpl = new patTemplate();
	$tmpl->setBasedir('c:/php/gretenkord/templat_test');
	$tmpl->readTemplatesFromFile($HTTP_POST_VARS[datei]);
	$tmpl->displayParsedTemplate();
}

/**************** Erstellung Templat ***************************/
if($HTTP_POST_VARS[testen] and $HTTP_POST_VARS[test]=='erstellen'){
	
	/********* Ausgabe der Uebersichtsdatei **********/
	$datei_ausg=$HTTP_POST_VARS[datei];
	$laenge=strlen($datei_ausg);
	$datei_eing=substr($datei_ausg,0,$laenge-5);
	$datei_eing=$datei_eing."html";
	$inhalt="aaa";
	$fp1=fopen($datei_eing,"w+");
	$fp2=fopen($datei_ausg,"r");
	$tabelle=0; // Startwert
	while(!feof($fp2)){  // Beginn Schleife
		$zeile=fgets($fp2,256);
		$zeile=trim($zeile);
		$zeile1="";
		
		if(eregi("(<table*){1}",$zeile)){  // wenn vorher Tabelle
			$tabelle=1;
示例#3
0
<?
/********** globale Includedateien *******************/
include_once('../../php/key.inc'); // Zugangsdaten
include_once(PHP_PFAD.'patTemplate.inc'); // Templatklasse
include_once(PHP_PFAD.'patDbc.inc'); // Datenbankklasse
include_once(PHP_PFAD.'function.inc');  // allgemeine Funktionen

/********** locale Includedateien ***************/
include_once(PHP_LEISTE.'leiste_function.inc');


$tmpl = new patTemplate();
$tmpl->setBasedir(T_LEISTE);
$tmpl->readTemplatesFromFile('leiste.ihtml');
$db = new patMysqlDbc($db_host,$db_name,$db_user,$db_pass);
$db->connect();

if($absenden){  // Eroeffnungsmenue des CMS
	$query1="select * from user"; // Anfrage 1
	$abfrage1=$db->query($query1);
	$zugang=start_passwort($abfrage1,$benutzer,$passwd);
}

if($zugang){
	$query1="select rechte_id from rechte_user where user_id='$zugang[id]'";
	$abfrage1=$db->query($query1);
	$i=0; // Zaehler fuer 
	$j=0;
	while($wert=$abfrage1->fetch_array(patDBC_TYPEASSOC)){  // Datensaetze aus Tabelle 'rechte_user'
		foreach($wert as $inhalt){
			$ausgabe[$i]=$inhalt;
<?
/********* Modul zum erstellen der Navigation ***************/

/********** globale Includedateien *******************/
include_once('patTemplate.inc'); // Templatklasse
include_once('patDbc.inc'); // Datenbankklasse
include_once('function.inc');  // Funktionsdatei
include_once('key.inc');  // Schluesseldatei

$tmpl = new patTemplate();
$tmpl->setBasedir(KNOTEN_PFAD);
$tmpl->readTemplatesFromFile('navigation.ihtml');
$db = new patMysqlDbc($db_host,$db_name,$db_user,$db_pass);
$zugang = $db->connect();


if($knoten==NULL){ // Erststart wenn kein '$knoten' - Modul gewaehlt
	$query1="select * from knoten1 order by knoten_id";
	$abfrage1=$db->query($query1);
	$abfrage1=array_bildung($abfrage1);
	$abfrage1=knoten_pfad($abfrage1);
	$tmpl->setAttribute('knoten_oben_passiv','visibility','visibility');
	$tmpl->addVars('knoten_oben_passiv',$abfrage1);
}
else{
	if($blatt==NULL){  // wenn kein Blatt gewaehlt werden alle Knoten dargestellt die inaktiv sind
		echo "kein Blatt gewaehlt !";
		$query1="select * from knoten1 where knoten_id<$knoten order by knoten_id";
	}
	else{
		$query1="select * from knoten1 where knoten_id<=$knoten order by knoten_id";  // wenn ein Blatt gewaehlt
$passiv[ID][2]="3";
$passiv[PFAD][0]="aaaaaaaaa";
$passiv[PFAD][1]="bbbbbbbbb";
$passiv[PFAD][2]="ccccccccc";
$passiv[NAME][0]="Knoten1";
$passiv[NAME][1]="Knoten2";
$passiv[NAME][2]="Knoten3";

$aktiv[ID][3]="4";
$aktiv[PFAD][3]="dddddddddd";
$aktiv[NAME][3]="Knoten4";

/************* globale Includedateien ***********************/
include_once('patTemplate.inc');


/************* Ausgangswerte **************/

$tmpl = new patTemplate();
$tmpl->setBasedir('c:/php/navigation');
$tmpl->readTemplatesFromFile('navigation2.ihtml');

$tmpl->addVars('block1',$passiv);

$tmpl->addVars('block2',$aktiv);

$tmpl->dump();
$tmpl->displayParsedTemplate();

?>
<?
/************ Modul Archivkontrolle ***********************/

/********** globale Includedateien ********************/
include_once('../../php/key.inc'); // Zugangsdaten
include_once(PHP_PFAD.'patTemplate.inc'); // Templatklasse
include_once(PHP_PFAD.'patDbc.inc'); // Datenbankklasse
include_once(PHP_PFAD.'function.inc'); // globale Funktionsdatei

/*********** locale Includedateien *******************/
include_once(PHP_ARCHIV_KONTROLLE.'/archiv_kontrolle_function.inc');

$tmpl = new patTemplate();
$tmpl->setBasedir(T_ARCHIV_KONTROLLE);
$tmpl->readTemplatesFromFile('archiv_kontrolle.ihtml');
$db = new patMysqlDbc($db_host,$db_name,$db_user,$db_pass);
$db->connect();

/************ Suchen ***********************/
if($HTTP_POST_VARS[suchen]){
	
	/************* suche nach Schlagwoertern *************************/
	if(strlen($HTTP_POST_VARS[schlagwort])>2){  // Schlagwoerter
		$query1 ="select * from archiv where ";
		$HTTP_POST_VARS[schlagwort]=trim($HTTP_POST_VARS[schlagwort]);
		$schlagwort=explode(" ",$HTTP_POST_VARS[schlagwort]);
		$anzahl1=count($schlagwort);
		for($i=0;$i<$anzahl1;$i++){
				$query1 .="ueberschrift like '%$schlagwort[$i]%' or teil_ueberschrift1 like '%$schlagwort[$i]%' or ";
				$query1 .="teil_ueberschrift2 like '%$schlagwort[$i]%' or kurztext1 like '%$schlagwort[$i]%' or ";
				$query1 .="kurztext2 like '%$schlagwort[$i]%' or ";
示例#7
0
//timezone and locale
require_once "language.inc.php";
$timezone = 'Europe/Berlin';
putenv('TZ=$timezone');
setlocale(LC_CTYPE, 'de');
//color config
$rowcolordark = '#003366';
$rowcolorlight = '#004070';
$rowcolor = $rowcolorlight;
$headercolor = $rowcolordark;
$cellpad = '"1"';
$cellspc = '"3"';
//template config
require_once "patTemplate.php";
$design = new patTemplate();
$design->setBasedir('./templates');
$design->readTemplatesFromFile('basic.xml');
$design->addVar("basic", "LANG_USERSONLINE", $lang['usersonline']);
$design->addVar("basic", "LANG_QUICKSEARCH", $lang['quicksearch']);
$design->addVar("basic", "LANG_EXTENDEDSEARCH", $lang['extendedsearch']);
$design->addVar("basic", "LANG_ARTISTBROWSE", $lang['artistbrowser']);
$design->addVar("basic", "LANG_ADDLYRICS", $lang['addlyrics']);
$design->addVar("basic", "LANG_PREFERENCES", $lang['preferences']);
$design->addVar("basic", "LANG_STAFF", $lang['staff']);
$design->addVar("basic", "LANG_STATISTICS", $lang['statistics']);
$db = new db_local();
$db_user = new db_local();
$db_user->query("SELECT id FROM catusers WHERE name = '{$_COOKIE['user']}' AND pass = '******'pass']}'");
if ($db_user->num_rows() == 0) {
    $user_id = 0;
} else {
示例#8
0
		$farbe=$kontrolle->farb_ausgabe();  // Ausgabe des Fehler - Farbenarray
		$fehler=$kontrolle->zaehler_ausgabe(); // Ausgabe der Fehlerzahl 1= Fehler , 0 = O.K.
		if($fehler==0){
			$query1="insert into user (Name,Vorname,Passwort,Benutzername) values('$HTTP_POST_VARS[NAME]','$HTTP_POST_VARS[VORNAME]','$HTTP_POST_VARS[PASSWORT]','$HTTP_POST_VARS[BENUTZERNAME]')";
			$abfrage1=$db->query($query1);
			$letzte_id=$db->insert_id();
			$query2="insert into adresse (user_id) values('$letzte_id')";
			$abfrage2=$db->query($query2);
			$db->close();
		}
		else{
			$tmpl = new patTemplate();
			$tmpl->setBasedir(T_ANLEGEN);
			$tmpl->readTemplatesFromFile('anlegen.ihtml');
			$tmpl->addVars('haupt',$farbe);
			$tmpl->addVars('haupt',$HTTP_POST_VARS);
			$tmpl->addVar('haupt','ANZEIGE','test');
			$tmpl->displayParsedTemplate();
		}
}


if(!$anlegen){
	$tmpl = new patTemplate();
	$tmpl->setBasedir(T_ANLEGEN);
	$tmpl->readTemplatesFromFile('anlegen.ihtml');
	$tmpl->addVar('haupt','ANZEIGE','test');
	$tmpl->displayParsedTemplate();
}
?>
示例#9
0
<?
/********** globale Includedateien ********************/
include_once('../../php/key.inc'); // Zugangsdaten
include_once(PHP_PFAD.'patTemplate.inc'); // Templatklasse
include_once(PHP_PFAD.'patDbc.inc'); // Datenbankklasse

/********* lokale Includedateien ****************/
include_once(PHP_AENDERN.'/aendern_function.inc');  // lokale Funktionssammlung

$tmpl = new patTemplate();
$tmpl->setBasedir(T_AENDERN);
$tmpl->readTemplatesFromFile('aendern.ihtml');
$db = new patMysqlDbc($db_host,$db_name,$db_user,$db_pass); // Verbindung zur Datenbank
$db->connect();

/********* Steuerung Anzeigen der Userdaten und Rechte *********/
if($aendern){
	if($aendern_erfolgt){
		// Update der Userdaten in Tabelle 'user'
		$query1 = "update user SET user.Name='$name', user.Vorname='$vorname', ";
		$query1 .= "user.Passwort='$passwort', user.Benutzername='$benutzer', user.Bemerkung='$bemerkung', user.aktiv='$aktiv', user.Anrede='$anrede' ";
		$query1 .= "where user.id=$aendern_hidden";
		$anfrage1 = $db->query($query1);
		
			// Update der Userdaten in Tabelle 'adresse'
		$query1 = "update adresse SET adresse.PLZ='$plz', adresse.Ort='$ort', adresse.Strasse='$strasse', adresse.Nr='$nr', ";
		$query1 .= "adresse.Telefon='$telefon', adresse.Handy='$handy', adresse.EMail='$email', adresse.Fax='$fax', ";
		$query1 .="adresse.adresse_bestaetigt='$adresse_bestaetigt' ";
		$query1 .= "where adresse.user_id=$aendern_hidden";
		$anfrage1 = $db->query($query1);
		
示例#10
0
<?php

include "../includes/structure.php";
include "../includes/mysql.php";
include "../includes/patTemplate.php";
// Read some database information about the current user... cookies anyone?
db_connect();
$sql = sprintf("SELECT * FROM users WHERE id=1 LIMIT 1");
$result = db_query($sql);
$user = mysql_fetch_assoc($result);
// Setup the template...
$template = new patTemplate();
$template->setBasedir("templates");
$template->readTemplatesFromFile("basic.tmpl.html");
// Add the default variables to the template (header section):
$variables = array();
foreach ($user as $var => $val) {
    $variables[strtoupper($var)] = $val;
    $template->addGlobalVar(strtoupper($var), $val);
}
$template->addGlobalVar("FULLNAME", $user['fullname']);
//$template->addVars ("header", $variables);
if (!empty($user['website'])) {
    $template->setAttributes("websitev", array('visibility' => 'visible'));
}
$template->displayParsedTemplate();
<?
/********** Modul Rechte anlegen / loeschen *******************/

/********** globale Includedateien ********************/
include_once('../../php/key.inc'); // Zugangsdaten
include_once(PHP_PFAD.'patTemplate.inc'); // Templatklasse
include_once(PHP_PFAD.'patDbc.inc'); // Datenbankklasse
include_once(PHP_PFAD.'function.inc'); // globale Funktionsdatei

/********* lokale Includedateien ****************/
include_once(PHP_RECHTE_AENDERN.'/rechte_aendern_function.inc');  // lokale Funktionssammlung

$tmpl = new patTemplate();
$tmpl->setBasedir(T_RECHTE_AENDERN);
$tmpl->readTemplatesFromFile('rechte_aendern.ihtml');
$db = new patMysqlDbc($db_host,$db_name,$db_user,$db_pass);
$db->connect();

/********* neues Recht eintragen ****************/
if($HTTP_POST_VARS[anlegen]){
	$query1 = "insert into rechte (Rechte_Art, Modul, Beschreibung, Formular) values ";
	$query1 .= "('$HTTP_POST_VARS[rechte_art]', '$HTTP_POST_VARS[modul]', ";
	$query1 .= "'$HTTP_POST_VARS[beschreibung]', '$HTTP_POST_VARS[seite]')";
	$db->query($query1);
}

/********** Recht loeschen *******************/
if($HTTP_POST_VARS[rechte_id]){
	$query1="delete from rechte where id=$HTTP_POST_VARS[rechte_id]";
	$db->query($query1);
	$query1="delete from rechte_user where rechte_id=$HTTP_POST_VARS[rechte_id]";
示例#12
0
    require_once KUNENA_ABSTMPLTPATH . '/fb_layout.php';
} else {
    require_once KUNENA_ABSPATH . '/template/default/fb_layout.php';
}
require_once KUNENA_ABSSOURCESPATH . 'kunena.permissions.php';
require_once KUNENA_ABSSOURCESPATH . 'kunena.category.class.php';
if ($catid != '') {
    $thisCat = new jbCategory($database, $catid);
}
if (defined('JPATH_BASE')) {
    jimport('pattemplate.patTemplate');
} else {
    require_once KUNENA_JABSPATH . '/includes/patTemplate/patTemplate.php';
}
$obj_KUNENA_tmpl = new patTemplate();
$obj_KUNENA_tmpl->setBasedir(KUNENA_ABSTMPLTPATH);
// Permissions: Check for administrators and moderators
if ($my->id != 0) {
    $aro_group = $acl->getAroGroup($my->id);
    if ($aro_group and CKunenaTools::isJoomla15()) {
        $aro_group->group_id = $aro_group->id;
    }
    // changed fieldname in Joomla 1.5: "group_id" -> "id"
    $is_admin = strtolower($aro_group->name) == 'super administrator' || strtolower($aro_group->name) == 'administrator';
} else {
    $aro_group = 0;
    $is_admin = 0;
}
$is_Moderator = fb_has_moderator_permission($database, $thisCat, $my->id, $is_admin);
//intercept the RSS request; we should stop afterwards
if ($func == 'fb_rss') {
<?
/********** globale Includedateien *******************/
include_once('../../php/key.inc'); // Zugangsdaten
include_once(PHP_PFAD.'patTemplate.inc'); // Templatklasse
include_once(PHP_PFAD.'patDbc.inc'); // Datenbankklasse
// include_once(PHP_PFAD.'function.inc');  // zentrale Funktionsdatei

/*************** lokale Includedateien **********************/
// include_once(PHP_FORMULAR_EINGEBEN.'/formular_eingeben_function.inc');

/************************* Steuerungsblock ***********************/
$db = new patMysqlDbc($db_host,$db_name,$db_user,$db_pass);
$zugang = $db->connect();
$tmpl = new patTemplate();
$tmpl->setBasedir(T_FORMULAR_EINGEBEN);

/************** abspeichern der Werte ****************************/
if($speichern){
	/********************** speichern der Daten **********************/
	foreach($HTTP_POST_VARS as $name => $inhalt){
		if($name!='formular' and $name!='name_formular' and $name!='speichern'){  // ausfiltern unerwuenschter Variablen
			if(strlen($inhalt)>0){
				$inhalt=str_replace("\n","<br>",$inhalt);  // Zeilenumbruch
				$spalte .=$name.", ";
				$spalten_wert .="'".$inhalt."', ";
			}
		}
	}
	$spalten_wert=substr($spalten_wert,0,-2);
	$spalte=substr($spalte,0,-2);
	$query1="insert into archiv(".$spalte.") values(".$spalten_wert.")";  // Zusammenbau Eingabe-Query
示例#14
0
<?
/********** Modul Rechte anlegen / loeschen *******************/

/********** globale Includedateien ********************/
include_once('../../php/key.inc'); // Zugangsdaten
include_once(PHP_PFAD.'patTemplate.inc'); // Templatklasse
include_once(PHP_PFAD.'patDbc.inc'); // Datenbankklasse
include_once(PHP_PFAD.'function.inc'); // globale Funktionsdatei


$tmpl = new patTemplate();
$tmpl->setBasedir(T_INFO);
$tmpl->readTemplatesFromFile('info.ihtml');
$db = new patMysqlDbc($db_host,$db_name,$db_user,$db_pass);
$db->connect();

/********* speichern der Info ************/
if($HTTP_POST_VARS[senden]){
	$HTTP_POST_VARS[info]=trim($HTTP_POST_VARS[info]);
	if(strlen($HTTP_POST_VARS[info])>0){
		$query1="insert into info (user_id, info, Absender) values ('$HTTP_POST_VARS[empfaenger]', '$HTTP_POST_VARS[info]', '$HTTP_POST_VARS[user]')";
		$db->query($query1);
	}
}

/********* Abfragen der User ****************/
$query1="select * from user order by Name";
$abfrage1 = $db->query($query1);
$abfrage1 = array_bildung($abfrage1);
$tmpl->addVars('auswahl',$abfrage1);
$tmpl->addVar('gesamt','USER',1);
<?
/********** globale Includedateien *******************/
include_once('../../php/key.inc'); // Zugangsdaten
include_once(PHP_PFAD.'patTemplate.inc'); // Templatklasse
include_once(PHP_PFAD.'patDbc.inc'); // Datenbankklasse
include_once(PHP_PFAD.'check.inc');  // Kontrollklasse Formular
include_once(PHP_PFAD.'function.inc');  // zentrale Funktionsdatei

$tmpl = new patTemplate();
$tmpl->setBasedir(T_KOMMUNIKATION);
$tmpl->readTemplatesFromFile('kommunikation.ihtml');
$db = new patMysqlDbc($db_host,$db_name,$db_user,$db_pass);
$zugang = $db->connect();
$query1="select * from user,adresse where user.id=adresse.user_id order by Name,Vorname";
$antwort1=$db->query($query1);
$antwort1=array_bildung($antwort1);
$tmpl->addVars('liste',$antwort1);

$db->close();
$tmpl->displayParsedTemplate();
gz_output();
?>