PageRenderTime 65ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 1ms

/_tmp/detail_working.php

https://github.com/tlezotte/ePOS
PHP | 1744 lines | 1487 code | 83 blank | 174 comment | 190 complexity | 8d8320af4f046800a1b83823213fa23d MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. /**
  3. * Request System
  4. *
  5. * detail.php displays detailed information on PO.
  6. *
  7. * @version 1.5
  8. * @link http://www.yourdomain.com/go/Request/
  9. * @author Thomas LeZotte (tom@lezotte.net)
  10. *
  11. * @package PO
  12. * @filesource
  13. *
  14. * PHP Debug
  15. * @link http://phpdebug.sourceforge.net/
  16. * PDF Toolkit
  17. * @link http://www.accesspdf.com/
  18. */
  19. /**
  20. * - Forward BlackBerry users to BlackBerry version
  21. */
  22. require_once('../include/BlackBerry.php');
  23. /**
  24. * - Start Page Loading Timer
  25. */
  26. include_once('../include/Timer.php');
  27. $starttime = StartLoadTimer();
  28. /**
  29. * - Set debug mode
  30. */
  31. $debug_page = false;
  32. include_once('debug/header.php');
  33. /**
  34. * - Database Connection
  35. */
  36. require_once('../Connections/connDB.php');
  37. /**
  38. * - Config Information
  39. */
  40. require_once('../include/config.php');
  41. /**
  42. * - Check User Access
  43. */
  44. require_once('../security/check_user.php');
  45. /**
  46. * - Form Validation
  47. */
  48. //include('vdaemon/vdaemon.php');
  49. /* -------------------------------------------------------------
  50. * ---------- START DENIAL PROCESSING --------------------------
  51. * -------------------------------------------------------------
  52. */
  53. if (substr($_POST['auth'],0,3) == 'app' OR $_POST['auth'] == 'controller') {
  54. if (array_key_exists('yes_x', $_POST)) { $yn = "yes"; } // Set approval button pressed
  55. if (array_key_exists('no_x', $_POST)) { $yn = "no"; } // Set approval button pressed
  56. /* ---------------- Check to see if a Comment was provided ---------------- */
  57. if (empty($_POST['Com']) AND $yn == 'no') {
  58. $_SESSION['error'] = "A denied Requisition requires you to enter a Comment.";
  59. $_SESSION['redirect'] = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
  60. header("location: ../error.php");
  61. exit();
  62. }
  63. /* ---------------- Change status for non approved request ---------------- */
  64. if ($yn == 'no') {
  65. setRequestStatus($_POST['type_id'], 'X'); // Update PO status
  66. }
  67. /* ---------------- Update the approvals for the PO ---------------- */
  68. $dbh->query("UPDATE Authorization
  69. SET ".$_POST['auth']."yn='" . $yn . "',
  70. ".$_POST['auth']."Date=NOW(),
  71. ".$_POST['auth']."Com='" . htmlentities($_POST['Com'], ENT_QUOTES, 'UTF-8') . "'
  72. WHERE id = ".$_POST['auth_id']);
  73. if ($_POST['auth'] == 'controller') {
  74. $forward = "router.php?type_id=" . $_POST['type_id'] . "&approval=app0"; // Forward to Approver 1
  75. } else {
  76. $forward = "router.php?type_id=" . $_POST['type_id'] . "&approval=" . $_POST['auth'] . "&yn=" . $yn; // Record Controllers Approval
  77. }
  78. header("Location: ".$forward);
  79. exit();
  80. }
  81. /* -------------------------------------------------------------
  82. * ---------- END DENIAL PROCESSING ----------------------------
  83. * -------------------------------------------------------------
  84. */
  85. /* -------------------------------------------------------------
  86. * ------------- START FINANCE PROCESSING -------------------
  87. * -------------------------------------------------------------
  88. */
  89. if ($_POST['action'] == 'finance_update') {
  90. /* ----- Controller changes Plant ----- */
  91. if ($_POST['currentPlant'] != $_POST['plant']) {
  92. $sql = "UPDATE PO SET plant='" . $_POST['plant'] . "' WHERE id=" . $_POST['type_id']; // Update Bill to Plant
  93. $dbh->query($sql);
  94. if ($default['debug_capture'] == 'on') {
  95. debug_capture($_SESSION['eid'], $_POST['id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql))); // Record transaction for history
  96. }
  97. $forward = "router.php?type_id=" . $_POST['type_id'] . "&approval=controller&plant=" . $_POST['plant'] . "&department=" . $_POST['department']; // Check Controler
  98. /* ----- Controller changes Department ----- */
  99. } elseif ($_POST['currentDepartment'] != $_POST['department']) {
  100. $sql = "UPDATE PO SET department='" . $_POST['department'] . "' WHERE id=" . $_POST['type_id']; // Update Department
  101. $dbh->query($sql);
  102. if ($default['debug_capture'] == 'on') {
  103. debug_capture($_SESSION['eid'], $_POST['id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql))); // Record transaction for history
  104. }
  105. $forward = "router.php?type_id=" . $_POST['type_id'] . "&approval=controller&plant=" . $_POST['plant'] . "&department=" . $_POST['department']; // Check Controler
  106. }
  107. /* ----- Cycle through items ----- */
  108. for ($x=1; $x <= $_POST['items_count']; $x++) {
  109. $item = "item" . $x; // Item ID
  110. $item_COA = $item . "_newCOA"; // COA value
  111. $item_COAid = $item_COA . "id"; // COA value ID
  112. if (strlen($_POST[$item_COAid]) > 0) {
  113. $sql = "UPDATE Items SET cat='" . $_POST[$item_COAid] . "' WHERE id=" . $_POST[$item];
  114. $dbh->query($sql);
  115. }
  116. if ($default['debug_capture'] == 'on') {
  117. debug_capture($_SESSION['eid'], $_POST['id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql))); // Record transaction for history
  118. }
  119. }
  120. /* ----- Update CER numbers and Credit Card ----- */
  121. $dbh->query("UPDATE PO SET cer='" . $_POST['cer'] . "',
  122. creditcard='" . $_POST['creditcard'] . "'
  123. WHERE id=" . $_POST['type_id']);
  124. }
  125. /* -------------------------------------------------------------
  126. * ------------- END FINANCE PROCESSING -------------------
  127. * -------------------------------------------------------------
  128. */
  129. /* -------------------------------------------------------------
  130. * ------------- START UPDATE PROCESSING -----------------------
  131. * -------------------------------------------------------------
  132. */
  133. if ($_POST['stage'] == "update") {
  134. /* -------------------------------------------------------------
  135. * ---------- START REQUESTER PROCESSING -----------------------
  136. * -------------------------------------------------------------
  137. */
  138. if ($_POST['auth'] == "req") {
  139. /* ---------------- START CANCEL PURCHASE ORDER -------------- */
  140. if ($_POST['cancel'] == 'yes') {
  141. setRequestStatus($_POST['type_id'], 'C'); // Update PO status
  142. header("location: list.php?action=my&access=0");
  143. exit();
  144. }
  145. /* --------- END CANCEL PURCHASE ORDER ----------------------- */
  146. /* ---------------- START COPY PURCHASE ORDER ---------------- */
  147. // if (array_key_exists('copyrequest_x',$_POST)) {
  148. // /* Getting PO information */
  149. // $PO = $dbh->getRow("SELECT *, DATE_FORMAT(reqDate,'%M %e, %Y') AS _reqDate
  150. // FROM PO
  151. // WHERE id = ?",array($_POST['type_id']));
  152. //
  153. // /* -- Read $PO into $_SESSION -- */
  154. // foreach ($PO as $key => $value) {
  155. // $_SESSION[$key] = $value;
  156. // }
  157. //
  158. // header("location: information.php");
  159. // exit();
  160. // }
  161. /* --------- END COPY PURCHASE ORDER ----------------------- */
  162. /* ---------------- START RESEND PURCHASE ORDER ---------------- */
  163. if (array_key_exists('restorerequest_x',$_POST)) {
  164. setRequestStatus($_POST['type_id'], 'N'); // Update PO status
  165. header("location: router.php?type_id=" . $_POST['type_id'] . "&approval=app0"); // Forward to router as new Request
  166. exit();
  167. }
  168. /* --------- END RESEND PURCHASE ORDER ----------------------- */
  169. }
  170. /* -------------------------------------------------------------
  171. * ---------- END REQUESTER PROCESSING -----------------------
  172. * -------------------------------------------------------------
  173. */
  174. }
  175. /* -------------------------------------------------------------
  176. * ------------- END UPDATE PROCESSING -----------------------
  177. * -------------------------------------------------------------
  178. */
  179. /* -------------------------------------------------------------
  180. * ------------- START PURCHASING PROCESSING -------------------
  181. * -------------------------------------------------------------
  182. */
  183. if ($_POST['action'] == 'purchasing_update') {
  184. /* ------------- Adding supplier contact information ------------- */
  185. if (array_key_exists('addContact_x',$_POST)) {
  186. $sql = "INSERT INTO Contacts VALUES (NULL,
  187. '" . $_POST['id'] . "',
  188. '" . $_SESSION['eid'] . "',
  189. NOW(),
  190. '" . $_POST['cc_name'] . "',
  191. '" . $_POST['cc_phone'] . "',
  192. '" . $_POST['cc_ext'] . "',
  193. '" . $_POST['cc_email'] . "'
  194. )";
  195. $dbh->query($sql);
  196. header("location: " . $_SERVER['PHP_SELF'] . "?id=" . $_POST['id']);
  197. exit();
  198. }
  199. /* ------------- Adding payment information ------------- */
  200. if (array_key_exists('addPayment_x',$_POST)) {
  201. $sql = "INSERT INTO Payments VALUES (NULL,
  202. '" . $_POST['id'] . "',
  203. '" . $_SESSION['eid'] . "',
  204. NOW(),
  205. '" . mysql_real_escape_string($_POST['pay_amount']) . "',
  206. '" . mysql_real_escape_string($_POST['paymentDate']) . "',
  207. '0')";
  208. $dbh->query($sql);
  209. header("location: " . $_SERVER['PHP_SELF'] . "?id=" . $_POST['id']);
  210. exit();
  211. }
  212. /* ------------- Update payment information ------------- */
  213. if (array_key_exists('updatePayments_x',$_POST)) {
  214. for ($i=1; $i <= $_POST['payments_count']; $i++) {
  215. $pay_id = "pay_id" . $i;
  216. $pay_amount = "pay_amount" . $i;
  217. $pay_date = "pay_date" . $i;
  218. $pay_remove = "pay_remove" . $i;
  219. $pay_status = ($_POST[$pay_remove] == 'yes') ? 1 : 0;
  220. $sql = "UPDATE Payments SET pay_eid = '" . $_SESSION['eid'] . "',
  221. pay_recorded = NOW(),
  222. pay_amount = '" . mysql_real_escape_string($_POST[$pay_amount]) . "',
  223. pay_date = '" . mysql_real_escape_string($_POST[$pay_date]) . "',
  224. pay_status = '" . $pay_status . "'
  225. WHERE pay_id = " . $_POST[$pay_id];
  226. $dbh->query($sql);
  227. }
  228. header("location: " . $_SERVER['PHP_SELF'] . "?id=" . $_POST['id']);
  229. exit();
  230. }
  231. /* ------------- Purchaser marks Request as Complete ------------- */
  232. if (array_key_exists('completed_x',$_POST)) {
  233. /* Record Purchasing agent */
  234. $auth_sql = "UPDATE Authorization SET issuer='" . $_SESSION['eid'] . "',
  235. issuerDate=NOW(),
  236. level='O'
  237. WHERE id = " . $_POST['auth_id'];
  238. $dbh->query($auth_sql);
  239. /* Update Request Status */
  240. $po_sql = "UPDATE PO SET po='" . $_POST['po'] . "',
  241. status='O'
  242. WHERE id = " . $_POST['id'];
  243. $dbh->query($po_sql);
  244. sendCompleted($_POST['req'],$_POST['id'],htmlspecialchars($_POST['purpose']),$_POST['po'], $_SESSION['eid']); // Send email to Requester
  245. //sendVendor($_POST['id']);
  246. header("location: " . $_SERVER['PHP_SELF'] . "?id=" . $_POST['id']);
  247. exit();
  248. }
  249. /* ------------- Add Vendor and change Terms when Purchasing changes Vendor ------------- */
  250. if (strlen($_POST['vendSearch']) > 0) {
  251. $supplier2 = "sup2='" . $_POST['supplierNew'] . "',";
  252. $supplier2 .= "terms='" . $_POST['supplierNewTerms'] . "',";
  253. } else {
  254. $supplier2 = "terms='".$_POST['terms']."',";
  255. }
  256. /* ------------- Creating update fields ------------- */
  257. $PO = "fob='".$_POST['fob']."',
  258. via='".$_POST['via']."',
  259. purchaseUpdate=NOW(),
  260. reqType='".$_POST['reqtype']."',
  261. $supplier2
  262. private='".$_POST['private']."',
  263. hot='".$_POST['hot']."'
  264. ";
  265. $sql = "UPDATE PO SET $PO WHERE id = ".$_POST['id'];
  266. $dbh->query($sql);
  267. History($_SESSION['eid'], 'update', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql))); // Record transaction for history
  268. header("location: " . $_SERVER['PHP_SELF'] . "?id=" . $_POST['id']);
  269. exit();
  270. }
  271. /* -------------------------------------------------------------
  272. * ------------- END PURCHASING PROCESSING -------------------
  273. * -------------------------------------------------------------
  274. */
  275. /* -------------------------------------------------------------
  276. * ------------- START DATABASE CONNECTIONS -------------------
  277. * -------------------------------------------------------------
  278. */
  279. /* ------------- Getting PO information ------------- */
  280. $PO = $dbh->getRow("SELECT *, DATE_FORMAT(reqDate,'%M %e, %Y') AS _reqDate
  281. FROM PO
  282. WHERE id = ?",array($_GET['id']));
  283. /* ------------- Getting Authoriztions for above PO ------------- */
  284. $AUTH = $dbh->getRow("SELECT * FROM Authorization WHERE type_id = ? and type = 'PO'",array($PO['id']));
  285. /* ------------- Get Employee names from Standards database ------------- */
  286. $EMPLOYEES = $dbh->getAssoc("SELECT eid, CONCAT(fst,' ',lst) AS name
  287. FROM Standards.Employees");
  288. /* ------------- Getting Vendor information from Standards ------------- */
  289. $VENDOR = $dbh->getAssoc("SELECT BTVEND, BTNAME FROM Standards.Vendor");
  290. /* ------------- Getting Company information from Standards ------------- */
  291. //$COMPANY = $dbh->getAssoc("SELECT id, name FROM Standards.Companies");
  292. /* ------------- Getting Plant information from Standards ------------- */
  293. $plant_sql = "SELECT id, name FROM Standards.Plants WHERE status = '0'";
  294. $PLANTS = $dbh->getAssoc($plant_sql);
  295. $plant_query = $dbh->prepare($plant_sql);
  296. $PLANT = $dbh->getRow("SELECT * FROM Standards.Plants WHERE id=" . $PO['plant']);
  297. /* ------------- Getting Department information from Standards ------------- */
  298. $dept_sql = "SELECT id, CONCAT('(',id,') ',name) AS fullname FROM Standards.Department WHERE status='0' ORDER BY name";
  299. $DEPARTMENT = $dbh->getAssoc($dept_sql);
  300. $dept_query = $dbh->prepare($dept_sql);
  301. /* ------------- Getting Category information from Standards ------------- */
  302. $COA = $dbh->getAssoc("SELECT CONCAT(coa_account,'-',coa_suffix) AS id, coa_description AS name
  303. FROM Standards.COA
  304. WHERE coa_plant=" . $PLANT['conbr']);
  305. /* ------------- Getting CER numbers from CER ------------- */
  306. $cer_sql = "SELECT id, cer FROM CER WHERE cer IS NOT NULL ORDER BY cer+0";
  307. $CER = $dbh->getAssoc($cer_sql);
  308. $cer_query = $dbh->prepare($cer_sql);
  309. /* ------------- Getting Vendor terms from Standards ------------- */
  310. $terms_sql = "SELECT terms_id AS id, terms_name AS name FROM Standards.VendorTerms ORDER BY name";
  311. $TERMS = $dbh->getAssoc($terms_sql);
  312. $terms_query = $dbh->prepare($terms_sql);
  313. /* ------------- Get items related to this Request -------------*/
  314. $items_sql = "SELECT * FROM Items WHERE type_id = ".$PO['id'];
  315. $items_query = $dbh->prepare($items_sql);
  316. $items_sth = $dbh->execute($items_query);
  317. $items_count = $items_sth->numRows();
  318. /* ------------- Get Purchase Request users ------------- */
  319. $purchaser_sql = $dbh->prepare("SELECT U.eid, E.fst, E.lst, E.email
  320. FROM Users U
  321. INNER JOIN Standards.Employees E ON U.eid = E.eid
  322. WHERE U.role = 'purchasing'
  323. AND E.status = '0'
  324. AND U.eid <> '08745'
  325. ORDER BY E.lst ASC");
  326. /* ------------- Get Purchase Request users ------------- */
  327. $financer_sql = $dbh->prepare("SELECT U.eid, E.fst, E.lst, E.email
  328. FROM Users U
  329. INNER JOIN Standards.Employees E ON U.eid = E.eid
  330. WHERE U.role = 'financing'
  331. AND E.status = '0'
  332. AND U.eid <> '08745'
  333. ORDER BY E.lst ASC");
  334. /* ------------- Get Vendor Payments ------------- */
  335. $payments = $dbh->query("SELECT * FROM Payments WHERE request_id=" . $PO['id'] . " AND pay_status='0' ORDER BY pay_date ASC");
  336. $payments_count = $payments->numRows();
  337. /* ------------- Get Contact Information ------------- */
  338. $contacts = $dbh->query("SELECT * FROM Contacts WHERE request_id=" . $PO['id'] . " ORDER BY id DESC");
  339. $contacts_count = $contacts->numRows();
  340. /* ------------- Getting Comments Information ------------- */
  341. $post_sql = "SELECT * FROM Postings
  342. WHERE request_id = ".$_GET['id']."
  343. AND type = 'global'
  344. ORDER BY posted DESC";
  345. $LAST_POST = $dbh->getRow($post_sql); // Get the last posted comment
  346. $post_query = $dbh->prepare($post_sql);
  347. $post_sth = $dbh->execute($post_query);
  348. $post_count = $post_sth->numRows();
  349. /* -------------------------------------------------------------
  350. * ------------- END DATABASE CONNECTIONS -------------------
  351. * -------------------------------------------------------------
  352. */
  353. /* -------------------------------------------------------------
  354. * ------------- START VARIABLES -------------------------------
  355. * -------------------------------------------------------------
  356. */
  357. /* ------------- Check current level and current user ------------- */
  358. if (array_key_exists('approval', $_GET)) {
  359. if ($PO['status'] != 'N') {
  360. switch ($PO['status']) {
  361. case 'C': $message="This Requisition has been marked Canceled."; break;
  362. case 'X': $message="This Requisition has been marked Not Approved."; break;
  363. case 'A': $message="This Requisition has been already Approved."; break;
  364. case 'O': $message="This Requisition has been Kicked off to the Vendor."; break;
  365. }
  366. unset($_GET['approval']);
  367. } elseif ($_GET['approval'] != $AUTH['level']) {
  368. $message="This Requisition is currently not at your approval level.";
  369. unset($_GET['approval']);
  370. } elseif ($_GET['approval'] == $AUTH['level'] AND $AUTH[$_GET['approval']] == $_SESSION['eid']) {
  371. $_GET['approval'] = $_GET['approval'];
  372. }
  373. }
  374. /* ------------- Set message for Message Center ------------- */
  375. switch ($_GET['approval']) {
  376. // case 'controller': $message="Finance can edit the Finance area and fields highlighted in <span style=\"color:#009900;\">GREEN</span>."; break;
  377. }
  378. $highlight='class="highlight"'; // Highlighted style sheet class
  379. /* ------------- Set items display mode ------------- */
  380. if ($_GET['approval'] == 'controller') {
  381. $displayItem = "display"; // Display Items detail
  382. } else {
  383. $displayItem = "none"; // Don't display Items detail
  384. }
  385. /* -------------------------------------------------------------
  386. * ------------- END VARIABLES -------------------------------
  387. * -------------------------------------------------------------
  388. */
  389. /**
  390. * - Display attachments from V3
  391. */
  392. include_once('attachment.php');
  393. /* ------------- Setup onLoad javascript program ------------- */
  394. if ($default['pageloading'] == 'on') {
  395. $ONLOAD_OPTIONS="pageloading();";
  396. }
  397. $ONLOAD_OPTIONS.="function() {
  398. new Effect.Pulsate('hotMessage', {delay:2, duration:5});
  399. new Effect.Pulsate('messageCenter', {delay:2, duration:5});
  400. }";
  401. if (isset($ONLOAD_OPTIONS)) { $ONLOAD="onLoad=\"$ONLOAD_OPTIONS\""; }
  402. ?>
  403. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  404. <html><!-- InstanceBegin template="/Templates/vnmain.dwt.php" codeOutsideHTMLIsLocked="false" -->
  405. <head>
  406. <!-- InstanceBeginEditable name="doctitle" -->
  407. <title><?= $default['title1']; ?></title>
  408. <!-- InstanceEndEditable -->
  409. <meta http-equiv="imagetoolbar" content="no">
  410. <meta name="copyright" content="2004 Your Company" />
  411. <meta name="author" content="Thomas LeZotte" />
  412. <link type="text/css" href="/Common/Print.css" rel="stylesheet" media="print">
  413. <link type="text/css" href="../default.css" charset="UTF-8" rel="stylesheet">
  414. <?php if ($default['rss'] == 'on') { ?>
  415. <link rel="alternate" type="application/rss+xml" title="Purchase Requisition Announcements" href="<?= $default['URL_HOME']; ?>/PO/<?= $default['rss_file']; ?>">
  416. <link rel="alternate" type="application/rss+xml" title="Capital Acquisition Announcements" href="<?= $default['URL_HOME']; ?>/CER/<?= $default['rss_file']; ?>">
  417. <?php } ?>
  418. <script type="text/javascript" src="/Common/js/overlibmws.js"></script>
  419. <!-- InstanceBeginEditable name="head" -->
  420. <script type="text/javascript" src="/Common/js/yahoo/yahoo/yahoo.js"></script>
  421. <script type="text/javascript" src="/Common/js/yahoo/event/event.js" ></script>
  422. <script type="text/javascript" src="/Common/js/yahoo/dom/dom.js" ></script>
  423. <script type="text/javascript" src="/Common/js/yahoo/animation/animation.js" ></script>
  424. <script type="text/javascript" src="/Common/js/yahoo/connection/connection.js" ></script>
  425. <script type="text/javascript" src="/Common/js/yahoo/container/container.js"></script>
  426. <link type="text/css" rel="stylesheet" href="/Common/js/yahoo/container/assets/container.css">
  427. <SCRIPT type="text/javascript" SRC="/Common/js/overlibmws/overlibmws_exclusive.js"></SCRIPT>
  428. <SCRIPT type="text/javascript" SRC="/Common/js/overlibmws/overlibmws_draggable.js"></SCRIPT>
  429. <SCRIPT type="text/javascript" SRC="/Common/js/overlibmws/calendarmws.js"></SCRIPT>
  430. <script type="text/javascript" src="/Common/js/scriptaculous/prototype.js"></script>
  431. <script type="text/javascript" src="/Common/js/scriptaculous/scriptaculous.js?load=effects"></script>
  432. <script type="text/javascript" src="/Common/js/ps/treasure.js"></script>
  433. <script type="text/javascript" src="/Common/js/autoassist/autoassist.js"></script>
  434. <link href="/Common/js/autoassist/autoassist.css" rel="stylesheet" type="text/css">
  435. <script type="text/javascript" src="/Common/js/greybox5/options1.js"></script>
  436. <script type="text/javascript" src="/Common/js/greybox5/AJS.js"></script>
  437. <script type="text/javascript" src="/Common/js/greybox5/AJS_fx.js"></script>
  438. <script type="text/javascript" src="/Common/js/greybox5/gb_scripts.js"></script>
  439. <link type="text/css" href="/Common/js/greybox5/gb_styles.css" rel="stylesheet" media="all">
  440. <script language="javascript">
  441. function toggleItemDisplay(id) {
  442. $R(1, <?= $items_count+1; ?>, true).each(function(s) {
  443. $('itemDetails' + s).toggle();
  444. });
  445. }
  446. </script>
  447. <script>
  448. YAHOO.namespace("example.container");
  449. function init() {
  450. // Define various event handlers for Dialog
  451. var handleYes = function() {
  452. document.Form.submit();
  453. this.hide();
  454. };
  455. var handleNo = function() {
  456. this.hide();
  457. };
  458. // Instantiate the Dialog
  459. YAHOO.example.container.simpledialog1 = new YAHOO.widget.SimpleDialog("simpledialog1",
  460. { width: "325px",
  461. fixedcenter: true,
  462. visible: false,
  463. draggable: false,
  464. modal: true,
  465. close: true,
  466. text: "Do you want to change, this may change the Financial Controller?",
  467. icon: YAHOO.widget.SimpleDialog.ICON_WARN,
  468. constraintoviewport: true,
  469. buttons: [ { text:"Yes", handler:handleYes },
  470. { text:"No", handler:handleNo, isDefault:true } ]
  471. } );
  472. YAHOO.example.container.simpledialog1.setHeader("Are you sure?");
  473. // Render the Dialog
  474. YAHOO.example.container.simpledialog1.render(document.body);
  475. YAHOO.util.Event.addListener("plant", "change", YAHOO.example.container.simpledialog1.show, YAHOO.example.container.simpledialog1, true);
  476. <?php
  477. /* ----- Only display department change dialog for HQ(9) ----- */
  478. if ($PO['plant'] == '9') {
  479. ?>
  480. YAHOO.util.Event.addListener("department", "change", YAHOO.example.container.simpledialog1.show, YAHOO.example.container.simpledialog1, true);
  481. <?php } ?>
  482. }
  483. YAHOO.util.Event.addListener(window, "load", init);
  484. </script>
  485. <script type="text/javascript" src="../js/dynamicInputItems.js"></script>
  486. <link rel="stylesheet" type="text/css" href="<?= $default['URL_HOME']; ?>/style/dd_tabs.css" />
  487. <style type="text/css">
  488. form.inplaceeditor-form a {
  489. color:#FFFFFF;
  490. }
  491. </style>
  492. <!-- InstanceEndEditable -->
  493. <?php if ($ONLOAD_OPTIONS) { ?>
  494. <script language="javascript">
  495. AJS.AEV(window, "load", <?= $ONLOAD_OPTIONS; ?>);
  496. </script>
  497. <?php } ?>
  498. </head>
  499. <body class="yui-skin-sam">
  500. <img src="/Common/images/CompanyPrint.gif" alt="Your Company" width="437" height="61" id="Print" />
  501. <div id="noPrint">
  502. <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
  503. <tbody>
  504. <tr>
  505. <td valign="top"><a href="../home.php" title="<?= $default['title1']; ?> Home"><img name="Company" src="/Common/images/Company.gif" width="300" height="50" border="0"></a></td>
  506. <td align="right" valign="top">
  507. <!-- InstanceBeginEditable name="topRightMenu" --><!-- #BeginLibraryItem "/Library/help.lbi" --><table cellspacing="0" cellpadding="0" summary="" border="0">
  508. <tr>
  509. <td width="30"><a href="../Common/calculator.php" onClick="window.open(this.href,this.target,'width=281,height=270'); return false;" <?php help('', 'Calculator', 'default'); ?>><img src="../images/xcalc.png" width="16" height="14" border="0"></a></td>
  510. <td><a href="../Help/index.php" rel="gb_page_fs[]"><img src="../images/help.gif" width="18" height="18" border="0" align="absmiddle"></a></td>
  511. <td class="DarkHeaderSubSub">&nbsp;<a href="../Help/index.php" rel="gb_page_fs[]" class="dark">Help</a></td>
  512. </tr>
  513. </table>
  514. <!-- #EndLibraryItem --><!-- InstanceEndEditable --></td>
  515. </tr>
  516. <tr>
  517. <td valign="bottom" align="right" colspan="2"><!-- InstanceBeginEditable name="rightMenu" -->
  518. <?php include('../include/menu/main_right.php'); ?>
  519. <!-- InstanceEndEditable --></td>
  520. <td>
  521. </td>
  522. </tr>
  523. <tr>
  524. <td width="100%" colspan="3"><table cellspacing="0" cellpadding="0" width="100%" summary="" border="0">
  525. <tbody>
  526. <tr>
  527. <td width="4" colspan="4" height="4"><img height="4" alt="" src="../images/c-ghtl.gif" width="4"></td>
  528. <td colspan="4"><table cellspacing="0" cellpadding="0" width="100%" summary="" background="../images/c-ght.gif" border="0">
  529. <tbody>
  530. <tr>
  531. <td height="4"></td>
  532. </tr>
  533. </tbody>
  534. </table></td>
  535. <td class="BGColorDark" valign="top" rowspan="2"><table cellspacing="0" cellpadding="0" width="100%" summary="" background="../images/c-ght.gif" border="0">
  536. <tbody>
  537. <tr>
  538. <td height="4"></td>
  539. </tr>
  540. </tbody>
  541. </table></td>
  542. <td width="4" colspan="4" height="4"><img height="4" alt="" src="../images/c-ghtr.gif" width="4"></td>
  543. </tr>
  544. <tr>
  545. <td class="BGGrayLight" rowspan="3"></td>
  546. <td class="BGGrayMedium" rowspan="3"></td>
  547. <td class="BGGrayDark" rowspan="3"></td>
  548. <td class="BGColorDark" rowspan="3"></td>
  549. <td class="BGColorDark" rowspan="3"><!-- InstanceBeginEditable name="leftMenu" --><?php include('../include/menu/main_left.php'); ?><!-- InstanceEndEditable --></td>
  550. <td class="BGColorDark" rowspan="3"></td>
  551. <td class="BGColorDark" rowspan="2"></td>
  552. <td class="BGColorDark" rowspan="2"></td>
  553. <td class="BGColorDark" rowspan="2"></td>
  554. <td class="BGGrayDark" rowspan="2"></td>
  555. <td class="BGGrayMedium" rowspan="2"></td>
  556. <td class="BGGrayLight" rowspan="2"></td>
  557. </tr>
  558. <tr>
  559. <td class="BGColorDark" width="100%"><?php
  560. if (isset($_SESSION['username'])) {
  561. ?>
  562. <div align="right" class="FieldNumberDisabled">&nbsp;</div>
  563. <?php
  564. } else {
  565. echo "&nbsp;";
  566. }
  567. ?>
  568. </td>
  569. </tr>
  570. <tr>
  571. <td valign="top"><img height="20" alt="" src="../images/c-ghct.gif" width="25"></td>
  572. <td valign="top" colspan="2"><table cellspacing="0" cellpadding="0" width="100%" summary="" background="../images/c-ghb.gif" border="0">
  573. <tbody>
  574. <tr>
  575. <td height="4"></td>
  576. </tr>
  577. </tbody>
  578. </table></td>
  579. <td valign="top" colspan="4"><img height="20" alt="" src="../images/c-ghbr.gif" width="4"></td>
  580. </tr>
  581. <tr>
  582. <td width="4" colspan="4" height="4"><img height="4" alt="" src="../images/c-ghbl.gif" width="4"></td>
  583. <td><table height="4" cellspacing="0" cellpadding="0" width="100%" summary="" background="../images/c-ghb.gif" border="0">
  584. <tbody>
  585. <tr>
  586. <td></td>
  587. </tr>
  588. </tbody>
  589. </table></td>
  590. <td><img height="4" alt="" src="../images/c-ghcb.gif" width="3"></td>
  591. <td colspan="7"></td>
  592. </tr>
  593. </tbody>
  594. </table></td>
  595. </tr>
  596. </tbody>
  597. </table>
  598. </div>
  599. <!-- InstanceBeginEditable name="main" -->
  600. <?php
  601. if ($_SESSION['request_access'] == '3') {
  602. echo "&nbsp;<img src=\"/Common/images/adminAction.gif\" onClick=\"new Effect.toggle('adminPanel', 'slide')\">";
  603. echo "&nbsp;<img src=\"/Common/images/adminSQLAction.gif\" onClick=\"new Effect.toggle('debugPanel', 'slide')\">";
  604. include('../Administration/include/detail.php');
  605. include('../Administration/include/sql_debug.php');
  606. }
  607. ?>
  608. <table cellspacing="0" cellpadding="0" width="100%" summary="" border="0">
  609. <tbody>
  610. <tr>
  611. <td height="2"></td>
  612. </tr>
  613. <tr>
  614. <td><table cellspacing="0" cellpadding="0" width="100%" summary="" border="0">
  615. <tbody>
  616. <tr>
  617. <td align="center">
  618. <div id="hotMessage" style="width: 98%;margin:3px auto;display:<?= ($PO['hot'] == 'yes') ? display : none; ?>">This Requisition has been tagged HOT!!</div>
  619. <div id="messageCenter" style="width: 98%;margin:3px auto;display:<?= (isset($message)) ? display : none; ?>"><?= $message; ?></div>
  620. <form action="<?= $_SERVER['PHP_SELF']; ?>" method="POST" name="Form" id="Form" runat="vdaemon">
  621. <table border="0" cellpadding="0" cellspacing="0">
  622. <tr>
  623. <td>
  624. <table width="100%" border="0" cellpadding="0" cellspacing="0">
  625. <tr>
  626. <td></td>
  627. <td height="26" valign="bottom">
  628. <table border="0" align="right" cellpadding="0" cellspacing="0">
  629. <tr>
  630. <?php if ($_SESSION['eid'] == $PO['req'] and ! empty($PO['po'])) { ?>
  631. <td><div id="ddcolortabs">
  632. <ul>
  633. <li id="inactive"><a href="checkInformation.php?id=<?= $PO['id']; ?>" <?php help('', 'Request Purchasing to send Vendor a check.', 'default'); ?> rel="gb_page_center[750, 450]"><span>Check&nbsp;Request</span></a></li>
  634. </ul>
  635. </div></td>
  636. <td>
  637. <div id="ddcolortabs">
  638. <ul>
  639. <li id="inactive"><a href="packingSlip.php?id=<?= $_GET['id']; ?>&po=<?= $PO['po']; ?>&req=<?= $PO['req']; ?>&issuer=<?= $AUTH['issuer']; ?>" <?php help('', 'Send electronic packing slip to Puchasing', 'default'); ?> rel="gb_page_center[500, 300]"><span>Packing&nbsp;Slip</span></a></li>
  640. </ul>
  641. </div></td>
  642. <?php } ?>
  643. <td><div id="ddcolortabs">
  644. <ul>
  645. <li id="inactive"><a href="javascript: window.print();" <?php help('', 'Click here to print this Request', 'default'); ?>><span>Print&nbsp;Requisition</span></a></li>
  646. </ul>
  647. </div></td>
  648. <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
  649. </tr>
  650. </table></td>
  651. </tr>
  652. <tr class="BGAccentVeryDark">
  653. <td width="50%" height="30" nowrap class="DarkHeaderSubSub">&nbsp;&nbsp;Purchase Order Requisition...</td>
  654. <td width="50%"></td>
  655. </tr>
  656. </table>
  657. </td>
  658. </tr>
  659. <tr>
  660. <td class="BGAccentVeryDarkBorder"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  661. <tr>
  662. <td valign="top" class="BGAccentDarkBorder"><table width="100%" border="0">
  663. <tr>
  664. <td height="25" colspan="4" class="BGAccentDark"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  665. <tr>
  666. <td><img src="../images/info.png" width="16" height="16" align="texttop"><strong>&nbsp;Information</strong></td>
  667. <td><div align="right" class="mainsection">Status: <strong><?= reqStatus($PO['status']); ?></strong>
  668. <input type="hidden" name="status" value="<?= $PO['status']; ?>">
  669. &nbsp;&nbsp;</div></td>
  670. </tr>
  671. </table></td>
  672. </tr>
  673. <tr>
  674. <td nowrap>Requisition Number:</td>
  675. <td class="label"><?= $_GET['id']; ?></td>
  676. <td nowrap>&nbsp;</td>
  677. <td>&nbsp;</td>
  678. </tr>
  679. <tr>
  680. <td width="12%" nowrap>Purchase Order Number:</td>
  681. <td width="45%" class="label"><?= ($PO['creditcard'] == 'yes') ? "Credit Card" : $PO['po']; ?></td>
  682. <td width="13%" nowrap><table width="100%" border="0" cellspacing="0" cellpadding="0">
  683. <tr>
  684. <td nowrap>CER Number:</td>
  685. <td width="35" align="right"><a href="cer_list.php" rel="gb_page_center[700, 600]" <?php help('', 'Click here to get a list of approved Capital Acquisition Requests', 'default'); ?>><img src="../images/detail.gif" width="18" height="20" border="0" align="absmiddle"></a></td>
  686. </tr>
  687. </table></td>
  688. <td width="26%"><table border="0" cellspacing="0" cellpadding="0">
  689. <tr>
  690. <td class="label"><a href="../CER/detail.php?id=<?= $PO['cer']; ?>" class="dark" rel="gb_page_fs[]"><?= $CER[$PO['cer']]; ?></a></td>
  691. <td><?php if (!empty($PO['cer'])) { ?>
  692. <a href="<?= $default['URL_HOME']; ?>/CER/print.php?id=<?= $PO['cer']; ?>" <?php help('', 'Click here to print this Capital Acquisition Request', 'default'); ?>><img src="../images/printer.gif" border="0" align="absmiddle"></a>
  693. <?php } ?></td>
  694. </tr>
  695. </table></td>
  696. </tr>
  697. <tr>
  698. <td>Requisitioner:</td>
  699. <td class="label"><?= caps($EMPLOYEES[$PO['req']]); ?></td>
  700. <td nowrap>Requisition Date:</td>
  701. <td class="label"><?= $PO['_reqDate']; ?></td>
  702. </tr>
  703. <?php if (!empty($PO['incareof']) AND $PO['req'] != $PO['incareof']) { ?>
  704. <tr>
  705. <td><img src="/Common/images/menupointer2.gif" width="4" height="7" align="absmiddle"> In Care Of:</td>
  706. <td class="label"><?= caps($EMPLOYEES[$PO['incareof']]); ?></td>
  707. <td>&nbsp;</td>
  708. <td>&nbsp;</td>
  709. </tr>
  710. <?php } ?>
  711. <tr>
  712. <td height="5" colspan="4"><img src="../images/spacer.gif" width="5" height="5"></td>
  713. </tr>
  714. <?php if (strlen($PO['sup2']) == 6) { ?>
  715. <tr>
  716. <td nowrap>Final Vendor: </td>
  717. <td nowrap class="label"><?= caps($VENDOR[$PO['sup2']]) . " (" . strtoupper($PO['sup2']) . ")"; ?><?php
  718. /* Getting suppliers from Suppliers */
  719. $SUPPLIER = $dbh->getRow("SELECT BTVEND AS id, BTNAME AS name, BTADR1 AS address, BTADR3 AS city, BTPRCD AS state, BTPOST AS zip5, BTWPAG AS web
  720. FROM Standards.Vendor
  721. WHERE BTVEND = '".$PO['sup2']."'");
  722. ?><span class="padding"><a href="../Common/vendor_map.php?id=<?= strtoupper($SUPPLIER['id']); ?>&name=<?= caps($SUPPLIER['name']); ?>&address=<?= $SUPPLIER['address']; ?> <?= $SUPPLIER['city']; ?>, <?= $SUPPLIER['state']; ?> <?= $SUPPLIER['zip5']; ?>" title="<?= caps($SUPPLIER['name']); ?>'s Location" rel="gb_page_center[602, 602]"><img src="/Common/images/map.gif" width="20" height="20" border="0" align="absmiddle"></a><?php if (!empty($SUPPLIER['web'])) { ?>&nbsp;<a href="http://<?= $SUPPLIER['web']; ?>" title="<?= caps($SUPPLIER['name']); ?>'s website." rel="gb_page_fs[]"><img src="/Common/images/globe.gif" width="18" height="18" border="0" align="absmiddle"></a>
  723. <?php } ?><a href="../Administration/vendor_details.php?id=<?= $SUPPLIER[id]; ?>" title="<?= caps($SUPPLIER['name']); ?> information" rel="gb_page[400, 511]"><img src="../images/detail.gif" width="18" height="20" border="0" align="absmiddle"></a>&nbsp;<a href="fax.php?id=<?= $PO['sup']; ?>&company=<?= $PO['company']; ?>" title="Generate a fax cover sheet" target="_blank"><img src="../images/printer.gif" border="0" align="absmiddle"></a></span></td>
  724. <td>Kickoff Date:</td>
  725. <td class="label"><?= ($AUTH['issuerDate'] == '0000-00-00 00:00:00' OR is_null($AUTH['issuerDate'])) ? $blank : date("F j, Y", strtotime($AUTH['issuerDate'])); ?></td>
  726. </tr>
  727. <?php } ?>
  728. <tr>
  729. <td nowrap><?= (empty($PO['po'])) ? Recommended : Final; ?> Vendor:</td>
  730. <td nowrap class="label"><?= caps($VENDOR[$PO['sup']]) . " (" . strtoupper($PO['sup']) . ")"; ?><?php
  731. /* Getting suppliers from Suppliers */
  732. $SUPPLIER = $dbh->getRow("SELECT BTVEND AS id, BTNAME AS name, BTADR1 AS address, BTADR3 AS city, BTPRCD AS state, BTPOST AS zip5, BTWPAG AS web
  733. FROM Standards.Vendor
  734. WHERE BTVEND = '".$PO['sup']."'");
  735. ?><span class="padding"><a href="../Common/vendor_map.php?id=<?= strtoupper($SUPPLIER['id']); ?>&name=<?= caps($SUPPLIER['name']); ?>&address=<?= $SUPPLIER['address']; ?> <?= $SUPPLIER['city']; ?>, <?= $SUPPLIER['state']; ?> <?= $SUPPLIER['zip5']; ?>" title="<?= caps($SUPPLIER['name']); ?>'s Location" rel="gb_page_center[602, 602]"><img src="/Common/images/map.gif" width="20" height="20" border="0" align="absmiddle"></a><?php if (!empty($SUPPLIER['web'])) { ?>&nbsp;<a href="http://<?= $SUPPLIER['web']; ?>" title="<?= caps($SUPPLIER['name']); ?>'s website." rel="gb_page_fs[]"><img src="/Common/images/globe.gif" width="18" height="18" border="0" align="absmiddle"></a>
  736. <?php } ?><a href="../Administration/vendor_details.php?id=<?= $SUPPLIER[id]; ?>" title="<?= caps($SUPPLIER['name']); ?> information" rel="gb_page[400, 511]"><img src="../images/detail.gif" width="18" height="20" border="0" align="absmiddle"></a>&nbsp;<a href="fax.php?id=<?= $PO['sup']; ?>&company=<?= $PO['company']; ?>" title="Generate a fax cover sheet" target="_blank"><img src="../images/printer.gif" border="0" align="absmiddle"></a></span></td>
  737. <?php if (strlen($PO['sup2']) != 6 AND !empty($PO['po'])) { ?>
  738. <td>Kickoff Date:</td>
  739. <td class="label"><?= ($AUTH['issuerDate'] == '0000-00-00 00:00:00' OR is_null($AUTH['issuerDate'])) ? $blank : date("F j, Y", strtotime($AUTH['issuerDate'])); ?></td>
  740. <?php } else { ?>
  741. <td>&nbsp;</td>
  742. <td>&nbsp;</td>
  743. <?php } ?>
  744. </tr>
  745. <!-- <tr>
  746. <td>Company:</td>
  747. <td class="label"><?= caps($COMPANY[$PO[company]]); ?></td>
  748. <td nowrap>&nbsp;</td>
  749. <td>&nbsp;</td>
  750. </tr>-->
  751. <tr>
  752. <td>Bill to Plant: </td>
  753. <td class="label"><?= caps($PLANTS[$PO['plant']]); ?><input type="hidden" name="currentPlant" id="currentPlant" value="<?= $PO['plant']; ?>"></td>
  754. <td>Deliver to Plant: </td>
  755. <td class="label"><?= caps($PLANTS[$PO['ship']]); ?></td>
  756. </tr>
  757. <tr>
  758. <td>Department:</td>
  759. <td class="label"><?= caps($DEPARTMENT[$PO['department']]); ?><input type="hidden" name="currentDepartment" id="currentDepartment" value="<?= $PO['department']; ?>"></td>
  760. <td>Job Number: </td>
  761. <td class="label"><?= $PO['job']; ?></td>
  762. </tr>
  763. <tr>
  764. <td height="5" colspan="4"><img src="../images/spacer.gif" width="5" height="5"></td>
  765. </tr>
  766. <tr>
  767. <td valign="top" nowrap>Purpose / Usage:</td>
  768. <td colspan="3" class="label"><?= caps(stripslashes($PO['purpose'])); ?></td>
  769. </tr>
  770. </table></td>
  771. </tr>
  772. <!--
  773. <tr>
  774. <td>&nbsp;</td>
  775. </tr>
  776. <tr>
  777. <td class="BGAccentDarkBorder"><table width="100%" border="0">
  778. <tr>
  779. <td width="100%" height="25" colspan="6" class="BGAccentDark"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  780. <tr>
  781. <td>&nbsp;<a href="javascript:switchTracking();" class="black" <?php help('', 'Show or Hide the Track Shipments', 'default'); ?>><strong><img src="../images/package.gif" width="16" height="16" border="0" align="texttop">&nbsp;Track Shipments </strong></a></td>
  782. <td width="120">&nbsp;</td>
  783. </tr>
  784. </table></td>
  785. </tr>
  786. <td>&nbsp;</td>
  787. </table>
  788. </td>
  789. </tr>
  790. -->
  791. <tr>
  792. <td>&nbsp;</td>
  793. </tr>
  794. <tr><td class="BGAccentDarkBorder"><table width="100%" border="0">
  795. <tr>
  796. <td height="25" class="BGAccentDark"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  797. <tr>
  798. <td>&nbsp;<a href="javascript:void(0);" onClick="new Effect.toggle('itemsContainer','blind')" class="black" <?php help('', 'Show or Hide the Item Information', 'default'); ?>><strong><img src="../images/text.gif" width="16" height="16" border="0" align="texttop">&nbsp;Item Information</strong></a></td>
  799. <td width="120"><a href="javascript:toggleItemDisplay('itemsContainer');" class="viewcomments">View All Details </a></td>
  800. </tr>
  801. </table></td>
  802. </tr>
  803. <tr>
  804. <td>
  805. <div id="itemsContainer">
  806. <table width="100%" border="0">
  807. <tr>
  808. <td width="35" class="HeaderAccentDark">&nbsp;</td>
  809. <td width="35" class="HeaderAccentDark">Unit</td>
  810. <td width="80" nowrap class="HeaderAccentDark">Company#&nbsp;</td>
  811. <td width="60" nowrap class="HeaderAccentDark">Manuf#&nbsp;</td>
  812. <td class="HeaderAccentDark">Item Description</td>
  813. <td width="80" nowrap class="HeaderAccentDark">Price</td>
  814. </tr>
  815. <?php
  816. while($items_sth->fetchInto($ITEMS)) {
  817. $count_items++;
  818. $row_color = ($count_items % 2) ? FFFFFF : DFDFBF;
  819. ?>
  820. <!-- Start of Item<?= $count_items; ?> -->
  821. <tr <?php pointer($row_color); ?>>
  822. <td width="50" bgcolor="#<?= $row_color; ?>" class="label"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  823. <tr>
  824. <td><a href="javascript:switchItems('itemDetails<?= $count_items; ?>', 'collapsed');" id="itemDetails<?= $count_items; ?>A" <?php help('', 'View more details on this item', 'default'); ?>><img src="../images/1rightarrow.gif" name="itemDetails<?= $count_items; ?>I" width="16" height="16" border="0" id="itemDetails<?= $count_items; ?>I">
  825. <input name="item<?= $count_items; ?>" type="hidden" id="item<?= $count_items; ?>" value="<?= $ITEMS['id']; ?>">
  826. </a></td>
  827. <td><strong><?= $ITEMS['qty']; ?></strong></td>
  828. </tr>
  829. </table></td>
  830. <td class="label" bgcolor="#<?= $row_color; ?>"><?= strtoupper($ITEMS['unit']); ?></td>
  831. <td class="label" bgcolor="#<?= $row_color; ?>"><?= strtoupper(stripslashes($ITEMS['part'])); ?></td>
  832. <td class="label" bgcolor="#<?= $row_color; ?>"><?= strtoupper(stripslashes($ITEMS['manuf'])); ?></td>
  833. <td nowrap bgcolor="#<?= $row_color; ?>" class="label">
  834. <?php
  835. if (strlen($ITEMS['descr']) > 50) {
  836. echo caps(substr(stripslashes($ITEMS['descr']), 0, 50));
  837. echo "...<a href=\"javascript:void(0);\" class=black onmouseover=\"return overlib('" . caps(stripslashes($ITEMS['descr'])) . "', TEXTPADDING, 10, WIDTH, 300, WRAPMAX, 300, AUTOSTATUS, BGCOLOR, '#000000', CGCOLOR, '#E68B2C', FGCOLOR, '#B0D585');\" onmouseout=\"nd();\"><img src=\"../images/bubble.gif\" width=14 height=17 border=0 align=absmiddle></a>";
  838. } else {
  839. echo caps(stripslashes($ITEMS['descr']));
  840. }
  841. ?></td>
  842. <td bgcolor="#<?= $row_color; ?>" class="label"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  843. <tr>
  844. <td><strong>$</strong></td>
  845. <td align="right"><strong><?php $d=(substr($ITEMS['price'], -2, 2) == '00') ? 2 : 4; echo number_format($ITEMS['price'],$d); ?><?= ($d == 2) ? "<img src=\"/Common/images/spacer.gif\" width=\"18\" height=\"5\">" : ''; ?></strong></td>
  846. </tr>
  847. </table></td>
  848. </tr>
  849. <tr <?php pointer($row_color); ?> id="itemDetails<?= $cou…

Large files files are truncated, but you can click here to view the full file