Location: PHPKode > projects > Eridu - Web based Groupware > eridu-0.9.1/eridu/html/calendar/meetreccur.php
<?php
/**************************************************************************
 * Eridu - Web based Groupware                                            *
 **************************************************************************
 * Copyright (c) 2000, The Eridu Project                                  *
 **************************************************************************
 * This source file is subject to version 2.0 of the GNU GENERAL PUBLIC   *
 * LICENSE that is bundled with this package in the file COPYING, and is  *
 * available through the world-wide-web at:                               *
 * http://www.gnu.org/copyleft/gpl.html                                   *
 * If you did not receive a copy of the license and are unable to         *
 * obtain it through the world-wide-web, please send a note to            *
 * eridu-hide@address.com so we can mail you a copy          *
 * immediately.                                                           *
 **************************************************************************
 *
 * $Id: meetreccur.php,v 1.1 2000/12/05 05:32:08 lurker Exp $
 *
 * Revision History:
 * $Log: meetreccur.php,v $
 * Revision 1.1  2000/12/05 05:32:08  lurker
 * Changing directory structure
 *
 * Revision 1.10  2000/11/14 17:10:53  coldblood
 * New style sheets implemented.
 *
 * Revision 1.9  2000/11/05 18:39:32  lurker
 * Got rid of remaining use of <? and replaced with <?php
 *
 * Revision 1.8  2000/11/01 18:12:23  absolut250
 * added am/pm or 24h display (to be set in options)
 *
 * Revision 1.7  2000/10/29 23:56:48  sonixhedgehog
 * Changed all <?php to <?php
 *
 * Revision 1.6  2000/10/24 15:06:00  coldblood
 * Fixed more HTML bugs. Changed the recurrance screen to show the start/end time. This is the SAME time as the Main page, its not a new time.
 *
 * Revision 1.5  2000/10/24 14:31:25  coldblood
 * updated UI done by Marc. Fixed HTML bugs in Netscape. Worked on User Availability.
 *
 * Revision 1.4  2000/10/23 01:10:04  absolut250
 * *** empty log message ***
 *
 * Revision 1.3  2000/10/18 20:59:42  lurker
 * /tmp/cvsU2qjje
 *
 */
?>

