Example #1
0
    if ($target == "") {
        html_error_quit("请指定对象");
    }
    if (!bbs_sufficient_score_to_sendmail($target)) {
        html_error_quit("积分不足,不能转寄信件给" . $target);
    }
    if (isset($_POST["big5"])) {
        $big5 = $_POST["big5"];
    } else {
        $big5 = 0;
    }
    settype($big5, "integer");
    if (isset($_POST["noansi"])) {
        $noansi = $_POST["noansi"];
    } else {
        $noansi = 0;
    }
    settype($noansi, "integer");
    if (isset($_POST["noattach"])) {
        $noattach = $_POST["noattach"];
    } else {
        $noattach = 0;
    }
    settype($noattach, "integer");
    $ret = bbs_doforward($brdarr["NAME"], $articles[1]["FILENAME"], $articles[1]["TITLE"], $target, $big5, $noansi, $noattach);
    if ($ret < 0) {
        html_error_quit("系统错误:" . $ret);
    }
    html_success_quit("文章已转寄给" . $target);
}
page_footer();
Example #2
0
 /**
  * function forward mail this article to sb.
  *
  * @param string $target
  * @param boolean $noatt
  * @param boolean $noansi
  * @param boolean $big5
  * @return null
  * @access public
  * @throws ArticleForwardException
  */
 public function forward($target, $noatt = false, $noansi = false, $big5 = false)
 {
     $code = null;
     $ret = bbs_doforward($this->_board->NAME, $this->FILENAME, $this->TITLE, $target, $big5, $noansi, $noatt);
     switch ($ret) {
         case -1:
         case -10:
             $code = ECode::$SYS_ERROR;
         case -7:
             $code = ECode::$ARTICLE_NONE;
         case -8:
             $code = ECode::$USER_NOID;
             break;
         case -11:
             $code = ECode::$BOARD_NONE;
             break;
     }
     if (!is_null($code)) {
         throw new ArticleForwardException($code);
     }
 }