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 593B

1234567891011121314151617181920212223
  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. header('HTTP/1.0 403 Forbidden');
  9. echo 'Forbidden';
  10. exit;
  11. }
  12. include "api.php";
  13. $api = new PHP_CRUD_API(array(
  14. 'dbengine'=>'SQLServer',
  15. 'hostname'=>'(local)',
  16. 'username'=>'',
  17. 'password'=>'',
  18. 'database'=>'xxx',
  19. 'charset'=>'UTF-8'
  20. ));
  21. $api->executeCommand();