www.gusucode.com > 仿51.com的php源码 1.1 > Fav/FavNavigation.php

    <?php
include("../User/CheckLogined.php");
include("../include/dbclass.php");
$dbc=new DbConn();
$uid=$_COOKIE["uid"];
$sql="select FavKey from userdata where User_Account='$uid'";
$row=$dbc->getRs($sql);
$r=$row["FavKey"];

//$randnum = rand(0, 35);
//$rand_three = rand(0, 35);
//$randnum_two = rand(0, 55404);
if ($_GET["action"]=="save")
{
$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]];
}
$sql="update userdata set favkey='$str' where User_Account='$uid'";
$dbc->Execute($sql);
echo "<script>alert('已成功生成新的导航地址!');location.href='FavNavigation.php';</script>";
}


?><!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" />
<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=%2FFav%2FFavNavigation.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"><a href="/Photo/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" id="do3"><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 FavGroup where User_Account='$uid' order by GroupOrder desc";
$result=$dbc->query($sql1);
while ($row=@mysql_fetch_array($result)) {
?>
<?php if ($row["GroupName"]==$group){?>
<div class="phl1"><div class="phz "><a href="FavList.php?group=<?php echo $row["GroupName"]; ?>" title="<?php echo $row["GroupName"]; ?>"><?php echo $row["GroupName"]; ?></a></div></div><?php }else{?><div class="phl2 "><a href="FavList.php?group=<?php echo $row["GroupName"]; ?>" title="<?php echo $row["GroupName"]; ?>"><?php echo $row["GroupName"]; ?></a></div><?php }?>

<?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="FavGroup.php">分类管理</a></div><div class="mxle" id="xzle">我的导航</div></div>
</div>
<div id="right">
<div id="a4n">
<div class="anphg">
<div class="a3"><img src="../images/dh.gif" width="214" height="30" /></div>
</div>
</div>
<div id="fenle">


<table width="570" border="0" cellpadding="0" cellspacing="0" class="dhtd">
<tr>
<td height="35" align="left" class="dhti">什么是网址导航?<span class="dhts">(如果您有自己的电脑,请认真看此功能,很实用!)</span></td>
</tr>
<tr>
<td align="left">
&nbsp;&nbsp;&nbsp;&nbsp;您可以将喜欢的网站收藏到您的网址收藏夹中,我们会自动为您生成一个网址导航的页面!您将这个页面设为浏览器的首页,
当您每次上网打开网页时,您就可以很方便的点击您想去的网站!<br>网址导航示范:
<a href="http://www.wu-liao.com/myie/index.php?user=qbx&key=axhqgfpi6mkb7c38s5lr12ey4wj0vo9udzn" target="_blank">用户qbx的网址导航</a>
</td>
</tr>
<tr>
<td height="53" align="center">
<input name="Submit" type="button" class="dh14" value="点击这里生成您的网址导航" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.wu-liao.com/myie/index.php?user=<?php echo $uid; ?>&key=<?php echo $r;?>')"></td>
</tr>
<tr>
<td align="left">&nbsp;&nbsp;&nbsp;&nbsp;
<span class="dhys">隐私安全</span>:系统分配给您一个复杂的网址导航地址(该地址别人看不到)。如果您的导航地址不慎被别人知道,请
<a href="?action=save">点击这里</a>重新生成导航地址!
</td>
</tr>
</table>
<p>
</div>
</div>
</div>
<div id="bottom">
<div id="baidu" style="color:#a0a0a0;"><?php require("../foot.php"); ?></div>
</div>
</body>
</html>