load_lang("lang_rocommend.php"); if ($mklib->config['mod_recommend']) { $message = "{$mklib->lang['mod_offline']}"; $mklib->error_page($message); exit; } /* $sec =$mklib->member['g_access_recommend']; if(!$mklib->member['g_access_recommend'] && !$mkportals->member['g_access_cp']) { $message = "{$mklib->lang['mod_nodostup']}"; $mklib->error_page( $sec); exit; }*/ if(!$mklib->member['g_access_recommend'] && !$mkportals->member['g_access_cp']) { $message = "{$mklib->lang['mod_nodostup']}"; $mklib->error_page($message); exit; } switch($mkportals->input['op']) { default: $this->recommend(); break; case 'send_mail': $this->send_mail(); break; } } function recommend() { global $mkportals, $DB, $std, $print, $mklib, $Skin, $mklib_board; if ($mkportals->member['id']) {$nome = $mkportals->member['name'];} if ($mkportals->member['id']) {$nome1 = $mkportals->member['email'];} $captcha = $mklib->antibot_start(); $output ="
{$mklib->lang['recommend_yname']}
{$mklib->lang['recommend_ymail']}
{$mklib->lang['recommend_fname']}
{$mklib->lang['recommend_fmail']}

$captcha

lang['recommend_send']}\">

"; $output .="

MKPRecommend ©2007-2009 www.rusmkportal.ru
"; $blocks .= $Skin->view_block("{$mklib->lang['recommend_title']}", $output); $mklib->printpage("1", "1", "{$mklib->lang['recommend_title']}", $blocks); } function send_mail() { global $mkportals, $DB, $std, $print, $mklib, $Skin, $SITE_NAME, $SITE_URL; //session_start(); @header("Content-type: text/html; charset={$mklib->charset}"); @header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); @header('Last-Modified: '.@gmdate('D, d M Y H:i:s').' GMT'); @header('Cache-Control: no-store, no-cache, must-revalidate'); @header('Cache-Control: post-check=0, pre-check=0', false); @header('Pragma: no-cache'); $fmail = $mkportals->input['fmail']; $fname1 = $mkportals->input['fname']; $yname1 = $mkportals->input['yname']; $ymail = $mkportals->input['ymail']; $fname = iconv("UTF-8", "$mklib->charset", $fname1); $yname = iconv("UTF-8", "$mklib->charset", $yname1); if ($mklib->config['antibot_chek'] && !$mkportals->member['id']){ $captcha_code = $mkportals->input['check']; $captcha_check = $mklib->antibot_check($captcha_code); } if (!$yname || !$ymail || !$fname || !$fmail) { $message = "{$mklib->lang['recommend_error']}"; $mklib->Ajax_error_page($message); exit(); } if (!eregi("^[\'+\\./0-9A-Z^_\`a-z{|}~\-]+@[a-zA-Z0-9_\-]+(\.[a-zA-Z0-9_\-]+){1,3}$", $ymail)) { $message = "{$mklib->lang['recommend_error1']}"; $mklib->Ajax_error_page($message); exit(); } if (!eregi("^[\'+\\./0-9A-Z^_\`a-z{|}~\-]+@[a-zA-Z0-9_\-]+(\.[a-zA-Z0-9_\-]+){1,3}$", $fmail)) { $message = "{$mklib->lang['recommend_error2']}"; $mklib->Ajax_error_page($message); exit(); } $subject = "{$mklib->lang['recommend_intersite']} $SITE_NAME"; $message = "{$mklib->lang['recommend_hello']} $fname:\n\n {$mklib->lang['recommend_youfrend']} $yname {$mklib->lang['recommend_visitsite']} $SITE_NAME {$mklib->lang['recommend_siteinters2']} \n\n\n {$mklib->lang['recommend_sitenames']} $SITE_NAME\n\n {$mklib->lang['recommend_siteurl']} $SITE_URL\n"; $headers = "Content-Type: text/plain; charset={$mklib->charset}\n"; $headers .= "From: $yname <$ymail>\n"; mail($fmail, $subject, $message, $headers); $message = "{$mklib->lang['recommend_oksend1']} $fname

{$mklib->lang['recommend_oksend2']}"; $mklib->Ajax_ok_page($message); exit(); } } ?>