⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 netdisk.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 PHP
📖 第 1 页 / 共 4 页
字号:
	echo "</table>\n";
	echo "</div>\n";
	break;
case "deplacer_suite" :
	if ( !connecte( $id ) )
	{
		header( "Location:netdisk.php" );
		exit( );
	}
	$destination = "{$racine}/";
	if ( $dest != "" )
	{
		$destination .= "{$dest}/";
	}
	$destination .= basename( $fic );
	if ( file_exists( "{$racine}/{$fic}" ) && "{$racine}/{$fic}" != $destination )
	{
		copy( "{$racine}/{$fic}", $destination );
	}
	if ( "{$racine}/{$fic}" != $destination && file_exists( "{$racine}/{$fic}" ) )
	{
		unlink( "{$racine}/{$fic}" );
	}
	header( "Location:netdisk.php?DISK_ID={$DISK_ID}&rep={$rep}&ordre={$ordre}&sens={$sens}&id={$id}" );
	exit( );
case "supprimer" :
	if ( !connecte( $id ) )
	{
		header( "Location:netdisk.php" );
		exit( );
	}
	include( $hautpage );
	echo "<div align=center class=big1>\n";
	if ( is_dir( "{$racine}/{$fic}" ) )
	{
		$mime = $mess[45];
	}
	else
	{
		$mime = $mess[46];
	}
	echo "{$mess['47']} <br><br>{$mime} <b>{$fic}</b> ?";
	echo "<br><br>";
	echo "<a href=\"netdisk.php?DISK_ID={$DISK_ID}&action=supprimer_suite&rep={$rep}&fic={$fic}&id={$id}&ordre={$ordre}&sens={$sens}\"><span class=Big1>{$mess['48']}</span></a>&nbsp;&nbsp;&nbsp;\n";
	echo "<a href=\"netdisk.php?DISK_ID={$DISK_ID}&rep={$rep}&id={$id}&ordre={$ordre}&sens={$sens}\"><span class=Big1>{$mess['49']}</span></a>\n";
	echo "<br>";
	echo "</div>\n";
	break;
case "supprimer_suite" :
	if ( !connecte( $id ) )
	{
		header( "Location:netdisk.php" );
		exit( );
	}
	$messtmp = "";
	$a_effacer = "{$racine}/{$fic}";
	if ( file_exists( $a_effacer ) )
	{
		if ( is_dir( $a_effacer ) )
		{
			deldir( $a_effacer );
			$messtmp .= "{$mess['38']} <b>{$fic}</b> {$mess['44']}.";
		}
		else
		{
			unlink( $a_effacer );
			$messtmp .= "{$mess['34']} <b>{$fic}</b> {$mess['44']}.";
		}
	}
	else
	{
		$messtmp .= $mess[76];
	}
	$messtmp .= "<br><br><a href=\"netdisk.php?DISK_ID={$DISK_ID}&rep={$rep}&id={$id}&ordre={$ordre}&sens={$sens}\"><span class=Big1>{$mess['32']}</span></a>";
	$messtmp .= "";
	header( "Location:netdisk.php?DISK_ID={$DISK_ID}&rep={$rep}&id={$id}&ordre={$ordre}&sens={$sens}" );
	exit( );
case "rename" :
	if ( !connecte( $id ) )
	{
		header( "Location:netdisk.php" );
		exit( );
	}
	include( $hautpage );
	echo "<div>\n";
	$nom_fic = basename( $fic );
	echo "";
	echo "<table border='0' cellspacing='1' width='100%'  cellpadding='5'>\n";
	echo "<form action=\"netdisk.php\" method=\"post\">\n";
	echo "<tr><td class=TableLine2 width=20%>\n";
	echo "<input type=\"hidden\" name=\"DISK_ID\" value=\"{$DISK_ID}\">\n";
	echo "<input type=\"hidden\" name=\"action\" value=\"rename_suite\">\n";
	echo "<input type=\"hidden\" name=\"rep\" value=\"{$rep}\">\n";
	echo "<input type=\"hidden\" name=\"fic\" value=\"{$fic}\">\n";
	echo "<input type=\"hidden\" name=\"id\" value=\"{$id}\">\n";
	echo "<input type=\"hidden\" name=\"ordre\" value=\"{$ordre}\">\n";
	echo "<input type=\"hidden\" name=\"sens\" value=\"{$sens}\">\n";
	echo "文件(夹)名 ";
	echo "</td>";
	echo "<td class=TableLine1>";
	echo "<input type=\"text\" class=SmallInput name=\"fic_new\" value=\"{$nom_fic}\">\n";
	echo "</td></tr>\n";
	echo "<tr><td colspan=2 class=TableLine1>\n";
	echo "<input type=\"submit\" class=SmallInput value=\"确定\">\n";
	echo "</td></tr>\n";
	echo "</table>";
	echo "</form>";
	echo "<br>";
	echo "</div>\n";
	break;
