Dzięki Pieka. Właśnie o takie umieszczenie reklamy mi chodziło. Problem w tym, że w moim pliku did.php nie ma fragmentu kodu podanego przez ciebie. Załączam w tym poście kod mojego pliku did.php. Spróbuj wstawić w niego kod. Z góry dzięki.
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Orginal von: pirdani
| eMail: pirdani@
| Web: http://www.lucky-garden-geithain.de
| ---------------------------------------------------+
| Angepasst für V.6 - 2005 EdEdster (Stefan Noss)
| http://www.edsterathome.de/
| ---------------------------------------------------+
| 2006 Artur Wiebe <>
| http://wibix.de/
| ---------------------------------------------------+
| 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
+----------------------------------------------------*/
?>
<script type="text/javascript">
function screenshot_open(titel, imageadr, breite, hoehe)
{
var fenster = window.open("", "Screenshot",
"menubar=0,scrollbars=1,status=0,width="+breite+",height="+hoehe+",toolbar=0")
if(fenster!=null){ //Hat das Öffnen des Fensters geklappt?
fenster.document.open() //Öffnen für Schreibzugriff, notwendig!
fenster.document.write("<"+"img src='"+imageadr+"'"+">")
fenster.document.close() //Schreibzugriff beenden, notwendig!
}
}
</script>
<?php
/*
* ACTION
*/
/* FIXME - obsolete?
if($aktiv_check) {
$sql_update = dbquery("UPDATE ".DB_PREFIX."prodownloads"
." SET status='Y' WHERE id = '$did'");
}
*/
if(iUSER >= $down_settings['bewertungen']
&& isset($_POST['btn_vote']) && isset($did)) {
$sql_insert= dbquery("INSERT INTO ".DB_PREFIX."prodownloads_bewertungen"
."(did, user_id, vote_opt)"
." VALUES"
."('$did', '".$userdata['user_id']."'"
.",'".$_POST['did_vote']."')");
}
if(iUSER >= $down_settings['kommentare']
&& isset($_POST['insert_kommentar']) && isset($did)) {
$kommentar = stripinput(censorwords($kommentar));
if(iMEMBER) {
$c_user = $userdata['user_id'];
$c_name = $userdata['user_name'];
} else {
$c_user = "0";
$c_name = stripinput($_POST['comment_name']);
}
$sql_insert = dbquery("INSERT INTO ".DB_PREFIX."prodownloads_kommentare"
."(did, user_id, comment_name, text, datestamp)"
." VALUES"
."('$did', '$c_user', '$c_name', '$kommentar', '".time()."')");
}
if(iUSER < $down_settings['downbereich']) {
echo $locale['PDP_123'];
return;
}
if(!isset($did)) {
return;
}
$downloads = dbquery("SELECT * FROM ".DB_PREFIX."prodownloads"
." WHERE id='$did'");
$data = dbarray($downloads);
$user = dbquery("SELECT user_name FROM ".$db_prefix."users"
." WHERE user_id='".$data['user_id']."'");
$udata = dbarray($user);
if($data['bild']!="") {
$imagepx = getimagesize($uploadimage.$data['bild']);
}
/*
*
*/
opentable($data['name']);
echo "<p><table class='tbl-border' cellspacing='1' width='100%'>
<tr>
<td class='tbl1' valign='top'>"
.nl2br(parseubb($data['beschreibung']))."</td>
<td class='tbl1' width='100' valign='top' rowspan='2'>
<table class='tbl-border' cellspacing='1' width='100%'>
<tr><td align='center' class='tbl2'><span class='small'>";
// screenshot
if($data['bild'] == "") {
echo "<span class='small2'>".$locale['PDP_200']."</span>";
} else {
echo "<a href='javascript:screenshot_open(\""
.$data['name']."\", \""
.$uploadimage.$data['bild']."\", \""
.($imagepx[0]+20)."\", \"".($imagepx[1]+20)
."\")'>".$locale['PDP_107']."</a>";
}
echo "</span></td></tr>";
// download count
echo "<tr><td align='center' class='tbl2'>"
."<span class='small'>".$locale['PDP_108'].":<br>"
.$data['downloads']."</span></td></tr>";
// Wenn der Download extern ist
echo "<tr><td align='center' class='tbl2'><span class='small'>";
if($data['down'] == "") {
echo $locale['PDP_109']."<br>".$locale['PDP_109_1'];
} else {
echo $locale['PDP_109']."<br>"
.round(filesize($uploadfile.$data['down'])/1024, 2);
}
echo "</span></td></tr>";
// who posted and when.
echo "<tr><td align='center' class='tbl2'><span class='small'>"
."<a href='".BASEDIR."profile.php?lookup="
.$data['user_id']."'>".$udata['user_name']
."</a><br>".showdate("shortdate", $data['datestamp'])
."</span></td></tr>";
// report broken downloads
echo "<tr><td align='center' class='tbl2'><span class='small'>"
."<a href='".FUSION_SELF
."?funk=defekt&catid=$catid&did=$did'>"
.$locale['PDP_110']."</a></span></td></tr>";
echo "</table></td></tr>\n";
[color=red]echo "<tr>
<td align='center' valign='bottom'>
<script type=\"text/javascript\"><!--
google_ad_client = \"pub-2472815660955573\";
google_ad_width = 180;
google_ad_height = 150;
google_ad_format = \"180x150_as\";
google_ad_type = \"text_image\";
//2007-01-11: 2
google_ad_channel = \"9513608484\";
google_color_border = \"1D1E1D\";
google_color_bg = \"1D1E1D\";
google_color_link = \"FFFFFF\";
google_color_text = \"FFFFFF\";
google_color_url = \"FFFFFF\";
//--></script>
<script type=\"text/javascript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">
</script>
</td>
</tr>";[/color]
// Download "button"
echo "<tr class='tbl2'>\n"
."<td align='center' height='12'><a href='".FUSION_SELF
."?funk=file&catid=$catid&did=".$data['id']."'>"
."<b>".$locale['PDP_111']."</b></a></td></tr></table>";
closetable();
tablebreak();
/*
* BEWERTUNG
*/
opentable($locale['PDP_114']);
$sql_vote = dbquery("SELECT * FROM ".DB_PREFIX."prodownloads_bewertungen"
." WHERE did='$did'");
if(dbrows($sql_vote)!=0) {
$sql_votes = dbquery("SELECT *"
." FROM ".DB_PREFIX."prodownloads_bewertungen"
." WHERE did='".$did."'");
$vote = dbrows($sql_votes);
$max_val = 0;
for($i=1; $i<6; $i++) {
$sql_vote = dbquery("SELECT *"
." FROM ".DB_PREFIX."prodownloads_bewertungen"
." WHERE did='$did' AND vote_opt='$i'");
$votes[$i] = dbrows($sql_vote);
if($votes[$i] > $max_val) {
$max_val = $votes[$i];
}
}
for($i=1; $i<6; $i++) {
$w[$i] = intval($votes[$i] * 100 / $max_val);
}
$img = THEME."images/pollbar.gif";
echo "<p>
<table cellpadding='3' cellspacing='0' width='100%' class='tbl-border'>
<tr class='tbl2'>
<td align='right' width='100'>".$locale['PDP_115']."</td>
<td><img src='$img' alt='' height='12' width='".$w[1]."%'></td>
<td align='right' width='1%'>".intval($votes[1]*100/$vote)."%</td>
<td align='left' width='100'>[".$votes[1]." ".$locale['PDP_116']."]</td>
</tr>
<tr class='tbl1'>
<td align='right' width='100'>".$locale['PDP_117']."</td>
<td<img src='$img' alt='' height='12' width='".$w[2]."%'></td>
<td align='right'>".intval($votes[2]*100/$vote)."%</td>
<td>[".$votes[2]." ".$locale['PDP_116']."]</td>
</tr>
<tr class='tbl2'>
<td align='right' width='100'>".$locale['PDP_118']."</td>
<td><img src='$img' alt='' height='12' width='".$w[3]."%'></td>
<td align='right'>".intval($votes[3]*100/$vote)."%</td>
<td>[".$votes[3]." ".$locale['PDP_116']."]</td>
</tr>
<tr class='tbl1'>
<td align='right' width='100'>".$locale['PDP_119']."</td>
<td><img src='$img' alt='' height='12' width='".$w[4]."%'></td>
<td align='right'>".intval($votes[4]*100/$vote)."%</td>
<td>[".$votes[4]." ".$locale['PDP_116']."]</td>
</tr>
<tr class='tbl2'>
<td align='right' width='100'>".$locale['PDP_120']."</td>
<td><img src='$img' alt='' height='12' width='".$w[5]."%'></td>
<td align='right'>".intval($votes[5]*100/$vote)."%</td>
<td>[".$votes[5]." ".$locale['PDP_116']."]</td>
</tr>
</table>\n";
}
if(iUSER >= $down_settings['bewertungen']
&& dbcount("(*)", "prodownloads_bewertungen",
"(did=$did AND user_id='".$userdata['user_id']."')")==0) {
echo "<p>
<form action='".FUSION_SELF."?catid=$catid&did=$did' method='POST'>
<table cellspacing='1' width='100%' class='tbl-border'>
<tr>
<td class='tbl2' align='center' width='100'>".$locale['PDP_121']."</td>
<td class='tbl1'><select size='1' class='textbox' name='did_vote' />
<option value='1'>".$locale['PDP_115']."</option>
<option value='2'>".$locale['PDP_117']."</option>
<option value='3'>".$locale['PDP_118']."</option>
<option value='4'>".$locale['PDP_119']."</option>
<option value='5'>".$locale['PDP_120']."</option>
</select>
<input type='submit' value='".$locale['PDP_122']
."' class='button' name='btn_vote' />
</td>
</tr>
</table>
</form>";
}
closetable();
tablebreak();
/*
*
*/
opentable($locale['PDP_113']);
// KOMMENTARE - FIXME
$sql_kommentar = dbquery("SELECT *"
." FROM ".DB_PREFIX."prodownloads_kommentare"
." WHERE did='$did' ORDER BY datestamp");
if(dbrows($sql_kommentar)) {
$count = 0;
echo "<table width='100%' class='tbl-border' cellspacing='1'>\n";
while($kommentar = dbarray($sql_kommentar)) {
$name = $kommentar['comment_name'];
if($kommentar['user_id']) {
$name = "<a href='".BASEDIR."profile.php?lookup="
.$kommentar['user_id']."'>$name</a>";
}
echo "<tr class='tbl".((++$count%2)+1)."'><td><b>$name</b> "
.showdate("shortdate", $kommentar['datestamp'])
."<br>".nl2br($kommentar['text']);
}
echo "</table>\n";
}
// show comment form.
if(iUSER >= $down_settings['kommentare']) {
echo "<p><form action='".FUSION_SELF
."?catid=$catid&did=$did' method='POST'>
<table align='center' cellspacing='1' width='100%' class='tbl-border'>
<tr>
<td class='tbl2'>".$locale['PDP_112']."</td>
<td class='tbl1'><input type='text' size='32' maxlength='255'"
." value='".(iMEMBER ? $userdata['user_name'] : "")."'"
." class='textbox' name='comment_name' "
.(iMEMBER ? " disabled" : "" )." /></td>
</tr><tr><td class='tbl2'></td><td class='tbl1'>
<textarea cols='70' rows='5' class='textbox' style='width:100%;'"
." name='kommentar'></textarea></td>
</tr><tr><td class='tbl2'></td><td class='tbl1'>
<input type='submit' value='".$locale['PDP_113']."' class='button'"
." name='insert_kommentar' />
</td>
</tr>
</table></form>";
}
closetable();
?>
Edytowane przez Pieka dnia 11.01.2007 20:50:30
|