Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / var / www / html / sman1baleendahok / functions / | server ip : 172.67.156.115 your ip : 172.70.130.166 H O M E |
Filename | /var/www/html/sman1baleendahok/functions/template.php |
Size | 614 |
Permission | rw-rw-r-- |
Owner | ulung : ulung |
Create time | 27-Apr-2025 11:12 |
Last modified | 05-Feb-2025 08:55 |
Last accessed | 06-Jul-2025 20:22 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
if(preg_match("template.php", $PHP_SELF))
{
//header("location: index.php");
echo "<script>document.location.href = 'index.php';</script>";
die;
}
class template
{
var $TAGS=array();
var $THEME;
var $CONTENT;
function define_tag($tagname, $varname)
{
$this->TAGS[$tagname]=$varname;
}
function define_theme($themename)
{
$this->THEME=$themename;
}
function parse()
{
$this->CONTENT=file($this->THEME);
$this->CONTENT=implode("",$this->CONTENT);
while(list($key,$val)=each($this->TAGS))
{
$this->CONTENT=ereg_replace($key,$val,$this->CONTENT);
}
}
function printproccess()
{
echo $this->CONTENT;
}
}
?>
if(preg_match("template.php", $PHP_SELF))
{
//header("location: index.php");
echo "<script>document.location.href = 'index.php';</script>";
die;
}
class template
{
var $TAGS=array();
var $THEME;
var $CONTENT;
function define_tag($tagname, $varname)
{
$this->TAGS[$tagname]=$varname;
}
function define_theme($themename)
{
$this->THEME=$themename;
}
function parse()
{
$this->CONTENT=file($this->THEME);
$this->CONTENT=implode("",$this->CONTENT);
while(list($key,$val)=each($this->TAGS))
{
$this->CONTENT=ereg_replace($key,$val,$this->CONTENT);
}
}
function printproccess()
{
echo $this->CONTENT;
}
}
?>