Location: PHPKode > projects > rapidshareBot > rapidsharebot/trends.php
<?php 
include('functions.inc.php');
$dtrends = build_trends(date("Y-m-d"));
shuffle($dtrends);
$mtrends = build_trends(date("Ym"));
shuffle($mtrends);


if (isset($_GET['date'])){
$date = $_GET['date'];
if ($date == '') $date = date("Y-m-d");
$trends = build_trends($date);
}else $date = date("Y-m-d");


?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Trending search terms for<?php echo ' - ' . $date . ' ' . $_SERVER['SERVER_NAME']; ?></TITLE>
<meta name="Description" content="<?php echo implode(" ", $dtrends); ?>" />
<meta name="Keywords" content="<?php echo implode(", ", $dtrends); ?>" />
<meta name="robots" content="all" />
<link rel="shortcut icon" href="favicon.ico">
<link href="feed.php" rel="alternate" type="application/rss+xml" title="Free Downloads - <?php echo $_SERVER['SERVER_NAME']; ?>" />
<link href="style.css" rel="stylesheet">
</head>
<body>
<A href="http://freephpwebscripts.appspot.com/rapidsharebot.html" class='t' style="float:right;color:red;" title="Make money hosting your own download site for free." target="_blank"><blink>Make money.</blink></A>

<br/>
<center><a href="./"><img src="img/logo.jpg" border="0" title="free downloads <?php echo $_SERVER['SERVER_NAME']; ?>"></a></center>
<script>
function form_validate(formName){
    if( (eval("document."+formName+".q.value") == ""))
    {
        alert("Please enter the some search term/s.");
        return false;
    }
  }
</script>
<table class="lnav" cellpadding="5" cellspacing="0">
<tbody><tr>
<td></a></td>
<td>
<form name="search" id="search" action="search.php" method="get" onsubmit="return form_validate('search');">
<table cellpadding="3" cellspacing="0">
<tbody><tr>
<td>&nbsp;&nbsp;<input name="q" class="input_text" size="26" maxlength="512" value="" style="height:30px;width:500px;font-size:23px"></td>
<td><input id="fj" class="input_submit" value="   Search   " type="submit" style="color:#1558AF;font-size:20px;height:35;width:130;"></td>
<td><!--<a href="/advanced_search?q={{ query }}&amp;l={{ where }}">Advanced Search</a>--></td>
</tr>
<tr valign="top">
<td class="label">&nbsp;&nbsp;&nbsp;&nbsp;<b>What:</b> Your Search Terms.</td>
</tr>
</tbody></table>
</form>
</td>
</tr>
</tbody></table>
<?php
if (isset($trends)){
shuffle($trends);
?>
<center>Trending Terms:<div id="recent" style="margin:0 auto 0;padding:10px;text-align:center;border-top:1px solid #c9d7f1;border-bottom:1px solid #c9d7f1;background: #f3f3f3;padding: 10px;"> 
<?php
foreach ($trends as $trend) {
echo '<a href="search.php?q=' . urlencode($trend) .'" class="rec"  title="' . $trend .' free full version downloads">' . $trend .'</a>&nbsp;&nbsp;&nbsp;&nbsp;'; 
}
?> <br class="clear" /></div></center>
<br><br>
<?php
}
?>
<center>Today's Hot Search Terms:<div id="recent" style="margin:0 auto 0;padding:10px;text-align:center;border-top:1px solid #c9d7f1;border-bottom:1px solid #c9d7f1;background: #f3f3f3;padding: 10px;"> 
<?php
foreach ($dtrends as $trend) {
echo '<a href="search.php?q=' . urlencode($trend) .'" class="rec"  title="' . $trend .' free full version downloads">' . $trend .'</a>&nbsp;&nbsp;&nbsp;&nbsp;'; 
}
?> <br class="clear" /></div></center>
<br><br>

<center>Monthly Hot Search Terms:<div id="recent" style="margin:0 auto 0;padding:10px;text-align:center;border-top:1px solid #c9d7f1;border-bottom:1px solid #c9d7f1;background: #f3f3f3;padding: 10px;"> 
<?php
foreach ($mtrends as $trend) {
echo '<a href="search.php?q=' . urlencode($trend) .'" class="rec"  title="' . $trend .' free full version downloads">' . $trend .'</a>&nbsp;&nbsp;&nbsp;&nbsp;'; 
}
?> <br class="clear" /></div></center>

<BR>
<center>
<table>
<tr>
<td valign="top" align="center">
<b>Older trends by day:</b>
<div class="cal_i" id="trends_calendar_container"><div class="cal_i2" id="trends_calendar_content" style="top:0px">
<a href="trends.php?date=<?php echo date("Y-m-d"); ?>" style="color:red"><?php echo date("Y-m-d"); ?></a><br />
<?php
$days = ( mktime(0, 0, 0, intval(date("m")), intval(date("d")), intval(date("m")) )  - mktime(0, 0, 0, 11, 27, 2008) )/(24*60*60);
for ($i = 1; $i <= $days; $i++) {
$date = date("Y-m-d", mktime(0, 0, 0, intval(date("m")), intval(date("d")), intval(date("m")) )-($i*24*60*60));
echo  '<a href="trends.php?date=' . $date . '" >' .$date . '</a><br />';
}
?>


</div></div>
</td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td valign="top" align="center">
<b>Older trends by month:</b>
<div class="cal_i" id="trends_calendar_container"><div class="cal_i2" id="trends_calendar_content" style="top:0px">
<a href="trends.php?date=<?php echo date("Ym"); ?>" style="color:red"><?php echo date("F Y"); ?></a><br />
<?php
$months = ( mktime(0, 0, 0, intval(date("m")), intval(date("d")), intval(date("m")) ) - mktime(0, 0, 0, 01, 27, 2008) )/(24*60*60*30);
for ($i = 1; $i <= $months; $i++) {
$month = mktime(0, 0, 0, intval(date("m")), intval(date("d")), intval(date("m")) )-($i*24*60*60*30);
echo '<a href="trends.php?date=' . date("Ym", $month) . '">' . date("F Y", $month) . '</a><br />';
}
?>
</div></div>
</td>
</tr>
</table>
</center>
<br/>
<h1></h1>
<?php include "footer.html"; ?>
<BR>
</body>
</html>
Return current item: rapidshareBot