예제 #1
0
파일: feed.php 프로젝트: hzhou9/coupon_deal
        if (!ab_to(array('feed' => 'import'))) {
            die;
        }
        echo '<div class="title">

<h2>' . $LANG['feed_istores_title'] . '</h2>

<div style="float:right; margin: 0 2px 0 0;">
<a href="?route=feed.php&amp;action=stores" class="btn">' . $LANG['stores_view'] . '</a>
<a href="?route=feed.php&amp;action=coupons" class="btn">' . $LANG['coupons_view'] . '</a>
</div>';
        if (!empty($LANG['feed_istores_subtitle'])) {
            echo '<span>' . $LANG['feed_istores_subtitle'] . '</span>';
        }
        echo '</div>';
        if (($feeds = \query\main::stores(array('show' => 'feed'))) === 0) {
            echo '<div class="a-error">' . $LANG['feed_importe1'] . '</div>';
        } else {
            echo '<div class="a-alert">' . sprintf($LANG['feed_importnr_stores'], $feeds) . '</div>';
            echo '<div class="form-table">

<form action="#" method="GET" autocomplete="off">

<input type="hidden" name="route" value="feed.php" />
<input type="hidden" name="action" value="import2" />
<div class="row"><span>' . $LANG['feed_from_addfrom'] . ':</span><div><input type="date" name="date" value="' . date('Y-m-d', \query\main::get_option('lfeed_check')) . '" style="width: 80%" /><input type="time" name="hour" value="' . date('H:i', \query\main::get_option('lfeed_check')) . '" style="width: 20%" /></div></div>
<div class="row"><span></span><div><input type="checkbox" name="import_expired" value="yes" id="import_expired"' . (\query\main::get_option('feed_iexpc') ? ' checked' : '') . ' /> <label for="import_expired">' . $LANG['feed_msg1'] . '</label></div></div>
<button class="btn">' . $LANG['feed_icoupons_button'] . '</button>

</form>
예제 #2
0
function site_count($type = '', $category = array())
{
    switch ($type) {
        case 'sotre':
        case 'stores':
            return \query\main::stores($category);
            break;
        case 'coupon':
        case 'coupons':
            return \query\main::coupons($category);
            break;
        case 'product':
        case 'products':
            return \query\main::products($category);
            break;
        case 'review':
        case 'reviews':
            return \query\main::reviews($category);
            break;
        case 'user':
        case 'users':
            return \query\main::users($category);
            break;
        case 'category':
        case 'categories':
            return \query\main::categories($category);
            break;
        default:
            return 'NaN';
            break;
    }
}
예제 #3
0
<div class="el-row-body"' . (!empty($show_payments) ? ' style="display: none;"' : '') . '>

<ul class="announce-box abdash">
<li>' . $LANG['today'] . ':<b>' . sprintf(PRICE_FORMAT, \site\utils::money_format((double) \query\payments::payments(array('show' => 'paid', 'date' => strtotime('today')))['sum'])) . '</b></li>
<li>' . $LANG['yesterday'] . ':<b>' . sprintf(PRICE_FORMAT, \site\utils::money_format((double) \query\payments::payments(array('show' => 'paid', 'date' => strtotime('-2 days 00:00:00') . ',' . strtotime('today')))['sum'])) . '</b></li>
<li>' . $LANG['this_week'] . ':<b>' . sprintf(PRICE_FORMAT, \site\utils::money_format((double) \query\payments::payments(array('show' => 'paid', 'date' => strtotime('last week 00:00:00')))['sum'])) . '</b></li>
<li>' . $LANG['this_month'] . ':<b>' . sprintf(PRICE_FORMAT, \site\utils::money_format((double) \query\payments::payments(array('show' => 'paid', 'date' => strtotime('first day of this month 00:00:00')))['sum'])) . '</b></li>
</ul>

</section>';
}
echo '<ul class="elements-list">';
if (ab_to(array('stores' => 'view'))) {
    echo '<li>
  <div class="info-div"><b>' . \query\main::stores() . '</b> ' . strtolower($LANG['stores']) . '</div>
  <div class="options">
  <a href="?route=stores.php&amp;action=list">' . $LANG['view'] . '</a>
  <a href="?route=stores.php&amp;action=add">' . $LANG['add'] . '</a>
  </div>
  </li>';
}
if (ab_to(array('coupons' => 'view'))) {
    echo '<li>
  <div class="info-div"><b>' . \query\main::coupons() . '</b> ' . strtolower($LANG['coupons']) . '</div>
  <div class="options">
  <a href="?route=coupons.php&amp;action=list">' . $LANG['view'] . '</a>
  <a href="?route=coupons.php&amp;action=add">' . $LANG['add'] . '</a>
  </div>
  </li>';
}