$sqlmsg = '
  SELECT msg_all,
    delivery_id,
    msg_bottom
  FROM
    ' . TABLE_ORDER_CYCLES . '
  WHERE
    delivery_id = ' . ActiveCycle::delivery_id();
$resultmsg = @mysql_query($sqlmsg, $connection) or die('<br><br>You found a bug. If there is an error listed below, please copy and paste the error into an email to <a href="mailto:' . WEBMASTER_EMAIL . '">' . WEBMASTER_EMAIL . '</a><br><br><b>Error:</b> Selecting message ' . mysql_error() . '<br><b>Error No: </b>' . mysql_errno());
while ($row = mysql_fetch_array($resultmsg)) {
    $msg_all = $row['msg_all'];
    $msg_bottom = $row['msg_bottom'];
}
$content .= $font . '
  <h3>Editing Text on the Invoices</h3>
  <p>This will change the message for the current invoice (' . date(DATE_FORMAT_CLOSED, strtotime(ActiveCycle::delivery_date())) . ') and all future invoices until changed.</p>
  <table width="685" cellpadding="7" cellspacing="2" border="0">
    <tr bgcolor="#AE58DA">
      <td align="left"><b>Message to all Members ' . $message . '</b></td>
    </tr>
    <tr>
      <td align="left" bgcolor="#EEEEEE">
        <form action="' . $_SERVER['SCRIPT_NAME'] . '" method="POST">
          <b>Appears at the top of all Customer Invoices</b><br>
          <textarea name="msg_all" cols="75" rows="7">' . htmlspecialchars($msg_all, ENT_QUOTES) . '</textarea><br><br>
          <b>Appears at the bottom of all Customer Invoices</b><br>
          <textarea name="msg_bottom" cols="75" rows="7">' . htmlspecialchars($msg_bottom, ENT_QUOTES) . '</textarea><br>
          <input type="hidden" name="update" value="yes">
          <div align="center"><input type="submit" name="submit" value="Submit"></div>
        </form>
      </td>
Exemple #2
0
        You will also be able to view your finalized invoice online after delivery day. The mailing address is on the invoice.
        If paying by PayPal, email payment to <a href="mailto:' . PAYPAL_EMAIL . '">' . PAYPAL_EMAIL . '</a>

        <div id="pay2"></div>
        <br><br>

        <b>Q: How do I change my payment method?</b>
        <br>
        <b>A:</b> To change how you will pay, once your invoice is finalized after delivery day, you will be shown totals for different methods of payment. You can then decide to write a check, or log on and pay by PayPal online. You will also be able to change your method of payment at that time. If you have questions about this at that time, contact us at <a href="mailto:' . HELP_EMAIL . '">' . HELP_EMAIL . '</a>

        <div id="del1"></div>
        <br><br>

        <b>Q: When can I pick up or have my items delivered?</b>
        <br>
        <b>A:</b> Delivery Day is <strong>' . date('F j', strtotime(ActiveCycle::delivery_date())) . '</strong>. Your temporary invoice (viewable after ordering is closed) will have the information on pick up location or delivery. If you chose delivery, a route manager will be in touch to coordinate delivery with you.

        <div id="del2"></div>
        <br><br>

        <b>Q: Can I change my delivery method once I have chosen it?</b>
        <br>
        <b>A:</b> Contact us at <a href="mailto:' . ORDER_EMAIL . '">' . ORDER_EMAIL . '</a> to change your delivery method.' . '
        <div id="web1"></div>
        <br><br>

        <b>Q: I am getting an error on a page, what do I do?</b>
        <br>
        <b>A:</b> Please copy and paste the text of the error into an email along with what page it is and send it to <a href="mailto:' . WEBMASTER_EMAIL . '">' . WEBMASTER_EMAIL . '</a>. Please also explain what happened before that error occurred. Thank you for your help in keeping this website working smoothly.

        <div id="web2"></div>
