imho.ws
IMHO.WS  

Вернуться   IMHO.WS > Веб-мастеру > Веб-программирование
Опции темы
Старый 08.07.2004, 15:48     # 1
AudioBeast
Member
 
Аватар для AudioBeast
 
Регистрация: 19.08.2003
Адрес: В интернете
Пол: Male
Сообщения: 358

AudioBeast Путь к славе только начался
Помогите пожалуйста найти ошибку в коде

http://warez.a2clan.com там в шапке должен отображаться баннер, но почему-то его не видно, а внизу страницы написано Done with errors, плз помогите найти ошибку, код баннера правильный
__________________
The only true wisdom is in knowing you know nothing.
-- Socrates
AudioBeast вне форума  
Старый 08.07.2004, 16:09     # 2
Saruman
::VIP::
 
Аватар для Saruman
 
Регистрация: 12.11.2002
Адрес: Nicosia, Cyprus
Сообщения: 1 285

Saruman ГуруSaruman ГуруSaruman ГуруSaruman ГуруSaruman ГуруSaruman ГуруSaruman ГуруSaruman ГуруSaruman ГуруSaruman ГуруSaruman ГуруSaruman ГуруSaruman ГуруSaruman Гуру
У тебя яваскрипт-код неправильный. В коде баннера все \' замени на просто '. Должно получиться следующее:
Код:
<script language="JavaScript">
<!--
var RndNum4NoCash = Math.round(Math.random() * 1000000000);
document.write(
'<iframe src="http://ad.adriver.ru/cgi-bin/erle.cgi'
+ '?sid=44839&target=blank&bt=1&pz=0&rnd=' + RndNum4NoCash
+ '" frameborder=0 vspace=0 hspace=0 width=468 height=60 marginwidth=0 marginheight=0 scrolling=no>'
+ '<a href="http://ad.adriver.ru/cgi-bin/click.cgi'
+ '?sid=44839&bt=1&pz=0&rnd=' + RndNum4NoCash + '" target=_blank>'
+ '<img src="http://ad.adriver.ru/cgi-bin/rle.cgi?'
+ 'sid=44839&bt=1&pz=0&rnd=' + RndNum4NoCash
+ '" alt="-AdRiver-" border=0 width=468 height=60></a></iframe>')
// -->
</script>
__________________
"If people only knew how hard I work to gain my mastery, it wouldn't seem so wonderful at all." Michelangelo Buonarroti
Saruman вне форума  
Старый 25.07.2004, 22:08     # 3
AudioBeast
Member
 
Аватар для AudioBeast
 
Регистрация: 19.08.2003
Адрес: В интернете
Пол: Male
Сообщения: 358

AudioBeast Путь к славе только начался
уф, нашел эту тему нацонец. Саруман, спасибо что не пожалел времени, но покопавшись в коде Php, я увидел точно такой-же код как и тут у тебя, только интересно почему он так неправильно отображает тут. Я кстати убрал этот баннер, потом добавил счетчик снизу, и все равно такая вещь.. Не знаю в чем дело..
__________________
The only true wisdom is in knowing you know nothing.
-- Socrates
AudioBeast вне форума  
Старый 26.07.2004, 01:03     # 4
Hubbitus
мод
IMHO Кодер-200(6,7,8)
 
Регистрация: 29.03.2003
Адрес: Saint-Petersburg, Russia
Пол: Male
Сообщения: 2 734

Hubbitus Бог с наворотамиHubbitus Бог с наворотами
Hubbitus Бог с наворотамиHubbitus Бог с наворотамиHubbitus Бог с наворотамиHubbitus Бог с наворотамиHubbitus Бог с наворотамиHubbitus Бог с наворотамиHubbitus Бог с наворотамиHubbitus Бог с наворотамиHubbitus Бог с наворотамиHubbitus Бог с наворотамиHubbitus Бог с наворотамиHubbitus Бог с наворотами
a2)Exodus, приведи как у тебя в PHP коде это выводится, из чего берется...
__________________
Я делаю Линукс! Присоединяйтесь к свободным людям!

Связаться со мной всегда можно по джабберу: Hubbitus@jabber.ru
Pahan-Hubbitus.
Hubbitus вне форума  
Старый 29.07.2004, 01:55     # 5
AudioBeast
Member
 
Аватар для AudioBeast
 
Регистрация: 19.08.2003
Адрес: В интернете
Пол: Male
Сообщения: 358

AudioBeast Путь к славе только начался
header.html на который ссылается theme.php с папки самой темы

