Kalender
Sonstiges
0.2
1
1072630196
1072630196
1
Kalender-Modul
<?php
/**
* Kalender 2003 by STam
* build by STam 29.07.2003 for A3
* Version 0.1-dev Alpha
* ---------------------------------------------------------------
* INPUT
**/
// Add Functions
if (!function_exists('DediMod_TreeLevelLight')) {
function DediMod_TreeLevelLight()
{
global $db, $client, $lang, $dedi_db, $con_lang, $catlist, $catlist_level, $tlo_tree;
$sql = "SELECT A.name, B.idcat, B.parent, B.sortindex FROM $dedi_db[cat_lang] AS A, $dedi_db[cat] AS B WHERE A.idcat=B.idcat AND B.idclient='$client' ORDER BY B.parent, B.sortindex";
$db->query($sql);
while ($db->next_record()){
$ordner[$db->f('idcat')] = $db->f('name');
$tlo_tree[$db->f('parent')][$db->f('sortindex')] = $db->f('idcat');
}
$sql = "SELECT D.idcatside, D.idcat, D.sortindex, D.is_start, F.title FROM $dedi_db[cat_side] AS D, $dedi_db[side] AS E, $dedi_db[side_lang] AS F WHERE D.idside=E.idside AND E.idside=F.idside AND E.idclient='$client' AND F.idlang='$lang' ORDER BY D.idcatside";
$db->query($sql);
while ($db->next_record()){
$seiten[$db->f('idcat')][$db->f('idcatside')]['name'] = $db->f('title');
$seiten[$db->f('idcat')][$db->f('idcatside')]['idcatside'] = $db->f('idcatside');
$seiten[$db->f('idcat')][$db->f('idcatside')]['is_start'] = $db->f('is_start');
if($db->f('is_start') == 1){ $seiten['start'][$db->f('idcat')] = $db->f('idcatside'); }
if(!is_array($seiten['sortarray'][$db->f('idcat')])){$seiten['sortarray'][$db->f('idcat')] = array(); }
array_push($seiten['sortarray'][$db->f('idcat')],$db->f('sortindex'));
}
$baum = array();
tree_level_order('0', 'catlist');
foreach($catlist as $a){
$temp['id'] = $seiten['start'][$a];
$temp['name'] = $ordner[$a];
$temp['level'] = $catlist_level[$a];
array_push($baum, $temp);
if(is_array($seiten[$a])){
array_multisort($seiten['sortarray'][$a] , SORT_ASC , $seiten[$a] , SORT_ASC);
foreach(array_keys($seiten[$a]) as $b){
if($seiten['start'][$a] != $b){
$temp['id'] = $seiten[$a][$b]['idcatside'];
$temp['name'] = $seiten[$a][$b]['name'];
$temp['level'] = $catlist_level[$a] + 1;
array_push($baum, $temp);
}
}
}
}
return $baum;
}
}
// Anfang MipForms Config
// Hidden Version
$mip_form['1']['cat'] = 'hidden';
$mip_form['1']['cms_var'] = 'MOD_VAR[1]';
$mip_form['1']['cms_val'] = $dedi_mod['info']['version'];
$mip_form['1']['tab'] = '1';
// CSS
//Schriftart Link Navi
$mip_form['11']['desc'] = $mod_lang['gen_font'].": Navigation Links {font2}";
$mip_form['11']['cat'] = 'app_css';
$mip_form['11']['output_cat'] = 'option';
$mip_form['11']['cms_var'] = 'MOD_VAR[11]';
$mip_form['11']['cms_val'] = $dedi_mod['value']['11'];
$mip_form['11']['cms_val_default'] = 'calendar_link_navi';
//Schriftart Links
$mip_form['12']['desc'] = $mod_lang['gen_font'].": Links {font1}";
$mip_form['12']['cat'] = 'app_css';
$mip_form['12']['output_cat'] = 'option';
$mip_form['12']['cms_var'] = 'MOD_VAR[12]';
$mip_form['12']['cms_val'] = $dedi_mod['value']['12'];
$mip_form['12']['cms_val_default'] = 'calendar_link';
//Schriftart Links Active
$mip_form['13']['desc'] = $mod_lang['gen_font'].": Link Today{font3}";
$mip_form['13']['cat'] = 'app_css';
$mip_form['13']['output_cat'] = 'option';
$mip_form['13']['cms_var'] = 'MOD_VAR[13]';
$mip_form['13']['cms_val'] = $dedi_mod['value']['13'];
$mip_form['13']['cms_val_default'] = 'calendar_link_active';
//Schriftart Num
$mip_form['2']['desc'] = $mod_lang['gen_font'].": Zahlen {font4}";
$mip_form['2']['cat'] = 'app_css';
$mip_form['2']['output_cat'] = 'option';
$mip_form['2']['cms_var'] = 'MOD_VAR[2]';
$mip_form['2']['cms_val'] = $dedi_mod['value']['2'];
$mip_form['2']['cms_val_default'] = 'calendar_number';
//Schriftart Navigation
$mip_form['3']['desc'] = $mod_lang['gen_font'].": Navigation {font5}";
$mip_form['3']['cat'] = 'app_css';
$mip_form['3']['output_cat'] = 'option';
$mip_form['3']['cms_var'] = 'MOD_VAR[3]';
$mip_form['3']['cms_val'] = $dedi_mod['value']['3'];
$mip_form['3']['cms_val_default'] = 'calendar_navi';
// Colors
//BGCell Color
$mip_form['4']['cat'] = 'txt';
$mip_form['4']['desc'] = 'Background-Color: Zellen <small>[Format: (HEX) #123456]</small>';
$mip_form['4']['cms_var'] = 'MOD_VAR[4]';
$mip_form['4']['cms_val'] = $dedi_mod['value']['4'];
$mip_form['4']['cms_val_default'] = '#6699CC';
$mip_form['4']['tab'] = '0';
//BGCell Today Color
$mip_form['5']['cat'] = 'txt';
$mip_form['5']['desc'] = 'Background-Color: aktueller Tag <small>[Format: (HEX) #123456]</small>';
$mip_form['5']['cms_var'] = 'MOD_VAR[5]';
$mip_form['5']['cms_val'] = $dedi_mod['value']['5'];
$mip_form['5']['cms_val_default'] = '#66ff66';
$mip_form['5']['tab'] = '0';
//All Text Color
$mip_form['6']['cat'] = 'txt';
$mip_form['6']['desc'] = 'Text-Color: Zahlen/Text <small>[Format: (HEX) #123456]</small>';
$mip_form['6']['cms_var'] = 'MOD_VAR[6]';
$mip_form['6']['cms_val'] = $dedi_mod['value']['6'];
$mip_form['6']['cms_val_default'] = '#000000';
$mip_form['6']['tab'] = '0';
// Format
//Cal Width
$mip_form['7']['cat'] = 'txt';
$mip_form['7']['desc'] = 'Calendar-Width: Kalender Breite <small>[Format: (int) XX % / XX Pixel]</small>';
$mip_form['7']['cms_var'] = 'MOD_VAR[7]';
$mip_form['7']['cms_val'] = $dedi_mod['value']['7'];
$mip_form['7']['cms_val_default'] = '150';
$mip_form['7']['tab'] = '0';
//CalBorder Width
$mip_form['8']['cat'] = 'txt';
$mip_form['8']['desc'] = 'Border-Width: Randbreite <small>[Format: (int) XX Pixel]</small>';
$mip_form['8']['cms_var'] = 'MOD_VAR[8]';
$mip_form['8']['cms_val'] = $dedi_mod['value']['8'];
$mip_form['8']['cms_val_default'] = '0';
$mip_form['8']['tab'] = '0';
// Navigation
//Navigation aktiviert/ deaktiviert
$mip_form['14']['cat'] = 'option';
$mip_form['14']['type'] = '';
$mip_form['14']['desc'] = 'Einstellungen Navigation:';
$mip_form['14']['cms_var'] = 'MOD_VAR[14]';
$mip_form['14']['cms_val'] = $dedi_mod['value']['14'];
$mip_form['14']['option_desc']['0'] = 'Navigation aktiviert';
$mip_form['14']['option_val']['0'] = '1';
$mip_form['14']['option_desc']['1'] = 'Navigation deaktiviert';
$mip_form['14']['option_val']['1'] = '0';
$mip_form['14']['tab'] = '0';
//Navigation template vorwärts
$mip_form['15']['cat'] = 'txtarea';
$mip_form['15']['type'] = 'long';
$mip_form['15']['rows'] = '1';
$mip_form['15']['desc'] = 'Button vorwärts:<br><small><u>Mögliche Templatevariable:</u> {url},{font1},{font2},{font3},{font4},{font5}</small>';
$mip_form['15']['cms_var'] = 'MOD_VAR[15]';
$mip_form['15']['cms_val'] = $dedi_mod['value']['15'];
$mip_form['15']['cms_val_default'] = ' <a href ="{url}" class=\"{font2}\">>></a> ';
$mip_form['15']['tab'] = '0';
//Navigation template rückwärts
$mip_form['16']['cat'] = 'txtarea';
$mip_form['16']['type'] = 'long';
$mip_form['16']['rows'] = '1';
$mip_form['16']['desc'] = 'Button rückwärts:<br><small><u>Mögliche Templatevariable:</u> {url},{font1},{font2},{font3},{font4},{font5}</small>';
$mip_form['16']['cms_var'] = 'MOD_VAR[16]';
$mip_form['16']['cms_val'] = $dedi_mod['value']['16'];
$mip_form['16']['cms_val_default'] = ' <a href ="{url}" class=\"{font2}\"><<</a> ';
$mip_form['16']['tab'] = '0';
//Verbindungs template Navigation
$mip_form['17']['cat'] = 'txtarea';
$mip_form['17']['type'] = 'long';
$mip_form['17']['rows'] = '1';
$mip_form['17']['desc'] = 'Verbindungs-Template:<br><small><u>Mögliche Templatevariablen:</u> {back}, {forw},<br>
{Month}=Januar, {month}=Jan, {Nmonth}=1, {Year}=2003, {year}=03';
$mip_form['17']['cms_var'] = 'MOD_VAR[17]';
$mip_form['17']['cms_val'] = $dedi_mod['value']['17'];
$mip_form['17']['cms_val_default'] = "<NOBR>{back}<b>{month} {Year}</b>{forw}</NOBR>";
$mip_form['17']['tab'] = '0';
// Nutzung/Funktion
//Kalender Funktion
$mip_form['18']['cat'] = 'option';
$mip_form['18']['type'] = '';
$mip_form['18']['desc'] = 'Funktion des Kalenders:';
$mip_form['18']['cms_var'] = 'MOD_VAR[18]';
$mip_form['18']['cms_val'] = $dedi_mod['value']['18'];
$mip_form['18']['option_desc']['0'] = 'als Archivauswahl';
$mip_form['18']['option_val']['0'] = 'archiv';
$mip_form['18']['option_desc']['1'] = 'frei Definiert';
$mip_form['18']['option_val']['1'] = 'free';
/*
$mip_form['18']['option_desc']['2'] = 'als Eventanzeige';
$mip_form['18']['option_val']['2'] = 'event';
$mip_form['18']['option_desc']['3'] = 'als Kalender';
$mip_form['18']['option_val']['3'] = 'cal';
$mip_form['18']['option_desc']['4'] = 'Personalisiert';
$mip_form['18']['option_val']['4'] = 'pers';
*/
$mip_form['18']['cms_val_default'] = '0';
//Ever Link
$mip_form['22']['cat'] = 'option';
$mip_form['22']['type'] = '';
$mip_form['22']['desc'] = 'Einstellungen Links:';
$mip_form['22']['cms_var'] = 'MOD_VAR[2]';
$mip_form['22']['cms_val'] = $dedi_mod['value']['2'];
$mip_form['22']['option_desc']['0'] = 'Links immer zeigen';
$mip_form['22']['option_val']['0'] = '1';
$mip_form['22']['option_desc']['1'] = 'nur aktive Links zeigen';
$mip_form['22']['option_val']['1'] = '0';
$mip_form['2']['tab'] = '0';
//Search for Idcat
$mip_form['19']['desc'] = 'Archivauswahl:<br><small>Geben Sie die Kategorie/Ordner an, welche durchsucht werden sollen.<br>...nur bei Archivauswahl nötig!</small>';
$mip_form['19']['cat'] = 'app_cat';
$mip_form['19']['output_cat'] = 'option';
$mip_form['19']['cms_var'] = "MOD_VAR[19]";
$mip_form['19']['cms_val'] = $dedi_mod['value']['19'];
$mip_form['19']['size'] = '5';
$mip_form['19']['cms_val_default'] = 'this';
//Search for Idcatside Key
$mip_form['20']['cat'] = 'option';
$mip_form['20']['type'] = '';
$mip_form['20']['desc'] = 'Einstellungen Siteauswahl:<br><small>Geben Sie den Key an nachdem gesucht werden soll.<br>...nur bei Archivauswahl nötig!</small>';
$mip_form['20']['cms_var'] = 'MOD_VAR[20]';
$mip_form['20']['cms_val'] = $dedi_mod['value']['20'];
$mip_form['20']['option_desc']['0'] = 'Site-Name';
$mip_form['20']['option_val']['0'] = 'name';
$mip_form['20']['option_desc']['1'] = 'Site-Keys';
$mip_form['20']['option_val']['1'] = 'meta_keywords';
$mip_form['20']['option_desc']['2'] = 'Site-Description';
$mip_form['20']['option_val']['2'] = 'meta_description';
$mip_form['20']['tab'] = '0';
//Seite einbinden/weiterleiten
$mip_form['21']['cat'] = 'option';
$mip_form['21']['type'] = '';
$mip_form['21']['desc'] = 'Einstellungen Content-Syndication:';
$mip_form['21']['cms_var'] = 'MOD_VAR[21]';
$mip_form['21']['cms_val'] = $dedi_mod['value']['21'];
$mip_form['21']['option_desc']['1'] = 'Content einbinden';
$mip_form['21']['option_val']['1'] = '0';
$mip_form['21']['option_desc']['0'] = ' >>> weiterleiten <<<';
$mip_form['21']['option_val']['0'] = '0';
$myi = 2;
foreach(DediMod_TreeLevelLight() as $a)
{
$mip_form['21']['option_val'][$myi] = $a['id'];
$mip_form['21']['option_desc'][$myi] = (str_repeat(' ',$a['level'])).$a['name'];
$myi++;
}
$mip_form['21']['cms_val_default'] = '0';
$mip_form['21']['flag'] = 'class_only';
//CalLink Out
$mip_form['9']['cat'] = 'txtarea';
$mip_form['9']['desc'] = 'Kalender Linkformat: <i>frei definiert</i> <small><u>Mögliche Templatevariable:</u> &DediMod_Input=Schnittstelle<br>
{timestamp}=12345678901234, {Month}=Januar, {month}=Jan, {Nmonth}=1, {Year}=2003, {year}=03 </small>';
$mip_form['9']['type'] = 'long';
$mip_form['9']['rows'] = '1';
$mip_form['9']['cms_var'] = 'MOD_VAR[9]';
$mip_form['9']['cms_val'] = $dedi_mod['value']['9'];
$mip_form['9']['cms_val_default'] = '&DediMod_Input={timestamp}';
$mip_form['9']['tab'] = '0';
//CalLink In
$mip_form['10']['cat'] = 'txtarea';
$mip_form['10']['desc'] = 'Kalender Inputvar: Eingangsvariable <small>[Variable die das Anzeigedatum ändert! Format: (string) name]</small>';
$mip_form['10']['type'] = 'long';
$mip_form['10']['rows'] = '1';
$mip_form['10']['cms_var'] = 'MOD_VAR[10]';
$mip_form['10']['cms_val'] = $dedi_mod['value']['10'];
$mip_form['10']['cms_val_default'] = 'cal_pos';
$mip_form['10']['tab'] = '0';
// Ende MipForms Config
// Display MipForms
mip_formsp($mip_form['1']); // Hidden Version
echo '<b>Einstellungen CSS:</b><p>';
mip_formsp($mip_form['12']); //
mip_formsp($mip_form['11']); //
mip_formsp($mip_form['13']); //
mip_formsp($mip_form['2']); //
mip_formsp($mip_form['3']); //
echo "<hr>";
echo '<b>Einstellungen Layout:</b><p>';
mip_formsp($mip_form['4']); //
mip_formsp($mip_form['5']); //
mip_formsp($mip_form['6']); //
mip_formsp($mip_form['7']); //
mip_formsp($mip_form['8']); //
echo '<hr>';
echo '<b>Datumsnavigation:</b><p>';
mip_formsp($mip_form['14']); //
echo '<br>';
mip_formsp($mip_form['15']); //
echo '<br>';
mip_formsp($mip_form['16']); //
echo '<br>';
mip_formsp($mip_form['17']); //
echo '<hr>';
echo '<b>Kalender:</b><br>';
mip_formsp($mip_form['18']); //
mip_formsp($mip_form['22']); //
echo "<br>";
echo '--- Archiv -----------------------------------------------------';
mip_formsp($mip_form['19']); //
echo "<br>";
mip_formsp($mip_form['20']); //
echo "<br>";
echo '--- Output -----------------------------------------------------';
mip_formsp($mip_form['21']); //
echo "<br>";
echo '--- free Definition ---------------------------------------';
mip_formsp($mip_form['9']); //
echo "<br>";
echo '--- Input ------------------------------------------------------';
mip_formsp($mip_form['10']); //
// make clean
unset($mip_form, $myi, $a);
?>