PageRenderTime 61ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 1ms

/_tmp/detail_tmp.php

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

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