php -------------------- -------------------- -------------------- ---

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php
// ------------------------------------------------------------------------ //
// EIS - Extensible Information System //
// Copyright (c) Technical 2009 - http://sourceforge.net/projects/eiscms //
// <http://sourceforge.net/projects/eiscms > //
// ------------------------------------------------------------------------ //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// You may not change or alter any portion of this comment or credits //
// of supporting developers from this source code or any supporting //
// source code which is considered copyrighted (c) material of the //
// original comment or credit authors. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //
abstract class Template
{
static function Article($Id, $Title, $Date, $Author, $Image, $Text, $Tags, $Print = FALSE, $Bookmark = null)
{
global $Module;
global $Language;
echo $Bookmark." <b>".$Title ."</b><br>";
$Toolbar = new Toolbar();
if($Author)
{
$Toolbar->Add("?module=profiles&id=".$Author['id'], null, 'user.png', $Author['login']);
} else {
$Toolbar->AddText("guest.png", $Language[173]);
}
$Toolbar->AddText("date.png", MakeDate($Date));
if($Print)
{
$Toolbar->AddSeparator();
$Toolbar->Add("print.php?module=".$Module."&id=".$Id, null, 'print.png', $Language[4]);
}
$Toolbar->Display('left');
echo "<hr>\n".$Image."\n".$Text;
if(!empty($Tags))
{
echo "\n<br><br>".$Tags;
}
}
static function Item($Id, $Title, $Date, $Author, $Image, $Text, $Tags, $Category = null, $Bookmark = null)
{
global $Language;
global $Module;
echo $Bookmark." <b>".$Category." ".$Title;
echo "</b><br>\n".$Image."\n".$Text."\n<br>".$Tags."\n";
}
static function ListItem($Id, $Title, $Date, $Author, $Comments, $Bookmark = null)
{
global $Language;
echo "<tr><td>".$Bookmark." ".$Title." </td><td><img src=\"images/modules/date.png\" align=\"absmiddle\"> ".MakeDate($Date)."</td><td></td><td>".$Author."</td><td>".$Comments."</td></tr>\n";
}
static function Application($Id, $Title, $Author, $Icon, $Description, $Checkbox = null)
{
global $Language;
echo "<table witdh=\"100%\">
<tr>
<td align=\"left\" width=\"25%\">
".$Checkbox." <b>".$Title."</b>
<br>
<img src=\"".$Icon."\" align=\"absmiddle\" border=\"0\">
<br>
".$Author."
</td>
<td align=\"left\" width=\"75%\">\n";
echo ParseBb($Description);
echo "</td>
</tr>
</table>\n";
}
static function Task($Id, $Day, $Month, $Year, $Weekday, $Text, $Today = FALSE, $Checkbox = null)
{
global $Language;
echo $Checkbox." <img src=\"images/modules/date.png\" align=\"absmiddle\" border=\"0\"> ".$Day.".".$Month.".".$Year." ".$Weekday;
if($Today)
{
echo " <b>($Language[79])</b>";
}
echo "<br>".$Text;
}
static function Topic($Id, $Title, $Date, $Posts = null)
{
global $Language;
echo $Title;
if(IsNew($Date))
{
echo " <img src=\"images/modules/new.png\" border=\"0\">";
}
if(!empty($Posts))
{
echo " (".$Posts." ".$Language[144].")";
}
echo "<br>\n";
}
static function Note($Id, $Title, $Text, $Checkbox = null)
{
global $Language;
echo $Checkbox." <img src=\"images/modules/notepad.png\" align=\"absmiddle\" border=\"0\"><b>".$Title."</b><br>\n";
echo "<br>\n";
echo ParseBb($Text)."\n
<hr>\n";
}
static function Message($Id, $Title, $Date, $Author, $Text, $Folder, $Checkbox = null)
{
global $Language;
echo $Checkbox." <img src=\"images/modules/mail.png\" align=\"absmiddle\" border=\"0\">
".$Title."<br>
<img src=\"images/modules/date.png\" align=\"absmiddle\" border=\"0\"> ".MakeDate($Date).$Author;
echo "<br><br>
".ParseBb($Text)."
<hr>";
}
static function Online($Login, $Status, $Icon, $Activity)
{
echo "<tr><td>".$Login."</td><td><img src=\"images/modules/date.png\" border=\"0\" align=\"absmiddle\"> ".MakeDate($Activity)."</td><td><img src=\"images/modules/status.png\" border=\"0\" align=\"absmiddle\"> ".$Status."</td></tr>\n";
}
}
?>