$product_table_header['1 source'] = $hn_article; $product_table_header['2 source'] = $hn_custock; $product_table_header['3 source'] = $hn_cbooked; $product_table_header['4 source'] = $hn_cbohere; $id = tep_db_prepare_input($_GET['id']); $booking = new stock_booking($id); if (isset($_POST['me_action'])) { if ($_POST['me_action'] == 'UPDATENAME') { $new_name = tep_db_prepare_input($_POST['name']); $booking->update(null, $new_name); echo utf8_encode($booking->name); exit; } elseif ($_POST['me_action'] == 'UPDATESTATUS') { $old_status = $booking->status; $new_status = tep_db_prepare_input($_POST['status']); $booking->updateStatus($old_status, $new_status, $session_userinfo['username']); echo utf8_encode($booking->status); exit; } } $content .= '<div style="width:710px;">'; $content .= $booking->drawStatusIcon('booking-status', '', 'float:right;'); $content .= '<h2><span id="booking-name" class="pointer" title="Click to rename order">' . $booking->name . '</span><input id="booking-name-edit" type="text" class="input2" style="display:none;" /></h2>'; $content .= '</div>'; $content .= '<div class="draw-table" style="clear:both;">'; $content .= '<table class="sticky-tablehead" border="0" cellpadding="0" cellspacing="0">'; $content .= '<thead><tr>'; foreach ($product_table_header as $k => $v) { $content .= '<th>' . $v . '</th>'; } $content .= '</tr></thead>';
public function setAsClosed() { global $session_userinfo; use_class('stock_booking'); $booking = new stock_booking($this->booking_id); $booking->updateStatus($booking->status, '2', $session_userinfo['username']); $this->updateStatus($this->status, '3', $session_userinfo['username']); }