Location: PHPKode > projects > MyOWNSpace > MyOWNspace_v8.2/www/myownad/index.php
<?php
$maxv=6;
$maxh=3;
if(isset($_GET['u'])) $conf_file="../myownad/config".$_GET['u'].".php";
else $conf_file="../myownad/config.php";
include($conf_file);

//require_once '../classes/adrotator/ccrotator.class.php';
//+++++++++++++++++++++++
if(isset($_GET['bg'])&&$_GET['bg']!="") $bgcolor="#".$_GET['bg'];
else $bgcolor="#ffffff";
if(isset($_GET['col'])&&$_GET['col']!="") $color="#".$_GET['col'];
else $color="#000000";
if(isset($_GET['hov'])&&$_GET['hov']!="") $hover="#".$_GET['hov'];
else $hover=$color;
if(isset($_GET['link'])&&$_GET['link']!="") $hover="#".$_GET['link'];
else $link="#ff0000";
//FORMAT HORIZONTAL
if ((isset($_GET['f']))&& ($_GET['f']=="h")){
echo "<html><head><style><!--
.ch{cursor:pointer;cursor:hand}a.ad:link { color: ".$color." }a.ad:visited { color: ".$color." }a.ad:hover { color: ".$hover." }a.ad:active { color: ".$color." }a.search:link { color: ".$color." }a.search:visited { color: ".$color." }a.search:hover { color: ".$hover." }a.search:active { color: ".$color." }a.attribution:link { color: ".$color." }a.attribution:visited { color: ".$color." }a.attribution:hover { color: ".$hover." }a.attribution:active { color: ".$color." }  --></style>
</head>
<body bgColor=\"".$bgcolor."\" leftMargin=\"0\" topMargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<table width=\"728\" height=\"90\" cellspacing=\"1\" cellpadding=\"0\" border=\"0\" bgcolor=\"".$bgcolor."\">
<tr><td>
<table width=\"726\" height=\"88\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" bgcolor=\"".$bgcolor."\">
<tr><td width=\"\" height=\"\">
<table width=\"726\" height=\"76\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr>

<td  width=\"1\"><img alt=\"\" height=1 width=\"1\"></td><td  >
<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"220\" bgcolor=\"".$bgcolor."\">
<tr>";

for($i=1;$i<=(count($myownad));$i++)
{
$titre[$i]=$myownad[$i]['titre'];
$texte[$i]=$myownad[$i]['texte'];
$lien[$i]=$myownad[$i]['lien'];

//$counter_file = '../classes/adrotator/tracker.txt';
$code[$i]= '<td id="taw0" class="ch" width="240" height="76" align="left" valign="top" ><font style="line-height:12px; font-size:11px; font-family:verdana,arial,sans-serif;">
<a class="ad" id="aw0" target="_top" href="http://'.$lien[$i].'" >
<b>'.$titre[$i].'</b></a></font>
<br><font style="line-height:12px; font-size:10px; font-family:verdana,arial,sans-serif; color:'.$color.'">
'.$texte[$i].'</font>
<br><font style="line-height:12px; font-size:10px" face="verdana,arial,sans-serif" color="'.$link.'">
'.$lien[$i].'</font>
</td></tr></table></td>
<td  width="1"><img alt="" height=1 width="1"></td>
<td  width="1"><img alt="" height=1 width="1"></td><td  ><table border="0" cellpadding="2" cellspacing="0" width="240" bgcolor="'.$bgcolor.'">
<tr>';
}
// Create class object.

//$ccr = new CodeRotator ( $counter_file );
// Add codes to be randomly displayed.
// Work cycle will finish after 2+5+7+3+3=20 exposures.
for($i=1;$i<=$maxh;$i++)
{
if ($i>count($myownad)) break; 
// Display selected code.
$j=rand(1,count($myownad));
echo $code[$j];
}

echo '</tr></table></td><td  width="1"><img alt="" height=1 width="1"></td></tr></table></td>
</tr><tr><td width=726 height=10 bgcolor="'.$bgcolor.'" style="border-top: ">
<table border=0 cellpadding=0 cellspacing=0 width=100%><tr><td align="left">
<a class="attribution" href="http://myownspace.fr/myownad/" target="_blank">
<font style="white-space:no-wrap;font-size:10px; font-family:verdana,arial,sans-serif;">
My Own Aaaaaads</font></a></td></tr></table>                                                                                                                                                                                       
</td></tr></table></td></tr></table></body></html>';
}


// FORMAT VERTICAL
if ((isset($_GET['f']))&& ($_GET['f']=="v")){
echo "<html><head><style><!--
.ch{cursor:pointer;cursor:hand}a.ad:link { color: #000000 }a.ad:visited { color: #000000 }a.ad:hover { color: #000000 }a.ad:active { color: #000000 }a.search:link { color: #000000 }a.search:visited { color: #000000 }a.search:hover { color: #000000 }a.search:active { color: #000000 }a.attribution:link { color: #000000 }a.attribution:visited { color: #000000 }a.attribution:hover { color: #000000 }a.attribution:active { color: #000000 }  --></style>
</head>
<body bgcolor=\"".$bgcolor."\" link=\"#ef007c\" alink=\"#ef007c\" vlink=\"#ef007c\" leftMargin=\"0\" topMargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<table width=\"160\" height=\"\" cellspacing=\"1\" cellpadding=\"0\" border=\"0\" bgcolor=\"".$bgcolor."\">
<tr>
<td width=\"158\" height=\"13\" align=\"left\" valign=\"middle\" style=\"border-bottom: \">
<a href=\"http://myownspace.fr/myownad/\">
<font style=\"font-size:11px\" face=\"arial,sans-serif\" color=\"#000000\">My Own Aaaaads</font></a>
</td></tr>
<tr><td width=\"158\" height=\"\" align=\"\" valign=\"top\">
<table width=\"158\" height=\"\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr >";
for($i=1;$i<=count($myownad);$i++)
{
$titre[$i]=$myownad[$i]['titre'];
$texte[$i]=$myownad[$i]['texte'];
$lien[$i]=$myownad[$i]['lien'];
// Include class definition.

// File to keep counter information, should have writing permissions.
//$counter_file = '../classes/adrotator/tracker.txt';
$code[$i]= '<td width="158" height="116" align="left" valign="middle">
<table width="158" height="114" cellspacing="0" cellpadding="0" border="0" bgcolor="'.$bgcolor.'">
<tr><td id="taw0" class="ch" width="240" height="76" align="left" valign="top" >
<font style="line-height:12px; font-size:11px; font-family:verdana,arial,sans-serif;">
<a class="ad" id="aw0" target="_top" href="http://'.$lien[$i].'" >
<b>'.$titre[$i].'</b></a></font>
<br><font style="line-height:12px; font-size:10px; font-family:verdana,arial,sans-serif; color:#000000">'.$texte[$i].'</font>
<br><font style="line-height:12px; font-size:10px" face="verdana,arial,sans-serif" color="#ff0000">'.$lien[$i].'
</font>
</div></td></tr></table>
</td></tr></table></td></tr><tr >
';
}
// Create class object.

//$ccr = new CodeRotator ( $counter_file );
// Add codes to be randomly displayed.
// Work cycle will finish after 2+5+7+3+3=20 exposures.
for($i=1;$i<=$maxv;$i++)
{
// Display selected code.
if($i>count($myownad)) break;
$j=rand(1,count($myownad));
echo $code[$j];
}
echo '</table></td></tr></table></body></html>';
}
if (!isset($_GET['f'])) header("location:howto.html");
?>

Return current item: MyOWNSpace