|
|
|
| JA ne magu rozobratsja 4o za prodlema mne nidajot brauzer. NA lokalnom kampjutere vsjo rabotaet a cot na bezplatnom xostinge vidajot asibku.
Parse error: syntax error, unexpected ';' in /www_host/hosts/nazvanie_sajta.sk6.ru/galereja/index.php on line 76
|
vot kod index.php
<?
/*
Скрипт: SmZgalleryFast v1.0
PHP: PHP 4.3 и выше
GDlib: 2
mySQL: -
Автор: SmZ-scripts (aka BAHO)
*/
include("config.php");
include("design/header.tpl");
?>
<style type="text/css">
<!--
.стиль3 {font-weight: bold}
.стиль4 {font-weight: bold}
.стиль5 {font-weight: bold}
.стиль6 {font-weight: bold}
.стиль7 {font-weight: bold}
.стиль8 {font-weight: bold}
-->
</style>
<table width="88%" align="center" bgcolor="#FFFFFF" class="main_border">
<tr>
<td valign=top colspan=2>
<?include("design/top.tpl");?></td>
</tr>
<td valign=top colspan=2><strong>
<?include("../blogs/menju2.php");?>
</a></strong></td>
<tr>
<td valign=top width=140 class="left">
<p class=nav_title>Галереи</p>
<p class=nav_linkp><a class='nav_link' href="index.php">3D-графика</a></p>
<?
$t=0;
$dir_menu=opendir("./files");
while($folder=readdir($dir_menu))
{
if($folder!="." && $folder!=".." && filetype("./files/$folder")=="dir")
{
chdir("./files/$folder");
#$scan_dir=opendir(".");
$t++;
if(file_exists("info.dat"))
{
$file=fopen("info.dat",r);
$title_cat=fgets($file);
clearstatcache();
}
else $title_cat="Категория $t";
$array_cat["$folder"]=ucfirst(trim($title_cat));
chdir("../../");
}
}
if(count($array_cat)>0)
{
asort($array_cat);
foreach($array_cat as $key=>$val)
{
$first=substr($val,0,1);?>
/* vot 76 stroka */
<p class="nav_linkp"><? if($first != $symbol) echo ;?>
<a class="nav_link" href="index.php?cat=<?echo rawurlencode($key);?>"><? echo$val; ?></a>
<?if($first!=$symbol) echo ;?></p>
<?
$symbol=$first;
}
}?></td>
<td valign=top align=center width=703><?
$cat=urldecode($cat);
if(file_exists("./files/$cat"))
{
chdir("./files/$cat");
$scan_dir=opendir(".");
while($scan_dir2=readdir($scan_dir))
{
$arr=explode(".",$scan_dir2);
$end=strtolower(end($arr));
if($scan_dir2!="." && $scan_dir2!=".." && in_array($end,$types)) $r++;
}
$pages=ceil($r/$f);
if($page=="" || $page=="0" || $page>$pages) $page=1;
if(file_exists("info.dat"))
{
$file=fopen("info.dat",r);
$title_cat=fgets($file);
clearstatcache();
}
else $title_cat="Категория NONAME";?>
<table class=tborder cellspacing=1 cellpadding=6 width="100%" align=center border=0>
<tr>
<td class=tcat colspan=<?echo$x;?>>Галерея: <?echo$title_cat;?>.
Всего фотографий: <?echo$r;?>.</td>
</tr>
<tr>
<td class=alt2 colspan=<?echo$x;?> valign=middle align=center><?
if($page>1) echo "<a href=\"index.php?cat=$cat&page=".($page-1)."\"><</a> ";?>
Страницы: <?pages($r);?><?
if($page<$pages) echo " <a
href=\"index.php?cat=$cat&page=".($page+1)."\">></a> ";?></td>
</tr><?
$i=$ii=1;
$start=($page-1)*$f+1;
$end=$page*$f;
$dir_gal=opendir(".");
while($image=readdir($dir_gal))
{
$arr=explode(".",$image);
$ext=strtolower(end($arr));
if($image!="." && $image!=".." && in_array($ext,$types) && filetype("$image")=="file")
{
if($ii>=$start && $ii<=$end)
{
if($i==1) echo "<tr>";
$info_img=getimagesize($image);
echo "<td class=alt2 valign=middle align=center><strong>:::: $ii ::::</strong><br>
<a href=\"full.php?cat=".urlencode($cat)."&img=$image\" target=_blank>
<img src=\"image.php?cat=".urlencode($cat)."&image=$image\" border=1></a>
<br>Название: ".str_replace(".$end","",$image)."<br>
<i>Размер: $info_img[0]x$info_img[1]</i></td>";
if($i==$x) { echo "</tr>"; $i=1; }
else $i++;
}
$ii++;
}
}?>
<tr>
<td class=alt2 colspan=<?echo$x;?> valign=middle align=center><?
if($page>1) echo "<a
href=\"index.php?cat=$cat&page=".($page-1)."\"><</a> ";?>
Страницы: <?pages($r);?><?
if($page<$pages) echo " <a
href=\"index.php?cat=$cat&page=".($page+1)."\">></a> ";?></td>
</tr>
</table>
<?
}
else
{?>
<table class=tborder cellspacing=1 cellpadding=6 width="100%" align=center border=0>
<tr>
<td class=tcat>Галлерея!</td>
</tr>
<tr>
<td class="alt1" align=middle><?include("design/index.tpl");?></td>
</tr>
</table><?
}?> </td>
</tr>
<tr>
<td valign=top colspan=2>
<table class=tborder cellspacing=1 cellpadding=6 width="100%" align=center border=0>
<tr>
<?include("design/top1.php");?>
</tr>
</table></td>
</tr>
</table>
|
| |
|
|
|
|
|
|
|
для: smartonc3
(01.11.2008 в 17:10)
| |
<? if($first != $symbol) echo ;?>
| А что должно быть выведено? =))) | |
|
|
|
|
|
|
|
для: Zend72
(01.11.2008 в 18:38)
| | SPS | |
|
|
|