Exemplo n.º 1
0
 /**
  * make the call to the API
  *
  * @param  Request
  * @return Response
  */
 public function send($request)
 {
     try {
         # if it was successful, return the response
         return $this->client->send($request)->json();
     } catch (\GuzzleHttp\Exception\ClientException $e) {
         # if it was unsuccessful then return the error that was thrown
         return $e->getResponse();
     }
 }
Exemplo n.º 2
0
<?php 
echo 'Здравствуйте, ваш внутрений номер ' . $_SESSION['operator'];
echo '<br>почтовый адрес ' . $_SESSION['email'];
if (isset($_POST['startcall']) && $_POST['number'] > 0) {
    $number = $_POST['number'];
    if (!$operator == 100) {
        client::call($number);
    } else {
        $op = $_POST['extension'];
        client::callop($number, $op);
    }
}
if (isset($_POST['send']) && $_POST['number'] > 0) {
    $number = $_POST['number'];
    client::send($number);
}
if (isset($_POST['comment']) && $_POST['number'] > 0) {
    $number = $_POST['number'];
    $comment = $_POST['comment_text'];
    client::comment($number, $comment);
}
list($list, $pagination, $rows) = client::find($_GET['search'], $operator);
?>
   
            </div>
        </div>  

        <div class="row">
            <div class="col-xs-12 ">
                <table class="table table-hover table-condensed table-striped table-bordered">