From 2002fe4f7194ee45dfe0528dd0cdc6943b2504c6 Mon Sep 17 00:00:00 2001 From: sunsetsystems Date: Wed, 6 Dec 2006 16:18:16 +0000 Subject: [PATCH] address book based on users table --- interface/main/main_navigation.php | 4 + interface/usergroup/addrbook_edit.php | 182 +++++++++++++++++++++++++++------- interface/usergroup/addrbook_list.php | 45 +++++++-- sql/2_8_1-to-2_8_2_upgrade.sql | 11 +- sql/database.sql | 9 ++ 5 files changed, 206 insertions(+), 45 deletions(-) diff --git a/interface/main/main_navigation.php b/interface/main/main_navigation.php index 726a20b38..65de60959 100644 --- a/interface/main/main_navigation.php +++ b/interface/main/main_navigation.php @@ -61,6 +61,10 @@ include_once("../../library/acl.inc");    + +   + + -<? echo $userid ? "Edit" : "Add New" ?> Person - +<?php echo $userid ? "Edit" : "Add New" ?> Person + diff --git a/interface/usergroup/addrbook_list.php b/interface/usergroup/addrbook_list.php index 25b2a569b..6237bed40 100644 --- a/interface/usergroup/addrbook_list.php +++ b/interface/usergroup/addrbook_list.php @@ -11,10 +11,12 @@ $form_fname = trim($_POST['form_fname']); $form_lname = trim($_POST['form_lname']); + $form_specialty = trim($_POST['form_specialty']); $query = "SELECT * FROM users WHERE 1 = 1 "; if ($form_lname) $query .= "AND lname LIKE '$form_lname%' "; if ($form_fname) $query .= "AND fname LIKE '$form_fname%' "; + if ($form_specialty) $query .= "AND specialty LIKE '%$form_specialty%' "; $query .= "ORDER BY lname, fname, mname LIMIT 500"; $res = sqlStatement($query); ?> @@ -35,17 +37,39 @@ a, a:visited, a:hover { color:#0000cc; } tr.search { - font-size:10pt; - font-weight: bold; + font-size:9pt; + font-weight:bold; } tr.head { font-size:10pt; background-color:#cccccc; - font-weight: bold; + font-weight:bold; } tr.detail { font-size:10pt; } + +.inputtext { + font-family:monospace; + font-size:9pt; + font-weight:normal; + border-style:solid; + border-width:1px; + /* + border-top-width:0px; + border-bottom-width:1px; + border-left-width:0px; + border-right-width:0px; + */ + border-color: #000000; + background-color:transparent; +} + +.button { + font-family:sans-serif; + font-size:8pt; + font-weight:bold; +} @@ -60,7 +84,7 @@ function refreshme() { // Process click to pop up the add/edit window. function doedclick(userid) { - dlgopen('addrbook_edit.php?userid=' + userid, '_blank', 600, 350); + dlgopen('addrbook_edit.php?userid=' + userid, '_blank', 700, 450); } @@ -80,14 +104,17 @@ function doedclick(userid) {   + class='inputtext' title='' />    - + class='inputtext' title='' />  + +    + - + @@ -121,7 +148,7 @@ function doedclick(userid) { echo " " . $row['lname'] . ', ' . $row['fname'] . ' ' . $row['mname'] . "\n"; echo " " . $username . "\n"; echo " " . $row['specialty'] . "\n"; - echo " " . $row['phone'] . "\n"; + echo " " . $row['phonew1'] . "\n"; echo " " . $row['fax'] . "\n"; echo " " . $row['email'] . "\n"; echo " " . $row['street'] . "\n"; diff --git a/sql/2_8_1-to-2_8_2_upgrade.sql b/sql/2_8_1-to-2_8_2_upgrade.sql index a04eb2b1a..c141292ce 100644 --- a/sql/2_8_1-to-2_8_2_upgrade.sql +++ b/sql/2_8_1-to-2_8_2_upgrade.sql @@ -387,4 +387,13 @@ ALTER TABLE users ADD state varchar(30) NOT NULL DEFAULT '', ADD zip varchar(20) NOT NULL DEFAULT '', ADD phone varchar(30) NOT NULL DEFAULT '', - ADD fax varchar(30) NOT NULL DEFAULT ''; + ADD fax varchar(30) NOT NULL DEFAULT '', + ADD title varchar(30) NOT NULL DEFAULT '', + ADD phonew1 varchar(30) NOT NULL DEFAULT '', + ADD phonew2 varchar(30) NOT NULL DEFAULT '', + ADD phonecell varchar(30) NOT NULL DEFAULT '', + ADD assistant varchar(255) NOT NULL DEFAULT '', + ADD street2 varchar(60) NOT NULL DEFAULT '', + ADD city2 varchar(30) NOT NULL DEFAULT '', + ADD state2 varchar(30) NOT NULL DEFAULT '', + ADD zip2 varchar(20) NOT NULL DEFAULT ''; diff --git a/sql/database.sql b/sql/database.sql index a9bf2c3d5..fda3bd6f0 100644 --- a/sql/database.sql +++ b/sql/database.sql @@ -27690,16 +27690,25 @@ CREATE TABLE `users` ( `see_auth` int(11) NOT NULL DEFAULT 1, `active` tinyint(1) NOT NULL DEFAULT 1, `npi` varchar(15) NOT NULL DEFAULT '', + `title` varchar(30) NOT NULL DEFAULT '', `specialty` varchar(255) NOT NULL DEFAULT '', `billname` varchar(255) NOT NULL DEFAULT '', `email` varchar(255) NOT NULL DEFAULT '', `url` varchar(255) NOT NULL DEFAULT '', + `assistant` varchar(255) NOT NULL DEFAULT '', `street` varchar(60) NOT NULL DEFAULT '', `city` varchar(30) NOT NULL DEFAULT '', `state` varchar(30) NOT NULL DEFAULT '', `zip` varchar(20) NOT NULL DEFAULT '', + `street2` varchar(60) NOT NULL DEFAULT '', + `city2` varchar(30) NOT NULL DEFAULT '', + `state2` varchar(30) NOT NULL DEFAULT '', + `zip2` varchar(20) NOT NULL DEFAULT '', `phone` varchar(30) NOT NULL DEFAULT '', `fax` varchar(30) NOT NULL DEFAULT '', + `phonew1` varchar(30) NOT NULL DEFAULT '', + `phonew2` varchar(30) NOT NULL DEFAULT '', + `phonecell` varchar(30) NOT NULL DEFAULT '', PRIMARY KEY (`id`) ) ; -- 2.11.4.GIT