<?php

$file = __FILE__;
include ("inc/inc_common.php");
include ("inc/inc_connect.php");
include ("inc/inc_admincheck.php");
include ("inc/inc_getdate.php");
include ("inc/inc_forumname.php");

$result = mysql_query( "SELECT * FROM $calendartable WHERE intId = '$id'" );
$num_rows = mysql_num_rows( $result );
while ( $a_row = mysql_fetch_object( $result ) )
{
    $cday = $a_row->intDay;
    $cmonth = $a_row->intMonth;
    $cyear = $a_row->intYear;
    $eventname = $a_row->strTitle;
}


$page = "$eventname Edit";
$pagelink = $file."cmonth=$cmonth&cday=$cday&cyear=$cyear";
include("inc/inc_setonline.php");
$title = "$name1 Calendar - $eventname Edit";
include ("inc/inc_head.php");
include ("inc/inc_body.php");
$title = "Edit \"$eventname\"";
include ("inc/inc_title.php");
if (!isset($cmonth))
{
    $cmonth = $smonth;
}
if (!isset($cyear))
{
    $cyear = $year;
}
if ($cmonth == "")
{
    $cmonth = $smonth;
}
if ($cyear == "")
{
    $cyear = $year;
}
print "</centeR><table border=0 width=\"100%\" cellpadding=1 cellspacing=0><tr><td  width=\"20%\">
<table border=0 cellpadding=1 cellspacing=0><tr><td>
<font face=\"$font\" size=$fontsize><image src=\"images/folder_icon.gif\">&nbsp;<a href=\"index.php\">$name1&nbsp;Home</a>
</td></tr>
<tr><td><image src=\"images/folder_line.gif\">
<font face=\"$font\" size=$fontsize><image src=\"images/folder_icon.gif\">&nbsp;<a href=\"calendar.php\">Calendar</a></td></tr>
<tr><td><font face=\"$font\" size=$fontsize>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<image src=\"images/folder_line.gif\">
<image src=\"images/folder_icon.gif\">&nbsp;<a href=\"calendardayall.php?cmonth=$cmonth&cday=$cday&cyear=$cyear\">$cday/$cmonth/$cyear</a></td></tr>
<tr><td><font face=\"$font\" size=$fontsize>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<image src=\"images/folder_line.gif\">
<image src=\"images/open_folder_icon.gif\">&nbsp;Edit Calendar</a></td></tr>
</table>
</td><td><center>";

include ("inc/inc_navigation.php");
include ("inc/inc_newmailsdisplay.php");
print "</td></tr></table><br><center>";

//end of include files...




$result = mysql_query( "SELECT * FROM $calendartable WHERE intId = '$id'" );
$num_rows = mysql_num_rows( $result );
while ( $a_row = mysql_fetch_object( $result ) )
{
    print "<form method=post action=\"calendareditset.php\"><font face=$font size=2>";

    print "Day: <input type=\"text\" name=\"day\" value=\"$a_row->intDay\" size=3 style=\"background-image: url('images/textbox_background.gif')\">

Month: <input type=\"text\" name=\"month\" value=\"$a_row->intMonth\" size=3 style=\"background-image: url('images/textbox_background.gif')\">

Year: <input type=\"text\" name=\"year\" value=\"$a_row->intYear\" size=3 style=\"background-image: url('images/textbox_background.gif')\"> Time: <input type=\"text\" name=\"time\" value=\"$a_row->intTime\" size=7 style=\"background-image: url('images/textbox_background.gif')\"><br><br>

<table border=0><tr><td align=right><font face=$font size=2>Title:</td>

<td><input type=\"text\" value=\"$a_row->strTitle\" name=\"title\" size=24 style=\"background-image: url('images/textbox_background.gif')\"><br></td></tr><tr>

<td align=right><font face=$font size=2>Message: </td><td><textarea name=message style=\"background-image: url('images/textarea_background.gif')\" ROWS=7 COLS=30>$a_row->memMessage</textarea><br></td></tr></table><br>
<input type=\"hidden\" value=\"$id\" name=\"id\">
<input type=\"submit\" value=\"Set Event\"></form>";

}

include ("inc/inc_footer.php");
?>