Login   Register  
PHP Classes
elePHPant
Icontem

File: admin/actions/send_user_message.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Miguel Villaseņor  >  MKCS PHP Support Chat  >  admin/actions/send_user_message.php  >  Download  
File: admin/actions/send_user_message.php
Role: Example script
Content type: text/plain
Description: Example script
Class: MKCS PHP Support Chat
Chat with clients of a support site
Author: By
Last change:
Date: 2013-09-17 12:08
Size: 379 bytes
 

Contents

Class file image Download
<?php
require_once '../session_initializer.php';
require_once 
'../../classes/User.php';

if(isset(
$_SESSION['user_id'])){

if(isset(
$_POST['message'])&&$_POST['message']!=""){
    
$userUser::getUser($_SESSION['user_id']);
    
$user->sendMessage($_POST['message'], $_POST['id']);
    echo 
"{status :200}";
}else{
    echo 
"{status :400}";
}

}else{
     echo 
"{status :400}";
}