<?php

include_once 'config.php';
$list = $_POST["list"];
switch ($list) {
    case "slt_agents":
        print getusers();
        break;
    case "slt_services":
        print getlist_services();
        break;
    case "list_services":
        print getlist_services();
        break;
}
function getusers()
{
    $mysqli = new mysqli(DBSERVER, DBUSER, DBPWD, DB);
    ////set the query
    $query = sprintf("SELECT * FROM `agents` ORDER BY `nom`");
    $result = $mysqli->query($query);
    $result_array = array();
    while ($row = $result->fetch_assoc()) {
        $result_array[] = $row;
    }
    $mysqli->close();
    return json_encode($result_array);
}
function getlist_services()
{
    $mysqli = new mysqli(DBSERVER, DBUSER, DBPWD, DB);
Exemplo n.º 2
0
function page1($id = '')
{
    $time = $date = '';
    $worc = mysql_fetch_assoc(mysql_query("SELECT * FROM `person_work_graphic`  WHERE id='{$id}'"));
    if (empty($worc[start])) {
        $date = date('Y-m-d');
    } else {
        $date = date('Y-m-d', strtotime($worc[start]));
        $time = array('start' => date('H:i:00', strtotime($worc[start])), 'end' => date('H:i:00', strtotime($worc[end])));
    }
    return '
	<div id="dialog-form">
		<fieldset >
	    	<legend>ძირითადი ინფორმაცია</legend>

        <table>
          <tr>
            <th>აირჩიეთ მომხმარებელი</th>
            <th width="20px"></th>
            <th>აირჩიეთ თარიღი</th>
            <th width="20px"></th>
            <th>აირჩიეთ გრაფიკი</th>
          </tr>
          <tr>
            <td>
                <select class="idle" id="user">' . getusers($worc[person_id]) . '  </select>
            </td>
        <td></td>
            <td><input id="date" value="' . $date . '" class="idle date"/> </td>
        <td></td>
                    <td>
                <select class="idle" id="graphic_time"> ' . getgraphic($time) . '</select>
            </td>
        </tr>

        </table>



		</fieldset >
	</div>
<input type="hidden" id="id" value=' . $_REQUEST[id] . '>';
}
Exemplo n.º 3
0
<?
date_default_timezone_set('America/New_York');

include("logger.php");

$users = getusers();
$dropbox_url = "http://dl.dropbox.com/u/19353";

?>
<html>
  <head>
    <title>Casey's Minecraft Server (cpu.mypets.ws)</title>
    <link rel="stylesheet" type="text/css" href="/assets/css/reset.css" media="screen" />
    <style>

    .server { font: bold 24px Helvetica, Arial; padding: 20px 10px; color: #7ed471; background: #333; border-bottom: 1px solid #fff; }
    .users .user { padding: 10px; clear: both; border-bottom: 1px solid #ddd; }
    .users .user img { float: left; }
    .users .user .info { margin-top: 15px; float: left; margin-left: 10px; }
    .users .user .ss { float: right; width: 160px; height: 100px; overflow: hidden; }
    .users .user .ss img { height: 100px; }
    .users .user .info h1 { font: 46px Helvetica, Arial; color: #333; }
    .users .user .info span { color: #999; font: normal 14px Helvetica, Arial; }
    .users .user .info span.on { color: #7ed471; }


    .users .offline .info h1 { color: #666; }
    .users .offline { background: #eee;  }
    .clear { clear: both; }

    </style>
Exemplo n.º 4
0
<?php

session_start();
include 'function.php';
header('Content-Type: application/json');
$result = [];
if (!isset($_SESSION['loggedin'])) {
    $result['error'] = 'not logged in';
    echo json_encode($result);
    exit;
}
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
    $result = getusers();
}
echo json_encode($result);
Exemplo n.º 5
0
					<div id="messages"></div>					 
					 <div class="row">
				<div class="panel panel-default">
  					<div class="panel-heading">
				    	<h3 class="panel-title">Update users for <?php 
    echo $_GET['roi'];
    ?>
</h3>
 					 </div>
					  <div class="panel-body">
						
					 <p>Highlight users for access to this database.<br>
					 <strong>Note currently highlighted users already have access - deselecting them will remove access.</strong></p>
				  
				<?php 
    getusers();
    ?>
					
					<div>
    <div class="col-sm-offset-2 col-sm-10"><br><br>
      <!--<button type="submit" class="btn btn-default">Update Users</button>-->
      <button id = 'optobutton' class='btn btn-warning' data-toggle='modal' data-target='#resetmodal'>
				  <i class='fa fa-exclamation-triangle'></i> Update Users
				</button>
				</div>
    </div>
    </div>
    
  

Exemplo n.º 6
0
function page1()
{
    return '
	<div id="dialog-form">
		<fieldset >
	    	<legend>ძირითადი ინფორმაცია</legend>
    
        <table>
          <tr>
            <th>აირჩიეთ მომხმარებელი</th>
            <th width="20px"></th>
            <th>აირჩიეთ თარიღი</th>
            <th width="20px"></th>
            <th>აირჩიეთ გრაფიკი</th>
          </tr>
          <tr>
            <td>
                <select class="idle" id="user">' . getusers() . '  </select>	
            </td>
        <td></td>
            <td><input id="date" class="idle date"/></td>   
        <td></td> 
                    <td>
                <select class="idle" id="graphic_time"> ' . getgraphic() . '</select>	
            </td>    
        </tr>
        
        </table>



		</fieldset >
	</div>
<input type="hidden" id="id" value=' . $_REQUEST[id] . '>';
}