<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<head>
<body bgcolor="#999999" text="#000000" link="#999999" vlink="#555555" alink="#555555" leftmargin="20" topmargin="20" marginwidth="20" marginheight="20">
</head>
<title>{title}</title>
</head>
<body>
<center>
<table border="1" cellpadding="0" cellspacing="0" bgcolor="ffffff" bordercolor="#000000" style="border-collapse: collapse" width="800px">
<tr>
<td colspan="3" width="100%" height="100"><img src="images/logo.gif" width="802px" height="130"/>
</td>
</tr>
<tr>
<td valign="top" width="158px" height="450"><img src="images/left_menu.png" width="158px" height="22"/>
<br>
<head>
<title>Cascading Menu</title>
</head>
<body>
<script language="JavaScript">
function goToURL() { history.go(-1); }
</script>
<style>
.menu
{
background-color:#2B6Ebb;
border:1px solid darkblue;
width:150px;
font-size:11px;
font-family:verdana;
position: absolute;
font:bold;
color: #ffffff;
cursor: hand;
}
.item_panel
{
width:150px;
border-left:1px solid darkblue;
border-right:1px solid darkblue;
clip:rect(0,150,0,0);
position:absolute;
}
.item_panel a
{
text-decoration:none;
color:black;
cursor:hand;
}
.item
{
background-color: #E9F0F8;
width: 148px;
font-size: 10px;
font-family: verdana;
}
</style>
<script language="JavaScript">
var height = 20; // height of the menu headers
var iheight = 15; // height of the menu_items
var bgc = "#E9F0F8" // background color of the item
var tc = "black" // text color of the item
var over_bgc = "white";
var over_tc = "#004891";
var speed = 0;
var timerID = "";
var N = (document.all) ? 0 : 1;
var width = 152;
var self_menu = new Array();
function write_menu()
{
smc = 0; // count the position of the self_menu
document.write("<div style='position:absolute'>");
mn = 0;
mni = 1;
start = -1;
for(i=0;i<Link.length;i++)
{
la = Link.split("|");
if (la[0] == "0")
{
if(start == 0)
{
document.write("</div>");
h = csmc * iheight;
tmn = mn; //-h
self_menu[smc] = new Array(tmn,h,0,-2);
smc++;
mn--;
}
csmc = 0;
document.write("<div class='menu' style='top:"+mn+";height:"+height+"' id='down"+smc+"' onclick='pull_down("+smc+","+mni+")'> "+ la[1] + "</div>");
self_menu[smc] = new Array(mn,height,0,mni);
smc++;
mni++;
mn+=height;
start = 1;
}
else
{
if(start == 1)
{
if(N)mn+=2;
document.write("<div class='item_panel' id='down"+smc+"' style='top:"+mn+"'>");
start = 0;
}
document.write("<a href='"+la[2]+"'");
if (la[3] != "") document.write(" target='" + la[3] + "' ");
document.write("><div class='item' id='d"+i+"' style='height:"+iheight);
if (N) document.write(";width:150");
document.write("' onmouseover='color(this.id)' onmouseout='uncolor(this.id)'> "+ la[1] + "</div></a>");
csmc++;
}
}
if (start == 0)
{
document.write("</div>");
h = csmc * iheight;
tmn = mn + 5; //-h
self_menu[smc] = new Array(tmn,h,0);
name = "down" + (self_menu.length-1);
obj = document.getElementById(name);
obj.style.borderBottomColor = "darkblue";
obj.style.borderBottomWidth = 1;
obj.style.borderBottomStyle = "solid";
}
document.write("</div>");}
function color(obj)
{
document.getElementById(obj).style.backgroundColor = over_bgc;
document.getElementById(obj).style.color = over_tc
}
function uncolor(obj)
{
document.getElementById(obj).style.backgroundColor = bgc;
document.getElementById(obj).style.color = tc
}
function pull_down(nr,c)
{
if (timerID == "")
{
to = self_menu[nr+1][1]
begin = nr + 2;
if (timerID != "") clearTimeout(timerID);
if (self_menu[nr+1][2] == 0)
{
self_menu[nr+1][2] = 1;
if(nr == self_menu.length-2) {to++;}
epull_down(begin,to,0);
}
else
{
to = 0;
self_menu[nr+1][2] = 0;
name = "down"+(nr+2);
open_item = 0;
for(i=0;i<nr;i++)
{
if(self_menu[2] == 1)
{open_item += self_menu[1];
}
}
if (N == false) {open_item-= (c*1)};
if (nr== self_menu.length-2) {val = self_menu[self_menu.length-1][1];to=-1;}
else val = parseInt(document.getElementById(name).style.top) -(open_item)-(c*height);
epull_up(begin,to,val);
}
}
}
function epull_down(nr,to,nowv)
{
name = "down" + (nr-1);
obj = document.getElementById(name).style.clip = "rect(0,"+width+","+(nowv+1)+",0)";
for (i=nr;i<self_menu.length;i++)
{
name = "down" + i;
obj = document.getElementById(name);
obj.style.top = parseInt(obj.style.top)+1;
}
nowv++;
if(nowv < to) timerID = setTimeout("epull_down("+nr+","+to+","+nowv+")",speed);
else timerID = "";
}
function epull_up(nr,to,nowv)
{
name = "down" + (nr-1);
obj = document.getElementById(name).style.clip = "rect(0,"+width+","+nowv+",0)";
for (i=nr;i<self_menu.length;i++)
{
name = "down" + i;
obj = document.getElementById(name);
obj.style.top = parseInt(obj.style.top)-1;
}
nowv--;
if(nowv > to) timerID = setTimeout("epull_up("+nr+","+to+","+nowv+")",speed);
else timerID = "";
}
function startup(nr)
{
write_menu();
if (nr != 0)
{
for(i=0;i<self_menu.length;i++)
{
if(self_menu[3] == nr) pull_down(i,nr)
i==self_menu.length;
}
}
}
</script>
<table width=150><tr><td>
<script language="JavaScript">
//Link[nr] = "position [0 is menu/1 is item],Link name,url,target (blank|top|frame_name)"
var Link = new Array();
Link[0] = "0|Home";
Link[1] = "1|Picture|page2.html|";
Link[2] = "1|Chat|page7.html|";
Link[3] = "1|Forom|http://tyistercho.web.data.bg/phpbb/|";
Link[4] = "1|Търсачка|page5.html|";
Link[5] = "0|Видео";
Link[6] = "1|Онлаин телевизия|page10.html|";
Link[7] = "1|Клипове|page7.html|";
Link[8] = "0|Екип";
Link[9] = "1|За контакт|page8.html|";
Link[10] = "0|Игри";
Link[11] = "1|Кракове|http://store4.data.bg/tyistercho/Keygens/|";
startup(4);
</script>
</td>
</tr>
</table><br><br><br><br><br><br>
</body>
</html>
<img src="images/left_menu2.png" width="158px" height="24"/>
<div style="background-color:#000;width:158px;height:1px;">
<br>
<center><?php
include("config.php");
if($_POST['username'] AND $_POST['password'])
{
$username = $_POST['username'];
$password = $_POST['password'];
}
else if (isset($_COOKIE['login']))
{
$var = explode("|", $_COOKIE['login']);
$username = $var[0];
$password = $var[1];
}
else
{
$username = null;
$password = null;
}
if(preg_match('/^([a-z0-9_-]{4,16})/i',$username) AND preg_match('/^([a-z0-9_-]{4,16})/i',$password) )
{
$sql = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password' LIMIT 0,1");
if($row = mysql_fetch_array($sql))
{
$_SESSION['username'] = $row['username'];
$_SESSION['password'] = $row['password'];
$_SESSION['icq'] = $row['icq'];
$_SESSION['skype'] = $row['skype'];
$_SESSION['userid'] = $row['id'];
if($_POST['check'])
{
setcookie("login",$username."|".$password,time()+24*60*60*200);
}
}
else
{
if($_POST)
{
$error = "Грешno потребителско име";
}
else
{
setcookie('login', '', time() - 24*60*60*200);
}
}
}
if($_SESSION)
{
echo '<a href="profile.php?my_profile=on">Моят профил:</a><a href="?logout=true">Log out ['.$_SESSION['username'].'</a>';
}
else
{
echo '<form action="" method="POST">
<input type="text" name="username"><br />
<input type="password" name="password"><br/>
<left><input type="submit" value="Влез">
</form>';
}
if ( $_GET['logout'] == "true" AND ( (int) $_SESSION['userid']) > 0)
{
session_unregister("username");
session_unregister("password");
session_unregister("icq");
session_unregister("skype");
session_unregister("userid");
session_destroy(stop);
if ( isset($_COOKIE['login']) )
{
setcookie('login','',time()-24*60*60*200);
}
header("Location: ".$_SERVER['PHP_SELF']);
}
echo '<div><a href="users.php">Потребители</a></div>';
echo '<div><a href="reg.php">Регистрация</a></div>';
?>
<br>
<div style="background-color:#000;width:158px;height:1px;">
<td valign="top" width="158px" height="450"><img src="images/center.png" width="480px" height="22"/>
<table border="1" cellpadding="0" cellspacing="0" collapse width="11px" height="1"/><td>
<script language="javascript">
<!-- Begin
/*
Скрипт за ротация на банери при презареждане на страница.
*/
var how_many_ads = 2 // Напишете колко банера имате
// Тук не бъзикайте нищо
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads; ad +=1;
/*
Не забравяйте, че за всеки следващ банер
числото след "if (ad==число) " трябва да се
променя със следващото по ред
*/
if (ad==1)
{
txt="";
target="_blank";
url="http://www.adress.com" ;
alt="";
banner="http://10.23.6.63/site/images/logo.gif" ;
width="468" ;
height="60" ;
}
if (ad==2)
{
txt="";
target="_blank";
url="http://www.adress.com" ;
alt="";
banner="direktoriq/kartinga.gif" ;
width="468";
height="60";
}
document.write('<center>');
document.write('<a href=\"' + url + '\" target=\"_blank\">'); document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0><br>');
document.write('<small>' + txt + '</small></a>'); document.write('</center>');
<!-- End
</script>
<a>Сложи своя банер за ротация: Натисни тук.</a>
</td>
<div>
<TR valign=top>
<TD width=450 height=80><BR>
</TD>
</TR>
</TABLE>
</div>
<br>
<div style="background-color:#000;width:480px;height:1px;">
<img src="images/center.png" width="480px" height="22"/>
<div style="background-color:#000;width:480px;height:1px;">
</div>
</td>
<br>
<br></td>
<td valign="top" width="163px" height="100"><img src="images/right.png" width="163px" height="22"/>
</td>
</tr>
<tr>
<td align="center" colspan="3" width="100%" height="25">{footer}</td>
</tr>
</table>