<?php
error_reporting(E_ALL);
include('sendMsg.php');
$tags['INFO'] = '';
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
$tags['SIGNINNAME'] = ' value="'.$_POST['sender'].'"';
$tags['RECIPIENT'] = ' value="'.$_POST['recipient'].'"';
$tags['MESSAGE'] = ' value="'.$_POST['message'].'"';
$sendMsg = new sendMsg();
$sendMsg->login($_POST['sender'], $_POST['password']);
$sendMsg->createSession($_POST['recipient']);
$sendMsg->sendMessage($_POST['message'], 'Times New Roman', 'FF0000');
switch ($sendMsg->result)
{
case ERR_AUTHENTICATION_FAILED:
$tags['INFO'] = 'Invalid passport and/or password.';
break;
case ERR_SERVER_UNAVAILABLE:
$tags['INFO'] = 'Something went wrong trying to connect to the server.';
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载