</script> <div id="CreateReccuringTask_Form" style="display:none; width: 740" class="divAboveBg"> <TABLE width="740" cellpadding=0 cellspacing=2 border=0 class="divHeadingTable"> <TR><TD onmousedown="My_JsLibrary.startDrag(event);" class="drag_dialog_title" id='CreateReccuringTask_Form_Title'>Create a Recurring Task</TD> <TD onclick="My_JsLibrary.hideDrag(event);" width="19"><img src="/images/close.gif" border=0></TD> </TR> </TABLE> <TABLE width="738" cellpadding="4" cellspacing=0 border=0> <TR> <TD align="right"><NOBR>Under Project :</NOBR></TD> <TD> <select id='nrt_project' class="hilight" onchange='update_ProjectUsers()'> <?php $manageProjects = new manageProjects(); $tmp_projects_all = $manageProjects->getActiveProjectsListOfUser($_SESSION["uname"]); html_array2selectboxOptions_selected($tmp_projects_all, DEFAULTPROJECT); ?> </select> </TD> <TD align="right"><NOBR>Assign To :</NOBR></TD> <TD> <select id='nrt_assignTo' class="hilight"></select> </TD> </TR> <TR> <TD align="right">Description :</TD> <TD colspan=3><input type=text size=55 id='nrt_desc'></TD> </TR> <TR>
}else{ My_JsLibrary.showErrMsg() ; } } }); } }; </SCRIPT> <?php $manageUsers = new manageUsers(); $allusers = $manageUsers->listOfAllUsers(); $manageProjects = new manageProjects(); $allProjects = $manageProjects->listOfAllProjectsIncludeClosed(); ?> <div class="ProjectsListing"> <div style="margin-bottom: 10px;"> <span onclick="manageProjectsJsfunctions.createNewProject_form();" class='bluebutton'>Add Project</span> </div> <?php foreach ($allProjects as $project) { if ($project == DEFAULTPERSONALPROJECT) { continue; } $usersInThisProject = $manageProjects->getUsersListInProject($project); $isProjectActive = $manageProjects->isProjectActive($project); echo "\n<div class='project'>"; if ($isProjectActive) {
public function get_usersActiveProjects($username) { if (strtolower($username) == 'sadmin') { $manageProjects = new manageProjects(); return $manageProjects->listOfAllProjects(); } $toreturnProjects = executesql_returnStrictArray(" select permissions.ProjectName from permissions, projects where permissions.username='******' and permissions.ProjectName=projects.ProjectName and projects.isActive='Y'"); $toreturnProjects[] = DEFAULTPERSONALPROJECT; return $toreturnProjects; }
case 'closeProject': if (!IsSadmin()) { send_Action_Response('Fail', 'Invalid Session!'); } $projectName = get_POST_var('projectName'); $manageProjects = new manageProjects(); $manageProjects->closeProject($projectName); send_Action_Response('Success', 'Project Closed !'); exit; break; case 'deleteProject': if (!IsSadmin()) { send_Action_Response('Fail', 'Invalid Session!'); } $projectName = get_POST_var('projectName'); $manageProjects = new manageProjects(); $manageProjects->deleteProject($projectName); send_Action_Response('Success', 'Project Deleted !'); exit; break; case 'scheduleAnEmail': $emailTo = get_POST_var('emailTo'); $emailSubject = get_POST_var('emailSubject'); $emailBody = get_POST_var('emailBody'); $emailWhen = get_POST_var('emailWhen'); $emailHour = get_POST_var('emailHour'); $scheduledEmails = new scheduledEmails(); $scheduledEmails->scheduleNewEmail($emailTo, $emailBody, $emailSubject, $emailWhen, $emailHour); send_Action_Response('Success', 'Email scheduled !'); exit; break;