<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>更改头像</title>
<?php include(DEDEMEMBER."/templets/head_inc.htm"); ?>
<script type="text/javascript" language='javascript' src='js/main.js'></script>
</head>
<body>
<?php include(DEDEMEMBER."/templets/head.htm"); ?>
<div class="wrapper lineT">
  <div class="mainBox">
    <div class="main">
      <?php include(DEDEMEMBER."/templets/menu.php"); ?>
      <div class="dedeMain">
        <div class="location">设置个人资料</div>
        <div class="titleTabBar bgGreen lineTB">
          <ul>
            <li><a href="edit_baseinfo.php">基本资料</a></li>
            <li><a href="edit_fullinfo.php">详细资料</a></li>
            <li class="select"><a href="edit_face.php">头像设置</a></li>
            <li><a href="edit_space_info.php">空间设置</a></li>
          </ul>
        </div>
        <form class="mTB10 mL10 mR10" action="edit_face.php" method="post" enctype="multipart/form-data" name="form1">
          <input type="hidden" name="dopost" value="save" />
          <div class="titleBar bgGrass lineB">
            <div class="fLeftNoForm"><strong>用户头像</strong></div>
            <div class="fRight titSecondary white" style="margin-top:5px;">
            </div>
          </div>

          <?php
          if(defined('UC_API') && @include_once DEDEROOT.'/uc_client/client.php')
          {
            $data = uc_get_user($cfg_ml->M_LoginID);
            echo uc_avatar($data[0]);
          }
          else
          {
          ?>
          <table cellspacing="1" class="submit">
            <tbody>
						<tr style='display:none'>
                <td width="15%" align="right" valign="top">手工填写网址：</td>
                <td>
                	<input name='oldface' type='hidden' id='oldface' value='<?php echo $face; ?>' />
                  <input name='faceurl' type='text' id='faceurl' size='35' class='text' style='width:250px' value='<?php echo $face; ?>' />
                </td>
              </tr>
              <tr>
                <td align="right" valign="top">选择上传的文件：</td>
                <td><input name="face" type="file" id="face" size="45" />
                  大小180x180像</td>
              </tr>
              <tr>
                <td align="right" valign="top">
                	<b>原来的头像：</b><br />
                	<a href="edit_face.php?dopost=delold&oldface=<?php echo urlencode($face); ?>">[删除旧头像]</a>
                </td>
                <td><div id='faceview' class='overflow mTB10 litPic' style="width:180px;height:180px;text-align:center;vertical-align:middle;line-height:180px;display:table-cell;">
                    <?php
       	if($face!='') echo " <img class='' src='$face' style='_margin-top:expression(( 180 - this.height ) / 2);' />\r\n";
       	?>
                  </div></td>
              </tr>
            </tbody>
            <tfoot>
              <tr>
                <td height="45">&nbsp;</td>
                <td height="45"><button class="button2" type="submit">更新</button>
                  <button class="button2 mL10" type="reset">重设</button></td>
              </tr>
            </tfoot>
          </table>
          <?php } ?>
          
        </form>
      </div>
      <div class="clear"></div>
    </div>
    <div class="clear"></div>
  </div>
</div>
<?php include(DEDEMEMBER."/templets/foot.htm"); ?>
</div>
</body>
</html>
