<?php 
    $orders_history = $db->Execute("select orders_status_id, date_added, customer_notified, comments\r\n                                    from " . TABLE_ORDERS_STATUS_HISTORY . "\r\n                                    where orders_id = '" . $oID . "'\r\n                                    order by date_added");
    if ($orders_history->RecordCount() > 0) {
        while (!$orders_history->EOF) {
            echo '          <tr>' . "\n" . '            <td class="smallText" valign="top">' . zen_datetime_short($orders_history->fields['date_added']) . '</td>' . "\n" . '            <td class="smallText" align="center">';
            if ($orders_history->fields['customer_notified'] == '1') {
                echo zen_image(DIR_WS_ICONS . 'tick.gif', TEXT_YES) . "</td>\n";
            } else {
                if ($orders_history->fields['customer_notified'] == '-1') {
                    echo zen_image(DIR_WS_ICONS . 'locked.gif', TEXT_HIDDEN) . "</td>\n";
                } else {
                    echo zen_image(DIR_WS_ICONS . 'unlocked.gif', TEXT_VISIBLE) . "</td>\n";
                }
            }
            echo '            <td class="smallText" valign="top">' . $orders_status_array[$orders_history->fields['orders_status_id']] . '</td>' . "\n";
            echo '            <td class="smallText" valign="top">' . nl2br(zen_db_scrub_out($orders_history->fields['comments'])) . '&nbsp;</td>' . "\n" . '          </tr>' . "\n";
            $orders_history->MoveNext();
        }
    } else {
        echo '          <tr>' . "\n" . '            <td class="smallText" colspan="5">' . TEXT_NO_ORDER_HISTORY . '</td>' . "\n" . '          </tr>' . "\n";
    }
    ?>
        </table></td>
      </tr>
      <?php 
    if (!$so->status) {
        ?>
      <tr>
        <td align="center">
			<table width="95%">
			<tr>
Exemple #2
0
            ?>
</strong></td>
          <td class="smallText" align="center"><strong><?php 
            echo TABLE_HEADING_DELETE_COMMENTS;
            ?>
</strong></td>
        </tr>
<?php 
            $orders_history = $db->Execute("select * from " . TABLE_ORDERS_STATUS_HISTORY . "\r\n                                    where orders_id = '" . $oID . "'\r\n                                    order by orders_status_history_id asc");
            if ($orders_history->RecordCount() > 0) {
                while (!$orders_history->EOF) {
                    echo '        <tr>' . NL . '          <td class="smallText" align="center">' . zen_datetime_short($orders_history->fields['date_added']) . '</td>' . NL;
                    $status_id = 'status_' . $orders_history->fields['orders_status_history_id'];
                    $status_default = $orders_history->fields['orders_status_id'];
                    $comments_id = 'comments_' . $orders_history->fields['orders_status_history_id'];
                    $comments_default = zen_db_scrub_out($orders_history->fields['comments']);
                    $delete_id = 'delete_' . $orders_history->fields['orders_status_history_id'];
                    echo '          <td>' . zen_draw_pull_down_menu($status_id, $orders_statuses, $status_default) . '</td>' . NL;
                    echo '          <td>' . zen_draw_textarea_field($comments_id, 'soft', '30', '2', $comments_default) . '</td>' . NL;
                    echo '          <td align="center">' . zen_draw_checkbox_field($delete_id, 1) . '</td>' . NL;
                    echo '        </tr>' . NL;
                    $orders_history->MoveNext();
                }
            } else {
                echo '          <tr>' . NL . '            <td class="smallText" colspan="4">' . TEXT_NO_ORDER_HISTORY . '</td>' . NL . '          </tr>' . NL;
            }
            ?>
      </table></td>
    </tr>
<!-- End Order Status History -->
<?php