<?php

/*
*	Copyright VeryIDE,2007-2010
*	http://www.veryide.com/
*
*	2011/6/5 Lay
*/

require '../../include/loader.php';
html_start("会员列表 - VeryIDE");
?>

<!--body start-->
<?php

	//module
	require 'naver.php';
    
	$q = getgpc('q');
	$s = getgpc("s");
	
	$list = getgpc('list');
	$state = getnum("state",1);
	$order = getgpc("order");
	$action = getgpc('action');

	if ($action){
	
		switch($action){
			
			case "post":
				
				$subject = getgpc("subject");
				$address = getgpc("address");
				$list	 = getgpc('list');
				$content	 = getgpc("content");
				
				if( !System :: sendmail( $subject, $address, $list, $content ) ) {
					echo "<div id='state' class='failure'>对不起，邮件发送失败！</div>";
				} else {
					echo "<div id='state'>邮件发送成功！</div>";
				}
				
			break;
		}
	}
    
    ?>

	<?php
	
	if( !$_G['setting']["mail"]["MAIL_SMTP_HOST"] ){
		echo "<div id='state' class='failure'>请配置邮件服务器信息！</div>";
	}
	
	echo loader_script(array(VI_BASE."editor/kindeditor.js",VI_BASE."editor/lang/zh_CN.js"),'utf-8',$_G['product']['version']);
	?>

	<div id="box">
		<form action="" method="post" name="from1" mode="edit" verify="true">        
                        
        <table cellpadding="0" cellspacing="0" class="form">
        
            <tr>
                <td width="60"><strong>邮件主题：</strong></td>
                <td>
                	<input name="subject" type="text" class="text" id="subject" value="VeryIDE 测试邮件，于 <?php echo date('Y-m-d H:i:s');?> 发送" size="80" fix_name="邮件主题" fix_null="yes" />
                </td>                
            </tr>
        
            <tr>
                <td width="60"><strong>收件人：</strong></td>
                <td>
                	<input name="address" type="text" class="text" id="address" value="<?php echo $_SESSION['Manager']['email'];?>" size="80" fix_name="收件人地址" fix_null="yes" />
                </td>                
            </tr>
        
            <tr>
                <td width="60"><strong>抄送：</strong></td>
                <td>
                	<textarea name="list" cols="80" rows="3" id="list" /></textarea>
                    <br />
                    用英文逗号（,）分隔多个电子邮件地址
                </td>                
            </tr>
        
            <tr>
                <td><strong>详细内容：</strong></td>
                <td>
                	<textarea name="content" cols="50" rows="10" id="content" style="width:90%;height:300px;"><p>
	<a href="http://www.veryide.com/"><img style="margin:auto;" src="http://www.veryide.com/images/core.png" /> </a>
</p>
<p>
	VeryIDE 是一套开源的 Web 应用平台，面向<span class="keyword">地方社区和垂直行业网站</span>，为其提供互动营销支持<br />
VeryIDE 可以无缝地与 <span class="keyword">Discuz、DiscuzX、PHPWind、UCenter</span> <br />
等第三方程序整合，支持用户同步登录、退出和操作操作<br />
VeryIDE 目前已服务数千个站点，直接或间接帮助其实现营销活动，帮助其<span class="keyword">减少成本支出，提高工作效率，不再重复劳动，有效提升竞争力</span> 
</p>
<p>
	VeryIDE 官网地址：<a href="http://www.veryide.com/">http://www.veryide.com/</a> 
</p></textarea>
					<script type="text/javascript">
					var editor;
					KindEditor.ready(function(K) {
						editor = K.create('#content', {
							resizeType : 2,
							newlineTag : 'p',
							allowFileManager : false,
							filterMode : false,
							loadStyleMode : true,
							urlType : 'domain',
							uploadJson : '<?php echo VI_BASE;?>editor/upload.php?watermark=true' // 相对于当前页面的路径
						});
					});
					</script>
                </td>                
            </tr>
            
            <tr class="nobr">
                <td><strong></strong></td>
                <td>
                    <input name="action" type="hidden" id="action" value="post" />
                    <input type="submit" name="Submit" value="发送此邮件" class="submit" />
                </td>				
            </tr>
		</table>
	 </form>
	</div>
     
<!--body end-->

<?php html_close();?>