91
Check the new Tutorial subforum with helpfull guides and tutorials for modifications and tweaks.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
$search_keywords = (isset($HTTP_POST_VARS['search_keywords'])) ? trim($HTTP_POST_VARS['search_keywords']) : urldecode(trim($HTTP_GET_VARS['search_keywords']));
$search_keywords = (isset($HTTP_POST_VARS['search_keywords'])) ? trim($HTTP_POST_VARS['search_keywords']) : trim($HTTP_GET_VARS['search_keywords']);
$search_user = (isset($HTTP_POST_VARS['search_user'])) ? trim($HTTP_POST_VARS['search_user']) : urldecode(trim($HTTP_GET_VARS['search_user']));
$search_user = (isset($HTTP_POST_VARS['search_user'])) ? trim($HTTP_POST_VARS['search_user']) : trim($HTTP_GET_VARS['search_user']);
Ich habe immer noch ein Problem mit CAPTCHA. Die Bildchen erscheinen, den Text kann ich eingeben, doch dann kommt immer die Meldung:QuoteDas Feld mit dem Bestätigungs-Code muss ausgefüllt werden
Momentan ist CAPTCHA nur beim Kommentar aktiviert.
Gruss
Ursula
$site_sess->set_session_var('captcha', $code);
function update_image_rating($image_id, $rating) {
global $site_db, $user_info, $lang;
$sql = "SELECT cat_id, user_id, image_votes, image_rating
FROM ".IMAGES_TABLE."
WHERE image_id = $image_id";
$image_row = $site_db->query_firstrow($sql);
if ($user_info['user_level'] != ADMIN && $image_row['user_id'] == $user_info['user_id']) {
return "Du darfst Deine eigenen Bilder nicht bewerten";
}
if (check_permission("auth_vote", $image_row['cat_id'])) {
$old_votes = $image_row['image_votes'];
$old_rating = $image_row['image_rating'];
$new_rating = (($old_rating * $old_votes) + $rating) / ($old_votes + 1);
$new_rating = sprintf("%.2f", $new_rating);
$sql = "UPDATE ".IMAGES_TABLE."
SET image_votes = ($old_votes + 1), image_rating = '$new_rating'
WHERE image_id = $image_id";
$site_db->query($sql);
return $lang['voting_success'];
}
return $lang['voting_error'];
}
update_image_rating($id, $rating);
$msg = $lang['voting_success'];
$msg = update_image_rating($id, $rating);
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">