PageRenderTime 66ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 1ms

/PO/detail_yui2.php

https://github.com/tlezotte/ePOS
PHP | 1308 lines | 1069 code | 81 blank | 158 comment | 153 complexity | 99efd069406de8e9f8312e4f65947246 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. $Dbg->DatabaseName = "Request";
  34. /**
  35. * - Database Connection
  36. */
  37. require_once('../Connections/connDB.php');
  38. /**
  39. * - Config Information
  40. */
  41. require_once('../include/config2.php');
  42. /**
  43. * - Check User Access
  44. */
  45. require_once('../security/check_user.php');
  46. /**
  47. * - Form Validation
  48. */
  49. //include('vdaemon/vdaemon.php');
  50. /* -------------------------------------------------------------
  51. * ------------- START FINANCE PROCESSING -------------------
  52. * -------------------------------------------------------------
  53. */
  54. if ($_POST['action'] == 'finance_update') {
  55. $changePlant = false;
  56. $changeDepartment = false;
  57. /* ----- Controller changes Plant ----- */
  58. if ($_POST['currentPlant'] != $_POST['plant']) {
  59. $plant_sql = "UPDATE PO SET plant='" . $_POST['plant'] . "' WHERE id=" . $_POST['type_id']; // Update Bill to Plant
  60. $dbh->query($plant_sql);
  61. // Record transaction for history
  62. debug_capture($_SESSION['eid'], $_POST['id'], $default['debug_capture'], $_SERVER['PHP_SELF'], addslashes(htmlentities($plant_sql)));
  63. $changePlant = true;
  64. }
  65. /* ----- Controller changes Department ----- */
  66. if ($_POST['currentDepartment'] != $_POST['department']) {
  67. $dept_sql = "UPDATE PO SET department='" . $_POST['department'] . "' WHERE id=" . $_POST['type_id']; // Update Department
  68. $dbh->query($dept_sql);
  69. // Record transaction for history
  70. debug_capture($_SESSION['eid'], $_POST['id'], $default['debug_capture'], $_SERVER['PHP_SELF'], addslashes(htmlentities($dept_sql)));
  71. $changeDepartment = false; // Turned off because we are not checking for departments now (HQ)
  72. }
  73. /* ----- Forward to new Controller ----- */
  74. if ($changePlant OR $changeDepartment) {
  75. $forward = "router.php?type_id=" . $_POST['type_id'] . "&approval=controller&plant=" . $_POST['plant'] . "&department=" . $_POST['department']; // Check Controler
  76. header("Location: ".$forward);
  77. exit();
  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($_POST[$item_COAid]) > 0) {
  85. $item_sql = "UPDATE Items SET cat='" . $_POST[$item_COAid] . "' WHERE id=" . $_POST[$item];
  86. $dbh->query($item_sql);
  87. // Record transaction for history
  88. debug_capture($_SESSION['eid'], $_POST['id'], $default['debug_capture'], $_SERVER['PHP_SELF'], addslashes(htmlentities($item_sql)));
  89. }
  90. }
  91. /* ----- Update CER numbers and Credit Card ----- */
  92. $po_sql = "UPDATE PO SET cer='" . $_POST['cer'] . "',
  93. creditcard='" . $_POST['creditcard'] . "'
  94. WHERE id=" . $_POST['type_id'];
  95. $dbh->query($po_sql);
  96. // Record transaction for history
  97. debug_capture($_SESSION['eid'], $_POST['id'], $default['debug_capture'], $_SERVER['PHP_SELF'], addslashes(htmlentities($po_sql)));
  98. }
  99. /* -------------------------------------------------------------
  100. * ------------- END FINANCE PROCESSING -------------------
  101. * -------------------------------------------------------------
  102. */
  103. /* -------------------------------------------------------------
  104. * ---------- START DENIAL PROCESSING --------------------------
  105. * -------------------------------------------------------------
  106. */
  107. if (substr($_POST['auth'],0,3) == 'app' OR $_POST['auth'] == 'controller') {
  108. if (array_key_exists('yes_x', $_POST)) { $yn = "yes"; } // Set approval button pressed
  109. if (array_key_exists('no_x', $_POST)) { $yn = "no"; } // Set approval button pressed
  110. /* ---------------- Check to see if a Comment was provided ---------------- */
  111. if (empty($_POST['Com']) AND $yn == 'no') {
  112. $_SESSION['error'] = "A denied Requisition requires you to enter a Comment.";
  113. $_SESSION['redirect'] = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
  114. header("location: ../error.php");
  115. exit();
  116. }
  117. /* ---------------- Change status for non approved request ---------------- */
  118. if ($yn == 'no') {
  119. setRequestStatus($_POST['type_id'], 'X'); // Update PO status
  120. }
  121. /* ---------------- Update the approvals for the PO ---------------- */
  122. $auth_sql = "UPDATE Authorization
  123. SET ".$_POST['auth']."yn='" . $yn . "',
  124. ".$_POST['auth']."Date=NOW(),
  125. ".$_POST['auth']."Com='" . htmlentities($_POST['Com'], ENT_QUOTES, 'UTF-8') . "'
  126. WHERE id = ".$_POST['auth_id'];
  127. $dbh->query($auth_sql);
  128. // Record transaction for history
  129. debug_capture($_SESSION['eid'], $_POST['id'], $default['debug_capture'], $_SERVER['PHP_SELF'], addslashes(htmlentities($auth_sql)));
  130. if ($_POST['auth'] == 'controller') {
  131. $forward = "router.php?type_id=" . $_POST['type_id'] . "&approval=app0"; // Forward to Approver 1
  132. } else {
  133. $forward = "router.php?type_id=" . $_POST['type_id'] . "&approval=" . $_POST['auth'] . "&yn=" . $yn; // Record Controllers Approval
  134. }
  135. header("Location: ".$forward);
  136. exit();
  137. }
  138. /* -------------------------------------------------------------
  139. * ---------- END DENIAL PROCESSING ----------------------------
  140. * -------------------------------------------------------------
  141. */
  142. /* -------------------------------------------------------------
  143. * ------------- START UPDATE PROCESSING -----------------------
  144. * -------------------------------------------------------------
  145. */
  146. if ($_POST['stage'] == "update") {
  147. /* -------------------------------------------------------------
  148. * ---------- START REQUESTER PROCESSING -----------------------
  149. * -------------------------------------------------------------
  150. */
  151. if ($_POST['auth'] == "req") {
  152. /* ---------------- START CANCEL PURCHASE ORDER -------------- */
  153. if ($_POST['cancel'] == 'yes') {
  154. setRequestStatus($_POST['type_id'], 'C'); // Update PO status
  155. header("location: list.php?action=my&access=0");
  156. exit();
  157. }
  158. /* ---------------- END CANCEL PURCHASE ORDER -------------- */
  159. /* ------------- Adding tracking information ------------- */
  160. if (array_key_exists('addTracking_x',$_POST)) {
  161. $tracking=new Tracking();
  162. $tracking->add();
  163. }
  164. /* ------------- Update tracking information ------------- */
  165. if (array_key_exists('updateTracking_x',$_POST)) {
  166. $tracking=new Tracking();
  167. $tracking->update();
  168. }
  169. /* ---------------- START RESEND PURCHASE ORDER ---------------- */
  170. if (array_key_exists('restorerequest_x',$_POST)) {
  171. setRequestStatus($_POST['type_id'], 'N'); // Update PO status
  172. header("location: router.php?type_id=" . $_POST['type_id'] . "&approval=app0"); // Forward to router as new Request
  173. exit();
  174. }
  175. /* --------- END RESEND PURCHASE ORDER ----------------------- */
  176. }
  177. /* -------------------------------------------------------------
  178. * ---------- END REQUESTER PROCESSING -----------------------
  179. * -------------------------------------------------------------
  180. */
  181. }
  182. /* -------------------------------------------------------------
  183. * ------------- END UPDATE PROCESSING -----------------------
  184. * -------------------------------------------------------------
  185. */
  186. /* -------------------------------------------------------------
  187. * ------------- START PURCHASING PROCESSING -------------------
  188. * -------------------------------------------------------------
  189. */
  190. if ($_POST['action'] == 'purchasing_update') {
  191. /* ------------- Adding supplier contact information ------------- */
  192. if (array_key_exists('sendPO_x',$_POST)) {
  193. print_r($_POST);
  194. exit();
  195. }
  196. /* ------------- Adding supplier contact information ------------- */
  197. if (array_key_exists('addContact_x',$_POST)) {
  198. $purchasing=new Purchasing();
  199. $purchasing->addContact();
  200. }
  201. /* ================== PAYMENTS =========================== */
  202. /* ------------- Adding payment information ------------- */
  203. if (array_key_exists('addPayment_x',$_POST)) {
  204. $payment=new Payment();
  205. $payment->add();
  206. $sql="select";
  207. $mysql=new Mysql();
  208. $mysql->capture($sql);
  209. }
  210. /* ------------- Update payment information ------------- */
  211. if (array_key_exists('updatePayments_x',$_POST)) {
  212. $payment=new Payment();
  213. $payment->update();
  214. }
  215. /* ================== PAYMENTS =========================== */
  216. /* ------------- Purchaser marks Request as Complete ------------- */
  217. if (array_key_exists('completed_x',$_POST)) {
  218. $purchasing=new Purchasing();
  219. $purchasing->vendorKickoff();
  220. }
  221. /* ------------- Add Vendor and change Terms when Purchasing changes Vendor ------------- */
  222. $purchasing=new Purchasing();
  223. if (strlen($_POST['vendSearch']) > 0) {
  224. $purchasing->update(true);
  225. } else {
  226. $purchasing->update();
  227. }
  228. }
  229. /* -------------------------------------------------------------
  230. * ------------- END PURCHASING PROCESSING -------------------
  231. * -------------------------------------------------------------
  232. */
  233. /* -------------------------------------------------------------
  234. * ------------- START DATABASE CONNECTIONS -------------------
  235. * -------------------------------------------------------------
  236. */
  237. /* ------------- Getting PO information ------------- */
  238. $PO = $dbh->getRow("SELECT *, DATE_FORMAT(reqDate,'%M %d, %Y') AS _reqDate
  239. FROM PO
  240. WHERE id = ?",array($_GET['id']));
  241. /* ------------- Getting Authoriztions for above PO ------------- */
  242. $AUTH = $dbh->getRow("SELECT * FROM Authorization WHERE type_id = ? and type = 'PO'",array($PO['id']));
  243. /* ------------- Get Employee names from Standards database ------------- */
  244. $EMPLOYEES = $dbh->getAssoc("SELECT eid, CONCAT(fst,' ',lst) AS name
  245. FROM Standards.Employees");
  246. /* ------------- Getting Vendor information from Standards ------------- */
  247. $VENDOR = $dbh->getAssoc("SELECT BTVEND, BTNAME FROM Standards.Vendor");
  248. /* ------------- Getting Plant information from Standards ------------- */
  249. $plant_sql = "SELECT id, name FROM Standards.Plants WHERE status = '0'";
  250. $PLANTS = $dbh->getAssoc($plant_sql);
  251. $plant_query = $dbh->prepare($plant_sql);
  252. $PLANT = $dbh->getRow("SELECT * FROM Standards.Plants WHERE id=" . $PO['plant']);
  253. /* ------------- Getting Department information from Standards ------------- */
  254. $dept_sql = "SELECT id, CONCAT('(',id,') ',name) AS fullname FROM Standards.Department WHERE status='0' ORDER BY name";
  255. $DEPARTMENT = $dbh->getAssoc($dept_sql);
  256. $dept_query = $dbh->prepare($dept_sql);
  257. /* ------------- Getting Category information from Standards ------------- */
  258. $COA = $dbh->getAssoc("SELECT CONCAT(coa_account,'-',coa_suffix) AS id, coa_description AS name
  259. FROM Standards.COA
  260. WHERE coa_plant=" . $PLANT['conbr']);
  261. /* ------------- Getting CER numbers from CER ------------- */
  262. $cer_sql = "SELECT id, cer FROM CER WHERE cer IS NOT NULL ORDER BY cer+0";
  263. $CER = $dbh->getAssoc($cer_sql);
  264. $cer_query = $dbh->prepare($cer_sql);
  265. /* ------------- Getting Vendor terms from Standards ------------- */
  266. $terms_sql = "SELECT terms_id AS id, terms_name AS name FROM Standards.VendorTerms ORDER BY name";
  267. $TERMS = $dbh->getAssoc($terms_sql);
  268. $terms_query = $dbh->prepare($terms_sql);
  269. /* ------------- Get Purchase Request users ------------- */
  270. $purchaser_sql = $dbh->prepare("SELECT U.eid, E.fst, E.lst, E.email
  271. FROM Users U
  272. INNER JOIN Standards.Employees E ON U.eid = E.eid
  273. WHERE U.role = 'purchasing'
  274. AND E.status = '0'
  275. AND U.eid <> '08745'
  276. ORDER BY E.lst ASC");
  277. /* ------------- Get Purchase Request users ------------- */
  278. $financer_sql = $dbh->prepare("SELECT U.eid, E.fst, E.lst, E.email
  279. FROM Users U
  280. INNER JOIN Standards.Employees E ON U.eid = E.eid
  281. WHERE U.role = 'financing'
  282. AND E.status = '0'
  283. AND U.eid <> '08745'
  284. ORDER BY E.lst ASC");
  285. /* ------------- Get Vendor Payments ------------- */
  286. $payments = $dbh->query("SELECT * FROM Payments WHERE request_id=" . $PO['id'] . " AND pay_status='0' ORDER BY pay_date ASC");
  287. $payments_count = $payments->numRows();
  288. /* ------------- Get Tracking Information ------------- */
  289. $TRACKING = getTrackingInformation($PO['id']);
  290. /* ------------- Getting Comments Information ------------- */
  291. $post_sql = "SELECT * FROM Postings
  292. WHERE request_id = ".$_GET['id']."
  293. AND type = 'global'
  294. ORDER BY posted DESC";
  295. $LAST_POST = $dbh->getRow($post_sql); // Get the last posted comment
  296. $post_query = $dbh->prepare($post_sql);
  297. $post_sth = $dbh->execute($post_query);
  298. $post_count = $post_sth->numRows();
  299. /* -------------------------------------------------------------
  300. * ------------- END DATABASE CONNECTIONS -------------------
  301. * -------------------------------------------------------------
  302. */
  303. /* -------------------------------------------------------------
  304. * ------------- START VARIABLES -------------------------------
  305. * -------------------------------------------------------------
  306. */
  307. /* ------------- Check current level and current user ------------- */
  308. if (array_key_exists('approval', $_GET)) {
  309. if ($AUTH[$AUTH['level']] != $_SESSION['eid']) {
  310. $message="<img src=\"/Common/images/nochange.gif\" align=\"absmiddle\" /> You are not authorized to approve this requisition.";
  311. unset($_GET['approval']);
  312. } elseif ($_GET['approval'] != $AUTH['level']) {
  313. $message="<img src=\"/Common/images/nochange.gif\" align=\"absmiddle\" /> This Requisition is currently not at your approval level.";
  314. unset($_GET['approval']);
  315. }
  316. } elseif ($PO['status'] == 'N') {
  317. $message="<div class=\"appJump\"<img src=\"/Common/images/action.gif\" align=\"absmiddle\" /> This requisition is waiting for action from " . caps($EMPLOYEES[$AUTH[$AUTH['level']]] . "</div>");
  318. }
  319. /* ------------- Get who denied the Requisition ------------- */
  320. if ($PO['status'] == 'X') {
  321. $who = array_search('no', $AUTH);
  322. $canceled = '#' . substr($who,0,4) . 'Status';
  323. }
  324. $disableSendPO = (!empty($PO['po']) AND $PO['reqType'] == 'blanket') ? '' : ' class="disabled"';
  325. $phone_char=array('(', ')', ' ', '-', '.');
  326. $format_phone="(000)000-0000";
  327. /* -------------------------------------------------------------
  328. * ------------- END VARIABLES -------------------------------
  329. * -------------------------------------------------------------
  330. */
  331. ?>
  332. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  333. <html>
  334. <head>
  335. <title><?= $default['title1']; ?></title>
  336. <meta http-equiv="imagetoolbar" content="no">
  337. <meta name="copyright" content="2004 Your Company" />
  338. <meta name="author" content="Thomas LeZotte" />
  339. <link type="text/css" rel="stylesheet" href="/Common/js/yahoo/reset-fonts-grids/reset-fonts-grids.css" /> <!-- CSS Grid -->
  340. <link type="text/css" rel="stylesheet" href="/Common/js/yahoo/fonts/fonts-min.css" /> <!-- Datatable, TabView -->
  341. <link type="text/css" rel="stylesheet" href="/Common/js/yahoo/assets/skins/sam/datatable.css" /> <!-- Datatable -->
  342. <link type="text/css" rel="stylesheet" href="/Common/js/yahoo/assets/skins/sam/tabview.css" /> <!-- TabView -->
  343. <link type="text/css" rel="stylesheet" href="/Common/js/yahoo/assets/skins/custom/menu.css"> <!-- Menu -->
  344. <link type="text/css" rel="stylesheet" href="/Common/Print.css" media="print" />
  345. <link type="text/css" rel="stylesheet" href="../default_yui.css" />
  346. <link type="text/css" rel="alternate stylesheet" title="seasonal" href="/Common/themes/christmas/default.css" />
  347. <link type="text/css" rel="alternate stylesheet" title="night" href="/Common/themes/night/default.css" />
  348. <?php if ($default['rss'] == 'on') { ?>
  349. <link rel="alternate" type="application/rss+xml" title="<?= $default['title1']; ?> Announcements" href="<?= $default['URL_HOME']; ?>/data/<?= $default['rss_file']; ?>">
  350. <link rel="alternate" type="application/rss+xml" title="Capital Acquisition Announcements" href="<?= $default['URL_HOME']; ?>/data/<?= $default['rss_file']; ?>">
  351. <?php } ?>
  352. <script type="text/javascript" src="/Common/js/styleswitcher.js"></script>
  353. <script type="text/javascript" src="/Common/js/jquery/jquery-min.js"></script>
  354. <script type="text/javascript" src="/Common/js/jquery/ui/ui.datepicker-min.js"></script>
  355. </head>
  356. <body class="yui-skin-sam">
  357. <div id="doc3" class="yui-t7">
  358. <div id="hd">
  359. <div class="yui-gb">
  360. <div class="yui-u first">
  361. <img src="/Common/images/CompanyPrint.gif" name="Print" width="437" height="61" id="Print" />
  362. <a href="../home.php" title="<?= $default['title1']; ?>|Home Page"><img src="/Common/images/Company.gif" width="300" height="50" border="0" id="CompanyLogo"></a>
  363. </div>
  364. <div class="yui-u" id="centerTitle"><!-- Center Title Area -->&nbsp;<?php if ($_SESSION['request_access'] >= 2) { ?><span style="text-align:center"><a href="<?= $default['URL_HOME']; ?>/PO/detail.php?<?= $_SERVER['QUERY_STRING']; ?>" class="DarkHeaderSubSub">Switch to original</a></span><?php } ?></div>
  365. <div class="yui-u">
  366. <div id="applicationTitle" style="font-weight:bold;font-size:115%;text-align:right"><?= $language['label']['title1']; ?>&nbsp;</div>
  367. <div id="loggedInUser" class="loggedInUser" style="text-align:right"><strong><a href="../Administration/user_information.php" class="loggedInUser" title="User Task|Edit your user information"><?= caps($_SESSION['fullname']); ?></a></strong>&nbsp;<a href="../logout.php" class="loggedInUser" title="User Task|Selecting [logout] will Log you out of the <?= $default[title1]; ?> and stop automatic cookie login">[logout]</a>&nbsp;</div>
  368. <div id="styleSwitcher" style="text-align:right">Themes: <span id="defaultStyle" class="style" title="Theme Selector|Default Theme"><a href="#" onclick="setActiveStyleSheet('default'); return false;"><img src="/Common/images/spacer.gif" width="14" height="10" border="0" /></a></span><span id="seasonalStyle" class="style" title="Theme Selector|Seasonal Theme - Christmas Season"><a href="#" onclick="setActiveStyleSheet('seasonal'); return false;"><img src="/Common/images/spacer.gif" width="14" height="10" border="0" /></a></span><span id="nightStyle" class="style" title="Theme Selector|Night Scape Theme"><a href="#" onclick="setActiveStyleSheet('night'); return false;"><img src="/Common/images/spacer.gif" width="14" height="10" border="0" /></a></span>&nbsp;</div>
  369. </div>
  370. </div>
  371. </div>
  372. <div id="bd">
  373. <div class="yui-g" id="mm"><?php include('../include/main_menu.php'); ?></div>
  374. <div class="yui-g">
  375. <form action="<?= $_SERVER['PHP_SELF']; ?>" method="POST" enctype="multipart/form-data" name="Form" id="Form" style="padding-top:10px" runat="vdaemon">
  376. <div id="requestStatusContainer" style="width:800px;margin-left: auto;margin-right:auto;">
  377. <div id="requestStatusTitle">Status Indicator</div>
  378. <div id="requestStatus" title="User Task|Click the Requisition Status window to jump to approvals panel"><?= reqStatus($PO['status']); ?><input type="hidden" name="status" value="<?= $PO['status']; ?>" /></div>
  379. </div>
  380. <div id="minimantle" class="md minimantle" style="width:800px;margin-left: auto;margin-right:auto;">
  381. <div id="maincontent" class="md-sub">
  382. <div class="hd" style="height:25px"><h2>Purchase Order Requisition...</h2></div>
  383. <!-- Start Panel One -->
  384. <div id="information_panel" class="md-sub2">
  385. <p id="information_title">Information</p>
  386. <div id="information_content" style="margin:10px">
  387. <table width="100%" align="center" border="0">
  388. <tr>
  389. <td nowrap="nowrap">Requisition Number:</td>
  390. <td class="label"><?= $_GET['id']; ?></td>
  391. <td nowrap="nowrap"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  392. <tr>
  393. <td nowrap="nowrap">Blanket Order:</td>
  394. <td width="35" align="right"><a href="blanket_list.php" rel="gb_page_center[700, 600]" title="Blanket Order List|Click here to get a list of approved Blanket Orders"><img src="../images/detail.gif" width="18" height="20" border="0" align="absmiddle" /></a></td>
  395. </tr>
  396. </table></td>
  397. <td class="label"><table border="0" cellspacing="0" cellpadding="0">
  398. <tr>
  399. <td class="label"><a href="../CER/detail.php?id=<?= $PO['cer']; ?>" class="dark" rel="gb_page_fs[]">
  400. <?= $CER[$PO['cer']]; ?>
  401. </a></td>
  402. <td><?php if (!empty($PO['cer'])) { ?>
  403. <a href="<?= $default['URL_HOME']; ?>/CER/print.php?id=<?= $PO['cer']; ?>" title="Print Center|Click here to print this Capital Acquisition Request"><img src="../images/printer.gif" border="0" align="absmiddle" /></a>
  404. <?php } ?></td>
  405. </tr>
  406. </table></td>
  407. </tr>
  408. <tr>
  409. <td width="12%" nowrap="nowrap">Purchase Order Number:</td>
  410. <td width="45%" class="label"><?= ($PO['creditcard'] == 'yes') ? "Credit Card" : $PO['po']; ?></td>
  411. <td width="13%" nowrap="nowrap"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  412. <tr>
  413. <td nowrap="nowrap">CER Number:</td>
  414. <td width="35" align="right"><a href="cer_list.php" rel="gb_page_center[700, 600]" title="Capital Acquistion List|Click here to get a list of approved Capital Acquisition Requests"><img src="../images/detail.gif" width="18" height="20" border="0" align="absmiddle" /></a></td>
  415. </tr>
  416. </table></td>
  417. <td width="26%" class="label"><table border="0" cellspacing="0" cellpadding="0">
  418. <tr>
  419. <td class="label"><a href="../CER/detail.php?id=<?= $PO['cer']; ?>" class="dark" rel="gb_page_fs[]">
  420. <?= $CER[$PO['cer']]; ?>
  421. </a></td>
  422. <td><?php if (!empty($PO['cer'])) { ?>
  423. <a href="<?= $default['URL_HOME']; ?>/CER/print.php?id=<?= $PO['cer']; ?>" title="Print Center|Click here to print this Capital Acquisition Request"><img src="../images/printer.gif" border="0" align="absmiddle" /></a>
  424. <?php } ?></td>
  425. </tr>
  426. </table></td>
  427. </tr>
  428. <tr>
  429. <td>Requisitioner:</td>
  430. <td class="label"><?= caps($EMPLOYEES[$PO['req']]); ?></td>
  431. <td nowrap="nowrap">Requisition Date:</td>
  432. <td class="label"><?= $PO['_reqDate']; ?></td>
  433. </tr>
  434. <?php if (!empty($PO['incareof']) AND $PO['req'] != $PO['incareof']) { ?>
  435. <tr>
  436. <td><img src="/Common/images/menupointer2.gif" width="4" height="7" align="absmiddle" /> In Care Of:</td>
  437. <td class="label"><?= caps($EMPLOYEES[$PO['incareof']]); ?></td>
  438. <td>&nbsp;</td>
  439. <td>&nbsp;</td>
  440. </tr>
  441. <?php } ?>
  442. <tr>
  443. <td height="5" colspan="4"><img src="../images/spacer.gif" width="5" height="5" /></td>
  444. </tr>
  445. <?php if (strlen($PO['sup2']) == 6) { ?>
  446. <tr>
  447. <td nowrap="nowrap">Final Vendor: </td>
  448. <td nowrap="nowrap" class="label"><?= caps($VENDOR[$PO['sup2']]) . " (" . strtoupper($PO['sup2']) . ")"; ?>
  449. <?php
  450. /* Getting suppliers from Suppliers */
  451. $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
  452. FROM Standards.Vendor
  453. WHERE BTVEND = '".$PO['sup2']."'");
  454. ?> <span class="padding"><a href="../Common/vendor_map.php?id=<?= strtoupper($SUPPLIER['id']); ?>&amp;name=<?= caps($SUPPLIER['name']); ?>&amp;address=<?= $SUPPLIER['address']; ?> <?= $SUPPLIER['city']; ?>, <?= $SUPPLIER['state']; ?> <?= $SUPPLIER['zip5']; ?>" title="Information Center|<?= 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>
  455. <?php if (!empty($SUPPLIER['web'])) { ?>
  456. &nbsp;<a href="http://<?= $SUPPLIER['web']; ?>" title="Information Center|<?= caps($SUPPLIER['name']); ?>'s website." rel="gb_page_fs[]"><img src="/Common/images/globe.gif" width="18" height="18" border="0" align="absmiddle" /></a>
  457. <?php } ?>
  458. <a href="../Administration/vendor_details.php?id=<?= $SUPPLIER[id]; ?>" title="Information Center|<?= 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']; ?>&amp;company=<?= $PO['company']; ?>" title="Fax Center|Generate a fax cover sheet" target="_blank"><img src="../images/printer.gif" border="0" align="absmiddle" /></a></span></td>
  459. <td>Kickoff Date:</td>
  460. <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>
  461. </tr>
  462. <?php } ?>
  463. <tr>
  464. <td nowrap="nowrap"><?= (empty($PO['po'])) ? Recommended : Final; ?>
  465. Vendor:</td>
  466. <td nowrap="nowrap" class="label"><?= caps($VENDOR[$PO['sup']]) . " (" . strtoupper($PO['sup']) . ")"; ?>
  467. <?php
  468. /* Getting suppliers from Suppliers */
  469. $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
  470. FROM Standards.Vendor
  471. WHERE BTVEND = '".$PO['sup']."'");
  472. ?><span class="padding"><a href="../Common/vendor_map.php?id=<?= strtoupper($SUPPLIER['id']); ?>&amp;name=<?= caps($SUPPLIER['name']); ?>&amp;address=<?= $SUPPLIER['address']; ?> <?= $SUPPLIER['city']; ?>, <?= $SUPPLIER['state']; ?> <?= $SUPPLIER['zip5']; ?>" title="Information Center|<?= 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>
  473. <?php if (!empty($SUPPLIER['web'])) { ?>
  474. &nbsp;<a href="http://<?= $SUPPLIER['web']; ?>" title="Information Center|<?= caps($SUPPLIER['name']); ?>'s website." rel="gb_page_fs[]"><img src="/Common/images/globe.gif" width="18" height="18" border="0" align="absmiddle" /></a>
  475. <?php } ?>
  476. <a href="../Administration/vendor_details.php?id=<?= $SUPPLIER[id]; ?>" title="Information Center|<?= 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']; ?>&amp;company=<?= $PO['company']; ?>" title="Fax Center|Generate a fax cover sheet" target="_blank"><img src="../images/printer.gif" border="0" align="absmiddle" /></a></span></td>
  477. <?php if (strlen($PO['sup2']) != 6 AND !empty($PO['po'])) { ?>
  478. <td>Kickoff Date:</td>
  479. <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>
  480. <?php } else { ?>
  481. <td>&nbsp;</td>
  482. <td>&nbsp;</td>
  483. <?php } ?>
  484. </tr>
  485. <!-- <tr>
  486. <td>Company:</td>
  487. <td class="label"><?= caps($COMPANY[$PO[company]]); ?></td>
  488. <td nowrap>&nbsp;</td>
  489. <td>&nbsp;</td>
  490. </tr>-->
  491. <tr>
  492. <td>Bill to Plant: </td>
  493. <td class="label"><?= caps($PLANTS[$PO['plant']]); ?>
  494. <input type="hidden" name="currentPlant" id="currentPlant" value="<?= $PO['plant']; ?>" /></td>
  495. <td>Deliver to Plant: </td>
  496. <td class="label"><?= caps($PLANTS[$PO['ship']]); ?></td>
  497. </tr>
  498. <tr>
  499. <td>Department:</td>
  500. <td class="label"><?= caps($DEPARTMENT[$PO['department']]); ?>
  501. <input type="hidden" name="currentDepartment" id="currentDepartment" value="<?= $PO['department']; ?>" /></td>
  502. <td>Job Number: </td>
  503. <td class="label"><?= $PO['job']; ?></td>
  504. </tr>
  505. <tr>
  506. <td height="5" colspan="4"><img src="../images/spacer.gif" width="5" height="5" /></td>
  507. </tr>
  508. <tr>
  509. <td valign="top" nowrap="nowrap">Purpose / Usage:</td>
  510. <td colspan="3" class="label"><?= caps(stripslashes($PO['purpose'])); ?></td>
  511. </tr>
  512. </table>
  513. </div>
  514. </div>
  515. <!-- End Panel One -->
  516. <!-- Start Panel Two -->
  517. <div id="itemInformation" class="md-sub2">
  518. <p id="itemInformation_title">Item Information</p>
  519. <div id="itemInformation_content" style="margin:10px">
  520. <div id="taskBar"><a href="comments.php?request_id=<?= $_GET['id']; ?>&eid=<?= $_SESSION['eid']; ?>" title="Actions Menu|View All Details" rel="gb_page_center[675,325]"><img src="/Common/images/menu-collapsed.gif" border="0" align="absmiddle">&nbsp;View All Details&nbsp;</a></div>
  521. <div id="itemsTable"></div>
  522. </div>
  523. </div>
  524. <!-- End Panel Two -->
  525. <!-- Start Panel Three -->
  526. <div id="track_panel" class="md-sub2">
  527. <p id="track_title">Track Shipments</p>
  528. <div id="track_content" style="margin:10px">
  529. <div id="taskBar"><div id="addTracking" style="display:none; text-align:left;">Tracking number: <input name="track_number" type="text" id="track_number" size="30" maxlength="30" /> <input name="addTracking" type="image" src="../images/button.php?i=w90.png&l=Add" alt="Add Tracking Number" border="0"><hr color="#FFFFFF" size="1px" noshade></div><div id="addTrackingToggle"><img src="../images/add.gif" width="12" height="12" border="0" align="absmiddle">&nbsp;Tracking Number&nbsp;</div>
  530. </div>
  531. <div id="track_tabs">
  532. <ul class="ui-tabs-nav">
  533. <li><a href="#track_tabs-main"><span>List</span></a></li>
  534. <?php for ($t=0; $t < count($TRACKING); $t++) { ?>
  535. <li><a href="#track_tabs-<?= $t; ?>"><span><?= $TRACKING[$t][track_number]; ?></span></a></li>
  536. <?php } ?>
  537. </ul>
  538. <div id="track_tabs-main" class="ui-tabs-panel">
  539. <div id="shipmentListTable"></div>
  540. </div>
  541. <?php for ($t=0; $t < count($TRACKING); $t++) { ?>
  542. <div id="track_tabs-<?= $t; ?>" class="ui-tabs-panel" >
  543. <div id="<?= $TRACKING[$t][track_number]; ?>Table"></div>
  544. </div>
  545. <?php } ?>
  546. </div>
  547. </div>
  548. </div>
  549. <!-- End Panel Three -->
  550. <!-- Start Panel Four -->
  551. <div id="attachments_panel" class="md-sub2">
  552. <p id="attachments_title">Attachments</p>
  553. <div id="attachments_content" style="margin:10px">
  554. <div id="taskBar"><div id="uploadFile" style="display:none; text-align:left">Choose a file to upload: <input name="file" type="file" size="38"> <input name="submitUpload" type="image" src="../images/button.php?i=w90.png&l=Upload" alt="Upload File" border="0"><hr color="#FFFFFF" size="1px" noshade></div><div id="uploadToggle"><img src="/Common/images/upload.gif" width="16" height="16" border="0" align="absmiddle">&nbsp;Upload File&nbsp;</div>
  555. </div>
  556. <div id="attachmentsTable"></div>
  557. </div>
  558. </div>
  559. <!-- End Panel Four -->
  560. <!-- Start Panel Five -->
  561. <div id="comments_panel" class="md-sub2">
  562. <p id="comments_title">Comments</p>
  563. <div id="comments_content" style="margin:10px">
  564. <div id="taskBar"><a href="comments.php?request_id=<?= $_GET['id']; ?>&eid=<?= $_SESSION['eid']; ?>" title="Actions Menu|Post a new comment" rel="gb_page_center[675,325]"><img src="../images/add.gif" width="12" height="12" border="0" align="absmiddle">&nbsp;New Comment&nbsp;</a></div>
  565. <?php if ($post_count > 0) { ?>
  566. <div id="commentsCounter">
  567. There <?= ($post_count > 1) ? are : is; ?> currently <strong><?= $post_count; ?></strong> comment<?= ($post_count > 1) ? s : ''; ?>.
  568. The last comment was posted on <strong><?= date('F d, Y \a\t H:i A', strtotime($LAST_POST['posted'])); ?></strong>.
  569. <br>
  570. <br>
  571. <div class="clickToView">Click to view all Comments.</div>
  572. </div>
  573. <?php } else { ?>
  574. <div id="commentsCounter">There are currently <strong>NO</strong> comments.</div>
  575. <?php } ?>
  576. <div width="95%" border="0" align="center" id="commentsArea" style="display:none"> <br>
  577. <?php
  578. $count=0;
  579. while($post_sth->fetchInto($POST)) {
  580. $count++;
  581. ?>
  582. <div class="comment">
  583. <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  584. <tr>
  585. <td width="55" rowspan="3" valign="top" class="comment_datenum"><div class="comment_month">
  586. <?= date("M", strtotime($POST['posted'])); ?>
  587. </div>
  588. <div class="comment_day">
  589. <?= date("d", strtotime($POST['posted'])); ?>
  590. </div>
  591. <div class="comment_year">
  592. <?= date("y", strtotime($POST['posted'])); ?>
  593. </div></td>
  594. <td class="comment_wrote"><?= caps($EMPLOYEES[$POST[eid]]); ?> wrote... </td>
  595. </tr>
  596. <tr>
  597. <td class="commentbody"><?= caps(stripslashes($POST['comment'])); ?></td>
  598. </tr>
  599. <tr>
  600. <td class="comment_date"><?= date("h:i A", strtotime($POST['posted'])); ?></td>
  601. </tr>
  602. </table>
  603. </div>
  604. <br>
  605. <?php } ?>
  606. </div>
  607. </div>
  608. </div>
  609. <!-- End Panel Five -->
  610. <!-- Start Panel Six -->
  611. <?php if ($_SESSION['request_role'] == 'controller' OR $_SESSION['request_role'] == 'executive') { ?>
  612. <div id="financeDepartment_panel" class="md-sub2">
  613. <p id="financeDepartment_title">Finance Department</p>
  614. <div id="financeDepartment_content" style="margin:10px">
  615. <!-- ===================== START BILLING TAB ===================== -->
  616. <table width="100%" border="0" cellspacing="5" cellpadding="0" id="financeInfo">
  617. <tr>
  618. <td width="194" nowrap>CER Number:</td>
  619. <td width="150" class="label"><a href="../CER/detail.php?id=<?= $PO['cer']; ?>" class="dark" rel="gb_page_fs[]">
  620. <?= $CER[$PO['cer']]; ?>
  621. </a></td>
  622. <td nowrap><!--Credit Card Purchase:--></td>
  623. <td width="187"><!--<select name="creditcard" id="creditcard" >
  624. <option value="no" <?= ($PO['creditcard'] == 'no') ? selected : $blank; ?>>No</option>
  625. <option value="yes" <?= ($PO['creditcard'] == 'yes') ? selected : $blank; ?>>Yes</option>
  626. </select>--></td>
  627. </tr>
  628. <tr>
  629. <td nowrap><table width="100%" border="0" cellspacing="0" cellpadding="0">
  630. <tr>
  631. <td nowrap>Change CER Number:</td>
  632. <td width="35" align="right"><a href="cer_list.php" rel="gb_page_center[700, 600]" title="Capital Acquision List|Click here to get a list of approved Capital Acquisition Requests"><img src="../images/detail.gif" width="18" height="20" border="0" align="absmiddle"></a></td>
  633. </tr>
  634. </table></td>
  635. <td><select name="cer" id="cer">
  636. <option value="0">Select One</option>
  637. <?php
  638. $cer_sth = $dbh->execute($cer_query);
  639. while($cer_sth->fetchInto($DATA)) {
  640. echo " <option value=\"".$DATA['id']."\">".caps($DATA['cer'])."</option>\n";
  641. }
  642. ?>
  643. </select></td>
  644. <td nowrap><!--In Budget:--></td>
  645. <td><!--<select name="inBudget" id="inBudget">
  646. <option value="no" <?= ($PO['inBudget'] == 'no') ? selected : $blank; ?>>No</option>
  647. <option value="yes" <?= ($PO['inBudget'] == 'yes') ? selected : $blank; ?>>Yes</option>
  648. </select>--></td>
  649. </tr>
  650. <tr>
  651. <td height="5" colspan="4" nowrap><img src="../images/spacer.gif" width="5" height="5"></td>
  652. </tr>
  653. <tr>
  654. <td nowrap>Bill to Plant: </td>
  655. <td class="label"><?= caps($PLANTS[$PO['plant']]); ?></td>
  656. <td nowrap>Department:</td>
  657. <td nowrap class="label"><?= caps($DEPARTMENT[$PO['department']]); ?></td>
  658. </tr>
  659. <tr>
  660. <td nowrap>Change Bill to Plant: </td>
  661. <td><select name="plant" id="plant">
  662. <option value="0">Select One</option>
  663. <?php
  664. $plant_sth = $dbh->execute($plant_query);
  665. while($plant_sth->fetchInto($DATA)) {
  666. $selected = ($PO['plant'] == $DATA['id']) ? selected : $blank;
  667. echo " <option value=\"".$DATA['id']."\" ".$selected.">".caps($DATA['name'])."</option>\n";
  668. }
  669. ?>
  670. </select></td>
  671. <td nowrap>Change Department:</td>
  672. <td><select name="department" id="department">
  673. <option value="0">Select One</option>
  674. <?php
  675. $dept_sth = $dbh->execute($dept_query);
  676. while($dept_sth->fetchInto($DEPT)) {
  677. $selected = ($PO['department'] == $DEPT['id']) ? selected : $blank;
  678. echo " <option value=\"".$DEPT['id']."\" ".$selected.">".caps($DEPT['fullname'])."</option>\n";
  679. }
  680. ?>
  681. </select></td>
  682. </tr>
  683. <tr>
  684. <td height="5" colspan="4" nowrap><img src="../images/spacer.gif" width="5" height="5"></td>
  685. </tr>
  686. <tr>
  687. <td>&nbsp;</td>
  688. <td>&nbsp;</td>
  689. <td>&nbsp;</td>
  690. <td><!--<input name="updaterequest" type="image" src="../images/button.php?i=w130.png&l=Update Request" alt="Update Request" border="0">-->
  691. <input name="action" type="hidden" id="action" value="finance_update">
  692. &nbsp;</td>
  693. </tr>
  694. </table>
  695. <!-- ===================== END BILLING TAB ===================== -->
  696. </div>
  697. </div>
  698. <?php } ?>
  699. <!-- End Panel Six -->
  700. <!-- Start Panel Seven -->
  701. <div id="approvals_panel" class="md-sub2">
  702. <p id="approvals_title">Approvals</p>
  703. <div id="approvals_content" style="margin:10px">
  704. <table border="0">
  705. <tr class="hd">
  706. <td height="25" nowrap>&nbsp;</td>
  707. <td width="30" nowrap>&nbsp;</td>
  708. <td nowrap><h2>Name</h2></td>
  709. <td nowrap><h2>Date</h2></td>
  710. <td width="30" align="center" nowrap><a href="javascript:void(0);" title="Requestion Metrics|Days between Approvals"><img src="/Common/images/clock.gif" width="16" height="16" border="0"></a></td>
  711. <td width="30" align="center" nowrap><a href="javascript:void(0);" title="Message Center|Number of comments submitted by each Approver"><img src="../images/comments.gif" width="19" height="16" border="0"></a></td>
  712. <td width="400" ><h2>Comments</h2></td>
  713. <td>
  714. <?= (array_key_exists('approval', $_GET)) ? '<h2>Approval</h2>' : $blank; ?></td>
  715. </tr>
  716. <tr id="reqStatus">
  717. <td nowrap><img src="/Common/images/spacer.gif" width="22" height="20" align="absmiddle">Requester:</td>
  718. <td align="center" nowrap><a href="comments.php?eid=<?= $PO['req']; ?>&request_id=<?= $PO['id']; ?>&type=private" title="Message Center|Send a private message to <?= caps($EMPLOYEES[$PO['req']]); ?>" rel="gb_page_center[675,325]"><img src="../images/comments.gif" border="0"></a></td>
  719. <td nowrap class="label"><?= caps($EMPLOYEES[$PO['req']]); ?></td>
  720. <td nowrap class="label"><?= $PO['_reqDate']; ?></td>
  721. <td align="center" nowrap class="TrainActive">-</td>
  722. <td align="center" nowrap class="TrainActive"><a href="javascript:void(0);" class="checkComments"><?= checkComments($_GET['id'], $PO['req']); ?></a></td>
  723. <td nowrap>&nbsp;</td>
  724. <td nowrap>&nbsp;</td>
  725. </tr>
  726. <!-- END REQUESTER -->
  727. <?php if (strlen($AUTH['controller']) == 5) { ?>
  728. <!-- START CONTROLLER -->
  729. <tr id="controllerStatus">
  730. <td nowrap><img src="/Common/images/spacer.gif" width="22" height="20" align="absmiddle">Controller:</td>
  731. <td align="center" nowrap><?php if ($AUTH['level'] == 'controller') { ?>
  732. <img src="../images/resend_email.gif" title="Message Center|Email approvel request to <?= caps($EMPLOYEES[$AUTH['controller']]); ?>">
  733. <?php } else { ?>
  734. <a href="comments.php?eid=<?= $AUTH['controller']; ?>&request_id=<?= $PO['id']; ?>&type=private" title="Message Center|Send a private message to <?= caps($EMPLOYEES[$AUTH['controller']]); ?>" rel="gb_page_center[675,325]"><img src="../images/comments.gif" border="0"></a>
  735. <?php } ?> </td>
  736. <td nowrap class="label"><?= caps($EMPLOYEES[$AUTH['controller']]); ?></td>
  737. <td nowrap class="label"><?php if (isset($AUTH['controllerDate'])) { echo date("F d, Y", strtotime($AUTH['controllerDate'])); } ?></td>
  738. <td align="center" nowrap class="TrainActive"><?php if (isset($AUTH['controllerDate'])) { echo abs(ceil((strtotime($PO['reqDate']) - strtotime($AUTH['controllerDate'])) / (60 * 60 * 24))); } ?></td>
  739. <td align="center" nowrap class="TrainActive"><a href="javascript:void(0);" class="checkComments">
  740. <?= checkComments($_GET['id'], $AUTH['controller']); ?>
  741. </a></td>
  742. <td nowrap class="label"><?= displayAppComment('controller', $_GET['approval'], $AUTH['controller'], $AUTH['controllerCom'], $AUTH['controllerDate']); ?></td>
  743. <td nowrap><?= displayAppButtons($_GET['id'], $_GET['approval'], 'controller', $AUTH['controller'], $AUTH['controllerDate']); ?></td>
  744. </tr>
  745. <?php } ?>
  746. <!-- END CONTROLLER -->
  747. <!-- START APPROVER 1 -->
  748. <tr id="app1Status">
  749. <td nowrap><img src="/Common/images/spacer.gif" width="22" height="20" align="absmiddle"><?= $language['label']['app1']; ?>:</td>
  750. <td align="center" nowrap><?php if ($AUTH['level'] == 'app1') { ?>
  751. <img src="../images/resend_email.gif" title="Email approvel request to <?= caps($EMPLOYEES[$AUTH['app1']]); ?>">
  752. <?php } else { ?>
  753. <a href="comments.php?eid=<?= $AUTH['app1']; ?>&request_id=<?= $PO['id']; ?>&type=private" title="Message Center|Send a private message to <?= caps($EMPLOYEES[$AUTH['app1']]); ?>" rel="gb_page_center[675,325]"><img src="../images/comments.gif" border="0"></a>
  754. <?php } ?> </td>
  755. <td nowrap class="label"><?= displayApprover($_GET['id'], 'app1', $AUTH['app1'], $AUTH['app1Date']); ?></td>
  756. <td nowrap class="label"><?php if (isset($AUTH['app1Date'])) { echo date("F d, Y", strtotime($AUTH['app1Date'])); } ?></td>
  757. <td align="center" nowrap class="TrainActive"><?php if (isset($AUTH['app1Date'])) { echo abs(ceil((strtotime($PO['reqDate']) - strtotime($AUTH['app1Date'])) / (60 * 60 * 24))); } ?></td>
  758. <td align="center" nowrap class="TrainActive"><a href="javascript:void(0);" class="checkComments">
  759. <?= checkComments($_GET['id'], $AUTH['app1']); ?>
  760. </a></td>
  761. <td nowrap class="label"><?= displayAppComment('app1', $_GET['approval'], $AUTH['app1'], $AUTH['app1Com'], $AUTH['app1Date']); ?></td>
  762. <td nowrap><?= displayAppButtons($_GET['id'], $_GET['approval'], 'app1', $AUTH['app1'], $AUTH['app1Date']); ?></td>
  763. </tr>
  764. <!-- END APPROVER 1 -->
  765. <?php if (strlen($AUTH['app2']) == 5 OR $PO['status'] == 'N') { ?>
  766. <!-- START APPROVER 2 -->
  767. <tr id="app2Status">
  768. <td nowrap><img src="/Common/images/spacer.gif" width="22" height="20" align="absmiddle"><?= $language['label']['app2']; ?>:</td>
  769. <td align="center" nowrap><?php if ($AUTH['level'] == 'app2') { ?>
  770. <img src="../images/resend_email.gif" title="Email approvel request to <?= caps($EMPLOYEES[$AUTH['app2']]); ?>">
  771. <?php } else { ?>
  772. <a href="comments.php?eid=<?= $AUTH['app2']; ?>&request_id=<?= $PO['id']; ?>&type=private" title="Message Center|Send a private message to <?= caps($EMPLOYEES[$AUTH['app2']]); ?>" rel="gb_page_center[675,325]"><img src="../images/comments.gif" border="0"></a>
  773. <?php } ?> </td>
  774. <td nowrap class="label"><?= displayApprover($_GET['id'], 'app2', $AUTH['app2'], $AUTH['app2Date']); ?></td>
  775. <td nowrap class="label"><?php if (isset($AUTH['app2Date'])) { echo date("F d, Y", strtotime($AUTH['app2Date'])); } ?></td>
  776. <td align="center" nowrap class="TrainActive"><?php if (isset($AUTH['app2Date'])) { echo abs(ceil((strtotime($AUTH['app1Date']) - strtotime($AUTH['app2Date'])) / (60 * 60 * 24))); } ?></td>

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