case "rename_suite" :
	if ( !connecte( $id ) )
	{
		header( "Location:netdisk.php" );
		exit( );
	}
	$err = "";
	$nom_fic = basename( $fic );
	$messtmp = "";
	$fic_new = traite_nom_fichier( $fic_new );
	$old = "{$racine}/{$fic}";
	$new = dirname( $old )."/".$fic_new;
	if ( $fic_new == "" )
	{
		$messtmp .= "{$mess['37']}";
		$err = 1;
	}
	else
	{
		if ( file_exists( $new ) )
		{
			$messtmp .= "<b>{$fic_new}</b> {$mess['43']}";
			$err = 1;
		}
		else
		{
			if ( file_exists( $old ) )
			{
				rename( $old, $new );
			}
			$messtmp .= "<b>{$fic}</b> {$mess['41']} <b>{$fic_new}</b>";
		}
	}
	$messtmp .= "<br><br><a href=\"netdisk.php?DISK_ID={$DISK_ID}&rep={$rep}&id={$id}&ordre={$ordre}&sens={$sens}\"><span>{$mess['32']}</span></a>";
	$messtmp .= "";
	if ( $err == "" )
	{
		header( "Location:netdisk.php?DISK_ID={$DISK_ID}&rep={$rep}&ordre={$ordre}&sens={$sens}&id={$id}" );
		exit( );
	}
	include( $hautpage );
	echo "<div align=center>\n";
	echo "{$messtmp}";
	echo "</div>\n";
	break;
case "mkdir" :
	if ( !connecte( $id ) )
	{
		header( "Location:netdisk.php" );
		exit( );
	}
	$err = "";
	$messtmp = "";
	$nomdir = traite_nom_fichier( $nomdir );
	if ( $nomdir == "" )
	{
		$messtmp .= "{$mess['37']}";
		$err = 1;
	}
	else if ( file_exists( "{$racine}/{$rep}/{$nomdir}" ) )
	{
		$messtmp .= "{$mess['40']}";
		$err = 1;
	}
	else if ( getspecialstr( $nomdir ) == 1 )
	{
		$messtmp .= "{$mess['96']}";
		$err = 1;
	}
	else
	{
		mkdir( "{$racine}/{$rep}/{$nomdir}", 509 );
		$messtmp .= "{$mess['38']} <b>{$nomdir}</b> {$mess['39']} <b>";
		if ( $rep == "" )
		{
			$messtmp .= "/";
		}
		else
		{
			$messtmp .= "{$rep}";
		}
		$messtmp .= "</b>";
	}
	$messtmp .= "<br><br><a href=\"netdisk.php?DISK_ID={$DISK_ID}&rep={$rep}&id={$id}&ordre={$ordre}&sens={$sens}\"><span class=Big1>{$mess['32']}</span></a>";
	$messtmp .= "";
	if ( $err == "" )
	{
		header( "Location:netdisk.php?DISK_ID={$DISK_ID}&rep={$rep}&id={$id}&ordre={$ordre}&sens={$sens}" );
		exit( );
	}
	include( $hautpage );
	echo "<div align=center class=big1>\n";
	echo "{$messtmp}";
	echo "</div>\n";
	break;
