SandPrince
Registered
абе правя едно сайтче и имам въпрос - тъй като сайта си го правя на HTML а някои от нещата които слагам като регистрационна форма и "последни теми във форумите" изискват PHP мога ли да ги добавя въпреки това
SandPrince каза:абе правя едно сайтче и имам въпрос - тъй като сайта си го правя на HTML а някои от нещата които слагам като регистрационна форма и "последни теми във форумите" изискват PHP мога ли да ги добавя въпреки това
SandPrince каза:тъй като сайта си го правя на HTML а някои от нещата които слагам като регистрационна форма и "последни теми във форумите" изискват PHP мога ли да ги добавя въпреки това
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>GameTrilogia-Българският фен сайт на играта Prince of Persia</title>
<meta name="keywords" content="Българският фен сайт , Prince of Persia">
<meta name="description" content="Българският фен сайт на играта Prince of Persia">
<script language="JavaScript">
</script>
</head>
<body bgcolor="#000000" onload="FP_preloadImgs(/*url*/'button7.gif',/*url*/'button8.gif')">
<p align="center"><img border="0" src="1.gif" width="770" height="195"></p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<div style="position: absolute; width: 767px; height: 19px; z-index: 10; left: 120px; top: 746px; background-color: #9B0000" id="layer17">
<p align="center"><b><span lang="en-us"><font size="2">Copyright </font>
<font size="2" face="Times New Roman">© 2006 GameTrilogia. All rights
reserved</font></span></b></div>
<p align="center"> </p>
<div style="position: absolute; width: 102px; height: 268px; z-index: 8; left: 121px; top: 361px; border: 2px solid #9B0000" id="layer13">
<div style="position: absolute; width: 531px; height: 100px; z-index: 1; left: 108px; top: 276px; border: 2px solid #9B0000; background-repeat: no-repeat" id="layer16">
<p align="center">
<span style="font-weight: 700; text-decoration: underline; background-repeat: no-repeat">
<font color="#FFFFFF">WebMaster : Ivan Savkov ( <span lang="bg">Иван
Савков)</span></font></span></p>
<p align="center"><font color="#FFFFFF">
<span style="background-repeat: no-repeat" lang="bg"><b>За контакти:</b>
</span><span style="background-repeat: no-repeat">
<a href="mailto:ivansavkov@abv.bg">ivansavkov@abv.bg</a> <span lang="bg"> <b>или
</b> <img border="0" src="1-skype.gif" width="42" height="39">
</span></span></font><span style="background-repeat: no-repeat">
<span lang="bg"><font color="#008000"><b> </b></font></span><font color="#008000"><b>shadow8060
(SandPrince)</b></font></span></div>
<span lang="bg"><font color="#9B0000"><b>Регистрация</b></font></span><div style="position: absolute; width: 114px; height: 310px; z-index: 2; left: 647px; top: 65px" id="layer18">
<a href="http://www.princeofpersiagame.com">
<img border="0" src="d2d_princepersia3_160x600.jpg" width="114" height="311"></a></div>
</div>
<div style="position: absolute; width: 242px; height: 291px; z-index: 6; left: 519px; top: 339px; border: 2px solid #9B0000" id="layer7">
<div style="position: absolute; width: 217px; height: 20px; z-index: 1; left: 10px; top: 6px; background-color: #D6951D" id="layer8">
<p align="center"><u><b><font color="#9B0000"><span lang="bg">Кой е
</span>online <span lang="bg">:</span></font></b></u></div>
<p> </p>
<div style="position: absolute; width: 216px; height: 237px; z-index: 2; left: 11px; top: 39px" id="layer9">
<?
$file = "db.txt";
$expire = "30";
$ip = $_SERVER['REMOTE_ADDR'];
if (!$open = fopen($file,'a')) { echo "No database"; }
$a = file($file);
$open = fopen($file,'w');
if (count($a) == "0") { fwrite($open, "$ip|" . time() . "n"); }
else {
foreach($a as $show) {
$part = explode("|", $show);
if ($part[1]+$expire <= time()) { }
else {
if ($ip == $part[0]) { }
else { fwrite($open, "$show"); }
}
}
fwrite($open, "$ip|" . time() . "n");
}
fclose($open);
echo "" . count(file($file)) . " user(s) online";
?> </div>
<p align="center"> </div>
<div style="position: absolute; width: 765px; height: 29px; z-index: 1; left: 121px; top: 212px; border: 1px dotted #9B0000" id="layer1">
<p align="left"><b>
<span lang="bg"><font face="Monotype Corsiva" size="5" color="#D6951D">
<img border="0" src="powwlogto.JPG" width="31" height="30"><a href="new_page_1.htm"><font color="#D6951D"><span style="text-decoration: none">Начало</span></font></a> </font>
</span><font face="Monotype Corsiva" size="5" color="#D6951D">
<a href="new_page_2.htm"><font color="#D6951D"><span style="text-decoration: none">PoPSOT </span></font></a><font face="Monotype Corsiva" size="5"> </font>
<a href="new_page_3.htm"><font color="#D6951D">
<span style="text-decoration: none">PoPWW </span></font></a><font face="Monotype Corsiva" size="5"> </font>
<a href="new_page_4.htm"><font color="#D6951D">
<span style="text-decoration: none">PoPTTT </span></font></a><font face="Monotype Corsiva" size="5"> </font> <span lang="bg">
<a href="new_page_5.htm"><font color="#D6951D">
<span style="text-decoration: none">Видео</span></font></a><font face="Monotype Corsiva" size="5"> </font>
<a href="new_page_6.htm"><font color="#D6951D">
<span style="text-decoration: none">Теглене </span></font></a><font face="Monotype Corsiva" size="5"> </font>
<a href="http://www.gametrilogia.phpbb3.net"><font color="#D6951D">
<span style="text-decoration: none">Форум</span></font></a><font face="Monotype Corsiva" size="5"> </font>
<a href="new_page_7.htm"><font color="#D6951D">
<span style="text-decoration: none">Линкове</span></font></a>
<img border="0" src="POP.jpg" width="32" height="30"></span></font></b></div>
<div style="position: absolute; width: 529px; height: 77px; z-index: 2; left: 232px; top: 253px; border: 2px solid #9B0000; background-image: url('fond5.jpg'); background-repeat: no-repeat" id="layer2">
<p align="center"><u><b><span lang="bg"><font color="#FFFFFF" size="4">Добре
дошли!</font></span></b></u></p>
<p align="center"><font color="#9B0000"><span lang="bg"><b>Добре дошли в
българският фен сайт на играта</b> </span><b><font face="Calligraphic">
Prince of Persia </font>!</b></font></div>
<div style="position: absolute; width: 103px; height: 100px; z-index: 3; left: 122px; top: 252px; border: 2px solid #9B0000" id="layer3">
<p align="center"><span lang="bg"><font color="#9B0000"><b>Търсене:</b></font></span></p>
<div style="position: absolute; width: 87px; height: 69px; z-index: 1; left: 0px; top: 21px" id="layer10">
<b><font size="4" color="#0000FF"> G</font><font size="4" color="#FF0000">o</font><font size="4"><font color="#FFFF00">o</font><font color="#0000FF">g</font><font color="#00FF00">l</font></font><font size="4" color="#FF0000">e</font></b><TABLE cellSpacing=0 cellPadding=0 id="table1">
<TBODY>
<TR>
<TD width="25%" style="font-family: arial,sans-serif"> </TD>
<TD align=middle style="font-family: arial,sans-serif">
<INPUT
title="Google Търсене" maxLength=2048 size=9 name=q><BR>
<a href="www.google.com">
<img border="0" id="img1" src="button6.gif" height="15" width="76" alt="Търси" onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button7.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button6.gif')" onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button8.gif')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button7.gif')" fp-style="fp-btn: Metal Capsule 2; fp-transparent: 1" fp-title="Търси"></a></TD>
<TD vAlign=top noWrap width="25%" style="font-family: arial,sans-serif"><FONT size=-2> </FONT></TD></TR>
<TR>
<TD align=middle colSpan=3 style="font-family: arial,sans-serif"> </TD></TR></TBODY></TABLE>
</div>
<p align="center"> </div>
<div style="position: absolute; width: 116px; height: 100px; z-index: 4; left: 769px; top: 252px; border: 2px solid #9B0000" id="layer4">
<p align="center"><b><span lang="bg"><font color="#9B0000">Приятели</font></span></b></p>
<p align="center"><font color="#9B0000" face="Bauhaus 93" size="5">
<a href="http://www.walda2.free.bg"><span style="text-decoration: none">
<font color="#D6951D">Walda2</font></span></a></font></p>
<p align="center"><font face="Calligraphic" size="5" color="#FF0000">
<a href="http://www.pop-ttt.com"><span style="text-decoration: none">
<font color="#D6951D">PoP-TTT</font></span></a></font></p>
<p align="center"><font face="Autumn" size="5" color="#FF0000">
<a href="http://www.dad2.com"><span style="text-decoration: none">
<font color="#D6951D">Dada2</font></span></a></font></div>
<div style="position: absolute; width: 273px; height: 291px; z-index: 9; left: 232px; top: 339px; border: 2px solid #9B0000" id="layer14">
<div style="position: absolute; width: 253px; height: 22px; z-index: 1; left: 9px; top: 7px; background-color: #D6951D" id="layer15">
<p align="center"><b><span lang="bg"><font color="#9B0000">Последни теми
във форумите</font></span></b></div>
<p> </p>
<p align="left"> <body bgcolor="black" link="blue" alink="blue" vlink="blue"><font size="1" color="blue"><center>Последните 10 теми от форума</center>
<?
function mysqlerror($err) {
global $mysql;
if ($mysql == "off") return;
echo $err . "<br><b>" . mysql_error() . "</b>";
exit;
}
function mysqlconnect() {
global $mysqlid, $mysqlhost, $mysqllogin, $mysqlpass, $mysqldb;
if ($mysqlid) return;
$mysqlid = mysql_connect($mysqlhost, $mysqllogin, $mysqlpass) or mysqlerror("Неможе да се свържем към $mysqlhost");
mysql_select_db($mysqldb, $mysqlid) or mysqlerror("Не съществува такава база данни $mysqldb");
}
function mysqlclose() {
global $mysqlid;
if ($mysqlid) @mysql_close($mysqlid);
}
function mysqlquery($sql) {
global $mysqlid;
if (!$mysqlid) mysqlconnect();
$res = mysql_query($sql, $mysqlid) or mysqlerror($sql);
return $res;
}
register_shutdown_function("mysqlclose");
// MySQL loading ----------------------------------------------
$mysqlid = 0;
$mysqlhost = 'localhost';
$mysqldb = 'gametrilogia';
$mysqllogin = 'gametrilogia';
$mysqlpass = 'zxcvbnm';
mysqlconnect();
// END MySQL loading ----------------------------------------------
$table_prefix = "префикса на таблиците по подразбиране е php_";
$forum_url = "http:// http://gametrilogia.phpbb3.net/forums.html";
$news_forum_id = 2;
$number_of_news = 10;
$date_format = "d.m.Y, G:i:s";
$query = "SELECT
t.`topic_id`,
t.`topic_title`,
p.`post_time`,
p.`post_username`,
p.`poster_id`,
u.`username`
FROM
`" . $table_prefix . "topics` as t,
`" . $table_prefix . "posts` as p,
`" . $table_prefix . "posts_text` as pt,
`" . $table_prefix . "users` as u
WHERE
t.`topic_first_post_id` = p.`post_id` AND
t.`topic_first_post_id` = pt.`post_id` AND
p.`poster_id` = u.`user_id` AND
t.`forum_id` = '" . $news_forum_id . "'
ORDER BY p.`post_time` DESC
LIMIT $number_of_news";
$result = mysqlquery($query);
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
?>
<br>
<a href="<?= $forum_url ?>viewtopic.php?t=<?= $row['topic_id'] ?>">
<?= $row['topic_title'] ?>
<?= nl2br($row['post_text']) ?>
<? } ?>
</font></body>
</div>
</body>
</html>