Niger
Garbės narys
Antras po Dievo
Pranešimai: 3554
Įstojęs: 2005 Bir. 21 18:06:06
|
Turiu klausimuka,
Gal galit mazdaug biskuti paaskinti kaip hederyje padaryti naujiausias naujienas, ir skaitomiausias naujienas??|
Aciu is anksto kas pagelbes tuputuka.
Perredagavau posta, nes nesinori cia ju simtus prikurti.
Cia klausiu jusu kas man paciam neisheis :(
----------------------
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";
$body_text = "#000000";
$body_bg = "#ffffff";
$theme_width = "900";
$theme_width_l = "183";
$theme_width_r = "183";
function render_header($header_content) {
global $theme_width,$settings,$locale,$userdata,$aidlink,$db_prefix;
echo "<table class='forumline' align='center' width='$theme_width' cellspacing='0' cellpadding='0' style='border-right: solid #000000 1px; border-
left: solid #000000 1px; border-top: solid #000000 1px; margin-top: -5px;'>";
echo "<tr><td><table align='center' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr><td><table align='center' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr><td class='header' width='100%'>";
echo "<tr><table align=center width=100% height=270 background='".THEME."images/baner.jpg' border=0 cellspacing=0 cellpadding=0>";
echo"<tr><td height=50 class='nuorodos' align='center' style='padding-right:40px; padding-top:130px;'><br>";
echo"<table width='50%'><tr>";
echo"<td width='40%'>";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%'>";
while ($data = dbarray($result)) {
echo "<tr>
<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'>".trimlink($data['download_title'], 23)."</a>
</td>
<td align='right'>".$data['download_count']."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
echo "</td><td width='40%' style='padding-left:80px;' >";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%'>";
while ($data = dbarray($result)) {
echo "<tr>
<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'>".trimlink($data['download_title'], 23)."</a>
</td>
<td align='right'>".$data['download_count']."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
echo "</tr>
</table>";
echo "</td></tr>
<tr></tr>
<tr><td height=31></td></tr>
</table>
";
echo"</td></tr><tr></tr><tr><td></td></tr></table>";
echo "<table width='100%' cellpadding='4' bgcolor='#F8F8F8' cellspacing='0' border='0'><tr>";
}
function render_footer($license=false) {
global $theme_width,$locale,$settings;
echo "</tr>\n</table>\n";
echo "<table cellSpacing='0' cellPadding='2' width='100%' border='0' background='".THEME."images/footer.gif'>";
echo "<td width='20%' height='50' class='white' align='left'>";
if ($license == false) {
echo "<b>Varikliukas: <a href='https://webdnd.com' target='_blank'>PHP-Fusion</a></b>";
}
echo "</td>";
echo "<td width='40%' class='white' align='center'>";
echo "<b>".stripslashes($settings['footer'])."</b></td>";
echo "<td width='26%' class='white' align='right'>";
echo "<b><a>Undersky</a> design</a></b>";
echo "</td>";
echo "<div align='center'></tr></table></td></tr></table></div>";
}
Nesurandu niekur kaip cia butu imanoma stumdyt situos aukstyn, zemyn, i kaire, i desne. jei galite pazimekite raudona spalva.
Aciu.
|
Žmogus
Narys
Viršesnis už Dievą
Pranešimai: 5621
Įstojęs: 2006 Gru. 8 17:12:08
|
Bandyk pagal straipsnį daryk, kur parašytas :\
|
Niger
Garbės narys
Antras po Dievo
Pranešimai: 3554
Įstojęs: 2005 Bir. 21 18:06:06
|
ShadoVw parašė:
Bandyk pagal straipsnį daryk, kur parašytas :\
Jei nesunku numesk straipsnio linka, thnx
|
Žmogus
Narys
Viršesnis už Dievą
Pranešimai: 5621
Įstojęs: 2006 Gru. 8 17:12:08
|
https://webdnd.com/readarticle.p...icle_id=92
|
Niger
Garbės narys
Antras po Dievo
Pranešimai: 3554
Įstojęs: 2005 Bir. 21 18:06:06
|
Redagavau posta, jei nesunku galite gal padeti ? Pats pirmas postas.
Aciu.
|
Niger
Garbės narys
Antras po Dievo
Pranešimai: 3554
Įstojęs: 2005 Bir. 21 18:06:06
|
Please kasnors... please....
|
Haked
Narys
Kapitonas
Pranešimai: 569
Įstojęs: 2008 Vas. 24 17:02:25
|
va if (!defined("IN_FUSION"merkia akį) { header("Location: ../../index.php"merkia akį; exit; }
require_once INCLUDES."theme_functions_include.php";
$body_text = "#000000";
$body_bg = "#ffffff";
$theme_width = "900";
$theme_width_l = "183";
$theme_width_r = "183";
function render_header($header_content) {
global $theme_width,$settings,$locale,$userdata,$aidlink,$db_prefix;
echo "<table class='forumline' align='center' width='$theme_width' cellspacing='0' cellpadding='0' style='border-right: solid #000000 1px; border-
left: solid #000000 1px; border-top: solid #000000 1px; margin-top: -5px;'>";
echo "<tr><td><table align='center' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr><td><table align='center' width='100%' cellspacing='0' cellpadding='0'>";
echo "<tr><td class='header' width='100%'>";
echo "<tr><table align=center width=100% height=270 background='".THEME."images/baner.jpg' border=0 cellspacing=0 cellpadding=0>";
echo"<tr><td height=50 class='nuorodos' align='center' style='padding-right:40px; padding-top:130px;'><br>";
echo"<table width='50%'><tr>";
echo"<td width='40%'>";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%'>";
while ($data = dbarray($result)) {
echo "<tr>
<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'>".trimlink($data['download_title'], 23)."</a>
</td>
<td align='right'>".$data['download_count']."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
echo "</td><td width='60%' style='padding-left:80px;' >";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%'>";
while ($data = dbarray($result)) {
echo "<tr>
<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'>".trimlink($data['download_title'], 23)."</a>
</td>
<td align='right'>".$data['download_count']."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
echo "</td><td width='40%' style='padding-left:80px;' >";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,5"merkia akį;
if (dbrows($result) != 0) {
echo "<table width='100%'>";
while ($data = dbarray($result)) {
echo "<tr>
<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'>".trimlink($data['download_title'], 23)."</a>
</td>
<td align='right'>".$data['download_count']."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
echo "</tr>
</table>";
echo "</td></tr>
<tr></tr>
<tr><td height=31></td></tr>
</table>
";
echo"</td></tr><tr></tr><tr><td></td></tr></table>";
echo "<table width='100%' cellpadding='4' bgcolor='#F8F8F8' cellspacing='0' border='0'><tr>";
}
function render_footer($license=false) {
global $theme_width,$locale,$settings;
echo "</tr>\n</table>\n";
echo "<table cellSpacing='0' cellPadding='2' width='100%' border='0' background='".THEME."images/footer.gif'>";
echo "<td width='20%' height='50' class='white' align='left'>";
if ($license == false) {
echo "<b>Varikliukas: <a href='https://webdnd.com' target='_blank'>PHP-Fusion</a></b>";
}
echo "</td>";
echo "<td width='40%' class='white' align='center'>";
echo "<b>".stripslashes($settings['footer'])."</b></td>";
echo "<td width='26%' class='white' align='right'>";
echo "<b><a>Undersky</a> design</a></b>";
echo "</td>";
echo "<div align='center'></tr></table></td></tr></table></div>";
}
o jei error,
imk koda to dalyko ir megink redaguot prie savo theme: $result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%'>";
while ($data = dbarray($result)) {
echo "<tr>
<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'>".trimlink($data['download_title'], 23)."</a>
</td>
<td align='right'>".$data['download_count']."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
echo "</td><td width='60%' style='padding-left:80px;' >";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%'>";
while ($data = dbarray($result)) {
echo "<tr>
<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'>".trimlink($data['download_title'], 23)."</a>
</td>
<td align='right'>".$data['download_count']."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
|
Niger
Garbės narys
Antras po Dievo
Pranešimai: 3554
Įstojęs: 2005 Bir. 21 18:06:06
|
Mano naujas klausimelis, zodziu pasidariau prisijungima hederyje, idejau zmogaus ivertinima, bet zmogu ivertinus nerodo ivertinimo, tiksliau sakant neatvaizduoja %ver i balus... Gal galit kas pagelbeti kur ce problemele butu ?
|
Qrmiz
Narys
Generolas
Pranešimai: 997
Įstojęs: 2005 Rugs. 4 16:09:21
|
Tai kodą duok šen, galbūt prie global nepridėjai $db_prefix... ir būtų gerai, jei foto parodytum
|
Niger
Garbės narys
Antras po Dievo
Pranešimai: 3554
Įstojęs: 2005 Bir. 21 18:06:06
|
Va nautrauka: http://www.imagestime.com/show.p...0_stai.jpg
Kodas kuriame noriu kad rodytu vid ivertinima:
<?php
global $theme_width,$settings,$aidlink,$locale,$userdata;
echo "<table width='$theme_width' border='0' align='center' cellpadding='0' cellspacing='0' background='".THEME."images/logo.gif' height='100'
style='background-repeat: no-repeat;'>
<tr>
<td width='235' style='padding-right: 0px; padding-left: 700px; padding-bottom: 10px; padding-top:20px;' valign='middle'>";
if (iMEMBER) {
$msg_count = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
echo "<table width='235' border='0' cellspacing='2' cellpadding='2'>
<tr>
<td>\n";
if ($userdata['user_avatar'] != "") {
echo "<center><img src='".BASEDIR."images/avatars/".$userdata['user_avatar']."' width='100' height='100' style='border:1px solid
#999999'></center>\n";
} else {
echo "<center><img src='".THEME."images/noavatar.gif' width='100' height='100' border='0'></center>\n";
}
echo "</td>
<td valign='top'> <img src='".THEME."images/bullet.gif' alt=''> Vid ávertinimas: $vert<br> <img src='".THEME."images/bullet.gif' alt=''> <a
href='".BASEDIR."edit_profile.php' class='side'>Redaguoti profilá</a><br>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."messages.php' class='side'>Þinutës [naujø: <b><span style='color:#990000'>".sprintf
($msg_count)."</span></b>]</a><br>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."members.php' class='side'>Nariai</a><br>\n";
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".ADMIN."index.php".$aidlink."' class='side'>Administracija</a><br>\n";
}
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."setuser.php?logout=yes' class='side'>".$locale['084']."</a><br><br>
<b><span class='ip'>IP: </span></b>";
$userip = $_SERVER['REMOTE_ADDR'];
$host = gethostbyaddr($userip);
echo "<span class='ip'>".$userip."</span><br /></td></tr></table>\n";
} else {
echo "<table width='170' border='0' cellspacing='0' cellpadding='0' align='center'><form name='loginform' method='post' action='".FUSION_SELF."'>
<tr>
<td align='right' class='ip'>Vardas: </td>
<td> <input type='text' name='user_name' class='textbox' style='width:100px;filter:alpha(opacity=70)'></td>
</tr>
<tr>
<td align='right' class='ip'>".$locale['062'].": </td>
<td> <input type='password' name='user_pass' class='textbox' style='width:100px;filter:alpha(opacity=70)'></td>
</tr>
<tr>
<td align='right'><input type='checkbox' name='remember_me' value='y'></td>
<td> <input type='submit' name='login' value='Prisijungti' class='button'></td>
</tr>
</form>\n";
if ($settings['enable_registration']) {
echo "<a href=".BASEDIR."register.php>Registracija</a> / <a href=".BASEDIR."lostpassword.php>Slaptaþodis</a>\n";
}
echo"</table>\n";
}
?>
cia yra user panele ir tas vidutinis ivertinimas veikia. :
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| 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
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if (iMEMBER) {
openside($userdata['user_name']);
$sk = 0;
$result = dbquery("SELECT * FROM ".$db_prefix."user_ratings WHERE rate_subject = '".$userdata['user_id']."'");
if (dbrows($result)) {
while ($data = dbarray($result)) $sk = $sk+$data['rate_opt'];
}
$vert = (dbrows($result) > 0 ? round($sk/dbrows($result),2) : "Nëra");
$msg_count = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
echo ($userdata['user_avatar'] ? "<center><img src='".IMAGES."avatars/".$userdata['user_avatar']."'></center><br>\n" : "<center>Nëra avataro</center><br>\n")."<br>
<img src='".THEME."images/bullet.gif' alt=''> Vidutinis ávertinimas: $vert<br>
".(iADMIN && eregi("C",$userdata['user_rights']) ? "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."viewpage.php?page_id=3' class='side'>Visi komentarai</a><br>\n" : "")."
<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."edit_profile.php' class='side'>".$locale['080']."</a><br>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."messages.php' class='side'>".$locale['081']."</a><br>
<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."members.php' class='side'>".$locale['082']."</a><br>\n";
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".ADMIN."index.php".$aidlink."' class='side'>".$locale['083']."</a><br>\n";
}
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."setuser.php?logout=yes' class='side'>".$locale['084']."</a>\n";
if ($msg_count) echo "<br><br><center><b><a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['085'], $msg_count).($msg_count == 1 ? $locale['086'] : $locale['087'])."</a></b></center>\n";
} else {
openside($locale['060']);
echo "<div align='center'>".(isset($loginerror) ? $loginerror : "")."
<form name='loginform' method='post' action='".FUSION_SELF."'>
".$locale['061']."<br>
<input type='text' name='user_name' class='textbox' style='width:100px'><br>
".$locale['062']."<br>
<input type='password' name='user_pass' class='textbox' style='width:100px'><br>
<input type='checkbox' name='remember_me' value='y' title='".$locale['063']."' style='vertical-align:middle;'>
<input type='submit' name='login' value='".$locale['064']."' class='button'><br>
</form>
<br>\n";
if ($settings['enable_registration']) {
echo "".$locale['065']."<br><br>\n";
}
echo $locale['066']."
</div>\n";
}
closeside();
?>
|
Žmogus
Narys
Viršesnis už Dievą
Pranešimai: 5621
Įstojęs: 2006 Gru. 8 17:12:08
|
global $theme_width,$settings,$aidlink,$locale,$userdata,$db_prefix;
Dėk šitą
|
Niger
Garbės narys
Antras po Dievo
Pranešimai: 3554
Įstojęs: 2005 Bir. 21 18:06:06
|
Nieko nepakito, tas pats.
|
Žmogus
Narys
Viršesnis už Dievą
Pranešimai: 5621
Įstojęs: 2006 Gru. 8 17:12:08
|
global $theme_width,$settings,$aidlink,$locale,$userdata,$db_prefix,$vert;
Nežinau ar veiks, bet turbūt mes klaida :\
|
Niger
Garbės narys
Antras po Dievo
Pranešimai: 3554
Įstojęs: 2005 Bir. 21 18:06:06
|
ShadoVw parašė:
global $theme_width,$settings,$aidlink,$locale,$userdata,$db_prefix,$vert;
Nežinau ar veiks, bet turbūt mes klaida :\
Va aciu uz pradzia, o gala pats susitvarkiau :D
Mat sitaip turejo buti ir veikia (cia kodo pradzia):
<?php
global $theme_width,$settings,$aidlink,$locale,$userdata,$db_prefix,$vert,$result,$sk;
echo "<table width='$theme_width' border='0' align='center' cellpadding='0' cellspacing='0' background='".THEME."images/logo.gif' height='100'
style='background-repeat: no-repeat;'>
<tr>
<td width='235' style='padding-right: 0px; padding-left: 700px; padding-bottom: 10px; padding-top:20px;' valign='middle'>";
if (iMEMBER) {
$sk = 0;
$result = dbquery("SELECT * FROM ".$db_prefix."user_ratings WHERE rate_subject = '".$userdata['user_id']."'");
if (dbrows($result)) {
while ($data = dbarray($result)) $sk = $sk+$data['rate_opt'];
}
$vert = (dbrows($result) > 0 ? round($sk/dbrows($result),2) : "Nëra");
$msg_count = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
echo "<table width='235' border='0' cellspacing='2' cellpadding='2'>
|
Žmogus
Narys
Viršesnis už Dievą
Pranešimai: 5621
Įstojęs: 2006 Gru. 8 17:12:08
|
Jo taip turėjo būti, būčiau jau rašęs, bet dėkui dėvui pats susiprotėjai :]]]]]
|
Niger
Garbės narys
Antras po Dievo
Pranešimai: 3554
Įstojęs: 2005 Bir. 21 18:06:06
|
Vat dar vienas klausimelis, kaip ten nurodyti linka kad paspaudus nueijtu i mano profilis? ir ten galeciau pasizeti komentarus ka raso kiti?
|
Žmogus
Narys
Viršesnis už Dievą
Pranešimai: 5621
Įstojęs: 2006 Gru. 8 17:12:08
|
".BASEDIR."profile.php?lookup=".$userdata['user_id']."
|
bruzgis
Narys
Ekspertas
Pranešimai: 3368
Įstojęs: 2006 Geg. 9 18:05:02
|
<a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."' class='side'>Mano profilis</a>
|
Niger
Garbės narys
Antras po Dievo
Pranešimai: 3554
Įstojęs: 2005 Bir. 21 18:06:06
|
chipass parašė:
<a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."' class='side'>Mano profilis</a>
DIDELIS Aciu chipass!!!
|