} if ($images->images[$i]->different_square_true && $images->images[$i]->subject_gridref_precision == 1000) { $images->images[$i]->distance -= 0.5; } if ($images->images[$i]->different_square_true && $images->images[$i]->distance > 0.1) { $images->images[$i]->different_square = true; } $token->setValue("p", $images->images[$i]->getPhotographerGridref(true)); } if (isset($image->view_direction) && strlen($image->view_direction) && $image->view_direction != -1) { $token->setValue("v", $image->view_direction); } $images->images[$i]->reopenmaptoken = $token->getToken(); if ($fix6fig) { $images->images[$i]->subject_gridref = ''; //kill the cache so will be done again with use6fig; $images->images[$i]->photographer_gridref = ''; $images->images[$i]->use6fig = 1; } $db->Execute("REPLACE INTO gridsquare_moderation_lock SET user_id = {$USER->user_id}, gridsquare_id = {$image->gridsquare_id}"); $fullpath = $images->images[$i]->_getFullpath(); list($width, $height, $type, $attr) = getimagesize($_SERVER['DOCUMENT_ROOT'] . $fullpath); if (max($width, $height) < 500 || min($width, $height) < 100) { $images->images[$i]->sizestr = $attr; } } ############################# $db->Execute("UNLOCK TABLES"); ############################# $images->assignSmarty($smarty, 'unmoderated'); $smarty->display('admin_moderation.tpl');
} } $smarty->assign_by_ref('profile', $profile); $images = new ImageList(); if ($uid == $USER->user_id || $USER->hasPerm('moderator')) { if (isset($_GET['reject']) && empty($_GET['reject'])) { $statuses = array('pending', 'accepted', 'geograph'); } else { $statuses = ''; //all } } else { $statuses = array('accepted', 'geograph'); } $images->getImagesByUser($uid, $statuses, 'gridimage_id desc', $limit, true); $images->assignSmarty($smarty, 'userimages'); if (count($images->images) == $limit) { $smarty->assign('limit', $limit); } if (count($images->images)) { $overview = new GeographMapMosaic('overview'); $overview->type_or_user = $uid; $overview->assignToSmarty($smarty, 'overview'); } $profile->md5_email = md5(strtolower($profile->email)); } else { $profile = new GeographUser(); $profile->user_id = $uid; if ($uid == $USER->user_id) { if (empty($_SESSION['last_ticket_time']) || $USER->last_ticket_time > $_SESSION['last_ticket_time']) { $profile->tickets = $USER->tickets;