관리-도구
편집 파일: massemail.php
<?php include("../connect.php"); $sql = "select id, emailaddress, firstname, lastname from member order by emailaddress"; $res = mysql_query($sql); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> <!-- .style1 { font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 12px; } .style1x { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }--> </style> <script type="text/javascript"> function checkAll() { var str = ''; var elem = document.getElementById('form1').elements; for(var i = 0; i < elem.length; i++) elem[i].checked = true; } function uncheckAll() { var str = ''; var elem = document.getElementById('form1').elements; for(var i = 0; i < elem.length; i++) elem[i].checked = false; } </script> </head> <body> <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000"> <tr> <td><table width="100%" border="0" cellspacing="1" cellpadding="4"> <tr> <td bgcolor="#FFFFFF"><form id="form1" name="form1" method="post" action="sendemail.php"> <table width="100%" border="0" cellspacing="3" cellpadding="4"> <tr> <td height="41" colspan="2"><span class="style1">Select Groups/Email Address to whom you want to send out the Email Communication </span></td> </tr> <tr> <td height="41" colspan="2"><span class="style1"><a href="#" onclick="javascript:checkAll()">Check All</a> | <a href="#" onclick="javascript:uncheckAll()">Uncheck All<a/></span></td> </tr> <?php while ($row = mysql_fetch_row($res)) {?> <tr> <td width="1%"><input type="checkbox" name="chkmem<?php echo $row[0]; ?>" value="Y" /></td> <td width="99%"><span class="style1x"><?php echo $row[1] . "[" . $row[2] . " " . $row[3] . "]"; ?></span></td> </tr> <?php } ?> <?php while ($row = mysql_fetch_row($res)) {?> <tr> <td width="1%"><input type="checkbox" name="chkmem<?php echo $row[0]; ?>" value="Y" /></td> <td width="99%"><span class="style1x"><?php echo $row[1] . "[" . $row[2] . " " . $row[3] . "]"; ?></span></td> </tr> <?php } $sql = "select * from memgroup group by grpname"; $res = mysql_query($sql); while ($row = mysql_fetch_row($res)) {?> <tr> <td width="1%"><input type="checkbox" name="chkgrp<?php echo $row[0]; ?>" value="Y" /></td> <td width="99%"><span class="style1x"><?php echo $row[1]; ?></span></td> </tr> <?php } ?> <tr> <td> </td> <td><input type="submit" name="Submit" value="Continue to Next Step" /></td> </tr> </table> </form> </td> </tr> </table></td> </tr> </table> </body> </html>