Rev | Line | |
---|
[112] | 1 | <html> |
---|
| 2 | <head> |
---|
| 3 | <title></title> |
---|
| 4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
| 5 | </head> |
---|
| 6 | <body> |
---|
| 7 | <table width="700" border=1 cellspacing="0" cellpadding="4"> |
---|
| 8 | <tr><td>系統帳號</td><td>註冊帳號</td><td>姓名</td><td>電子郵件</td><td>服務單位</td></tr> |
---|
| 9 | <? |
---|
| 10 | require_once ("../etc/init.php"); |
---|
| 11 | |
---|
| 12 | // 連結資料庫 |
---|
| 13 | $link = mysql_connect($mysql_host, $mysql_user, $mysql_password) or die(mysql_error()); |
---|
| 14 | mysql_select_db($mysql_database, $link) or die(mysql_error() ); |
---|
| 15 | mysql_query("SET NAMES 'utf8'"); |
---|
| 16 | $usermail=""; |
---|
| 17 | // 判斷此帳號密碼是否存在 |
---|
| 18 | $str = "SELECT hadoop_reg.user,hadoop_reg.email,hadoop_reg.name,hadoop_owner.hadoop_user,hadoop_reg.department FROM hadoop_reg,hadoop_owner WHERE hadoop_reg.user=hadoop_owner.hadoop_owner AND hadoop_owner.hadoop_owner != ''"; |
---|
| 19 | $result = mysql_query($str , $link) or die(mysql_error() ); |
---|
| 20 | $rows = mysql_num_rows ($result); |
---|
| 21 | if($rows !=0) |
---|
| 22 | { |
---|
| 23 | echo "<tr><td colspan='5'>共計 $rows 筆註冊紀錄</td></tr>\n"; |
---|
| 24 | for ($i=0 ; $i < $rows ; $i++) |
---|
| 25 | { |
---|
| 26 | $col= mysql_fetch_row($result); |
---|
| 27 | echo "<tr><td>$col[3]</td><td>$col[0]</td><td>$col[2]</td></td><td><a href='mailto:$col[1]'>$col[1]</a></td><td>$col[4]</td></tr>\n"; |
---|
| 28 | if( $i == 0 ) $usermail= $col[1]; |
---|
| 29 | else $usermail=$usermail." ,".$col[1]; |
---|
| 30 | } |
---|
| 31 | } |
---|
| 32 | mysql_close($link); |
---|
| 33 | ?> |
---|
| 34 | </table> |
---|
| 35 | <? echo "全部使用者 email 清單<p/> <textarea cols='60'>$usermail</textarea>" ?> |
---|
| 36 | </body> |
---|
| 37 | </html> |
---|
Note: See
TracBrowser
for help on using the repository browser.