<?php
//This code is copyright (c) ViciSoft SL, all rights reserved.
//The contents of this file are protected under law as the intellectual property 
//of ViciSoft SL. Any use, reproduction, disclosure or copying of any kind 
//without the express and written permission of ViciSoft SL is forbidden.
//Author: Vince Reid, vincereid@gmail.com
global $customeraccounturl,$forceloginonhttps,$storeurl;
$GLOBALS['alreadygotadmin']=getadminsettings();
$pageqs='';
foreach(@$_GET as $objQS=>$objValue)
	if(!($objQS=='mode' && ($objValue=='login' || $objValue=='logout'))) $pageqs.=($pageqs!=''?'&':'').$objQS . '=' . $objValue;
if(@$forceloginonhttps && (@$_SERVER['HTTPS']!='on' && @$_SERVER['SERVER_PORT']!='443') && (str_replace('http:','https:',@$storeurl)!=$GLOBALS['storeurlssl'])) $pagename=''; else $pagename=str_replace('"','',strip_tags(@$_SERVER['PHP_SELF'])).($pageqs!=''?'?'.$pageqs:'');
if(@$GLOBALS['enableclientlogin']) displaysoftlogin();
?>
      <table class="mincart" width="130" bgcolor="#FFFFFF">
        <tr> 
          <td class="mincart" bgcolor="#F0F0F0" align="center"><img src="<?php print $GLOBALS['pathtohere']?>images/minipadlock.png" style="vertical-align:text-top;" alt="<?php print $GLOBALS['xxMLLIS']?>" />
<?php		if(@$_SESSION['clientID']!='' && @$customeraccounturl!=''){ ?>
			&nbsp;<a class="ectlink mincart" href="<?php print $customeraccounturl?>"><strong><?php print $GLOBALS['xxYouAcc']?></strong></a>
<?php		}else{ ?>
            &nbsp;<strong><?php print $GLOBALS['xxMLLIS']?></strong>
<?php		} ?>
		  </td>
        </tr>
<?php	if(!@$GLOBALS['enableclientlogin']){ ?>
		<tr>
		  <td class="mincart" bgcolor="#F0F0F0" align="center">
		  <p class="mincart">Client login not enabled</p>
		  </td>
		</tr>
<?php	}elseif(@$_SESSION['clientID']!=''&&@$_GET['mode']!='logout'){ ?>
		<tr>
		  <td class="mincart" bgcolor="#F0F0F0" align="center">
		  <p class="mincart"><?php print $GLOBALS['xxMLLIA']?><strong><br /><?php print htmlspecials($_SESSION['clientUser'])?></strong></p>
		  </td>
		</tr>
		<tr> 
          <td class="mincart" bgcolor="#F0F0F0" align="center"><span style="font-family:Verdana">&raquo;</span> <?php print imageorlink(@$GLOBALS['imgminilogout'],@$GLOBALS['xxLogout'],'ectlink mincart','return dologoutaccount()',TRUE)?></td>
        </tr>
<?php	}else{ ?>
		<tr>
		  <td class="mincart" bgcolor="#F0F0F0" align="center">
		  <p class="mincart"><?php print $GLOBALS['xxMLNLI']?></p>
		  </td>
		</tr>
		<tr> 
          <td class="mincart" bgcolor="#F0F0F0" align="center"><span style="font-family:Verdana">&raquo;</span> <?php print imageorlink(@$GLOBALS['imgminilogin'],@$GLOBALS['xxLogin'],'ectlink mincart',"return displayloginaccount()",TRUE)?></td>
        </tr>
<?php	} ?>
      </table>