为了学php写了一个管理pureftp的程序。(希望有用)
以下是登陆页面:
<HTML>;
<HEAD>;<TITLE>;</TITLE>;
<BODY>;
<form name="form" method="OST" action="browse.php">;
<input type=hidden name=yzm value="load">;
<TABLE bgColor=#ffffff border=0 cellPadding=0 cellSpacing=0 height="80%"
width="100%">;
<TBODY>;
<TR>;
<TD>;
<CENTER>;
<TABLE bgColor=#ffffff border=0 cellPadding=0 cellSpacing=0 cols=1
width=324>;
<TBODY>;
<TR>;
<TD align=middle>;<IMG src="image/login_top.gif">;</TD>;</TR>;
<TR>;
<TD align=middle>;
<TABLE align=left background=image/login_bk.gif
bgColor=#ffffff border=0 width="100%">;
<TBODY>;
<TR>;
<TD align=right width="30%">;帐 号:</TD>;
<TD align=left width="70%">;<INPUT name=userid size=15
style="BACKGROUND-COLOR: #d0e6ce; BORDER-BOTTOM: #78b471 1px solid; BORDER-LEFT: #78b471 1px solid; BORDER-RIGHT: #78b471 1px solid; BORDER-TOP: #78b471 1px solid">;</TD>;
</TR>;
<TR>;
<TD align=right width="30%">;密 码:</TD>;
<TD align=left width="70%">;<INPUT name=passwd size=15
style="BACKGROUND-COLOR: #d0e6ce; BORDER-BOTTOM: #78b471 1px solid; BORDER-LEFT: #78b471 1px solid; BORDER-RIGHT: #78b471 1px solid; BORDER-TOP: #78b471 1px solid"
type=password>;</TD>;
</TR>;
</TBODY>;
</TABLE>;
</TD>;
</TR>;
<TR>;
<TD align=middle background=image/login_bk.gif>;<INPUT style="BACKGROUND-COLOR: #d0e6ce; BORDER-BOTTOM: #78b471 1px solid; BORDER-LEFT: #78b471 1px solid; BORDER-RIGHT: #78b471 1px solid; BORDER-TOP: #78b471 1px solid; FONT-SIZE: 12px; HEIGHT: 20px" type=submit value=确&&定>;</TD>;</TR>;
<TR>;
<TD align=middle height=92 vAlign=center>;
<TABLE align=left background=image/login_bk.gif border=0
cellPadding=0 cellSpacing=0 width="100%">;
<TBODY>;
<TR>;
<TD align=middle height=52 vAlign=center>;
<TABLE width="80%">;
<TBODY>;
<TR>;
<TD align=middle
style="BORDER-BOTTOM: #78b471 1px solid; BORDER-LEFT: #78b471 1px solid; BORDER-RIGHT: #78b471 1px solid; BORDER-TOP: #78b471 1px solid"
width="100%">;
; <font color="green">;---FTP---</font>; 管理系统
;
;</TD>;</TR>;</TBODY>;</TABLE>;
<TD align=right rowSpan=2>;<IMG
src="image/login_mail.gif">;</TD>;</TR>;
<TR>;
<TD align=middle vAlign=bottom>;<IMG
src="image/login_bottom.gif">;</TD>;</TR>;</TBODY>;</TABLE>;</TD>;</TR>;</TBODY>;</TABLE>;</CENTER>;</TD>;</TR>;
</TBODY>;
</TABLE>;
</FORM>;
</BODY>;
</HTML>;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
以下是主页面:
<html>;
<head>;
<title>;FTP管理</title>;
</head>;
<body bgcolor="#C0C0C0">;
<?php
include ("link.php";
$username=$_POST['userid'];//登陆的用户名
$pw=$_POST['passwd'];//登陆的密码
$yzm=$_POST['yzm'];//登陆的验证码
$user=$_POST['user'];//选定编辑的用户
//以下为更新的数据
$tstatus2=$_POST['status2'];
$tuser2=$_POST['user2'];
$tpasswd2=$_POST['passwd2'];
$tdir2=$_POST['dir2'];
$tUid2=$_POST['Uid2'];
$tGid2=$_POST['Gid2'];
$tULBandwidth2=$_POST['ULBandwidth2'];
$tDLBandwidth2=$_POST['DLBandwidth2'];
$tipaccess2=$_POST['ipaccess2'];
$tQuotaSize2=$_POST['QuotaSize2'];
$tQuotaFiles2=$_POST['QuotaFiles2'];
$tcomment2=$_POST['comment2'];
$delete=$_POST['select'];//是否删除用户的一个变量
//以上为更新的数据
if ($username=="" or $pw==""
{
echo "<script language=javascript>;";
echo "alert('请从登录页面进入!!');";
echo "window.location.href=('index.php');";
echo "</script>;";
}
else // if ($username=="" or $pw==""
{
//以下更新数据
if ($yzm=="updata"
{
if ($delete=="是"
{
$sqlupdata="DELETE FROM users WHERE user='$tuser2'";
}
else //if ($delete=="是"
{
$sqlupdata="update users set status='$tstatus2',Password='$tpasswd2',Uid='$tUid2',Gid='$tGid2',Dir='$tdir2',ULBandwidth='$tULBandwidth2',DLBandwidth='$tDLBandwidth2',comment='$tcomment2',ipaccess='$tipaccess2',QuotaSize='$tQuotaSize2',QuotaFiles='$tQuotaFiles2' where user='$tuser2'";
} // end if ($delete=="是"
$updata_result=mysql_query($sqlupdata);
if ($updata_result)
{
$yzm="load";
} // end if ($updata_result)
} // end if ($yzm=="updata"
//以上更新数据
if ($yzm=="and"
{
$query_tem="select * from users where user='$tuser2'"; //检测添加的帐户是否以经存在
$query_rows=mysql_query($query_tem);
$query_num=mysql_num_rows($query_rows);
if ($query_num!=0)
{
echo "<script language=javascript>;";
echo "alert('这个帐户已经存在!!');";
echo "window.location.href=('index.php');";
echo "</script>;";
$yzm=="load";
}
else // if ($query_rows!=0)
{
$sqland="insert into `users` values( '$tuser2','$tstatus2','$tpasswd2','$tUid2','$tGid2','$tdir2','$tULBandwidth2','$tDLBandwidth2','$tcomment2','$tipaccess2','$tQuotaSize2','$tQuotaFiles2')";
$and_result=mysql_query($sqland);
if ($and_result)
{
$yzm="load";
}
else //if ($and_result)
{
echo "<script language=javascript>;";
echo "alert('注册失败!!');";
//echo "window.location.href=('index.php');";
echo "</script>;";
$yzm="load";
} // end if ($and_result)
} // endif ($query_rows!=0)
} // end if ($yzm=="and"
if ($yzm=="load")
{
$sql="select * from admin where Username='$username' and Password='$pw'";
$rows=mysql_query($sql);
$num=mysql_num_rows($rows);
if($num!=0)
{
$sqlstr1="select User,Uid,Gid,Dir,ULBandwidth,DLBandwidth,QuotaSize,QuotaFiles,ipaccess,status from users";
$result=mysql_query($sqlstr1);
$rows=mysql_num_rows($result);
$i=-1;//初始化循环变量i
echo '<table border="1" width="100%" height="20" cellspacing="0" bordercolor="#78b4aa" bgcolor="#d0e6ce">;';
while($i<$rows):
{
if ($i<0)
{
$yonghuming="用户名";
$yonghu_id="UID";
$yonghuzu_id="GID";
$yonghu_mulu="用户目录";
$shangzai_sulv="上载速率";
$xzsl="下在速率";//下在速率
$cipan_xianer="磁盘限额";
$wenjian_xianer="文件限额";
$ip_xianzhi="IP限制";
$yonghu_zhuangtai="状态";//用户状态
$bgcolo="#adaaff";
}
else // if ($i<0)
{
$yonghuming=mysql_result($result,$i,"user");
$yonghu_id=mysql_result($result,$i,"Uid");
$yonghuzu_id=mysql_result($result,$i,"Gid");
$yonghu_mulu=mysql_result($result,$i,"Dir");
$shangzai_sulv=mysql_result($result,$i,"ULBandwidth");
$xzsl=mysql_result($result,$i,"DLBandwidth");//下在速率
$cipan_xianer=mysql_result($result,$i,"QuotaSize");
$wenjian_xianer=mysql_result($result,$i,"QuotaFiles");
$ip_xianzhi=mysql_result($result,$i,"ipaccess");
$yonghu_zhuangtai=mysql_result($result,$i,"status");//用户状态
if ($xzsl=="0")
{
$xzsl="不限";
}
else //end if ($xzsl=="0")
{
$xzsl.="K/s";
}
if ($shangzai_sulv=="0")
{
$shangzai_sulv="不限";
}
else // end ($shangzai_sulv=="0")
{
$shangzai_sulv.="K/s";
}
if($yonghu_zhuangtai=="1")
{
$yonghu_zhuangtai="激活";
$bgcolo="#d0e6ce";
}
else //end ($yonghu_zhuangtai=="1")
{
$yonghu_zhuangtai="屏蔽";
$bgcolo="#D86BA2";
}
} //end if ($i<0)
//以上格式化输出
echo '<td width="12%" valign="middle" align="center" bgcolor="'.$bgcolo.'">;'.$yonghuming.' </td>;';
echo '<td width="4%" valign="middle" align="center" bgcolor="'.$bgcolo.'">;'.$yonghu_id.' </td>;';
echo '<td width="4%" valign="middle" align="center" bgcolor="'.$bgcolo.'">;'.$yonghuzu_id.' </td>;';
echo '<td width="24%" valign="middle" bgcolor="'.$bgcolo.'">;'.$yonghu_mulu.' </td>;';
echo '<td width="9%" valign="middle" align="center" bgcolor="'.$bgcolo.'">;'.$shangzai_sulv.' </td>;';
echo '<td width="9%" valign="middle" align="center" bgcolor="'.$bgcolo.'">;'.$xzsl.' </td>;';
echo '<td width="8%" valign="middle" align="center" bgcolor="'.$bgcolo.'">;'.$cipan_xianer.' </td>;';
echo '<td width="8%" valign="middle" align="center" bgcolor="'.$bgcolo.'">;'.$wenjian_xianer.' </td>;';
echo '<td width="6%" valign="middle" align="center" bgcolor="'.$bgcolo.'">;'.$ip_xianzhi.' </td>;';
echo '<td width="6%" valign="middle" align="center" bgcolor="'.$bgcolo.'">;'.$yonghu_zhuangtai.' </td>;';
echo '<form name="form1" method="OST" action="edit.php">;';
echo '<td width="5%" valign="middle" align="center" bgcolor="'.$bgcolo.'">;';
echo '<input type=hidden name=userid value="'.$username.'">;';//提交获取验证的用户名
echo '<input type=hidden name=passwd value="'.$pw.'">;';//提交获取验证的用户密码
if ($i<0)
{
$anjian_mingcheng="添加";
echo '<input type=hidden name=lianjie_daima value="and">;';//提交获取验证的用户名
}
else
{
echo '<input type=hidden name=lianjie_daima value="edit">;';//提交获取验证的用户名
echo '<input type=hidden name=user value='.mysql_result($result,$i,"user").'>;';//提交编辑的用户名
$anjian_mingcheng="编辑";
}
//echo '<input type=hidden name=user value='.mysql_result($result,$i,"user").'>;';//提交编辑的用户名
echo '<INPUT style="BACKGROUND-COLOR: #d0e6ce; BORDER-BOTTOM: #78b471 1px solid; BORDER-LEFT: #78b471 1px solid; BORDER-RIGHT: #78b471 1px solid; BORDER-TOP: #78b471 1px solid; FONT-SIZE: 12px; HEIGHT: 17px" type=submit value='.$anjian_mingcheng.'>;';
echo '</td>;';
echo '</form>;';
echo '</tr>;';
$i++;
} //while($i<$rows)
endwhile;
echo '</table>;';
}
else //else if($num!=0)
{
echo "<script language=javascript>;";
echo "alert('用户名 或 密码错误!');";
echo "window.location.href=('index.php');";
echo "</script>;";
} //end if($num!=0)
echo '<form name="form1" method="OST" action="who.php">;';
echo '<INPUT style="BACKGROUND-COLOR: #d0e6ce; BORDER-BOTTOM: #78b471 1px solid; BORDER-LEFT: #78b471 1px solid; BORDER-RIGHT: #78b471 1px solid; BORDER-TOP: #78b471 1px solid; FONT-SIZE: 12px; HEIGHT: 17px" type=submit value=是谁在线>;';
echo '</form>;';
} //end if ($yzm=="load")
}//end if ($username=="" or $pw=="")
?>;
</body>;
</html>;
以下是添加用户和编辑用户的代码:
<html>;
<head>;
<title>;</title>;
</head>;
<body bgcolor="#C0C0C0">;
<?php
include ("link.php";
$username=$_POST['userid'];//登陆的用户名
$pw=$_POST['passwd'];//登陆的密码
$yzm=$_POST['yzm'];//登陆的验证码
$user=$_POST['user'];//选定编辑的用户
$tem_lianjie_daima=$_POST['lianjie_daima'];
if ($username=="" or $pw==""
{
echo "<script language=javascript>;";
echo "alert('请从登录页面进入!!');";
echo "window.location.href=('index.php');";
echo "</script>;";
}
else
{
if ($tem_lianjie_daima=="edit"
{
$strsql2="select * from users where user='$user'";
$row2=mysql_query($strsql2);
$num2=mysql_num_rows($row2);
if (num2==0)
{
echo '<form name="form1" method="OST" action="browse.php">;';
echo '<table border="1" cellpadding="0" cellspacing="0" width="100%" height="100%" bgcolor="#d0e6ce">;';
echo '<tr>;';
echo '<td width="100%" colspan="5" height="146">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="20%" rowspan="12" height="216">;</td>;';
echo '<td width="13%" height="16">;&状&&&&& 态:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=status2 value="'.mysql_result($row2,0,"status".'" size="15">;</td>;';
echo '<td width="31%" height="16">;';
echo '<p align="center">;备& 注</td>;';
echo '<td width="20%" rowspan="12" height="216">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;&用& 户& 名:</td>; ';
echo '<td width="16%" height="16">;'.mysql_result($row2,0,"user".'</td>;';
echo '<td width="31%" height="160" rowspan="10">;<p>;<textarea name="comment2" cols="40" rows="10">;'.mysql_result($row2,0,"comment".'</textarea>;</p>;<p>;<select name="select">;
<option>;否</option>;
<option>;是</option>;
</select>;是否删除该用户</p>;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;&密&&&&& 码:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=passwd2 value="'.mysql_result($row2,0,"assword".'" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;&目&&&&& 录:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=dir2 value="'.mysql_result($row2,0,"Dir".'" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;&用& 户 I D:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=Uid2 value="'.mysql_result($row2,0,"Uid".'" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;&用 户 组ID:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=Gid2 value="'.mysql_result($row2,0,"Gid".'" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;上传速率K/s:</td>;';
echo '<td width="16%" height="16">;<input type=text name=ULBandwidth2 value="'.mysql_result($row2,0,"ULBandwidth").'" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;下载速率K/s:</td>;';
echo '<td width="16%" height="16">;<input type=text name=DLBandwidth2 value="'.mysql_result($row2,0,"DLBandwidth").'" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;&I P 限& 制:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=ipaccess2 value="'.mysql_result($row2,0,"ipaccess").'" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;磁盘限额/MB:</td>;';
echo '<td width="16%" height="16">;<input type=text name=QuotaSize2 value="'.mysql_result($row2,0,"QuotaSize").'" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;文 件 限 额:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=QuotaFiles2 value="'.mysql_result($row2,0,"QuotaFiles").'" size="15">;</td>;';
echo '</tr>;';
echo '<input type=hidden name=yzm value="updata">;';//提交打开方式
echo '<input type=hidden name=userid value="'.$username.'">;';//提交登陆的用户名
echo '<input type=hidden name=passwd value="'.$pw.'">;';//提交登陆的用户的密码
echo '<input type=hidden name=user2 value="'.mysql_result($row2,0,"user").'">;';//提交更新的用户名
echo '<tr>;';
echo '<td width="60%" colspan="3" height="16" valign="middle" align="center">;<INPUT style="BACKGROUND-COLOR: #d0e6ce; BORDER-BOTTOM: #78b471 1px solid; BORDER-LEFT: #78b471 1px solid; BORDER-RIGHT: #78b471 1px solid; BORDER-TOP: #78b471 1px solid; FONT-SIZE: 12px; HEIGHT: 17px" type=submit value=保存>;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="100%" colspan="5" height="171">;</td>;';
echo '</tr>;';
echo '</table>;';
echo '</form>;';
echo $status;
echo "<br>;";
} // if (num2==0)
} //if ($tem_lianjie_daima=="edit")
if ($tem_lianjie_daima=="and")
{
echo '<form name="form1" method="OST" action="browse.php">;';
echo '<table border="1" cellpadding="0" cellspacing="0" width="100%" height="100%" bgcolor="#d0e6ce">;';
echo '<tr>;';
echo '<td width="100%" colspan="5" height="146">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="20%" rowspan="12" height="216">;</td>;';
echo '<td width="13%" height="16">;&状&&&&& 态:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=status2 value="0" size="15">;</td>;';
echo '<td width="31%" height="16">;';
echo '<p align="center">;备& 注</td>;';
echo '<td width="20%" rowspan="12" height="216">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;&用& 户& 名:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=user2 value="www" size="15">;</td>;';
echo '<td width="31%" height="160" rowspan="10">;<textarea name="comment2" cols="40" rows="10">;不要忘了备注</textarea>;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;&密&&&&& 码:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=passwd2 value="123" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;&目&&&&& 录:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=dir2 value="/home/" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;&用& 户 I D:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=Uid2 value="500" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;&用 户 组ID:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=Gid2 value="500" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;上传速率K/s:</td>;';
echo '<td width="16%" height="16">;<input type=text name=ULBandwidth2 value="0" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;下载速率K/s:</td>;';
echo '<td width="16%" height="16">;<input type=text name=DLBandwidth2 value="0" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;&I P 限& 制:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=ipaccess2 value="*" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;磁盘限额/MB:</td>;';
echo '<td width="16%" height="16">;<input type=text name=QuotaSize2 value="0" size="15">;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="13%" height="16">;文 件 限 额:</td>; ';
echo '<td width="16%" height="16">;<input type=text name=QuotaFiles2 value="0" size="15">;</td>;';
echo '</tr>;';
echo '<input type=hidden name=yzm value="and">;';//提交打开方式
echo '<input type=hidden name=userid value="'.$username.'">;';//提交登陆的用户名
echo '<input type=hidden name=passwd value="'.$pw.'">;';//提交登陆的用户的密码
echo '<tr>;';
echo '<td width="60%" colspan="3" height="16" valign="middle" align="center">;<INPUT style="BACKGROUND-COLOR: #d0e6ce; BORDER-BOTTOM: #78b471 1px solid; BORDER-LEFT: #78b471 1px solid; BORDER-RIGHT: #78b471 1px solid; BORDER-TOP: #78b471 1px solid; FONT-SIZE: 12px; HEIGHT: 17px" type=submit value=保存>;</td>;';
echo '</tr>;';
echo '<tr>;';
echo '<td width="100%" colspan="5" height="171">;</td>;';
echo '</tr>;';
echo '</table>;';
echo '</form>;';
}
}//end if ($username=="" or $pw=="")
?>;
</body>;
</html>;
以下是查看用户状态的代码:
<?php
$ftp_who_user_user= "/usr/local/pureftpd/sbin/pure-ftpwho";
//echo '<table border="4">;';
exec($ftp_who_user." -s", $ftpresult );
$arraySize = sizeof($ftpresult);
$x = 0;
echo '<table border="4" width="100%" class=TABLE>;';
echo '<th class=THsmall>ID</td>;';
echo '<th class=THsmall>;user</td>;';
echo '<th class=THsmall>;min\'s</td>;';
echo '<th class=THsmall>;state</td>;';
echo '<th class=THsmall>;file</td>;';
echo '<th class=THsmall>;IP</td>;';
echo '<th class=THsmall>;current</td>;';
echo '<th class=THsmall>;total</td>;';
echo '<th class=THsmall>;%</td>;';
echo '<th class=THsmall>;bw.</td>;';
while($x < $arraySize):
$ftpwho = $ftpresult[$x];
list($pid, $user, $mins, $state, $file, $host, $port,$h, $current, $total, $percent, $bandwidth ) = explode("|", $ftpwho );
$mins = round($mins / 60);
if (empty($file) or !isset($file)) {
( $file = "---" );
++$ftp_activity;
}
else {
if(strlen($file) >; 10)
$file_short = substr($file,0,10);
$file = "<a href=\"#\" onClick=\"javascript:alert('$file');\">;$file_short...</a>;";
}#end else
$host = gethostbyname($host);
echo '<tr>;';
echo '<td class=TDsmall>;' .$pid. '</td>;';
echo '<td class=TDsmall>;' .$user. '</td>;';
echo '<td class=TDsmall>;' .$mins. '</td>;';
echo '<td class=TDsmall>;' .$state. '</td>;';
echo '<td class=TDsmall>;' .$file. '</td>;';
echo '<td class=TDsmall>;' .$host. '</td>;';
echo '<td class=TDsmall>;' .$current. '</td>;';
echo '<td class=TDsmall>;' .$total. '</td>;';
echo '<td class=TDsmall>;' .$percent. '</td>;';
echo '<td class=TDsmall>;' .$bandwidth. ' kb/s</td>;';
echo '</tr>;';
$x++;
EndWhile;
echo '</table>;';
if(!$ftp_activity) echo 'No users currenty using the FTP.<br>;';
echo '<p>;<center>;<input type=button value=" Close " onclick=self.close()>;';
echo '<input type=button value=" Refresh " onClick=" JavaScript : window.location.reload()">;</center>;';
?>;
学习是共通的
哈哈,多谢楼主分享了,顶一下!
多谢各位的支持。不过我的用户状态的代码是拷贝别人的。因为我现在不能用看用户状态了。所以写出来也不能看结果。现在把图片上传吧。(把.gif改为。rar)
编辑一下吧,把代码用code圈起来,不失为精华……
$username=$_POST['userid'];//登陆的用户名
$pw=$_POST['passwd'];//登陆的密码
..........
.....
if ($username=="" or $pw==""
{
.............
}
老大,这样安全吗?
管理Pureftpd的Mysql用户的代码太多了.
随便写一个都行.
或者,直接用PHPMyadmin添加都可以.
你这样帖出来,没必要吧.