cert.php 790 B

1234567891011121314151617
  1. <?php
  2. // by 请勿倒卖,已申请软著,否则追究法律责任
  3. require '../system/db.class.php';
  4. header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
  5. header("Cache-Control: no-cache, must-revalidate");
  6. header("Pragma: no-cache");
  7. header("Content-type: text/html;charset=" . IN_CHARSET);
  8. header("Access-Control-Allow-Origin: " . (isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : NULL));
  9. header("Access-Control-Allow-Credentials: true");
  10. $cert = NULL;
  11. $type = SafeRequest('type', 'get') ?: 0;
  12. $query = db('cert')->where('type', $type)->where('status', '1')->select();
  13. foreach ($query as $row) {
  14. $cert .= '<option value="' . $row['in_dir'] . '" id="cert_' . $row['in_dir'] . '">' . $row['in_name'] . '</option>';
  15. }
  16. echo $cert ?: '<option value="">No business certificate</option>';