case "creer_fichier" :
	if ( !connecte( $id ) )
	{
		header( "Location:netdisk.php" );
		exit( );
	}
	$err = "";
	$messtmp = "";
	$nomfic = traite_nom_fichier( $nomfic );
	$nomfic = get_suffix( $nomfic, $suffix );
	if ( $nomfic == "" )
	{
		$messtmp .= "{$mess['37']}";
		$err = 1;
	}
	else if ( file_exists( "{$racine}/{$rep}/{$nomfic}" ) )
	{
		$messtmp .= "{$mess['71']}";
		$err = 1;
	}
	else if ( getspecialstr( $nomfic ) == 1 )
	{
		$messtmp .= "{$mess['96']}";
		$err = 1;
	}
	else
	{
		$fp = fopen( "{$racine}/{$rep}/{$nomfic}", "w" );
		if ( eregi( "\\.html\$", $nomfic ) || eregi( "\\.htm\$", $nomfic ) )
		{
			fputs( $fp, "<html>\n<head>\n<title>Document sans titre</title>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=GB2312\">\n</head>\n<body bgcolor=\"#FFFFFF\" text=\"#000000\">\n\n</body>\n</html>\n" );
		}
		fclose( $fp );
		$messtmp .= "{$mess['34']} <b>{$nomfic}</b> {$mess['39']} <b>";
		if ( $rep == "" )
		{
			$messtmp .= "/";
		}
		else
		{
			$messtmp .= "{$rep}";
		}
		$messtmp .= "</b>";
	}
	$messtmp .= "<br><br><a href=\"netdisk.php?DISK_ID={$DISK_ID}&rep={$rep}&id={$id}&ordre={$ordre}&sens={$sens}\"><span class=Big1>{$mess['32']}</span></a>";
	$messtmp .= "";
	if ( $err == "" )
	{
		header( "Location:netdisk.php?DISK_ID={$DISK_ID}&rep={$rep}&id={$id}&ordre={$ordre}&sens={$sens}" );
		exit( );
	}
	include( $hautpage );
	echo "<div align=center class=big1>\n";
	echo "{$messtmp}";
	echo "</div>\n";
	break;
case "upload" :
	if ( !connecte( $id ) )
	{
		header( "Location:netdisk.php" );
		exit( );
	}
	$messtmp = "";
	if ( $rep != "" )
	{
		$rep_source = "/{$rep}";
	}
	$destination = $racine.$rep_source;
	if ( getspecialstr( $userfile_name ) == 1 )
	{
		$warn_str = "<br>{$mess['96']}<br>{$userfile_name}";
		include( $hautpage );
		echo "<div align=center class=big1>\n";
		echo "{$warn_str}";
		echo "";
		echo "<br><br><a  href=\"netdisk.php?DISK_ID={$DISK_ID}&rep={$rep}&id={$id}&ordre={$ordre}&sens={$sens}\"><span class=Big1>{$mess['32']}</span></a></div>\n";
	}
	else
	{
		if ( $userfile_size != 0 )
		{
			$taille_ko = $userfile_size / 1024;
		}
		else
		{
			$taille_ko = 0;
		}
		if ( $userfile == "none" )
		{
			$message = $mess[31];
		}
		if ( $userfile != "none" && $userfile_size != 0 )
		{
			if ( !copy( $userfile, "{$destination}/{$userfile_name}" ) )
			{
				$message = "<br>{$mess['33']}<br>{$userfile_name}";
			}
			else
			{
				if ( is_editable( $userfile_name ) )
				{
					enlever_controlm( "{$destination}/{$userfile_name}" );
				}
				$message = "{$mess['34']} <b>{$userfile_name}</b> {$mess['35']} <b>{$rep}</b>";
			}
		}
		$messtmp .= "{$message}<br>";
		$messtmp .= "<br><br><a href=\"netdisk.php?DISK_ID={$DISK_ID}&rep={$rep}&id={$id}&ordre={$ordre}&sens={$sens}\"><span class=Big1>{$mess['32']}</span></a>";
		$messtmp .= "";
		header( "Location:netdisk.php?DISK_ID={$DISK_ID}&rep={$rep}&ordre={$ordre}&sens={$sens}&id={$id}" );
		exit( );
	}
case "deconnexion" :
	if ( !connecte( $id ) )
	{
		header( "Location:netdisk.php" );
		exit( );
	}
	if ( file_exists( "logs/{$id}.php" ) )
	{
		unlink( "logs/{$id}.php" );
	}
	$now = time( );
	$eff = $now - 86400;
	$handle = opendir( "logs" );
	while ( $fichier = readdir( $handle ) )
	{
		if ( $fichier != "." && $fichier != ".." )
		{
			$tmp = filemtime( "logs/{$fichier}" );
			if ( $tmp < $eff )
			{
				unlink( "logs/{$fichier}" );
			}
		}
	}
	closedir( $handle );
	header( "Location:netdisk.php" );
	break;
