[EF IV] Zniknięcie prawej tabeli
|
giegur |
Dodany dnia 25.03.2009 07:25:28
|
Przedszkolak
Postów: 14 Ostrzeżeń: 2
Data rejestracji: 18.09.2007 15:30
|
Witam,
Otóż mam taki problem gdy wgram theme na inny serwer to jest wszystko ok a jak u siebie mam ten theme to mi sie wali cała tabela po prawej stronie.
jak dodaje 2 newsa na stronie to tak się robi bo jak jest tylko jeden news to wszsytko dobrze,ale jak już 2 to prawa tabelka znika a tabelka z newsem sie przemieszcza troche od lewej tabelki.
To jest mój theme:
<?
// theme settings
$body_text = "#ffffff";
$body_bg = "#3C3C3C";
$theme_width = "950";
$theme_width_l = "221";
$theme_width_r = "215";
function render_header($header_content) {
global $theme_width,$settings,$db_prefix,$aidlink,$userdata,$locale,$result,$dbrows,$conline,$cusers,$holdtotday,$datetime;
echo "
<div id='container'>
<div id='bar'><span id='data2'><A HREF=# onClick=\"this.style.behavior='url(#default#homepage)'; this.setHomePage('".$settings['http://discomix.eu']."')\">startowa</A> | <script>function bookmark(){var title='DISCOMIX.eu'var url='http://www.discomix.eu/news.php' if (window.sidebar) window.sidebar.addPanel(title, url,''); else if( window.opera && window.print ){var mbm = document.createElement('a');mbm.setAttribute('rel','sidebar');mbm.setAttribute('href',url);mbm.setAttribute('title',title);mbm.click();} else if( document.all ) window.external.AddFavorite( url, title); }</script><a href='javascript:bookmark()'>ulubione</a></span><span style='float: left; padding: 0 0 0 459;'><a href='search.php'><img src='".THEME."images/1.png'></a><a href='index.php'><img src='".THEME."images/2.png'></a><a href='contact.php'><img src='".THEME."images/3.png'></a></span><span id='data'>Godzina: ".$locale['WWOLD_701']." <span id=\"digitalclock\"></span></center>
<script type='text/javascript'>
function calctime() {
var currenttime = new Date();
var hours = currenttime.getHours();
var minutes = currenttime.getMinutes();
var seconds = currenttime.getSeconds();
if (hours == 0) { hours = 12; }
if (hours < 10) { hours = \"0\" + hours; }
if (minutes < 10) { minutes = \"0\" + minutes; }
if (seconds < 10) { seconds = \"0\" + seconds; }
var clocklocation = document.getElementById('digitalclock');
clocklocation.innerHTML = hours + \":\" + minutes + \":\" + seconds;
setTimeout(\"calctime()\", 1000);
}
calctime();
</script>
</span></div>
<div id='header'>
<div style='float: left;background: url(".THEME."images/topbkg1.jpg); width: 341px; height: 197px; text-align: left;'></div>
<div style='float: left;background: url(http://discomix.eu/themes/styl/images/topbkg2.jpg); width: 289px; height: 197px;'></div>
<div style='float: left;background: url(http://discomix.eu/themes/styl/images/topbkg3.jpg); width: 320px; height: 197px;'></div>
</div>";
echo "
<div id='navigation'><img src='".THEME."images/menu1.jpg'><a href='".BASEDIR."index.php'><img src='".THEME."images/menu2.jpg'></a><a href='".BASEDIR."downloads.php'><img src='".THEME."images/menu3.jpg'></a><a href='#'><img src='".THEME."images/menu4.jpg'></a><a href='".BASEDIR."contact.php'><img src='".THEME."images/menu5.jpg'></a><img src='".THEME."images/menu6.jpg'></div>
<div id='panels'>
<div id='pan1'><div class='panl'>";
echo "Gości Online: <b>".dbrows($result)."</b><br>";
$data = dbarray(dbquery("SELECT user_id,user_name,user_color,user_prefix FROM ".$db_prefix."users WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1"));
echo "".$locale['016']." <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side' style='color:#".$data['user_color']."'><b>".$data['user_prefix'].$data['user_name']."</b></a>";
$result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user='0'");
$datetime=strtotime( "data w formacje rrrr-mm-dd" );
$date2=strtotime("NOW");
$holdtotday=intval(($datetime-$date2)/-86400);
echo " </br>Istniejemy ju: <b>".$holdtotday. "</b> dni.<br>";
echo "Zarejestrowanych uytkownikw: <b>".number_format(dbcount("(user_id)", "users", "user_status<='1'"))."";
echo"
</div></div>
<div id='pan2'><div class='pan'>";
if (file_exists(INFUSIONS."last_seen_users_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."last_seen_users_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."last_seen_users_panel/locale/English.php";
}
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit>'0' AND user_status='0' ORDER BY user_lastvisit DESC LIMIT 0,10");
echo "<table cellpadding='0' cellspacing='0' width='175px'>";
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$lastseen = time() - $data['user_lastvisit'];
$iW=sprintf("%2d",floor($lastseen/604800));
$iD=sprintf("%2d",floor($lastseen/(60*60*24)));
$iH=sprintf("%02d",floor((($lastseen%604800)%86400)/3600));
$iM=sprintf("%02d",floor(((($lastseen%604800)%86400)%3600)/60));
$iS=sprintf("%02d",floor((((($lastseen%604800)%86400)%3600)%60)));
if ($lastseen < 60){
$lastseen= $locale['lsup001'];
} elseif ($lastseen < 360){
$lastseen= $locale['lsup002'];
} elseif ($iW > 0){
if ($iW == 1) { $text = $locale['lsup003']; } else { $text = $locale['lsup004']; }
$lastseen = $iW." ".$text;
} elseif ($iD > 0){
if ($iD == 1) { $text = $locale['lsup005']; } else { $text = $locale['lsup006']; }
$lastseen = $iD." ".$text;
} else {
$lastseen = $iH.":".$iM.":".$iS;
}
echo "<tr>\n<td class='side-small' align='left'><img src='".THEME."images/bullet.gif' alt=''>\n";
echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".$data['user_name']."' class='side'>\n";
echo trimlink($data['user_name'], 20)."</a></td><td class='side-small' align='right'>".$lastseen."</td>\n</tr>\n";
}
}
echo "</table>";
echo " </div></div>
<div id='pan3'><div class='pan'>
Panel w trakcie modernizacji
zapraszamy wszystkich
na nowo otwarte forum
serwisu DiscoMix.Eu
pod adresem:
Niedugo!
</div></div>
<div id='pan4'><div class='pan'>";
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if (file_exists(INFUSIONS."popular_downloads_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."popular_downloads_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."popular_downloads_panel/locale/English.php";
}
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<tr>\n<td class='small'><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a></td>\n
<td align='right'>".$data['download_count']."</td>\n</tr>\n";
}
echo "</table>";
} else {
echo "<center>".$locale['004']."</center>\n";
}
echo"
</div></div>
<div id='pan5'><div class='panr'>fd</div></div>
</div>
";
echo "<table width='950' cellspacing='0' cellpadding='0' align='left'>\n<tr>\n";
}
function render_footer($license=false) {
global $theme_width,$settings,$db_prefix;
echo "</tr>\n</table>\n";
echo "
<div style='clear:both;'></div>
<div id='panels2'>
<div id='dpan1'><div class='panl'>"; include INFUSIONS.'latest_images_panel/latest_images_panel.php'; echo "</div></div>
<div id='dpan2'><div class='pan'></div></div>
<div id='dpan3'><div class='panr'>"; include INFUSIONS.'newsletter_panel/newsletter_panel.php'; echo "</div></div>
</div>
<div style='clear:both;'></div>
<div id='footer'><p id='copyright'>Design by Stivmajster || Copyright @ 2009 discomix.eu || CMS: <a href='http://extreme-fusion.pl'>Extreme Fusion</a> || Code by <a href='http://iPeace.deviantart.com'>Peace</a></p></div>
</div>
\n";
}
function render_news($subject, $news, $info) {
global $settings;
echo "
<div class='news'>
<div id='hav'><h1>$subject</h1></div>
<div class='post'>$news</div>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<div style='height: 1px; width: 560px; margin: 0 0 0 7; background: #313131;'></div>
<td class='infobar'>
<font color='#C5C5C5'>Doda ".$locale['040']."<a style='color: #971213;' href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> dnia:
".$locale['041'].showdate("longdate", $info['news_date'])."
</td>
<td align='right' class='infobar'>
".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "")."
komentarze: <a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> czyta:
".$info['news_reads'].$locale['044']."
<a href='print.php?type=N&item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a></font>
</td>
</tr>
</table>
<div class='nifty'><img src='".THEME."images/nifty.gif'></div>
</div>\n";
function render_movie($subject, $movie, $info) {
global $locale;
include LOCALE.LOCALESET."movies.php";
opentable($subject);
echo "<div align='center'><table cellpadding='0' cellspacing='0' style='border-collapse: collapse; background-color:#;' width='100%' class='border'>";
$r = substr($movie, -3, 3);
if ($r=="wmv") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' flashvars='gcode=482CD697' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' width='400' height='350' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0'></embed><br><br>";
}elseif ($r=="mpg") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' flashvars='gcode=482CD697' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' width='400' height='350' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0'></embed><br><br>";
}elseif ($r=="avi") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' flashvars='gcode=482CD697' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' width='400' height='350' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0'></embed><br><br>";
}elseif ($r=="swf") {
echo "<div align='center'>";
echo"<br><br><OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'codebase='http://download.macromedia.com/pub/shckwave/cabs/flash/swflash.cab#version=5,0,0,0' WIDTH='550' HEIGHT='400' id='grmovie' name='grmovie'>
<PARAM NAME=movie VALUE='$movie'>
<param name='menu' value='false'>
<param name='quality' value='high'>
<param name='FlashVars' value='gcode=482CD697'>
<embed src='$movie' flashvars='gcode=482CD697' menu=false quality=high WIDTH='550' HEIGHT='400' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' id='grmovie' name='grmovie'></embed></object><br><br>";
}elseif ($r=="mp3") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/ ' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0' height='70' width='300'></embed><br><br>";
}elseif ($r=="wma") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/ ' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0' height='70' width='300'></embed><br><br>";
}elseif ($r=="mov") {
echo "<div align='center'>";
echo "<br><br><embed type='video/quicktime' src='$movie' controller='true' target='myself' pluginspage='http://www.apple.com/quicktime/download/' loop='FALSE' autoplay='true' border='1' height='380' width='460'></embed><br><br>";
}elseif ($r=="txt") {
echo "<div align='left'><br><br>";
$buff = nl2br(file_get_contents($movie));
echo $buff."</div><br><br>";
}else{
echo "<div align='center'>";
echo "<br><br><embed src='$movie' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' height='372' width='416'><br><br>";
}
echo "</div></table></div>";
closetable();
}
}
function render_article($subject, $article, $info) {
echo "
<div class='news'>
<div id='hav'><h1>$subject</h1></div>
<div class='post'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</div>
<div class='who'>".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>
".$locale['041'].showdate("longdate", $info['news_date'])."
".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "")."
<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> ·
".$info['news_reads'].$locale['044']."
<span class='print'>
<a href='print.php?type=N&item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a></span></div>
<div class='nifty'><img src='".THEME."images/nifty.gif'></div>
</div>
\n";
}
function opentable($title) {
echo "<div class='news'>
<div id='hav'><h1>$title</h1></div>
<div class='post'>\n";
}
function closetable() {
echo "</div>
<div class='nifty'><img src='".THEME."images/nifty.gif'></div>
</div>\n";
}
function openside($title) {
echo "<div class='panel'>
<div class='nagl'><p class='menu'>$title</p></div><div class='paneltext'>
\n";
}
function closeside() {
echo " </div><div class='nifty2'><img src='".THEME."images/niftysmall.gif'></div>
</div>\n";
tablebreak();
}
function opensidex($title,$state="on") {
$boxname = str_replace(" ", "", $title);
echo "<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>
<td class='tableHeadingBG'>
<div class='tableHeading'>$title</div></td>
<td align='right' class='tableHeadingBG'>".panelbutton($state,$boxname)."</td>
</tr>
<tr><td class='td-cell1' vAlign='top' colspan='2'>
<div id='box_$boxname'".($state=="off"?" style='display:none'":"").">\n";
}
function closesidex() {
echo "</div></td></tr>
</table>\n";
tablebreak();
}
function tablebreak() {
echo " \n";
}
?>
Kliknij i zaczekaj na załadowanie kodu ...
PW od moderatora:
- Zmiana nazwy tematu - chemix 25.03 - 08:31
Edytowane przez Pieka dnia 25.03.2009 18:37:25
|
|
|
|
Wścibski Gość |
Dodany dnia 22.12.2024 19:51:30
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
migo |
Dodany dnia 25.03.2009 11:12:40
|
Przedszkolak
Postów: 80 Pomógł: 5 Ostrzeżeń: 4
Data rejestracji: 01.03.2009 10:53
Złamana licencja
|
Daj link do strony będzie trochę łatwiej to zobaczyć.
Edytowane przez Chemikpil dnia 25.03.2009 12:15:31
|
|
|
|
giegur |
Dodany dnia 25.03.2009 11:58:15
|
Przedszkolak
Postów: 14 Ostrzeżeń: 2
Data rejestracji: 18.09.2007 15:30
|
www.discomix.eu
login i haslo strona |
|
|
|
piotrek199214 |
Dodany dnia 25.03.2009 14:43:10
|
Bywalec
Postów: 977 Pomógł: 168
v7.01.05 Data rejestracji: 17.12.2007 21:05
|
Zobacz czy w pliku news.php masz na samym dole:
require_once "side_right.php";
Bo jak widać na innych podstronach strony jest wszystko OK.
A i jeszcze jedno proszę dodać stopkę od PHP-Fusion.
Powered by PHP-Fusion
PHP-Fusion - podlinkowane do oficjalnej strony.
Edytowane przez piotrek199214 dnia 25.03.2009 14:46:38
Pomogłem Ci? Wystarczy podziękować i oznaczyć post jako pomocny
Tanie tworzenie wtyczek, masz problem napisz.
|
|
|
|
giegur |
Dodany dnia 25.03.2009 15:56:39
|
Przedszkolak
Postów: 14 Ostrzeżeń: 2
Data rejestracji: 18.09.2007 15:30
|
Hmm u góry masz mój plik z themem bo jak szukałem tego co ty mi napisałeś to nie znalazłem ale mogłem się mylić i nawet nie wiem gdzie by to wstawić.
Jeśli byś mogł to mnie nakieruj jakoś a ja to dodam albo poprostu zmienń ten theme u góry co dodałem
pozdrawiam
Edytowane przez Pieka dnia 25.03.2009 19:34:46
|
|
|
|
piotrek199214 |
Dodany dnia 25.03.2009 16:09:36
|
Bywalec
Postów: 977 Pomógł: 168
v7.01.05 Data rejestracji: 17.12.2007 21:05
|
W głównym katalogu strony masz plik o nazwie news.php wchodzisz i zjeżdżasz na sam dół i patrzysz czy posiadasz taki kod:
require_once "side_right.php";
require_once "footer.php";
jeżeli masz tylko
require_once "footer.php";
to przed tym dodajesz:
require_once "side_right.php";
Pomogłem Ci? Wystarczy podziękować i oznaczyć post jako pomocny
Tanie tworzenie wtyczek, masz problem napisz.
|
|
|
|
giegur |
Dodany dnia 25.03.2009 16:12:36
|
Przedszkolak
Postów: 14 Ostrzeżeń: 2
Data rejestracji: 18.09.2007 15:30
|
I zrobiłem to no ale jest to co napisałeś... wejdz na discomix.ugu.pl tam wszsytko jest ok dodalem 2 news i ok bylo. nie patrz tam na błedy bo wtedy wszsytko nie było skończone.
Edytowane przez Chemikpil dnia 25.03.2009 18:24:59
|
|
|
|
piotrek199214 |
Dodany dnia 25.03.2009 17:09:07
|
Bywalec
Postów: 977 Pomógł: 168
v7.01.05 Data rejestracji: 17.12.2007 21:05
|
A pokaż zawartość pliku news.php
Pomogłem Ci? Wystarczy podziękować i oznaczyć post jako pomocny
Tanie tworzenie wtyczek, masz problem napisz.
|
|
|
|
giegur |
Dodany dnia 25.03.2009 18:12:51
|
Przedszkolak
Postów: 14 Ostrzeżeń: 2
Data rejestracji: 18.09.2007 15:30
|
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fu...
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
if (isset($readmore) && !isNum($readmore)) fallback(FUSION_SELF);
// Predefined variables, do not edit these values
if ($settings['news_style'] == "1") { $i = 0; $rc = 0; $ncount = 1; $ncolumn = 1; $news_[0] = ""; $news_[1] = ""; $news_[2] = ""; } else { $i = 1; }
// This number should be an odd number to keep layout tidy
$items_per_page = 11;
if (!isset($readmore)) {
$rows = dbcount("(news_id)", "news", groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")");
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$result = dbquery(
"SELECT tn.*, tc.*, user_id, user_name FROM ".$db_prefix."news tn
LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
LEFT JOIN ".$db_prefix."news_cats tc ON tn.news_cat=tc.news_cat_id
WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")
ORDER BY news_sticky DESC, news_datestamp DESC LIMIT $rowstart,$items_per_page"
);
$numrows = dbrows($result);
if ($settings['news_style'] == "1") $nrows = round((dbrows($result) - 1) / 2);
while ($data = dbarray($result)) {
$news_cat_image = "";
$news_subject = "<a name='news_".$data['news_id']."' id='news_".$data['news_id']."'></a>".stripslashes($data['news_subject']);
if ($data['news_cat_image']) {
$news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat_id']."'><img src='".IMAGES_NC.$data['news_cat_image']."' alt='".$data['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px'></a>";
} else {
$news_cat_image = "";
}
$news_news = $data['news_breaks'] == "y" ? nl2br(parsesmileys(stripslashes($data['news_news']))) : parsesmileys(stripslashes($data['news_news']));
if ($news_cat_image != "") $news_news = $news_cat_image.$news_news;
$news_info = array(
"news_id" => $data['news_id'],
"user_id" => $data['user_id'],
"user_name" => $data['user_name'],
"news_date" => $data['news_datestamp'],
"news_ext" => $data['news_extended'] ? "y" : "n",
"news_reads" => $data['news_reads'],
"news_comments" => dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id='".$data['news_id']."'"),
"news_allow_comments" => $data['news_allow_comments']
);
if ($settings['news_style'] == "1") {
if ($rows <= 2 || $ncount == 1) {
$news_[0] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
$news_[0] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
$news_[0] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
$news_[0] .= "<tr>\n<td align='center' class='tbl2'>\n";
if (checkrights("N")) $news_[0] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&news_id=".$news_info['news_id']."'>\n";
$news_[0] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date'])." ·\n";
if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
$news_[0] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$locale['042']."</a> ·\n" : "";
$news_[0] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> ·\n" : "";
$news_[0] .= $news_info['news_reads'].$locale['044']." ·\n";
}
$news_[0] .= "<a href='print.php?type=N&item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>";
if (checkrights("N")) { $news_[0] .= " · <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[0] .= "</span>\n"; }
$news_[0] .= "</td>\n</tr>\n</table>\n";
if ($ncount != $rows) $news_[0] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
} else {
if ($i == $nrows && $ncolumn != 2) { $ncolumn = 2; $i = 0; }
$row_color = ($rc % 2 == 0 ? "tbl2" : "tbl1");
$news_[$ncolumn] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
$news_[$ncolumn] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
$news_[$ncolumn] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
$news_[$ncolumn] .= "<tr>\n<td align='center' class='tbl2'>\n";
if (checkrights("N")) $news_[$ncolumn] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&news_id=".$news_info['news_id']."'>\n";
$news_[$ncolumn] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date']);
if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
$news_[$ncolumn] .= "<br>\n";
$news_[$ncolumn] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$locale['042']."</a> ·\n" : "";
$news_[$ncolumn] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> ·\n" : "";
$news_[$ncolumn] .= $news_info['news_reads'].$locale['044']." ·\n";
} else {
$news_[$ncolumn] .= " ·\n";
}
$news_[$ncolumn] .= "<a href='print.php?type=N&item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>\n";
if (checkrights("N")) { $news_[$ncolumn] .= " · <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[$ncolumn] .= "</span>\n"; }
$news_[$ncolumn] .= "</td>\n</tr>\n</table>\n";
if ($ncolumn == 1 && $i < ($nrows - 1)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
if ($ncolumn == 2 && $i < (dbrows($result) - $nrows - 2)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
$i++; $rc++;
}
$ncount++;
} else {
render_news($news_subject, $news_news, $news_info);
if ($i != $numrows) { tablebreak(); } $i++;
}
}
if ($settings['news_style'] == "1") {
opentable($locale['046']);
echo "<table cellpadding='0' cellspacing='0' style='width:100%'>\n<tr>\n<td colspan='3' style='width:100%'>\n";
echo $news_[0];
echo "</td>\n</tr>\n<tr>\n<td style='width:50%;vertical-align:top;'>\n";
echo $news_[1];
echo "</td>\n<td style='width:10px'><img src='".THEME."images/blank.gif' alt='' width='10' height='1'></td>\n<td style='width:50%;vertical-align:top;'>\n";
echo $news_[2];
echo "</td>\n</tr>\n</table>\n";
closetable();
}
if ($rows > $items_per_page) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$items_per_page,$rows,3)."\n</div>\n";
} else {
opentable($locale['046']);
echo "<center><br>\n".$locale['047']."<br><br>\n</center>\n";
closetable();
}
} else {
include INCLUDES."comments_include.php";
include INCLUDES."ratings_include.php";
$result = dbquery(
"SELECT tn.*, user_id, user_name FROM ".$db_prefix."news tn
LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
WHERE news_id='$readmore'"
);
if (dbrows($result)!=0) {
$data = dbarray($result);
if (checkgroup($data['news_visibility'])) {
$news_cat_image = "";
if (!isset($_POST['post_comment']) && !isset($_POST['post_rating'])) {
$result2 = dbquery("UPDATE ".$db_prefix."news SET news_reads=news_reads+1 WHERE news_id='$readmore'");
$data['news_reads']++;
}
$news_subject = $data['news_subject'];
if ($data['news_cat'] != 0) {
$result2 = dbquery("SELECT * FROM ".$db_prefix."news_cats WHERE news_cat_id='".$data['news_cat']."'");
if (dbrows($result2)) {
$data2 = dbarray($result2);
$news_cat_image = "<a href='news_cats.php?cat_id=".$data2['news_cat_id']."'><img src='".IMAGES_NC.$data2['news_cat_image']."' alt='".$data2['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px'></a>";
}
}
$news_news = parsesmileys(stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news']));
if ($data['news_breaks'] == "y") { $news_news = nl2br($news_news); }
if ($news_cat_image != "") $news_news = $news_cat_image.$news_news;
$news_info = array(
"news_id" => $data['news_id'],
"user_id" => $data['user_id'],
"user_name" => $data['user_name'],
"news_date" => $data['news_datestamp'],
"news_ext" => "n",
"news_reads" => $data['news_reads'],
"news_comments" => dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id='".$data['news_id']."'"),
"news_allow_comments" => $data['news_allow_comments']
);
render_news($news_subject, $news_news, $news_info);
if ($data['news_allow_comments']) showcomments("N","news","news_id",$readmore,FUSION_SELF."?readmore=$readmore");
if ($data['news_allow_ratings']) showratings("N",$readmore,FUSION_SELF."?readmore=$readmore");
} else {
redirect(FUSION_SELF);
}
} else {
redirect(FUSION_SELF);
}
}
require_once "side_right.php";
require_once "footer.php";
?> Kliknij i zaczekaj na załadowanie kodu ... |
|
|
|
piotrek199214 |
Dodany dnia 25.03.2009 18:41:21
|
Bywalec
Postów: 977 Pomógł: 168
v7.01.05 Data rejestracji: 17.12.2007 21:05
|
Nadpisz stary plik theme.php na ten: <?
// theme settings
$body_text = "#ffffff";
$body_bg = "#3C3C3C";
$theme_width = "950";
$theme_width_l = "221";
$theme_width_r = "215";
function render_header($header_content) {
global $theme_width,$settings,$db_prefix,$aidlink,$userdata,$locale,$result,$dbrows,$conline,$cusers,$holdtotday,$datetime;
echo "
<div id='container'>
<div id='bar'><span id='data2'><A HREF=# onClick=\"this.style.behavior='url(#default#homepage)'; this.setHomePage('".$settings['http://discomix.eu']."')\">startowa</A> | <script>function bookmark(){var title='DISCOMIX.eu'var url='http://www.discomix.eu/news.php' if (window.sidebar) window.sidebar.addPanel(title, url,''); else if( window.opera && window.print ){var mbm = document.createElement('a');mbm.setAttribute('rel','sidebar');mbm.setAttribute('href',url);mbm.setAttribute('title',title);mbm.click();} else if( document.all ) window.external.AddFavorite( url, title); }</script><a href='javascript:bookmark()'>ulubione</a></span><span style='float: left; padding: 0 0 0 459;'><a href='search.php'><img src='".THEME."images/1.png'></a><a href='index.php'><img src='".THEME."images/2.png'></a><a href='contact.php'><img src='".THEME."images/3.png'></a></span><span id='data'>Godzina: ".$locale['WWOLD_701']." <span id=\"digitalclock\"></span></center>
<script type='text/javascript'>
function calctime() {
var currenttime = new Date();
var hours = currenttime.getHours();
var minutes = currenttime.getMinutes();
var seconds = currenttime.getSeconds();
if (hours == 0) { hours = 12; }
if (hours < 10) { hours = \"0\" + hours; }
if (minutes < 10) { minutes = \"0\" + minutes; }
if (seconds < 10) { seconds = \"0\" + seconds; }
var clocklocation = document.getElementById('digitalclock');
clocklocation.innerHTML = hours + \":\" + minutes + \":\" + seconds;
setTimeout(\"calctime()\", 1000);
}
calctime();
</script>
</span></div>
<div id='header'>
<div style='float: left;background: url(".THEME."images/topbkg1.jpg); width: 341px; height: 197px; text-align: left;'></div>
<div style='float: left;background: url(http://discomix.eu/themes/styl/images/topbkg2.jpg); width: 289px; height: 197px;'></div>
<div style='float: left;background: url(http://discomix.eu/themes/styl/images/topbkg3.jpg); width: 320px; height: 197px;'></div>
</div>";
echo "
<div id='navigation'><img src='".THEME."images/menu1.jpg'><a href='".BASEDIR."index.php'><img src='".THEME."images/menu2.jpg'></a><a href='".BASEDIR."downloads.php'><img src='".THEME."images/menu3.jpg'></a><a href='#'><img src='".THEME."images/menu4.jpg'></a><a href='".BASEDIR."contact.php'><img src='".THEME."images/menu5.jpg'></a><img src='".THEME."images/menu6.jpg'></div>
<div id='panels'>
<div id='pan1'><div class='panl'>";
echo "Gości Online: <b>".dbrows($result)."</b><br>";
$data = dbarray(dbquery("SELECT user_id,user_name,user_color,user_prefix FROM ".$db_prefix."users WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1"));
echo "".$locale['016']." <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side' style='color:#".$data['user_color']."'><b>".$data['user_prefix'].$data['user_name']."</b></a>";
$result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user='0'");
$datetime=strtotime( "data w formacje rrrr-mm-dd" );
$date2=strtotime("NOW");
$holdtotday=intval(($datetime-$date2)/-86400);
echo " </br>Istniejemy ju: <b>".$holdtotday. "</b> dni.<br>";
echo "Zarejestrowanych uytkownikw: <b>".number_format(dbcount("(user_id)", "users", "user_status<='1'"))."";
echo"
</div></div>
<div id='pan2'><div class='pan'>";
if (file_exists(INFUSIONS."last_seen_users_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."last_seen_users_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."last_seen_users_panel/locale/English.php";
}
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit>'0' AND user_status='0' ORDER BY user_lastvisit DESC LIMIT 0,10");
echo "<table cellpadding='0' cellspacing='0' width='175px'>";
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$lastseen = time() - $data['user_lastvisit'];
$iW=sprintf("%2d",floor($lastseen/604800));
$iD=sprintf("%2d",floor($lastseen/(60*60*24)));
$iH=sprintf("%02d",floor((($lastseen%604800)%86400)/3600));
$iM=sprintf("%02d",floor(((($lastseen%604800)%86400)%3600)/60));
$iS=sprintf("%02d",floor((((($lastseen%604800)%86400)%3600)%60)));
if ($lastseen < 60){
$lastseen= $locale['lsup001'];
} elseif ($lastseen < 360){
$lastseen= $locale['lsup002'];
} elseif ($iW > 0){
if ($iW == 1) { $text = $locale['lsup003']; } else { $text = $locale['lsup004']; }
$lastseen = $iW." ".$text;
} elseif ($iD > 0){
if ($iD == 1) { $text = $locale['lsup005']; } else { $text = $locale['lsup006']; }
$lastseen = $iD." ".$text;
} else {
$lastseen = $iH.":".$iM.":".$iS;
}
echo "<tr>\n<td class='side-small' align='left'><img src='".THEME."images/bullet.gif' alt=''>\n";
echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".$data['user_name']."' class='side'>\n";
echo trimlink($data['user_name'], 20)."</a></td><td class='side-small' align='right'>".$lastseen."</td>\n</tr>\n";
}
}
echo "</table>";
echo " </div></div>
<div id='pan3'><div class='pan'>
Panel w trakcie modernizacji
zapraszamy wszystkich
na nowo otwarte forum
serwisu DiscoMix.Eu
pod adresem:
Niedugo!
</div></div>
<div id='pan4'><div class='pan'>";
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if (file_exists(INFUSIONS."popular_downloads_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."popular_downloads_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."popular_downloads_panel/locale/English.php";
}
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<tr>\n<td class='small'><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a></td>\n
<td align='right'>".$data['download_count']."</td>\n</tr>\n";
}
echo "</table>";
} else {
echo "<center>".$locale['004']."</center>\n";
}
echo"
</div></div>
<div id='pan5'><div class='panr'>fd</div></div>
</div>
";
echo "<table width='950' cellspacing='0' cellpadding='0' align='left'>\n<tr>\n";
}
function render_footer($license=false) {
global $theme_width,$settings,$db_prefix;
echo "</tr>\n</table>\n";
echo "
<div style='clear:both;'></div>
<div id='panels2'>
<div id='dpan1'><div class='panl'>"; include INFUSIONS.'latest_images_panel/latest_images_panel.php'; echo "</div></div>
<div id='dpan2'><div class='pan'></div></div>
<div id='dpan3'><div class='panr'>"; include INFUSIONS.'newsletter_panel/newsletter_panel.php'; echo "</div></div>
</div>
<div style='clear:both;'></div>
<div id='footer'><p id='copyright'>Design by Stivmajster || Copyright @ 2009 discomix.eu || CMS: <a href='http://extreme-fusion.pl'>Extreme Fusion</a> || Code by <a href='http://iPeace.deviantart.com'>Peace</a></p></div>
</div>
\n";
}
function render_news($subject, $news, $info) {
global $settings;
echo "
<div class='news'>
<div id='hav'><h1>$subject</h1></div>
<div class='post'>$news</div>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<div style='height: 1px; width: 560px; margin: 0 0 0 7; background: #313131;'></div>
<td class='infobar'>
<font color='#C5C5C5'>Doda ".$locale['040']."<a style='color: #971213;' href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> dnia:
".$locale['041'].showdate("longdate", $info['news_date'])."
</td>
<td align='right' class='infobar'>
".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "")."
komentarze: <a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> czyta:
".$info['news_reads'].$locale['044']."
<a href='print.php?type=N&item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a></font>
</td>
</tr>
</table>
<div class='nifty'><img src='".THEME."images/nifty.gif'></div>
</div>\n";
}
function render_movie($subject, $movie, $info) {
global $locale;
include LOCALE.LOCALESET."movies.php";
opentable($subject);
echo "<div align='center'><table cellpadding='0' cellspacing='0' style='border-collapse: collapse; background-color:#;' width='100%' class='border'>";
$r = substr($movie, -3, 3);
if ($r=="wmv") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' flashvars='gcode=482CD697' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' width='400' height='350' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0'></embed><br><br>";
}elseif ($r=="mpg") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' flashvars='gcode=482CD697' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' width='400' height='350' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0'></embed><br><br>";
}elseif ($r=="avi") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' flashvars='gcode=482CD697' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' width='400' height='350' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0'></embed><br><br>";
}elseif ($r=="swf") {
echo "<div align='center'>";
echo"<br><br><OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'codebase='http://download.macromedia.com/pub/shckwave/cabs/flash/swflash.cab#version=5,0,0,0' WIDTH='550' HEIGHT='400' id='grmovie' name='grmovie'>
<PARAM NAME=movie VALUE='$movie'>
<param name='menu' value='false'>
<param name='quality' value='high'>
<param name='FlashVars' value='gcode=482CD697'>
<embed src='$movie' flashvars='gcode=482CD697' menu=false quality=high WIDTH='550' HEIGHT='400' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' id='grmovie' name='grmovie'></embed></object><br><br>";
}elseif ($r=="mp3") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/ ' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0' height='70' width='300'></embed><br><br>";
}elseif ($r=="wma") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/ ' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0' height='70' width='300'></embed><br><br>";
}elseif ($r=="mov") {
echo "<div align='center'>";
echo "<br><br><embed type='video/quicktime' src='$movie' controller='true' target='myself' pluginspage='http://www.apple.com/quicktime/download/' loop='FALSE' autoplay='true' border='1' height='380' width='460'></embed><br><br>";
}elseif ($r=="txt") {
echo "<div align='left'><br><br>";
$buff = nl2br(file_get_contents($movie));
echo $buff."</div><br><br>";
}else{
echo "<div align='center'>";
echo "<br><br><embed src='$movie' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' height='372' width='416'><br><br>";
}
echo "</div></table></div>";
closetable();
}
}
function render_article($subject, $article, $info) {
echo "
<div class='news'>
<div id='hav'><h1>$subject</h1></div>
<div class='post'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</div>
<div class='who'>".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>
".$locale['041'].showdate("longdate", $info['news_date'])."
".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "")."
<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> ·
".$info['news_reads'].$locale['044']."
<span class='print'>
<a href='print.php?type=N&item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a></span></div>
<div class='nifty'><img src='".THEME."images/nifty.gif'></div>
</div>
\n";
}
function opentable($title) {
echo "<div class='news'>
<div id='hav'><h1>$title</h1></div>
<div class='post'>\n";
}
function closetable() {
echo "</div>
<div class='nifty'><img src='".THEME."images/nifty.gif'></div>
</div>\n";
}
function openside($title) {
echo "<div class='panel'>
<div class='nagl'><p class='menu'>$title</p></div><div class='paneltext'>
\n";
}
function closeside() {
echo " </div><div class='nifty2'><img src='".THEME."images/niftysmall.gif'></div>
</div>\n";
tablebreak();
}
function opensidex($title,$state="on") {
$boxname = str_replace(" ", "", $title);
echo "<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>
<td class='tableHeadingBG'>
<div class='tableHeading'>$title</div></td>
<td align='right' class='tableHeadingBG'>".panelbutton($state,$boxname)."</td>
</tr>
<tr><td class='td-cell1' vAlign='top' colspan='2'>
<div id='box_$boxname'".($state=="off"?" style='display:none'":"").">\n";
}
function closesidex() {
echo "</div></td></tr>
</table>\n";
tablebreak();
}
function tablebreak() {
echo " \n";
}
?>
Kliknij i zaczekaj na załadowanie kodu ...
Pomogłem Ci? Wystarczy podziękować i oznaczyć post jako pomocny
Tanie tworzenie wtyczek, masz problem napisz.
|
|
|
|
giegur |
Dodany dnia 25.03.2009 19:12:18
|
Przedszkolak
Postów: 14 Ostrzeżeń: 2
Data rejestracji: 18.09.2007 15:30
|
Niestety jak nadpisuje theme.php to wyswietla sie biala strona tzn http://www.discom... i cala biala strona i nic sie nie ładuje.
Edytowane przez Pieka dnia 25.03.2009 19:35:24
|
|
|
|
piotrek199214 |
Dodany dnia 25.03.2009 19:24:58
|
Bywalec
Postów: 977 Pomógł: 168
v7.01.05 Data rejestracji: 17.12.2007 21:05
|
Tak powinno śmigać:
<?
// theme settings
$body_text = "#ffffff";
$body_bg = "#3C3C3C";
$theme_width = "950";
$theme_width_l = "221";
$theme_width_r = "215";
function render_header($header_content) {
global $theme_width,$settings,$db_prefix,$aidlink,$userdata,$locale,$result,$dbrows,$conline,$cusers,$holdtotday,$datetime;
echo "
<div id='container'>
<div id='bar'><span id='data2'><A HREF=# onClick=\"this.style.behavior='url(#default#homepage)'; this.setHomePage('".$settings['http://discomix.eu']."')\">startowa</A> | <script>function bookmark(){var title='DISCOMIX.eu'var url='http://www.discomix.eu/news.php' if (window.sidebar) window.sidebar.addPanel(title, url,''); else if( window.opera && window.print ){var mbm = document.createElement('a');mbm.setAttribute('rel','sidebar');mbm.setAttribute('href',url);mbm.setAttribute('title',title);mbm.click();} else if( document.all ) window.external.AddFavorite( url, title); }</script><a href='javascript:bookmark()'>ulubione</a></span><span style='float: left; padding: 0 0 0 459;'><a href='search.php'><img src='".THEME."images/1.png'></a><a href='index.php'><img src='".THEME."images/2.png'></a><a href='contact.php'><img src='".THEME."images/3.png'></a></span><span id='data'>Godzina: ".$locale['WWOLD_701']." <span id=\"digitalclock\"></span></center>
<script type='text/javascript'>
function calctime() {
var currenttime = new Date();
var hours = currenttime.getHours();
var minutes = currenttime.getMinutes();
var seconds = currenttime.getSeconds();
if (hours == 0) { hours = 12; }
if (hours < 10) { hours = \"0\" + hours; }
if (minutes < 10) { minutes = \"0\" + minutes; }
if (seconds < 10) { seconds = \"0\" + seconds; }
var clocklocation = document.getElementById('digitalclock');
clocklocation.innerHTML = hours + \":\" + minutes + \":\" + seconds;
setTimeout(\"calctime()\", 1000);
}
calctime();
</script>
</span></div>
<div id='header'>
<div style='float: left;background: url(".THEME."images/topbkg1.jpg); width: 341px; height: 197px; text-align: left;'></div>
<div style='float: left;background: url(http://discomix.eu/themes/styl/images/topbkg2.jpg); width: 289px; height: 197px;'></div>
<div style='float: left;background: url(http://discomix.eu/themes/styl/images/topbkg3.jpg); width: 320px; height: 197px;'></div>
</div>";
echo "
<div id='navigation'><img src='".THEME."images/menu1.jpg'><a href='".BASEDIR."index.php'><img src='".THEME."images/menu2.jpg'></a><a href='".BASEDIR."downloads.php'><img src='".THEME."images/menu3.jpg'></a><a href='#'><img src='".THEME."images/menu4.jpg'></a><a href='".BASEDIR."contact.php'><img src='".THEME."images/menu5.jpg'></a><img src='".THEME."images/menu6.jpg'></div>
<div id='panels'>
<div id='pan1'><div class='panl'>";
echo "Gości Online: <b>".dbrows($result)."</b><br>";
$data = dbarray(dbquery("SELECT user_id,user_name,user_color,user_prefix FROM ".$db_prefix."users WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1"));
echo "".$locale['016']." <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side' style='color:#".$data['user_color']."'><b>".$data['user_prefix'].$data['user_name']."</b></a>";
$result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user='0'");
$datetime=strtotime( "data w formacje rrrr-mm-dd" );
$date2=strtotime("NOW");
$holdtotday=intval(($datetime-$date2)/-86400);
echo " </br>Istniejemy ju: <b>".$holdtotday. "</b> dni.<br>";
echo "Zarejestrowanych uytkownikw: <b>".number_format(dbcount("(user_id)", "users", "user_status<='1'"))."";
echo"
</div></div>
<div id='pan2'><div class='pan'>";
if (file_exists(INFUSIONS."last_seen_users_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."last_seen_users_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."last_seen_users_panel/locale/English.php";
}
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit>'0' AND user_status='0' ORDER BY user_lastvisit DESC LIMIT 0,10");
echo "<table cellpadding='0' cellspacing='0' width='175px'>";
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$lastseen = time() - $data['user_lastvisit'];
$iW=sprintf("%2d",floor($lastseen/604800));
$iD=sprintf("%2d",floor($lastseen/(60*60*24)));
$iH=sprintf("%02d",floor((($lastseen%604800)%86400)/3600));
$iM=sprintf("%02d",floor(((($lastseen%604800)%86400)%3600)/60));
$iS=sprintf("%02d",floor((((($lastseen%604800)%86400)%3600)%60)));
if ($lastseen < 60){
$lastseen= $locale['lsup001'];
} elseif ($lastseen < 360){
$lastseen= $locale['lsup002'];
} elseif ($iW > 0){
if ($iW == 1) { $text = $locale['lsup003']; } else { $text = $locale['lsup004']; }
$lastseen = $iW." ".$text;
} elseif ($iD > 0){
if ($iD == 1) { $text = $locale['lsup005']; } else { $text = $locale['lsup006']; }
$lastseen = $iD." ".$text;
} else {
$lastseen = $iH.":".$iM.":".$iS;
}
echo "<tr>\n<td class='side-small' align='left'><img src='".THEME."images/bullet.gif' alt=''>\n";
echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".$data['user_name']."' class='side'>\n";
echo trimlink($data['user_name'], 20)."</a></td><td class='side-small' align='right'>".$lastseen."</td>\n</tr>\n";
}
}
echo "</table>";
echo " </div></div>
<div id='pan3'><div class='pan'>
Panel w trakcie modernizacji
zapraszamy wszystkich
na nowo otwarte forum
serwisu DiscoMix.Eu
pod adresem:
Niedugo!
</div></div>
<div id='pan4'><div class='pan'>";
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if (file_exists(INFUSIONS."popular_downloads_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."popular_downloads_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."popular_downloads_panel/locale/English.php";
}
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<tr>\n<td class='small'><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a></td>\n
<td align='right'>".$data['download_count']."</td>\n</tr>\n";
}
echo "</table>";
} else {
echo "<center>".$locale['004']."</center>\n";
}
echo"
</div></div>
<div id='pan5'><div class='panr'>fd</div></div>
</div>
";
echo "<table width='950' cellspacing='0' cellpadding='0' align='left'>\n<tr>\n";
}
function render_footer($license=false) {
global $theme_width,$settings,$db_prefix;
echo "</tr>\n</table>\n";
echo "
<div style='clear:both;'></div>
<div id='panels2'>
<div id='dpan1'><div class='panl'>"; include INFUSIONS.'latest_images_panel/latest_images_panel.php'; echo "</div></div>
<div id='dpan2'><div class='pan'></div></div>
<div id='dpan3'><div class='panr'>"; include INFUSIONS.'newsletter_panel/newsletter_panel.php'; echo "</div></div>
</div>
<div style='clear:both;'></div>
<div id='footer'><p id='copyright'>Design by Stivmajster || Copyright @ 2009 discomix.eu || CMS: <a href='http://extreme-fusion.pl'>Extreme Fusion</a> || Code by <a href='http://iPeace.deviantart.com'>Peace</a></p></div>
</div>
\n";
}
function render_news($subject, $news, $info) {
global $settings;
echo "
<div class='news'>
<div id='hav'><h1>$subject</h1></div>
<div class='post'>$news</div>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<div style='height: 1px; width: 560px; margin: 0 0 0 7; background: #313131;'></div>
<td class='infobar'>
<font color='#C5C5C5'>Doda ".$locale['040']."<a style='color: #971213;' href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> dnia:
".$locale['041'].showdate("longdate", $info['news_date'])."
</td>
<td align='right' class='infobar'>
".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "")."
komentarze: <a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> czyta:
".$info['news_reads'].$locale['044']."
<a href='print.php?type=N&item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a></font>
</td>
</tr>
</table>
<div class='nifty'><img src='".THEME."images/nifty.gif'></div>
</div>\n";
}
function render_movie($subject, $movie, $info) {
global $locale;
include LOCALE.LOCALESET."movies.php";
opentable($subject);
echo "<div align='center'><table cellpadding='0' cellspacing='0' style='border-collapse: collapse; background-color:#;' width='100%' class='border'>";
$r = substr($movie, -3, 3);
if ($r=="wmv") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' flashvars='gcode=482CD697' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' width='400' height='350' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0'></embed><br><br>";
}elseif ($r=="mpg") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' flashvars='gcode=482CD697' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' width='400' height='350' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0'></embed><br><br>";
}elseif ($r=="avi") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' flashvars='gcode=482CD697' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/' width='400' height='350' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0'></embed><br><br>";
}elseif ($r=="swf") {
echo "<div align='center'>";
echo"<br><br><OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'codebase='http://download.macromedia.com/pub/shckwave/cabs/flash/swflash.cab#version=5,0,0,0' WIDTH='550' HEIGHT='400' id='grmovie' name='grmovie'>
<PARAM NAME=movie VALUE='$movie'>
<param name='menu' value='false'>
<param name='quality' value='high'>
<param name='FlashVars' value='gcode=482CD697'>
<embed src='$movie' flashvars='gcode=482CD697' menu=false quality=high WIDTH='550' HEIGHT='400' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' id='grmovie' name='grmovie'></embed></object><br><br>";
}elseif ($r=="mp3") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/ ' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0' height='70' width='300'></embed><br><br>";
}elseif ($r=="wma") {
echo "<div align='center'>";
echo "<br><br><embed src='$movie' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/ ' autostart='1' showcontrols='1' showstatusbar='1' showdisplay='0' autorewind='0' enablecontextmenu='0' height='70' width='300'></embed><br><br>";
}elseif ($r=="mov") {
echo "<div align='center'>";
echo "<br><br><embed type='video/quicktime' src='$movie' controller='true' target='myself' pluginspage='http://www.apple.com/quicktime/download/' loop='FALSE' autoplay='true' border='1' height='380' width='460'></embed><br><br>";
}elseif ($r=="txt") {
echo "<div align='left'><br><br>";
$buff = nl2br(file_get_contents($movie));
echo $buff."</div><br><br>";
}else{
echo "<div align='center'>";
echo "<br><br><embed src='$movie' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' height='372' width='416'><br><br>";
}
echo "</div></table></div>";
closetable();
}
function render_article($subject, $article, $info) {
echo "
<div class='news'>
<div id='hav'><h1>$subject</h1></div>
<div class='post'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</div>
<div class='who'>".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>
".$locale['041'].showdate("longdate", $info['news_date'])."
".($info['news_ext'] == "y" ? "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n" : "")."
<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> ·
".$info['news_reads'].$locale['044']."
<span class='print'>
<a href='print.php?type=N&item_id=".$info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' border='0' style='vertical-align:middle;'></a></span></div>
<div class='nifty'><img src='".THEME."images/nifty.gif'></div>
</div>
\n";
}
function opentable($title) {
echo "<div class='news'>
<div id='hav'><h1>$title</h1></div>
<div class='post'>\n";
}
function closetable() {
echo "</div>
<div class='nifty'><img src='".THEME."images/nifty.gif'></div>
</div>\n";
}
function openside($title) {
echo "<div class='panel'>
<div class='nagl'><p class='menu'>$title</p></div><div class='paneltext'>
\n";
}
function closeside() {
echo " </div><div class='nifty2'><img src='".THEME."images/niftysmall.gif'></div>
</div>\n";
tablebreak();
}
function opensidex($title,$state="on") {
$boxname = str_replace(" ", "", $title);
echo "<table style='WIDTH: 100%' cellSpacing='0' cellPadding='0' border='0'><tr>
<td class='tableHeadingBG'>
<div class='tableHeading'>$title</div></td>
<td align='right' class='tableHeadingBG'>".panelbutton($state,$boxname)."</td>
</tr>
<tr><td class='td-cell1' vAlign='top' colspan='2'>
<div id='box_$boxname'".($state=="off"?" style='display:none'":"").">\n";
}
function closesidex() {
echo "</div></td></tr>
</table>\n";
tablebreak();
}
function tablebreak() {
echo " \n";
}
?>
Kliknij i zaczekaj na załadowanie kodu ...
Pomogłem Ci? Wystarczy podziękować i oznaczyć post jako pomocny
Tanie tworzenie wtyczek, masz problem napisz.
|
|
|
|
giegur |
Dodany dnia 25.03.2009 19:34:01
|
Przedszkolak
Postów: 14 Ostrzeżeń: 2
Data rejestracji: 18.09.2007 15:30
|
Sorki Pieka że tak pisałem byle jak no ale kurde wkurzony byłem na to.No ale problem rozwiązany Dziekuję |
|
|