Parašė Creatium· 2011 Geg. 7 19:05:04
#4
<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
define("THEME_BULLET", "<span class='bullet'>·</span>");
require_once INCLUDES."theme_functions_include.php";
function render_page($license=false) {
global $theme_width,$userdata,$settings,$locale,$data,$db_prefix,$lookup,$msg_count,$aidlink;
echo "<table align='center' cellpadding='0' cellspacing='0' class='paneles'>\n<tr>
<td align='right' width='956'>";
echo "</td>
</tr>
</table>";
echo "<table align='center' cellpadding='0' cellspacing='0' class='paneles2'>\n<tr>
<td align='right' width='558'>";
echo "</td>
<td align='left' width='251'>";
echo '<table>';
if (!isset($ip))
$ip = 'Nera';
if (!isset($port))
$port = 7777;
$fp = fsockopen('udp://' . $ip, $port, $errno, $errstr);
if (!$fp)
{
echo "<tr><td>Socket Error: $errno - $errstr</td></tr>\n";
}
else
{
$packet = 'SAMP';
$packet .= chr(strtok($ip, '.'));
$packet .= chr(strtok('.'));
$packet .= chr(strtok('.'));
$packet .= chr(strtok('.'));
$packet .= chr($port & 0xFF);
$packet .= chr($port >> 8 & 0xFF);
fwrite($fp, $packet.'i');
fread($fp, 11);
$is_passworded = ord(fread($fp, 1));
$plr_count = ord(fread($fp, 2));
$max_plrs = ord(fread($fp, 2));
$strlen = ord(fread($fp, 4));
$hostname = fread($fp, $strlen);
$strlen = ord(fread($fp, 4));
$gamemode = fread($fp, $strlen);
$strlen = ord(fread($fp, 4));
$mapname = fread($fp, $strlen);
echo '<tr><td width="100"><span style="font-family: Tahoma; font-size: 11px; color:#ffdfdf">Serverio ip:</span></td><td width="220" align="right"><span style="font-family: Tahoma; font-size: 11px; color:#ffdfdf">Nera.</span></b></td></tr>'."\n";
echo '<tr><td width="100"><span style="font-family: Tahoma; font-size: 11px; color:#ffdfdf">Žaidėjų:</span></td><td width="220" align="right"><span style="font-family: Tahoma; font-size: 11px; color:#ffdfdf">' . $plr_count . ' / ' . $max_plrs . '</span></td></tr>'."\n";
echo '<tr><td width="100"><span style="font-family: Tahoma; font-size: 11px; color:#ffdfdf">Versija:</span></td><td width="220" align="right"><span style="font-family: Tahoma; font-size: 11px; color:#ffdfdf">' . $gamemode . '</span></td></tr>'."\n";
echo '<tr><td width="100"><span style="font-family: Tahoma; font-size: 11px; color:#ffdfdf">Žemėlapis:</span></td><td width="220" align="right"><span style="font-family: Tahoma; font-size: 11px; color:#ffdfdf">' . $mapname . '</span></td></tr>'."\n";
if ($is_passworded)
{
echo '<tr><td width="100"><span style="font-family: Tahoma; font-size: 11px; color:#ffdfdf">Slaptažodis: </span></td><td width="220" align="right"><span style="font-family: Tahoma; font-size: 11px; color:#ffdfdf">Yra</span></td></tr>'."\n";
} else {
echo '<tr><td width="100"><span style="font-family: Tahoma; font-size: 11px; color:#ffdfdf">Slaptažodis: </span></td><td width="220" align="right"><span style="font-family: Tahoma; font-size: 11px; color:#ffdfdf">Nėra</span></td></tr>'."\n";
}
fwrite($fp, $packet.'c');
fread($fp, 11);
$plr_count = ord(fread($fp, 2));
if ($plr_count > 0)
{
}
fclose($fp);
}
echo '</table>';
echo "</td>
<td align='right' width='149'>";
echo "</td>
</tr>
</table>";
echo "<table align='center' cellpadding='0' cellspacing='0' width='956'>\n
<td>
<div id='containerr'>
<div id='sub-nav'>
<a href='".BASEDIR."index.php'></a>
<ul>
<li><a href='".BASEDIR."index.php'>Pagrindinis</a></li>
<li><a href='".FORUM."index.php'>Forumas</a></li>
<li><a href='".BASEDIR."downloads.php'>Siuntiniai</a></li>
<li><a href='".BASEDIR."search.php'>Paieška</a></li>
<li><a href='".BASEDIR."viewpage.php?page_id=2'>Paslaugos</a></li>
<li><a href='".BASEDIR."forum/viewforum.php?forum_id=11'>Emigracija</a></li>
<li><a href='".BASEDIR."video.php'>Video</a></li>
<li><a href='".BASEDIR."photogallery.php'>Nuotraukos</a></li>
<li><a href='".BASEDIR."contact.php'>Kontaktai</a></li>
</ul>
</div>
</td>
</table>\n";
if (!defined("IN_FUSION")) { die("Access Denied"); }
global $lastvisited;
if (!isset($lastvisited) || !isnum($lastvisited)) { $lastvisited = time(); }
$data = dbarray(dbquery("SELECT tt.thread_lastpost
FROM ".DB_FORUMS." tf
INNER JOIN ".DB_THREADS." tt ON tf.forum_id = tt.forum_id
WHERE ".groupaccess('tf.forum_access')."
ORDER BY tt.thread_lastpost DESC LIMIT ".($settings['numofthreads']-1).", ".$settings['numofthreads']));
$timeframe = empty($data['thread_lastpost']) ? 0 : $data['thread_lastpost'];
$result = dbquery(
"SELECT tt.thread_id, tt.thread_subject, tt.thread_views, tt.thread_lastuser, tt.thread_lastpost,
tt.thread_poll, tf.forum_id, tf.forum_name, tf.forum_access, tt.thread_lastpostid, tt.thread_postcount, tu.user_id, tu.user_name
FROM ".DB_THREADS." tt
INNER JOIN ".DB_FORUMS." tf ON tt.forum_id=tf.forum_id
INNER JOIN ".DB_USERS." tu ON tt.thread_lastuser=tu.user_id
WHERE ".groupaccess('tf.forum_access')." AND tt.thread_lastpost >= ".$timeframe."
ORDER BY tt.thread_lastpost DESC LIMIT 0,6 ");
if (dbrows($result)) {
$i = 0;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
while ($data = dbarray($result)) {
$row_color = ($i % 2 == 0 ? "tbl" : "tbl");
echo "<tr>\n<td class='".$row_color."'>";
if ($data['thread_lastpost'] > $lastvisited) {
$thread_match = $data['thread_id']."\|".$data['thread_lastpost']."\|".$data['forum_id'];
if (iMEMBER && preg_match("(^\.{$thread_match}$|\.{$thread_match}\.|\.{$thread_match}$)", $userdata['user_threads'])) {
}
}
if ($data['thread_poll']) {
$thread_poll = "<span class='small' style='font-weight:bold'>[".$locale['global_051']."]</span> ";
} else {
$thread_poll = "";
}
echo "</td>\n";
echo "<td width='100%' class='".$row_color."'>".$thread_poll."<a href='".FORUM."viewthread.php?thread_id=".$data['thread_id']."&pid=".$data['thread_lastpostid']."#post_".$data['thread_lastpostid']."' title='".$data['thread_subject']."'>".trimlink($data['thread_subject'], 46)."</a>\n</td>\n";
echo "<td width='20px' class='".$row_color."' style='text-align:center;white-space:nowrap'>".$data['thread_views']."</td>\n";
echo "<td width='20px' class='".$row_color."' style='text-align:center;white-space:nowrap'>".($data['thread_postcount']-1)."</td>\n";
echo "<td width='1%' class='".$row_color."' style='text-align:center;white-space:nowrap'><a href='".BASEDIR."profile.php?lookup=".$data['thread_lastuser']."'>".$data['user_name']."</a>\n</td>\n";
echo "</tr>\n";
$i++;
}
echo "</table>\n";
echo "</div>\n";
}
echo "</td>
<td align='center' width='20'>";
echo "</td>
</tr>
</table>";
echo "<table cellpadding='0' cellspacing='0' width='956' align='center' class='content'><tr>\n";
if (LEFT) { echo "<td class='side-border-left' valign='top' width='214'>".LEFT."</td>"; }
echo "<td class='main-bg' valign='top'>".U_CENTER.CONTENT.L_CENTER."</td>";
if (RIGHT) { echo "<td class='side-border-right' valign='top' width='214'>".RIGHT."</td>"; }
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' align='center' width=956' class='footer'>
<tr>
<td align='left'>
echo "".showcopyright()."<br />\n";
</td>
<td align='center'><br>
Copyright 2011 CS.Zones.LT Visos teisės saugomos.<br>
Powered By: <a href='skype:ignux04?chat' target='_blank'>Dubsteps</a>
<td align='right'>
</td>
</td>
</tr>
</table>\n";
}
function render_news($subject, $news, $info) {
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
echo "<td class='panel-left3'><img src='".THEME."images/blank.gif' width='8' height='36' alt='' style='display:block'></td>";
echo "<td width='100%' class='panel-main3'>$subject</td>";
echo "<td><div class='panel-news-img'><div class='placiau'><a href='".BASEDIR."news.php?readmore=".$info['news_id']."'>Skaityti daugiau</a><br>".showdate("%y.%m.%d", $info['news_date'])."</div></div></td>";
echo "<td class='panel-right3'><img src='".THEME."images/blank.gif' width='8' height='36' alt='' style='display:block'></td>";
echo "</tr></table>";
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
echo "<td class='border-left3'><img src='".THEME."images/blank.gif' width='10' height='10' alt='' style='display:block'></td>";
echo "<td class='main-body'><div style='width:100%;vertical-align:top;'>$news</div>";
echo "<div style='margin-top:5px'>";
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
echo "<td align='left' class='infobar'>";
echo "</td></tr></table></div></td>";
echo "<td class='border-right3'><img src='".THEME."images/blank.gif' width='10' height='10' alt='' style='display:block'>";
echo "</td></tr><tr>";
echo "<td class='border-bleft3'><img src='".THEME."images/blank.gif' width='10' height='16' alt='' style='display:block'></td>";
echo "<td class='border-bmain3'><img src='".THEME."images/blank.gif' width='1' height='16' alt='' style='display:block'></td>";
echo "<td class='border-bright3'><img src='".THEME."images/blank.gif' width='10' height='16' alt='' style='display:block'></td>";
echo "</tr></table><br>\n";
}
function render_article($subject, $article, $info) {
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
echo "<td class='panel-left3'><img src='".THEME."images/blank.gif' width='8' height='36' alt='' style='display:block'></td>";
echo "<td width='100%' class='panel-main3'>$subject</td>";
echo "<td class='panel-right3'><img src='".THEME."images/blank.gif' width='8' height='36' alt='' style='display:block'></td>";
echo "</tr></table>";
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
echo "<td class='border-left3'><img src='".THEME."images/blank.gif' width='10' height='10' alt='' style='display:block'></td>";
echo "<td class='article-body'><div style='width:100%;vertical-align:top;'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</div><br>";
echo "<div style='margin-top:5px'>";
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><br>";
echo "<td class='infobar2'>".articleposter($info," ·")."</td>";
echo "<td align='right' class='infobar2'>";
echo articleopts($info,"·").itemoptions("A",$info['article_id']);
echo "</td></tr></table></div></td>";
echo "<td class='border-right3'><img src='".THEME."images/blank.gif' width='10' height='10' alt='' style='display:block'></td>";
echo "</tr><tr>";
echo "<td class='border-bleft3'><img src='".THEME."images/blank.gif' width='10' height='16' alt='' style='display:block'></td>";
echo "<td class='border-bmain3'><img src='".THEME."images/blank.gif' width='1' height='16' alt='' style='display:block'></td>";
echo "<td class='border-bright3'><img src='".THEME."images/blank.gif' width='10' height='16' alt='' style='display:block'></td>";
echo "</tr></table><br>\n";
}
function opentable($title) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
echo "<tr><td class='panel-left2'><img src='".THEME."images/blank.gif' width='8' height='36' alt='' style='display:block'></td>";
echo "<td width='100%' class='panel-main2'>$title</td>";
echo "<td class='panel-right2'><img src='".THEME."images/blank.gif' width='8' height='36' alt='' style='display:block'></td>";
echo "</tr></table>";
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
echo "<td class='border-left2'><img src='".THEME."images/blank.gif' width='10' height='10' alt='' style='display:block'></td>";
echo "<td class='table-body'><br>\n";
}
function closetable() {
echo "</td>";
echo "<td class='border-right2'><img src='".THEME."images/blank.gif' width='10' height='10' alt='' style='display:block'></td></tr>";
echo "<tr>";
echo "<td class='border-bleft2'><img src='".THEME."images/blank.gif' width='10' height='16' alt='' style='display:block'></td>";
echo "<td class='border-bmain2'><img src='".THEME."images/blank.gif' width='1' height='16' alt='' style='display:block'></td>";
echo "<td class='border-bright2'><img src='".THEME."images/blank.gif' width='10' height='16' alt='' style='display:block'></td>";
echo "</tr></table><br>\n";
}
function openside($title) {
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
echo "<td class='panel-left'><img src='".THEME."images/blank.gif' width='8' height='34' alt='' style='display:block'></td>";
echo "<td width='100%' class='panel-main'>$title</td>";
echo "<td class='panel-right'><img src='".THEME."images/blank.gif' width='8' height='34' alt='' style='display:block'></td>";
echo "</tr></table>";
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr>";
echo "<td class='border-left'><img src='".THEME."images/blank.gif' width='10' height='10' alt='' style='display:block'></td>";
echo "<td class='side-body'><br>\n";
}
function closeside() {
global $panel_collapse;
if ($panel_collapse == true) { echo "</div>\n"; }
echo "</td>";
echo "<td class='border-right'><img src='".THEME."images/blank.gif' width='10' height='10' alt='' style='display:block'></td></tr>";
echo "<tr>";
echo "<td class='border-bleft'><img src='".THEME."images/blank.gif' width='10' height='16' alt='' style='display:block'></td>";
echo "<td class='border-bmain'><img src='".THEME."images/blank.gif' width='1' height='16' alt='' style='display:block'></td>";
echo "<td class='border-bright'><img src='".THEME."images/blank.gif' width='10' height='16' alt='' style='display:block'></td>";
echo "</tr></table><br>\n";
}
?>
Va, dabar bus kažkur apačioj. Jeigu nori kitoj vietoj jo, tai perkelk šią dalį į kitą vietą:
echo "".showcopyright()."<br />\n";