Ejemplo n.º 1
0
if (count($goodfiles) == 0 && !$_POST['body'] && $mod == false) {
    //oops, tyam moment
    THdie("You must post images or leave a comment.");
}
$pin = (int) ($_POST['pin'] == "on" && $mod);
$lock = (int) ($_POST['lock'] == "on" && $mod);
$permasage = (int) ($_POST['permasage'] == "on" && $mod);
$usethese = preptrip($_POST['nombre']);
if (preg_match("/^(mailto:)?noko\$/", $_POST['link'])) {
    //hide noko
    $datlink = "";
} else {
    $datlink = $_POST['link'];
}
$tnum = $db->putthread($usethese['nombre'], $usethese['trip'], $binfo['id'], $_POST['subj'], $_POST['body'], $datlink, ip2long($_SERVER['REMOTE_ADDR']), $mod, $pin, $lock, $permasage, $_POST['password']);
movefiles($goodfiles, $tnum, true, $binfo, $db);
$sm = smsimple();
$sm->clear_cache(null, $board);
//$sm->clear_cache(null,"idx"); what
/* 	if (isset($_POST['tedit'])==true)
  {
  $sm->clear_cache(null,"t".$_POST['tedit']);
  } */
if ($binfo['tmax'] != 0) {
    //Don't purge if max threads is set to 0
    delimgs($db->purge(intval(1)));
}
//Cookie setting stuff here
if ($_POST['mem'] == "on") {
    if ($_POST['nombre'] !== null) {
        setcookie(THcookieid . "-name", $_POST['nombre'], time() + THprofile_cookietime, THprofile_cookiepath);
Ejemplo n.º 2
0
}
if (count($goodfiles) == 0 && !$_POST['body'] && $mod == false) {
    THdie("You must post images or leave a comment.");
}
//prin_tr($_POST);
if (preg_match("/^(mailto:)?noko\$/", $_POST['link'])) {
    //hide noko
    $datlink = "";
} else {
    $datlink = $_POST['link'];
}
//Don't post if there's no files or body (mod stuff only)
if (strlen($_POST['body']) > 1 || count($goodfiles) > 0) {
    $usethese = preptrip($_POST['nombre']);
    $pnum = $db->putpost($usethese['nombre'], $usethese['trip'], $datlink, $binfo['id'], (int) $_POST['thread'], $_POST['body'], ip2long($_SERVER['REMOTE_ADDR']), $mod, $_POST['password']);
    movefiles($goodfiles, $pnum, false, $binfo, $db);
}
if ($_POST['mem'] == "on") {
    if ($_POST['nombre'] !== null) {
        setcookie(THcookieid . "-name", $_POST['nombre'], time() + THprofile_cookietime, THprofile_cookiepath);
    }
    if ($_POST['link'] != null) {
        setcookie(THcookieid . "-link", $_POST['link'], time() + THprofile_cookietime, THprofile_cookiepath);
    }
    setcookie(THcookieid . "-password", $_POST['password'], time() + THprofile_cookietime, THprofile_cookiepath);
}
// Initialize $location variable for HTTP redirects
$location = "drydock.php";
// Default
if (preg_match("/^(mailto:)?noko\$/", $_POST['link'])) {
    // noko check