Размер файла: 4.42Kb
<? //by rine(Andrey Arapov) & BEPDuKT(Aleksey Ivanov) site: dizkod.ru
/**
* BASE CLASS `BASE` of the SITE
* Author given violin RAINE
* Participant of the group DECO
* E-mail: [email protected] OR [email protected]
* ICQ:9927785
*/
class Base{
public static $site;
function __construct()
{
self::$site = $sites;
}
public static function head($title=null){
$sites=self::$site;
if($title == null){
$title = Base::settings('title');
}
$dates=date("H:i d.m.Y");
echo'<? //by rine(Andrey Arapov) & BEPDuKT(Aleksey Ivanov) site: dizkod.ruxml version="1.0" encoding="utf-8"?>';
echo'<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>';
echo '<meta name="keywords" content="'.Base::settings('keyword').'"/>
<meta name="description" content="'.Base::settings('descrip').'"/><meta name="copyright" content="DizKod" />';
echo '<title>'.$title.'</title><link rel="shortcut icon" href="'.$sites.'/style/favicon.ico" /><link rel="stylesheet" href="'.$sites.'/style/style.css" type="text/css" /></head><body>';
echo "<div class='logo'><div class='logo-l'><div class='logo-r'>";
echo "<img src='".$sites."/style/images/logo.png' class='logotip' alt='DizKod.ru' />";
echo "</div></div></div>";
echo '<div class="data">'.$dates.'</div>';
$q=mysql_query("SELECT * FROM `reklama` WHERE `position`!='1'");
if(mysql_num_rows($q)){
echo "<div class='rek'>";
while($rek=mysql_fetch_array($q))
{
if($rek[baner]!=1){
echo '<a href="'.$rek[href].'">'.$rek[name].'</a><br />';
}else{
echo '<a href="'.$rek[href].'"><img src="'.$rek[img].'" alt="'.$rek[name].'"></a><br />';
}
}
echo "</div>"; }
}
public static function foot(){
$sites=self::$site;
$niz=mysql_query("SELECT * FROM `reklama` WHERE `position`='1' and `baner`=1");
if(mysql_num_rows($niz)){
echo "<div class='rek'>";
while($rekl=mysql_fetch_array($niz))
{
echo '<a href="'.$rekl[href].'">'.$rekl[name].'</a><br />';
}
echo "</div>";
}
echo "<div class='foot'>";
echo '<form><select name="menu">';
echo '<option selected value="'.$sites.'/index.php">На главную</option>';
echo '<option value="'.$sites.'/reviews/">Отзывы</option>';
echo '<option value="'.$sites.'/facilities.php">Наши услуги</option>';
echo '<option value="'.$sites.'/agreement.php">Соглашение</option>';
echo '<option value="'.$sites.'/portfolio/">Портфолио</option>';
echo '<option value="'.$sites.'/aboutproject.php">О проекте</option>';
echo '<option value="'.$sites.'/news/">Новости</option>';
echo '</select> <input type=button value="Ok" onclick="top.location.href=this.form. menu.options[this.form.menu.selectedIndex].value"> </form></div>';
echo "<div class='copy'><div class='copy-l'>
<div class='copy-r'><a href='http://dizkod.ru'>© Powered by DizKod Studio</a></div></div></div>";
$q=mysql_query("SELECT * FROM `reklama` WHERE `position`='1' and `baner`!=1"); //Копирайт не убирай! Тебе и так бесплатно дали скрипт. уберешь копирайт - капец твоей репутации в сети и твоему кошельку.
while($rek=mysql_fetch_array($q))
{ echo "<div class='count'>";
echo '<a href="'.$rek[href].'"><img src="'.$rek[img].'" alt="'.$rek[name].'"></a><br />';
echo "</div>";
}
echo"</body></html>";
}
public static function filter($a)
{
return mysql_escape_string(htmlspecialchars(trim($a)));
}
public static function settings($param){
$y=mysql_query("SELECT * FROM settings WHERE param='$param' ") or die (mysql_error());
if(mysql_num_rows($y) > 0){
$z=mysql_fetch_object($y);
return stripslashes($z->value);
}}
public static function setting_cat($param){
$y=mysql_query("SELECT * FROM cat_settings WHERE param='$param' ") or die (mysql_error());
if(mysql_num_rows($y) > 0){
$z=mysql_fetch_object($y);
return stripslashes($z->value);
}}
}
?>