"._CSF_ADDFRIEND."

" .""._CSF_YOUSENDADD." $title "._CSF_TOADDFRIEND."

" ."
" .""; if (is_user($user)) { $result=sql_query("select name, email from ".$user_prefix."_users where username='$cookie[1]'", $dbi); list($yn, $ye) = sql_fetch_row($result, $dbi); } echo ""._CSF_ADDYOURNAME."

\n" .""._CSF_FYOUREMAIL."


\n" .""._CSF_FFRIENDNAME."

\n" .""._CSF_FFRIENDEMAIL."

\n" ."\n" ."\n" ."
\n"; CloseTable(); copyright(); include ('footer.php'); } function SendStory($lid, $yname, $ymail, $fname, $fmail) { global $sitename, $nukeurl, $prefix, $dbi, $module_name; // Check if eMail exist if (!$ymail) { include("header.php"); menu(1); echo "
"; OpenTable(); headertable(_CSF_ERROR); echo "
"._CSF_FFRIENDEMAIL._CSF_ISWRONG."

" .""._CSF_GOBACK.""; CloseTable(); copyright(); include("footer.php"); exit;} if(!ereg("^([a-zA-Z0-9_]|\\-|\\.)+@(([a-zA-Z0-9_]|\\-)+\\.)+[a-zA-Z]{2,4}\$",$ymail)){ include("header.php"); menu(1); echo "
"; OpenTable(); headertable(_CSF_ERROR); echo "
"._CSF_WRONGSENDEMAIL."

" .""._CSF_GOBACK.""; CloseTable(); copyright(); include("footer.php"); exit;} // Check if eMail exist if (!$fmail) { include("header.php"); menu(1); echo "
"; OpenTable(); headertable(_CSF_ERROR); echo "
"._CSF_FYOUREMAIL._CSF_ISWRONG."

" .""._CSF_GOBACK.""; CloseTable(); copyright(); include("footer.php"); exit;} if(!ereg("^([a-zA-Z0-9_]|\\-|\\.)+@(([a-zA-Z0-9_]|\\-)+\\.)+[a-zA-Z]{2,4}\$",$fmail)){ include("header.php"); menu(1); echo "
"; OpenTable(); headertable(_CSF_ERROR); echo "
"._CSF_WRONGSENDEMAIL."

" .""._CSF_GOBACK.""; CloseTable(); copyright(); include("footer.php"); exit;} $result2=sql_query("select title, description, datum from ".$prefix."_add_adds where lid=$lid", $dbi); list($title, $description, $time) = sql_fetch_row($result2, $dbi); $time=date("d.m.Y",$time); $description=strip_tags($description); $subject = ""._CSF_INTERESTING." $sitename"; $message = ""._CSF_HELLO." $fname:\n\n"._CSF_YOURFRIEND." $yname "._CSF_CONSIDERED."\n\n\n"._CSF_ADDTITLE.": $title\n"._CSF_FDATE." $time\n"._CSF_DESCRIPTION.": $description\n\n"._CSF_URL.": $nukeurl/modules.php?name=$module_name&a_op=visit&lid=$lid\n\n"._CSF_YOUCANBROWSEUS." $sitename\n$nukeurl"; mail($fmail, $subject, $message, "From: \"$yname\" <$ymail>\nX-Mailer: PHP/" . phpversion()); $title = urlencode($title); $fname = urlencode($fname); Header("Location: modules.php?name=$module_name&a_op=friend&s_op=StorySent&title=$title&fname=$fname"); } function StorySent($title, $fname) { global $module_name; include ("header.php"); $title = urldecode($title); $title = stripslashes($title); $fname = urldecode($fname); OpenTable(); echo "
"._CSF_FADD." $title "._CSF_HASSENT." $fname... "._CSF_THANKS."
"; CloseTable(); copyright(); include ("footer.php"); } switch($s_op) { case "SendStory": SendStory($lid, $yname, $ymail, $fname, $fmail); break; case "StorySent": StorySent($title, $fname); break; default: FriendSend($lid); break; } ?>