api de gestion de ticket, basé sur php-crud-api. Le but est de décorrélé les outils de gestion des données, afin
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

auth.php 546B

12345678910111213141516171819202122
  1. <?php
  2. if (!isset($_SERVER['PHP_AUTH_USER'])) {
  3. header('WWW-Authenticate: Basic realm="My Realm"');
  4. header('HTTP/1.0 401 Unauthorized');
  5. echo 'Text to send if user hits Cancel button';
  6. exit;
  7. } elseif ($_SERVER['PHP_AUTH_USER']=='user' && $_SERVER['PHP_AUTH_PW']=='pass') {
  8. echo "OK";
  9. } else {
  10. header('HTTP/1.0 403 Forbidden');
  11. }
  12. include "api.php";
  13. $api = new SQLSRV_CRUD_API(array(
  14. 'hostname'=>'(local)',
  15. 'username'=>'',
  16. 'password'=>'',
  17. 'database'=>'xxx',
  18. 'charset'=>'UTF-8'
  19. ));
  20. $api->executeCommand();