<TR> <TD align="right">Occurrence : </TD> <TD colspan=3> <label> <input type='radio' id='nrt_frq_EVERYDAYOFYEAR_radio' name='nrt_frq_raadio'> On <select id='nrt_frq_EVERYDAYOFYEAR_day'> <?php for ($d = 1; $d < 32; $d++) { echo "<option value='{$d}'>" . dayofmonth_to_daywithsuffix($d) . "</option>"; } ?> </select> of every <select id='nrt_frq_EVERYDAYOFYEAR_month'> <?php foreach (array('jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec') as $mon) { echo "<option value='{$mon}'>" . month_short_toLong($mon) . "</option>"; } ?> </select> </label> </TD> </TR> <TR> <TD align="right"></TD> <TD colspan=3> <label> <input type='radio' id='nrt_frq_weekday_radio' name='nrt_frq_raadio'> Every <select id='nrt_frq_weekday'> <?php
public function listReccuringTasks() { include "include_reccuringtasks_js.php"; $USERNAME = $_SESSION["uname"]; $sqltoExecute = "select * from RECCURING_TASKS where RT_createdby = '{$USERNAME}' order by RTID desc"; $query = mysql_query($sqltoExecute) or die("Invalid query: " . mysql_error()); $stcount = @mysql_num_rows($query); if ($stcount == 0) { ?> <div style='clear:both; margin-top:40px; margin-left: auto; margin-right:auto; width:96%;'> <span class='bluebuttonSmall' onclick='show_ReccuringTaskForm();'>New Recurring Task</span> </div> <div class='nonewtasks'>Recurring Tasks </div> <?php return; } ?> <div class='listOfReccuringTasks' style='margin-top:50px;'> <span class='listofReccuringTasksSpan' onclick=" $('.ReccuringTasksTable').toggle();">Recurring Tasks (<?php echo $stcount; ?> )</span> <span class='bluebuttonSmall' onclick='show_ReccuringTaskForm();'>New Recurring Task</span> </div> <table align=center cellpadding=0 cellspacing=0 class="ReccuringTasksTable"> <TR class="firstRow"> <TD width="100" align='right' style='cursor:pointer;'> <span style='margin-right:20px;'>RTask ID</span> </TD> <TD width="125" style='cursor:pointer;'>Assigned To</TD> <TD width="145" style='cursor:pointer;'>Project </TD> <TD style='cursor:pointer;'> Task Description </TD> <TD>Occurrence</TD> <TD style='cursor:pointer;' width="130"> </TD> </TR> <?php $tdclass = "oddrow"; while ($row = @mysql_fetch_array($query)) { extract($row); // `RTID`, `RT_project`, `RT_assignto`, `RT_createdby`, `RT_createdDate`, `RT_Desc`, `RT_isPrivate`, `RT_startdate`, // `RT_enddate`, `RT_type`, `RT_EVERYNDAYS`, `RT_EVERYNTHDAYOFMONTH`, `RT_EVERYXWEEKDAY`, `RT_EVERYDAYOFYEAR_MONTH` $tdclass = $tdclass == "oddrow" ? 'evenrow' : 'oddrow'; switch ($RT_type) { case "W": $tmp_occurance = 'On every ' . week_short_toLong($RT_EVERYXWEEKDAY); break; case "N": $tmp_occurance = 'Every <B>' . $RT_EVERYNDAYS . " days</B> starting " . caldate_to_human($RT_startdate); break; case "M": $tmp_occurance = 'On <B>' . dayofmonth_to_daywithsuffix($RT_EVERYNTHDAYOFMONTH) . "</B> of every month"; break; case "Y": $tmp_occurance = 'On <B>' . month_short_toLong($RT_EVERYDAYOFYEAR_MONTH) . ' ' . dayofmonth_to_daywithsuffix($RT_EVERYNTHDAYOFMONTH) . " </B> of every year"; break; default: $tmp_occurance = ' ? '; break; } echo "\n\t\t\t<TR class='RCCRT_TR_{$RTID} {$tdclass}'>\n\t\t\t\t<TD align='right'><span style='margin-right:20px;'>{$RTID}</span></TD>\n\t\t\t\t<TD>{$RT_assignto}</TD>\n\t\t\t\t<TD>{$RT_project}</TD>\n\t\t\t\t<TD>{$RT_Desc}</TD>\n\t\t\t\t<TD>{$tmp_occurance}</TD>\n\t\t\t\t<TD>\n\t\t\t\t\t<span class='bluebuttonSmall' onclick=\"delete_recurringtask('{$RTID}')\">Delete</span>\n\t\t\t\t</TD>\n\t\t\t</TR>"; } echo "</table>"; }