Код:
<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
<td width="15" height="15"><img src="themes/3D-Fantasy/images/up-left2.gif" alt="" border="0"></td>
<td background="themes/3D-Fantasy/images/up2.gif" align="center" width="100%" height="15">&nbsp;</td>
<td><img src="themes/3D-Fantasy/images/up-right2.gif" width="15" height="15" alt="" border="0"></td></tr>
<tr>
<td background="themes/3D-Fantasy/images/left2.gif" width="15">&nbsp;</td>
<td bgcolor="ffffff" width="100%">

<table border="0" bgcolor="#ffffff"><tr><td align="left">
<a href="index.php"><img src="themes/3D-Fantasy/images/logo.gif" border="0" alt="$sitename"></a>
</td><td align="center">




<!-- RLE code START -->
        <script language="JavaScript">
<!--
var RndNum4NoCash = Math.round(Math.random() * 1000000000);
document.write(
'<iframe src="http://ad.adriver.ru/cgi-bin/erle.cgi'
+ '?sid=44839&target=blank&bt=1&pz=0&rnd=' + RndNum4NoCash
+ '" frameborder=0 vspace=0 hspace=0 width=468 height=60 marginwidth=0 marginheight=0 scrolling=no>'
+ '<a href="http://ad.adriver.ru/cgi-bin/click.cgi'
+ '?sid=44839&bt=1&pz=0&rnd=' + RndNum4NoCash + '" target=_blank>'
+ '<img src="http://ad.adriver.ru/cgi-bin/rle.cgi?'
+ 'sid=44839&bt=1&pz=0&rnd=' + RndNum4NoCash
+ '" alt="-AdRiver-" border=0 width=468 height=60></a></iframe>')
// -->
</script><
        <noscript> <iframe src="http://ad.adriver.ru/cgi-bin/erle.cgi?sid=44839&target=blank&bt=1&pz=0&rnd=1569181395" frameborder=0 vspace=0 hspace=0 width=468 height=60 marginwidth=0 marginheight=0 scrolling=no> 
        <a href="http://ad.adriver.ru/cgi-bin/click.cgi?sid=44839&bt=1&pz=0&rnd=1569181395" target=_blank> 
        <img src="http://ad.adriver.ru/cgi-bin/rle.cgi?sid=44839&bt=1&pz=0&rnd=1569181395" alt="-AdRiver-" border=0 width=468 height=60></a></iframe> 
        </noscript> 
        <!-- RLE code END -->

</tr></td>
</table>
</td>
<td background="themes/3D-Fantasy/images/right2.gif">&nbsp;</td></tr>
<tr>
<td width="15" height="15"><img src="themes/3D-Fantasy/images/down-left2.gif" border="0"></td>
<td background="themes/3D-Fantasy/images/down2.gif" align="center" height="15">&nbsp;</td>
<td><img src="themes/3D-Fantasy/images/down-right2.gif" width="15" height="15" border="0"></td></tr>
</td></tr></table>
$public_msg<br>
<table cellpadding="0" cellspacing="0" width="99%" border="0" align="center" bgcolor="#ffffff">
<tr><td bgcolor="#ffffff" valign="top">


theme.php в папке самой темы, на который ссылается header.php на главной страничке


Код:
<?php

/*****************************************************************/
/* 3D-Fantasy.com Theme                                          */
/* by Francisco Burzi                                            */
/*                                                               */
/* Modificated and optimized for PHPNuke 6.5                     */
/* by Denis Tuzov http://denis.tuzov.ru                          */
/* Other themes you may download at http://themes.crossworlds.ru */
/*****************************************************************/
$bgcolor1 = "#d5d5d5";
$bgcolor2 = "#7b91ac";
$bgcolor3 = "#ffffff";
$bgcolor4 = "#d5d5d5";
$textcolor1 = "#000000";
$textcolor2 = "#000000";

include("themes/3D-Fantasy/tables.php");

