<input type='radio' id='nrt_frq_ndays_radio' name='nrt_frq_raadio'>&nbsp;
				Every <input size=2 id='nrt_frq_ndays'> days
				</label>
			</TD>
		</TR>
		
		<TR>
			<TD align="right"></TD>
			<TD colspan=3>
				<label>
				<input type='radio' id='nrt_frq_dayofmonth_radio' name='nrt_frq_raadio'>&nbsp;
				On 
				<select id='nrt_frq_dayofmonth'>
					<?php 
for ($d = 1; $d < 32; $d++) {
    echo "<option value='{$d}'>" . dayofmonth_to_daywithsuffix($d) . "</option>";
}
?>
				</select>
				 of every month 
				</label>
			</TD>
		</TR>
		
		
		<TR>
			<TD></TD>
			<TD style="padding:10px;">
				<span class="bluebuttonSmall" onclick="create_newRecurringTask();" id='span_createReccuringTaskSubmit'>Submit</span>
			</TD>
		</TR>
Beispiel #2
0
    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">&nbsp;</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) . '&nbsp;' . 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>";
    }