Ejemplo n.º 1
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;
    }
}
Ejemplo n.º 2
0
  <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>';
}
if (ab_to(array('products' => 'view'))) {
    echo '<li>
  <div class="info-div"><b>' . \query\main::products() . '</b> ' . strtolower($LANG['products']) . '</div>
  <div class="options">
  <a href="?route=products.php&amp;action=list">' . $LANG['view'] . '</a>
  <a href="?route=products.php&amp;action=add">' . $LANG['add'] . '</a>
  </div>
  </li>';
}
if (ab_to(array('categories' => 'view'))) {
    echo '<li>
  <div class="info-div"><b>' . \query\main::categories() . '</b> ' . strtolower($LANG['categories']) . '</div>
  <div class="options">
  <a href="?route=categories.php&amp;action=list">' . $LANG['view'] . '</a>
  <a href="?route=categories.php&amp;action=add">' . $LANG['add'] . '</a>
  </div>
  </li>';
}