Exemplo n.º 1
0
        } else {
            $order_type = OSCOM::getDef('text_order_billed_to');
            $order_name = $order['billing_name'];
        }
        ?>

  <div class="contentText">
    <div class="panel panel-info">
      <div class="panel-heading"><strong><?php 
        echo OSCOM::getDef('text_order_number') . ' ' . (int) $order['orders_id'] . ' <span class="contentText">(' . HTML::outputProtected($order['orders_status_name']) . ')</span>';
        ?>
</strong></div>
      <div class="panel-body">
        <div class="row">
          <div class="col-sm-6"><?php 
        echo '<strong>' . OSCOM::getDef('text_order_date') . '</strong> ' . DateTime::toLong($order['date_purchased']) . '<br /><strong>' . $order_type . '</strong> ' . HTML::outputProtected($order_name);
        ?>
</div>
          <br class="visible-xs" />
          <div class="col-sm-6"><?php 
        echo '<strong>' . OSCOM::getDef('text_order_products') . '</strong> ' . $Qproducts->valueInt('count') . '<br /><strong>' . OSCOM::getDef('text_order_cost') . '</strong> ' . strip_tags($order['order_total']);
        ?>
</div>
        </div>
      </div>
      <div class="panel-footer"><?php 
        echo HTML::button(OSCOM::getDef('small_image_button_view'), 'fa fa-file', OSCOM::link('account_history_info.php', (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $order['orders_id']), null, 'btn-primary btn-xs');
        ?>
</div>
    </div>
  </div>
Exemplo n.º 2
0
        } while ($Qpa->fetch());
        ?>
    </p>

<?php 
    }
    ?>

    <div class="clearfix"></div>

<?php 
    if ($Qproduct->value('products_date_available') > date('Y-m-d H:i:s')) {
        ?>

    <div class="alert alert-info"><?php 
        echo OSCOM::getDef('text_date_available', ['products_date_available' => DateTime::toLong($Qproduct->value('products_date_available'))]);
        ?>
</div>

<?php 
    }
    ?>

  </div>

<?php 
    $has_rating = false;
    $Qr = $OSCOM_Db->prepare('select count(*) as count, avg(reviews_rating) as avgrating from :table_reviews r, :table_reviews_description rd where r.products_id = :products_id and r.reviews_id = rd.reviews_id and rd.languages_id = :languages_id and reviews_status = 1');
    $Qr->bindInt(':products_id', $Qproduct->valueInt('products_id'));
    $Qr->bindInt(':languages_id', $OSCOM_Language->getId());
    $Qr->execute();
Exemplo n.º 3
0
        // MySQL 3.22 does not have INTERVAL
        list($dt_year, $dt_month, $dt_day) = explode('-', $Qdownloads->value('date_purchased_day'));
        $download_timestamp = mktime(23, 59, 59, $dt_month, $dt_day + $Qdownloads->valueInt('download_maxdays'), $dt_year);
        $download_expiry = date('Y-m-d H:i:s', $download_timestamp);
        echo '      <tr>' . "\n";
        // The link will appear only if:
        // - Download remaining count is > 0, AND
        // - The file is present in the DOWNLOAD directory, AND EITHER
        // - No expiry date is enforced (maxdays == 0), OR
        // - The expiry date is not reached
        if ($Qdownloads->valueInt('download_count') > 0 && is_file(OSCOM::getConfig('dir_root', 'Shop') . 'download/' . $Qdownloads->value('orders_products_filename')) && ($Qdownloads->valueInt('download_maxdays') == 0 || $download_timestamp > time())) {
            echo '        <td><a href="' . OSCOM::link('download.php', 'order=' . $last_order . '&id=' . $Qdownloads->valueInt('orders_products_download_id')) . '">' . $Qdownloads->value('products_name') . '</a></td>' . "\n";
        } else {
            echo '        <td>' . $Qdownloads->value('products_name') . '</td>' . "\n";
        }
        echo '        <td>' . TABLE_HEADING_DOWNLOAD_DATE . DateTime::toLong($download_expiry) . '</td>' . "\n" . '        <td align="right">' . $Qdownloads->valueInt('download_count') . TABLE_HEADING_DOWNLOAD_COUNT . '</td>' . "\n" . '      </tr>' . "\n";
    } while ($Qdownloads->fetch());
    ?>

    </table>

