Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64
Your IP : 18.227.140.251
<?php
//Set the values if not set
if(!isset($year)){
//Set the year as today
$year = date("Y");
}
if(!isset($month)){
//Set the year as today
$month = date("m");
}
//Get the dates passed in params and setup base data
$fromyear = $year;
$toyear = $year;
$frommonth = $month;
$tomonth = $month;
//Decrement the FROM fields and decrement the year if needed
if($frommonth == 1){
$frommonth = 12;
$fromyear--;
}else{
$frommonth--;
}
//Increment the TO fields and augment year if needed
if($tomonth == 12){
$tomonth = 1;
$toyear++;
}else{
$tomonth++;
}
//Build the dates
$fromdate = $fromyear . "-" . $frommonth . "-31";
$todate = $toyear . "-" . $tomonth . "-01";
//Get the news
$news = mysql_query("SELECT * FROM site_news WHERE date_creation > '$fromdate' AND date_creation < '$todate' ORDER BY date_creation", $mysql_link);
?>
<script language="JavaScript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
if(selObj.options[selObj.selectedIndex].value != ""){
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
}
</script>
<table width="100%" cellpadding="5"><tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<form name="form1">
<select name="month" onChange="MM_jumpMenu('parent',this,0)">
<option value="index.php?page=923&month=1&year=<?php echo $year; ?>"<?php if($month == 1){echo " SELECTED";}?>>January</option>
<option value="index.php?page=923&month=2&year=<?php echo $year; ?>"<?php if($month == 2){echo " SELECTED";}?>>February</option>
<option value="index.php?page=923&month=3&year=<?php echo $year; ?>"<?php if($month == 3){echo " SELECTED";}?>>March</option>
<option value="index.php?page=923&month=4&year=<?php echo $year; ?>"<?php if($month == 4){echo " SELECTED";}?>>April</option>
<option value="index.php?page=923&month=5&year=<?php echo $year; ?>"<?php if($month == 5){echo " SELECTED";}?>>May</option>
<option value="index.php?page=923&month=6&year=<?php echo $year; ?>"<?php if($month == 6){echo " SELECTED";}?>>June</option>
<option value="index.php?page=923&month=7&year=<?php echo $year; ?>"<?php if($month == 7){echo " SELECTED";}?>>July</option>
<option value="index.php?page=923&month=8&year=<?php echo $year; ?>"<?php if($month == 8){echo " SELECTED";}?>>August</option>
<option value="index.php?page=923&month=9&year=<?php echo $year; ?>"<?php if($month == 9){echo " SELECTED";}?>>September</option>
<option value="index.php?page=923&month=10&year=<?php echo $year; ?>"<?php if($month == 10){echo " SELECTED";}?>>October</option>
<option value="index.php?page=923&month=11&year=<?php echo $year; ?>"<?php if($month == 11){echo " SELECTED";}?>>November</option>
<option value="index.php?page=923&month=12&year=<?php echo $year; ?>"<?php if($month == 12){echo " SELECTED";}?>>December</option>
</select>
<select name="year" onChange="MM_jumpMenu('parent',this,0)">
<?php
for($i = date("Y") - 10;$i < date("Y") + 10;$i++){
//Echo that date
echo "<option value=\"index.php?page=923&month=$month&year=$i\"";
if($i == $year){
echo " SELECTED";
}
echo ">$i</option>";
}
?>
</select>
</form>
</td>
</tr>
</table><br>
<?php
while($news_art = mysql_fetch_array($news)){
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" valign="top"><img src="../images/nouvelles/news_bullet.gif" width="12" height="10"></td>
<td valign="top">
<div id="date"><span class="blackText11px">
<?php
echo $news_art[date_creation];
?>
</span></div>
<div id="newstxt" class="blueText11px"><strong><a href="index.php?page=232&id_nouvelle=<?php echo $news_art[id_nouvelle]; ?>" class="lnkBase11px">
<?php
echo $news_art[titre_en];
?>
</a></strong> </div>
</td>
</tr>
<tr>
<td colspan="2" valign="top" height="12"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
<?php
}
?>
<p><img src="../images/nouvelles/news_bullet2.gif" width="7" height="7">
<span class="blackText9px"><a href="index.php?page=93752" class="lnkBase9px">News of the week </a></span></p>
</td>
</tr></table>
<?php
//Open the connection
?>
|