function order_cycle_navigation($data)
{
    // Set up the previous/next order cycle (delivery_id) navigation
    $http_get_query = ($_GET['type'] ? '&type=' . $_GET['type'] : '') . ($_GET['producer_id'] ? '&producer_id=' . $_GET['producer_id'] : '') . ($_GET['category_id'] ? '&category_id=' . $_GET['category_id'] : '') . ($_GET['subcat_id'] ? '&subcat_id=' . $_GET['subcat_id'] : '') . ($_GET['query'] ? '&query=' . $_GET['query'] : '') . ($_GET['a'] ? '&a=' . $_GET['a'] : '');
    return '<div id="delivery_id_nav">
    <a class="prior" href="' . $_SERVER['SCRIPT_NAME'] . '?delivery_id=' . ($_GET['delivery_id'] ? $_GET['delivery_id'] - 1 : ActiveCycle::delivery_id() - 1) . $http_get_query . '">&larr; PRIOR ORDER </a>
    <span class="delivery_id">' . date(DATE_FORMAT_CLOSED, strtotime(ActiveCycle::delivery_date($_GET['delivery_id']))) . '</span>
    <a class="next" href="' . $_SERVER['SCRIPT_NAME'] . '?delivery_id=' . ($_GET['delivery_id'] ? $_GET['delivery_id'] + 1 : ActiveCycle::delivery_id() + 1) . $http_get_query . '"> NEXT ORDER &rarr;</a>
  </div>';
}
Exemple #4
0
 private static function get_delivery_info($target_delivery_id)
 {
     if (self::$active_cycle_query_complete === false || self::$delivery_id != $target_delivery_id) {
         global $connection;
         // Set up for pulling only order cycles appropriate to the current customer_type permissions
         // Allow "orderex" direct access to all order cycles
         $customer_type_query = CurrentMember::auth_type('orderex') ? '1' : '0';
         if (CurrentMember::auth_type('member')) {
             $customer_type_query .= '
           OR customer_type LIKE "%member%"';
         }
         if (CurrentMember::auth_type('institution')) {
             $customer_type_query .= '
           OR customer_type LIKE "%institution%"';
         }
         if ($target_delivery_id == '') {
             $query_where = '
             date_open < "' . date('Y-m-d H:i:s', time()) . '"
             AND (' . $customer_type_query . ')';
         } else {
             $query_where = '
             delivery_id = "' . mysql_real_escape_string($target_delivery_id) . '"';
         }
         // Get information about any shopping period that is currently open
         $query = '
           SELECT
             delivery_id,
             delivery_date,
             date_open,
             date_closed,
             order_fill_deadline,
             producer_markdown / 100 AS producer_markdown,
             retail_markup / 100 AS retail_markup,
             wholesale_markup / 100 AS wholesale_markup
           FROM
             ' . TABLE_ORDER_CYCLES . '
           WHERE' . $query_where . '
             /* AND order_fill_deadline > "' . date('Y-m-d H:i:s', time()) . '" */
           ORDER BY
             delivery_id DESC
           LIMIT
             1';
         $result = @mysql_query($query, $connection) or die(debug_print("ERROR: 730099 ", array($query, mysql_error()), basename(__FILE__) . ' LINE ' . __LINE__));
         // Set default values in case we returned nothing
         self::$delivery_id = 1;
         if ($row = mysql_fetch_object($result)) {
             self::$delivery_id = $row->delivery_id;
             self::$delivery_date = $row->delivery_date;
             self::$date_open = $row->date_open;
             self::$date_closed = $row->date_closed;
             self::$order_fill_deadline = $row->order_fill_deadline;
             self::$producer_markdown = $row->producer_markdown;
             self::$retail_markup = $row->retail_markup;
             self::$wholesale_markup = $row->wholesale_markup;
             if (time() > strtotime($row->date_open) && time() < strtotime($row->date_closed)) {
                 self::$ordering_window = 'open';
             } else {
                 self::$ordering_window = 'closed';
             }
             if (time() > strtotime($row->date_closed) && time() < strtotime($row->order_fill_deadline)) {
                 self::$producer_update_window = 'open';
             } else {
                 self::$producer_update_window = 'closed';
             }
             self::$active_cycle_query_complete = true;
         } elseif ($target_delivery_id != 0) {
             self::$delivery_id = $target_delivery_id;
             self::$delivery_date = '';
             self::$date_open = '';
             self::$date_closed = '';
             self::$order_fill_deadline = '';
             self::$producer_markdown = 0;
             self::$retail_markup = 0;
             self::$wholesale_markup = 0;
             self::$active_cycle_query_complete = true;
         }
     }
 }