function themeheader() {
    global $user, $banners, $sitename, $slogan, $cookie, $prefix, $dbi;
    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\"><br>\n\n\n";
    if ($banners == 1) {
	include("banners.php");
    }
    $topics_list = "<select name=\"topic\" onChange='submit()'>\n";
    $topics_list .= "<option value=\"\">All Topics</option>\n";
    $toplist = sql_query("select topicid, topictext from ".$prefix."_topics order by topictext", $dbi);
    while(list($topicid, $topics) = sql_fetch_row($toplist, $dbi)) {
    if ($topicid==$topic) { $sel = "selected "; }
	$topics_list .= "<option $sel value=\"$topicid\">$topics</option>\n";
	$sel = "";
    }
    if ($username == "Anonymous") {
	$theuser = "&nbsp;&nbsp;<a href=\"modules.php?name=Your_Account\">Create an account";
    } else {
	$theuser = "&nbsp;&nbsp;Welcome $username!";
    }
    $public_msg = public_message();
    $tmpl_file = "themes/3D-Fantasy/header.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    blocks(left);
    $tmpl_file = "themes/3D-Fantasy/left_center.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}


function themefooter() {
    global $index, $foot1, $foot2, $foot3, $foot4;
    if ($index == 1) {
	$tmpl_file = "themes/3D-Fantasy/center_right.html";
	$thefile = implode("", file($tmpl_file));
	$thefile = addslashes($thefile);
	$thefile = "\$r_file=\"".$thefile."\";";
	eval($thefile);
	print $r_file;
	blocks(right);
    }
    $footer_message = "$foot1<br>$foot2<br>$foot3<br>$foot4";
    $tmpl_file = "themes/3D-Fantasy/footer.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
    global $anonymous, $tipath;
    $ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
	$t_image = "themes/$ThemeSel/images/topics/$topicimage";
    } else {
	$t_image = "$tipath$topicimage";
    }
    if ($notes != "") {
	$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
	$notes = "";
    }
    if ("$aid" == "$informant") {
	$content = "$thetext$notes\n";
    } else {
	if($informant != "") {
	    $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
	} else {
	    $content = "$anonymous ";
	}
	$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $posted = ""._POSTEDBY." ";
    $posted .= get_author($aid);
    $posted .= " "._ON." $time $timezone ($counter "._READS.")";
    $tmpl_file = "themes/3D-Fantasy/story_home.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
    global $admin, $sid, $tipath;
    $ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
	$t_image = "themes/$ThemeSel/images/topics/$topicimage";
    } else {
	$t_image = "$tipath$topicimage";
    }
    $posted = ""._POSTEDON." $datetime "._BY." ";
    $posted .= get_author($aid);
    if ($notes != "") {
	$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
	$notes = "";
    }
    if ("$aid" == "$informant") {
	$content = "$thetext$notes\n";
    } else {
	if($informant != "") {
	    $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
	} else {
	    $content = "$anonymous ";
	}
	$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $tmpl_file = "themes/3D-Fantasy/story_page.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

function themesidebox($title, $content) {
    $tmpl_file = "themes/3D-Fantasy/blocks.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}

?>
header.php главный..


Код:
<?php

/************************************************************************/
/* PHP-NUKE: Advanced Content Management System                         */
/* ============================================                         */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if (eregi("header.php",$_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

require_once("mainfile.php");

##################################################
# Include some common header for HTML generation #
##################################################

$header = 1;

function head() {
    global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle;
    $ThemeSel = get_theme();
    include("themes/$ThemeSel/theme.php");
    echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
    echo "<html>\n";
    echo "<head>\n";
    echo "<title>$sitename $pagetitle</title>\n";

    include("includes/meta.php");
    include("includes/javascript.php");

    if (file_exists("themes/$ThemeSel/images/favicon.ico")) {
	echo "<link REL=\"shortcut icon\" HREF=\"themes/$ThemeSel/images/favicon.ico\" TYPE=\"image/x-icon\">\n";
    }

    echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n";
    include("includes/my_header.php");
    echo "\n\n\n</head>\n\n";
    themeheader();
}

online();
head();
include("includes/counter.php");
global $home;
if ($home == 1) {
    message_box();
    blocks(Center);
}

?>
вообще, я забыл сказать, с первого раза я баннер поставил, но он отображался не по центру, и я полез не туда и где-то отредактировал, и вот результат..кстати, в настройках php запрещен тег script, т.е. в новостях и в боковых блоках его нельзя вписывать, сразу пишет что нельзя, а через фтп такого не пишет, но все-же может из-за этого?
Но ведь я это не менял и все-же поставил баннер до изменений..

Может надо создать отдельно документ banner.js и к нему путь прописать? но я забыл как это делается, с php я не смогу это сделать, знаю include к php файлам, а как быть с js не знаю..
__________________
The only true wisdom is in knowing you know nothing.
-- Socrates
AudioBeast вне форума  

Опции темы

Ваши права в разделе
Вы НЕ можете создавать новые темы
Вы не можете отвечать в темах.
Вы НЕ можете прикреплять вложения
Вы НЕ можете редактировать свои сообщения

BB код Вкл.
Смайлы Вкл.
[IMG] код Выкл.
HTML код Выкл.

Быстрый переход


Часовой пояс GMT +4, время: 23:43.




Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.