Man reikia atsitiktine foto i headeri isikelt.
Atsitiktines foto kodas
<?php
if (file_exists(INFUSIONS."random_photo_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."random_photo_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."random_photo_panel/locale/English.php";
}
$result=dbquery(
"SELECT ta.album_id,album_title,photo_id,photo_thumb2,photo_filename,photo_title FROM ".$db_prefix."photo_albums ta ".
"INNER JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 1"
);
if (dbrows($result) == 1) {
@openside($locale['FOT_001']);
$data=dbarray($result);
if ($data['photo_thumb2'] == ""){
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/".$data['photo_filename']."' width='100' height='75'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
else{
echo "<div style='text-align:center'>
<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='gallery'>
<img src='".BASEDIR."images/photoalbum/".$data['photo_thumb2']."' width='100' height='75'
title='".$data['photo_title']."' alt='".$data['photo_title']."'>
</a><br /><a href='".BASEDIR."photogallery.php?album=".$data['album_id']."'>".$data['photo_title']."</a>
<br />
".$data['album_title']."
</div>";
}
@closeside();
}
?>
Mano functio render header codas
function render_header($header_content) {
include THEME."locale/Lithuanian.php";
include LOCALE.LOCALESET."global.php";
global $theme_width,$settings;
echo "<script src='".THEME."/grade.js' language='Javascript'></script>";
echo "<table class='forumline' align='center' width='$theme_width' cellspacing='0' cellpadding='0'>";
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 "<table align=center width=900 height=308 background=http://xxxxx.lt/themes/BluE/images/logo.jpg border=0 cellspacing=0 cellpadding=0>";
echo "</div>
</td>
<td height=0 border=0 align=right>
<div style=\"padding-bottom: 0px; padding-top: 100px; padding-left: 103px; padding-right: 0px;\">";
echo"<a href=''><img src='http://xxxxx.lt/themes/BluE/images/home.jpg' border='0'></a>
<td height=0 border=0 align=right>
<div style=\"padding-bottom: 0px; padding-top: 100px; padding-left: 0px; padding-right: 0px;\">";
echo"<a href='http://dedewarez.kissme.in/news.php'><img src='http://xxxxxx.lt/themes/BluE/images/bt.jpg' border='0'></a>
<td height=0 border=0 align=right>
<div style=\"padding-bottom: 0px; padding-top: 100px; padding-left: 0px; padding-right: 0px;\">";
echo"<a href='http://dedewarez.kissme.in/forum/index.php'><img src='http://xxxxxx.lt/themes/BluE/images/bt.jpg' border='0'></a>
<td height=0 border=0 align=right>
<div style=\"padding-bottom: 0px; padding-top: 100px; padding-left: 0px; padding-right: 0px;\">";
echo"<a href='http://dedewarez.kissme.in/search.php'><img src='http://xxxx.lt/themes/BluE/images/bt.jpg' border='0'></a>
<td height=0 border=0 align=right>
<div style=\"padding-bottom: 0px; padding-top: 100px; padding-left: 0px; padding-right: 0px;\">";
echo"<a href='http://dedewarez.kissme.in/members.php'><img src='http://xxxxxx.lt/themes/BluE/images/bt.jpg' border='0'></a>
<td height=0 border=0 align=right>
<div style=\"padding-bottom: 0px; padding-top: 100px; padding-left: 0px; padding-right: 0px;\">";
echo"<a href='http://dedewarez.kissme.in/infusions/banner_panel/index.php'><img src='http://xxx.lt/themes/BluE/images/bt.jpg' border='0'></a>
";
echo "</tr></table></td></tr></table>\n";
// End banner code / Banerio kodo pabaiga
$msg_count = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr>";
echo "<td class='sub-header'><table width='100%' border='0' cellpadding='0' cellspacing='0' style='background-color: #000000;'><tr>";
if (iMEMBER) {
echo"<td height='35' background='".THEME."images/sub.jpg' class='sub-header'><center>
<a href='http://xxxx.lt/edit_profile.php' target='_blank'>Profilis</a> |
<a href='".BASEDIR."messages.php' class='side'>Žinutės [naujų: <b><span style='color:#ff0000'>".sprintf($msg_count)."</span></b>]</a>";
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
echo " | <a href='".ADMIN."index.php".$aidlink."' class='side'>Administracija</a>";
}
echo" | <a href='http://xxx.lt/setuser.php?logout=yes' target='_blank'>Atsijungti</a></td>";
} else {
echo" <td height='35' background='".THEME."images/linija.jpg' class='sub-header' style='padding-top:1px;'><center>
<form name='loginform' method='post' action='".FUSION_SELF."'>
Vartotojas <input type='text' name='user_name' class='textbox' style='width:100px;filter:alpha(opacity=70)'>
Slaptažodis <input type='password' name='user_pass' class='textbox' style='width:100px;filter:alpha(opacity=70)'>
<input type='submit' name='login' value='Prisijungti' class='button'>";
if ($settings['enable_registration']) {
echo " <a href=".BASEDIR."register.php>Registracija</a> | <a href=".BASEDIR."lostpassword.php>Priminti</a><center><br>\n";
}
echo"</div>\n";
}
echo "</td></tr></table></td></tr></table>";
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'><tr>";
}
|