<?php
function setUpAccountForm () {
$form = '<form action="action.php" id="add_new_account_form" name="add_new_account_form" method="post">
<fieldset style="border:1px solid black;-moz-border-radius:5px;">
<legend>Setup - Mailaccount</legend>
<fieldset>
<legend>Basics</legend>
AccountName:<br />
<input type="text" name="account_name" id="account_name" size="20" /><br />
</fieldset>
<fieldset>
<legend>Incoming</legend>
<select id="account_type" name="account_type">
<option value="imap">IMAP</option>
<option value="pop3">POP3</option>
</select><br />
<input type="radio" value="0" name="account_encryption" id="account_encryption" checked="checked" />
No
<input type="radio" value="TLS" name="account_encryption" id="account_encryption" onclick="if(this.checked) {$(\'account_port\').value=\'143\'}"/>
TLS
<input type="radio" value="SSL" name="account_encryption" id="account_encryption" onclick="if(this.checked) {$(\'account_port\').value=\'993\'}"/>
SSL<br />
Server:<br />
<input type="text" name="account_server" id="account_server" size="20" /> <br />
Port:<br />
<input type="text" name="account_port" id="account_port" size="5" value="143" /><br />
Imap-Account-User:<br />
<input type="text" name="account_user" id="account_user" size="20" onblur="$(\'smtp_account_user\').value = $(\'account_user\').value;" /><br />
Imap-Account-Pass:<br />
<input type="password" name="account_pass" id="account_pass" size="20" onblur="" /><br />
</fieldset>
<fieldset>
<legend>Outgoing</legend>
Smtp-Server:<br />
<input type="text" name="smtp_account_server" id="smtp_account_server" size="20" /><br />
Port:<br />
<input type="text" name="smtp_port" id="account_port" size="5" value="25" /><br />
<input type="radio" value="0" name="smtp_encryption" id="account_encryption" checked="checked" />
No
<input type="radio" value="TLS" name="smtp_encryption" id="account_encryption" onclick="if(this.checked) {$(\'account_port\').value=\'143\'}"/>
TLS
<input type="radio" value="SSL" name="smtp_encryption" id="account_encryption" onclick="if(this.checked) {$(\'account_port\').value=\'993\'}"/>
SSL<br />
Server:<br />
Smtp-Account-User:<br />
<input type="text" name="smtp_account_user" id="smtp_account_user" value="" size="20" /><br />
Smtp-Account-Pass:<br />
<input type="password" name="smtp_account_pass" id="smtp_account_pass" value="" size="20" /><br />
</fieldset>
<br /><button type="button" name="sub" id="sub" onclick="addAccount(\'add_new_account_form\')" />OK</button>
</fieldset>
' ;
return $form ;
}
?>