2 require_once("../globals.php");
3 require_once("../../library/acl.inc");
4 require_once("$srcdir/sql.inc");
5 require_once("$srcdir/formdata.inc.php");
9 if (isset($_POST["mode"]) && $_POST["mode"] == "facility") {
10 sqlStatement("INSERT INTO facility SET " .
11 "name = '" . trim(formData('facility' )) . "', " .
12 "phone = '" . trim(formData('phone' )) . "', " .
13 "fax = '" . trim(formData('fax' )) . "', " .
14 "street = '" . trim(formData('street' )) . "', " .
15 "city = '" . trim(formData('city' )) . "', " .
16 "state = '" . trim(formData('state' )) . "', " .
17 "postal_code = '" . trim(formData('postal_code' )) . "', " .
18 "country_code = '" . trim(formData('country_code')) . "', " .
19 "federal_ein = '" . trim(formData('federal_ein' )) . "', " .
20 "facility_npi = '" . trim(formData('facility_npi')) . "'");
26 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
29 <body
class="body_top">
31 <span
class="title"><?php
xl('Facility Administration','e'); ?
></span
>
40 <form name
='facility' method
='post' action
="facilities.php"
41 onsubmit
='return top.restoreSession()'>
42 <input type
=hidden name
=mode value
="facility">
43 <span
class="bold"><?php
xl('New Facility Information','e'); ?
>: </span
>
46 <table border
=0 cellpadding
=0 cellspacing
=0>
48 <td
><span
class="text"><?php
xl('Name','e'); ?
>: </span
></td
><td
><input type
=entry name
=facility size
=20 value
=""></td
>
49 <td
><span
class="text"><?php
xl('Phone','e'); ?
>: </span
></td
><td
><input type
=entry name
=phone size
=20 value
=""></td
>
52 <td
> 
;</td
><td
> 
;</td
>
53 <td
><span
class="text"><?php
xl('Fax','e'); ?
>: </span
></td
><td
><input type
=entry name
=fax size
=20 value
=""></td
>
56 <td
><span
class="text"><?php
xl('Address','e'); ?
>: </span
></td
><td
><input type
=entry size
=20 name
=street value
=""></td
>
57 <td
><span
class="text"><?php
xl('City','e'); ?
>: </span
></td
><td
><input type
=entry size
=20 name
=city value
=""></td
>
60 <td
><span
class="text"><?php
xl('State','e'); ?
>: </span
></td
><td
><input type
=entry size
=20 name
=state value
=""></td
>
61 <td
><span
class="text"><?php
xl('Zip Code','e'); ?
>: </span
></td
><td
><input type
=entry size
=20 name
=postal_code value
=""></td
>
64 <td height
="22"><span
class="text"><?php
xl('Country','e'); ?
>: </span
></td
>
65 <td
><input type
=entry size
=20 name
=country_code value
=""></td
>
66 <td
><span
class="text"><?php
xl('Federal EIN','e'); ?
>: </span
></td
><td
><input type
=entry size
=20 name
=federal_ein value
=""></td
>
69 <td
> 
;</td
><td
> 
;</td
>
71 <td
><span
class="text"><?
php ($GLOBALS['simplified_demographics'] ?
xl('Facility Code','e') : xl('Facility NPI','e')); ?
>:
72 </span
></td
><td
><input type
=entry size
=20 name
=facility_npi value
=""></td
>
76 <td
> 
;</td
><td
> 
;</td
>
77 <td
> 
;</td
><td
><input type
="submit" value
=<?php
xl('Add Facility','e'); ?
>></td
>
86 <span
class="bold"><?php
xl('Edit Facilities','e'); ?
>: </span
>
90 $fres = sqlStatement("select * from facility order by name");
93 for ($iter3 = 0;$frow = sqlFetchArray($fres);$iter3++
)
94 $result2[$iter3] = $frow;
95 foreach($result2 as $iter3) {
97 <span
class="text"><?php
echo $iter3{name
};?
></span
>
98 <a href
="facility_admin.php?fid=<?php echo $iter3{id};?>" class="link_submit"
99 onclick
="top.restoreSession()">(<?php
xl('Edit','e'); ?
>)</a
><br
>
109 <script language
="JavaScript">
111 if ($alertmsg = trim($alertmsg)) {
112 echo "alert('$alertmsg');\n";