<?php 
    if (!strstr($PHP_SELF, 'account_history_info.php')) {
        ?>

    <p><?php 
        printf(FOOTER_DOWNLOAD, '<a href="' . OSCOM::link('account.php') . '">' . OSCOM::getDef('header_title_my_account') . '</a>');
        ?>
</p>

<?php 
Exemplo n.º 4
0
                $aa = explode('|', $a);
                $ba = explode('|', $b);
                return version_compare($aa[0], $ba[0], '>');
            });
            $VersionCache->save($releases);
        } else {
            $releases = -1;
        }
    }
}
$versions = [];
if (is_array($releases) && !empty($releases)) {
    foreach ($releases as $version) {
        $version_array = explode('|', $version);
        if (version_compare($current_version, $version_array[0], '<')) {
            $versions[] = ['version' => $version_array[0], 'date' => DateTime::toLong(substr($version_array[1], 0, 4) . '-' . substr($version_array[1], 4, 2) . '-' . substr($version_array[1], 6, 2))];
        }
    }
}
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (tep_not_null($action)) {
    switch ($action) {
        case 'getUpdateLog':
            $check = false;
            if (isset($_POST['version']) && preg_match('/^(\\d+\\.)?(\\d+\\.)?(\\d+)$/', $_POST['version'])) {
                foreach ($versions as $v) {
                    if ($v['version'] == $_POST['version']) {
                        $check = true;
                        break;
                    }
                }
Exemplo n.º 5
0
 $comments = HTML::sanitize($_POST['comments']);
 $order_updated = false;
 $Qcheck = $OSCOM_Db->get('orders', ['customers_name', 'customers_email_address', 'orders_status', 'date_purchased'], ['orders_id' => (int) $oID]);
 if ($Qcheck->value('orders_status') != $status || tep_not_null($comments)) {
     $OSCOM_Db->save('orders', ['orders_status' => $status, 'last_modified' => 'now()'], ['orders_id' => (int) $oID]);
     $customer_notified = '0';
     if (isset($_POST['notify']) && $_POST['notify'] == 'on') {
         $notify_comments = '';
         $notify_comments_html = '';
         if (isset($_POST['notify_comments']) && $_POST['notify_comments'] == 'on') {
             $notify_comments = OSCOM::getDef('email_text_comments_update', ['comments' => $comments]) . "\n\n";
             $notify_comments_html = OSCOM::getDef('email_text_comments_update_html', ['comments' => nl2br($comments)]);
         }
         $invoice_url = OSCOM::link('Shop/' . FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID);
         $email = STORE_NAME . "\n" . OSCOM::getDef('email_separator') . "\n" . OSCOM::getDef('email_text_order_number') . ' ' . $oID . "\n" . OSCOM::getDef('email_text_invoice_url') . ' ' . $invoice_url . "\n" . OSCOM::getDef('email_text_date_ordered') . ' ' . DateTime::toLong($Qcheck->value('date_purchased')) . "\n\n" . $notify_comments . OSCOM::getDef('email_text_status_update', ['status' => $orders_status_array[$status]]) . "\n";
         $email_html = '<p>' . STORE_NAME . '</p>' . OSCOM::getDef('email_separator_html') . '<p>' . OSCOM::getDef('email_text_order_number_html') . ' ' . $oID . '</p><p>' . OSCOM::getDef('email_text_invoice_url_html') . ' <a href="' . $invoice_url . '">' . $invoice_url . '</a></p><p>' . OSCOM::getDef('email_text_date_ordered_html') . ' ' . DateTime::toLong($Qcheck->value('date_purchased')) . '</p>' . $notify_comments_html . OSCOM::getDef('email_text_status_update_html', ['status' => $orders_status_array[$status]]);
         $orderEmail = new Mail($Qcheck->value('customers_email_address'), $Qcheck->value('customers_name'), STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER, OSCOM::getDef('email_text_subject'));
         $orderEmail->setBodyPlain($email);
         $orderEmail->setBodyHTML($email_html);
         $orderEmail->send();
         $customer_notified = '1';
     }
     $OSCOM_Db->save('orders_status_history', ['orders_id' => (int) $oID, 'orders_status_id' => $status, 'date_added' => 'now()', 'customer_notified' => $customer_notified, 'comments' => $comments]);
     $order_updated = true;
 }
 if ($order_updated == true) {
     $OSCOM_MessageStack->add(OSCOM::getDef('success_order_updated'), 'success');
 } else {
     $OSCOM_MessageStack->add(OSCOM::getDef('warning_order_not_updated'), 'warning');
 }
 OSCOM::redirect(FILENAME_ORDERS, tep_get_all_get_params(array('action')) . 'action=edit');
        <table width="100%" class="pull-right">
<?php 
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
    echo '          <tr>' . "\n" . '            <td align="right" width="100%">' . $order->totals[$i]['title'] . '&nbsp;</td>' . "\n" . '            <td align="right">' . $order->totals[$i]['text'] . '</td>' . "\n" . '          </tr>' . "\n";
}
?>
        </table>
      </div>


      <div class="panel-footer">
        <span class="pull-right hidden-xs"><?php 
echo OSCOM::getDef('heading_order_total') . ' ' . $order->info['total'];
?>
</span><?php 
echo OSCOM::getDef('heading_order_date') . ' ' . DateTime::toLong($order->info['date_purchased']);
?>
      </div>
    </div>
  </div>

  <div class="clearfix"></div>

  <div class="row">
    <?php 
if ($order->delivery != false) {
    ?>
      <div class="col-sm-4">
        <div class="panel panel-info">
          <div class="panel-heading"><?php 
    echo '<strong>' . OSCOM::getDef('heading_delivery_address') . '</strong>';
Exemplo n.º 7
0
      </tr>
<?php 
            if ($pInfo->products_date_available > date('Y-m-d')) {
                ?>
      <tr>
        <td align="center" class="smallText"><?php 
                echo OSCOM::getDef('text_product_date_available', ['products_date_available' => DateTime::toLong($pInfo->products_date_available)]);
                ?>
</td>
      </tr>
<?php 
            } else {
                ?>
      <tr>
        <td align="center" class="smallText"><?php 
                echo OSCOM::getDef('text_product_date_added', ['products_date_added' => DateTime::toLong($pInfo->products_date_added)]);
                ?>
</td>
      </tr>
<?php 
            }
            ?>
      <tr>
        <td>&nbsp;</td>
      </tr>
<?php 
        }
        if (isset($_GET['origin'])) {
            $pos_params = strpos($_GET['origin'], '?', 0);
            if ($pos_params != false) {
                $back_url = substr($_GET['origin'], 0, $pos_params);