⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 changeavatar.jsp

📁 easy to use, easy to setup bulletin board (forum)
💻 JSP
字号:
<%
/*
 * Copyright (C) 2002 by MyVietnam.net
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * All copyright notices regarding mvnForum
 * must remain intact in the scripts and in the outputted HTML
 * The "powered by" text/logo with a link back to
 * http://www.mvnForum.com and http://www.MyVietnam.net in the footer of the pages MUST
 * remain visible when the pages are viewed on the internet or intranet.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * Support can be obtained from support forums at:
 * http://www.mvnForum.com/mvnforum/index
 *
 * Correspondence and Marketing Questions can be sent to:
 * info@MyVietnam.net
 *
 * @author: Minh Nguyen  minhnn@MyVietnam.net
 * @author: Mai  Nguyen  mai.nh@MyVietnam.net
 */
%>
<%@ page errorPage="/mvnplugin/mvnforum/error.jsp"%>
<%@ page import="net.myvietnam.mvnplugin.mvnforum.db.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title>Update or upload member Avatar</title>
<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//-->
</script>
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
</head>
<link href="<%=request.getContextPath()%>/mvnplugin/mvnforum/css/style.css" rel=stylesheet type=text/css>
<body leftmargin=0 topmargin=0>
<%@ include file="/mvnplugin/mvnforum/user/header.jsp"%>

<p>
<table width="95%" align="center">
<tr class="nav">
    <td><img src="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/nav.gif"></td>
    <td width="100%" nowrap>
    <a class="navLink" href="index">mvnForum</a>&nbsp;&raquo;&nbsp;
    <a class="navLink" href="myprofile">My Profile</a>&nbsp;&raquo;&nbsp;
    Change Avatar
    </td>
</tr>
</table>
<p>
<%
MemberBean memberBean = (MemberBean)request.getAttribute("MemberBean");
%>
<table width="95%" cellspacing="5" cellpadding="5" align="center">
  <tr>
    <td colspan="2" class="messageText">You can choose one of the two methods below:
    </td>
  </tr>

  <tr>
    <td colspan="2" bgcolor="#eeeeff" class="messageTextBold">1. Choose an image from our predefinded avatars:
    </td>
  </tr>

  <tr>
    <td height="160" align="left">
        <form method="post" action="updatepicture">
        <select name="MemberAvatar" size="10" class="messageText" onChange="MM_swapImage('AvatarPreview', '', this.options[this.selectedIndex].id, 1);">
            <option value="" id="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/no_picture.gif" SELECTED>no picture</option>
            <option value="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/man1.gif" id="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/man1.gif">Man 1</option>
            <option value="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/mickey1.gif" id="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/mickey1.gif">Mickey 1</option>
            <option value="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/mickey2.gif" id="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/mickey2.gif">Mickey 2</option>
            <option value="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/tigerwalk.gif" id="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/tigerwalk.gif">Tiger walk</option>
            <option value="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/bearwalk.gif" id="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/bearwalk.gif">Bear walk</option>
            <option value="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/elephant_dancing.gif" id="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/elephant_dancing.gif">Elephant dancing</option>
            <option value="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/elephant1.gif" id="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/elephant1.gif">Elephant 1</option>
            <option value="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/bird1.gif" id="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/bird1.gif">Bird 1</option>
            <option value="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/dog1.gif" id="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/dog1.gif">Dog 1</option>
            <option value="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/fish1.gif" id="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/fish1.gif">Fish 1</option>
        </select>
        <br>
        <input type="submit" value="Change Avatar">
        </form>
    </td>
    <td width="160" height="160" align="center" valign="middle">
        <img name="AvatarPreview"
<% if (memberBean.getMemberAvatar().length() > 0) { %>
        src="<%=memberBean.getMemberAvatar()%>"
<% } else { %>
        src="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/user/no_picture.gif"
<% } %>
        border="0" alt="Avatar Preview">
    </td>
  </tr>

  <tr>
    <td colspan="2" bgcolor=#eeeeff class="messageTextBold">
        2. Upload your avatar here (only .jpg files are allowed, maximum file size = 60,000 bytes, width and height are not greater than 150):<br>
        <font class="messageText">Upload may take a little time to finish, so please do not press Upload twice.</font>
    </td>
  </tr>

  <tr>
    <td colspan="2">
        <form method="post" action="uploadpicture" enctype="multipart/form-data">
        <input type="file" name="PictureFile" accept="image/jpeg,image/gif">
        <input type="submit" value="Upload">
        </form>
    </td>
  </tr>
</table>

<p>
<%@ include file="/mvnplugin/mvnforum/user/footer.jsp"%></p>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -