Šioje lentelėje rodo, populiariausias ir naujausias dainas, tačiau paspaudus ant pavadinimo, nukelia tiesiog į downloads.php, tačiau kaip padaryti, kad iškarto nueitų į siuntimosi url?
KODAS:
<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";
// theme settings
$body_text = "#c0c0b0";
$body_bg = "#FFFFFF";
$theme_width = "962";
$theme_width_l = "205";
$theme_width_r = "205";
function render_header($header_content) {
global $theme_width, $db_prefix, $settings, $aidlink, $userdata;
echo "<table border='0' cellpadding='0' cellspacing='0' width='962' align='center'>
<tr>
<td width='100%'>
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td width='50%'>
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td width='429' height='165' colspan='5'>
<img border='0' src='".THEME."images/img_02.png' width='429' height='165'></td>
</tr>
<tr>
<td width='429' height='1' colspan='5'>
<img border='0' src='".THEME."images/img_07.png' width='429' height='1'></td>
</tr>
<tr>
<td width='59' height='104'>
<img border='0' src='".THEME."images/img_08.png' width='59' height='104'></td>
<td width='148' height='104' background='".THEME."images/img_09.png' valign='top'>";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,7");
if(dbrows($result) != 0) {
while($data = dbarray($result)) {
echo "<a href='".BASEDIR."downloads.php?d_id=".$data['download_id']."' style='color:#FFF;'>* ".trimlink($data['download_title'], 20)."</a><br>";
}
} else {
echo "<center>Nëra dainø</center>";
}
echo "</td>
<td width='32' height='104'>
<img border='0' src='".THEME."images/img_10.png' width='32' height='104'></td>
<td width='153' height='104' background='".THEME."images/img_11.png' valign='top'>";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,7");
if(dbrows($result) != 0) {
while($data = dbarray($result)) {
echo "<a href='".BASEDIR."downloads.php?d_id=".$data['download_id']."' style='color:#FFF;'>* ".trimlink($data['download_title'], 20)."</a><br>";
}
} else {
echo "<center>Nëra dainø</center>";
}
echo "</td>
<td width='37' height='104'>
<img border='0' src='".THEME."images/img_12.png' width='37' height='104'></td>
</tr>
</table>
</td>
<td width='50%'>
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td width='50%'>
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td width='255' height='166'>
<img border='0' src='".THEME."images/img_03.png' width='255' height='166'></td>
</tr>
<tr>
<td width='255' height='52' background='".THEME."images/img_13.png'>
<form method='POST' action='".BASEDIR."search.php'>
<input type='hidden' value='d' name='stype'><input type='text' name='stext' value='Áveskite paieðkos þodþius' onBlur=\"if(this.value=='') this.value='Áveskite paieðkos þodþius';\" onFocus=\"if(this.value=='Áveskite paieðkos þodþius') this.value='';\" class='header_search'> <input type='submit' name='search' value=' ' class='header_button'></td>
</form>
</tr>
</table>
</td>
<td width='50%'>
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td width='278' height='50'>
<img border='0' src='".THEME."images/img_04.png' width='278' height='50'></td>
</tr>
<tr>
<td width='278' height='168' background='".THEME."images/img_06.png' valign='top' style='padding-top:20px; padding-left:3px;'>";
$result=dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_lastvisit DESC LIMIT 10");
echo "<table width=\"85%\" cellpadding=\"0\" cellspacing=\"0\" align='left'>";
if(dbrows($result)!=0){
while($data=dbarray($result)){
$lastseen=time()-$data[user_lastvisit];
if($lastseen<20){
$lastseen="<font color='#6e6e59;'>[online]</font>";
}else{
$lastseen="<font color='#6e6e59;'>[offline]</font>";
}
if ($data[user_level] == "103") {
$vartotojas = "<a href='".BASEDIR."profile.php?lookup=$data[user_id]' title='Super administratorius'><font color='#1ac1a3'><b>".$data['user_name']."</b></font></a>";
}elseif ($data[user_level] == "102") {
$vartotojas = "<a href='".BASEDIR."profile.php?lookup=$data[user_id]' title='Administratorius'><font color='#e96a16'>".$data['user_name']."</font></a>";
}else{
$vartotojas = "<a href='".BASEDIR."profile.php?lookup=$data[user_id]'><font color='#d6d78d'>".$data['user_name']."</a></font>";}
echo "<tr><td align=\"left\">$vartotojas</td><td align=\"right\">".$lastseen."</td></tr>";
}
}
echo "</table>";
echo"</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width='533' height='20' colspan='2'>
<img border='0' src='".THEME."images/img_15.png' width='533' height='20'></td>
</tr>
<tr>
<td width='100%' colspan='2'>
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td width='85' height='32'>
<a href='".BASEDIR."index.php'>
<img border='0' OnMouseOver=\"this.src='".THEME."images/1.png'\" OnMouseOut=\"this.src='".THEME."images/11.png'\" src='".THEME."images/11.png' width='85' height='32'></a></td>
<td width='90' height='32'>
<a href='".BASEDIR."photogallery.php'>
<img border='0' OnMouseOver=\"this.src='".THEME."images/2.png'\" OnMouseOut=\"this.src='".THEME."images/22.png'\" src='".THEME."images/22.png' width='90' height='32'></a></td>
<td width='99' height='32'>
<a href='".BASEDIR."downloads.php'>
<img border='0' OnMouseOver=\"this.src='".THEME."images/3.png'\" OnMouseOut=\"this.src='".THEME."images/33.png'\" src='".THEME."images/33.png' width='99' height='32'></a></td>
<td width='106' height='32'>
<a href='".FORUM."index.php'>
<img border='0' OnMouseOver=\"this.src='".THEME."images/4.png'\" OnMouseOut=\"this.src='".THEME."images/44.png'\" src='".THEME."images/44.png' width='106' height='32'></a></td>
<td width='111' height='32'>
<a href='".BASEDIR."contact.php'>
<img border='0' OnMouseOver=\"this.src='".THEME."images/5.png'\" OnMouseOut=\"this.src='".THEME."images/55.png'\" src='".THEME."images/55.png' width='111' height='32'></a></td>
<td width='15' height='32'>
<img border='0' src='".THEME."images/img_21.png' width='15' height='32'></td>
<td width='27' height='32'>
<img border='0' src='".THEME."images/img_22.png' width='27' height='32'></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width='962' height='41'>
<img border='0' src='".THEME."images/img_24.png' width='962' height='41'></td>
</tr>
<tr>
<td width='962' height='134' background='".THEME."images/img_26.png' style='padding-left:30px;'>";
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td>";
if(!iMEMBER) {
echo "<form method='POST' action=''>";
echo "<table cellpadding='2' cellspacing='2' width='320' border='0' align='left'>
<tr>
<td width='50%' align='right' style='padding-right:10px;'><span class='header_text'>Vartotojas</span></td>
<td width='50%'><input type='text' name='user_name' class='header_login' style='padding-left:10px; color:#666666; padding-bottom: 2px;' value='Slapyvardis' onBlur=\"if(this.value=='') this.value='Slapyvardis';\" onFocus=\"if(this.value=='Slapyvardis') this.value='';\"></td>
</tr>
<tr>
<td width='50%' align='right' style='padding-right:10px;'><span class='header_text'>Slaptaþodis</span></td>
<td width='50%' ><input type='password' name='user_pass' class='header_login2' style='padding-left:10px; color:#666666; padding-bottom: 2px;' value='pass123' onBlur=\"if(this.value=='') this.value='pass123';\" onFocus=\"if(this.value=='pass123') this.value='';\"></td>
</tr>
<tr>
<td width='100%' colspan='2' align='right' style='padding-right : 30px;'><input type='checkbox' name='C1' value='ON'> <input type='submit' value='Prisijungti' name='login' class='header_submit'></td>
</tr>
<tr>
<td width='100%' colspan='2' align='center'><a href='".BASEDIR."register.php' class='header_link'>Dar ne narys? Registruokis</a> <span class='header_text'>|</span> <a href='".BASEDIR."lostpassword.php' class='header_link'>Pamirðai slaptaþodį?</a></td>
</tr>
</table>";
echo "</form>";
} else {
echo "<table cellpadding='2' cellspacing='2' width='320' border='0' align='left'>
<tr>
<td width='50%' rowspan='5'>";
IF($userdata['user_avatar']) { echo "<img src='".IMAGES."avatars/".$userdata['user_avatar']."' width='100' height='90'>"; } else { echo "<img src='".IMAGES."avatars/noav.gif' width='100' height='90'>"; }
echo"</td>
<td width='50%' class='tbl3'><a style='color:#FFF;' href='".BASEDIR."messages.php'>Asmeninës þinutës</a></td>
</tr>
<tr>
<td width='50%' class='tbl5'><a style='color:#14aa90;' href='".BASEDIR."edit_profile.php'>Redaguoti profilá</a></td>
</tr>
<tr>
<td width='50%' class='tbl3'><a style='color:#FFF;' href='http://musicworld.lt/pateikti_daina.php'>Pateikti dainà</a></td>
</tr>
<tr>
<td width='50%' class='tbl5'>"; if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) { echo "<a style='color:#14aa90;' href='".ADMIN."index.php".$aidlink."'>Administracija</a>"; } else { echo "<a style='color:#14aa90;' href='".BASEDIR."members.php'>Portalo nariai</a>"; } echo "</td>
</tr>
<tr>
<td width='50%' class='tbl3'><a style='color:#FFF;' href='".BASEDIR."setuser.php?logout=yes'>Atsijungti</a></td>
</tr>
</table>";
}
echo "</td>
<td>";
$result = dbquery(
"SELECT tf.*, tt.*, tu.user_id, tu.user_name, bb.user_name as kurejas, MAX(tp.post_id) as last_id, COUNT(tp.post_id) as count_posts FROM ".$db_prefix."forums tf
INNER JOIN ".$db_prefix."threads tt USING(forum_id)
INNER JOIN ".$db_prefix."posts tp USING(thread_id)
INNER JOIN ".$db_prefix."users tu ON tt.thread_lastuser=tu.user_id
LEFT JOIN ".$db_prefix."users bb ON tt.thread_author=bb.user_id
WHERE ".groupaccess('forum_access')." GROUP BY thread_id ORDER BY thread_lastpost DESC LIMIT 0,4");
if (dbrows($result) != 0) {
$i = 0;
echo "<table cellpadding='0' cellspacing='1' width='559'>\n<tr>\n";
echo " <td class='tbl5'>Pavadinimas</td>
<td class='tbl5' align='center'>Autorius</td>
<td class='tbl5' align='center'>Perþiûros</td>
<td class='tbl5' align='center'>Atsakymai</td>
<td class='tbl5' align='center'>Paskutinë þinutë</a>
</tr>\n";
while ($data = dbarray($result)) {
if ($i % 2 == 0) { $row_color = "tbl4"; } else { $row_color = "tbl3"; }
echo "<tr>\n";
echo " <td height='20' class='$row_color'><a style='color:#FFF;font-weight:bold;' href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."&pid=".$data['last_id']."#post_".$data['last_id']."' title='".$data['thread_subject']."'>".trimlink($data['thread_subject'], 15)."</a></td>\n";
echo " <td height='20' class='$row_color' align='center'><a style='color:#FFF;font-weight:bold;' href='".BASEDIR."profile.php?lookup=".$data['thread_author']."'>".$data['kurejas']."</a></td>\n";
echo " <td height='20' class='$row_color' align='center'>".$data['thread_views']."</td>";
echo " <td height='20' class='$row_color' align='center'>".($data['count_posts']-1)."</td>";
echo " <td height='20' class='$row_color' align='center'><a style='color:#FFF;font-weight:bold;' href='".BASEDIR."profile.php?lookup=".$data['thread_lastuser']."'>".$data['user_name']."</a> ".showdate("forumdate", $data['thread_lastpost'])."</td>\n";
echo " </tr>\n";
$i++;
}
echo "</table>\n";
}
echo "</td>
</tr>
</table>";
echo "</td></tr></table>\n";
echo "<table width='922' style='padding-right:7px;' align='center'><tr><td>
<table cellpadding='0' cellspacing='0' width='915' align='center' style='background-color:#e1e2bd;'>
<tr><td colspan='3'><img src='".THEME."images/img_29.png' border='0'></td></tr><tr>";
}
function render_footer($license=false) {
global $theme_width,$settings;
echo "</tr><tr><td colspan='3'><img src='".THEME."images/img_58.png' border='0'></td></tr></table>\n";
echo "<table border='0' cellpadding='0' cellspacing='0' width='915' background='".THEME."images/img_60.png' height='74'>
<tr>
<td width='33%' style='padding-left:60px;'><span class='baltas'>Dizainas:</span> <a href='http://www.e-studija.lt' title='Internetiniø svetiniø kûrimas' class='footer'>E-studija.lt</a></td>
<td width='33%'><span class='baltas'>".$settings['footer']."</span></td>
<td width='34%' align='right' style='padding-right:60px;'><span class='baltas'>Varikliukas:</span> <a href='http://www.php-fusion.co.uk' class='footer'>PHP-Fusion</a></td>
</tr>
</table>
</td></tr></table>";
}
function render_news($subject, $news, $info) {
echo "<table border='0' cellpadding='0' cellspacing='0' width='475'>
<tr>
<td width='386' height='33' background='".THEME."images/img_49.png' style='padding-left:20px; color:#e1e2bd; padding-top:3px; font-weight : bold;'>$subject</td>
<td width='89' height='33'><a href='".BASEDIR."news.php?readmore=".$info['news_id']."'><img border='0' src='".THEME."images/img_50.png' width='89' height='33'></a></td>
</tr>
<tr>
<td width='475' colspan='2' background='".THEME."images/img_53.png' style='padding:5px; color:#606149;'>
<p align='center'>".showdate("shortdate", $info['news_date'])." [<a href='".BASEDIR."profile.php?lookup=".$info['user_id']."' style='color:#606149;'>".$info['user_name']."</a>] Komentarai: [".$info['news_comments']."]</p>
$news</td>
</tr>
</table>\n";
}
function render_article($subject, $article, $info) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='capmain'>$subject</td>
</tr>
<tr>
<td class='main-body'>
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
</td>
</tr>
<tr>
<td align='center' class='news-footer'>\n";
echo openform("A",$info['article_id']).articleposter($info," ·").articleopts($info,"·").closeform("A",$info['article_id']);
echo "</td>
</tr>
</table>\n";
}
function opentable($title) {
echo "<table border='0' cellpadding='0' cellspacing='0' width='482'>
<tr>
<td width='482' height='31' background='".THEME."images/img_35.png' class='capmain'>$title</td>
</tr>
<tr>
<td width='482' style='padding:5px;' background='".THEME."images/img_42.png' class='main-body'>\n";
}
function closetable() {
echo "</td>
</tr>
<tr>
<td width='100%'>
<img border='0' src='".THEME."images/img_46.png' width='482' height='10'></td>
</tr>
</table>\n";
}
function openside($title) {
echo "<table width='205' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td align='center' width='205' height='37' background='".THEME."images/img_32.png' class='scapmain'>$title</td>
</tr>
<tr>
<td width='205' class='side-body'>\n";
}
function openright($title) {
echo "<table width='205' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td align='center' width='205' height='33' background='".THEME."images/img_38.png' class='scapmain_right'>$title</td>
</tr>
<tr>
<td width='205' class='right-body'>\n";
}
function closeside() {
echo "</td>
</tr>
<tr>
<td width='100%'><img border='0' src='".THEME."images/img_52.png' width='205' height='10'></td>
</tr>
</table>\n";
tablebreak();
}
function opensidex($title,$state="on") {
$boxname = str_replace(" ", "", $title);
echo "<table cellpadding='0' cellspacing='0' width='100%' class='border'>
<tr>
<td class='scapmain'>$title</td>
<td class='scapmain' align='right'>".panelbutton($state,$boxname)."</td>
</tr>
<tr>
<td colspan='2' class='side-body'>
<div id='box_$boxname'".($state=="off"?" style='display:none'":"").">\n";
}
function closesidex() {
echo "</div>
</td>
</tr>
</table>\n";
tablebreak();
}
function tablebreak() {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n<td height='5'></td>\n</tr>\n</table>\n";
}
?>
urple'>Už pagalbą +11, kad ir pasakysit kur ką keist!
Ieškau mažų darbų internete. |