コード例 #1
0
 public function LoggingAction()
 {
     // Overwrite the _log attribure
     $this->_log = new Chicoco\LogDb();
     $this->logInfo("This is a info log");
     $this->logWarning("This is a warning log message");
     $this->logError("This is a error log message");
     $logDao = new LogDao();
     $logs = $logDao->getLogs();
     $this->setViewVar('logs', $logs);
     $this->render();
 }
コード例 #2
0
 public static function delOrcamento($id_venda, $id_empreendimento, $id_usuario)
 {
     $VendaDao = new VendaDao();
     if (is_numeric($id_venda)) {
         if ($VendaDao->delOrcamento($id_venda)) {
             $LogDao = new LogDao();
             $LogTO = new LogTO();
             $LogTO->id_tipo_log = 1;
             $LogTO->id_empreendimento = $id_empreendimento;
             $LogTO->id_usuario = $id_usuario;
             $LogTO->tabela = 'tbl_vendas';
             $LogTO->id_ref = $id_venda;
             $LogTO->datetime = date('Y-m-d H:m:i');
             $LogDao->saveLog($LogTO);
             Flight::halt(200, '');
         } else {
             Flight::halt(500, 'erro ao excluir');
         }
     } else {
         Flight::halt(406, 'parametro recusado');
     }
 }
コード例 #3
0
ファイル: server.php プロジェクト: mermamerma/ws
require_once 'funciones.php';
$debug = 1;
$server = new soap_server();
$header = $server->requestHeaders;
$flag = doAuthenticate();
if ($flag == FALSE) {
    $server->fault(401, 'Authentication failed!');
}
$file = basename($_SERVER['PHP_SELF']);
$ns = "http://{$_SERVER['HTTP_HOST']}/ws/{$file}";
$server->configureWSDL("Web Service MPPRE-MPPEUCT", $ns);
#$server->soap_defencoding = 'UTF-8';
#$server->decode_utf8 = false;
#$server->encode_utf8 = true;
// Include con los Metodos y Tipos de Datos del WS
require_once 'wsdl.php';
$obj = new Citas();
$log = new LogDao();
// Creamos un Log de  Acceso
$log->register($header);
// Creamos un Log de Credenciales erradas
if ($flag == FALSE) {
    $log->registerBadLogin();
}
//Establecer servicio
if (isset($HTTP_RAW_POST_DATA)) {
    $input = $HTTP_RAW_POST_DATA;
} else {
    $input = implode("rn", file('php://input'));
}
$server->service($input);