Esempio n. 1
0
} else {
    $from = $_POST["from"];
}
if (preg_match("/\n|\r/", $_POST["msgsubject"])) {
    $subject = "";
} else {
    $subject = $_POST["msgsubject"];
}
$message = $_POST["message"];
// If the variable isn't filled in, then the input fields don't default to the
// values selected.  Need to fill it in so a post will correctly display.
if (isset($_POST['year']) && is_array($_POST["year"]) || $_POST["embargo"] || $_POST["embargo"] == "0000-00-00 00:00:00") {
    $_POST["embargo"] = $embargo->getDate() . " " . $embargo->getTime() . ':00';
}
if (isset($_POST['year']) && is_array($_POST["year"]) || !$_POST["repeatuntil"] || $_POST["repeatuntil"] == "0000-00-00 00:00:00") {
    $_POST["repeatuntil"] = $repeatuntil->getDate() . " " . $repeatuntil->getTime() . ':00';
}
if (!isset($_SESSION["fckeditor_height"])) {
    $_SESSION["fckeditor_height"] = getConfig("fckeditor_height");
}
if (isset($_POST['expand']) && $_POST["expand"]) {
    // request to expand editor area
    //  $defaultheight = getConfig("fckeditor_height");
    //  SaveConfig("fckeditor_height",$curheight+100,1);
    $_SESSION["fckeditor_height"] += 100;
}
if (isset($_REQUEST['prepare'])) {
    $prepare = $_REQUEST['prepare'];
} else {
    $prepare = '';
}
Esempio n. 2
0
	$from = $_POST["from"];
}
if (preg_match("/[\n|\r]/",$_POST["subject"])) {
	$subject = "";
} else {
	$subject = $_POST["subject"];
}

// If the valiable isn't filled in, then the input fields don't default to the 
// values selected.  Need to fill it in so a post will correctly display.
if (!$_POST["embargo"]) {
	$_POST["embargo"] = $embargo->getDate() ." ".$embargo->getTime();
}

if (!$_POST["repeatuntil"]) {
	$_POST["repeatuntil"] = $repeatuntil->getDate() ." ".$repeatuntil->getTime();
}

if ((($send && is_array($_POST["list"])) || $save || $sendtest || $prepare) && $subject && $_POST["message"] && $from && !$duplicate_attribute) {

  if ($save || $sendtest) {
		// We're just saving, not sending.
		if ($_POST["status"] == "") {
			// No status - move to draft state
	    $status = "draft";
		} else {
			// Keep the status the same
			$status = $_POST["status"];
		}
	} elseif ($send) {
		// We're sending - change state to "send-it" status!