Tadziokaz
Narys
Generolas
Pranešimai: 894
Įstojęs: 2008 Kov. 11 17:03:55
Sveiki, norejau paklausti kaip padaryti? Kad is 6 turiamu nuotrauku rodytu viena kazkuria, perkrovus rodytu kita, ir taip metitu betkokias. Manau cia su rand tik neiseina. Redagavo
Tadziokaz 2009 Sau. 10 20:01:25
Peacemaker
Narys
Ekspertas
Pranešimai: 3085
Įstojęs: 2007 Lie. 31 17:07:59
srand((float) microtime() * 10000000);
$image[1]['pic']='/location/of/image1.jpg';
$image[1]['link']='/location/of/link1.php';
$image[2]['pic']='/location/of/image2.jpg';
$image[2]['link']='/location/of/link2.php';
$image[3]['pic']='/location/of/image3.jpg';
$image[3]['link']='/location/of/link3.php';
$image[4]['pic']='/location/of/image4.jpg';
$image[4]['link']='/location/of/link4.php';
$image[5]['pic']='/location/of/image5.jpg';
$image[5]['link']='/location/of/link5.php';
$rn = array_rand($image);
echo '<a href="'.$image[$rn]['link'].'">';
echo '<img src="'.$image[$rn]['pic'].'">';
Čia pritaikyta baneriams. Nusiimk link'us ir veiks. Kiekvienam žmogui yra skirta dovana, tik ne kiekvienas sugeba ją atrasti.
Tadziokaz
Narys
Generolas
Pranešimai: 894
Įstojęs: 2008 Kov. 11 17:03:55
e kazkas neto.
Klaida:Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/tadziokaz/warcraft.gan.lt/themes/Warcraft/theme.php on line 62
kodas:
<?
/*--------------------------------------------+
| PHP -Fusion v6 - Content Management System |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: http://www.php-fusion.co.uk |
| email: nick@php-fusion.co.uk |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
/*--------------------------------------------+
| Warcraft Theme for PHP -Fusion v6 |
|---------------------------------------------|
| author: Stryker of The Conclave © 2006 |
| web: http://www.conclaveforums.com |
| email: netbrianw@gmail.com |
+--------------------------------------------*/
// theme settings
$body_text = "#ffffff";
$body_bg = "#000";
$theme_width = "800";
$theme_width_l = "160";
$theme_width_r = "160";
function render_header($header_content) {
global $theme_width,$settings,$locale;
echo "<table align='center' width='$theme_width' cellspacing='0' cellpadding='0' style='border:1px #ffcc00 solid;'>
<tr>
<td>
<table width='100%' cellspacing='0' cellpadding='0'>
<tr>
<td class='full-header' style='padding:5px;'>
<table width='100%' cellspacing='0' cellpadding='0'>
<tr>
<td>
srand((float) microtime() * 10000000);
$image[1]['pic']='/location/of/image1.JPG';
$image[1]['link']='/location/of/link1.php';
$image[2]['pic']='/location/of/image2.JPG';
$image[2]['link']='/location/of/link2.php';
$image[3]['pic']='/location/of/image3.JPG';
$image[3]['link']='/location/of/link3.php';
$image[4]['pic']='/location/of/image4.JPG';
$image[4]['link']='/location/of/link4.php';
$image[5]['pic']='/location/of/image5.JPG';
$image[5]['link']='/location/of/link5.php';
$rn = array_rand($image);
echo '<a href="'.$image[$rn]['link'].'">';
echo '<img src="'.$image[$rn]['pic'].'">';
</td>
</tr>
</table>
</td>
</tr>
</table>\n";
echo "<table width='100%' cellspacing='0' cellpadding='0'>\n<tr>
<td class='white-header'>\n";
$result = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_position>='2' ORDER BY link_order");
if (dbrows($result) != 0) {
$i = 0;
while($data = dbarray($result)) {
if (checkgroup($data['link_visibility'])) {
if ($data['link_url']!="---") {
if ($i != 0) { echo " ·\n"; } else { echo "\n"; }
$link_target = ($data['link_window'] == "1" ? " target='_blank'" : "");
if (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) {
echo "<a href='".$data['link_url']."'".$link_target." class='white'>".$data['link_name']."</a>";
} else {
echo "<a href='".BASEDIR.$data['link_url']."'".$link_target." class='white'>".$data['link_name']."</a>";
}
}
$i++;
}
}
}
echo ($i == 0 ? " " : "")."</td><td align='right' class='white-header'>".ucwords(showdate("%A, %B %d, %Y", time()))."</td>
</tr>
</table>\n";
echo "<table width='100%' cellspacing='0' cellpadding='0'>\n<tr>\n";
}
function render_footer($license=false) {
global $theme_width,$settings,$locale;
echo "</tr>\n</table>\n";
echo "<table align='center' table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='white-header'>".stripslashes($settings['footer'])."</td>
</tr>
</table>";
if ($license == false) {
echo "\n";
echo "\n";
}
echo "</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function render_news($subject, $news, $info) {
global $locale;
echo "<table width='100%' cellpadding='0' cellspacing='0' class='border'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='capmain'>$subject</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='main-body'>
$news
</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='news-footer'><img src='".THEME."images/bullet.gif'>
".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>
".$locale['041'].showdate("longdate", $info['news_date'])."</td>
<td align='right' class='news-footer'>\n";
if ($info['news_ext'] == "y") echo "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n";
if ($info['news_allow_comments']) echo "<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> ·\n";
echo $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']."' style='border:0px;vertical-align:middle;'></a>
</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function render_article($subject, $article, $info) {
global $locale;
echo "<table width='100%' cellpadding='0' cellspacing='0' class='border'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='capmain'>$subject</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='main-body'>
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='news-footer'><img src='".THEME."images/bullet.gif'>
".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>
".$locale['041'].showdate("longdate", $info['article_date'])."</td>
<td align='right' class='news-footer'>\n";
if ($info['article_allow_comments']) echo $info['article_comments'].$locale['043']." ·\n";
echo $info['article_reads'].$locale['044']."
<a href='print.php?type=A&item_id=".$info['article_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>
</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function opentable($title) {
echo "<table width='100%' cellpadding='0' cellspacing='0' class='border'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='capmain'>$title</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='main-body'>\n";
}
function closetable() {
echo "</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function openside($title) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='scapmain'>$title</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='side-body'>\n";
}
function closeside() {
echo "</td>
</tr>
</table>\n";
}
function opensidex($title,$open="on") {
$boxname = str_replace(" ", "", $title);
$box_img = $open == "on" ? "off" : "on";
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='scapmain'>$title</td>
<td class='scapmain' align='right'>
<img src='".THEME."images/panel_$box_img.gif' alt='$box_img' name='b_$boxname' onclick=\"javascript:flipBox('$boxname')\">
</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='side-body'>
<div id='box_$boxname'"; if($open=="off"){ echo "style='display:none'"; } echo ">\n";
}
function closesidex() {
echo "</div>
</td>
</tr>
</table>\n";
}
function tablebreak() {
echo "<table width='100%' cellspacing='0' cellpadding='0'>
<tr><td height='8'></td></tr>
</table>\n";
}
?>
kLx
Narys
Generolas
Pranešimai: 897
Įstojęs: 2007 Geg. 6 21:05:29
<?
/*--------------------------------------------+
| PHP -Fusion v6 - Content Management System |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: http://www.php-fusion.co.uk |
| email: nick@php-fusion.co.uk |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
/*--------------------------------------------+
| Warcraft Theme for PHP -Fusion v6 |
|---------------------------------------------|
| author: Stryker of The Conclave © 2006 |
| web: http://www.conclaveforums.com |
| email: netbrianw@gmail.com |
+--------------------------------------------*/
// theme settings
$body_text = "#ffffff";
$body_bg = "#000";
$theme_width = "800";
$theme_width_l = "160";
$theme_width_r = "160";
function render_header($header_content) {
global $theme_width,$settings,$locale;
echo "<table align='center' width='$theme_width' cellspacing='0' cellpadding='0' style='border:1px #ffcc00 solid;'>
<tr>
<td>
<table width='100%' cellspacing='0' cellpadding='0'>
<tr>
<td class='full-header' style='padding:5px;'>
<table width='100%' cellspacing='0' cellpadding='0'>
<tr>
<td>";
srand((float) microtime() * 10000000);
$image[1]['pic']='/location/of/image1.JPG';
$image[1]['link']='/location/of/link1.php';
$image[2]['pic']='/location/of/image2.JPG';
$image[2]['link']='/location/of/link2.php';
$image[3]['pic']='/location/of/image3.JPG';
$image[3]['link']='/location/of/link3.php';
$image[4]['pic']='/location/of/image4.JPG';
$image[4]['link']='/location/of/link4.php';
$image[5]['pic']='/location/of/image5.JPG';
$image[5]['link']='/location/of/link5.php';
$rn = array_rand($image);
echo '<a href="'.$image[$rn]['link'].'">';
echo '<img src="'.$image[$rn]['pic'].'">';
echo "
</td>
</tr>
</table>
</td>
</tr>
</table>\n";
echo "<table width='100%' cellspacing='0' cellpadding='0'>\n<tr>
<td class='white-header'>\n";
$result = dbquery("SELECT * FROM ".DB_PREFIX."site_links WHERE link_position>='2' ORDER BY link_order");
if (dbrows($result) != 0) {
$i = 0;
while($data = dbarray($result)) {
if (checkgroup($data['link_visibility'])) {
if ($data['link_url']!="---") {
if ($i != 0) { echo " ·\n"; } else { echo "\n"; }
$link_target = ($data['link_window'] == "1" ? " target='_blank'" : "");
if (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) {
echo "<a href='".$data['link_url']."'".$link_target." class='white'>".$data['link_name']."</a>";
} else {
echo "<a href='".BASEDIR.$data['link_url']."'".$link_target." class='white'>".$data['link_name']."</a>";
}
}
$i++;
}
}
}
echo ($i == 0 ? " " : "")."</td><td align='right' class='white-header'>".ucwords(showdate("%A, %B %d, %Y", time()))."</td>
</tr>
</table>\n";
echo "<table width='100%' cellspacing='0' cellpadding='0'>\n<tr>\n";
}
function render_footer($license=false) {
global $theme_width,$settings,$locale;
echo "</tr>\n</table>\n";
echo "<table align='center' table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='white-header'>".stripslashes($settings['footer'])."</td>
</tr>
</table>";
if ($license == false) {
echo "\n";
echo "\n";
}
echo "</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function render_news($subject, $news, $info) {
global $locale;
echo "<table width='100%' cellpadding='0' cellspacing='0' class='border'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='capmain'>$subject</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='main-body'>
$news
</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='news-footer'><img src='".THEME."images/bullet.gif'>
".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>
".$locale['041'].showdate("longdate", $info['news_date'])."</td>
<td align='right' class='news-footer'>\n";
if ($info['news_ext'] == "y") echo "<a href='news.php?readmore=".$info['news_id']."'>".$locale['042']."</a> ·\n";
if ($info['news_allow_comments']) echo "<a href='news.php?readmore=".$info['news_id']."'>".$info['news_comments'].$locale['043']."</a> ·\n";
echo $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']."' style='border:0px;vertical-align:middle;'></a>
</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function render_article($subject, $article, $info) {
global $locale;
echo "<table width='100%' cellpadding='0' cellspacing='0' class='border'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='capmain'>$subject</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='main-body'>
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='news-footer'><img src='".THEME."images/bullet.gif'>
".$locale['040']."<a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a>
".$locale['041'].showdate("longdate", $info['article_date'])."</td>
<td align='right' class='news-footer'>\n";
if ($info['article_allow_comments']) echo $info['article_comments'].$locale['043']." ·\n";
echo $info['article_reads'].$locale['044']."
<a href='print.php?type=A&item_id=".$info['article_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>
</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function opentable($title) {
echo "<table width='100%' cellpadding='0' cellspacing='0' class='border'>
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='capmain'>$title</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='main-body'>\n";
}
function closetable() {
echo "</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function openside($title) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='scapmain'>$title</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='side-body'>\n";
}
function closeside() {
echo "</td>
</tr>
</table>\n";
}
function opensidex($title,$open="on") {
$boxname = str_replace(" ", "", $title);
$box_img = $open == "on" ? "off" : "on";
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='scapmain'>$title</td>
<td class='scapmain' align='right'>
<img src='".THEME."images/panel_$box_img.gif' alt='$box_img' name='b_$boxname' onclick=\"javascript:flipBox('$boxname')\">
</td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='side-body'>
<div id='box_$boxname'"; if($open=="off"){ echo "style='display:none'"; } echo ">\n";
}
function closesidex() {
echo "</div>
</td>
</tr>
</table>\n";
}
function tablebreak() {
echo "<table width='100%' cellspacing='0' cellpadding='0'>
<tr><td height='8'></td></tr>
</table>\n";
}
?>
Bandyk taip.
Tadziokaz
Narys
Generolas
Pranešimai: 894
Įstojęs: 2008 Kov. 11 17:03:55
DEkuiiiii
kLx
Narys
Generolas
Pranešimai: 897
Įstojęs: 2007 Geg. 6 21:05:29
nėr už ką.
Peršokti į forumą:
Nebeegzistuojančios svetainės
Žaliems
Bendri PHP-F klausimai
WordPress
Kiti PHP, HTML, MySQL klausimai
Expert PHP, MySQL klausimai
Kitos TVS
C#, Python, Java, JS, C++ klausimai
Naujų modų pristatymai
Mods, Panels & Infusions
Themes
Dalinuosi, dovanoju!
Jūsų saitai
Klausimai apie domenus ir hostingus
VPS/DS serverių konfigūravimas ir valdymas
Viskas apie skaitliukus, top'us ir lankomumą
Dizaino konkursai
Parduodu - perku dizainą, banerį
Parduodu - perku - keičiuosi reklama
Parduodu - perku domeną, tinklapį
Siūlau - ieškau hostingo/VPS serverio
Parduodu - perku skriptą, modifikaciją, tvs
Socialiniai tinklai - Facebook ir kiti
Legalus verslas, teisiniai klausimai
Visa kita kas susiję su darbu ir pinigais
LTStartups.com - Lietuvos startuolių bendruomenė
Off-Topic diskusijos
IT naujienos
Portalo informacija
Narių pasiūlymai
Geležis ir programinė įranga
Grafika
Out Of Place
Su e-verslu nesusijęs darbas ir prekyba
Dalinuosi, dovanoju!