Esempio n. 1
0
if (($a_rews = \query\main::reviews(array('show' => 'notvalid'))) > 0 && ab_to(array('reviews' => 'view'))) {
    $alerts[] = '<a href="?route=reviews.php&amp;action=list&amp;view=notvalid">' . sprintf($LANG['alerts_reviews'], $a_rews) . '</a>';
}
if (($a_clmreqs = \query\main::rewards_reqs(array('show' => 'notvalid'))) > 0 && ab_to(array('claim_reqs' => 'view'))) {
    $alerts[] = '<a href="?route=rewards.php&amp;action=requests&amp;view=notvalid">' . sprintf($LANG['alerts_rewardreq'], $a_clmreqs) . '</a>';
}
if (($a_coupons = \query\main::coupons(array('show' => 'notvisible'))) > 0 && ab_to(array('coupons' => 'view'))) {
    $alerts[] = '<a href="?route=coupons.php&amp;action=list&amp;view=notvisible">' . sprintf($LANG['alerts_unpubcoupons'], $a_coupons) . '</a>';
}
if (($a_products = \query\main::products(array('show' => 'notvisible'))) > 0 && ab_to(array('products' => 'view'))) {
    $alerts[] = '<a href="?route=products.php&amp;action=list&amp;view=notvisible">' . sprintf($LANG['alerts_unpubproducts'], $a_products) . '</a>';
}
if (($a_stores = \query\main::stores(array('show' => 'notvisible'))) > 0 && ab_to(array('claim_reqs' => 'view'))) {
    $alerts[] = '<a href="?route=stores.php&amp;action=list&amp;view=notvisible">' . sprintf($LANG['alerts_unpubstores'], $a_stores) . '</a>';
}
if (($a_payments = \query\payments::invoices(array('show' => 'undeliveredpayments'))) > 0 && ab_to(array('payments' => 'view'))) {
    $alerts[] = '<a href="?route=payments.php&amp;action=list&amp;view=undeliveredpayments">' . sprintf($LANG['alerts_undelipay'], $a_payments) . '</a>';
}
if (!empty($alerts)) {
    echo '<section class="el-row">

<h2>' . $LANG['news_alerts'] . ' <a href="#" class="updown" data-set="alerts">' . (isset($_SESSION['ses_set']['alerts']) && ($show_alerts = $_SESSION['ses_set']['alerts']) ? 'S' : 'R') . '</a></h2>

<div class="el-row-body"' . (!empty($show_alerts) ? ' style="display: none;"' : '') . '>

<ul class="elements-list">';
    foreach ($alerts as $v) {
        echo '<li>' . $v . '</li>';
    }
    echo '</ul>