Login   Register  
PHP Classes
elePHPant
Icontem

File: admin/unassigned-chats.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/unassigned-chats.php  >  Download  
File: admin/unassigned-chats.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: 2,165 bytes
 

Contents

Class file image Download
<?php
require_once 'session_initializer.php';
require_once 
__DIR__.'/../classes/Chat.php';
if(!isset(
$_SESSION['user_id']))
    
header('Location: login.php ');

$chatsChat::getUnasignedChats();

?>

<!DOCTYPE html>
<html lang="es">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css">
        <link rel="stylesheet" href="../css/main.css">
        <script src="../js/jquery.min.js"></script>
        <script src="../bootstrap/js/bootstrap.min.js"></script>
        <script src="../js/main.js"></script>
        <title>Simple Support Chat Back End</title>
        
    </head>
    <body>
         <div class="container">
            
            <div class="well" id="main">
                <center><h1>Welcome</h1></center>
                <div class="row">
                <div class="col-md-6 col-md-offset-3">

                    <table class="table table-hover table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>Client Name</th>
                            
                            <th>Start Date</th>
                            <th>Take chat</th>
                        </tr>
                        </thead>
                        <tbody>
                            <?php 
                                
foreach($chats as $chat){
                                    
$client_name=Chat::getExistingChat($chat['id'])->getClientName();
                                    echo 
"<tr>";
                                    echo 
"<td>$client_name</td>";
                                    echo 
"<td>$chat[start_date]</td>";
                                    echo 
"<td><a href='chat.php?id=$chat[id]'>Take</a></td>";
                                    echo 
"</tr>";
                                }
                            
?>
                        </tbody>
                    </table>
                        
                </div>
               </div>
                
            </div>
            
            
        </div>
        
    </body>
</html>