Example #1
0
     $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());
     $content .= '<p><span class="content-title-noshade txt-blue08">' . tr('pt140') . '</span>:&nbsp;<strong>' . powerTrailBase::getUserPoints($user_id) . '</strong> (' . tr('pt093') . ' ' . powerTrailBase::getPoweTrailCompletedCountByUser($user_id) . ')</p>';
     $pointsEarnedForPlacedCaches = powerTrailBase::getOwnerPoints($user_id);
     $content .= buildPowerTrailIcons($user->getPowerTrailOwed());
     $content .= '<p><span class="content-title-noshade txt-blue08">' . tr('pt224') . '</span>:&nbsp;<strong>' . $pointsEarnedForPlacedCaches['totalPoints'] . '</strong></p>';
 }
 //$content .= '</div>';
 // -----------  begin Find section -------------------------------------
 $content .= '<p>&nbsp;</p><div class="content2-container bg-blue02"><p class="content-title-noshade-size1">&nbsp;<img src="tpl/stdstyle/images/blue/cache-open.png" class="icon32" alt="Caches Find" title="Caches Find" />&nbsp;&nbsp;&nbsp;' . tr('stat_number_found') . '</p></div><br />';
 $seek = XDb::xMultiVariableQueryValue("SELECT COUNT(*) FROM cache_logs\n            WHERE (type=1 OR type=2) AND cache_logs.deleted='0' AND user_id= :1\n            GROUP BY YEAR(`date`), MONTH(`date`), DAY(`date`)", 0, $user_id);
 if ($seek == 0) {
     $content .= '<br /><p> <b>' . tr('not_found_caches') . '</b></p>';
 } else {
     $events_count = XDb::xMultiVariableQueryValue("SELECT COUNT(*) events_count FROM cache_logs\n                WHERE user_id= :1 AND type=7 AND deleted=0", 0, $user_id);
     $days_since_first_find = XDb::xMultiVariableQueryValue("SELECT datediff(now(), date) as old FROM cache_logs\n                WHERE deleted=0 AND user_id = :1 AND type=1 ORDER BY date LIMIT 1", 0, $user_id);
     $rsfc2 = XDb::xSql("SELECT cache_logs.cache_id cache_id, DATE_FORMAT(cache_logs.date,'%d-%m-%Y') data, caches.wp_oc cache_wp\n                FROM cache_logs, caches\n                WHERE caches.cache_id=cache_logs.cache_id AND cache_logs.type='1'\n                    AND cache_logs.user_id= ? AND cache_logs.deleted='0'\n                ORDER BY cache_logs.date DESC LIMIT 1", $user_id);