users_edit.php 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031
  1. <?php
  2. /*
  3. FusionPBX
  4. Version: MPL 1.1
  5. The contents of this file are subject to the Mozilla Public License Version
  6. 1.1 (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.mozilla.org/MPL/
  9. Software distributed under the License is distributed on an "AS IS" basis,
  10. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11. for the specific language governing rights and limitations under the
  12. License.
  13. The Original Code is FusionPBX
  14. The Initial Developer of the Original Code is
  15. Mark J Crane <[email protected]>
  16. Portions created by the Initial Developer are Copyright (C) 2008-2012
  17. the Initial Developer. All Rights Reserved.
  18. Contributor(s):
  19. Mark J Crane <[email protected]>
  20. */
  21. include "root.php";
  22. require_once "resources/require.php";
  23. require_once "resources/check_auth.php";
  24. if (permission_exists('contact_add') || permission_exists('contact_edit')) {
  25. //access granted
  26. }
  27. else {
  28. echo "access denied";
  29. exit;
  30. }
  31. //set the action to an add or update
  32. if (isset($_REQUEST["id"])) {
  33. $action = "update";
  34. $user_uuid = check_str($_REQUEST["id"]);
  35. }
  36. else {
  37. $action = "add";
  38. }
  39. //get the http post values and set them as php variables
  40. if (count($_POST)>0) {
  41. $username = check_str($_POST["username"]);
  42. $password = check_str($_POST["password"]);
  43. $user_type = check_str($_POST["user_type"]);
  44. $user_category = check_str($_POST["user_category"]);
  45. $user_first_name = check_str($_POST["user_first_name"]);
  46. $user_last_name = check_str($_POST["user_last_name"]);
  47. $user_company_name = check_str($_POST["user_company_name"]);
  48. $user_physical_address_1 = check_str($_POST["user_physical_address_1"]);
  49. $user_physical_address_2 = check_str($_POST["user_physical_address_2"]);
  50. $user_physical_city = check_str($_POST["user_physical_city"]);
  51. $user_physical_state_province = check_str($_POST["user_physical_state_province"]);
  52. $user_physical_postal_code = check_str($_POST["user_physical_postal_code"]);
  53. $user_physical_country = check_str($_POST["user_physical_country"]);
  54. $user_mailing_address_1 = check_str($_POST["user_mailing_address_1"]);
  55. $user_mailing_address_2 = check_str($_POST["user_mailing_address_2"]);
  56. $user_mailing_city = check_str($_POST["user_mailing_city"]);
  57. $user_mailing_state_province = check_str($_POST["user_mailing_state_province"]);
  58. $user_mailing_postal_code = check_str($_POST["user_mailing_postal_code"]);
  59. $user_mailing_country = check_str($_POST["user_mailing_country"]);
  60. $user_billing_address_1 = check_str($_POST["user_billing_address_1"]);
  61. $user_billing_address_2 = check_str($_POST["user_billing_address_2"]);
  62. $user_billing_city = check_str($_POST["user_billing_city"]);
  63. $user_billing_state_province = check_str($_POST["user_billing_state_province"]);
  64. $user_billing_postal_code = check_str($_POST["user_billing_postal_code"]);
  65. $user_billing_country = check_str($_POST["user_billing_country"]);
  66. $user_shipping_address_1 = check_str($_POST["user_shipping_address_1"]);
  67. $user_shipping_address_2 = check_str($_POST["user_shipping_address_2"]);
  68. $user_shipping_city = check_str($_POST["user_shipping_city"]);
  69. $user_shipping_state_province = check_str($_POST["user_shipping_state_province"]);
  70. $user_shipping_postal_code = check_str($_POST["user_shipping_postal_code"]);
  71. $user_shipping_country = check_str($_POST["user_shipping_country"]);
  72. $user_phone_1 = check_str($_POST["user_phone_1"]);
  73. $user_phone_1_ext = check_str($_POST["user_phone_1_ext"]);
  74. $user_phone_2 = check_str($_POST["user_phone_2"]);
  75. $user_phone_2_ext = check_str($_POST["user_phone_2_ext"]);
  76. $user_phone_mobile = check_str($_POST["user_phone_mobile"]);
  77. $user_phone_fax = check_str($_POST["user_phone_fax"]);
  78. $user_phone_emergency_mobile = check_str($_POST["user_phone_emergency_mobile"]);
  79. $user_email_emergency = check_str($_POST["user_email_emergency"]);
  80. $user_email = check_str($_POST["user_email"]);
  81. $user_url = check_str($_POST["user_url"]);
  82. $user_notes = check_str($_POST["user_notes"]);
  83. $user_optional_1 = check_str($_POST["user_optional_1"]);
  84. $user_add_user = check_str($_POST["user_add_user"]);
  85. $user_add_date = check_str($_POST["user_add_date"]);
  86. }
  87. if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
  88. $msg = '';
  89. if ($action == "update") {
  90. $id = check_str($_POST["id"]);
  91. }
  92. //check for all required data
  93. //if (strlen($username) == 0) { $msg .= "Please provide: Username<br>\n"; }
  94. //if (strlen($password) == 0) { $msg .= "Please provide: Password<br>\n"; }
  95. //if (strlen($user_type) == 0) { $msg .= "Please provide: Type<br>\n"; }
  96. //if (strlen($user_category) == 0) { $msg .= "Please provide: Category<br>\n"; }
  97. //if (strlen($user_first_name) == 0) { $msg .= "Please provide: First Name<br>\n"; }
  98. //if (strlen($user_last_name) == 0) { $msg .= "Please provide: Last Name<br>\n"; }
  99. //if (strlen($user_company_name) == 0) { $msg .= "Please provide: Organization<br>\n"; }
  100. //if (strlen($user_physical_address_1) == 0) { $msg .= "Please provide: Address 1<br>\n"; }
  101. //if (strlen($user_physical_address_2) == 0) { $msg .= "Please provide: Address 2<br>\n"; }
  102. //if (strlen($user_physical_city) == 0) { $msg .= "Please provide: City<br>\n"; }
  103. //if (strlen($user_physical_state_province) == 0) { $msg .= "Please provide: State/Province<br>\n"; }
  104. //if (strlen($user_physical_postal_code) == 0) { $msg .= "Please provide: Postal Code<br>\n"; }
  105. //if (strlen($user_physical_country) == 0) { $msg .= "Please provide: Country<br>\n"; }
  106. //if (strlen($user_mailing_address_1) == 0) { $msg .= "Please provide: Address 1<br>\n"; }
  107. //if (strlen($user_mailing_address_2) == 0) { $msg .= "Please provide: Address 2<br>\n"; }
  108. //if (strlen($user_mailing_city) == 0) { $msg .= "Please provide: City<br>\n"; }
  109. //if (strlen($user_mailing_state_province) == 0) { $msg .= "Please provide: State/Province<br>\n"; }
  110. //if (strlen($user_mailing_postal_code) == 0) { $msg .= "Please provide: Postal Code<br>\n"; }
  111. //if (strlen($user_mailing_country) == 0) { $msg .= "Please provide: Country<br>\n"; }
  112. //if (strlen($user_billing_address_1) == 0) { $msg .= "Please provide: Address 1<br>\n"; }
  113. //if (strlen($user_billing_address_2) == 0) { $msg .= "Please provide: Address 2<br>\n"; }
  114. //if (strlen($user_billing_city) == 0) { $msg .= "Please provide: City<br>\n"; }
  115. //if (strlen($user_billing_state_province) == 0) { $msg .= "Please provide: State/Province<br>\n"; }
  116. //if (strlen($user_billing_postal_code) == 0) { $msg .= "Please provide: Postal Code<br>\n"; }
  117. //if (strlen($user_billing_country) == 0) { $msg .= "Please provide: Country<br>\n"; }
  118. //if (strlen($user_shipping_address_1) == 0) { $msg .= "Please provide: Address 1<br>\n"; }
  119. //if (strlen($user_shipping_address_2) == 0) { $msg .= "Please provide: Address 2<br>\n"; }
  120. //if (strlen($user_shipping_city) == 0) { $msg .= "Please provide: City<br>\n"; }
  121. //if (strlen($user_shipping_state_province) == 0) { $msg .= "Please provide: State/Province<br>\n"; }
  122. //if (strlen($user_shipping_postal_code) == 0) { $msg .= "Please provide: Postal Code<br>\n"; }
  123. //if (strlen($user_shipping_country) == 0) { $msg .= "Please provide: Country<br>\n"; }
  124. //if (strlen($user_phone_1) == 0) { $msg .= "Please provide: Phone 1<br>\n"; }
  125. //if (strlen($user_phone_1_ext) == 0) { $msg .= "Please provide: Ext 1<br>\n"; }
  126. //if (strlen($user_phone_2) == 0) { $msg .= "Please provide: Phone 2<br>\n"; }
  127. //if (strlen($user_phone_2_ext) == 0) { $msg .= "Please provide: Ext 2<br>\n"; }
  128. //if (strlen($user_phone_mobile) == 0) { $msg .= "Please provide: Mobile<br>\n"; }
  129. //if (strlen($user_phone_fax) == 0) { $msg .= "Please provide: FAX<br>\n"; }
  130. //if (strlen($user_phone_emergency_mobile) == 0) { $msg .= "Please provide: Emergency Mobile<br>\n"; }
  131. //if (strlen($user_email_emergency) == 0) { $msg .= "Please provide: Emergency Email<br>\n"; }
  132. //if (strlen($user_email) == 0) { $msg .= "Please provide: Email<br>\n"; }
  133. //if (strlen($user_url) == 0) { $msg .= "Please provide: URL<br>\n"; }
  134. //if (strlen($user_notes) == 0) { $msg .= "Please provide: Notes<br>\n"; }
  135. //if (strlen($user_optional_1) == 0) { $msg .= "Please provide: Optional 1<br>\n"; }
  136. //if (strlen($user_add_user) == 0) { $msg .= "Please provide: Add User<br>\n"; }
  137. //if (strlen($user_add_date) == 0) { $msg .= "Please provide: Add Date<br>\n"; }
  138. if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
  139. require_once "resources/header.php";
  140. require_once "resources/persist_form_var.php";
  141. echo "<div align='center'>\n";
  142. echo "<table><tr><td>\n";
  143. echo $msg."<br />";
  144. echo "</td></tr></table>\n";
  145. persistformvar($_POST);
  146. echo "</div>\n";
  147. require_once "resources/footer.php";
  148. return;
  149. }
  150. //add or update the database
  151. if ($_POST["persistformvar"] != "true") {
  152. if ($action == "add" && permission_exists('contact_add')) {
  153. $sql = "insert into v_users ";
  154. $sql .= "(";
  155. $sql .= "domain_uuid, ";
  156. $sql .= "user_uuid, ";
  157. //$sql .= "username, ";
  158. //$sql .= "password, ";
  159. $sql .= "user_type, ";
  160. $sql .= "user_category, ";
  161. $sql .= "user_first_name, ";
  162. $sql .= "user_last_name, ";
  163. $sql .= "user_company_name, ";
  164. $sql .= "user_physical_address_1, ";
  165. $sql .= "user_physical_address_2, ";
  166. $sql .= "user_physical_city, ";
  167. $sql .= "user_physical_state_province, ";
  168. $sql .= "user_physical_postal_code, ";
  169. $sql .= "user_physical_country, ";
  170. $sql .= "user_mailing_address_1, ";
  171. $sql .= "user_mailing_address_2, ";
  172. $sql .= "user_mailing_city, ";
  173. $sql .= "user_mailing_state_province, ";
  174. $sql .= "user_mailing_postal_code, ";
  175. $sql .= "user_mailing_country, ";
  176. $sql .= "user_billing_address_1, ";
  177. $sql .= "user_billing_address_2, ";
  178. $sql .= "user_billing_city, ";
  179. $sql .= "user_billing_state_province, ";
  180. $sql .= "user_billing_postal_code, ";
  181. $sql .= "user_billing_country, ";
  182. $sql .= "user_shipping_address_1, ";
  183. $sql .= "user_shipping_address_2, ";
  184. $sql .= "user_shipping_city, ";
  185. $sql .= "user_shipping_state_province, ";
  186. $sql .= "user_shipping_postal_code, ";
  187. $sql .= "user_shipping_country, ";
  188. $sql .= "user_phone_1, ";
  189. $sql .= "user_phone_1_ext, ";
  190. $sql .= "user_phone_2, ";
  191. $sql .= "user_phone_2_ext, ";
  192. $sql .= "user_phone_mobile, ";
  193. $sql .= "user_phone_fax, ";
  194. $sql .= "user_phone_emergency_mobile, ";
  195. $sql .= "user_email_emergency, ";
  196. $sql .= "user_email, ";
  197. $sql .= "user_url, ";
  198. $sql .= "user_notes, ";
  199. $sql .= "user_optional_1, ";
  200. $sql .= "user_add_user, ";
  201. $sql .= "user_add_date ";
  202. $sql .= ")";
  203. $sql .= "values ";
  204. $sql .= "(";
  205. $sql .= "'$domain_uuid', ";
  206. $sql .= "'".uuid()."', ";
  207. //$sql .= "'$username', ";
  208. //$sql .= "'$password', ";
  209. $sql .= "'$user_type', ";
  210. $sql .= "'$user_category', ";
  211. $sql .= "'$user_first_name', ";
  212. $sql .= "'$user_last_name', ";
  213. $sql .= "'$user_company_name', ";
  214. $sql .= "'$user_physical_address_1', ";
  215. $sql .= "'$user_physical_address_2', ";
  216. $sql .= "'$user_physical_city', ";
  217. $sql .= "'$user_physical_state_province', ";
  218. $sql .= "'$user_physical_postal_code', ";
  219. $sql .= "'$user_physical_country', ";
  220. $sql .= "'$user_mailing_address_1', ";
  221. $sql .= "'$user_mailing_address_2', ";
  222. $sql .= "'$user_mailing_city', ";
  223. $sql .= "'$user_mailing_state_province', ";
  224. $sql .= "'$user_mailing_postal_code', ";
  225. $sql .= "'$user_mailing_country', ";
  226. $sql .= "'$user_billing_address_1', ";
  227. $sql .= "'$user_billing_address_2', ";
  228. $sql .= "'$user_billing_city', ";
  229. $sql .= "'$user_billing_state_province', ";
  230. $sql .= "'$user_billing_postal_code', ";
  231. $sql .= "'$user_billing_country', ";
  232. $sql .= "'$user_shipping_address_1', ";
  233. $sql .= "'$user_shipping_address_2', ";
  234. $sql .= "'$user_shipping_city', ";
  235. $sql .= "'$user_shipping_state_province', ";
  236. $sql .= "'$user_shipping_postal_code', ";
  237. $sql .= "'$user_shipping_country', ";
  238. $sql .= "'$user_phone_1', ";
  239. $sql .= "'$user_phone_1_ext', ";
  240. $sql .= "'$user_phone_2', ";
  241. $sql .= "'$user_phone_2_ext', ";
  242. $sql .= "'$user_phone_mobile', ";
  243. $sql .= "'$user_phone_fax', ";
  244. $sql .= "'$user_phone_emergency_mobile', ";
  245. $sql .= "'$user_email_emergency', ";
  246. $sql .= "'$user_email', ";
  247. $sql .= "'$user_url', ";
  248. $sql .= "'$user_notes', ";
  249. $sql .= "'$user_optional_1', ";
  250. $sql .= "'$user_add_user', ";
  251. $sql .= "'$user_add_date' ";
  252. $sql .= ")";
  253. $db->exec(check_sql($sql));
  254. unset($sql);
  255. require_once "resources/header.php";
  256. echo "<meta http-equiv=\"refresh\" content=\"2;url=users.php\">\n";
  257. echo "<div align='center'>\n";
  258. echo "Add Complete\n";
  259. echo "</div>\n";
  260. require_once "resources/footer.php";
  261. return;
  262. } //if ($action == "add")
  263. if ($action == "update" || permission_exists('contact_edit')) {
  264. $sql = "update v_users set ";
  265. //$sql .= "username = '$username', ";
  266. //if (strlen($password) > 0) {
  267. // $sql .= "password = '$password', ";
  268. //}
  269. $sql .= "user_type = '$user_type', ";
  270. $sql .= "user_category = '$user_category', ";
  271. $sql .= "user_first_name = '$user_first_name', ";
  272. $sql .= "user_last_name = '$user_last_name', ";
  273. $sql .= "user_company_name = '$user_company_name', ";
  274. $sql .= "user_physical_address_1 = '$user_physical_address_1', ";
  275. $sql .= "user_physical_address_2 = '$user_physical_address_2', ";
  276. $sql .= "user_physical_city = '$user_physical_city', ";
  277. $sql .= "user_physical_state_province = '$user_physical_state_province', ";
  278. $sql .= "user_physical_postal_code = '$user_physical_postal_code', ";
  279. $sql .= "user_physical_country = '$user_physical_country', ";
  280. $sql .= "user_mailing_address_1 = '$user_mailing_address_1', ";
  281. $sql .= "user_mailing_address_2 = '$user_mailing_address_2', ";
  282. $sql .= "user_mailing_city = '$user_mailing_city', ";
  283. $sql .= "user_mailing_state_province = '$user_mailing_state_province', ";
  284. $sql .= "user_mailing_postal_code = '$user_mailing_postal_code', ";
  285. $sql .= "user_mailing_country = '$user_mailing_country', ";
  286. $sql .= "user_billing_address_1 = '$user_billing_address_1', ";
  287. $sql .= "user_billing_address_2 = '$user_billing_address_2', ";
  288. $sql .= "user_billing_city = '$user_billing_city', ";
  289. $sql .= "user_billing_state_province = '$user_billing_state_province', ";
  290. $sql .= "user_billing_postal_code = '$user_billing_postal_code', ";
  291. $sql .= "user_billing_country = '$user_billing_country', ";
  292. $sql .= "user_shipping_address_1 = '$user_shipping_address_1', ";
  293. $sql .= "user_shipping_address_2 = '$user_shipping_address_2', ";
  294. $sql .= "user_shipping_city = '$user_shipping_city', ";
  295. $sql .= "user_shipping_state_province = '$user_shipping_state_province', ";
  296. $sql .= "user_shipping_postal_code = '$user_shipping_postal_code', ";
  297. $sql .= "user_shipping_country = '$user_shipping_country', ";
  298. $sql .= "user_phone_1 = '$user_phone_1', ";
  299. $sql .= "user_phone_1_ext = '$user_phone_1_ext', ";
  300. $sql .= "user_phone_2 = '$user_phone_2', ";
  301. $sql .= "user_phone_2_ext = '$user_phone_2_ext', ";
  302. $sql .= "user_phone_mobile = '$user_phone_mobile', ";
  303. $sql .= "user_phone_fax = '$user_phone_fax', ";
  304. $sql .= "user_phone_emergency_mobile = '$user_phone_emergency_mobile', ";
  305. $sql .= "user_email_emergency = '$user_email_emergency', ";
  306. $sql .= "user_email = '$user_email', ";
  307. $sql .= "user_url = '$user_url', ";
  308. $sql .= "user_notes = '$user_notes', ";
  309. $sql .= "user_optional_1 = '$user_optional_1' ";
  310. //$sql .= "user_add_user = '$user_add_user', ";
  311. //$sql .= "user_add_date = '$user_add_date' ";
  312. $sql .= "where domain_uuid = '$domain_uuid' ";
  313. $sql .= "and user_uuid = '$id' ";
  314. $db->exec(check_sql($sql));
  315. unset($sql);
  316. require_once "resources/header.php";
  317. echo "<meta http-equiv=\"refresh\" content=\"2;url=users.php\">\n";
  318. echo "<div align='center'>\n";
  319. echo "Update Complete\n";
  320. echo "</div>\n";
  321. require_once "resources/footer.php";
  322. return;
  323. } //if ($action == "update")
  324. } //if ($_POST["persistformvar"] != "true")
  325. } //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
  326. //pre-populate the form
  327. if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
  328. $id = $_GET["id"];
  329. $sql = "";
  330. $sql .= "select * from v_users ";
  331. $sql .= "where domain_uuid = '$domain_uuid' ";
  332. $sql .= "and id = '$id' ";
  333. $prep_statement = $db->prepare(check_sql($sql));
  334. $prep_statement->execute();
  335. $result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
  336. foreach ($result as &$row) {
  337. //$username = $row["username"];
  338. //$password = $row["password"];
  339. $user_type = $row["user_type"];
  340. $user_category = $row["user_category"];
  341. $user_first_name = $row["user_first_name"];
  342. $user_last_name = $row["user_last_name"];
  343. $user_company_name = $row["user_company_name"];
  344. $user_physical_address_1 = $row["user_physical_address_1"];
  345. $user_physical_address_2 = $row["user_physical_address_2"];
  346. $user_physical_city = $row["user_physical_city"];
  347. $user_physical_state_province = $row["user_physical_state_province"];
  348. $user_physical_postal_code = $row["user_physical_postal_code"];
  349. $user_physical_country = $row["user_physical_country"];
  350. $user_mailing_address_1 = $row["user_mailing_address_1"];
  351. $user_mailing_address_2 = $row["user_mailing_address_2"];
  352. $user_mailing_city = $row["user_mailing_city"];
  353. $user_mailing_state_province = $row["user_mailing_state_province"];
  354. $user_mailing_postal_code = $row["user_mailing_postal_code"];
  355. $user_mailing_country = $row["user_mailing_country"];
  356. $user_billing_address_1 = $row["user_billing_address_1"];
  357. $user_billing_address_2 = $row["user_billing_address_2"];
  358. $user_billing_city = $row["user_billing_city"];
  359. $user_billing_state_province = $row["user_billing_state_province"];
  360. $user_billing_postal_code = $row["user_billing_postal_code"];
  361. $user_billing_country = $row["user_billing_country"];
  362. $user_shipping_address_1 = $row["user_shipping_address_1"];
  363. $user_shipping_address_2 = $row["user_shipping_address_2"];
  364. $user_shipping_city = $row["user_shipping_city"];
  365. $user_shipping_state_province = $row["user_shipping_state_province"];
  366. $user_shipping_postal_code = $row["user_shipping_postal_code"];
  367. $user_shipping_country = $row["user_shipping_country"];
  368. $user_phone_1 = $row["user_phone_1"];
  369. $user_phone_1_ext = $row["user_phone_1_ext"];
  370. $user_phone_2 = $row["user_phone_2"];
  371. $user_phone_2_ext = $row["user_phone_2_ext"];
  372. $user_phone_mobile = $row["user_phone_mobile"];
  373. $user_phone_fax = $row["user_phone_fax"];
  374. $user_phone_emergency_mobile = $row["user_phone_emergency_mobile"];
  375. $user_email_emergency = $row["user_email_emergency"];
  376. $user_email = $row["user_email"];
  377. $user_url = $row["user_url"];
  378. $user_notes = $row["user_notes"];
  379. $user_optional_1 = $row["user_optional_1"];
  380. //$user_add_user = $row["user_add_user"];
  381. //$user_add_date = $row["user_add_date"];
  382. break; //limit to 1 row
  383. }
  384. unset ($prep_statement);
  385. }
  386. //show the header
  387. require_once "resources/header.php";
  388. //show the content
  389. echo "<div align='center'>";
  390. echo "<table width='100%' border='0' cellpadding='0' cellspacing=''>\n";
  391. echo "<tr class=''>\n";
  392. echo " <td align=\"left\">\n";
  393. echo " <br>";
  394. $tablewidth = "width='100%'";
  395. echo "<form method='post' name='frm' action=''>\n";
  396. echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
  397. echo "<tr>\n";
  398. if ($action == "add") {
  399. echo "<td width='30%' nowrap><b>Contact Add</b></td>\n";
  400. }
  401. if ($action == "update") {
  402. echo "<td width='30%' nowrap><b>Contact Edit</b></td>\n";
  403. }
  404. echo "<td width='70%' align='right'>\n";
  405. echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='users_vcard.php?id=$id'\" value='vcard'>\n";
  406. echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='users.php'\" value='Back'>\n";
  407. echo "</td>\n";
  408. echo "</tr>\n";
  409. echo "<tr><td colspan='2'>\n";
  410. if ($action == "add") {
  411. echo "Add the contact information to the fields below.</td>\n";
  412. }
  413. if ($action == "update") {
  414. echo "Edit the contact information using the fields below.\n";
  415. }
  416. echo "</td>\n";
  417. echo "</tr>\n";
  418. echo "</table>\n";
  419. echo "<br />\n";
  420. echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
  421. echo "<tr>\n";
  422. echo "<td valign='top'>\n";
  423. echo "<b>User Info</b><br>";
  424. echo "<div align='center' class='' style='padding:10px;'>\n";
  425. echo "<table $tablewidth cellpadding='6' cellspacing='0'>";
  426. //echo "<tr>\n";
  427. //echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
  428. //echo " Username:\n";
  429. //echo "</td>\n";
  430. //echo "<td width='70%' class='vtable' align='left'>\n";
  431. //echo " <input style='width: 80%;' class='formfld' type='text' name='username' autocomplete='off' maxlength='255' value=\"$username\">\n";
  432. //echo "<br />\n";
  433. //echo "\n";
  434. //echo "</td>\n";
  435. //echo "</tr>\n";
  436. //echo "<tr>\n";
  437. //echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  438. //echo " Password:\n";
  439. //echo "</td>\n";
  440. //echo "<td class='vtable' align='left'>\n";
  441. //echo " <input style='width: 80%;' class='formfld' type='password' name='password' autocomplete='off' maxlength='255' value=\"$password\">\n";
  442. //echo "<br />\n";
  443. //echo "\n";
  444. //echo "</td>\n";
  445. //echo "</tr>\n";
  446. echo "<tr>\n";
  447. echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
  448. echo " Type:\n";
  449. echo "</td>\n";
  450. echo "<td width='70%' class='vtable' align='left'>\n";
  451. echo " <select style='width: 80%;' class='formfld' name='user_type'>\n";
  452. echo " <option value=''></option>\n";
  453. if ($user_type == "Individual") {
  454. echo " <option value='Individual' selected>Individual</option>\n";
  455. }
  456. else {
  457. echo " <option value='Individual'>Individual</option>\n";
  458. }
  459. if ($user_type == "Organization") {
  460. echo " <option value='Organization' selected>Organization</option>\n";
  461. }
  462. else {
  463. echo " <option value='Organization'>Organization</option>\n";
  464. }
  465. echo " </select>\n";
  466. echo "<br />\n";
  467. echo "\n";
  468. echo "</td>\n";
  469. echo "</tr>\n";
  470. echo "<tr>\n";
  471. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  472. echo " Category:\n";
  473. echo "</td>\n";
  474. echo "<td class='vtable' align='left'>\n";
  475. echo " <input style='width: 80%;' class='formfld' type='text' name='user_category' maxlength='255' value=\"$user_category\">\n";
  476. echo "<br />\n";
  477. echo "\n";
  478. echo "</td>\n";
  479. echo "</tr>\n";
  480. echo "<tr>\n";
  481. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  482. echo " First Name:\n";
  483. echo "</td>\n";
  484. echo "<td class='vtable' align='left'>\n";
  485. echo " <input style='width: 80%;' class='formfld' style='' type='text' name='user_first_name' maxlength='255' value=\"$user_first_name\"> <span class='smalltext'>vcard</span>\n";
  486. echo "<br />\n";
  487. echo "\n";
  488. echo "</td>\n";
  489. echo "</tr>\n";
  490. echo "<tr>\n";
  491. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  492. echo " Last Name:\n";
  493. echo "</td>\n";
  494. echo "<td class='vtable' align='left'>\n";
  495. echo " <input style='width: 80%;' class='formfld' type='text' name='user_last_name' maxlength='255' value=\"$user_last_name\"> <span class='smalltext'>vcard</span>\n";
  496. echo "<br />\n";
  497. echo "\n";
  498. echo "</td>\n";
  499. echo "</tr>\n";
  500. echo "<tr>\n";
  501. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  502. echo " Organization:\n";
  503. echo "</td>\n";
  504. echo "<td class='vtable' align='left'>\n";
  505. echo " <input style='width: 80%;' class='formfld' type='text' name='user_company_name' maxlength='255' value=\"$user_company_name\"> <span class='smalltext'>vcard</span>\n";
  506. echo "<br />\n";
  507. echo "\n";
  508. echo "</td>\n";
  509. echo "</tr>\n";
  510. echo "</table>\n";
  511. echo "</div>\n";
  512. echo "<b>Contact Information</b><br>";
  513. echo "<div align='center' class='' style='padding:10px;'>\n";
  514. echo "<table $tablewidth cellpadding='6' cellspacing='0'>";
  515. echo "<tr>\n";
  516. echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
  517. echo " Phone 1:\n";
  518. echo "</td>\n";
  519. echo "<td width='70%' class='vtable' align='left'>\n";
  520. echo " <input style='width: 80%;' class='formfld' type='text' name='user_phone_1' maxlength='255' value=\"$user_phone_1\"> <span class='smalltext'>vcard</span>\n";
  521. echo "<br />\n";
  522. echo "\n";
  523. echo "</td>\n";
  524. echo "</tr>\n";
  525. echo "<tr>\n";
  526. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  527. echo " Ext 1:\n";
  528. echo "</td>\n";
  529. echo "<td class='vtable' align='left'>\n";
  530. echo " <input style='width: 80%;' class='formfld' type='text' name='user_phone_1_ext' maxlength='255' value=\"$user_phone_1_ext\">\n";
  531. echo "<br />\n";
  532. echo "\n";
  533. echo "</td>\n";
  534. echo "</tr>\n";
  535. echo "<tr>\n";
  536. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  537. echo " Phone 2:\n";
  538. echo "</td>\n";
  539. echo "<td class='vtable' align='left'>\n";
  540. echo " <input style='width: 80%;' class='formfld' type='text' name='user_phone_2' maxlength='255' value=\"$user_phone_2\">\n";
  541. echo "<br />\n";
  542. echo "\n";
  543. echo "</td>\n";
  544. echo "</tr>\n";
  545. echo "<tr>\n";
  546. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  547. echo " Ext 2:\n";
  548. echo "</td>\n";
  549. echo "<td class='vtable' align='left'>\n";
  550. echo " <input style='width: 80%;' class='formfld' type='text' name='user_phone_2_ext' maxlength='255' value=\"$user_phone_2_ext\">\n";
  551. echo "<br />\n";
  552. echo "\n";
  553. echo "</td>\n";
  554. echo "</tr>\n";
  555. echo "<tr>\n";
  556. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  557. echo " Mobile:\n";
  558. echo "</td>\n";
  559. echo "<td class='vtable' align='left'>\n";
  560. echo " <input style='width: 80%;' class='formfld' type='text' name='user_phone_mobile' maxlength='255' value=\"$user_phone_mobile\"> <span class='smalltext'>vcard</span>\n";
  561. echo "<br />\n";
  562. echo "\n";
  563. echo "</td>\n";
  564. echo "</tr>\n";
  565. echo "<tr>\n";
  566. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  567. echo " FAX:\n";
  568. echo "</td>\n";
  569. echo "<td class='vtable' align='left'>\n";
  570. echo " <input style='width: 80%;' class='formfld' type='text' name='user_phone_fax' maxlength='255' value=\"$user_phone_fax\"> <span class='smalltext'>vcard</span>\n";
  571. echo "<br />\n";
  572. echo "\n";
  573. echo "</td>\n";
  574. echo "</tr>\n";
  575. echo "<tr>\n";
  576. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  577. echo " Emergency Mobile:\n";
  578. echo "</td>\n";
  579. echo "<td class='vtable' align='left'>\n";
  580. echo " <input style='width: 80%;' class='formfld' type='text' name='user_phone_emergency_mobile' maxlength='255' value=\"$user_phone_emergency_mobile\">\n";
  581. echo "<br />\n";
  582. echo "\n";
  583. echo "</td>\n";
  584. echo "</tr>\n";
  585. echo "<tr>\n";
  586. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  587. echo " Emergency Email:\n";
  588. echo "</td>\n";
  589. echo "<td class='vtable' align='left'>\n";
  590. echo " <input style='width: 80%;' class='formfld' type='text' name='user_email_emergency' maxlength='255' value=\"$user_email_emergency\">\n";
  591. echo "<br />\n";
  592. echo "\n";
  593. echo "</td>\n";
  594. echo "</tr>\n";
  595. echo "</table>\n";
  596. echo "</div>\n";
  597. echo "<b>Additional Information</b><br>";
  598. echo "<div align='center' class='' style='padding:10px;'>\n";
  599. echo "<table $tablewidth cellpadding='6' cellspacing='0'>";
  600. echo "<tr>\n";
  601. echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
  602. echo " Email:\n";
  603. echo "</td>\n";
  604. echo "<td width='70%' class='vtable' align='left'>\n";
  605. echo " <input style='width: 80%;' class='formfld' type='text' name='user_email' maxlength='255' value=\"$user_email\"> <span class='smalltext'>vcard</span>\n";
  606. echo "<br />\n";
  607. echo "\n";
  608. echo "</td>\n";
  609. echo "</tr>\n";
  610. echo "<tr>\n";
  611. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  612. echo " URL:\n";
  613. echo "</td>\n";
  614. echo "<td class='vtable' align='left'>\n";
  615. echo " <input style='width: 80%;' class='formfld' type='text' name='user_url' maxlength='255' value=\"$user_url\"> <span class='smalltext'>vcard</span>\n";
  616. echo "<br />\n";
  617. echo "\n";
  618. echo "</td>\n";
  619. echo "</tr>\n";
  620. echo "<tr>\n";
  621. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  622. echo " Notes:\n";
  623. echo "</td>\n";
  624. echo "<td class='vtable' align='left'>\n";
  625. echo " <textarea style='width: 80%;' class='formfld' type='text' name='user_notes' rows='5'>$user_notes</textarea> <span class='smalltext'>vcard</span>\n";
  626. echo "<br />\n";
  627. echo "\n";
  628. echo "</td>\n";
  629. echo "</tr>\n";
  630. //echo "<tr>\n";
  631. //echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  632. //echo " Optional 1:\n";
  633. //echo "</td>\n";
  634. //echo "<td class='vtable' align='left'>\n";
  635. //echo " <input style='width: 80%;' class='formfld' type='text' name='user_optional_1' maxlength='255' value=\"$user_optional_1\">\n";
  636. //echo "<br />\n";
  637. //echo "\n";
  638. //echo "</td>\n";
  639. //echo "</tr>\n";
  640. //echo "<tr>\n";
  641. //echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  642. //echo " Optional 1:\n";
  643. //echo "</td>\n";
  644. //echo "<td class='vtable' align='left'>\n";
  645. //echo " <input style='width: 80%;' class='formfld' type='text' name='user_optional_2' maxlength='255' value=\"$user_optional_2\">\n";
  646. //echo "<br />\n";
  647. //echo "\n";
  648. //echo "</td>\n";
  649. //echo "</tr>\n";
  650. echo "</table>\n";
  651. echo "</div>\n";
  652. echo "</td>\n";
  653. echo "<td valign='top'>\n";
  654. echo "<b>Physical Address</b><br>";
  655. echo "<div align='center' class='' style='padding:10px;'>\n";
  656. echo "<table $tablewidth cellpadding='6' cellspacing='0'>";
  657. echo "<tr>\n";
  658. echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
  659. echo " Address 1:\n";
  660. echo "</td>\n";
  661. echo "<td width='70%' class='vtable' align='left'>\n";
  662. echo " <input style='width: 80%;' class='formfld' type='text' name='user_physical_address_1' maxlength='255' value=\"$user_physical_address_1\"> <span class='smalltext'>vcard</span>\n";
  663. echo "<br />\n";
  664. echo "\n";
  665. echo "</td>\n";
  666. echo "</tr>\n";
  667. echo "<tr>\n";
  668. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  669. echo " Address 2:\n";
  670. echo "</td>\n";
  671. echo "<td class='vtable' align='left'>\n";
  672. echo " <input style='width: 80%;' class='formfld' type='text' name='user_physical_address_2' maxlength='255' value=\"$user_physical_address_2\"> <span class='smalltext'>vcard</span>\n";
  673. echo "<br />\n";
  674. echo "\n";
  675. echo "</td>\n";
  676. echo "</tr>\n";
  677. echo "<tr>\n";
  678. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  679. echo " City:\n";
  680. echo "</td>\n";
  681. echo "<td class='vtable' align='left'>\n";
  682. echo " <input style='width: 80%;' class='formfld' type='text' name='user_physical_city' maxlength='255' value=\"$user_physical_city\"> <span class='smalltext'>vcard</span>\n";
  683. echo "<br />\n";
  684. echo "\n";
  685. echo "</td>\n";
  686. echo "</tr>\n";
  687. echo "<tr>\n";
  688. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  689. echo " State/Province:\n";
  690. echo "</td>\n";
  691. echo "<td class='vtable' align='left'>\n";
  692. echo " <input style='width: 80%;' class='formfld' type='text' name='user_physical_state_province' maxlength='255' value=\"$user_physical_state_province\"> <span class='smalltext'>vcard</span>\n";
  693. echo "<br />\n";
  694. echo "\n";
  695. echo "</td>\n";
  696. echo "</tr>\n";
  697. echo "<tr>\n";
  698. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  699. echo " Postal Code:\n";
  700. echo "</td>\n";
  701. echo "<td class='vtable' align='left'>\n";
  702. echo " <input style='width: 80%;' class='formfld' type='text' name='user_physical_postal_code' maxlength='255' value=\"$user_physical_postal_code\"> <span class='smalltext'>vcard</span>\n";
  703. echo "<br />\n";
  704. echo "\n";
  705. echo "</td>\n";
  706. echo "</tr>\n";
  707. echo "<tr>\n";
  708. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  709. echo " Country:\n";
  710. echo "</td>\n";
  711. echo "<td class='vtable' align='left'>\n";
  712. echo " <input style='width: 80%;' class='formfld' type='text' name='user_physical_country' maxlength='255' value=\"$user_physical_country\"> <span class='smalltext'>vcard</span>\n";
  713. echo "<br />\n";
  714. echo "\n";
  715. echo "</td>\n";
  716. echo "</tr>\n";
  717. echo "</table>\n";
  718. echo "</div>\n";
  719. echo "<b>Postal Address</b><br>";
  720. echo "<div align='center' class='' style='padding:10px;'>\n";
  721. echo "<table $tablewidth cellpadding='6' cellspacing='0'>";
  722. echo "<tr>\n";
  723. echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
  724. echo " Address 1:\n";
  725. echo "</td>\n";
  726. echo "<td width='70%' class='vtable' align='left'>\n";
  727. echo " <input style='width: 80%;' class='formfld' type='text' name='user_mailing_address_1' maxlength='255' value=\"$user_mailing_address_1\">\n";
  728. echo "<br />\n";
  729. echo "\n";
  730. echo "</td>\n";
  731. echo "</tr>\n";
  732. echo "<tr>\n";
  733. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  734. echo " Address 2:\n";
  735. echo "</td>\n";
  736. echo "<td class='vtable' align='left'>\n";
  737. echo " <input style='width: 80%;' class='formfld' type='text' name='user_mailing_address_2' maxlength='255' value=\"$user_mailing_address_2\">\n";
  738. echo "<br />\n";
  739. echo "\n";
  740. echo "</td>\n";
  741. echo "</tr>\n";
  742. echo "<tr>\n";
  743. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  744. echo " City:\n";
  745. echo "</td>\n";
  746. echo "<td class='vtable' align='left'>\n";
  747. echo " <input style='width: 80%;' class='formfld' type='text' name='user_mailing_city' maxlength='255' value=\"$user_mailing_city\">\n";
  748. echo "<br />\n";
  749. echo "\n";
  750. echo "</td>\n";
  751. echo "</tr>\n";
  752. echo "<tr>\n";
  753. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  754. echo " State/Province:\n";
  755. echo "</td>\n";
  756. echo "<td class='vtable' align='left'>\n";
  757. echo " <input style='width: 80%;' class='formfld' type='text' name='user_mailing_state_province' maxlength='255' value=\"$user_mailing_state_province\">\n";
  758. echo "<br />\n";
  759. echo "\n";
  760. echo "</td>\n";
  761. echo "</tr>\n";
  762. echo "<tr>\n";
  763. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  764. echo " Postal Code:\n";
  765. echo "</td>\n";
  766. echo "<td class='vtable' align='left'>\n";
  767. echo " <input style='width: 80%;' class='formfld' type='text' name='user_mailing_postal_code' maxlength='255' value=\"$user_mailing_postal_code\">\n";
  768. echo "<br />\n";
  769. echo "\n";
  770. echo "</td>\n";
  771. echo "</tr>\n";
  772. echo "<tr>\n";
  773. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  774. echo " Country:\n";
  775. echo "</td>\n";
  776. echo "<td class='vtable' align='left'>\n";
  777. echo " <input style='width: 80%;' class='formfld' type='text' name='user_mailing_country' maxlength='255' value=\"$user_mailing_country\">\n";
  778. echo "<br />\n";
  779. echo "\n";
  780. echo "</td>\n";
  781. echo "</tr>\n";
  782. echo "</table>\n";
  783. echo "</div>\n";
  784. echo "<b>Billing Address</b><br>";
  785. echo "<div align='center' class='' style='padding:10px;'>\n";
  786. echo "<table $tablewidth cellpadding='6' cellspacing='0'>";
  787. echo "<tr>\n";
  788. echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
  789. echo " Address 1:\n";
  790. echo "</td>\n";
  791. echo "<td width='70%' class='vtable' align='left'>\n";
  792. echo " <input style='width: 80%;' class='formfld' type='text' name='user_billing_address_1' maxlength='255' value=\"$user_billing_address_1\">\n";
  793. echo "<br />\n";
  794. echo "\n";
  795. echo "</td>\n";
  796. echo "</tr>\n";
  797. echo "<tr>\n";
  798. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  799. echo " Address 2:\n";
  800. echo "</td>\n";
  801. echo "<td class='vtable' align='left'>\n";
  802. echo " <input style='width: 80%;' class='formfld' type='text' name='user_billing_address_2' maxlength='255' value=\"$user_billing_address_2\">\n";
  803. echo "<br />\n";
  804. echo "\n";
  805. echo "</td>\n";
  806. echo "</tr>\n";
  807. echo "<tr>\n";
  808. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  809. echo " City:\n";
  810. echo "</td>\n";
  811. echo "<td class='vtable' align='left'>\n";
  812. echo " <input style='width: 80%;' class='formfld' type='text' name='user_billing_city' maxlength='255' value=\"$user_billing_city\">\n";
  813. echo "<br />\n";
  814. echo "\n";
  815. echo "</td>\n";
  816. echo "</tr>\n";
  817. echo "<tr>\n";
  818. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  819. echo " State/Province:\n";
  820. echo "</td>\n";
  821. echo "<td class='vtable' align='left'>\n";
  822. echo " <input style='width: 80%;' class='formfld' type='text' name='user_billing_state_province' maxlength='255' value=\"$user_billing_state_province\">\n";
  823. echo "<br />\n";
  824. echo "\n";
  825. echo "</td>\n";
  826. echo "</tr>\n";
  827. echo "<tr>\n";
  828. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  829. echo " Postal Code:\n";
  830. echo "</td>\n";
  831. echo "<td class='vtable' align='left'>\n";
  832. echo " <input style='width: 80%;' class='formfld' type='text' name='user_billing_postal_code' maxlength='255' value=\"$user_billing_postal_code\">\n";
  833. echo "<br />\n";
  834. echo "\n";
  835. echo "</td>\n";
  836. echo "</tr>\n";
  837. echo "<tr>\n";
  838. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  839. echo " Country:\n";
  840. echo "</td>\n";
  841. echo "<td class='vtable' align='left'>\n";
  842. echo " <input style='width: 80%;' class='formfld' type='text' name='user_billing_country' maxlength='255' value=\"$user_billing_country\">\n";
  843. echo "<br />\n";
  844. echo "\n";
  845. echo "</td>\n";
  846. echo "</tr>\n";
  847. echo "</table>\n";
  848. echo "</div>\n";
  849. echo "<b>Shipping Address</b><br>";
  850. echo "<div align='center' class='' style='padding:10px;'>\n";
  851. echo "<table $tablewidth cellpadding='6' cellspacing='0'>";
  852. echo "<tr>\n";
  853. echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
  854. echo " Address 1:\n";
  855. echo "</td>\n";
  856. echo "<td width='70%' class='vtable' align='left'>\n";
  857. echo " <input style='width: 80%;' class='formfld' type='text' name='user_shipping_address_1' maxlength='255' value=\"$user_shipping_address_1\">\n";
  858. echo "<br />\n";
  859. echo "\n";
  860. echo "</td>\n";
  861. echo "</tr>\n";
  862. echo "<tr>\n";
  863. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  864. echo " Address 2:\n";
  865. echo "</td>\n";
  866. echo "<td class='vtable' align='left'>\n";
  867. echo " <input style='width: 80%;' class='formfld' type='text' name='user_shipping_address_2' maxlength='255' value=\"$user_shipping_address_2\">\n";
  868. echo "<br />\n";
  869. echo "\n";
  870. echo "</td>\n";
  871. echo "</tr>\n";
  872. echo "<tr>\n";
  873. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  874. echo " City:\n";
  875. echo "</td>\n";
  876. echo "<td class='vtable' align='left'>\n";
  877. echo " <input style='width: 80%;' class='formfld' type='text' name='user_shipping_city' maxlength='255' value=\"$user_shipping_city\">\n";
  878. echo "<br />\n";
  879. echo "\n";
  880. echo "</td>\n";
  881. echo "</tr>\n";
  882. echo "<tr>\n";
  883. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  884. echo " State/Province:\n";
  885. echo "</td>\n";
  886. echo "<td class='vtable' align='left'>\n";
  887. echo " <input style='width: 80%;' class='formfld' type='text' name='user_shipping_state_province' maxlength='255' value=\"$user_shipping_state_province\">\n";
  888. echo "<br />\n";
  889. echo "\n";
  890. echo "</td>\n";
  891. echo "</tr>\n";
  892. echo "<tr>\n";
  893. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  894. echo " Postal Code:\n";
  895. echo "</td>\n";
  896. echo "<td class='vtable' align='left'>\n";
  897. echo " <input style='width: 80%;' class='formfld' type='text' name='user_shipping_postal_code' maxlength='255' value=\"$user_shipping_postal_code\">\n";
  898. echo "<br />\n";
  899. echo "\n";
  900. echo "</td>\n";
  901. echo "</tr>\n";
  902. echo "<tr>\n";
  903. echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  904. echo " Country:\n";
  905. echo "</td>\n";
  906. echo "<td class='vtable' align='left'>\n";
  907. echo " <input style='width: 80%;' class='formfld' type='text' name='user_shipping_country' maxlength='255' value=\"$user_shipping_country\">\n";
  908. echo "<br />\n";
  909. echo "\n";
  910. echo "</td>\n";
  911. echo "</tr>\n";
  912. echo "</table>\n";
  913. echo "</div>\n";
  914. echo "</td>\n";
  915. echo "</tr>\n";
  916. echo "</table>\n";
  917. //echo "<tr>\n";
  918. //echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  919. //echo " Add User:\n";
  920. //echo "</td>\n";
  921. //echo "<td class='vtable' align='left'>\n";
  922. //echo " <input style='width: 80%;' class='formfld' type='text' name='user_add_user' maxlength='255' value=\"$user_add_user\">\n";
  923. //echo "<br />\n";
  924. //echo "\n";
  925. //echo "</td>\n";
  926. //echo "</tr>\n";
  927. //echo "<tr>\n";
  928. //echo "<td class='vncell' valign='top' align='left' nowrap>\n";
  929. //echo " Add Date:\n";
  930. //echo "</td>\n";
  931. //echo "<td class='vtable' align='left'>\n";
  932. //echo " <input style='width: 80%;' class='formfld' type='text' name='user_add_date' maxlength='255' value=\"$user_add_date\">\n";
  933. //echo "<br />\n";
  934. //echo "\n";
  935. //echo "</td>\n";
  936. //echo "</tr>\n";
  937. echo " <tr>\n";
  938. echo " <td colspan='2' align='right'>\n";
  939. if ($action == "update") {
  940. echo " <input type='hidden' name='id' value='$user_uuid'>\n";
  941. }
  942. echo " <input type='submit' name='submit' class='btn' value='Save'>\n";
  943. echo " </td>\n";
  944. echo " </tr>";
  945. echo "</table>";
  946. echo "</form>";
  947. echo " </td>";
  948. echo " </tr>";
  949. echo "</table>";
  950. echo "</div>";
  951. echo "<br />\n";
  952. echo "<br />\n";
  953. //show the footer
  954. require_once "resources/footer.php";
  955. ?>