Esempio n. 1
0
     // confirmed - change the status and notify the owner now
     if (activateCache($_GET['cacheid'])) {
         assignUserToCase($usr['userid'], $_GET['cacheid']);
         notifyOwner($_GET['cacheid'], 0);
         lib\Objects\User\AdminNote::addAdminNote($usr['userid'], $_GET['user_id'], true, lib\Objects\User\AdminNote::CACHE_PASS, $_GET['cacheid']);
         $confirm = "<p> " . tr("viewPending_09") . ".</p>";
     } else {
         $confirm = "<p> " . tr("viewPending_10") . ".</p>";
     }
 } else {
     if (isset($_GET['confirm']) && isset($_GET['user_id']) && $_GET['confirm'] == 2) {
         // declined - change status to archived and notify the owner now
         if (declineCache($_GET['cacheid'])) {
             assignUserToCase($usr['userid'], $_GET['cacheid']);
             notifyOwner($_GET['cacheid'], 1);
             lib\Objects\User\AdminNote::addAdminNote($usr['userid'], $_GET['user_id'], true, lib\Objects\User\AdminNote::CACHE_BLOCKED, $_GET['cacheid']);
             $confirm = "<p> " . tr("viewPending_11") . ".</p>";
         } else {
             $confirm = "<p> " . tr("viewPending_12") . ".</p>";
         }
     } else {
         if ($_GET['action'] == 1 && isset($_GET['user_id'])) {
             // require confirmation
             $confirm = "<p> " . tr("viewPending_13") . " \"<a href='viewcache.php?cacheid=" . $_GET['cacheid'] . "'>" . getCachename($_GET['cacheid']) . "</a>\" " . tr("viewPending_14") . " " . getCacheOwnername($_GET['cacheid']) . ". " . tr("viewPending_15") . ".</p>";
             $confirm .= "<p><a href='viewpendings.php?user_id=" . $_GET['user_id'] . "&amp;cacheid=" . $_GET['cacheid'] . "&amp;confirm=1'>" . tr("viewPending_16") . "</a> |\n                        <a href='viewpendings.php'>" . tr("viewPending_17") . "</a></p>";
         } else {
             if ($_GET['action'] == 2 && isset($_GET['user_id'])) {
                 // require confirmation
                 $confirm = "<p> " . tr("viewPending_18") . " \"<a href='viewcache.php?cacheid=" . $_GET['cacheid'] . "'>" . getCachename($_GET['cacheid']) . "</a>\" " . tr("viewPending_14") . " " . getCacheOwnername($_GET['cacheid']) . ". " . tr("viewPending_19") . ".</p>";
                 $confirm .= "<p><a href='viewpendings.php?user_id=" . $_GET['user_id'] . "&amp;cacheid=" . $_GET['cacheid'] . "&amp;confirm=2'>" . tr("viewPending_20") . "</a> |\n                        <a href='viewpendings.php'>" . tr("viewPending_17") . "</a></p>";
             }
Esempio n. 2
0
                 tpl_set_var('lastlogin', tr('more_one_month'));
             } else {
                 if ($user_record['last_login'] >= mktime(0, 0, 0, date("m") - 12, 1, date("Y"))) {
                     tpl_set_var('lastlogin', tr('more_six_month'));
                 } else {
                     tpl_set_var('lastlogin', tr('more_12_month'));
                 }
             }
         }
     }
 }
 //Admin Note (table only)
 if ($usr['admin']) {
     $content .= '<p>&nbsp;</p><div class="content2-container bg-blue02"><p class="content-title-noshade-size1">&nbsp;<img src="tpl/stdstyle/images/blue/logs.png" class="icon32" alt="Cog Note" title="Cog Note" />&nbsp;&nbsp;&nbsp;' . tr('admin_notes') . '</p></div>';
     $content .= '<div class="content-title-noshade txt-blue08"><img src="tpl/stdstyle/images/misc/16x16-info.png" class="icon16" alt="Info" /> ' . tr('admin_notes_visible') . '<br /><img src="tpl/stdstyle/images/blue/arrow.png" class="icon16" alt="Link" /> ' . tr('management_users') . ': <a href="admin_users.php?userid=' . $user_id . '"> [' . tr('here') . ']</a></div><br />';
     $content .= adminNoteTable(lib\Objects\User\AdminNote::getAllUserNotes($user_id));
 }
 $ars = XDb::xSql("SELECT\n                    `user`.`hidden_count` AS    `ukryte`,\n                    `user`.`founds_count` AS    `znalezione`,\n                    `user`.`notfounds_count` AS `nieznalezione`\n                FROM `user` WHERE `user_id`= ? ", $user_id);
 $record = XDb::xFetchArray($ars);
 $act = $record['ukryte'] + $record['znalezione'] + $record['nieznalezione'];
 if (date('m') == 4 and date('d') == 1) {
     $act = rand(-10, 10);
 }
 $content .= '<br /><p>&nbsp;</p><div class="content2-container bg-blue02"><p class="content-title-noshade-size1">&nbsp;<img src="tpl/stdstyle/images/blue/event.png" class="icon32" alt="Caches Find" title="Caches Find" />&nbsp;&nbsp;&nbsp;' . tr('user_activity01') . '</p></div><br /><p><span class="content-title-noshade txt-blue08">' . tr('user_activity02') . '</span>:&nbsp;<strong>' . $act . '</strong></p>';
 // PowerTrails stats
 if ($powerTrailModuleSwitchOn) {
     $content .= '<div class="content2-container bg-blue02">
                     <p class="content-title-noshade-size1">
                     <img src="tpl/stdstyle/images/blue/powerTrailGenericLogo.png" width="33" class="icon32" alt="geoPaths" title="geoPaths" />&nbsp' . tr('pt001') . '</div>';
     //geoPaths medals
     $content .= buildPowerTrailIcons($user->getPowerTrailCompleted());
Esempio n. 3
0
     }
     $db = OcDb::instance();
     $db->multiVariableQuery('INSERT INTO user_settings (user_id, newcaches_no_limit) VALUES (:2, :1) ON DUPLICATE KEY UPDATE newcaches_no_limit = :1', $newIgnoreFoundLimit, $user->getUserId());
     $user = new \lib\Objects\User\User(array('userId' => $_REQUEST['userid']));
     $user->loadExtendedSettings();
 }
 //ban
 if (isset($_GET['is_active_flag']) && $_GET['is_active_flag'] == 1 && $usr['admin']) {
     $q = "UPDATE user SET is_active_flag = 1 - is_active_flag, `activation_code`='' WHERE user_id = " . intval($user_id);
     if ($record["is_active_flag"] == 0) {
         $record["is_active_flag"] = 1;
         lib\Objects\User\AdminNote::addAdminNote($usr['userid'], $user_id, true, lib\Objects\User\AdminNote::UNBAN);
     } else {
         if ($record["is_active_flag"] == 1) {
             $record["is_active_flag"] = 0;
             lib\Objects\User\AdminNote::addAdminNote($usr['userid'], $user_id, true, lib\Objects\User\AdminNote::BAN);
         }
     }
     XDb::xQuery($q);
 }
 tpl_set_var('remove_all_logs', '');
 if (!$record['activation_code']) {
     tpl_set_var('activation_codes', tr('account_is_actived'));
 } else {
     tpl_set_var('activation_codes', $record['activation_code']);
 }
 if ($record['last_login'] == "0000-00-00 00:00:00") {
     $userlogin = tr('NoDataAvailable');
 } else {
     $userlogin = strftime("%d-%m-%Y", strtotime($record['last_login']));
 }