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

📄 wlyp.php

📁 邮箱加即时聊天
💻 PHP
字号:
<? ob_start();$style=$_COOKIE['style'];
$color1;
$color2;
switch($style){
	case 'moren':
		$color1='#3399cc';
		$color2='#66cccc';
		break;
	case 'haian':
		$color1='#4C74A3';
		$color2='#86A562';
		break;
	default:
		$color1='#cc6699';
		$color2='#996699';
		
}?><?php	include "../Sysconf.php";	$userdir=$_COOKIE["username"];	if($_POST["enter"]=="SendFile"){		$uploaddir = "/var/www/uploads/$userdir/";		$filename = str_replace(" ","_",$_FILES['userfile']['name']);		$uploadfile = $uploaddir.$filename;		$fileSize = $_FILES['userfile']['size'];		$sql="select * from user_base_information where user_name = '$userdir';";		$result= mysql_query($sql);		$spaceLeft=mysql_result($result,0,'net_storage');		$upsize = $spaceLeft-$fileSize;		if($spaceLeft<$fileSize){			echo "<script>alert('空间不足')</script>";			return null;		}						if(file_exists($uploadfile)){			echo "<script>alert('已存在相同文件名的文件,请重命名要上传的文件或删除已存在的文件')</script>";			header("refresh:0 url=wlyp.php");			return;		}		//上传时若存在相同的 文件名,则 直接覆盖。需要考虑!!!!!				if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {			//exec("chmod 777 $uploadfile");			$sql1= "update user_base_information set net_storage = $upsize where user_name = '$userdir';";			mysql_query($sql1);    			echo "<script>alert('文件上传成功')</script>";		}else     			echo "<script>alert('上传失败!')</script>";	}	?>
<head>
<title>网络存储</title>
<meta http-equiv="Content-Style-Type" content="text/css">
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet">
</head>

<body>
<table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0" background="../moren/rep_1.jpg">
  <tr align="left" valign="top">
    <td height="4" bgcolor="#FFFFFF"><img src="../moren/spacer.gif" width="1" height="4"></td>
    <td width="677" bgcolor="#FFFFFF" height="4"><img src="../moren/spacer.gif" width="1" height="4"></td>
    <td height="4" bgcolor="#FFFFFF"><img src="../moren/spacer.gif" width="1" height="4"></td>
  </tr>
  <tr align="left" valign="top">
    <td> </td>
    <td width="677"><table width="677"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="39" align="left" valign="top"><div style="padding-left:0px; padding-top:15px">
           </div></td>
      </tr>
      <tr>
        <td height="12" align="left" valign="top"><img src="../moren/ket_5.jpg" width="677" height="12"></td>
      </tr>
      <tr>
        <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr align="left" valign="top">
          </td>
            <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="31" align="left" valign="top"><div style="padding-left:27px; padding-top:3px">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr align="left" valign="middle">
                      
                      <td width="325"><span class="style14">
						<font face="Tahoma" size="2">网络存储</font></span></td>
                      
                    </tr>
                  </table>
                  </div></td>
              </tr>
              <tr>
                <td align="left" valign="top">
				<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#4C74A3" id="table3">
                  <tr align="left" valign="top">
                   
                    <td valign="top" bgcolor="<?php echo $color1?>"><div style="padding-left:15px; padding-top:5px">
                      <table width="598"  border="0" cellspacing="0" cellpadding="0" id="table4" height="23">
                        <tr align="left" valign="middle" class="style3">
                          <td width="6" class="style3"> </td>
                          <td width="219" class="style3" colspan=2>
						  <?
						  	$sql="select * from user_base_information where user_name = '$userdir';";							$result= mysql_query($sql);							$spaceLeft=mysql_result($result,0,'net_storage');							$grade=mysql_result($result,0,'grade');
						  ?>
							<font face="Tahoma" size="3" color=white>您有<? 								$size=10;								if($grade>=($a=10))									$size+=$size/5;								if($grade>=($a=40))									$size+=$size/5;								if($grade>=($a=100))									$size+=$size/5;								if($grade>=($a=190))									$size+=$size/5;								if($grade>=($a=310))									$size+=$size/5;								if($grade>=($a=460))									$size+=$size/5;								echo round($size,1);						?>M空间。剩<? echo round($spaceLeft/1048576,1)?>M</font></td>
							
                          <td width="212"> </td>
                          <td width="134"> </td>
                          <td width="27"> </td>
                        </tr>
                      </table>
                      </div></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="5" align="left" valign="top"><img src="../moren/spacer.gif" width="1" height="5"></td>
              </tr>
              
              <tr>
                <td align="left" valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	<!-- The data encoding type, enctype, MUST be specified as below -->
<form enctype="multipart/form-data" action="wlyp.php" method="POST">
   	
	<!-- MAX_FILE_SIZE must precede the file input field -->
    <input type="hidden" name="MAX_FILE_SIZE" value="20000000" />
    	<!-- Name of input element determines name in $_FILES array -->
     上传文件: <input name="userfile" type="file" />
    <!--确定浏览的 文件后,对文件的 大小作判断-->
    
    <input type="submit" name= enter value="SendFile">
</form>		</td>
              </tr>
              
              <tr>
                <td align="left" valign="top">
				<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#4C74A3" id="table7" height="23">
                  <tr align="left" valign="top">
                    
                    <td valign="top" bgcolor="<?php echo $color1?>"><div style="padding-left:15px; padding-top:5px">
                      <table width="598"  border="0" cellspacing="0" cellpadding="0" id="table8" height="23">
                        <tr align="left" valign="middle" class="style3">
                     
                          <td width="221" class="style3">
							<font face="Tahoma" size="3"><a href="check.php"><font color=white>已上传文件管理:</font></a></font></td>
                          <td width="212"><font face="Tahoma" size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
							</font></td>
                          <td width="134"><font face="Tahoma" size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></td>
                          <td width="27"> </td>
                        </tr>
                      </table>
                      </div></td>
                  </tr>
                </table></td>
              </tr>

			  <tr>
                <td height="25" align="left" valign="top"><img src="../moren/spacer.gif" width="1" height="5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
              </tr>
				<tr>
                <td align="left" valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
				<font size=2>支持上传的文件类型包括jpg.rar,txt</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;				
				</td>
              </tr>
				<tr>
                <td align="left" valign="top"> </td>
              </tr>
				<tr>
                <td align="left" valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 				<font size=2>建议将文件打包成rar格式上传</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				</td>
              </tr>
				<tr>
                <td align="left" valign="top"> </td>
              </tr>
				<tr>
                <td align="left" valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
				<font size=2>单个文件上传大小限制为5M</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				</td>
              </tr>
		
            </table></td>
            <td width="4" background="../moren/right_5.jpg"><img src="../moren/right_5.jpg" width="4" height="5"></td>
          </tr>
        </table></td>
      </tr>
  
      <tr>
        <td height="14" align="left" valign="top"><img src="../moren/bottom_2.jpg" width="677" height="14"></td>
      </tr>
	  
 
      <tr>
        <td align="right" valign="top"><table width="434"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="center" valign="top"><div style="padding-left:0px; padding-top:12px"><span class="style13">
				<p>2008短信息收发系统第二项目小组<br>
  
          </tr>
        </table></td>
      </tr>
    </table></td>
    <td> </td>
  </tr>
  <tr align="left" valign="top">
    <td height="100%"> </td>
    <td width="677" height="100%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
    <td height="100%"> </td>
  </tr>
</table>	
</body>


⌨️ 快捷键说明

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