<?php TPL::output('admin/global/header.tpl.htm'); ?>
<!--left-->
<?php TPL::output('admin/global/left.tpl.htm'); ?>
<!--left-->

<div id="main-content" style="margin:0 0 0 200px;">
	<div class="clear"></div>
	<div class="content-box">
		<div class="content-box-header">
			<h3> Email setting </h3>
			<ul class="content-box-tabs">
			</ul>
			<div class="clear"></div>
		</div>
		<div class="content-box-content">
			<div id="notification_box" class="notification success png_bg" style="display:none;"> <a class="close" href="javascript:;"></a>
				<div name="notification_content"></div>
			</div>
			<div class="tab-content default-tab" id="tab1">
				<form id="_save_form" action="admin/setting/sys_save_ajax/" method="post">
					<fieldset>
					<p groupid="7" name="email_type">
						<label>System email sending option:</label>
						<select class="small-input" name="email_type" style="width:500px;">
							<option value="1" <?php if ($this->setting['email_type'] == '1'){ ?> selected="true"<?php } ?>>Send from SOCKET to connect SMTP server</option>
							<option value="2" <?php if ($this->setting['email_type'] == '2'){ ?> selected="true"<?php } ?>>By sending a PHP function in sendmail</option>
						</select>
					</p>
					<p>
						<label>Acceptance test Email address</label>
						<input name="test_email" class="text-input small-input" type="text" value=""/>
						&nbsp;
						<input class="button" type="button" onclick="test_email_setting($('#_save_form'), $(this));" value="  Send a test mail  " />
					</p>
					<p groupid="7" name="smtp_server">
						<label>SMTP server: <span style="font-weight:normal">(For example: smtp.163.com)</span></label>
						<input name="smtp_server" class="text-input small-input" type="text" value="<?php echo $this->setting['smtp_server']; ?>"/>
					</p>
					<p groupid="7" name="smtp_ssl">
						<label>Use safe link (SSL) to connect to server: <span style="font-weight:normal">(Please choose according to service requirements)</span></label>
						<input type="radio" name="smtp_ssl" value="Y" <?php if ($this->setting['smtp_ssl'] == 'Y'){ ?> checked="true"<?php } ?>/>
						Yes
						<input type="radio" name="smtp_ssl" value="N" <?php if ($this->setting['smtp_ssl'] == 'N'){ ?> checked="true"<?php } ?>/>
						No </p>
					<p groupid="7" name="smtp_port">
						<label>SMTP Port: <span style="font-weight:normal">(Default server port 25, SSL agreement default port 465, please refer to Email server prover for more information)</span></label>
						<input name="smtp_port" class="text-input small-int" type="text" value="<?php echo $this->setting['smtp_port']; ?>"/>
					</p>
					<p groupid="7" name="smtp_username">
						<label>SMTP account:</label>
						<input name="smtp_username" class="text-input small-input" type="text" value="<?php echo $this->setting['smtp_username']; ?>"/>
					</p>
					<p groupid="7" name="smtp_password">
						<label>SMTP password:</label>
						<input name="smtp_password" class="text-input small-input" type="text" value="<?php echo $this->setting['smtp_password']; ?>"/>
					</p>
					<p>
						<label>Original Email of System Email:</label>
						<input name="from_email" class="text-input small-input" type="text" value="<?php echo $this->setting['from_email']; ?>"/>
					</p>
					<p>
						<input class="button" type="button" onclick="ajax_post($('#_save_form'), _form_process);" value="Save" />
					</p>
					</fieldset>
					<div class="clear"></div>
				</form>
			</div>
		</div>
		<div class="clear"></div>
		<div id="notf_tip" style="display:none;" class="notification png_bg"> <a href="javascript:;" class="close"><img src="<?php echo GET_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" alt="Close" /></a>
			<div id="notf_cont"></div>
		</div>
	</div>
	<!-- footer -->
	<?php TPL::output('admin/global/footer.tpl.htm'); ?>
	<!-- footer -->
</div>
<!-- main -->
</div>
</body></html>