Initial commit
[2ch-be.git] / dev-test / old / msg.php
blob2e7df93a5100e3acc1cefe3ced92efc165855485
1 <?php
2 error_reporting(E_ALL); ini_set("display_errors", 1);
3 define('MDB_PATH', '/home/mdb/');
4 include('messaging.class.php');
6 $id_mail_path = "/home/db/idlist.log";
7 $id = strip_tags(addslashes(trim($_POST['zxcvbnm'])));
8 $inf = strip_tags(addslashes(trim($_POST['msg'])));
10 $message = new Message;
11 $em = $message->BeSanitize($inf);
12 if ($em<>false) {
13 $user = $message->FindUser($id,$id_mail_path);
14 $write = $message->WriteMDB($user,$em);
16 if ($write) {
17 echo "Message Sent";
18 } else {
19 echo "Error, please try again later";
21 } else {
22 echo "Content too long!";