- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / system_admin / edv_user_access_lock.php
blob3a03757aa20405a25e8884b13be9d93998a559d9
1 <?php
2 error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
3 require('./roots.php');
4 require($root_path.'include/inc_environment_global.php');
5 /**
6 * CARE2X Integrated Hospital Information System Deployment 2.1 - 2004-10-02
7 * GNU General Public License
8 * Copyright 2002,2003,2004,2005 Elpidio Latorilla
9 * elpidio@care2x.org,
11 * See the file "copy_notice.txt" for the licence notice
13 define('LANG_FILE','edp.php');
14 $local_user='ck_edv_user';
16 require_once($root_path.'include/inc_front_chain_lang.php');
18 //$breakfile='edv_user_access_list.php'.URL_APPEND;
19 $breakfile='edv-system-admi-welcome.php'.URL_APPEND;
20 $updatereturn='edv_user_access_list.php';
21 //$updatereturn='edv_user_access_list.php';
22 $returnfile=$HTTP_SESSION_VARS['sess_file_return'].URL_APPEND;
23 //$db->debug=true;
24 //$HTTP_SESSION_VARS['sess_file_return']='edv.php';
26 require_once($root_path.'include/care_api_classes/class_access.php');
27 $user = & new Access($itemname);
29 if($user->UserExists()){
31 if ($finalcommand=='changelock') {
33 if($user->isLocked()){
34 $result = $user->UnLock();
35 }else{
36 $result = $user->Lock();
38 if($result){
39 header("Location: ".$updatereturn.URL_REDIRECT_APPEND."&itemname=$itemname&remark=lockchanged");
40 exit;
41 }else {
42 echo "$LDDbNoSave<p>".$user->getLastQuery();
47 # Prepare title
48 $sTitle = "$LDEDP::$LDAccessRight";
49 if($zeile['lockflag']) $sTitle = "$sTitle::$LDUnlock";
50 else $sTitle = "$sTitle::$LDLock";
52 # Start Smarty templating here
53 /**
54 * LOAD Smarty
56 # Note: it is advisable to load this after the inc_front_chain_lang.php so
57 # that the smarty script can use the user configured template theme
59 require_once($root_path.'gui/smarty_template/smarty_care.class.php');
60 $smarty = new smarty_care('system_admin');
62 # Title in toolbar
63 $smarty->assign('sToolbarTitle',$sTitle);
65 # hide return button
66 $smarty->assign('pbBack',$returnfile);
68 # href for help button
69 $smarty->assign('pbHelp',"javascript:gethelp('edp.php','access','lock','".$zeile['lockflag']."')");
71 # href for close button
72 $smarty->assign('breakfile',$breakfile);
74 # Window bar title
75 $smarty->assign('sWindowTitle',$sTitle);
77 # Buffer page output
79 ob_start();
82 <p><br>
83 <center>
85 <table width=50% border=1 cellpadding="20">
86 <tr>
87 <td bgcolor="#ffffdd">
88 <p>
89 <?php if ($user->isLocked())
90 echo $LDSureUnlock; else echo $LDSureLock; ?>?<p>
92 <table border="0" cellpadding="5" cellspacing="1">
93 <tr>
94 <td align=right><font color=#000080><?php echo $LDName ?>:
95 </td><td><font color=#800000>
96 <?php
97 echo $user->Name();
99 </td>
100 </tr>
101 <tr>
102 <td align=right><font color=#000080><?php echo $LDUserId ?>:</td>
103 <td><font color=#800000>
104 <?php
105 echo $user->LoginName();
107 </td>
108 </tr>
109 <!-- <tr>
110 <td align=right><font color=#000080><?php echo $LDPassword ?>:</td>
111 <td><font color=#800000>
112 <?php
113 echo $zeile['password'];
115 </td>
116 </tr> -->
117 </table>
119 <br>
120 <FORM action="edv_user_access_lock.php" method="post">
121 <INPUT type="hidden" name="itemname" value="<?php echo $itemname ?>">
122 <input type="hidden" name="finalcommand" value="changelock">
123 <input type="hidden" name="sid" value="<?php echo $sid;?>">
124 <input type="hidden" name="lang" value="<?php echo $lang;?>">
125 <INPUT type="submit" name="versand" value=" <?php echo $LDYesSure ?> "></font></FORM>
127 <FORM method=get action="edv_user_access_list.php" >
128 <input type="hidden" name="sid" value="<?php echo $sid;?>">
129 <input type="hidden" name="lang" value="<?php echo $lang;?>">
130 <INPUT type="submit" value="<?php echo $LDNoBack ?>"></font></FORM>
132 </center>
134 </td>
135 </tr>
136 </table>
138 <?php
140 $sTemp = ob_get_contents();
141 ob_end_clean();
143 # Assign page output to the mainframe template
145 $smarty->assign('sMainFrameBlockData',$sTemp);
147 * show Template
149 $smarty->display('common/mainframe.tpl');