Show Posts

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.


Topics - Philmax

Pages: [1]
1
Installation, Update & Configuration / Problem nach Upgrade auf 1.7.7
« on: January 17, 2010, 11:02:48 PM »
Hallo,
ich habe heute von 1.7.4 auf 1.7.7 geupgradet, dabei habe ich vorher alle alten Files gelöscht und die neuen Dateien komplett hochgeladen.
Jetzt bekomme ich folgende Fehlermeldung:
Quote
An unexpected error occured. Please try again later.
Bad SQL Query: SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment
          FROM 4images_categories
          ORDER BY c.cat_name ASC Unknown column 'c.cat_name' in 'order clause'


Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/digitcom/includes/db_mysql.php:192) in /www/htdocs/digitcom/includes/sessions.php on line 101

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/digitcom/includes/db_mysql.php:192) in /www/htdocs/digitcom/includes/sessions.php on line 101

Ich hoffe ihr könnt mir helfen!

Vielen Dank vorab.

2
Discussion & Troubleshooting / Permission denied?
« on: October 22, 2009, 10:14:57 PM »
Hallo zusammen,
obwohl ich in letzter Zeit nichts geändert habe, bekomme ich nun folgende Meldung, wenn ich eine Kategorie öffnen will:
Code: [Select]
Warning: fopen(slideshow_1.xml) [function.fopen]: failed to open stream: Permission denied in /categories.php on line 220
Hier der Inhalt meiner categories.php:

Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: categories.php                                       *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.4                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$templates_used 'categories,category_bit,thumbnail_bit';
$main_template 'categories';

define('GET_CACHES'1);
define('ROOT_PATH''./');
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
$user_access get_permission();
include(
ROOT_PATH.'includes/page_header.php');

if (!
$cat_id || !isset($cat_cache[$cat_id]) || !check_permission("auth_viewcat"$cat_id)) {
  
redirect("index.php");
}

$cache_id create_cache_id(
  
'page.categories',
  array(
    
$user_info[$user_table_fields['user_id']],
    
$cat_id,
    
$page,
    
$perpage,
    isset(
$user_info['lightbox_image_ids']) ? substr(md5($user_info['lightbox_image_ids']), 08) : 0,
    
$config['template_dir'],
    
$config['language_dir']
  )
);

if (!
$cache_page_categories || !$content get_cache_file($cache_id)) {
// Always append session id if cache is enabled
if ($cache_page_categories) {
  
$old_session_mode $site_sess->mode;
  
$site_sess->mode 'get';
}

ob_start();

//-----------------------------------------------------
//--- Show Categories ---------------------------------
//-----------------------------------------------------
if (!check_permission("auth_upload"$cat_id)) {
  
$upload_url "";
  
$upload_button "<img src=\"".get_gallery_image("upload_off.gif")."\" border=\"0\" alt=\"\" />";
}
else {
  
$upload_url $site_sess->url(ROOT_PATH."member.php?action=uploadform&amp;".URL_CAT_ID."=".$cat_id);
  
$upload_button "<a href=\"".$upload_url."\"><img src=\"".get_gallery_image("upload.gif")."\" border=\"0\" alt=\"\" /></a>";
}

$random_cat_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" get_random_image($cat_id);
$site_template->register_vars(array(
  
"categories" => get_categories($cat_id),
  
"cat_name" => format_text($cat_cache[$cat_id]['cat_name'], 2),
  
"cat_description" => format_text($cat_cache[$cat_id]['cat_description'], 101),
  
"cat_hits" => $cat_cache[$cat_id]['cat_hits'],
  
"upload_url" => $upload_url,
  
"upload_button" => $upload_button,
  
"random_cat_image" => $random_cat_image
));

unset(
$random_cat_image);

//-----------------------------------------------------
//--- Show Images -------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  
"has_rss"   => true,
  
"rss_title" => "RSS Feed: ".format_text($cat_cache[$cat_id]['cat_name'], 2)." (".str_replace(':'''$lang['new_images']).")",
  
"rss_url"   => $script_url."/rss.php?action=images&amp;".URL_CAT_ID."=".$cat_id
));

$num_rows_all = (isset($cat_cache[$cat_id]['num_images'])) ? $cat_cache[$cat_id]['num_images'] : 0;
$link_arg $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id);

include(
ROOT_PATH.'includes/paging.php');
$getpaging = new Paging($page$perpage$num_rows_all$link_arg);
$offset $getpaging->get_offset();

$site_template->register_vars(array(
  
"paging" => $getpaging->get_paging(),
  
"paging_stats" => $getpaging->get_paging_stats()
));

$imgtable_width ceil((intval($config['image_table_width'])) / $config['image_cells']);
if ((
substr($config['image_table_width'], -1)) == "%") {
  
$imgtable_width .= "%";
}

$additional_sql "";
if (!empty(
$additional_image_fields)) {
  foreach (
$additional_image_fields as $key => $val) {
    
$additional_sql .= ", i.".$key;
  }
}

$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name")."
        FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
        WHERE i.image_active = 1 AND i.cat_id = 
$cat_id AND c.cat_id = i.cat_id
        ORDER BY "
.$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort']."
        LIMIT 
$offset$perpage";
$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);

