iv seen this code before in my coding.
this is the banner code for one of my banners
function m_banners() {
global $cookieurl,$siteurl,$ban_mwidth,$ban_mheight;
$ban_mwidth =260;
$ban_mheight=90;
$sql="select * from banners where b_blk='N' and b_typ='M' and b_exp='N'";
$res=mysql_query($sql);
$dis=array();
$dis_id=array();
$num=mysql_num_rows($res);
if(mysql_num_rows($res)) {
while($row=mysql_fetch_object($res)) {
$tmp=explode(".",$row->b_img);
$tmp_count=count($tmp);
$ext=strtolower($tmp[$tmp_count-1]);
if($ext=="swf") {
$img_s="<script language=\"JavaScript1.2\">
function disps1() {
( this would be were it makes the url for the link ? )[COLOR="Red"]window.open(\"$siteurl/banners/index.php?url=$row->b_url&seid=$row->b_id&sess=set\",\"MyWindow\",'toolbar,width=screen.width,height=screen.height')[/COLOR]
}
</script>
<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"$ban_mwidth\" height=\"$ban_mheight\" onClick=\"javascript:disps1();\">
<param name=\"movie\" value=\"$siteurl/$row->b_img\">
<param name=\"quality\" value=\"high\">
<embed src=\"$siteurl/$row->b_img\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"$ban_mwidth\" height=\"$ban_mheight\"></embed></object>";
} else $img_s="<a href=\"$siteurl/banners/index.php?url=$row->b_url&seid=$row->b_id&sess=set\" target=\"_blank\"><img src=\"$siteurl/$row->b_img\" border=\"0\" width=\"$ban_mwidth\" height=\"$ban_mheight\" alt=\"".stripslashes($row->b_desc)."\" ismap></a>";
$dis[]=$img_s;
$dis_id[]=$row->b_id;
}
$couu_h=count($dis_id);
$tak=rand(0,$couu_h-1);
$sql_query="select * from banners where b_id='$dis_id[$tak]'";
$num=firesql($sql_query,'num');
if($num!=0) {
$bann=firesql($sql_query,'get');
$d_f=date("d",$bann->b_f_day);
$m_f=date("m",$bann->b_f_day);
$y_f=date("Y",$bann->b_f_day);
$d_t=date("d",$bann->b_t_day);
$m_t=date("m",$bann->b_t_day);
$y_t=date("Y",$bann->b_t_day);
$f_day=mktime(0,0,0,$m_f,$d_f,$y_f);
$t_day=mktime(0,0,0,$m_t,$d_t,$y_t);
$today=mktime(0,0,0,date("m"),date("d"),date("Y"));
if(($bann->b_dur=="D") and ($today>$t_day)) {
delete_banner($dis_id[$tak]);
}
elseif($bann->b_dur=="C" and ($bann->b_ncl<=$bann->b_clks)) {
delete_banner($dis_id[$tak]);
}
elseif($bann->b_dur=="I" and ($bann->b_noi<=$bann->b_see)) {
delete_banner($dis_id[$tak]);
}
echo $dis[$tak];
for($i=+1; $i<=$ip_co; $i++) {
mysql_query("update banners set b_see=b_see+1 where b_id='$dis_id[$tak]'");
}
}
}
}
and this is the html mix php that shows the banner shows up perefect.
<table width="100%" bgcolor="#000000" border="0"><tr><td class="body" valign="top" align="center">
<tr><td align="center"><font color="#FFFFFF" size="1"><br />(Advertisment)</font><br /><br /><?
$sts=check_banorcod('m');
if(($sts=='b') || empty($sts)) { ?>
<? echo m_banners(); ?>
<? } else { ?>
<? echo dis_cod('m','260','90'); ?>
<? } ?>
<?
$sts=check_banorcod('m');
if(($sts=='b') || empty($sts)) { ?>
<? echo m_banners(); ?>
<? } else { ?>
<? echo dis_cod('m','260','90'); ?>
<? } ?>
<?
$sts=check_banorcod('m');
if(($sts=='b') || empty($sts)) { ?>
<? echo m_banners(); ?>
<? } else { ?>
<? echo dis_cod('m','260','90'); ?>
<? } ?></td>
</tr>
</table>
for some reason it im getting the server error.
check list.
1) data base / is making the third party link just fine so i know its at least making to the date base.
2) In the link itself when mouse over it shows the proper link at the end after index.php?url=http://www.thirdpartylink.com
3) ive check the coding and nothing has changed from the core code.
4) Server issues a month or so ago , has some issues with date base username and password . i was able to fix this buy uploading datebase backup file.
5) all other functions seem to be ok. just have banner link issues.
on another note ive decided to use the java code i mention before until i can fix problem. my ? with this code is . when i use MY Banner set up it lets me have 3 banners side by side. but when i use the java code it lines them up and down. here is the code.
<script language="Javascript">
<!--
var currentdate = 0;
var core = 0;
function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = initArray.arguments[i];
}
}
link = new initArray(
[COLOR="Red"]" link to advertisement "[/COLOR]
);
image = new initArray(
[COLOR="red"]" link to image "[/COLOR]
);
var currentdate = new Date();
var core = currentdate.getSeconds() % image.length;
var ranlink = link[core];
var ranimage = image[core];
document.write('<a href=\"' +ranlink+ '\"target="_blank"\"><img src=\"'+ranimage+'\" border="0" \"width="300"\" height="200"></a>');
//-->
</SCRIPT>
now in the other code where its mixed html and php for layout i have just pasted 3 of the same code witch show the same banner if only one banner . when multiple it random pics them. i could go on for days, sorry but i just can't figure out what changed to make it do the server error. thanks again for help that has been given. Shwag:o