break; case 'merge': DisplayMergeSubjects($mergeuids); break; case 'mergesubjects': DoMergeSubjects($selectedid, $name, $dob, $gender, $ethnicity1, $ethnicity2, $handedness, $education, $phone1, $email,$maritalstatus,$smokingstatus, $altuid, $guid, $cancontact); break; case 'enroll': EnrollSubject($id, $projectid); DisplaySubject($id); break; case 'confirmupdate': Confirm("update", $id, $encrypt, $lastname, $firstname, $dob, $gender, $ethnicity1, $ethnicity2, $handedness, $education, $phone, $email,$maritalstatus,$smokingstatus, $cancontact, $uid, $altuids, $enrollmentids, $guid); break; case 'confirmadd': Confirm("add", "", $encrypt, $lastname, $firstname, $dob, $gender, $ethnicity1, $ethnicity2, $handedness, $education, $phone, $email,$maritalstatus,$smokingstatus, $cancontact, "", $altuids, $enrollmentids, $guid); break; case 'update': UpdateSubject($id, $lastname, $firstname, $dob, $gender, $ethnicity1, $ethnicity2, $handedness, $education, $phone, $email,$maritalstatus,$smokingstatus, $cancontact, $uid, $altuids, $enrollmentids, $guid); DisplaySubjectList($searchuid, $searchaltuid, $searchname, $searchgender, $searchdob, $searchactive); break; case 'add': AddSubject($lastname, $firstname, $dob, $gender, $ethnicity1, $ethnicity2, $handedness, $education, $phone, $email,$maritalstatus,$smokingstatus, $cancontact, $altuid, $guid); DisplaySubjectList($searchuid, $searchaltuid, $searchname, $searchgender, $searchdob, $searchactive); break; default: if ($id == "") { DisplaySubjectList($searchuid, $searchaltuid, $searchname, $searchgender, $searchdob, $searchactive); } else { DisplaySubject($id);
include_once 'ressources/class.user.inc'; include_once 'ressources/class.cyrus.inc'; //if(count($_POST)>0) $usersmenus = new usersMenus(); if (!$usersmenus->AllowAddUsers) { $tpl = new templates(); $error = "{ERROR_NO_PRIVS}"; echo $tpl->_ENGINE_parse_body("alert('{$error}')"); die; } if (isset($_GET["popup"])) { popup(); exit; } if (isset($_GET["Confirm"])) { Confirm(); exit; } //YahooUser_c js(); function js() { $page = CurrentPageName(); $tpl = new templates(); $title = $tpl->_ENGINE_parse_body('{delete_group}', "domains.edit.user.php"); $prefix = str_replace('.', '_', $page); $prefix = str_replace('-', '', $prefix); $gp = new groups($_GET["gpid"]); $html = "\n\tvar rule_mem='';\n\tvar {$prefix}timeout=0;\n\tvar {$prefix}timerID = null;\n\tvar {$prefix}tant=0;\n\tvar {$prefix}reste=0;\t\n\t\n\tfunction {$prefix}start(){\n\t\tYahooLogWatcher(550,'{$page}?popup=yes&gpid={$_GET["gpid"]}','{$title}::{$gp->groupName}');\n\t}\n\t\n\n\n\tvar x_ConfirmDeletionOfGroup= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tYahooLogWatcherHide();\n\t\tYahooUserHide();\n\t\tYahooWinSHide();\n\t\tif(YahooSearchUserOpen()){FindUser();}\n\t\tLoadjs('domains.edit.group.php?ou={$gp->ou}&js=yes');\n\t\t\n\t}\n\t\n\tfunction ConfirmDeletionOfGroup(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('gpid','{$_GET["gpid"]}');\n\t\tXHR.appendData('Confirm','yes');\n\t\tif(document.getElementById('DeleteMailBox')){\n\t\t\tXHR.appendData('delete-mailbox',document.getElementById('DeleteMailBox').value);\n\t\t}\n\t\t\n\t\tXHR.appendData('DeleteUsers',document.getElementById('DeleteUsers').value);\n\t\t\n\t\tdocument.getElementById('deletion').innerHTML='<div style=\"width:100%\"><center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center></div>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_ConfirmDeletionOfGroup);\n\t}\n\t\n//\tfunction BrowseComputerCheckRefresh(e){\n//\t\tif(checkEnter(e)){BrowsComputersRefresh();}\n//\t}\n\t\n{$prefix}start();\n\t"; echo $html; }
} echo "<p>testing email, expect email attempt to be successful<p>"; email('*****@*****.**', 'sub Request', 'mess'); //to me echo "testing ConfirmCancel, expect one SW to be emailed with patient name included<p>"; ConfirmCancel(2, 2, 2, '2/2', '3/2'); echo "<p>testing ModifyDeny, expect one SW to be emailed with patient name included<p>"; ModifyDeny(2, 2, 2, '2/2', '3/2'); echo "<p>testing ModifyAccept, expect one SW to be emailed with patient name included<p>"; ModifyAccept(2, 2, 2, '2/2', '3/2'); echo "<p>testing PasswordReset, expect one user to be emailed<p>"; PasswordReset('567yfghj', 'anna123', "*****@*****.**"); echo "<p>testing NewFamilyProfile, expect an array of users to be emailed<p>"; NewFamilyProfile(345); echo "<p>testing Confirm<p>"; Confirm(7, '3/3', '3/4', 2, 2); echo "<p>Testing RequestAccept<p>"; RequestAccept(7, '3/2', '3/3', 2, 2); echo "<p>Testing RequesDeny<p>"; RequestDeny(7, '3/2', '3/3', 2, 2); echo "testing FamilyModConfirm<p>"; FamilyModConfirm(7, 2, 2); echo "<p>Testing FamilyModAccept<p>"; FamilyModAccept(7, 2, 2); echo "<p>testing FamilyModDeny<p>"; FamilyModDeny(7, 2, 2); echo "<p>Testing newRequest<p>"; newRequest(123, '3/1', '3/2', '3/3'); echo "<p>Testing NewReservationMod<p>"; newReservationMod(1234, '3/1', 2); echo "<p>Testing NewCancel<p>";