$getTime= explode(' ', microtime()); $StartTime = $getTime[1] + $getTime[0]; //$url="http://inetman.mikrozoft.com/photos/salsa/060107/"; $OldErr = error_reporting(0); error_reporting($OldErr); $html_dir = "/home/coronel/public_html"; $div="photo"; $gid=$_GET["gid"]; $gid=$_GET["gid"]; if (!is_numeric($gid)) $gid=223; $year=$_GET["year"]; $subdiv=$gid; include ("servlist.php"); if ($gid == "") { $s=$_GET["s"]; $dir=$_GET["gal"]; $init = $_GET["init"]; } else { @mysql_pconnect ("localhost", "coronel_user", "coronet"); @mysql_select_db ("coronel_photo"); $query = "select * from ph_list where id='$gid'"; $result = mysql_query($query); $row = mysql_fetch_array($result); if ($row["id"] == "") { include($html_dir."/header.php"); //SERVERWIDE TOP print "ERROR! NO SUCH GALLERY!"; include($html_dir."/footer.php"); //SERVERWIDE BOTTOM die; } $gid=$row["id"]; $gidmonth=date("n",$row["date"]); $gidyear=date("Y",$row["date"]); $subdiv=$gid; $s=$row["server_id"]; $dir=$row["dirname"]; } $start=$_GET["start"]; $perpages = array(2,3,4,5,6,7,8); $perrow = 4; if ($_POST["galsize"] and is_numeric($_POST["galsize"]) and is_numeric($_POST["perrow"])) { $perrow = ceil($_POST["perrow"]); if (!$perrow) { $perrow = 4; } $galsize = ceil($_POST["galsize"]); //R u too clever? I've got a catch! if (!$galsize) { $galsize = 4; } settype($galsize,integer); settype($perrow,integer); setcookie('galsize', $galsize, time()+60*60*24*730, '/'); setcookie('perrow', $perrow, time()+60*60*24*730, '/'); $perpage=$galsize*$perrow; } else if ($_COOKIE["galsize"]) { $perrow=$_COOKIE["perrow"]; if (!$perrow) { $perrow = 4; } $galsize=$_COOKIE["galsize"]; $perpage=$_COOKIE["galsize"]*$perrow; } else { $perpage=16; $galsize = 4; $perrow = 4; } if (!$start) { $start=0; } //settin' URL and local URL... $query = "select * from servers where id='$s'"; $result = mysql_query($query); $row = mysql_fetch_array($result); $url = "http://". $row["path"] . $dir ."/"; //$url = "http://". ${"s".$s} . $dir ."/"; $lurl = $s."/".$dir."/"; $lpath = "/home/coronel/public_html/photo/".$s."/".$dir."/"; if ($s != 0) { //otherwise there will be errors... $handle = @file ($url ."dir.desc"); } if (!$handle and $s != 0) { include($html_dir."/header.php"); //SERVERWIDE TOP print "Извините, галерея была удалена либо сервер, на котором она была размещена, временно недоступен. Список галерей обновлён. Для выяснения причин произошедшего Вы можете связаться с администрацией сайта."; $link=@mysql_pconnect ("localhost", "coronel_photo", "salsaphoto") or die("Could not connect to MySQL server!"); @mysql_select_db ("coronel_photo"); $query="update ph_list set cat='x' where id='$gid'"; @mysql_query($query); //temporary block blocking @mysql_close($link); include($html_dir."/footer.php"); die; } //$file = @fopen ($lpath . "001tn.jpg", "r"); if ($s != 0) { //otherwise there will be errors... $handle = @file ($url ."dir.desc"); } if (!$handle and $init != "y" and $s != 0) { include($html_dir."/header.php"); //SERVERWIDE TOP print "ERROR! NO SUCH GALLERY!"; include($html_dir."/footer.php"); die; } include ("img_resize.php"); if ($gid=="") { $link=@mysql_pconnect ("localhost", "coronel_user", "coronet"); @mysql_select_db ("coronel_photo"); $query = "select * from ph_list where server_id='$s' and dirname='$dir'"; $result = mysql_query($query); $row = mysql_fetch_array($result); if ($row["id"] == "") { include($html_dir."/header.php"); //SERVERWIDE TOP print "ERROR! NO SUCH GALLERY!"; include($html_dir."/footer.php"); die; } $gid=$row["id"]; $subdiv=$gid; } else { $query = "select * from ph_list where id='$gid'"; $result = mysql_query($query); $row = mysql_fetch_array($result); } $addc=0; if (strpos($row["cat"], "s") !== false) { $add = "сальса"; $addc++; } if (strpos($row["cat"], "t") !== false) { $add = "танго"; $addc++; } $title="Фото"; $description = $row["name"]." - фотогалерея"; if ($addc == 1) { $title .= ": ".$add; $description .= " (".$add.")"; } $title .= " >> ".$row["name"]; $description .= " на coronel.ru"; $keywords = $row["keywords"]; $galname=$row["name"]; $ename=$row["ext_name"]; $galdate=$row["date"]; if (!$row["name"]) { $title .= $ename; } $owner=$row["owner_id"]; @mysql_close($link); include($html_dir."/header.php"); $link=@mysql_pconnect ("localhost", "coronel_user", "coronet"); @mysql_select_db ("coronel_photo"); ?>
От if ($owner != 0) { @mysql_select_db("coronel_main"); $queryy="select id, login, name, lastname from salseros where id=".$owner; $resulty = mysql_query($queryy) or die ($queryy.mysql_error()); $rowy = @mysql_fetch_array($resulty); ?> @mysql_select_db("coronel_photo"); } else { ?>coronel.ru } ?> | ">Главная страница раздела "Фото"
//Show number of comments
$query3="select count(*) as num from comments where gid='".$row["id"]."' and pid='".$row2["id"]."' and deleted != 1";
$result3 = mysql_query($query3);
$row3 = mysql_fetch_array($result3);
if ($row3["num"] > 0)
{
?> Комментарии () } ?> |
}
else
{
?>
} } ?> |
px;">
Смотрите также:
"> год. if ($row2["name"]) { $namex = str_replace( "\n", " ", $row2["name"] ); } else { $namex = str_replace( "\n", " ", $row2["ext_name"] ); } $namex = str_replace( "\r", "", $namex ); $namex = str_replace( "\"", """, $namex ); ?>""> if ($row2["name"]) { $namey = str_replace( "\n", " ", $row2["name"] ); } else { $namey = str_replace( "\n", " ", $row2["ext_name"] ); } $namey = str_replace( "\r", "", $namey ); ?>"> От if ($row2["owner_id"] != '0') { @mysql_select_db("coronel_main"); $queryz="select id, login, name, lastname from salseros where id=".$row2["owner_id"]; $resultz = mysql_query($queryz); $rowz = @mysql_fetch_array($resultz); ?> @mysql_select_db("coronel_photo"); } else { ?>coronel.ru } ?> } } unset ($pend); //print_r($addgals); ?> |
}
}
?>