$news_info = parse_news_to_view($file[1]); //replace user variables $tem = get_template('sendtofriend_temp.php', TRUE); $tem = '<script src="' . $furl . '/jsfunc.js" type="text/javascript"></script>' . "\n" . $tem; $tem = replace_masks($tem, array('post_id' => $news_info['post_id'], 'subject' => $news_info['subject'], 'user' => $news_info['writer'], 'date' => $news_info['date'], 'news' => $news_info['news'], 'icon' => $news_info['icon'], 'nrc' => $news_info['nrc'], 'com' => $news_info['link_comments'], 'fullstory' => $news_info['fullnews'], 'cat_name' => $news_info['cat_name'], 'cat_id' => $news_info['cat_id'], 'cat_icon' => $news_info['cat_icon'])); $qs = clean_query_string(); $tem = str_replace('[form]', '<form action="?fn_mode=send&fn_action=send&fn_id=' . $id . $qs . '" method="post" id="newsposting">', $tem); $tem = str_replace('[/form]', '</form>', $tem); $tem = str_replace('[buttons]', '<input type="hidden" name="confirm_id" value="' . $session_id . '" /> <input type="submit" value="' . $ind125 . '"> <input type="reset" value="' . $ind16 . '">', $tem); $tem = preg_replace('/\\[sendnamefld,\\s*([0-9]+)\\]/', '<input type="text" size="\\1" name="sender_name" />', $tem); $tem = preg_replace('/\\[recnamefld,\\s*([0-9]+)\\]/', '<input type="text" size="\\1" name="friend_name" />', $tem); $tem = preg_replace('/\\[sendmailfld,\\s*([0-9]+)\\]/', '<input type="text" size="\\1" name="sender_email" />', $tem); $tem = preg_replace('/\\[recmailfld,\\s*([0-9]+)\\]/', '<input type="text" size="\\1" name="friend_email" />', $tem); if (!isset($stf_captcha) || $stf_captcha) { generate_captcha_code($session_id, $id, get_ip(), 'send'); $tem = str_replace('[securityimg]', '<img src="' . $furl . '/captcha.php?fn_type=send&fn_id=' . $id . '&fn_sid=' . $session_id . '&t=' . time() . '" alt="CAPTCHA" id="captcha" />', $tem); $tem = str_replace('[securityfld]', '<input type="text" name="code" size="5" maxlength="5" />', $tem); } else { $tem = str_replace('[securityimg]', '', $tem); $tem = str_replace('[securityfld]', '', $tem); } $tem = preg_replace('/\\[mesfld,\\s*([0-9]+),\\s*([0-9]+)\\]/', '<textarea name="message" cols="\\1" rows="\\2"></textarea>', $tem); echo $tem; } else { if ($action == 'send') { $name = isset($VARS['sender_name']) ? ltrim($VARS['sender_name']) : ''; $friend_name = isset($VARS['friend_name']) ? ltrim($VARS['friend_name']) : ''; $email = isset($VARS['sender_email']) ? ltrim($VARS['sender_email']) : ''; $friend_email = isset($VARS['friend_email']) ? ltrim($VARS['friend_email']) : ''; $message = isset($VARS['message']) ? html_entity_decode($VARS['message']) : '';
//]]> </script> html; $temp_short = str_replace('[comlen]', '<input id="chars" name="chars" size="5" value="' . $comlength . '" disabled="disabled" />', $temp_short); } $name = isset($_COOKIE['fn_comment_name']) ? $_COOKIE['fn_comment_name'] : ''; $email = isset($_COOKIE['fn_comment_email']) ? $_COOKIE['fn_comment_email'] : ''; $remember = isset($_COOKIE['fn_comment_remember']) ? 1 : 0; $temp_short = preg_replace('/\\[pwfld,\\s*([0-9]+)\\]/i', '<input type="password" size="$1" name="pass" />', $temp_short); $temp_short = preg_replace('/\\[namefld,\\s*([0-9]+)\\]/i', '<input type="text" size="$1" name="name" id="name" value="' . $name . '" />', $temp_short); $temp_short = preg_replace('/\\[mailfld,\\s*([0-9]+)\\]/i', '<input type="text" size="$1" name="email" id="email" value="' . $email . '" />', $temp_short); $temp_short = preg_replace('/\\[rememberchk]/', '<input type="checkbox" name="remember" value="1" ' . checkbox_checked($remember) . '/>', $temp_short); $temp_short = preg_replace('/\\[comfld,\\s*([0-9]+),\\s*([0-9]+)]/i', $box, $temp_short); // Image verification if ($com_captcha) { generate_captcha_code($session_id, $id, get_ip(), 'comments'); $temp_short = str_replace('[securityimg]', '<img src="' . $furl . '/captcha.php?fn_type=comments&fn_id=' . $id . '&fn_sid=' . $session_id . '&t=' . time() . '" alt="CAPTCHA" id="captcha" />', $temp_short); $temp_short = str_replace('[securityfld]', '<input type="text" name="code" size="5" maxlength="5" />', $temp_short); } else { $temp_short = str_replace('[securityimg]', '', $temp_short); $temp_short = str_replace('[securityfld]', '', $temp_short); } $comlen .= '<script type="text/javascript"> //<![CDATA[ document.getElementById("com_Submit").onclick = function() { var msg = document.getElementById ("comment"); var name = document.getElementById ("name"); if ( !msg.value.length || !name.value.length ) {