<?php session_start();
//$exitsessio = true;
$fotoperrow = 4;
if(isset($exitsessio) and $exitsessio==true) {
session_unset();
session_destroy ();
$exitsessio = false;
}
if(!isset($permis)) {
session_register("permis");
session_register("uname");
//session_register("exitsessio");
session_register("userid");
$userid = 0;
$permis = 0;
$uname = "";
$exitsessio = false;
}
$GDLOBAS['dpath'] = "http://".$GLOBALS[HTTP_HOST]."/design/"; //Путь к каталогу с дизайном
$design_path=$GDLOBAS['dpath'];
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\" />
<title>Кафедра \"Компьютерные системы автоматизации производства\" МГТУ им.Н.Э.Баумана</title>
<link rel=\"shortcut icon\" href=\"$design_path/rk9mini.png\" type=\"image/png\">
<link href=\"$design_path/style1.css\" rel=\"stylesheet\" type=\"text/css\" />
<style type=\"text/css\">
<!--
body {
background-image: url($design_path/bg_main.png);
}
-->
</style></head>
<body marginheight=\"0\">
<table width=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">
<tr>
<td colspan=\"3\" align=\"center\">
<!--Шапка -->";
require("../code/functions.php");
require("../code/sqlstart.php");
require("functions-foto.php");
require("top_menu_foto.php");
echo "
<!-- Конец Шапка --></td>
</tr>
<tr>
<td width=\"100%\" ><div class=\"content\">
<!--Тело1 -->
<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"16\" align=\"right\" valign=\"bottom\"><img src=\"$design_path/body-lt.png\" /></td>
<td class=\"body_top\"> </td>
<td width=\"12\" valign=\"bottom\"><img src=\"$design_path/body-rt.png\" width=\"13\" height=\"12\" /></td>
</tr>
<tr>
<td width=\"16\" class=\"body_left\"> </td>
<td class=\"content_text\"><!-- Полоса под новости и навигацию -->";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" valign=\"top\">";
if($fv=='f') { //Если фото то
echo "
<tr>
<td width=\"200px\" valign=\"top\"><div class=\"nav\"><!-- Навигация -->";
printnavitem(0,0);
echo "<!--Конец Навигация --></div></td>
<td width=\"15px\" valign=\"top\"><img src=\"$design_path/vertical.png\" width=\"15\" height=\"250\" /></td>
<td valign=\"top\"> <!-- Тело2 --> ";
$fotofolder_request = "SELECT `path`, `comment`, `name`, `date` , `zipfilename` FROM `fotofolder` WHERE `ID`=$fa and permission<=$permis";
$ffr = mysql_query($fotofolder_request);
$flink = mysql_result($ffr,0,0);
$foto_request = "select name, permission , comment from fotos where album_id=$fa order by fotos.ID";
$fff = mysql_query($foto_request);
$frows = mysql_num_rows($fff);
if(mysql_num_rows($ffr)>0) echo "<div align=\"center\" class=\"news_top_text\">".mysql_result($ffr,0,2)." ".MStrToDate(mysql_result($ffr,0,3))."</div>";
else echo " ";
echo "<table width=\"95%\" cellpadding=\"0\" cellspacing=\"3\" border=\"0\" valign=\"top\">\n";
$rows = (int)($frows/$fotoperrow+1);
$k=0;
for($i=0;$i<$rows;$i++) {
echo "<tr>\n";
for($j=0;$j<$fotoperrow;$j++) {
if($k>$frows-1) break;
echo "<td align=\"center\" valign=\"middle\">\n";
echo "<a href=\"".$flink."large/".mysql_result($fff,$k,0)."\" target=\"_blank\">";
echo "<img src=\"".$flink."small/".mysql_result($fff,$k,0)."\">";
echo "</a>";
echo "</td>\n";
$k++;
}
echo "</tr>\n";
//echo " ";
}
echo "</table>\n";
if(mysql_result($ffr,0,4)!=NULL)echo "<a href=\"".mysql_result($ffr,0,0)."zip/".mysql_result($ffr,0,4)."\">Все фото одним архивом</a>";
//Здесь должен находиться текст главного окна
echo " <br></td>
</tr>";
}
else
if($fv=="v") { //Если фото то
echo "
<tr>
<td width=\"200px\" valign=\"top\"><div class=\"nav\"><!-- Навигация -->";
//require("foto_navigation.php");
echo "<!--Конец Навигация --></div></td>
<td width=\"15px\" valign=\"top\"><img src=\"$design_path/vertical.png\" width=\"15\" height=\"250\" /></td>
<td valign=\"top\"> <!-- Тело2 --> ";
require("../code/under_construction.php");
//Здесь должен находиться текст главного окна
echo " <br></td>
</tr>";
}
else {
echo " <tr><td>";
require("top_foto.php");
echo "</td>
</tr>";
}
echo "
</table><div><img src=\"$design_path/gps.png\" align=\"right\" valign=\"bottom\"/></div>";
echo "
</td>
<td width=\"12\" class=\"body_right\"> </td>
</tr>
<tr>
<td height=\"12\" align=\"right\" valign=\"top\"><img src=\"$design_path/body-lb.png\" width=\"14\" height=\"12\" /></td>
<td height=\"12\" class=\"body_bottom\"> </td>
<td height=\"12\" valign=\"top\"><img src=\"$design_path/body-rb.png\" /></td>
</tr>
</table>
</div>
<!--Конец Тело --></td>
</tr>
<tr>
<td colspan=\"3\" class=\"footer\">
<!--Низ -->© Кафедра \"Компьютерные системы автоматизации производства\" МГТУ им. Н.Э.Баумана
</td><!--Конец Низ -->
</tr>
</table>
</body>
</html>"; ?>