</div>'; $p = \query\main::have_rewards_reqs($options = array('per_page' => 10, 'user' => isset($_GET['user']) ? $_GET['user'] : '', 'reward' => isset($_GET['reward']) ? $_GET['reward'] : '', 'show' => isset($_GET['view']) ? $_GET['view'] : '', 'search' => isset($_GET['search']) ? urldecode($_GET['search']) : '')); echo '<div class="results">' . ((int) $p['results'] === 1 ? sprintf($LANG['result'], $p['results']) : sprintf($LANG['results'], $p['results'])); if (!empty($_GET['user']) || !empty($_GET['reward']) || !empty($_GET['view']) || !empty($_GET['search'])) { echo ' / <a href="?route=rewards.php&action=requests">' . $LANG['reset_view'] . '</a>'; } echo '</div>'; if ($p['results']) { echo '<form action="?route=rewards.php&action=requests" method="POST"> <ul class="elements-list"> <li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>'; $ab_edt = ab_to(array('claim_reqs' => 'edit')); $ab_del = ab_to(array('claim_reqs' => 'delete')); if ($ab_edt || $ab_del) { echo '<div class="bulk_options">'; if ($ab_del) { echo '<button class="btn" name="delete" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete_all'] . '</button> '; } if ($ab_edt) { echo $LANG['action'] . ': <select name="action">'; foreach (array('claim' => $LANG['claim'], 'unclaim' => $LANG['unclaim']) as $k => $v) { echo '<option value="' . $k . '">' . $v . '</option>'; } echo '</select> <button class="btn" name="set_action">' . $LANG['set_all'] . '</button>'; } echo '</div>';
<button class="btn">' . $LANG['view'] . '</button> </form> </div>'; $p = \query\main::have_categories($options = array('per_page' => 10)); echo '<div class="results">' . ((int) $p['results'] === 1 ? sprintf($LANG['result'], $p['results']) : sprintf($LANG['results'], $p['results'])); echo '</div>'; if ($p['results']) { echo '<form action="?route=categories.php&action=list" method="POST"> <ul class="elements-list"> <li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>'; $ab_edt = ab_to(array('categories' => 'edit')); $ab_del = ab_to(array('categories' => 'delete')); if ($ab_del) { echo '<div class="bulk_options"> <button class="btn" name="delete" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete_all'] . '</button> </div>'; } foreach (\query\main::while_categories(array_merge(array('orderby' => isset($_GET['orderby']) ? urldecode($_GET['orderby']) : 'date desc'), $options)) as $item) { echo '<li> <input type="checkbox" name="id[' . $item->ID . ']" /> <div class="info-div"><h2>[' . ($item->is_subcat ? 'Sub' : 'Top') . '] ' . $item->name . ' (' . count($item->connectids) . ')</h2></div>'; echo '<div class="options">'; if ($ab_edt) { echo '<a href="?route=categories.php&action=edit&id=' . $item->ID . '">' . $LANG['edit'] . '</a>'; } if ($ab_add && !$item->is_subcat) { echo '<a href="?route=categories.php&action=add&subcat&cat=' . $item->ID . '">' . $LANG['subcategories_add'] . '</a>';
</div>'; echo '<div class="results">' . ((int) $stores['Count'] === 1 ? sprintf($LANG['result'], $stores['Count']) : sprintf($LANG['results'], $stores['Count'])); if (!empty($_GET['category']) || !empty($_GET['search'])) { echo ' / <a href="?route=feed.php&action=list">' . $LANG['reset_view'] . '</a>'; } echo '</div>'; if ($stores['Count']) { echo '<form action="#" method="GET"> <input type="hidden" name="route" value="feed.php" /> <input type="hidden" name="action" value="import_stores" /> <ul class="elements-list"> <li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>'; $feed_im = ab_to(array('feed' => 'import')); if ($feed_im) { echo '<div class="bulk_options">'; echo $LANG['category'] . ': <select name="category">'; foreach (\query\main::group_categories(array('max' => 0)) as $cat) { echo '<optgroup label="' . $cat['infos']->name . '">'; echo '<option value="' . $cat['infos']->ID . '">' . $cat['infos']->name . '</option>'; if (isset($cat['subcats'])) { foreach ($cat['subcats'] as $subcat) { echo '<option value="' . $subcat->ID . '">' . $subcat->name . '</option>'; } } echo '</optgroup>'; } echo '</select>
<?php if (!ab_to(array('stores' => 'export')) || $_SERVER["REQUEST_METHOD"] != 'POST' || !isset($_POST['csrf']) || !isset($_SESSION['products_csrf']) || $_POST['csrf'] != $_SESSION['products_csrf']) { // redirect to the last page if this can't be downloaded for any reason from above echo '<script type="text/javascript"> window.onload = function(){ window.history.go(-1); } </script>'; die; } $from = isset($_POST['date']['from']) ? strtotime($_POST['date']['from']) : strtotime('2000-01-01'); $to = isset($_POST['date']['to']) ? strtotime($_POST['date']['to']) : strtotime('tomorrow'); // disable caching header("Expires: Tue, 03 Jul 2001 06:00:00 GMT"); header("Cache-Control: max-age=0, no-cache, must-revalidate, proxy-revalidate"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // force download header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); // disposition / encoding on response body header("Content-Disposition: attachment; filename=products_" . date('dMy', $from) . "-" . date('dMy', $to) . ".csv"); header("Content-Transfer-Encoding: binary"); $file = fopen('php://output', 'w'); $head = array(); $head[] = 'Title'; $head[] = 'Link'; $head[] = 'Description';
</div>'; $p = \query\main::have_items($options = array('per_page' => 10, 'store' => isset($_GET['store']) ? $_GET['store'] : '', 'user' => isset($_GET['user']) ? $_GET['user'] : '', 'categories' => isset($_GET['category']) ? $_GET['category'] : '', 'show' => isset($_GET['view']) ? $_GET['view'] : 'all', 'search' => isset($_GET['search']) ? urldecode($_GET['search']) : '')); echo '<div class="results">' . ((int) $p['results'] === 1 ? sprintf($LANG['result'], $p['results']) : sprintf($LANG['results'], $p['results'])); if (!empty($_GET['store']) || !empty($_GET['user']) || !empty($_GET['category']) || !empty($_GET['view']) || !empty($_GET['search'])) { echo ' / <a href="?route=coupons.php&action=list">' . $LANG['reset_view'] . '</a>'; } echo '</div>'; if ($p['results']) { echo '<form action="?route=coupons.php&action=list" method="POST"> <ul class="elements-list"> <li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>'; $ab_edt = ab_to(array('coupons' => 'edit')); $ab_del = ab_to(array('coupons' => 'delete')); if ($ab_del) { echo '<div class="bulk_options">'; if ($ab_del) { echo '<button class="btn" name="delete" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete_all'] . '</button> '; } if ($ab_edt) { echo $LANG['action'] . ': <select name="action">'; foreach (array('publish' => $LANG['publish'], 'unpublish' => $LANG['unpublish']) as $k => $v) { echo '<option value="' . $k . '">' . $v . '</option>'; } echo '</select> <button class="btn" name="set_action">' . $LANG['set_all'] . '</button>'; } echo '</div>';
</div>'; $p = \query\main::have_products($options = array('per_page' => 10, 'store' => isset($_GET['store']) ? $_GET['store'] : '', 'user' => isset($_GET['user']) ? $_GET['user'] : '', 'categories' => isset($_GET['category']) ? $_GET['category'] : '', 'show' => isset($_GET['view']) ? $_GET['view'] : 'all', 'search' => isset($_GET['search']) ? urldecode($_GET['search']) : '')); echo '<div class="results">' . ((int) $p['results'] === 1 ? sprintf($LANG['result'], $p['results']) : sprintf($LANG['results'], $p['results'])); if (!empty($_GET['store']) || !empty($_GET['user']) || !empty($_GET['category']) || !empty($_GET['view']) || !empty($_GET['search'])) { echo ' / <a href="?route=products.php&action=list">' . $LANG['reset_view'] . '</a>'; } echo '</div>'; if ($p['results']) { echo '<form action="?route=products.php&action=list" method="POST"> <ul class="elements-list"> <li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>'; $ab_edt = ab_to(array('products' => 'edit')); $ab_del = ab_to(array('products' => 'delete')); if ($ab_del) { echo '<div class="bulk_options">'; if ($ab_del) { echo '<button class="btn" name="delete" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete_all'] . '</button> '; } if ($ab_edt) { echo $LANG['action'] . ': <select name="action">'; foreach (array('publish' => $LANG['publish'], 'unpublish' => $LANG['unpublish']) as $k => $v) { echo '<option value="' . $k . '">' . $v . '</option>'; } echo '</select> <button class="btn" name="set_action">' . $LANG['set_all'] . '</button>'; } echo '</div>';
</form> </div>'; $p = \query\payments::have_invoices($options = array('per_page' => 10, 'show' => isset($_GET['view']) ? $_GET['view'] : '', 'search' => isset($_GET['search']) ? urldecode($_GET['search']) : '')); echo '<div class="results">' . ((int) $p['results'] === 1 ? sprintf($LANG['result'], $p['results']) : sprintf($LANG['results'], $p['results'])); if (!empty($_GET['view']) || !empty($_GET['search'])) { echo ' / <a href="?route=payments.php&action=list">' . $LANG['reset_view'] . '</a>'; } echo '</div>'; if ($p['results']) { echo '<form action="?route=payments.php&action=list" method="POST"> <ul class="elements-list"> <li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>'; $ab_edt = ab_to(array('payments' => 'edit')); $ab_del = $GLOBALS['me']->is_admin; if ($ab_edt) { echo '<div class="bulk_options">'; if ($GLOBALS['me']->is_admin) { echo '<button class="btn" name="delete" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete_all'] . '</button> '; } echo $LANG['action'] . ': <select name="action">'; foreach (array('paid' => $LANG['paid'], 'unpaid' => $LANG['unpaid'], 'delivered' => $LANG['delivered'], 'undelivered' => $LANG['undelivered']) as $k => $v) { echo '<option value="' . $k . '">' . $v . '</option>'; } echo '</select> <button class="btn" name="set_action">' . $LANG['set_all'] . '</button>'; echo '</div>'; }
</div>'; $p = \query\main::have_reviews($options = array('per_page' => 10, 'store' => isset($_GET['store']) ? $_GET['store'] : '', 'user' => isset($_GET['user']) ? $_GET['user'] : '', 'show' => isset($_GET['view']) ? $_GET['view'] : 'all', 'search' => isset($_GET['search']) ? urldecode($_GET['search']) : '')); echo '<div class="results">' . ((int) $p['results'] === 1 ? sprintf($LANG['result'], $p['results']) : sprintf($LANG['results'], $p['results'])); if (!empty($_GET['store']) || !empty($_GET['user']) || isset($_GET['view']) || !empty($_GET['search'])) { echo ' / <a href="?route=reviews.php&action=list">' . $LANG['reset_view'] . '</a>'; } echo '</div>'; if ($p['results']) { echo '<form action="?route=reviews.php&action=list" method="POST"> <ul class="elements-list"> <li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>'; $ab_edt = ab_to(array('reviews' => 'edit')); $ab_del = ab_to(array('reviews' => 'delete')); if ($ab_edt || $ab_del) { echo '<div class="bulk_options">'; if ($ab_del) { echo '<button class="btn" name="delete" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete_all'] . '</button> '; } if ($ab_edt) { echo $LANG['action'] . ': <select name="action">'; foreach (array('publish' => $LANG['publish'], 'unpublish' => $LANG['unpublish']) as $k => $v) { echo '<option value="' . $k . '">' . $v . '</option>'; } echo '</select> <button class="btn" name="set_action">' . $LANG['set_all'] . '</button>'; } echo '</div>';
</div>'; $p = \query\main::have_pages($options = array('per_page' => 10, 'show' => 'all', 'search' => isset($_GET['search']) ? urldecode($_GET['search']) : '')); echo '<div class="results">' . ((int) $p['results'] === 1 ? sprintf($LANG['result'], $p['results']) : sprintf($LANG['results'], $p['results'])); if (!empty($_GET['search'])) { echo ' / <a href="?route=pages.php&action=list">' . $LANG['reset_view'] . '</a>'; } echo '</div>'; if ($p['results']) { echo '<form action="?route=pages.php&action=list" method="POST"> <ul class="elements-list"> <li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>'; $ab_edt = ab_to(array('pages' => 'edit')); $ab_del = ab_to(array('pages' => 'delete')); if ($ab_edt || $ab_del) { echo '<div class="bulk_options">'; if ($ab_del) { echo '<button class="btn" name="delete" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete_all'] . '</button> '; } if ($ab_edt) { echo $LANG['action'] . ': <select name="action">'; foreach (array('publish' => $LANG['publish'], 'unpublish' => $LANG['unpublish']) as $k => $v) { echo '<option value="' . $k . '">' . $v . '</option>'; } echo '</select> <button class="btn" name="set_action">' . $LANG['set_all'] . '</button>'; } echo '</div>';
<button class="btn">' . $LANG['search'] . '</button> </form> </div>'; $p = admin_query::have_clicks($options = array('per_page' => 10, 'store' => isset($_GET['store']) ? $_GET['store'] : '', 'coupon' => isset($_GET['coupon']) ? $_GET['coupon'] : '', 'product' => isset($_GET['product']) ? $_GET['product'] : '', 'search' => isset($_GET['search']) ? urldecode($_GET['search']) : '')); echo '<div class="results">' . ((int) $p['results'] === 1 ? sprintf($LANG['result'], $p['results']) : sprintf($LANG['results'], $p['results'])); if (!empty($_GET['coupon']) || !empty($_GET['product']) || !empty($_GET['search'])) { echo ' / <a href="?route=clicks.php&action=list">' . $LANG['reset_view'] . '</a>'; } echo '</div>'; if ($p['results']) { echo '<form action="?route=stores.php&action=list" method="POST"> <ul class="elements-list">'; $ab_edtu = ab_to(array('users' => 'edit')); $ab_edts = ab_to(array('stores' => 'edit')); foreach (admin_query::while_clicks(array_merge(array('orderby' => isset($_GET['orderby']) ? urldecode($_GET['orderby']) : 'date desc'), $options)) as $item) { echo '<li> <div style="display: table;"> <img src="' . \query\main::store_avatar($item->store_img) . '" alt="" style="width: 80px;" /> <div class="info-div"> <h2>' . (!empty($item->country) ? '<img src="../' . LBDIR . '/iptocountry/flags/' . strtolower($item->country) . '.png" alt="' . $item->country_full . '" title="' . $item->country_full . '" /> ' : '') . '<span style="color: ' . (!empty($item->user) ? '#990099' : '#003366') . ';" title="' . $item->browser . '">' . $item->IP . (!empty($item->user) && ($user = \query\main::user_infos($item->user)) ? ' / ' . $user->name : '') . '</span> <span class="fright date">' . date('Y.m.d, ' . (\query\main::get_option('hour_format') == 12 ? 'g:i A' : 'G:i'), strtotime($item->date)) . '</span></h2> <a href="?route=clicks.php&store=' . $item->storeID . '">' . $item->store_name . '</a> '; if (!empty($item->couponID) && empty($item->productID)) { echo '(' . $LANG['clicksr_couponid'] . ': <a href="?route=clicks.php&coupon=' . $item->couponID . '">' . $item->couponID . '</a>)'; } else {
<?php if (!ab_to(array('subscribers' => 'export')) || $_SERVER["REQUEST_METHOD"] != 'POST' || !isset($_POST['csrf']) || !isset($_SESSION['subscribers_csrf']) || $_POST['csrf'] != $_SESSION['subscribers_csrf']) { // redirect to the last page if this can't be downloaded for any reason from above echo '<script type="text/javascript"> window.onload = function(){ window.history.go(-1); } </script>'; die; } $from = isset($_POST['date']['from']) ? strtotime($_POST['date']['from']) : strtotime('2000-01-01'); $to = isset($_POST['date']['to']) ? strtotime($_POST['date']['to']) : strtotime('tomorrow'); // disable caching header("Expires: Tue, 03 Jul 2001 06:00:00 GMT"); header("Cache-Control: max-age=0, no-cache, must-revalidate, proxy-revalidate"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // force download header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); // disposition / encoding on response body header("Content-Disposition: attachment; filename=subscribers_" . date('dMy', $from) . "-" . date('dMy', $to) . ".csv"); header("Content-Transfer-Encoding: binary"); $file = fopen('php://output', 'w'); $head = array(); if ($name = isset($_POST['fields']['name'])) { $head[] = 'Name'; }
</li>'; } } else { echo '<li>' . $LANG['no_chat_yet'] . '</li>'; } echo '</ul>'; if ($chatmsgs > 0) { echo '<div class="links"> <a href="?route=chat.php">' . $LANG['chat_list'] . '</a> </div>'; } echo '</div> </section>'; } if (ab_to(array('raports' => 'view'))) { echo '<section class="el-row"> <h2>' . $LANG['clicksr_graport'] . ' <a href="#" class="updown" data-set="graprap">' . (isset($_SESSION['ses_set']['graprap']) && ($show_graprap = $_SESSION['ses_set']['graprap']) ? 'S' : 'R') . '</a> </h2> <div class="el-row-body" id="raport-date"' . (!empty($show_graprap) ? ' style="display: none;"' : '') . '> <select>'; foreach (array('hours' => $LANG['hours'], 'days' => $LANG['days'], 'weeks' => $LANG['weeks'], 'months' => $LANG['months']) as $k => $v) { echo '<option value="' . $k . '"' . (isset($_SESSION['ses_set']['lgcl']) && $_SESSION['ses_set']['lgcl'] == $k ? ' selected' : '') . '>' . $v . '</option>'; } echo '</select>'; ?>
</div>'; $p = admin_query::have_suggestions($options = array('per_page' => 10, 'show' => isset($_GET['view']) ? $_GET['view'] : '', 'search' => isset($_GET['search']) ? urldecode($_GET['search']) : '')); echo '<div class="results">' . ((int) $p['results'] === 1 ? sprintf($LANG['result'], $p['results']) : sprintf($LANG['results'], $p['results'])); if (!empty($_GET['view']) || !empty($_GET['search'])) { echo ' / <a href="?route=suggestions.php&action=list">' . $LANG['reset_view'] . '</a>'; } echo '</div>'; if ($p['results']) { echo '<form action="?route=suggestions.php&action=list" method="POST"> <ul class="elements-list"> <li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>'; $ab_edt = ab_to(array('suggestions' => 'edit')); $ab_del = ab_to(array('suggestions' => 'delete')); if ($ab_edt || $ab_del) { echo '<div class="bulk_options">'; if ($ab_del) { echo '<button class="btn" name="delete" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete_all'] . '</button> '; } if ($ab_edt) { echo $LANG['action'] . ': <select name="action">'; foreach (array('read' => $LANG['read'], 'unread' => $LANG['unread']) as $k => $v) { echo '<option value="' . $k . '">' . $v . '</option>'; } echo '</select> <button class="btn" name="set_action">' . $LANG['set_all'] . '</button>'; } echo '</div>';
public static function delete_chat_message($id) { global $db; if (!ab_to(array('chat' => 'delete'))) { return false; } $id = (array) $id; $stmt = $db->stmt_init(); $stmt->prepare("DELETE FROM " . DB_TABLE_PREFIX . "chat WHERE id = ?"); foreach ($id as $ID) { $stmt->bind_param("i", $ID); $stmt->execute(); } @$stmt->close(); return true; }
echo ' / <a href="?route=stores.php&action=list">' . $LANG['reset_view'] . '</a>'; } echo '</div>'; if ($p['results']) { echo '<form action="?route=stores.php&action=list" method="POST"> <ul class="elements-list"> <li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>'; $ab_edt = ab_to(array('stores' => 'edit')); $ab_del = ab_to(array('stores' => 'delete')); $feed_view = ab_to(array('feed' => 'view')); $ab_add_co = ab_to(array('coupons' => 'add')); $ab_view_co = ab_to(array('coupons' => 'view')); $ab_add_pr = ab_to(array('products' => 'add')); $ab_view_pr = ab_to(array('products' => 'view')); if ($ab_edt || $ab_del) { echo '<div class="bulk_options">'; if ($ab_del) { echo '<button class="btn" name="delete" data-delete-msg="' . $LANG['delete_store'] . '">' . $LANG['delete_all'] . '</button> '; } if ($ab_edt) { echo $LANG['action'] . ': <select name="action">'; foreach (array('publish' => $LANG['publish'], 'unpublish' => $LANG['unpublish']) as $k => $v) { echo '<option value="' . $k . '">' . $v . '</option>'; } echo '</select> <button class="btn" name="set_action">' . $LANG['set_all'] . '</button> '; echo $LANG['category'] . ': <select name="category">';
</div>'; $p = \query\main::have_users($options = array('per_page' => 10, 'referrer' => isset($_GET['referrer']) ? $_GET['referrer'] : '', 'show' => isset($_GET['view']) ? $_GET['view'] : '', 'search' => isset($_GET['search']) ? urldecode($_GET['search']) : '')); echo '<div class="results">' . ((int) $p['results'] === 1 ? sprintf($LANG['result'], $p['results']) : sprintf($LANG['results'], $p['results'])); if (isset($_GET['referrer']) || isset($_GET['view']) || !empty($_GET['search'])) { echo ' / <a href="?route=users.php&action=list">' . $LANG['reset_view'] . '</a>'; } echo '</div>'; if ($p['results']) { echo '<form action="?route=users.php&action=list" method="POST"> <ul class="elements-list"> <li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>'; $ab_edt = ab_to(array('users' => 'edit')); $ab_del = ab_to(array('users' => 'delete')); $ab_sm = ab_to(array('mail' => 'send')); if ($ab_edt || $ab_del) { echo '<div class="bulk_options">'; if ($ab_del) { echo '<button class="btn" name="delete" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete_all'] . '</button> '; } if ($ab_edt) { echo $LANG['action'] . ': <select name="action">'; foreach (array('verify' => $LANG['verify'], 'unverify' => $LANG['unverify']) as $k => $v) { echo '<option value="' . $k . '">' . $v . '</option>'; } echo '</select> <button class="btn" name="set_action">' . $LANG['set_all'] . '</button>'; } echo '</div>';
</div>'; $p = \query\main::have_stores($options = array('per_page' => 10, 'user' => isset($_GET['user']) ? $_GET['user'] : '', 'categories' => isset($_GET['category']) ? $_GET['category'] : '', 'show' => isset($_GET['view']) ? $_GET['view'] : 'all', 'search' => isset($_GET['search']) ? urldecode($_GET['search']) : '')); echo '<div class="results">' . ((int) $p['results'] === 1 ? sprintf($LANG['result'], $p['results']) : sprintf($LANG['results'], $p['results'])); if (!empty($_GET['user']) || !empty($_GET['category']) || !empty($_GET['view']) || !empty($_GET['search'])) { echo ' / <a href="?route=stores.php&action=list">' . $LANG['reset_view'] . '</a>'; } echo '</div>'; if ($p['results']) { echo '<form action="?route=stores.php&action=list" method="POST"> <ul class="elements-list"> <li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>'; $ab_edt = ab_to(array('stores' => 'edit')); $ab_del = ab_to(array('stores' => 'delete')); $feed_view = ab_to(array('feed' => 'view')); if ($ab_edt || $ab_del) { echo '<div class="bulk_options">'; if ($ab_del) { echo '<button class="btn" name="delete" data-delete-msg="' . $LANG['delete_store'] . '">' . $LANG['delete_all'] . '</button> '; } if ($ab_edt) { echo $LANG['action'] . ': <select name="action">'; foreach (array('publish' => $LANG['publish'], 'unpublish' => $LANG['unpublish']) as $k => $v) { echo '<option value="' . $k . '">' . $v . '</option>'; } echo '</select> <button class="btn" name="set_action">' . $LANG['set_all'] . '</button> '; echo $LANG['category'] . ': <select name="category">';
</form> </div>'; $p = admin_query::have_chat_messages($options = array('per_page' => 10, 'search' => isset($_GET['search']) ? urldecode($_GET['search']) : '')); echo '<div class="results">' . ((int) $p['results'] === 1 ? sprintf($LANG['result'], $p['results']) : sprintf($LANG['results'], $p['results'])); if (!empty($_GET['search'])) { echo ' / <a href="?route=chat.php&action=list">' . $LANG['reset_view'] . '</a>'; } echo '</div>'; if ($p['results']) { echo '<form action="?route=chat.php&action=list" method="POST"> <ul class="elements-list"> <li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>'; $ab_del = ab_to(array('chat' => 'delete')); if ($ab_del) { echo '<div class="bulk_options">'; if ($ab_del) { echo '<button class="btn" name="delete" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete_all'] . '</button>'; } echo '</div>'; } foreach (admin_query::while_chat_messages(array_merge(array('orderby' => isset($_GET['orderby']) ? urldecode($_GET['orderby']) : 'date desc'), $options)) as $item) { echo '<li> <input type="checkbox" name="id[' . $item->ID . ']" /> <div style="display: table;"> <img src="' . \query\main::user_avatar($item->user_avatar) . '" alt="" />