2 require_once("../globals.php");
3 require_once("../../library/acl.inc");
4 require_once("$srcdir/md5.js");
5 require_once("$srcdir/sql.inc");
6 require_once("$srcdir/formdata.inc.php");
7 require_once("$srcdir/options.inc.php");
8 require_once(dirname(__FILE__
) . "/../../library/classes/WSProvider.class.php");
16 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
17 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
18 <link rel
="stylesheet" type
="text/css" href
="<?php echo $GLOBALS['webroot'] ?>/library/js/fancybox/jquery.fancybox-1.2.6.css" media
="screen" />
19 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js"></script
>
20 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/js/jquery.1.3.2.js"></script
>
21 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/js/common.js"></script
>
22 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/js/fancybox/jquery.fancybox-1.2.6.js"></script
>
23 <script src
="checkpwd_validation.js" type
="text/javascript"></script
>
25 <script language
="JavaScript">
27 function submitform() {
28 if (document
.forms
[0].rumple
.value
.length
>0 && document
.forms
[0].stiltskin
.value
.length
>0) {
31 //Checking if secure password is enabled or disabled.
32 //If it is enabled and entered password is a weak password, alert the user to enter strong password.
33 if(document
.new_user
.secure_pwd
.value
== 1){
34 var password
= trim(document
.new_user
.stiltskin
.value
);
36 var pwdresult
= passwordvalidate(password
);
38 alert("<?php echo xl('The password must be at least eight characters, and should'); echo '\n'; echo xl('contain at least three of the four following items:'); echo '\n'; echo xl('A number'); echo '\n'; echo xl('A lowercase letter'); echo '\n'; echo xl('An uppercase letter'); echo '\n'; echo xl('A special character');echo '('; echo xl('not a letter or number'); echo ').'; echo '\n'; echo xl('For example:'); echo ' healthCare@09'; ?>");
42 } //secure_pwd if ends here
43 document
.forms
[0].newauthPass
.value
=MD5(document
.forms
[0].stiltskin
.value
);
44 document
.forms
[0].stiltskin
.value
='';
45 document
.forms
[0].submit();
47 if (document
.forms
[0].rumple
.value
.length
<=0)
48 {document
.forms
[0].rumple
.focus();document
.forms
[0].rumple
.style
.backgroundColor
="red";}
49 if (document
.forms
[0].stiltskin
.value
.length
<=0)
50 {document
.forms
[0].stiltskin
.focus();document
.forms
[0].stiltskin
.style
.backgroundColor
="red";}
53 function authorized_clicked() {
54 var f
= document
.forms
[0];
55 f
.calendar
.disabled
= !f
.authorized
.checked
;
56 f
.calendar
.checked
= f
.authorized
.checked
;
62 <body
class="body_top">
64 <span
class="title"><?php
xl('Add User','e'); ?
></span
> 
;</td
>
66 <a
class="css_button" name
='form_save' id
='form_save' href
='#' onclick
="return submitform()">
67 <span
><?php
xl('Save','e');?
></span
></a
>
68 <a
class="css_button large_button" id
='cancel' href
='#'>
69 <span
class='css_button_span large_button_span'><?php
xl('Cancel','e');?
></span
>
77 <form name
='new_user' method
='post' target
="_parent" action
="usergroup_admin.php"
78 onsubmit
='return top.restoreSession()'>
79 <input type
=hidden name
=mode value
=new_user
>
80 <input type
=hidden name
=secure_pwd value
="<? echo $GLOBALS['secure_password']; ?>">
81 <span
class="bold"> 
;</span
>
83 <table border
=0 cellpadding
=0 cellspacing
=0 style
="width:600px;">
85 <td style
="width:150px;"><span
class="text"><?php
xl('Username','e'); ?
>: </span
></td
><td style
="width:220px;"><input type
=entry name
=rumple style
="width:120px;"> <span
class="mandatory"> 
;*</span
></td
>
86 <td style
="width:150px;"><span
class="text"><?php
xl('Password','e'); ?
>: </span
></td
><td style
="width:250px;"><input type
="entry" style
="width:120px;" name
=stiltskin
><span
class="mandatory"> 
;*</span
></td
>
89 <td
><span
class="text"<?php
if ($GLOBALS['disable_non_default_groups']) echo " style='display:none'"; ?
>><?php
xl('Groupname','e'); ?
>: </span
></td
>
91 <select name
=groupname
<?php
if ($GLOBALS['disable_non_default_groups']) echo " style='display:none'"; ?
>>
93 $res = sqlStatement("select distinct name from groups");
95 for ($iter = 0;$row = sqlFetchArray($res);$iter++
)
96 $result2[$iter] = $row;
97 foreach ($result2 as $iter) {
98 print "<option value='".$iter{"name"}."'>" . $iter{"name"} . "</option>\n";
102 <td
><span
class="text"><?php
xl('Provider','e'); ?
>: </span
></td
><td
>
103 <input type
='checkbox' name
='authorized' value
='1' onclick
='authorized_clicked()' />
104  
; 
;<span
class='text'><?php
xl('Calendar','e'); ?
>:
105 <input type
='checkbox' name
='calendar' disabled
/>
109 <td
><span
class="text"><?php
xl('First Name','e'); ?
>: </span
></td
><td
><input type
=entry name
='fname' style
="width:120px;"></td
>
110 <td
><span
class="text"><?php
xl('Middle Name','e'); ?
>: </span
></td
><td
><input type
=entry name
='mname' style
="width:120px;"></td
>
113 <td
><span
class="text"><?php
xl('Last Name','e'); ?
>: </span
></td
><td
><input type
=entry name
='lname' style
="width:120px;"></td
>
114 <td
><span
class="text"><?php
xl('Default Facility','e'); ?
>: </span
></td
><td
><select style
="width:120px;" name
=facility_id
>
116 $fres = sqlStatement("select * from facility where service_location != 0 order by name");
118 for ($iter = 0;$frow = sqlFetchArray($fres);$iter++
)
119 $result[$iter] = $frow;
120 foreach($result as $iter) {
122 <option value
="<?php echo $iter{id};?>"><?php
echo $iter{name
};?
></option
>
130 <td
><span
class="text"><?php
xl('Federal Tax ID','e'); ?
>: </span
></td
><td
><input type
=entry name
='federaltaxid' style
="width:120px;"></td
>
131 <td
><span
class="text"><?php
xl('Federal Drug ID','e'); ?
>: </span
></td
><td
><input type
=entry name
='federaldrugid' style
="width:120px;"></td
>
134 <td
><span
class="text"><?php
xl('UPIN','e'); ?
>: </span
></td
><td
><input type
="entry" name
="upin" style
="width:120px;"></td
>
135 <td
class='text'><?php
xl('See Authorizations','e'); ?
>: </td
>
136 <td
><select name
="see_auth" style
="width:120px;">
138 foreach (array(1 => xl('None'), 2 => xl('Only Mine'), 3 => xl('All')) as $key => $value)
140 echo " <option value='$key'";
141 echo ">$value</option>\n";
147 <td
><span
class="text"><?php
xl('NPI','e'); ?
>: </span
></td
><td
><input type
="entry" name
="npi" style
="width:120px;"></td
>
148 <td
><span
class="text"><?php
xl('Job Description','e'); ?
>: </span
></td
><td
><input type
="entry" name
="specialty" style
="width:120px;"></td
>
151 <!-- (CHEMED
) Calendar UI preference
-->
153 <td
><span
class="text"><?php
xl('Taxonomy','e'); ?
>: </span
></td
>
154 <td
><input type
="entry" name
="taxonomy" style
="width:120px;" value
="207Q00000X"></td
>
155 <td
><span
class="text"><?php
xl('Calendar UI','e'); ?
>: </span
></td
><td
><select name
="cal_ui" style
="width:120px;">
157 foreach (array(3 => xl('Outlook'), 1 => xl('Original'), 2 => xl('Fancy')) as $key => $value)
159 echo " <option value='$key'";
160 if ($key == $iter['cal_ui']) echo " selected";
161 echo ">$value</option>\n";
166 <!-- END (CHEMED
) Calendar UI preference
-->
168 <?php
if ($GLOBALS['inhouse_pharmacy']) { ?
>
170 <td
class="text"><?php
xl('Default Warehouse','e'); ?
>: </td
>
173 echo generate_select_list('default_warehouse', 'warehouse',
177 <td
class="text"><?php
xl('Invoice Refno Pool','e'); ?
>: </td
>
180 echo generate_select_list('irnpool', 'irnpool', '',
181 xl('Invoice reference number pool, if used'));
188 // List the access control groups if phpgacl installed
189 if (isset($phpgacl_location) && acl_check('admin', 'acl')) {
192 <td
class='text'><?php
xl('Access Control','e'); ?
>:</td
>
193 <td
><select name
="access_group[]" multiple style
="width:120px;">
195 $list_acl_groups = acl_get_group_title_list();
196 $default_acl_group = 'Administrators';
197 foreach ($list_acl_groups as $value) {
198 if ($default_acl_group == $value) {
199 // Modified 6-2009 by BM - Translate group name if applicable
200 echo " <option value='$value' selected>" . xl_gacl_group($value) . "</option>\n";
203 // Modified 6-2009 by BM - Translate group name if applicable
204 echo " <option value='$value'>" . xl_gacl_group($value) . "</option>\n";
209 <td
><span
class="text"><?php
xl('Additional Info','e'); ?
>: </span
></td
>
210 <td
><textarea name
=info style
="width:120px;" cols
=27 rows
=4 wrap
=auto
></textarea
></td
>
213 <tr height
="25"><td colspan
="4"> 
;</td
></tr
>
221 <input type
="hidden" name
="newauthPass">
227 <tr
<?php
if ($GLOBALS['disable_non_default_groups']) echo " style='display:none'"; ?
>>
230 <form name
='new_group' method
='post' action
="usergroup_admin.php"
231 onsubmit
='return top.restoreSession()'>
233 <input type
=hidden name
=mode value
=new_group
>
234 <span
class="bold"><?php
xl('New Group','e'); ?
>:</span
>
236 <span
class="text"><?php
xl('Groupname','e'); ?
>: </span
><input type
=entry name
=groupname size
=10>
238 <span
class="text"><?php
xl('Initial User','e'); ?
>: </span
>
241 $res = sqlStatement("select distinct username from users where username != ''");
242 for ($iter = 0;$row = sqlFetchArray($res);$iter++
)
243 $result[$iter] = $row;
244 foreach ($result as $iter) {
245 print "<option value='".$iter{"username"}."'>" . $iter{"username"} . "</option>\n";
250 <input type
="submit" value
=<?php
xl('Save','e'); ?
>>
256 <tr
<?php
if ($GLOBALS['disable_non_default_groups']) echo " style='display:none'"; ?
>>
259 <form name
='new_group' method
='post' action
="usergroup_admin.php"
260 onsubmit
='return top.restoreSession()'>
261 <input type
=hidden name
=mode value
=new_group
>
262 <span
class="bold"><?php
xl('Add User To Group','e'); ?
>:</span
>
265 <?php
xl('User','e'); ?
>
269 $res = sqlStatement("select distinct username from users where username != ''");
270 for ($iter = 0;$row = sqlFetchArray($res);$iter++
)
271 $result3[$iter] = $row;
272 foreach ($result3 as $iter) {
273 print "<option value='".$iter{"username"}."'>" . $iter{"username"} . "</option>\n";
278 <span
class="text"><?php
xl('Groupname','e'); ?
>: </span
>
279 <select name
=groupname
>
281 $res = sqlStatement("select distinct name from groups");
283 for ($iter = 0;$row = sqlFetchArray($res);$iter++
)
284 $result2[$iter] = $row;
285 foreach ($result2 as $iter) {
286 print "<option value='".$iter{"name"}."'>" . $iter{"name"} . "</option>\n";
291 <input type
="submit" value
=<?php
xl('Add User To Group','e'); ?
>>
299 if (empty($GLOBALS['disable_non_default_groups'])) {
300 $res = sqlStatement("select * from groups order by name");
301 for ($iter = 0;$row = sqlFetchArray($res);$iter++
)
302 $result5[$iter] = $row;
304 foreach ($result5 as $iter) {
305 $grouplist{$iter{"name"}} .= $iter{"user"} .
306 "(<a class='link_submit' href='usergroup_admin.php?mode=delete_group&id=" .
307 $iter{"id"} . "' onclick='top.restoreSession()'>Remove</a>), ";
310 foreach ($grouplist as $groupname => $list) {
311 print "<span class='bold'>" . $groupname . "</span><br>\n<span class='text'>" .
312 substr($list,0,strlen($list)-2) . "</span><br>\n";
317 <script language
="JavaScript">
319 if ($alertmsg = trim($alertmsg)) {
320 echo "alert('$alertmsg');\n";
323 $
(document
).ready(function(){
324 $
("#cancel").click(function() {
325 parent
.$
.fn
.fancybox
.close();