<?php
	// create month array, day array and order array
	$orderarray = array ("first","second","third","fourth","last");
	$dayarray = array ("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
        $montharray = array ("","January","February","March","April","May","June","July","August","September","October","November","December");
?>
<CENTER>

<table border=1 cellpadding=6 cellspacing=0 width=100%>

<!-- FIRST APPOINTMENT TIME -->
<tr><td bgcolor="#808080" colspan=4><font size="3" color=white>
    <b>First Appointment Time</b></font></td>
    <td bgcolor="#808080" colspan=2 align=right>
    &nbsp;
</td></tr>
<tr><td width=""><font size=2>Start time:</font></td>
    <td colspan=5>
    <font size=2>
    <SELECT NAME=startmonth>
        <?php
                for ($i=1;$i<13;$i++) {
                        echo "<OPTION value=$i";
                        if ($i == $caltabarray[startmonth]) echo " SELECTED";
                                echo ">$montharray[$i]";
                }
        ?>
    </SELECT>
    <INPUT TYPE=TEXTBOX NAME=startday  size=3 VALUE=<?php echo $caltabarray[startday];?>>
    <INPUT TYPE=TEXTBOX NAME=startyear size=5 VALUE=<?php echo $caltabarray[startyear];?>>
        <INPUT TYPE="text" NAME=starthour SIZE=3 VALUE=
        <?php  
                if (!$time24) {
                        if ($caltabarray[starthour] > 12)
                                echo $caltabarray[starthour]-12;
                        else if ($caltabarray[starthour]==0)
                                echo "12";
                        else echo $caltabarray[starthour];
                } else echo $caltabarray[starthour];
        ?>
    > <INPUT TYPE="text" NAME=startminute SIZE=3 VALUE=<?php echo $caltabarray[startminute];?>>
        <?php
                if (!$time24) {
                        echo "<SELECT NAME=startampm>";
                        echo "<OPTION value=0 ";
                        if (!$caltabarray[startampm]) echo"SELECTED";;
                        echo ">AM</option>\n";
                        echo "<OPTION value=1 ";
                        if ($caltabarray[startampm]) echo"SELECTED";
                        echo ">PM</option></select>\n";
                }
        ?>
    </font>
</td></tr>
<tr><td><font size=2>End time:</font></td>
    <td colspan=5>
    <font size=2>
    <SELECT NAME=endmonth>
        <?php
                for ($i=1;$i<13;$i++) {
                        echo "<OPTION value=$i";
                        if ($i == $caltabarray[endmonth]) echo " SELECTED";
                                echo ">$montharray[$i]";
			echo "</OPTION>";
                }
        ?>
    </SELECT>
    <INPUT TYPE=TEXTBOX NAME=endday  size=3 VALUE=<?php echo $caltabarray[endday];?>>
    <INPUT TYPE=TEXTBOX NAME=endyear size=5 VALUE=<?php echo $caltabarray[endyear];?>>
        <INPUT TYPE="text" NAME=endhour SIZE=3 VALUE=  
        <?php
                if (!$time24) {
                        if ($caltabarray[endhour] > 12)
                                echo $caltabarray[endhour]-12;
                        else if ($caltabarray[endhour]==0)
                                echo "12";
                        else echo $caltabarray[endhour];
                } else echo $caltabarray[endhour];
        ?>
    > <INPUT TYPE="text" NAME=endminute SIZE=3 VALUE=<?php echo $caltabarray[endminute];?>>
        <?php
                if (!$time24) {
                        echo "<SELECT NAME=endampm>";
                        echo "<OPTION value=0 ";
                        if (!$caltabarray[endampm]) echo"SELECTED";;
                        echo ">AM</option>\n";
                        echo "<OPTION value=1 ";
                        if ($caltabarray[endampm]) echo"SELECTED";
                        echo ">PM</option></select>\n"; 
                }
        ?>
    </font>
</td></tr>
<!-- RECURRENCE PATTERN -->

<tr><td bgcolor="#808080" colspan=6><font size="3" color=white>
    <b>Recurrence Pattern</b></font>
</td></tr>

<!--NONE-->		
<tr><td align=left valign=middle>
    <input type=radio name=optRecur <?php if ($caltabarray[optRecur]==0) echo "checked";?> value=0>
    <font size=2>None</font>
    </td><td colspan=5>
    <input type=radio name=optDaily <?php if ($caltabarray[optDaily]==0) echo "checked";?> value=0>
    <font size="2">None</font>   
</td></tr>

<!--DAILY-->		
<tr><td>
    <input type=radio name=optRecur <?php if ($caltabarray[optRecur]==1) echo "checked";?> value=1>
    <font size=2>Daily</font>
    <td align=left colspan=5>
    <input type=radio name=optDaily <?php if ($caltabarray[optDaily]==1) echo "checked";?> value=1>
    <font size="2">Every </font><font size=2>
    <INPUT TYPE="TEXTBOX" NAME="txtDailyDays" align=center VALUE=<?php echo $caltabarray[txtDailyDays];?> size=4></font>
    <font size=2>Day(s)</font>
<!--    <input type=radio name=optDaily <?php if ($caltabarray[optDaily]==2) echo "checked";?> value=2> -->
<!--    <font size=2> Every Weekday</font> -->
</td></tr>

<!--WEEKLY-->		
<tr><td>
    <input type=radio name=optRecur <?php if ($caltabarray[optRecur]==2) echo "checked";?> value=2>
    <font size=2>Weekly</font></td>
    <td align=left colspan=5><font size="2">
    <input type=radio name=optDaily <?php if ($caltabarray[optDaily]==3) echo "checked";?> value=3>
    Recurs every</font>
    <INPUT TYPE="TEXTBOX" NAME="recurEvery" align=center VALUE=<?php echo $caltabarray[recurEvery];?> size=2>
    <font size=2>week(s) on</font><br>
    <input type=checkbox name=mon <?php if ($caltabarray[recurDays][0]) echo "checked";?> value=1><font size="2">M</font>
    <input type=checkbox name=tue <?php if ($caltabarray[recurDays][1]) echo "checked";?> value=1><font size="2">T</font>
    <input type=checkbox name=wed <?php if ($caltabarray[recurDays][2]) echo "checked";?> value=1><font size="2">W</font>
    <input type=checkbox name=thu <?php if ($caltabarray[recurDays][3]) echo "checked";?> value=1><font size="2">T</font>
    <input type=checkbox name=fri <?php if ($caltabarray[recurDays][4]) echo "checked";?> value=1><font size="2">F</font>
    <input type=checkbox name=sat <?php if ($caltabarray[recurDays][5]) echo "checked";?> value=1><font size="2">S</font>
    <input type=checkbox name=sun <?php if ($caltabarray[recurDays][6]) echo "checked";?> value=1><font size="2">S</font>
</td></tr>

<!--MONTHLY-->	
<tr><td rowspan=2>
    <input type=radio name=optRecur <?php if ($caltabarray[optRecur]==3) echo "checked";?> value=3>
    <font size="2">Monthly</font>
    </td><td align=left colspan=5>
    <input type=radio name=optDaily <?php if ($caltabarray[optDaily]==4) echo "checked";?> value=4>
    <font size="2">Day </font><font size=2>
    <INPUT TYPE="text" NAME="txtMonthlyDays" align=center VALUE=<?php echo $caltabarray[txtMonthlyDays];?> size=4>
    </font><font size=2> of every</font><font size=2>
    <INPUT TYPE="TEXTBOX" NAME="txtMonthlyMonth" align=center VALUE=<?php echo $caltabarray[txtMonthlyMonth];?> size=4>
    </font><font size=2>month(s)</font>
</td></tr>
<tr><td colspan=5>
    <input type=radio name=optDaily <?php if ($caltabarray[optDaily]==5) echo "checked";?> value=5>
    <font size="2"> The</font><font size=2>
    <select name=listMonthlyEach>
        <?php
                for ($i=0;$i<5;$i++) {
                        echo "<OPTION value=$i";
                        if ($i == $caltabarray[listMonthlyEach]) echo " SELECTED";
                                echo ">$orderarray[$i]";
                }
        ?>
    </SELECT>
    <select name=listMonthlyDay>
        <?php
                for ($i=0;$i<5;$i++) {
                        echo "<OPTION value=$i";
                        if ($i == $caltabarray[listMonthlyDay]) echo " SELECTED";
                                echo ">$dayarray[$i]";
                }
        ?>
    </SELECT>
    </font><font size=2>of every</font><font size=2>
    <INPUT TYPE="TEXTBOX" NAME="txtMonthlyMonths" align=center VALUE=<?php echo $caltabarray[txtMonthlyMonths];?> size=4>
    </font><font size=2>month(s)</font>
</td></tr>

<!--YEARLY-->
<tr><td rowspan=2>
    <input type=radio name=optRecur <?php if ($caltabarray[optRecur]==4) echo "checked";?> value=4>
    <font size="2">Yearly</font>
    </td><td align=left colspan=5>
    <input type=radio name=optDaily <?php if ($caltabarray[optDaily]==6) echo "checked";?> value=6>
    <font size="2">Every</font><font size=2>
    <select name=listYearlyMonth>
        <?php
                for ($i=1;$i<13;$i++) {
                        echo "<OPTION value=$i";
                        if ($i == $caltabarray[listYearlyMonth]) echo " SELECTED";
                                echo ">$montharray[$i]";
                }
        ?>
    </SELECT>
    <INPUT TYPE="TEXTBOX" NAME="txtYearlyDay" align=center VALUE=<?php echo $caltabarray[txtYearlyDay];?> size=4>
    </font>
</td></tr>
<tr><td colspan=5>
    <input type=radio name=optDaily <?php if ($caltabarray[optDaily]==7) echo "checked";?> value=7>
    <font size="2">The
    <select name=listYearlyEach>
        <?php
                for ($i=0;$i<5;$i++) {
                        echo "<OPTION value=$i";
                        if ($i == $caltabarray[listYearlyEach]) echo " SELECTED";
                                echo ">$orderarray[$i]";
                }
        ?>
    </SELECT>
    <select name=listYearlyDay>
        <?php
                for ($i=0;$i<5;$i++) {
                        echo "<OPTION value=$i";
                        if ($i == $caltabarray[listYearlyDay]) echo " SELECTED";
                                echo ">$dayarray[$i]";
                }
        ?>
    </SELECT>
    of      
    <select name=listYearlyMonth2>
        <?php
                for ($i=1;$i<13;$i++) {
                        echo "<OPTION value=$i";
                        if ($i == $caltabarray[listYearlyMonth2]) echo " SELECTED";
                                echo ">$montharray[$i]";
                }
        ?>
    </SELECT>
    </font>
</td></tr>

<!-- RANGE OF RECURRENCE -->

<tr><td bgcolor="#808080" colspan=6><font size="3" color=white>
    <b>Range Of Recurrence</b></font>
</td></tr>
<tr><td colspan=6>
    <input type=radio name="optRangeEnd" <?php if ($caltabarray[optRangeEnd]==0) echo "checked";?> value="0">
    <font size="2">No end date</font>
</td></tr>
<tr><td colspan=6>
    <input type=radio name="optRangeEnd" <?php if ($caltabarray[optRangeEnd]==1) echo "checked";?> value="1">
    <font size="2">End after:</font><font size=2>
    <INPUT TYPE="TEXTBOX" NAME="txtRangeOccurances" VALUE=<?php echo $caltabarray[txtRangeOccurances];?> size=4>
    </font><font size=2>occurrences</font>
</td></tr>
<tr><td colspan=6>
    <input type=radio name="optRangeEnd" <?php if ($caltabarray[optRangeEnd]==2) echo "checked";?> value="2">
    <font size="2">End by:</font><font size=2>
    <SELECT NAME=endbymonth>
        <?php
                for ($i=1;$i<13;$i++) {
                        echo "<OPTION value=$i";
                        if ($i == $caltabarray[endbymonth]) echo " SELECTED";
                                echo ">$montharray[$i]";
                }
        ?>
    </SELECT>
    <INPUT TYPE=TEXTBOX NAME=endbyday  value=<?php echo $caltabarray[endbyday];?> size=3>
    <INPUT TYPE=TEXTBOX NAME=endbyyear value=<?php echo $caltabarray[endbyyear];?> size=5>
    </font>
</td></tr>
</table>
Return current item: Eridu - Web based Groupware