protected function _SendRequest($Request, $requestUrl = '', $service = '', $action = '') { try { $client = new SoapClient(null, array('location' => "http://{$this->_HOST}:{$this->_IOPort}{$requestUrl}", 'uri' => $service, 'noroot' => True, 'login' => $this->_USER, 'password' => $this->_PASS)); $params = array(); if ($Request) { foreach ($Request as $key => $value) { $params[] = new SoapParam($value, $key); } } $r = $client->__soapCall($action, $params); //dumpvar($r); return is_soap_fault($r) ? null : $r; } catch (Exception $e) { throw new uRcpIoException(__CLASS__ . "=>{$e->detail->UPnPError->errorDescription} '{$action}' !! \nCode: {$e->detail->UPnPError->errorCode}"); echo "Url: {$requestUrl}<br>Service:{$service}<br>Action: {$action}<br>"; dumpvar($client); echo "Fehler: " . nl2br($e->__toString()) . "<br>"; echo "LastReq:" . nl2br($client->__getLastRequest()) . "<br>"; echo "LastReqHead:" . nl2br($client->__getLastRequestHeaders()) . "<br>"; echo "LastResp:" . nl2br($client->__getLastResponse()) . "<br>"; die; } }
// LIST case 'DELETE': // delete record if (empty($id)) { echo '<p>Invalid record specified.</p>'; break; // bail if no id is set } // delete specific record $query = "DELETE FROM facilities WHERE id = '{$id}'"; $result = $db->query($query); if ($result === false) { // query error echo '<p>Query Error. Original query: ' . $query . '</p>'; $dbErr = $db->errorInfo(); dumpvar($dbErr); } // process results (check how many rows processed in this case) if ($result->rowCount() > 0) { // success! display feedback echo '<p>The record has been deleted.</p>'; } break; // DELETE } // switch $action ?> </body> </html>
$message = 'Viewing tickets assigned to you:'; break; } // switch //dumpvar($tickets); echo '<p>' . $message . '</p>'; echo '<table><tbody><thead>' . '<tr>' . '<th>ID</th>' . '<th>Request Date</th>' . '<th>Facility</th>' . '<th>Status</th>' . '<th>Tech Assigned</th>' . '<th>Description</th>' . '<th>Options</th>' . '</tr>' . '</thead>'; // loop through result set grabbing a row at a time foreach ($tickets as $ticket) { echo '<tr>' . '<td>' . $ticket['ticket_id'] . '</td>' . '<td>' . $ticket['request_date'] . '</td>' . '<td>' . $ticket['facility'] . '</td>' . '<td>' . $enum['ticket_status'][$ticket['status']] . '</td>' . '<td>' . $ticket['tech'] . '</td>' . '<td>' . $ticket['description'] . '</td>' . '<td>' . '<a href="ticket.php?action=view&id=' . $ticket['ticket_id'] . '">View</a> | ' . '<a href="ticket.php?action=delete&id=' . $ticket['ticket_id'] . '">Delete</a> ' . '</td>' . '</tr>'; } echo '</tbody></table>'; break; // LIST // LIST case 'VIEW': // view ticket if (empty($id)) { echo '<p>Invalid record specified.</p>'; break; // bail if no id is set } // get specific ticket (with comment info) $ticket = getTicketById($db, $id); dumpvar($ticket); // display ticket/comment template include 'inc_view_ticket.php'; break; } // switch action include 'footer.php';