www.gusucode.com > 仿51.com的php源码 1.1 > Photo/PhotoUploadWeb.php

    <?php
include("../User/CheckLogined.php");
include("../include/dbclass.php");
$dbc=new DbConn();
$uid=$_COOKIE["uid"];
$group=$_GET["group"];
$array = array(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,0,1,2,3,4,5,6,7,8,9); 
$key = array_rand($array,36);
for($i=$j;$i<36;$i++)
{
$str .= $array[$key[$i]];
}
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>村委会档案管理中心 -- 相册</title>
<link href="../images/User_Main.css" rel="stylesheet" type="text/css" />
<link href="../images/sc.css" rel="stylesheet" type="text/css" />
<script src="../js/global.js" language="javascript"></script>
<script>
try{
	if(top!=window){
		document.domain	="www.wu-liao.com";		
	}else{
		top.location.href="/webin.php?refer=%2FPhoto%2FPhotoUploadWeb.php";
	}
}catch(e){}
function showNewMessage(user){
	top.showNewMessage(user);
}

</script>
</head>
<body>
<div id="top">
<div id="logo"><a href="/User/Main.php"></a></div>
<div id="topr">
<div id="exit"><?php require("../menu.php"); ?>
<div id="menu">
<div class="m2">
<div class="mg"><a href="/User/Main.php">用户管理中心</a></div>
<div class="mh"><a href="/Diary/DiaryList.php">日记文集</a></div>
<div class="ma" id="do4"><a href="PhotoList.php">相册</a></div>
<div class="ma"><a href="/Image/ImageList.php">图库</a></div>
<div class="mb"><a href="/Music/MusicList.php">音乐</a></div>
<div class="mc"><div id="ms"><a href="/Memo/MemoList.php"><img src="../images/suo2.gif" width="10" height="12" />&nbsp;秘密记事本</a></div>
</div>
<div class="me"><a href="/Fav/FavList.php">网址收藏夹</a></div>
<div class="mf"><a href="/Addr/AddrList.php">通讯录</a></div>
</div>
</div>
</div>
<div id="nav">
<div id="navt">相册用于存放自己或亲友的照片,其它图片请上传到图库中。</div>
</div>

<div id="mjx"></div>
<div id="main">
<div id="left">
<div id="leph">
<div class="phff">
<div class="phtt">
相册分类</div>
<?php 
$sql1="select * from PhotoGroup where User_Account='$uid' order by GroupOrder desc";
$result=$dbc->query($sql1);
while ($row=@mysql_fetch_array($result)) {

?>
<div class="phl2 "><?php if($row["hiddenGroup"]==2){?><img  src='../images/yao.gif' border='0'><?php }?><a href="PhotoList.php?group=<?php echo $row["GroupName"]; ?>" title="<?php echo $row["GroupName"]; ?>"><?php echo $row["GroupName"]; ?></a></div>

<?php }?> <div class=phl2 style='font-size:12px;color:red'><div class="phz" ><a href='/FixGroup.php' target=_blank></a></div></div></div>
<div class="mxle"><a href="PhotoGroup.php">分类管理</a></div><div class="mxle"><a href="PhotoCommentToMe.php">评论管理</a></div><div class="mxle"><a href="PhotoBg.php">背景设置</a></div></div>
</div>
<div id="right">
<div id="a4n">
<br/><br/>
<div class="anphg">
<!--
<div class="a4"><img src="../images/gjsc.gif" width="12" height="12" /> <a href="/Photo/PhotoUploadAdvanced.php?group=%CE%D2%B5%C4%D5%D5%C6%AC">高级上传</a></div>-->
<div class="a4"><img src="../images/jdsc.gif" width="12" height="12" /> <a href="PhotoUploadSimple.php?group=<?php echo $group; ?>">普通上传</a></div>
<div class="a4"><img src="../images/pai.gif" width="15" height="13" /> <a href="PhotoUploadSnap.php?group=<?php echo $group; ?>">在线拍照</a></div>
<div class="a4"><img src="../images/zhuan.gif" width="15" height="13" />  网上传图</div>
</div>
</div>
<div id="fenle">
<div class="sckk">
<form  method=post enctype="multipart/form-data"  onsubmit="return chkForm(this)" action="../User/PhotoUploadWebSave.php?user=<?php echo $uid; ?>&type=Photo&key=<?php echo $str; ?>&time=<?php echo time(); ?>">
<div class="jdwz">选择要传到的分类:
<select name="group">

