<?php

/*
*	Copyright VeryIDE,2007-2010
*	http://www.veryide.com/
*
*	2011/6/5 Lay
*/

require '../../include/loader.php';
html_start("会员列表 - VeryIDE");
?>

<!--body start-->
	<?php

	//module
	//require 'naver.php';
	require 'config.php';

	$q = getgpc('q');
	$s = getgpc("s");
	
	$uid = getnum("uid",0);
	$list = getgpc('list');
	$state = getnum("state",1);
	$order = getgpc("order");
	$action = getgpc('action');
	
	//连接数据库
	System :: connect();
	
	//用户信息
    $sql="SELECT * FROM `mod:member` WHERE id=".$uid;
    $row = System :: $db -> getOne( $sql );
    ?>
    
    <div class="item">
        <a class="y" href="<?php echo VI_BASE."module/passport/api.php?action=space&uid=".$row['id'];?>" target="_blank">个人空间 <?php echo loader_image("link.gif","个人空间");?></a>
        <strong><?php echo $row['account'];?></strong> - 个人信息 	
    </div>
    
    <table width="100%" border="0" cellpadding="1" cellspacing="1" id="table" class="table">
                    
        <?php
        
        //用户数据
		$i = 0;
        foreach ($_G['module']['member']["fieds"] as $fied => $name){
			
            //转换数据					
            switch($fied){
            
                case 'sex':						
                    $val = $_G['project']['sex'][$row[$fied]];
                break;
            
                case 'marriage':						
                    $val = $_G['project']['marriage'][$row[$fied]];
                break;
            
                case 'modify':
                case 'dateline':
                    $val = $row[$fied] ? date("Y/m/d H:i:s",$row[$fied]) : '-';
                break;
            
                default:						
                    $val = $row[$fied];
                break;
            
            }
			
            echo '<tr class="'.($i%2?'title':'line').'"> <td width="100" align="right">'.$name.'</td> <td class="text-yes"> '.$val.' </td></tr>';
			
			$i++;
        }
        
        
        ?>
    </table>
    
    <?php
  
	//关闭数据库
	System :: connect();
    
    ?>
    
<!--body end-->

<?php html_close();?>