コード例 #1
0
<?php

set_time_limit(0);
$start_time = time("now");
require_once 'lib/config.php';
require_once 'lib/ebay/selling.php';
require_once 'lib/item.php';
if (isset($_GET['user_id'])) {
    $users = array(DB::query_row("SELECT * from ebay_users where `user_id`='{$_GET['user_id']}'"));
    $lock_file = LOCK_FILE . '_' . $_GET['user_id'];
} else {
    $users = DB::query_rows("SELECT * from ebay_users");
    $lock_file = LOCK_FILE . '';
}
if (!Lock::lock($lock_file, "LOCK", 0 * 3600)) {
    die('Another instance is already running: ' . Lock::get_msg($lock_file));
}
Log::push('----- Cron job started -----');
foreach ($users as $user) {
    $user_id = $user['user_id'];
    $DEVNAME = trim($user['dev_name']);
    $APPNAME = trim($user['app_name']);
    $CERTNAME = trim($user['cert_name']);
    $paypal_email = trim($user['paypal_address']);
    $token = decrypt($user['token']);
    /* Relisting inactive items */
    $items = EbaySelling::get_items('UnsoldList');
    foreach ($items as $num => $ebay_item) {
        if (!empty($_GET['num']) && $_GET['num'] != $num) {
            continue;
        }
コード例 #2
0
                <fieldset>
<table id="table">
    <thead>
    <tr>
        <th>Id</th>
        <th>Login</th>
        <th>Name</th>
        <th>Email</th>
        <th>Sandbox</th>
        <th></th>
        <th></th>
    </tr>
    </thead>
    <tbody>
    <?php 
foreach (DB::query_rows("select * from ebay_users") as $user) {
    ?>
    <tr>
      <td> <?php 
    echo $user['user_id'];
    ?>
 </td>
      <td> <?php 
    echo $user['username'];
    ?>
 </td>
      <td> <?php 
    echo $user['name'];
    ?>
 </td>
      <td> <?php 
コード例 #3
0
ファイル: main.php プロジェクト: eparst/ebay-amazon-sync-tool
<?php

require_once 'lib/config.php';
require_once 'blocks/head.php';
?>
<body>
<?php 
require_once 'blocks/menu.php';
require_once 'lib/ebay.php';
require_once 'lib/vendorFunctions.php';
echo Cache::get("items_{$active_user}", function () {
    ob_start();
    global $active_user;
    foreach (DB::query_rows("SELECT user_products.*, TIMESTAMPDIFF(HOUR , lastUpdate, NOW()) as ts  FROM `user_products` WHERE  `UserID`='{$active_user}' ORDER BY `sort`") as $item) {
        $db_items[$item['ItemID']] = $item;
    }
    $itemTypes = array("ActiveList", "UnsoldList", "BidList", "DeletedFromSoldList", "DeletedFromUnsoldList", "ScheduledList", "SoldList");
    $itemTypes = array("ActiveList", "UnsoldList");
    foreach ($itemTypes as $type) {
        $items[$type] = Ebay_deprecated::get_items($type);
    }
    require 'blocks/listing_type_navbar.php';
    ?>
        <table class="table table-bordered" id="items_table" class="tablesorter">
            <thead>
            <tr>
                <th style="width:80px;">eBbay ID</th>
                <th style="width:80px;">SKU</th>
                <th style="width:320px;">Description</th>
                <th style="width:50px;">Image</th>
                <th style="width:50px;">Ebay price</th>