if (!
$num_rows)  {
  
$thumbnails "";
  
$msg $lang['no_images'];
}
else {
  
$thumbnails "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";
  
$count 0;
  
$bgcounter 0;
  
//-----------------------------------------------------
//--- flash Show changes 01 starts here          ---------
//-----------------------------------------------------
//-----------------------------------------------------
// Configrable variables ------------------------------
$max_height "1024";  // any images with a greater height will not be included in slide show
$max_width   "1024";  // any images with a greater width will not be included in slide show
//-----------------------------------------------------
$xmlfile_user "slideshow_".$user_info['user_id'].".xml"// [UPDATED] mod for unique xml slideshow file by user : don't change this value : .SWF need it

  
foreach (glob('slideshow_*') as $filename) {
//    $Diff = (time() - filemtime($filename))/60/60/24; // Difference in days
    
$Diff = (time() - filemtime($filename))/60/60// Difference in hours
//    $Diff = (time() - filemtime($filename))/60; // Difference in minutes
    
if ($Diff 1unlink($filename); // xx days/hours/minutes after generation, the .xml file is deleted
  
}

$xmlcontent ="";
$imagePath MEDIA_PATH."/".$cat_id."/";
$countit 0;

if (
file_exists($xmlfile_user) === TRUE) {
unlink($xmlfile_user);
}

$xmlcontent.="<slideshow>\r\n  <settings>\r\n    <image_folder>".$imagePath."</image_folder>\r\n    <time>3</time>\r\n    <fade>2</fade>\r\n    <pause>false</pause>\r\n    <playReverse>false</playReverse>\r\n    <repeat>true</repeat>\r\n    <captions>true</captions>\r\n  </settings>\r\n  <images>\r\n\r\n";
//-----------------------------------------------------
//--- flash Show changes 01 ends here          ---------
//-----------------------------------------------------
  
while ($image_row $site_db->fetch_array($result)){
    if (
$count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
$thumbnails .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$thumbnails .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

    
show_image($image_row);
    
$thumbnails .= $site_template->parse_template("thumbnail_bit");
    
$thumbnails .= "\n</td>\n";

    
$count++;
    if (
$count == $config['image_cells']) {
      
$thumbnails .= "</tr>\n";
      
$count 0;
    }
    
//-----------------------------------------------------
//--- flash Show changes 02 starts here          ---------
//-----------------------------------------------------
     
if (!is_remote($image_row['image_media_file'])) {
      
$image_info = @getimagesize(($imagePath."/".$image_row['image_media_file']));
      
$width $image_info[0];
      
$height $image_info[1];
    } 
// end if

    
$flashshow_id MEDIA_PATH."/".$image_row['cat_id']."/";

    if (
$width  >= $max_width) continue;
    if (
$height >= $max_height) continue;

   if (
stristr($image_row['image_media_file'],".jpg") || stristr($image_row['image_media_file'],".jpeg") || stristr($image_row['image_media_file'],".bmp") || stristr($image_row['image_media_file'],".gif")){
      
$countit $countit 1;

$xmlcontent.="    <image>\r\n      <file>".$image_row['image_media_file']."</file>\r\n      <caption>\r\n        <![CDATA[".$image_row['image_name']."]]>\r\n      </caption>\r\n    </image>\r\n\r\n";
   } 
// end if
//-----------------------------------------------------
//--- flash Show changes 02 ends here          ---------
//-----------------------------------------------------
  
// end while

  
if ($count 0)  {
    
$leftover = ($config['image_cells'] - $count);
    if (
$leftover 0) {
      for (
$i 0$i $leftover$i++){
        
$thumbnails .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      
$thumbnails .= "</tr>\n";
    }
  }
  
$thumbnails .= "</table>\n";
  
//-----------------------------------------------------
//--- flash Show changes 03 starts here          ---------
//-----------------------------------------------------
$xmlcontent.="  </images>\r\n</slideshow>\r\n";

   if (!
$handle fopen($xmlfile_user'a')) {
         
$msg .= "Impossible to read (<b>$xmlfile_user</b>)";
         exit;
   }

   if (
fwrite($handle$xmlcontent) === FALSE) {
       
$msg .= "Impossible to write (<b>$xmlfile_user</b>)";
       exit;
   }
//-----------------------------------------------------
//--- flash Show changes 03 starts here          ---------
//-----------------------------------------------------
//end else
//-----------------------------------------------------
//--- flash Show changes 04 starts here          ---------
//-----------------------------------------------------

   
if ($countit 1)  {
      
$flashshow_url $site_sess->url(ROOT_PATH."flashshow.php?action=flashshow&amp;".URL_CAT_ID."=".$cat_id);
        
$flashshow_button "<A HREF=\"#\" onClick=\"window.open('".$flashshow_url."','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=640, height=480');return(false)\"><img src=\"".get_gallery_image("flashshow.gif")."\" border=\"0\" alt=\"".$lang['alt_flashshow']."\" /></a>";
   } else {
      
$flashshow_button " <img src=\"".get_gallery_image("flashshow_off.gif")."\" border=\"0\" alt=\"Sorry, but you cannot make a flashshow with only 1 picture!!!\" />";
   }

$num_rows_all = (isset($cat_cache[$cat_id]['num_images'])) ? $cat_cache[$cat_id]['num_images'] : 0;

 if (
$num_rows_all 0)  {
  
$random_cat_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" get_random_image($cat_id);
  
$site_template->register_vars(array(
  
"flashshow_url" => $flashshow_url,
  
"cat_name" => htmlspecialchars($cat_cache[$cat_id]['cat_name']),
  
"flashshow_button" => $flashshow_button
  
));
}

//-----------------------------------------------------
//--- flash Show changes 04 ends here          ---------
//-----------------------------------------------------
$site_template->register_vars("thumbnails"$thumbnails);
unset(
$thumbnails);

//################################ Start MOD Ajax Slideshow/Diashow ##############################
$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name")."
        FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
        WHERE i.image_active = 1 AND i.cat_id = 
$cat_id AND c.cat_id = i.cat_id
        ORDER BY "
.$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort']."
        LIMIT 
$offset, ".$config['ajax_slideshowviewer_how_many']."";

$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);

$max_length_image_name 65;
$max_length_image_description 55;
$ajax_slideshow_view 0;

if (!
$num_rows)  {
  
$site_template->register_vars(array(
  
"ajax_slideshow" => "",
  
"ajax_slideshow_button" => "",
));
}
else {
  
$ajax_slideshow "<script type=\"text/javascript\" src=\"http://slideshow.triptracker.net/slide.js\"></script>\n";
  
$ajax_slideshow .= "<script type=\"text/javascript\">\n<!-- \n";
  
$ajax_slideshow .= "var viewer = new PhotoViewer();\n";
  
$ajax_slideshow .= "viewer.setSlideDuration(".$config['ajax_slideshowviewer_setSlideDuration'].");\n";
  
$ajax_slideshow .= "viewer.".$config['ajax_slideshowviewer_Panning']."Panning();\n";
  
$ajax_slideshow .= "viewer.".$config['ajax_slideshowviewer_AutoPlay']."AutoPlay();\n";
  
$ajax_slideshow .= "viewer.".$config['ajax_slideshowviewer_Fading']."Fading();\n";
  
$ajax_slideshow .= "viewer.setBackgroundColor('".$config['ajax_slideshowviewer_setBackgroundColor']."');\n";
  
$ajax_slideshow .= "viewer.setBorderWidth(".$config['ajax_slideshowviewer_setBorderWidth'].");\n";
  
$ajax_slideshow .= "viewer.setFontSize(".$config['ajax_slideshowviewer_setFontSize'].");\n";
  
$ajax_slideshow .= "viewer.".$config['ajax_slideshowviewer_Shade']."Shade();\n";
  
$ajax_slideshow .= "viewer.setShadeColor('".$config['ajax_slideshowviewer_setShadeColor']."');\n";
  
$ajax_slideshow .= "viewer.setShadeOpacity('".$config['ajax_slideshowviewer_setShadeOpacity']."');\n";
  
$ajax_slideshow .= "viewer.".$config['ajax_slideshowviewer_Loop']."Loop();\n";
  
$ajax_slideshow .= "viewer.setOnClickEvent(".$config['ajax_slideshowviewer_OnClickEvent'].");\n";
  if (
$config['ajax_slideshowviewer_Toolbar'] == "disable") {
  
$ajax_slideshow .= "viewer.disableToolbar();\n"; }
  if (
$config['ajax_slideshowviewer_EmailLink'] == "disable") {
  
$ajax_slideshow .= "viewer.disableEmailLink();\n"; }
  if (
$config['ajax_slideshowviewer_PhotoLink'] == "disable") {
  
$ajax_slideshow .= "viewer.disablePhotoLink();\n"; }
  
$count 0;
  
$bgcounter 0;
while (
$image_row $site_db->fetch_array($result)) {
   
$ext get_file_extension($image_row['image_media_file']);
   
$config['ajax_slideshowviewer_Types_array'] = explode(","$config['ajax_slideshowviewer_Types']);
   if (
in_array($ext$config['ajax_slideshowviewer_Types_array'])) {
   
$ajax_slideshow_view 1;
   
show_image($image_row);
   
$image_name_short = (isset($image_row['image_name']) && strlen($image_row['image_name']) > $max_length_image_name) ? substr(format_text(stripslashes($image_row['image_name']), 2), 0$max_length_image_name)."..." format_text(stripslashes($image_row['image_name']), 2);
   
$image_name_short str_replace("\r","",$image_name_short);
   
$image_name_short str_replace("\n","",$image_name_short);
   
$image_name_short str_replace("<br>","",$image_name_short);
   
$image_name_short str_replace("<br />","",$image_name_short);
   
$image_name_short str_replace("'","",$image_name_short);
   
$image_name_short str_replace("&lt;","<",$image_name_short);
   
$image_name_short str_replace("&gt;",">",$image_name_short);
   
$image_name_short stripslashes($image_name_short);
   
$image_name_short "".$lang['image_name'].$image_name_short";

   if (
$config['ajax_slideshowviewer_description'] == "enable") {
   
$image_description_short = (isset($image_row['image_description']) && strlen($image_row['image_description']) > $max_length_image_description) ? substr(format_text(stripslashes($image_row['image_description']), 101), 0$max_length_image_description)."..." format_text(stripslashes($image_row['image_description']), 101);
   
$image_description_short str_replace("\r","",$image_description_short);
   
$image_description_short str_replace("\n","",$image_description_short);
   
$image_description_short str_replace("<br>","",$image_description_short);
   
$image_description_short str_replace("<br />","",$image_description_short);
   
$image_description_short str_replace("'","",$image_description_short);
   
$image_description_short str_replace("&lt;","<",$image_description_short);
   
$image_description_short str_replace("&gt;",">",$image_description_short);
   
$image_description_short stripslashes($image_description_short);

   if (
$image_description_short == "")  {
   
$image_description_short "&nbsp;";
   } else {
    
$image_description_short "<br>".$lang['description'].$image_description_short";
   }
   }
   else {
   
$image_description_short "&nbsp;";
   }
   
$ajax_slideshow .= "viewer.add('".MEDIA_DIR."/".$image_row['cat_id']."/".$image_row['image_media_file']."', '".$image_description_short."', '".$image_name_short."');\n";
   }
   }
  if (
$count 0)  {
    
$leftover = ($config['image_cells'] - $count);
  }
  
$ajax_slideshow .= "//-->\n</script>\n";

if (
$user_info['user_level'] == GUEST && $config['ajax_slideshowviewer_Show'] == "1" && $ajax_slideshow_view == "1") {
  
$ajax_slideshow_button "<img src=\"".get_gallery_image("diashow_off.gif")."\" border=\"0\" alt=\"\" />";
  
$site_template->register_vars(array(
  
"ajax_slideshow_button" => $ajax_slideshow_button
  
));
}
elseif (
$user_info['user_level'] != GUEST && $config['ajax_slideshowviewer_Show'] == "1" && $ajax_slideshow_view == "1" || $config['ajax_slideshowviewer_Show'] == "2" && $ajax_slideshow_view == "1") {
  
$ajax_slideshow_button "<a href=\"javascript:void(viewer.show(0))\"><img src=\"".get_gallery_image("diashow.gif")."\" border=\"0\" alt=\"\" /></a>";
  
$site_template->register_vars(array(
  
"ajax_slideshow" => $ajax_slideshow,
  
"ajax_slideshow_button" => $ajax_slideshow_button
  
));
}
else {
  
$site_template->register_vars(array(
  
"ajax_slideshow" => "",
  
"ajax_slideshow_button" => "",
));
}
}
unset(
$ajax_slideshow);
//################################ End MOD Ajax Slideshow/Diashow ##############################
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].get_category_path($cat_id)."</span>";

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  
"msg" => $msg,
  
"clickstream" => $clickstream
));

$site_template->print_template($site_template->parse_template($main_template));

$content ob_get_contents();
ob_end_clean();

if (
$cache_page_categories) {
  
// Reset session mode
  
$site_sess->mode $old_session_mode;

  
save_cache_file($cache_id$content);
}

// end if get_cache_file()

echo $content;

//Update Category Hits
if ($user_info['user_level'] != ADMIN && $page == 1) {
  
$sql "UPDATE ".CATEGORIES_TABLE."
          SET cat_hits = cat_hits + 1
          WHERE cat_id = 
$cat_id";
  
$site_db->query($sql);
}

include(
ROOT_PATH.'includes/page_footer.php');
?>

Ich würde mich freuen, wenn ihr mir helfen könnt!

Vielen Dank vorab.

Viele Grüße
Philipp

3
Mods & Plugins (Requests & Discussions) / Blog intergrieren?
« on: January 05, 2008, 03:14:06 PM »
Hallo zusammen,
ist es möglich in eine vorhandene 4iamges Galerie ein Blog (z.b. Wordpress) zu integrieren?

Ich stelle mir dass so vor, dass auch die User übernommen werden, um Kommentare zu schreiben, oder ähnliches!

Ich bin dankbar für jeden Tipp!

Gruß Philipp

4
Discussion & Troubleshooting / Fehler in rndimg.php
« on: July 26, 2007, 09:16:57 PM »
Bei der Registrierung wird dieses Script aufgerufen:
rndimg.php

Beim Aufrufen bekomme ich folgende Fehlermeldung:
Quote
Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(..) is not within the allowed path(s): (/www/htdocs/digitcom/:/tmp:/usr/bin:/www/htdocs/digitcom:/bin:/usr/local/bin:/usr/share/php) in /www/htdocs/digitcom/rndimg.php on line 88

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(..) is not within the allowed path(s): (/www/htdocs/digitcom/:/tmp:/usr/bin:/www/htdocs/digitcom:/bin:/usr/local/bin:/usr/share/php) in /www/htdocs/digitcom/rndimg.php on line 88

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(..) is not within the allowed path(s): (/www/htdocs/digitcom/:/tmp:/usr/bin:/www/htdocs/digitcom:/bin:/usr/local/bin:/usr/share/php) in /www/htdocs/digitcom/rndimg.php on line 88

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(..) is not within the allowed path(s): (/www/htdocs/digitcom/:/tmp:/usr/bin:/www/htdocs/digitcom:/bin:/usr/local/bin:/usr/share/php) in /www/htdocs/digitcom/rndimg.php on line 88

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(..) is not within the allowed path(s): (/www/htdocs/digitcom/:/tmp:/usr/bin:/www/htdocs/digitcom:/bin:/usr/local/bin:/usr/share/php) in /www/htdocs/digitcom/rndimg.php on line 88

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(..) is not within the allowed path(s): (/www/htdocs/digitcom/:/tmp:/usr/bin:/www/htdocs/digitcom:/bin:/usr/local/bin:/usr/share/php) in /www/htdocs/digitcom/rndimg.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/digitcom/rndimg.php:88) in /www/htdocs/digitcom/rndimg.php on line 144
ÿØÿàJFIFÿþ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality ÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀ2}"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?ö‹­ç´ŽžêûyW·°ÿ€“š³²'L®žÅJ(?Σkž%a,ª0Ò@ņ:c'"ªÚÙMs$âêòyÕ(Ý–1´zž§šnœU"’ØiìÒ[¶Ã¼'Lœt>‚©^EklTé賸 ŠÛ9É<Ç?¥2ïKH ’æÉ–Ñò¦G‚Û:ädO5Ïê9Ñ<;©gÏmxò”Gše %”œœžë@tcKÊîdä~©ØAäFöÒ[[‡‰Ø*ùª~^ ôÈëŠç¬üW¡^ÝC‡«&žó9óR[pà‘Øçƒ]0ѤóÍѾ›í%vB($z`q@êa{0ÖVºá@Üê?._òЮç†5ögPâj‚ér]^H..SùQ Œî'‘ô¬Ûí^==nîîu‹§²L–! .ÝÐ0'?—á@(»µ <«kQ|³M¿´[»b"†ÔÊ„"r6ž‡=3^tþ;Ô„Âö;)HXœœq´žOjíteµm(jWW¿d·ÜB©•q÷ dwâ€5-æív…HË7ê:v9ª–3ÚÝßÞMj,$UÙ‘n öÏLc¿j„-„¢Ý´ę̈œ†ÚåUpAÎAëëêMh]tÒ¼QŽ’=È‹Ûo>ã÷VóH-튄'vö=½ñùÔ:li%‚Iö[pŒY‹,„XúŒÕHgÕ~×Æ¡rlÁؾUÄyqÈå—‘ÅX’9tË/ôK²ñÄÅÝÐ ‹ž»±ž<ú .ÖÖÓR…î`†:˜÷} ®Hù‡}y¤¼Ó–I¢†Ü¡@A{‡Éý*彂«4²\O3ç«Ì~µdêz]¼—…Õ¯WpÉj¦%Ïû»¨ÔWÉ5²O§„l uÌî™ã®Ñ’{zTv“ßï–V»²¸Û€U•6prsÓÚž&¿µŠ0÷ks€7¸D`;ð­9u»g ßÚ0ÄWï,ó*ÊkVàJc“/Ì$gaé»øyçLWœxÖÒ/øÇI¼µíö'Ë0$­‚§=FÒz†µ ½’%Ë^¨RTI&[-óžà~5Ç|Tv¿Ò¬.ÖO* yìI`:}p(kZðE–´?ãÞÒÒ@Ïkg"ñ‚{Ä~U‘ðóU¾K»ÿ]ÇòÙî1™qP­µ—=p ü}ªañjÆ ÝVÎy¯VVö®ürIî3XÑï/¬µ}Fîõ´ùu$(—~g Äü-Œv  üAâÛ‡¶¹Ñô”‚2›õí¬-µuO$tÁ<3Rø;Â[ðuŒÓ\˜¢Ë&Ä…˜¿!H$tû½‡zÈÔÇâ ¬ÊܒΧåäí>½3Ü×KàËÍWDðD{$ n-̺wÊà’Û˜‚q·’F?ŸÆÊIi…´ûUyؤebL‚ªäøVg‡¼=öûÙlfvAn§Ìò—q$ëÍfè:ÕŽ”²ÞÜÂnu˜Î *¹r9?0ÏÒ¯X_ÞjÚíÅæ‰k-¼§.T0p3×’1Éç€-jz\š Ñ^[™,åN 3ÁÜ9SVE®£â½T$âKkERÑ•€íŒRr9ÍPÖ¬5;e†mRQçIÂB[,®gù×Qyª]økL´2Go¼Ú¤1ÆÈÛ·/Þ'§Šç嵓ž$´Ž ¹do”ÈËÒÀœ'·¯zî»êkûé® ¬Š–Öª~n¹íÒ¹=F½ÕgmZå‘å“;d,£¶â3Žp3Æ+«ŠNÆßIgui,OÊÈ:œÄ?¥+Eymq 6ú¤Ø• 5¨`¸ð@^8NóN¸yŸQ¹™öýᦫ§Ž•)ÔÞòâÚD°{‹UVýè€\· yà<ì¥PèSüj.´Ëí"¿¹µ– 6H—2 SŽAÈíš}¤ÝXÚÈÆ9I@Ù’ÓŽG À^òÎßûbÀ²Ûùƒ~Ð-è?:̇Kðõ–ª—vVzx„Ç)h”+ç#^àžG¥omY°ò¡ºLGDe }X £ÿ¯V]M˜Ù\§u’ TþuFÂê(b{-¸H\¢nHê1Î;ãߘÚuΉu¥jò ûaÝ!7ƒæÆ1´ã¶Œ~y«“ :ÂÂÃNûUª[£$IÜò ès×€+KP%„­,[âE/´¢0àÆ¡³°µM>lþír­nÕj+x%Òlî$†7ŸÊÌe³ëž´Q@„%–×veÈàœŽ•±-¥²éÎ‚Þ ¾_@ƒ(¢€0ml­]h¬"&1Úy^Ô둧TùT8Æ(¢€%{Kh,¢¸ŠÞ(æe,Ò"Äú“Ö´aµ·ÔmŒw¶ñ\ líÈÑEZµ¶·Ž J@Ú€w¨®m w,ðÆÌ£ J@ëÅP²ÅÙùi™ÎÑéU´˜Ð-É ™Fxëò­P6¿m É$1»¤˜Fe¨ç¡í]ª+YÀYA>ZòGµPÿÙ

Kann mir jemand sagen, was ich tun muss, um das zu beheben???

Danke vorab.

5
Hallo zusammen,
ich kann manche Profile auf meiner Seite nicht aufrufen, siehe:
http://www.fotos-zeigen.de/member.php?action=showprofile&user_id=949

Bei den meisten anderen geht es, hat jemand eine Idee, woran es liegen könnte?

Vielen Dank vorab!

Gruß Philmax

6
Hallo zusammen,
ist es möglich auf einer externen Seite mehrere Zufallsbilder anzeigen zu lassen?

Ich habe schon gesucht, aber offenbar nicht das richtige gefunden.

Vielen Dank vorab.

Gruß Philmax

7
Discussion & Troubleshooting / Problem beim E-Mail Adresse ändern
« on: October 29, 2006, 03:24:17 PM »
Hallo zusammen,
ich habe seit einiger Zeit das Problem, wenn ein User seine E-Mail Adresse ändern will, bekommt er einen neuen Aktivierungslink, wenn er diesen anklickt, wird der User mit allen Daten aus der Datenbank gelöscht!
Hat jemand eine Idee, woran das liegen könnte???

Hier der Inhalt meiner member.php

[code]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: member.php                                           *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7                                                  *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$main_template = "member";

define('GET_CACHES', 1);
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
include(ROOT_PATH.'includes/page_header.php');

if ($action == "") {
  $action = "lostpassword";
}
$content = "";
$txt_clickstream = "";

$sendprocess = 0;

if (isset($HTTP_GET_VARS[URL_COMMENT_ID]) || isset($HTTP_POST_VARS[URL_COMMENT_ID])) {
  $comment_id = (isset($HTTP_GET_VARS[URL_COMMENT_ID])) ? intval($HTTP_GET_VARS[URL_COMMENT_ID]) : intval($HTTP_POST_VARS[URL_COMMENT_ID]);
}
else {
  $comment_id = 0;
}

if ($action == "deletecomment") {
  if (!$comment_id || ($config['user_delete_comments'] != 1 && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
    exit;
  }

  $sql = "SELECT c.comment_id, c.user_id AS comment_user_id, i.image_id, i.cat_id, i.user_id, i.image_name
          FROM ".COMMENTS_TABLE." c, ".IMAGES_TABLE." i
          WHERE c.comment_id = $comment_id AND i.image_id = c.image_id";
  $comment_row = $site_db->query_firstrow($sql);
  if (!$comment_row || $comment_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $comment_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
    exit;
  }

  $txt_clickstream = get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".$comment_row['image_name']."</a>".$config['category_separator'];
  $txt_clickstream .= $lang['comment_delete'];

  $sql = "UPDATE ".IMAGES_TABLE."
          SET image_comments = image_comments - 1
          WHERE image_id = ".$comment_row['image_id'];
  $site_db->query($sql);

  if ($comment_row['comment_user_id'] != GUEST) {
    $sql = "UPDATE ".USERS_TABLE."
            SET ".get_user_table_field("", "user_comments")." = ".get_user_table_field("", "user_comments")." - 1
            WHERE ".get_user_table_field("", "user_id")." = ".$comment_row['comment_user_id'];
    $site_db->query($sql);
  }

  $sql = "DELETE FROM ".COMMENTS_TABLE."
          WHERE comment_id = $comment_id";
  $result = $site_db->query($sql);
  $msg = ($result) ? $lang['comment_delete_success'] : $lang['comment_delete_error'];
}

if ($action == "removecomment") {
  if (!$comment_id || ($config['user_delete_comments'] != 1 && $user_info['user_level'] != ADMIN)) {
    header("Location: ".$site_sess->url($url, "&"));
    exit;
  }

  $sql = "SELECT c.comment_id, c.image_id, c.user_id AS comment_user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, i.image_name, i.cat_id, i.user_id".get_user_table_field(", u.", "user_name")."
          FROM ".COMMENTS_TABLE." c, ".IMAGES_TABLE." i
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
          WHERE c.comment_id = $comment_id AND i.image_id = c.image_id";
  $comment_row = $site_db->query_firstrow($sql);
  if (!$comment_row || $comment_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $comment_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    header("Location: ".$site_sess->url($url, "&"));
    exit;
  }

  $txt_clickstream = get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".$comment_row['image_name']."</a>".$config['category_separator'];
  $txt_clickstream .= $lang['comment_delete'];

  if (isset($comment_row[$user_table_fields['user_name']]) && $comment_row['comment_user_id'] != GUEST) {
    $user_name = $comment_row[$user_table_fields['user_name']];
  }
  else {
    $user_name = $comment_row['comment_user_name'];
  }

  $site_template->register_vars(array(
    "comment_id" => $comment_id,
    "image_name" => htmlspecialchars($comment_row['image_name']),
    "user_name" => htmlspecialchars($user_name),
    "comment_headline" => format_text($comment_row['comment_headline'], 0, $config['wordwrap_comments'], 0, 0),
    "comment_text" => format_text($comment_row['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
    "lang_delete_comment" => $lang['comment_delete'],
    "lang_delete_comment_confirm" => $lang['comment_delete_confirm'],
    "lang_image_name" => $lang['image_name'],
    "lang_name" => $lang['name'],
    "lang_headline" => $lang['headline'],
    "lang_comment" => $lang['comment'],
    "lang_submit" => $lang['submit'],
    "lang_reset" => $lang['reset'],
    "lang_yes" => $lang['yes'],
    "lang_no" => $lang['no']
  ));
  $content = $site_template->parse_template("member_deletecomment");
}

if ($action == "updatecomment") {
  if (!$comment_id || ($config['user_edit_comments'] != 1 && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
    exit;
  }
  $sql = "SELECT c.comment_id, c.image_id, i.image_name, i.cat_id, i.user_id".get_user_table_field(", u.", "user_name")."
          FROM ".COMMENTS_TABLE." c, ".IMAGES_TABLE." i
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
          WHERE c.comment_id = $comment_id AND i.image_id = c.image_id";
  $comment_row = $site_db->query_firstrow($sql);
  if (!$comment_row || $comment_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $comment_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
    exit;
  }

  $txt_clickstream = get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".$comment_row['image_name']."</a>".$config['category_separator'];
  $txt_clickstream .= $lang['comment_edit'];

  $error = 0;

  $comment_headline = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_headline']));
  $comment_text = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_text']));

  if ($comment_headline == "")  {
    $error = 1;
    $field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['headline']), $lang['field_required']);
    $msg .= (($msg != "") ? "<br />" : "").$field_error;
  }
  if ($comment_text == "")  {
    $error = 1;
    $field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['comment']), $lang['field_required']);
    $msg .= (($msg != "") ? "<br />" : "").$field_error;
  }

  if (!$error) {
    $sql = "UPDATE ".COMMENTS_TABLE."
            SET comment_headline = '$comment_headline', comment_text = '$comment_text'
            WHERE comment_id = $comment_id";
    $result = $site_db->query($sql);
    $msg = ($result) ? $lang['comment_edit_success'] : $lang['comment_edit_error'];
  }
  else {
    $action = "editcomment";
    $sendprocess = 1;
  }
}

if ($action == "editcomment") {
  if (!$comment_id || ($config['user_edit_comments'] != 1 && $user_info['user_level'] != ADMIN)) {
    header("Location: ".$site_sess->url($url, "&"));
    exit;
  }

  $sql = "SELECT c.comment_id, c.image_id, c.user_id AS comment_user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, i.image_name, i.cat_id, i.user_id".get_user_table_field(", u.", "user_name")."
          FROM ".COMMENTS_TABLE." c, ".IMAGES_TABLE." i
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
          WHERE c.comment_id = $comment_id AND i.image_id = c.image_id";
  $comment_row = $site_db->query_firstrow($sql);
  if (!$comment_row || $comment_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $comment_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    header("Location: ".$site_sess->url($url, "&"));
    exit;
  }

  $txt_clickstream = get_category_path($comment_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row['image_id'])."\" class=\"clickstream\">".$comment_row['image_name']."</a>".$config['category_separator'];
  $txt_clickstream .= $lang['comment_edit'];

  $comment_headline = (isset($HTTP_POST_VARS['comment_headline'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['comment_headline']))) : $comment_row['comment_headline'];
  $comment_text = (isset($HTTP_POST_VARS['comment_text'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['comment_text']))) : $comment_row['comment_text'];

  if (isset($comment_row[$user_table_fields['user_name']]) && $comment_row['comment_user_id'] != GUEST) {
    $user_name = $comment_row[$user_table_fields['user_name']];
  }
  else {
    $user_name = $comment_row['comment_user_name'];
  }

  $bbcode = "";
  if ($config['bb_comments'] == 1) {
    $site_template->register_vars(array(
      "lang_bbcode" => $lang['bbcode'],
      "lang_tag_prompt" => $lang['tag_prompt'],
      "lang_link_text_prompt" => $lang['link_text_prompt'],
      "lang_link_url_prompt" => $lang['link_url_prompt'],
      "lang_link_email_prompt" => $lang['link_email_prompt'],
      "lang_list_type_prompt" => $lang['list_type_prompt'],
      "lang_list_item_prompt" => $lang['list_item_prompt']
    ));
    $bbcode = $site_template->parse_template("bbcode");
  }

  $site_template->register_vars(array(
    "bbcode" => $bbcode,
    "comment_id" => $comment_id,
    "image_name" => htmlspecialchars($comment_row['image_name']),
    "user_name" => htmlspecialchars($user_name),
    "comment_headline" => htmlspecialchars($comment_headline),
    "comment_text" => htmlspecialchars($comment_text),
    "lang_edit_comment" => $lang['comment_edit'],
    "lang_image_name" => $lang['image_name'],
    "lang_name" => $lang['name'],
    "lang_headline" => $lang['headline'],
    "lang_comment" => $lang['comment'],
    "lang_submit" => $lang['submit'],
    "lang_reset" => $lang['reset'],
    "lang_yes" => $lang['yes'],
    "lang_no" => $lang['no']
  ));
  $content = $site_template->parse_template("member_editcomment");
}

if ($action == "deleteimage") {
  if (!$image_id || ($config['user_delete_image'] != 1 && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
    exit;
  }
  $sql = "SELECT image_id, cat_id, user_id, image_name, image_media_file, image_thumb_file
          FROM ".IMAGES_TABLE."
          WHERE image_id = $image_id";
  $image_row = $site_db->query_firstrow($sql);
  if (!$image_row || $image_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $image_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
    exit;
  }

  $txt_clickstream = $lang['image_delete'];

  $sql = "DELETE FROM ".IMAGES_TABLE."
          WHERE image_id = $image_id";
  $del_img = $site_db->query($sql);

  if (!is_remote($image_row['image_media_file']) && !is_local_file($image_row['image_media_file'])) {
    @unlink(MEDIA_PATH."/".$image_row['cat_id']."/".$image_row['image_media_file']);
  }
  if (!empty($image_row['image_thumb_file']) && !is_remote($image_row['image_thumb_file']) && !is_local_file($image_row['image_thumb_file'])) {
    @unlink(THUMB_PATH."/".$image_row['cat_id']."/".$image_row['image_thumb_file']);
  }

  include(ROOT_PATH.'includes/search_utils.php');
  remove_searchwords($image_id);

  if (!empty($user_table_fields['user_comments'])) {
    $sql = "SELECT user_id
            FROM ".COMMENTS_TABLE."
            WHERE image_id = $image_id";
    $result = $site_db->query($sql);
    $user_id_sql = "";
    while ($row = $site_db->fetch_array($result)) {
      if ($row['user_id'] != GUEST) {
        $sql = "UPDATE ".USERS_TABLE."
                SET ".get_user_table_field("", "user_comments")." = ".get_user_table_field("", "user_comments")." - 1
                WHERE ".get_user_table_field("", "user_id")." = ".$row['user_id'];
        $site_db->query($sql);
      }
    }
  }

  $sql = "DELETE FROM ".COMMENTS_TABLE."
          WHERE image_id = $image_id";
  $del_com = $site_db->query($sql);

  if ($del_img) {
    $msg = $lang['image_delete_success'];
  }
  else {
    $msg = $lang['image_delete_error'];
  }
}

if ($action == "removeimage") {
  if (!$image_id || ($config['user_delete_image'] != 1 && $user_info['user_level'] != ADMIN)) {
    header("Location: ".$site_sess->url($url, "&"));
    exit;
  }
  $sql = "SELECT image_id, cat_id, user_id, image_name
          FROM ".IMAGES_TABLE."
          WHERE image_id = $image_id";
  $image_row = $site_db->query_firstrow($sql);
  if (!$image_row || $image_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $image_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
    exit;
  }

  $txt_clickstream = get_category_path($image_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id)."\" class=\"clickstream\">".$image_row['image_name']."</a>".$config['category_separator'];
  $txt_clickstream .= $lang['image_delete'];

  $site_template->register_vars(array(
    "image_id" => $image_id,
    "image_name" => htmlspecialchars($image_row['image_name']),
    "lang_delete_image" => $lang['image_delete'],
    "lang_delete_image_confirm" => $lang['image_delete_confirm'],
    "lang_submit" => $lang['submit'],
    "lang_reset" => $lang['reset'],
    "lang_yes" => $lang['yes'],
    "lang_no" => $lang['no']
  ));
  $content = $site_template->parse_template("member_deleteimage");
}

if ($action == "updateimage") {
  if (!$image_id || ($config['user_edit_image'] != 1 && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
  }
  $sql = "SELECT image_id, cat_id, user_id, image_name
          FROM ".IMAGES_TABLE."
          WHERE image_id = $image_id";
  $image_row = $site_db->query_firstrow($sql);
  if (!$image_row || $image_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $image_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    show_error_page($lang['no_permission']);
    exit;
  }

  $txt_clickstream = get_category_path($image_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id)."\" class=\"clickstream\">".$image_row['image_name']."</a>".$config['category_separator'];
  $txt_clickstream .= $lang['image_edit'];

  $error = 0;

  $image_name = un_htmlspecialchars(trim($HTTP_POST_VARS['image_name']));
  $image_description = un_htmlspecialchars(trim($HTTP_POST_VARS['image_description']));
  $image_keywords = un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords']));
  $image_keywords = preg_replace("/[\n\r]/is", " ", $image_keywords);
  $image_keywords = str_replace(","," ",$image_keywords);
  $image_keywords = ereg_replace("( ){2,}", " ", $image_keywords);

  if ($image_name == "")  {
    $error = 1;
    $field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['image_name']), $lang['field_required']);
    $msg .= (($msg != "") ? "<br />" : "").$field_error;
  }

  if (!empty($additional_image_fields)) {
    foreach ($additional_image_fields as $key => $val) {
      if (isset($HTTP_POST_VARS[$key]) && intval($val[2]) == 1 && trim($HTTP_POST_VARS[$key]) == "") {
        $error = 1;
        $field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $val[0]), $lang['field_required']);
        $msg .= (($msg != "") ? "<br />" : "").$field_error;
      }
    }
  }

  if (!$error) {
    $additional_sql = "";

    if (isset($HTTP_POST_VARS['image_allow_comments'])) {
      $additional_sql .= ", image_allow_comments = ".intval($HTTP_POST_VARS['image_allow_comments']);
    }

    if (!empty($additional_image_fields)) {
      $table_fields = $site_db->get_table_fields(IMAGES_TABLE);
      foreach ($additional_image_fields as $key => $val) {
        if (isset($HTTP_POST_VARS[$key]) && isset($table_fields[$key])) {
          $additional_sql .= ", $key = '".un_htmlspecialchars(trim($HTTP_POST_VARS[$key]))."'";
        }
      }
    }

    $sql = "UPDATE ".IMAGES_TABLE."
            SET image_name = '$image_name', image_description = '$image_description', image_keywords = '$image_keywords'".$additional_sql."
            WHERE image_id = $image_id";
    $result = $site_db->query($sql);
    if ($result) {
      include(ROOT_PATH.'includes/search_utils.php');
      $search_words = array();
      foreach ($search_match_fields as $image_column => $match_column) {
        if (isset($HTTP_POST_VARS[$image_column])) {
          $search_words[$image_column] = stripslashes($HTTP_POST_VARS[$image_column]);
        }
      }
      remove_searchwords($image_id);
      add_searchwords($image_id, $search_words);
      $msg = $lang['image_edit_success'];
    }
    else {
      $msg = $lang['image_edit_error'];
    }
  }
  else {
    $action = "editimage";
    $sendprocess = 1;
  }
}

if ($action == "editimage") {
  if (!$image_id || ($config['user_edit_image'] != 1 && $user_info['user_level'] != ADMIN)) {
    header("Location: ".$site_sess->url($url, "&"));
    exit;
  }

  $additional_sql = "";
  if (!empty($additional_image_fields)) {
    foreach ($additional_image_fields as $key => $val) {
      $additional_sql .= ", ".$key;
    }
  }
  $sql = "SELECT image_id, cat_id, user_id, image_name, image_description, image_keywords, image_allow_comments".$additional_sql."
          FROM ".IMAGES_TABLE."
          WHERE image_id = $image_id";
  $image_row = $site_db->query_firstrow($sql);
  if (!$image_row || $image_row['user_id'] <= USER_AWAITING || ($user_info['user_id'] != $image_row['user_id'] && $user_info['user_level'] != ADMIN)) {
    header("Location: ".$site_sess->url($url, "&"));
    exit;
  }

  $txt_clickstream = get_category_path($image_row['cat_id'], 1).$config['category_separator']."<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id)."\" class=\"clickstream\">".$image_row['image_name']."</a>".$config['category_separator'];
  $txt_clickstream .= $lang['image_edit'];

  $image_name = (isset($HTTP_POST_VARS['image_name'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['image_name']))) : $image_row['image_name'];
  $image_description = (isset($HTTP_POST_VARS['image_description'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['image_description']))) : $image_row['image_description'];
  $image_keywords = (isset($HTTP_POST_VARS['image_keywords'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['image_keywords']))) : $image_row['image_keywords'];
  $image_allow_comments = (isset($HTTP_POST_VARS['image_allow_comments'])) ? intval($HTTP_POST_VARS['image_allow_comments']) : $image_row['image_allow_comments'];

  $site_template->register_vars(array(
    "image_id" => $image_id,
    "image_name" => htmlspecialchars($image_name),
    "image_description" => htmlspecialchars($image_description),
    "image_keywords" => htmlspecialchars($image_keywords),
    "image_allow_comments_yes" => ($image_allow_comments) ? " checked=\"checked\"" : "",
    "image_allow_comments_no" => (!$image_allow_comments) ? " checked=\"checked\"" : "",
    "lang_edit_image" => $lang['image_edit'],
    "lang_image_name" => $lang['image_name'],
    "lang_description" => $lang['description'],
    "lang_keywords" => $lang['keywords_ext'],
    "lang_allow_comments" => isset($lang['allow_comments']) ? $lang['allow_comments'] : "",
    "lang_submit" => $lang['submit'],
    "lang_reset" => $lang['reset'],
    "lang_yes" => $lang['yes'],
    "lang_no" => $lang['no']
  ));

  if (!empty($additional_image_fields)) {
    $additional_field_array = array();
    foreach ($additional_image_fields as $key => $val) {
      if ($val[1] == "radio") {
        $value = (isset($HTTP_POST_VARS[$key])) ? intval($HTTP_POST_VARS[$key]) : 1;
        if ($value == 1) {
          $additional_field_array[$key.'_yes'] = " checked=\"checked\"";
          $additional_field_array[$key.'_no'] = "";
        }
        else {
          $additional_field_array[$key.'_yes'] = "";
          $additional_field_array[$key.'_no'] = " checked=\"checked\"";
        }
      }
      else {
        $value = (isset($HTTP_POST_VARS[$key])) ? htmlspecialchars(stripslashes(trim($HTTP_POST_VARS[$key]))) : "";
      }
      $additional_field_array[$key] = $value;
      $additional_field_array['lang_'.$key] = $val[0];
    }
    if (!empty($additional_field_array)) {
      $site_template->register_vars($additional_field_array);
    }
  }
  $content = $site_template->parse_template("member_editimage");
}

if ($action == "uploadimage") {
  if ($cat_id != 0 && (!isset($cat_cache[$cat_id]) || !check_permission("auth_upload", $cat_id))) {
    show_error_page($lang['no_permission']);
    exit;
  }
 if ($user_info['user_level'] > GUEST && $user_info['user_level'] != ADMIN)
  {
    $sql = "SELECT COUNT(image_id) AS num
            FROM ".IMAGES_TABLE."
            WHERE user_id = ".$user_info['user_id']." AND image_date > ".(time()-60*60*24);
    if ($result = $site_db->query_firstrow($sql))
    {
      if ($result['num'] >= 2)
      {
        $lang['upload_limit_reached'] = "Du kannst innerhalb von 24 Stunden maximal 2 Fotos uploaden! Dieses Limit wurde zur Qualitätssicherung eingeführt. Vielen Dank für dein Verständniss.";
        show_error_page($lang['upload_limit_reached']);
        exit;
      }
    }
  }

  $txt_clickstream = "";
  if ($cat_id && isset($cat_cache[$cat_id])) {
    $txt_clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
  }
  $txt_clickstream .= $lang['user_upload'];

  $remote_media_file = format_url(un_htmlspecialchars(trim($HTTP_POST_VARS['remote_media_file'])));
  $remote_thumb_file = format_url(un_htmlspecialchars(trim($HTTP_POST_VARS['remote_thumb_file'])));

  $image_name = un_htmlspecialchars(trim($HTTP_POST_VARS['image_name']));
  $image_description = un_htmlspecialchars(trim($HTTP_POST_VARS['image_description']));
  $image_keywords = un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords']));
  $image_keywords = preg_replace("/[\n\r]/is", " ", $image_keywords);
  $image_keywords = str_replace(","," ",$image_keywords);
  $image_keywords = ereg_replace("( ){2,}", " ", $image_keywords);

  $image_active = (isset($HTTP_POST_VARS['image_active']) && $HTTP_POST_VARS['image_active'] == 0) ? 0 : 1;
  $image_allow_comments = (isset($HTTP_POST_VARS['image_allow_comments']) && $HTTP_POST_VARS['image_allow_comments'] == 0) ? 0 : 1;
  $image_download_url = (isset($HTTP_POST_VARS['image_download_url'])) ? format_url(un_htmlspecialchars(trim($HTTP_POST_VARS['image_download_url']))) : "";

  $direct_upload = (check_permission("auth_directupload", $cat_id)) ? 1 : 0;
  $upload_cat = ($direct_upload) ? $cat_id : 0;

  $error = 0;
  $uploaderror = 0;

  if ($cat_id == 0)  {
    $error = 1;
    $field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['category']), $lang['field_required']);
    $msg .= (($msg != "") ? "<br />" : "").$field_error;
  }
  if ((empty($HTTP_POST_FILES['media_file']['tmp_name']) || $HTTP_POST_FILES['media_file']['tmp_name'] == "none") && ($remote_media_file == "" || !check_remote_media($remote_media_file))) {
    $error = 1;
    $msg .= (($msg != "") ? "<br />" : "").$lang['image_file_required'];
  }
  if ($image_name == "")  {
    $error = 1;
    $field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['image_name']), $lang['field_required']);
    $msg .= (($msg != "") ? "<br />" : "").$field_error;
  }

  if (!empty($additional_image_fields)) {
    foreach ($additional_image_fields as $key => $val) {
      if (isset($HTTP_POST_VARS[$key]) && intval($val[2]) == 1 && trim($HTTP_POST_VARS[$key]) == "") {
        $error = 1;
        $field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $val[0]), $lang['field_required']);
        $msg .= (($msg != "") ? "<br />" : "").$field_error;
      }
    }
  }

  if (!$error) {
    // Start Upload
    include(ROOT_PATH.'includes/upload.php');
    $site_upload = new Upload();

    // Upload Media file
    if (!empty($HTTP_POST_FILES['media_file']['tmp_name']) && $HTTP_POST_FILES['media_file']['tmp_name'] != "none") {
      $new_name = $site_upload->upload_file("media_file", "media", $upload_cat);
      if (!$new_name) {
        $msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$new_name."</b><br />".$site_upload->get_upload_errors();
        $uploaderror = 1;
      }
    }
    else {
      $new_name = $remote_media_file;
    }

    // Uplad thumb file
    $new_thumb_name = "";
    if (!empty($HTTP_POST_FILES['thumb_file']['tmp_name']) && $HTTP_POST_FILES['thumb_file']['tmp_name'] != "none" && !$uploaderror) {
      $new_thumb_name = $site_upload->upload_file("thumb_file", "thumb", $upload_cat, basename($new_name));
      if (!$new_thumb_name) {
        $msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['thumb_upload_error'].": ".$new_thumb_name."</b><br />".$site_upload->get_upload_errors();
        @unlink(MEDIA_TEMP_PATH."/".$new_name);
        $uploaderror = 1;
      }
    }
    elseif (check_remote_thumb($remote_thumb_file)) {
      $new_thumb_name = $remote_thumb_file;
    }
    elseif ($config['auto_thumbnail'] == 1 && !empty($HTTP_POST_FILES['media_file']['tmp_name']) && $HTTP_POST_FILES['media_file']['tmp_name'] != "none" && !$uploaderror) {
      if ($direct_upload) {
        $src = MEDIA_PATH."/".$cat_id."/".$new_name;
        $dest = THUMB_PATH."/".$cat_id."/".$new_name;
      }
      else {
        $src = MEDIA_TEMP_PATH."/".$new_name;
        $dest = THUMB_TEMP_PATH."/".$new_name;
      }
      $do_create = 0;
      if ($image_info = @getimagesize($src)) {
        if ($image_info[2] == 1 || $image_info[2] == 2 || $image_info[2] == 3) {
          $do_create = 1;
        }
      }
      if ($do_create) {
        require(ROOT_PATH.'includes/image_utils.php');
        $convert_options = init_convert_options();
        if (!$convert_options['convert_error']) {
          $dimension = (intval($config['auto_thumbnail_dimension'])) ? intval($config['auto_thumbnail_dimension']) : 100;
          $resize_type = (intval($config['auto_thumbnail_resize_type'])) ? intval($config['auto_thumbnail_resize_type']) : 1;
          $quality = (intval($config['auto_thumbnail_quality']) && intval($config['auto_thumbnail_quality']) <= 100) ? intval($config['auto_thumbnail_quality']) : 100;

          if (create_thumbnail($src, $dest, $quality, $dimension, $resize_type)) {
            $new_thumb_name = $new_name;
          }
        }
      }
    }

    if (!$uploaderror) {
      $additional_field_sql = "";
      $additional_value_sql = "";
      if (!empty($additional_image_fields)) {
        $table = ($direct_upload) ? IMAGES_TABLE : IMAGES_TEMP_TABLE;
        $table_fields = $site_db->get_table_fields($table);
        foreach ($additional_image_fields as $key => $val) {
          if (isset($HTTP_POST_VARS[$key]) && isset($table_fields[$key])) {
            $additional_field_sql .= ", $key";
            $additional_value_sql .= ", '".un_htmlspecialchars(trim($HTTP_POST_VARS[$key]))."'";
          }
        }
      }

      $current_time = time();
      if ($direct_upload) {
        $sql = "INSERT INTO ".IMAGES_TABLE."
                (cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments".$additional_field_sql.")
                VALUES
                ($cat_id, ".$user_info['user_id'].", '$image_name', '$image_description', '$image_keywords', $current_time, $image_active, '$new_name', '$new_thumb_name', '$image_download_url', $image_allow_comments".$additional_value_sql.")";
        $result = $site_db->query($sql);
        $image_id = $site_db->get_insert_id();
        if ($result) {
          include(ROOT_PATH.'includes/search_utils.php');
          $search_words = array();
          foreach ($search_match_fields as $image_column => $match_column) {
            if (isset($HTTP_POST_VARS[$image_column])) {
              $search_words[$image_column] = stripslashes($HTTP_POST_VARS[$image_column]);
            }
          }
          add_searchwords($image_id, $search_words);
        }
      }
      else {
        $sql = "INSERT INTO ".IMAGES_TEMP_TABLE."
                (cat_id, user_id, image_name, image_description, image_keywords, image_date, image_media_file, image_thumb_file, image_download_url".$additional_field_sql.")
                VALUES
                ($cat_id, ".$user_info['user_id'].", '$image_name', '$image_description', '$image_keywords', $current_time, '$new_name', '$new_thumb_name', '$image_download_url'".$additional_value_sql.")";
        $result = $site_db->query($sql);
      }

      if ($config['upload_notify'] == 1 && !$direct_upload) {
        include(ROOT_PATH.'includes/email.php');
        $site_email = new Email();

        $config['upload_emails'] = str_replace(" ", "", $config['upload_emails']);
        $emails = explode(",", $config['upload_emails']);

        $validation_url = $script_url."/admin/index.php?goto=".urlencode("validateimages.php?action=validateimages");

        $site_email->set_to($config['site_email']);
        $site_email->set_subject($lang['new_upload_emailsubject']);
        $site_email->register_vars(array(
          "image_name" => stripslashes($image_name),
          "file_name" => $new_name,
          "cat_name" => $cat_cache[$cat_id]['cat_name'],
          "validation_url" => $validation_url,
          "site_name" => $config['site_name']
        ));
        $site_email->set_body("upload_notify", $config['language_dir_default']);
        $site_email->set_bcc($emails);
        $site_email->send_email();
      }

      $msg .= $lang['image_add_success'].": <b>".stripslashes($image_name)."</b> (".$new_name.")";
      $msg .= (!$direct_upload) ? "<br />".$lang['new_upload_validate_desc'] : "";

      $file_extension = get_file_extension($new_name);
      $file = (is_remote($new_name)) ? $new_name : (($direct_upload) ? MEDIA_PATH."/".$cat_id."/".$new_name : MEDIA_TEMP_PATH."/".$new_name);
      $width_height = "";
      if (!is_remote($file) && $imageinfo = @getimagesize($file)) {
        $width_height = " ".$imageinfo[3];
      }
      $media_icon = "<img src=\"".ICON_PATH."/".$file_extension.".gif\" border=\"0\" alt=\"\" />";
      $site_template->register_vars(array(
        "media_src" => $file,
        "media_icon" => $media_icon,
        "image_name" => stripslashes($image_name),
        "width_height" => $width_height
      ));
      $media = $site_template->parse_template("media/".$file_extension);
      $content .= "<table border=\"0\" align=\"center\">\n<tr>\n<td>\n".$media."\n</td>\n</tr>\n</table>\n";
    }
    else {
      $action = "uploadform";
      $sendprocess = 1;
    }
  }
  else {
    $action = "uploadform";
    $sendprocess = 1;
  }
}

if ($action == "uploadform") {
  if ($cat_id != 0 && (!isset($cat_cache[$cat_id]) || !check_permission("auth_upload", $cat_id))) {
    show_error_page($lang['no_permission']);
    exit;
  }
   if ($user_info['user_level'] > GUEST && $user_info['user_level'] != ADMIN)
  {
    $sql = "SELECT COUNT(image_id) AS num
            FROM ".IMAGES_TABLE."
            WHERE user_id = ".$user_info['user_id']." AND image_date > ".(time()-60*60*24);
    if ($result = $site_db->query_firstrow($sql))
    {
      if ($result['num'] >= 2)
      {
        $lang['upload_limit_reached'] = "Du kannst innerhalb von 24 Stunden maximal 2 Fotos uploaden! Dieses Limit wurde zur Qualitätssicherung eingeführt. Vielen Dank für dein Verständniss.";
        show_error_page($lang['upload_limit_reached']);
        exit;
      }
    }
  }

  $txt_clickstream = "";
  if ($cat_id && isset($cat_cache[$cat_id])) {
    $txt_clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
  }
  $txt_clickstream .= $lang['user_upload'];

  if (!$sendprocess) {
    $remote_media_file = "";
    $remote_thumb_file = "";
    $image_name = "";
    $image_description = "";
    $image_keywords = "";
    $image_download_url = "";
    $image_allow_comments = 1;
  }

  $site_template->register_vars(array(
    "cat_id" => $cat_id,
    "cat_name" => ($cat_id != 0) ? htmlspecialchars($cat_cache[$cat_id]['cat_name']) : get_category_dropdown($cat_id),
    "remote_media_file" => htmlspecialchars(stripslashes($remote_media_file)),
    "remote_thumb_file" => htmlspecialchars(stripslashes($remote_thumb_file)),
    "image_name" => htmlspecialchars(stripslashes($image_name)),
    "image_description" => htmlspecialchars(stripslashes($image_description)),
    "image_keywords" => htmlspecialchars(stripslashes($image_keywords)),
    "image_allow_comments_yes" => ($image_allow_comments) ? " checked=\"checked\"" : "",
    "image_allow_comments_no" => (!$image_allow_comments) ? " checked=\"checked\"" : "",
    "image_download_url" => htmlspecialchars(stripslashes($image_download_url)),
    "lang_category" => $lang['category'],
    "lang_user_upload" => $lang['user_upload'],
    "lang_media_file" => $lang['media_file'],
    "lang_thumb_file" => $lang['thumb_file'],
    "lang_allowed_file_types" => $lang['allowed_mediatypes_desc'],
    "allowed_media_types" => str_replace(",",", ",$config['allowed_mediatypes']),
    "allowed_thumb_types" => "jpg, gif, png",
    "lang_max_filesize" => $lang['max_filesize'],
    "lang_max_imagewidth" => $lang['max_imagewidth'],
    "lang_max_imageheight" => $lang['max_imageheight'],
    "max_thumb_filsize" => $config['max_thumb_size']."&nbsp;".$lang['kb'],
    "max_thumb_imagewidth" => $config['max_thumb_width']."&nbsp;".$lang['px'],
    "max_thumb_imageheight" => $config['max_thumb_height']."&nbsp;".$lang['px'],
    "max_media_filsize" => $config['max_media_size']."&nbsp;".$lang['kb'],
    "max_media_imagewidth" => $config['max_image_width']."&nbsp;".$lang['px'],
    "max_media_imageheight" => $config['max_image_height']."&nbsp;".$lang['px'],
    "lang_image_name" => $lang['image_name'],
    "lang_description" => $lang['description'],
    "lang_keywords" => $lang['keywords_ext'],
    "lang_allow_comments" => isset($lang['allow_comments']) ? $lang['allow_comments'] : "",
    "lang_submit" => $lang['submit'],
    "lang_reset" => $lang['reset'],
    "lang_yes" => $lang['yes'],
    "lang_no" => $lang['no']
  ));

  if (!empty($additional_image_fields)) {
    $additional_field_array = array();
    foreach ($additional_image_fields as $key => $val) {
      if ($val[1] == "radio") {
        $value = (isset($HTTP_POST_VARS[$key])) ? intval($HTTP_POST_VARS[$key]) : 1;
        if ($value == 1) {
          $additional_field_array[$key.'_yes'] = " checked=\"checked\"";
          $additional_field_array[$key.'_no'] = "";
        }
        else {
          $additional_field_array[$key.'_yes'] = "";
          $additional_field_array[$key.'_no'] = " checked=\"checked\"";
        }
      }
      else {
        $value = (isset($HTTP_POST_VARS[$key])) ? htmlspecialchars(stripslashes(trim($HTTP_POST_VARS[$key]))) : "";
      }
      $additional_field_array[$key] = $value;
      $additional_field_array['lang_'.$key] = $val[0];
    }
    if (!empty($additional_field_array)) {
      $site_template->register_vars($additional_field_array);
    }
  }
  $content = $site_template->parse_template("member_uploadform");
}

if ($action == "emailuser") {
  $txt_clickstream = $lang['profile'];
  $user_id = (isset($HTTP_POST_VARS[URL_USER_ID])) ? intval($HTTP_POST_VARS[URL_USER_ID]) : GUEST;
  $error = 0;

  if ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) {
    show_error_page($lang['no_permission']);
    exit;
  }
  $subject = stripslashes(trim($HTTP_POST_VARS['subject']));
  $message = stripslashes(trim($HTTP_POST_VARS['message']));

  if ($subject == "" || $message == "") {
    $msg = $lang['lostfield_error'];
    $sendprocess = 1;
    $error = 1;
  }

  if (!$error) {
    if ($user_row = get_user_info($user_id)) {
      if (isset($user_row['user_showemail']) && $user_row['user_showemail'] == 0) {
        $content = $lang['invalid_user_id'];
      }
      else {
        $sender_user_name = ($user_info['user_level'] != GUEST) ? (isset($user_info['user_name']) ? $user_info['user_name'] : $lang['userlevel_user']) : $lang['userlevel_guest'];
        $sender_user_email = ($user_info['user_level'] != GUEST && isset($user_info['user_email'])) ? $user_info['user_email'] : $config['site_email'];

        // Start Emailer
        include(ROOT_PATH.'includes/email.php');
        $site_email = new Email();
        $site_email->set_from($sender_user_email, $sender_user_name);
        $site_email->set_to($user_row['user_email']);
        $site_email->set_subject($subject);
        $site_email->register_vars(array(
          "sender_user_name" => $sender_user_name,
          "sender_user_email" => $sender_user_email,
          "message" => $message,
          "site_name" => $config['site_name']
        ));
        $site_email->set_body("mailform_message", $config['language_dir']);
        $site_email->send_email();
        $msg = $lang['emailuser_success'];
      }
    }
    else {
      $content = $lang['invalid_user_id'];
    }
  }
  else {
    $action = "mailform";
  }
}

if ($action == "mailform") {
  $txt_clickstream = $lang['profile'];
  if (isset($HTTP_GET_VARS[URL_USER_ID]) || isset($HTTP_POST_VARS[URL_USER_ID])) {
    $user_id = (isset($HTTP_GET_VARS[URL_USER_ID])) ? intval($HTTP_GET_VARS[URL_USER_ID]) : intval($HTTP_POST_VARS[URL_USER_ID]);
    if (!$user_id) {
      $user_id = GUEST;
    }
  }
  else {
    $user_id = GUE

8
Feedback & Suggestions / Spam in Kommentaren / spam in comment
« on: May 18, 2006, 09:41:51 PM »
Hallo,
seit ein paar Tagen habe ich einige neu Anmeldungen die in Kommentaren zu Bildern Spam hinterlassen, wie kann ich dagegen vorgehen?
Die E-Mail Validation habe ich aktiviert, hilft aber nicht.

Wäre super, wenn mir jemand weiter helfen kann, bevor es wirklich überhand nimmt.

Gruß Philmax

9
Hallo zusammen,
gibt es einen Mod, mit dem ich die neusten Bilder einer Kategorie auf der Startseite anzeigen lassen kann?

_______________________

I´m looking, for a Mod, witch shows the newest images of one category on the mainpage.

Danke vorab.
Gruß Philmax

10
Hallo,
für sowas wie einen Fotowettbewerb möchte ich eine Kategorie erstellen, in welcher die Bilder dann nach Bewertung sortiert werden. In allen anderen Kategorien soll weiterhin nach Datum sortiert werden.
Wie kann ich das möglichst einfach umsetzen?

Würde mich über eine Antwort freuen!
Gruß Philmax

Pages: [1]