- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / phone_directory / phone_entry_update.php
blobfadac9586df28cca3137b865f3c51d9014136fd9
1 <?php
2 error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
3 require_once('./roots.php');
4 require_once($root_path.'include/inc_environment_global.php');
5 /**
6 * CARE2X Integrated Hospital Information System Deployment 2.2 - 2006-07-10
7 * GNU General Public License
8 * Copyright 2002,2003,2004,2005,2006 Elpidio Latorilla
9 * elpidio@care2x.org,
11 * See the file "copy_notice.txt" for the licence notice
13 define('LANG_FILE','phone.php');
14 $local_user='phonedir_user';
15 require_once($root_path.'include/inc_front_chain_lang.php');
17 # Load the Comm class and create comm (phone) object
18 require_once($root_path.'include/care_api_classes/class_comm.php');
19 $phone = & new Comm;
21 //$db->debug=true;
22 $error=1;
23 //$newdata=0;
24 $curdate=date('Y-m-d');
25 $curtime=date('H:i:s');
27 $dbtable='care_phone';
29 if ($mode=='save'){
30 // start checking input data
31 if (($name!="")or($vorname!="")){
33 # Correctly map some indexes
34 $HTTP_POST_VARS['roomnr']=$HTTP_POST_VARS['zimmerno'];
35 $HTTP_POST_VARS['date'] = $curdate;
36 $HTTP_POST_VARS['time'] = $curtime;
37 $HTTP_POST_VARS['modify_id'] = $HTTP_SESSION_VARS['sess_user_name'];
38 $HTTP_POST_VARS['modify_time'] = date('YmdHis');
39 $HTTP_POST_VARS['history'] = $phone->ConcatHistory("Update ".date('Y-m-d H:i:s')." ".$HTTP_SESSION_VARS['sess_user_name']."\n");
40 $HTTP_POST_VARS['title'] = $HTTP_POST_VARS['anrede'];
42 $phone->setWhereCondition("item_nr='$itemname'");
43 $phone->setDataArray($HTTP_POST_VARS);
45 if($phone->updateDataFromInternalArray($itemname))
47 header("Location: phone_list.php?sid=$sid&lang=$lang&batchnum=$batchnum&linecount=$linecount&pagecount=$pagecount&displaysize=$displaysize&update=1&itemname=$itemname&edit=$edit");
48 exit;
50 else {echo "<p>".$sql."<p>$LDDbNoSave";};
52 }else{
54 if(!$zeile=$phone->getData($itemname)){
55 $zeile=array();
56 echo $phone->getLastQuery()."<br>$LDDbNoRead<br>";
61 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN" "html.dtd">
62 <?php html_rtl($lang); ?>
63 <HEAD>
64 <?php echo setCharSet(); ?>
65 <TITLE></TITLE>
66 <STYLE TYPE="text/css">
67 .va12_b {text-decoration: none; color: #0000cc;}
68 </style>
69 <?php
70 require($root_path.'include/inc_js_gethelp.php');
71 require($root_path.'include/inc_css_a_hilitebu.php');
74 </HEAD>
76 <BODY >
77 <FONT COLOR="<?php echo $cfg[top_txtcolor] ?>" SIZE=6 FACE="verdana"> <b><?php echo $LDPhoneDir ?></b></font>
79 <table width=100% border=1>
80 <tr>
81 <td class="wardlisttitlerow">
82 <FONT SIZE=+1><STRONG>&nbsp;<?php echo $LDUpdate ?></STRONG></FONT>
83 </td>
84 </tr>
85 <tr>
86 <td ><p><br>
87 <ul>
88 <?php if (($error==1)and($newvalues!="")) echo "<FONT COLOR=maroon SIZE=+1 FACE=Arial>$LDNoData<p>";
90 <form method="post" action="phone_entry_update.php">
91 <table class="submenu" border="1" cellpadding="5" cellspacing="1">
92 <tr>
93 <td colspan="3">
94 <b><?php echo str_replace("~nr~",$zeile[item],$LDDirData); ?> </b>
95 </td>
96 <td >
97 &nbsp;
98 </td>
99 </tr>
100 <tr>
101 <td class="va12_b">
103 <?php echo $LDEditFields[1] ?>&nbsp;
104 <input name=anrede type=text size="5" value="<?php echo $zeile[title] ?>" maxlength=25><br>
105 </td>
106 <td class="va12_b">
108 <?php echo $LDEditFields[2] ?>&nbsp;
109 <input name=name type=text size="15" value="<?php echo $zeile[name] ?>" maxlength=45><br>
110 </td>
111 <td class="va12_b">
112 <?php echo $LDEditFields[3] ?>&nbsp;
114 <input type=text name=vorname size="15" value="<?php echo $zeile[vorname] ?>" maxlength=45><br>
115 </td>
116 <td class="va12_b">
117 <?php echo $LDEditFields[4] ?>&nbsp;
118 <input type=text name=beruf size="10" value="<?php echo $zeile[beruf] ?>" maxlength=25><br>
119 </td>
120 </tr>
121 <tr>
122 <td colspan=2 class="va12_b">
123 <?php echo $LDEditFields[5] ?><br>
125 <input type=text name=bereich1 size="10" value="<?php echo $zeile[bereich1] ?>" maxlength=25><br>
126 </td>
127 <td class="va12_b">
128 <?php echo $LDEditFields[6] ?><br>
129 <input type=text name=bereich2 size="10" value="<?php echo $zeile[bereich2] ?>" maxlength=25><br>
130 </td>
131 <td >
132 &nbsp;
133 </td>
134 </tr>
136 <tr>
137 <td colspan=2 class="va12_b">
138 <?php echo $LDEditFields[7] ?><br>
140 <input type=text name=inphone1 size="20" value="<?php echo $zeile[inphone1] ?>" maxlength=15><br>
141 </td>
142 <td class="va12_b">
143 <?php echo $LDEditFields[8] ?><br>
144 <input type=text name=inphone2 size="20" value="<?php echo $zeile[inphone2] ?>" maxlength=15><br>
145 </td>
146 <td class="va12_b">
147 <?php echo $LDEditFields[9] ?><br>
148 <input type=text name=inphone3 size="20" value="<?php echo $zeile[inphone3] ?>" maxlength=15><br>
149 </td>
150 </tr>
152 <tr>
153 <td colspan=2 class="va12_b">
154 <?php echo $LDEditFields[10] ?><br>
156 <input type=text name=exphone1 size="20" value="<?php echo $zeile[exphone1] ?>" maxlength=25><br>
157 </td>
158 <td class="va12_b">
159 <?php echo $LDEditFields[11] ?><br>
160 <input type=text name=exphone2 size="20" value="<?php echo $zeile[exphone2] ?>" maxlength=25><br>
161 </td>
162 <td >
163 &nbsp;
164 </td>
165 </tr>
167 <tr>
168 <td colspan=2 class="va12_b">
169 <?php echo $LDEditFields[12] ?><br>
171 <input type=text name=funk1 size="20" value="<?php echo $zeile[funk1] ?>" maxlength=15><br>
172 </td>
173 <td class="va12_b">
174 <?php echo $LDEditFields[13] ?><br>
175 <input type=text name=funk2 size="20" value="<?php echo $zeile[funk2] ?>" maxlength=15><br>
176 </td>
177 <td class="va12_b">
178 <?php echo $LDEditFields[14] ?><br>
179 <input type=text name=zimmerno size="20" value="<?php echo $zeile[roomnr] ?>" maxlength=10><br>
180 </td>
181 </tr>
182 <tr>
183 <td colspan=3>
185 <input type="hidden" name="mode" value="save">
186 <input type="hidden" name="from" value="list">
187 <input type="hidden" name="itemname" value="<?php echo $itemname ?>">
188 <input type="hidden" name="linecount" value="<?php echo $linecount ?>">
189 <input type="hidden" name="pagecount" value="<?php echo $pagecount ?>">
190 <input type="hidden" name="batchnum" value="<?php echo $batchnum ?>">
191 <input type="hidden" name="displaysize" value="<?php echo $displaysize ?>">
192 <input type="hidden" name="edit" value="<?php echo $edit ?>">
193 <input type="hidden" name="sid" value="<?php echo $sid; ?>">
194 <input type="hidden" name="lang" value="<?php echo $lang; ?>">
195 <input type="submit" value="<?php echo $LDUpdate ?>"> &nbsp;
196 <input type="reset" value="<?php echo $LDReset ?>">
197 </td>
198 <td >
199 &nbsp;
200 </td>
201 </tr>
202 </table>
203 </form>
207 <FORM action="phone_list.php" method="post">
208 <input type="hidden" name="linecount" value="<?php echo $linecount ?>">
209 <input type="hidden" name="pagecount" value="<?php echo $pagecount ?>">
210 <input type="hidden" name="batchnum" value="<?php echo $batchnum ?>">
211 <input type="hidden" name="displaysize" value="<?php echo $displaysize ?>">
212 <input type="hidden" name="edit" value="<?php echo $edit ?>">
213 <input type="hidden" name="sid" value="<?php echo $sid; ?>">
214 <input type="hidden" name="lang" value="<?php echo $lang; ?>">
215 <INPUT type="image" <?php echo createLDImgSrc($root_path,'cancel.gif','0'); ?>></font></FORM>
217 </FONT>
218 </ul>
220 </td>
221 </tr>
222 </table>
224 <?php
225 require($root_path.'include/inc_load_copyrite.php');
227 </FONT>
228 </BODY>
229 </HTML>