*/ // name of the language file that needs to be included $language_file = "index"; include_once("../inc/global.inc.php"); if(empty($_user['user_id'])) { api_not_allowed(true); } //api_protect_course_script(); //not a course script, so no protection if(empty($_SESSION['origin_url'])){ $origin_url = $_SERVER['HTTP_REFERER']; api_session_register('origin_url'); } /* Process the form and redirect to origin */ if(!empty($_POST['submit_email']) && !empty($_POST['email_title']) && !empty($_POST['email_text'])) { $text = $_POST['email_text']."\n\n---\n".get_lang('EmailSentFromDokeos')." ".api_get_path(WEB_PATH); if(!empty($_user['mail'])){ api_send_mail($_POST['dest'],$_POST['email_title'],$text,"From: ".$_user['mail']."\r\n"); }else{ api_send_mail($_POST['dest'],$_POST['email_title'],$text); } $orig = $_SESSION['origin_url']; api_session_unregister('origin_url'); header('location:'.$orig); } /* Header */ Display::display_header(get_lang('SendEmail')); ?>
'.$_POST['email_text'].''; //htmlarea is not used otherwise we have to deal with HTML e-mail and all the related probs //api_disp_html_area('email_text',$_POST['email_text'],'250px'); ?>