Location: PHPKode > projects > Remote Mail > skin/skin_edit_account.php
<?php
	


	/*
	 *
	 *	Remote Mail Client
	 *	CopyLEFT 2004 by Maurizio Pinotti
	 *
	 *	You can freely distribute this script as long as you do *NOT* edit it:
	 *	editing is only permitted for private use.
	 *
	 *	----------------------------------------------------------------------
	 * 	 Official site: http://www.pinottinet.com/rmail
	 *	----------------------------------------------------------------------
	 *
	 */



	// ------------------------- [ NO USER CONFIGURABLE ELEMENTS BELOW HERE ] ------------------------	

function get_table_account_data_modify($account_params, $modify_form_action, $hide_pass) { 

	return get_table_account_data_modify_or_add($account_params, true, $modify_form_action, $hide_pass);
}

function get_table_account_data_add($account_params, $modify_form_action, $hide_pass) { 

	return get_table_account_data_modify_or_add($account_params, false, $modify_form_action, $hide_pass);
}

// better a function than a skin beacause usually I got several account, so I should print several times these lines
function get_table_account_data_modify_or_add($account_params, $modify_or_add, $modify_form_action, $hide_pass) {
	
	global $lang;

	// if we shall modify set the name field as read-only 
	$read_only = ($modify_or_add ? "readonly" : "");
	$modify_caption = ($modify_or_add ? "{$lang['edit_modify']}" : "{$lang['edit_add']}");
	$reset_caption = ($modify_or_add ? "{$lang['edit_rollback']}" : "{$lang['edit_reset']}");

	// parse account parameters
	$account_name = $account_params['name'];
	$account_server = $account_params['server'];
	$account_user = $account_params['user'];
	$account_pass = $account_params['pass'];
	$account_webmail = $account_params['webmail'];
	
	// hide pass?
	if ($hide_pass) $password_type = "password";
	else $password_type = "text";

return <<<EOF
        
<form name="account_data" method="post" action="{$modify_form_action}">
<table width="100%" border="0">
    <td width="20%" class="message">{$lang['account_name_caption']}:</td>
    <td width="80%" class="field"><input name="txt_name" type="text" id="txt_name" value="{$account_name}" size="40" maxlength="200" {$read_only}>      </td>
	</tr><tr> 
            
    <td width="20%" class="message">{$lang['account_server_caption']}:</td>
    <td width="80%" class="field"><input name="txt_server" type="text" id="txt_server" value="{$account_server}" size="40" maxlength="200">      </td>
	</tr><tr> 
            
    <td width="20%" class="message">{$lang['account_user_caption']}:</td>   
    <td width="80%" class="field"><input name="txt_user" type="text" id="txt_user" value="{$account_user}" size="40" maxlength="200"></td>
	</tr><tr> 
            
    <td width="20%" class="message">{$lang['account_pass_caption']}:</td>
    <td width="80%" class="field"><input name="txt_pass" type="{$password_type}" id="txt_pass" value="{$account_pass}" size="40" maxlength="200">      </td>
	</tr><tr> 
            
    <td width="20%" class="message">{$lang['account_webmail_caption']}:</td>            
    <td width="80%" class="field"><input name="txt_webmail" type="text" id="txt_webmail" value="{$account_webmail}" size="40" maxlength="200">      </td>
	</tr>
	<tr>
	  <td class="message">&nbsp;</td>
	  <td class="message"><input name="chk_reload" type="checkbox" id="chk_reload" value="reload" checked>{$lang['reload_main_page']}</td>
    </tr>
	<tr>
	
    <td class="message">&nbsp;</td>
    <td class="message"><input type="submit" name="Submit" value="{$modify_caption}" class="field">
    <img src="images/spacer.gif" width="30" height="10"><input type="reset" name="rst" value="{$reset_caption}" class="field">
    <div align="center">
    </div></td></tr>
</table>
</form>
<hr align="left" width="80%"> 
<p>&nbsp;</p>
EOF;
}

?>
Return current item: Remote Mail