I build a php web tool for work, in these tool I have a lot of different files refering to the current month. in this format " JUN2004" at this point I'm manually adapting every file to the next month. Is there a way to adapt this automaticly just by pressing a link ? or with a script ? thanks for your coop and feedback
below you will find one of the files to see what it looks like
<style type="text/css">
body, td, th, h1, h2 {font-family: sans-serif;}
body, td, th {font-size: 65%;}
a:link { font-weight:bold; color:#000000; text-decoration:none }
a:visited { font-weight:bold; color:#000000; text-decoration:none }
a:hover { font-weight:bold; color:#E00000; text-decoration:none }
a:active { font-weight:bold; color:#E00E00; text-decoration:underline }
a:focus { font-weight:bold; color:#00E000; text-decoration:underline }
.text1 {font-family: Arial, Helvetica, sans-serif;font-size: 14px;color: White;text-align : left;}
.text2 {font-family: Arial, Helvetica, sans-serif;font-size: 11px;color: Silver;text-align : left;}
</style>
<body bgcolor="#525A73">
<?
include "datas/connection_data.php";
include "datas/connect.php";
$Dblnk=connect ();
if (isset($HTTP_GET_VARS)){
while(list($name, $value) = each($HTTP_GET_VARS)){
$$name = $value;
}
}
if (!isset($Dealer_Rem)) $Dealer_Rem = 'INDEP.00001.01186';
if (!isset($Counter)) $Counter=0;
$Current_Month = "MAY2004";
if (!isset($Dealer_Pos))
{
include "datas/annex1.php";
$Dealer_Pos = '';
}
else
{
include "datas/annex1_Pos.php";
}
$Line1 = "";
$Line2 = "";
$Line3 = "";
$Line4 = "";
$Line5 = "";
$Line6 = "";
$Line7 = "";
if ($res=send_sql($Data_Base, $Query_annex1))
{
$Tot_Lines = mysql_num_rows($res);
while ($row = mysql_fetch_row ($res))
{
$Line1 = $Line1.$row[0]." <BR>";
$Line3 = $Line3.$row[2]." <BR>";
$Line4 = $Line4.$row[3]." <BR>";
$Line5 = $Line5.$row[4]." <BR>";
$Line6 = $Line6.$row[5]." <BR>";
$Line7 = $Line7.$row[6]." <BR>";
}
echo "<A NAME='Annex1'></A>";
echo "<CENTER> <TABLE WIDTH='800' CELLSPACING='0' CELLPADDING='0'> <TR> <TD> <TABLE BORDER='1' WIDTH='150' class='text1'> <TR> <TD> Annex1 </TD> </TR> </TABLE> </TD> </TR> </TABLE> </CENTER> <BR>";
echo "<CENTER> <TABLE BORDER = '1' class='text1'>";
echo " <TR> <TD COLSPAN='7'> (a) Annex 1 : Overzicht van al uw geremunereerde kaarten/diensten </TD> </TR> <TR> <TD> Verkooppunt</TD> <TD> simkaart </TD> <TD> klant </TD> <TD> Activatiedatum </TD> <TD> tariefplan/dienst </TD> <TD> vergoeding </TD> </TR>";
echo "<TD> ".$Line1." </TD>";
echo "<TD> ".$Line3." </TD>";
echo "<TD> ".$Line4." </TD>";
echo "<TD> ".$Line5." </TD>";
echo "<TD> ".$Line6." </TD>";
echo "<TD> ".$Line7." </TD>";
echo "</TR> </TABLE>";
echo "<BR>";
if ($Counter>0)
{
$CounterPrec = $Counter - 50;
if (!$Dealer_Pos)
{ echo "<A HREF='annex1.php?Dealer_Rem=".$Dealer_Rem."&Counter=".$CounterPrec."'> [ Previous Page ] </A>"; }
else
{ echo "<A HREF='annex1.php?Dealer_Rem=".$Dealer_Rem."&Dealer_Pos=".$Dealer_Pos."&Counter=".$CounterPrec."'> [ Page précédente ] </A>"; }
}
echo "<A HREF='index_Annex.php?Dealer_Rem=".$Dealer_Rem."&Dealer_Pos=".$Dealer_Pos."'> [ back to annex menu ] </A>";
if ($Tot_Lines==50)
{
$Counter += 50;
if (!$Dealer_Pos)
{ echo "<A HREF='annex1.php?Dealer_Rem=".$Dealer_Rem."&Counter=".$Counter."'> [ Next page] </A>"; }
else
{ echo "<A HREF='annex1.php?Dealer_Rem=".$Dealer_Rem."&Dealer_Pos=".$Dealer_Pos."&Counter=".$Counter."'> [ Page suivante ] </A>"; }
}
}
?>
$Current_Month = "MAY2004";