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.
 
 
 
 
 
 

73 lines
2.8 KiB

  1. <?php
  2. require_once './php_include/Config.php';
  3. require_once './php_include/class.db.inc';
  4. require_once './php_include/disney.inc';
  5. header("Content-type:text/html;charset=utf-8");
  6. function conn(){
  7. $port=defined('MYSQL_PORT')?MYSQL_PORT:3306;
  8. try {
  9. $pdo=new PDO("mysql:host=".MYSQL_HOST.";port=".$port.";dbname=".MYSQL_DB, MYSQL_USER, MYSQL_PASSWORD,array(PDO::MYSQL_ATTR_INIT_COMMAND => "set names utf8"));
  10. return $pdo;
  11. }catch (PDOException $e){
  12. write_log('ctsdata_test new PDO failed:'.$e->getMessage());
  13. }
  14. }
  15. //DB
  16. /*
  17. $objDbh = new Db;
  18. $objDbh->setAccount(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB);
  19. $objDisney = new DbDisney($objDbh);
  20. $org_array = $objDisney->getBaseOrgAndAccountArray();
  21. */
  22. $pdo=conn();
  23. $sqlWhere = " SELECT * FROM base_org,account WHERE base_org.org_id > 0 AND account.org_id=base_org.org_id ORDER BY base_org.org_id";
  24. $result=$pdo->query($sqlWhere);
  25. $result_array=$result->fetchAll();
  26. $result->closeCursor();
  27. $org_array = $result_array;
  28. ?>
  29. <html lang="en">
  30. <head>
  31. <link href="/css/disney/main.css" rel="stylesheet" type="text/css" />
  32. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  33. </head>
  34. <body >
  35. <br /><br />
  36. <CENTER>
  37. <span style="font-size:25px;">二维码一览</span>
  38. <br /><br />
  39. <?php if( $org_array != false && count($org_array) > 0 ) { ?>
  40. <br />
  41. <table border="1">
  42. <tr><td style="text-align:center;font-weight:bolder;">编号<td style="text-align:center;font-weight:bolder;">编号</td><td style="text-align:center;font-weight:bolder;">编号</td><td style="text-align:center;font-weight:bolder;">编号</td><td style="text-align:center;font-weight:bolder;">编号</td></tr>
  43. <?php
  44. $no_temp = 1;
  45. foreach( $org_array as $org_info ) {
  46. if( $no_temp % 5 == 1 ) { echo '<tr>'; }
  47. echo '<td style="text-align:center;">'.$org_info["org_id"].'<br /><span style="font-size:larger;color:#ff0000;">'.$org_info["org_name"].'</span><br /><br />';
  48. //$image_url = "http://bshare.optimix.asia/barCode?site=weixin&url=http://wx.zhizhuchuxing.com/top.php?cc=".$org_info["org_code"];
  49. $image_url = "http://qr.liantu.com/api.php?&w=200&text=http://wx.zhizhuchuxing.com/top.php?cc=".$org_info["org_code"];
  50. echo '<img src="'.$image_url.'" /><br /><br /><span style="font-size:larger;color:#ff0000;">'.$org_info["org_name"].'</span><br />'.
  51. '登录名:'.$org_info["account_name"].'<br />密码:'.$org_info["account_pwd"].'<br /><br /></td>';
  52. if( $no_temp % 5 == 0 ) {
  53. echo '</tr>';
  54. }
  55. $no_temp++;
  56. } ?>
  57. </table><br /><br />
  58. </CENTER>
  59. <?php } else { echo "没有匹配的数据"; } ?>
  60. </body>
  61. </html>