|
- <?php
- require_once './php_include/Config.php';
- require_once './php_include/class.db.inc';
- require_once './php_include/disney.inc';
- header("Content-type:text/html;charset=utf-8");
-
- function conn(){
- $port=defined('MYSQL_PORT')?MYSQL_PORT:3306;
- try {
- $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"));
- return $pdo;
- }catch (PDOException $e){
- write_log('ctsdata_test new PDO failed:'.$e->getMessage());
- }
- }
-
- //DB
- /*
- $objDbh = new Db;
- $objDbh->setAccount(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB);
- $objDisney = new DbDisney($objDbh);
- $org_array = $objDisney->getBaseOrgAndAccountArray();
- */
- $pdo=conn();
- $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";
- $result=$pdo->query($sqlWhere);
- $result_array=$result->fetchAll();
- $result->closeCursor();
-
- $org_array = $result_array;
-
- ?>
-
- <html lang="en">
- <head>
- <link href="/css/disney/main.css" rel="stylesheet" type="text/css" />
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- </head>
- <body >
- <br /><br />
- <CENTER>
- <span style="font-size:25px;">二维码一览</span>
- <br /><br />
-
- <?php if( $org_array != false && count($org_array) > 0 ) { ?>
- <br />
- <table border="1">
- <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>
- <?php
- $no_temp = 1;
- foreach( $org_array as $org_info ) {
- if( $no_temp % 5 == 1 ) { echo '<tr>'; }
- 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 />';
-
- //$image_url = "http://bshare.optimix.asia/barCode?site=weixin&url=http://xmwxc.zhizhuchuxing.cn/top.php?cc=".$org_info["org_code"];
- $image_url = "http://qr.liantu.com/api.php?&w=200&text=http://xmwxc.zhizhuchuxing.cn/top.php?cc=".$org_info["org_code"];
- echo '<img src="'.$image_url.'" /><br /><br /><span style="font-size:larger;color:#ff0000;">'.$org_info["org_name"].'</span><br />'.
- '登录名:'.$org_info["account_name"].'<br />密码:'.$org_info["account_pwd"].'<br /><br /></td>';
- if( $no_temp % 5 == 0 ) {
- echo '</tr>';
- }
- $no_temp++;
- } ?>
- </table><br /><br />
- </CENTER>
-
- <?php } else { echo "没有匹配的数据"; } ?>
- </body>
- </html>
-
-
|