if (!$error) { $sql = "INSERT INTO ".COMMENTS_TABLE." (image_id, user_id, user_name, comment_headline, comment_text, comment_ip, comment_date) VALUES ($id, ".$user_info['user_id'].", '$user_name', '$comment_headline', '$comment_text', '".$session_info['session_ip']."', ".time().")"; $site_db->query($sql); $commentid = $site_db->get_insert_id(); update_comment_count($id, $user_info['user_id']); $msg = $lang['comment_success']; } } unset($row); unset($spam_row);}
if (!$error) { $sql = "INSERT INTO ".COMMENTS_TABLE." (image_id, user_id, user_name, comment_headline, comment_text, comment_ip, comment_date) VALUES ($id, ".$user_info['user_id'].", '$user_name', '$comment_headline', '$comment_text', '".$session_info['session_ip']."', ".time().")"; $site_db->query($sql); $commentid = $site_db->get_insert_id(); update_comment_count($id, $user_info['user_id']); $msg = $lang['comment_success']; $sql = "SELECT image_name FROM ".IMAGES_TABLE." WHERE image_id = $id"; $image_name = $site_db->query($sql); $sql = "SELECT user_id FROM ".IMAGES_TABLE." WHERE image_id = $id"; $user_id = $site_db->query($sql); $recipient_name = $image_row['user_name']; $recipient_email = $image_row['user_email']; $image_url = $script_url."/details.php?".URL_IMAGE_ID."=".$id.""; // Start Emailer für comments include(ROOT_PATH.'includes/email.php'); $site_email = new Email(); $site_email->set_to($recipient_email); $site_email->set_from($config['site_email'], $config['site_name']); $site_email->set_subject("Neuer Kommentar zu deinem Bild"); $site_email->register_vars(array( "user_name" => $image_row['user_name'], "recipient_name" => $recipient_name, "image_name" => $image_row['image_name'], "comment_date" => format_date($config['date_format']." ".$config['time_format'], time()), "site_name" => $config['site_name'], "image_url" => $image_url, "comment_text" =>$comment_text, "comment_headline"=>$comment_headline, )); $site_email->set_body("comment_email", $config['language_dir']); $site_email->send_email(); } } unset($row); unset($spam_row);}
if (!$error) { $sql = "INSERT INTO ".COMMENTS_TABLE." (image_id, user_id, user_name, comment_headline, comment_text, comment_ip, comment_date) VALUES ($id, ".$user_info['user_id'].", '$user_name', '$comment_headline', '$comment_text', '".$session_info['session_ip']."', ".time().")"; $site_db->query($sql); $commentid = $site_db->get_insert_id(); update_comment_count($id, $user_info['user_id']); $msg = $lang['comment_success']; $sql = "SELECT image_name FROM ".IMAGES_TABLE." WHERE image_id = $id"; $image_name = $site_db->query($sql); $sql = "SELECT user_id FROM ".IMAGES_TABLE." WHERE image_id = $id"; $user_id = $site_db->query($sql); $recipient_name = $image_row['user_name']; $recipient_email = $image_row['user_email']; $image_url = $script_url."/details.php?".URL_IMAGE_ID."=".$id.""; // Start Admin-Mail $recipient_name = $config['site_name']; $recipient_email = $config['site_email']; $site_email = new Email(); $site_email->set_to($recipient_email); $site_email->set_from($config['site_email'], $config['site_name']); $site_email->set_subject("Neuer Kommentar wurde geschrieben"); $site_email->register_vars(array( "user_name" => $image_row['user_name'], "recipient_name" => $recipient_name, "image_name" => $image_row['image_name'], "comment_date" => format_date($config['date_format']." ".$config['time_format'], time()), "site_name" => $config['site_name'], "image_url" => $image_url, "comment_text" =>$comment_text, "comment_headline"=>$comment_headline, )); $site_email->set_body("comment_email", $config['language_dir']); $site_email->send_email(); } } unset($row); unset($spam_row);}
if (!$error) { $sql = "INSERT INTO ".COMMENTS_TABLE." (image_id, user_id, user_name, comment_headline, comment_text, comment_ip, comment_date) VALUES ($id, ".$user_info['user_id'].", '$user_name', '$comment_headline', '$comment_text', '".$session_info['session_ip']."', ".time().")"; $site_db->query($sql); $commentid = $site_db->get_insert_id(); update_comment_count($id, $user_info['user_id']); $msg = $lang['comment_success']; $sql = "SELECT image_name FROM ".IMAGES_TABLE." WHERE image_id = $id"; $image_name = $site_db->query($sql); $sql = "SELECT user_id FROM ".IMAGES_TABLE." WHERE image_id = $id"; $user_id = $site_db->query($sql); $recipient_name = $image_row['user_name']; $recipient_email = $image_row['user_email']; $image_url = $script_url."/details.php?".URL_IMAGE_ID."=".$id.""; // Start Emailer für comments include(ROOT_PATH.'includes/email.php'); $site_email = new Email(); $site_email->set_to($recipient_email); $site_email->set_from($config['site_email'], $config['site_name']); $site_email->set_subject("Neuer Kommentar zu deinem Bild"); $site_email->register_vars(array( "user_name" => $image_row['user_name'], "recipient_name" => $recipient_name, "image_name" => $image_row['image_name'], "comment_date" => format_date($config['date_format']." ".$config['time_format'], time()), "site_name" => $config['site_name'], "image_url" => $image_url, "comment_text" =>$comment_text, "comment_headline"=>$comment_headline, )); $site_email->set_body("comment_email", $config['language_dir']); $site_email->send_email(); // Start Admin-Mail $recipient_name = $config['site_name']; $recipient_email = $config['site_email']; $site_email = new Email(); $site_email->set_to($recipient_email); $site_email->set_from($config['site_email'], $config['site_name']); $site_email->set_subject("Neuer Kommentar wurde geschrieben"); $site_email->register_vars(array( "user_name" => $image_row['user_name'], "recipient_name" => $recipient_name, "image_name" => $image_row['image_name'], "comment_date" => format_date($config['date_format']." ".$config['time_format'], time()), "site_name" => $config['site_name'], "image_url" => $image_url, "comment_text" =>$comment_text, "comment_headline"=>$comment_headline, )); $site_email->set_body("comment_email", $config['language_dir']); $site_email->send_email(); } } unset($row); unset($spam_row);}
Hallo {recipient_name},{user_name} gab einen Kommentar zu deinem Bild "{image_name}" ab in {site_name}.Kommentar:{comment_headline}{comment_text}Hier kannst du den Kommentar ansehen: {image_url}Datum: {comment_date}------Mit freundlichen Grüssen,{site_name}
ALTER TABLE 4images_users ADD (user_mail_text INT UNSIGNED);UPDATE 4images_users SET user_mail_text =1;
$additional_user_fields['user_mail_text'] = array($lang['mail_text'], "radio", 0);
<!-- Mod Mail --><tr> <td class="row2"><b>Benachrichtigung bei Kommentar</b></td> <td class="row2"> <input type="radio" name="user_mail_text" value="1"{user_mail_text_yes} /> {lang_yes} <input type="radio" name="user_mail_text" value="0"{user_mail_text_no} /> {lang_no} </td> </tr><!-- Mod Mail -->
if ($comment_headline == "") { $msg .= (($msg != "") ? "<br />" : "").$lang['headline_required']; $error = 1;}
if ($comment_headline == "") { $error['comment_headline'] = 1; }
if (!$error) { $sql = "INSERT INTO ".COMMENTS_TABLE." (image_id, user_id, user_name, comment_headline, comment_text, comment_ip, comment_date) VALUES ($id, ".$user_info['user_id'].", '$user_name', '$comment_headline', '$comment_text', '".$session_info['session_ip']."', ".time().")"; $site_db->query($sql); $commentid = $site_db->get_insert_id(); update_comment_count($id, $user_info['user_id']); $msg = $lang['comment_success']; $site_sess->set_session_var("msgdetails", $msg); redirect(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&mode=".$mode : "").(($page > 1) ? "&page=".$page : "")); } } unset($row); unset($spam_row);}
if (!$error) { $sql = "INSERT INTO ".COMMENTS_TABLE." (image_id, user_id, user_name, comment_headline, comment_text, comment_ip, comment_date) VALUES ($id, ".$user_info['user_id'].", '$user_name', '$comment_headline', '$comment_text', '".$session_info['session_ip']."', ".time().")"; $site_db->query($sql); $commentid = $site_db->get_insert_id(); update_comment_count($id, $user_info['user_id']); $msg = $lang['comment_success']; $site_sess->set_session_var("msgdetails", $msg); redirect(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&mode=".$mode : "").(($page > 1) ? "&page=".$page : "")); $sql = "SELECT image_name FROM ".IMAGES_TABLE." WHERE image_id = $id"; $image_name = $site_db->query($sql); $sql = "SELECT user_id FROM ".IMAGES_TABLE." WHERE image_id = $id"; $user_id = $site_db->query($sql); $recipient_name = $image_row['user_name']; $recipient_email = $image_row['user_email']; $site_sess->set_session_var("msgdetails", $msg); redirect(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&mode=".$mode : "").(($page > 1) ? "&page=".$page : "")); // Start Emailer für comments include(ROOT_PATH.'includes/email.php'); $site_email = new Email(); $site_email->set_to($recipient_email); $site_email->set_from($config['site_email'], $config['site_name']); $site_email->set_subject("Neuer Kommentar zu deinem Bild"); $site_email->register_vars(array( "user_name" => $image_row['user_name'], "recipient_name" => $recipient_name, "image_name" => $image_row['image_name'], "comment_date" => format_date($config['date_format']." ".$config['time_format'], time()), "site_name" => $config['site_name'], "image_url" => $image_url, "comment_text" =>$comment_text, "comment_headline"=>$comment_headline, )); $site_email->set_body("comment_email", $config['language_dir']); $site_email->send_email(); // Start Admin-Mail $recipient_name = $config['site_name']; $recipient_email = $config['site_email']; $site_email = new Email(); $site_email->set_to($recipient_email); $site_email->set_from($config['site_email'], $config['site_name']); $site_email->set_subject("Neuer Kommentar wurde geschrieben"); $site_email->register_vars(array( "user_name" => $image_row['user_name'], "recipient_name" => $recipient_name, "image_name" => $image_row['image_name'], "comment_date" => format_date($config['date_format']." ".$config['time_format'], time()), "site_name" => $config['site_name'], "image_url" => $image_url, "comment_text" =>$comment_text, "comment_headline"=>$comment_headline, )); $site_email->set_body("comment_email", $config['language_dir']); $site_email->send_email(); } } unset($row); unset($spam_row);}
$site_sess->set_session_var("msgdetails", $msg); redirect(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&mode=".$mode : "").(($page > 1) ? "&page=".$page : ""));