<?xml version="1.0" encoding="UTF-8"?>
<driver name="ajxpclient">
	<actions>
		<action name="login">
			<gui text="163" title="168" src="encrypted.png"
				accessKey="" hasAccessKey="false">
				<context selection="false" dir="" recycle="false"
					actionBar="true" contextMenu="false" infoPanel="false"
					actionBarGroup="user">
				</context>
			</gui>
			<rightsContext noUser="false" userLogged="hidden" guestLogged="show" read="false" write="false" adminOnly=""></rightsContext>			
			<processing>
				<clientCallback prepareModal="true"><![CDATA[
					var loginRedirect = AJXP_LOGIN_REDIRECT;
					if(loginRedirect){
						document.location.href=loginRedirect;
					}else{
						if(ajaxplorer && ajaxplorer.actionBar){
							ajaxplorer.actionBar.updateLocationBar('/');
						}
						if(ajaxplorer && ajaxplorer.infoPanel){
							ajaxplorer.infoPanel.empty();
						}
						modal.showDialogForm('Log In', 'login_form', 
						function(){
							var oForm = modal.getForm();
							var connexion = new Connexion();
							connexion.addParameter("get_action", "get_seed");
							connexion.onComplete = function(transport){
								$('login_seed').value = transport.responseText;
							};
							connexion.sendSync();
						}, 
						function(){
							var oForm = modal.getForm();
							if($('login_seed').value != '-1'){
								oForm.password.value = hex_md5(hex_md5(oForm.password.value)+$('login_seed').value);
							}
							ajaxplorer.actionBar.submitForm(oForm);
							oForm.userid.value = '';
							oForm.password.value = '';
							return false;				
						});
					}
					]]></clientCallback>
				<serverCallback methodName="switchAction"></serverCallback>
			</processing>
		</action>		
		<action name="logout">
			<gui text="164" title="169" src="decrypted.png"
				accessKey="" hasAccessKey="false">
				<context selection="false" dir="" recycle="false"
					actionBar="true" contextMenu="false" infoPanel="false"
					actionBarGroup="user">
				</context>
			</gui>
			<rightsContext noUser="false" userLogged="only" guestLogged="hidden" read="false" write="false" adminOnly=""></rightsContext>			
			<processing>
				<clientCallback prepareModal="true"><![CDATA[
					clearRememberData();
					var connexion = new Connexion();
					connexion.addParameter('get_action', 'logout');
					connexion.onComplete = function(transport){
						ajaxplorer.actionBar.parseXmlMessage(transport.responseXML);
						};
					connexion.sendSync();
					]]></clientCallback>
				<serverCallback methodName="switchAction"></serverCallback>
			</processing>
		</action>		
	</actions>
</driver>