<?php $result=$dbc->query($sql1);
while ($row=@mysql_fetch_array($result)) {?>

<option <?php if ($row["GroupName"]==$group){?> selected="selected" <?php }?> value='<?php echo $row["GroupName"]; ?>'><?php echo $row["GroupName"]; ?></option><?php }?></select>
</div>
<div class="jdsc2"><ul>
<li>
1.&nbsp;网址:<span class="htt"></span>
<input type="text" name="weburl1" value='http://'  onclick="clearinfo(this)" />
</li>
<li>
2.&nbsp;网址:<span class="htt"></span>
<input type="text" name="weburl2" value='http://' onclick="clearinfo(this)" />
</li>
<li>
3.&nbsp;网址:<span class="htt"></span>
<input type="text" name="weburl3" value='http://' onclick="clearinfo(this)" />
</li>
<li>
4.&nbsp;网址:<span class="htt"></span>
<input type="text" name="weburl4" value='http://' onclick="clearinfo(this)" />
</li>
<li>
5.&nbsp;网址:<span class="htt"></span>
<input type="text" name="weburl5" value='http://' onclick="clearinfo(this)" />
</li>
<li>
6.&nbsp;网址:<span class="htt"></span>
<input type="text" name="weburl6" value='http://' onclick="clearinfo(this)" />
</li>
</ul>
</div>
<div class="scqd">
<div class="qdan2">
<input type="submit" name="upload_button" value="开始上传" class="btn"/>
</div>
<!--<div class="txkj">
<div id="jdt">
<div id="jd">
<div id="cscs" style="39%"></div>
</div>
</div>

<div id="wenz">空间100M,已用39.57%</div>-->
</div>
</div>
<div class="scjy">上传照片必看:<!--<a href="http://www.51.com/help/rule.php" target=_blank>有关相册与图库的管理规定</a> | <a href="http://www.51.com/help/chufa.php" target=_blank>违规会员处罚记录</a>。-->上传黄色、反动、血腥、恐怖、<br />
毒品等非法图片,将被删除用户。因人体艺术照片容易与黄色图片产生混淆,所以,也不能上传</div>
</form>
</div>

<SCRIPT LANGUAGE="JavaScript">
<!--
function clearinfo(obj) {
	if(obj.value=="http://") {
		obj.value="";
		obj.style.color="";
	}
}
function chkForm(obj)
{
	var on = obj.group.options[obj.group.selectedIndex];
	if(!on || obj.group.options[obj.group.selectedIndex].value == "")
	{
		alert("请选择上传到的分类");
		return false;
	}
	var haveUrl = false;
	var obj2;
	for(var i = 1; i < 7; i++)
	{
		obj2 = document.getElementById("weburl" + i);
		if(obj2.value != "" && obj2.value != "http://")
		{
			haveUrl = true;
		}
		if(obj2.value.indexOf("http://")) {
			obj2.value="http://"+obj2.value;
		}
	}
	if(!haveUrl)
	{
		alert("请至少选择一个文件!");
		return false;
	}
	for(i = 1; i < 7; i++)
	{
		obj2 = document.getElementById("weburl" + i);
		if(obj2.value == "http://")
		{
			obj2.value="";
		}
	}
	obj.upload_button.disabled = true;
	return true;
}
//-->
</SCRIPT>
</div>
</div>
</div>
<div id="bottom">
<div id="baidu" style="color:#a0a0a0;"><?php require("../foot.php"); ?></div>
</div>
</body>
</html>