<div class="row"><span>' . $LANG['form_description'] . ':</span><div><textarea name="description">' . $info->description . '</textarea></div></div> <input type="hidden" name="csrf" value="' . $csrf . '" /> <button class="btn">' . $LANG['plugins_edit_button'] . '</button> </form> </div>'; echo '<div class="title" style="margin-top: 40px;"> <h2>' . $LANG['plugin_infos_title'] . '</h2> </div>'; echo '<div class="infos-table" style="padding-bottom: 20px;">'; $uploader = \query\main::user_infos($info->user)->name; echo '<div class="row"><span>' . $LANG['uploader'] . ':</span> <div>' . (empty($uploader) ? '-' : '<a href="?route=users.php&action=edit&id=' . $info->user . '">' . $uploader . '</a>') . '</div></div> <div class="row"><span>' . $LANG['added_on'] . ':</span> <div>' . $info->date . '</div></div> </div>'; } else { echo '<div class="a-error">' . $LANG['invalid_id'] . '</div>'; } break; /** UNINSTALLING */ /** UNINSTALLING */ case 'uninstall': $csrf = \site\utils::str_random(10); echo '<div class="title"> <h2>' . $LANG['plugins_uninstall_title'] . '</h2>
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>'; } foreach (\query\main::while_rewards_reqs(array_merge(array('orderby' => isset($_GET['orderby']) ? urldecode($_GET['orderby']) : 'date desc'), $options)) as $item) { $user = \query\main::user_infos($item->user); echo '<li> <input type="checkbox" name="id[' . $item->ID . ']" /> <div style="display: table;"> <img src="' . \query\main::user_avatar($user->avatar) . '" alt="" /> <div class="info-div"> <h2>' . ($item->claimed ? '<span class="msg-success">' . $LANG['claimed'] . '</span>' : '<span class="msg-error">' . $LANG['notclaimed'] . '</span>') . (empty($user->name) ? ' -' : ' <a href="?route=rewards.php&action=requests&user='******'">' . $user->name . '</a>') . ' <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> ' . ($item->reward_exists ? '<a href="?route=rewards.php&action=requests&reward=' . $item->reward . '">' . $item->name . '</a>' : $item->name) . ' / ' . $LANG['rewards_req_form_pused'] . ': <b>' . $item->points . '</b> </div></div>
</div> <div class="title" style="margin-top: 40px;"> <h2>' . $LANG['users_infos_title'] . '</h2> </div>'; echo '<div class="infos-table" style="padding-bottom: 20px;"> <div class="row"><span>ID:</span> <div>' . $info->ID . '</div></div> <div class="row"><span>' . $LANG['reffered'] . ':</span> <div>'; if (empty($info->refid)) { echo $LANG['no']; } else { $ref_user = \query\main::user_infos($info->refid); echo empty($ref_user->name) ? '-' : (ab_to(array('users' => 'edit')) ? '<a href="?route=users.php&action=edit&id=' . $info->refid . '">' . $ref_user->name . '</a>' : $ref_user->name); } echo '</div></div> <div class="row"><span>' . $LANG['referrers'] . ':</span> <div>'; if (($referrers = \query\main::users(array('referrer' => $info->ID))) > 0) { echo ab_to(array('users' => 'view')) ? '<a href="?route=users.php&action=list&referrer=' . $info->ID . '">' . $referrers . '</a>' : $referrers; } else { echo 0; } echo '</div></div> <div class="row"><span>' . $LANG['visits'] . ':</span> <div>' . $info->visits . '</div></div> <div class="row"><span>' . $LANG['registered_on'] . ':</span> <div>' . $info->date . '</div></div> <div class="row"><span>' . $LANG['last_visit'] . ':</span> <div>' . $info->last_login . '</div></div> <div class="row"><span>' . $LANG['last_action'] . ':</span> <div>' . $info->last_action . '</div></div> <div class="row"><span>' . $LANG['reviews'] . ':</span> <div>' . (ab_to(array('reviews' => 'view')) ? '<a href="?route=reviews.php&action=list&user='******'">' . $info->reviews . '</a>' : $info->reviews) . (ab_to(array('reviews' => 'add')) ? ' / <a href="?route=reviews.php&action=add&user='******'">' . $LANG['reviews_add_button'] . '</a>' : '') . '</div></div>
' . sprintf($LANG['usubscr_body'], '<span id="seconds">5</span>') . ' <br /><br /> <a href="index.php">' . $LANG['verify_clickhere'] . '</a> </section> </body> </html>'; die; } else { if (isset($_GET['user']) && isset($_GET['token']) && \user\mail_sessions::check('confirmation', array('user' => (int) $_GET['user'], 'session' => $_GET['token']))) { $stmt = $db->stmt_init(); $stmt->prepare("UPDATE " . DB_TABLE_PREFIX . "users SET valid = 1 WHERE id = ?"); $stmt->bind_param("i", $_GET['user']); $stmt->execute(); @$stmt->close(); \user\mail_sessions::clear('confirmation', array('user' => (int) $_GET['user'])); // check if user has been refered $uinfo = \query\main::user_infos($_GET['user']); if (!empty($uinfo->refid)) { \user\update::add_points($uinfo->refid, \query\main::get_option('u_points_refer')); } echo '<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="robots" content="noindex, nofollow"> <meta http-equiv="Refresh" content="5; url=index.php" /> <title>' . $LANG['uverify_metatitle'] . '</title>
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 { if (empty($item->couponID) && !empty($item->productID)) { echo '(' . $LANG['clicksr_productid'] . ': <a href="?route=clicks.php&product=' . $item->productID . '">' . $item->productID . '</a>)'; } } echo '</div></div> <div class="options">'; echo !empty($item->user) && $ab_edtu ? '<a href="?route=users.php&action=edit&id=' . $item->user . '">' . $LANG['clicksr_edit_user'] . '</a>' : ''; if ($ab_edts) { echo '<a href="?route=stores.php&action=edit&id=' . $item->storeID . '">' . $LANG['clicksr_edit_store'] . '</a>';
// Set automaticaly read this suggestion actions::action_suggestions('read', $_GET['id']); $_SESSION['suggestions_csrf'] = $csrf; $info = admin_query::suggestion_infos($_GET['id']); echo '<div class="form-table"> <form action="#" method="POST"> <div class="row"><span>' . $LANG['form_name'] . ':</span><div>' . $info->name . '</div></div> <div class="row"><span>' . $LANG['form_store_url'] . ':</span><div><a href="' . $info->url . '">' . $info->url . '</a></div></div> <div class="row"><span>' . $LANG['form_description'] . ':</span><div>' . $info->description . '</div></div> <div class="row"><span>' . $LANG['form_message_for_us'] . ':</span><div>' . $info->message . '</div></div>'; if ($info->user == 0) { $addby = '-'; } else { $info_user = \query\main::user_infos($info->user); $addby = empty($info_user) ? '-' : (ab_to(array('users' => 'edit')) ? '<a href="?route=users.php&action=edit&id=' . $info_user->ID . '">' . $info_user->name . '</a>' : $info_user->name); } echo '<div class="row"><span>' . $LANG['added_by'] . ':</span><div>' . $addby . '</div></div> <div class="row"><span>' . $LANG['added_on'] . ':</span><div>' . $info->date . '</div></div> </div>'; } else { echo '<div class="a-error">' . $LANG['invalid_id'] . '</div>'; } break; /** LIST OF SUGGESTIONS */ /** LIST OF SUGGESTIONS */ default: if (!ab_to(array('suggestions' => 'view'))) {
public static function delete_user_avatar($id) { global $db; if (!ab_to(array('users' => 'edit'))) { return false; } $id = (array) $id; $stmt = $db->stmt_init(); foreach ($id as $ID) { if (\query\main::user_exists($ID)) { $user = \query\main::user_infos($ID); $stmt->prepare("UPDATE " . DB_TABLE_PREFIX . "users SET avatar = '' WHERE id = ?"); $stmt->bind_param("i", $ID); $stmt->execute(); if (!empty($user->avatar)) { @unlink(DIR . '/' . $user->avatar); } } } @$stmt->close(); return true; }