default :
	include( $hautpage );
	lister_rep( $nom_rep );
	if ( find_id( $NEW_USER, $LOGIN_USER_ID ) )
	{
		$NEW_PRIV = 1;
	}
	if ( find_id( $MANAGE_USER, $LOGIN_USER_ID ) )
	{
		$MANAGE_PRIV = 1;
	}
	if ( !( $NEW_PRIV == 1 || $MANAGE_PRIV == 1 ) )
	{
		break;
	}
	echo "\t<table border=\"0\" cellspacing=\"1\" width=\"100%\"   cellpadding=\"3\" >\r\n\t<tr>\r\n\t<td colspan=\"2\">\r\n\t当前空间:";
	if ( $rep == "" )
	{
		echo $DISK_NAME;
	}
	else
	{
		echo $DISK_NAME."/".$rep;
	}
	echo "<br>\r\n\t";
	echo "<s";
	echo "pan style=\"color:red\">";
	echo $mess[98];
	echo "!</span>\r\n\t</td>\r\n\t</tr>\r\n\t</table>\r\n   <table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\"  cellpadding=\"3\" >\r\n";
	if ( $NEW_PRIV == 1 )
	{
		echo "<tr class=TableLine2>\n";
		echo "<td width=200><img src=\"images/upload.gif\" align=\"ABSMIDDLE\"> \n";
		echo "{$mess['25']}</td><td>";
		echo "<form enctype=\"multipart/form-data\" action=\"netdisk.php\" method=\"post\">\n";
		echo "<input type=\"hidden\" name=\"DISK_ID\" value=\"{$DISK_ID}\">\n";
		echo "&nbsp;&nbsp;\n";
		echo "<input type=\"file\" class=BigInput name=\"userfile\" size=\"30\">\n";
		echo "<INPUT TYPE=\"hidden\" name=\"action\" value=\"upload\">\n";
		echo "<INPUT TYPE=\"hidden\" name=\"id\" value=\"{$id}\">\n";
		echo "<input type=\"hidden\" name=\"rep\" value=\"{$rep}\">\n";
		echo "<input type=\"hidden\" name=\"ordre\" value=\"{$ordre}\">\n";
		echo "<input type=\"hidden\" name=\"sens\" value=\"{$sens}\">\n";
		echo "<input type=\"submit\" class=BigButton name=\"Submit\" value=\"{$mess['27']}\">\n";
		echo "</td></tr></form>\n";
	}
	if ( $MANAGE_PRIV == 1 )
	{
		echo "<tr  class=TableLine2><td>\n";
		echo "<img src=\"images/defaut.gif\" align=\"ABSMIDDLE\">\n";
		echo "{$mess['28']}</td><td>";
		echo "<form method=\"post\" action=\"netdisk.php\">\n";
		echo "<input type=\"hidden\" name=\"DISK_ID\" value=\"{$DISK_ID}\">\n";
		echo "&nbsp;&nbsp;\n";
		echo "<input type=\"text\" class=BigInput name=\"nomfic\" size=\"30\">\n";
		echo "<input type=\"hidden\" name=\"rep\" value=\"{$rep}\">\n";
		echo "<input type=\"hidden\" name=\"action\" value=\"creer_fichier\">\n";
		echo "<INPUT TYPE=\"hidden\" name=\"id\" value=\"{$id}\">\n";
		echo "<input type=\"hidden\" name=\"ordre\" value=\"{$ordre}\">\n";
		echo "<input type=\"hidden\" name=\"sens\" value=\"{$sens}\">\n";
		echo "<input name=\"suffix\" type=\"radio\" value=\"txt\" checked>txt";
		echo "<input type=\"radio\" name=\"suffix\" value=\"html\">html";
		echo "<input type=\"radio\" name=\"suffix\" value=\"inc\">inc&nbsp;&nbsp;";
		echo "<input type=\"submit\" class=BigButton name=\"Submit\" value=\"{$mess['29']}\">\n";
		echo "</td></tr></form>\n";
		echo "<tr  class=TableLine2><td>\n";
		echo "<img src=\"images/dossier.gif\" align=\"ABSMIDDLE\">\n";
		echo "{$mess['26']}</td><td>";
		echo "<form method=\"post\" action=\"netdisk.php\">\n";
		echo "<input type=\"hidden\" name=\"DISK_ID\" value=\"{$DISK_ID}\">\n";
		echo "&nbsp;&nbsp;\n";
		echo "<input type=\"text\" class=BigInput name=\"nomdir\" size=\"30\">\n";
		echo "<input type=\"hidden\" name=\"rep\" value=\"{$rep}\">\n";
		echo "<input type=\"hidden\" name=\"action\" value=\"mkdir\">\n";
		echo "<INPUT TYPE=\"hidden\" name=\"id\" value=\"{$id}\">\n";
		echo "<input type=\"hidden\" name=\"ordre\" value=\"{$ordre}\">\n";
		echo "<input type=\"hidden\" name=\"sens\" value=\"{$sens}\">\n";
		echo "<input type=\"submit\" class=BigButton ame=\"Submit\" value=\"{$mess['29']}\">\n";
		echo "</td></tr></form>\n";
	}
	echo "</table>";
	break;
}
echo "\r\n</body>\r\n</html>";
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -