コード例 #1
0
ファイル: abstract.php プロジェクト: 4otaku/4otaku
 public function execute($function)
 {
     if (is_callable(array($this, $function))) {
         try {
             $this->{$function}();
         } catch (Error_Cron $e) {
             $mail = new mail(def::notify('mail'));
             $mail->text(serialize($e))->send();
         }
     }
 }
コード例 #2
0
ファイル: functions.php プロジェクト: 4otaku/4otaku
 function shutdown_handler()
 {
     $error = error_get_last();
     if ($error && ($error['type'] == E_ERROR || $error['type'] == E_PARSE || $error['type'] == E_COMPILE_ERROR)) {
         if (strpos($error['message'], 'Allowed memory size') === 0) {
             ob_end_clean();
             $mail = new mail(def::notify('mail'));
             $mail->text(serialize(query::$url) . serialize($error))->send();
         } else {
             ob_end_clean();
             $mail = new mail(def::notify('mail'));
             $mail->text(serialize(query::$url) . serialize($error))->send();
         }
     }
 }
コード例 #3
0
ファイル: board.php プロジェクト: 4otaku/4otaku
	public function move () {
		$id = query::$post['id'];
		$to = query::$post['to'];

		if (!is_numeric($id) || !is_numeric($to)) {
			return;
		}

		if (query::$cookie != def::get('board', 'moderator')) {
			return;
		}

		Database::update('board', array(
			'thread' => $to,
			'sortdate' => ceil(microtime(true)*1000)
		), $id);

		$mail = new mail(def::notify('mail'));
		$mail->text("Moved board №$id, to " . $to)->send();
	}