FaustCplus.swf 这个新浪破解的上传用户头像组件谁用过呢?
function uploadevent(status) {
status += '';
switch (status) {
case '1':
alert('上传成功!');
document.getElementById('avatar_priview').innerHTML = "<img src='/Images/UserAvatar/<%=CurrentUserID.ToString() %>.jpg?rnd="+ time + "'/>";
break;
case '999':
alert('上传文件图片过大,请不要超过最大2M!');
break;
case '888':
alert('服务器出现异常!');
break;
case '2':
if (confirm('js call upload')) {
return 1;
} else {
return 0;
}
break;
case '-1':
alert('cancel!');
window.location.href = "#";
break;
case '-2':
alert('upload failed!');
window.location.href = "#";
break;
default:
alert(typeof (status) + ' ' + status);
}
}
var flashvars = {
"jsfunc": "uploadevent",
"imgUrl": "/images/Component/mm.jpg",
"pid": "75642723",
"uploadSrc": true,
"showBrow": true,
"showCame": true,
"uploadUrl": "/Handler/AjaxUserPageHandler.ashx?action=uploadavatar"
};
context.Response.ContentType = "text/html";
string action = context.Request.QueryString["action"] ?? string.Empty;
string content = string.Empty;
if (!string.IsNullOrEmpty(action))
{
action = action.ToLower();
switch (action)
{
case "uploadavatar":
context.Response.ClearContent();
//本处省略上传处理方法
context.Response.Write("1");
context.Response.End();
break;
}
}