sign.php
The system is suitable for Win2000
Power by Devchina.com,http://www.2oa.net
$path = "E:serv-uservudaemon.ini";//path of user files
$fabu = "E:web";//Total Web Path
if ($add)
{
$FP 1=fopen ($path, "r+");
$str =fread ($fp 1, FileSize ($path));
$FP =fopen ($path, "a");
Flock ($FP, 3);
$US = "=". $userid;
$start =strpos ($STR, $US);
if ($start)
{
echo "Sorry, the user already exists";
}else{
$start 1=strpos ($str, "User1");
if ($start 1) {
$start = $start 1+6;
$end =strpos ($str, "|", $start);
$firstusername =substr ($str, $start, $end-$start);
$start 2=strpos ($str, "[user=". $firstusername. "| 1] ");
$usernum =count (Split ("", substr ($str, $start 1, $start 2-$start 1)));
}else
{
$usernum = 1;
}
$userinfo = "User". $usernum. " = ". $userid." | 1|0 "." ";
$userpath = $fabu. $userid;
@mkdir ($userpath, 0700);
$maxsize = $size *1024;
$userp = "[user=". $userid. "| 1] ".";
$userp. = "password=". $password. "";
$userp. = "homedir=". $userpath. "";
$userp. = "Relpaths=1". "";
$userp. = "diskquota=1|". $maxsize. "| 0 ".";
$userp. = "maxusersloginperip=2". "";
$userp. = "timeout=600". "";
$userp. = "access1=". $userpath. "| RWAMLCDP "." ";
if ($start 2) {
$content =substr ($str, $start 2,strlen ($STR)-$start 2);
$content. = $userp;
$userinfo. = $content;
Fseek ($fp 1, $start 2,seek_set);
Fputs ($fp 1, $userinfo);
http://www.bkjia.com/PHPjc/631443.html www.bkjia.com true http://www.bkjia.com/PHPjc/631443.html techarticle //sign.php//System for Win2000//power by devchina.com,http://www.2oa.net $path =e:serv-uservudaemon.ini;//user Files path $ fabu=e:web;//Total Web Path if ($add) {$fp 1=fop ...