<?
// Filename: multi_upload.php
If ($ ifupload)
{
$ Path = addslashes (dirname ($ path_translated). "\ upload \\";
For ($ I = 1; $ I <= 8; $ I ++)
{
$ Files = "afile". $ I;
If ($ {$ files }! = "NONE ")
{
If (copy ($ {$ files}, $ path. $ {$ Files. "_ name "}))
{
}
}
}
Print "<B> you have uploaded files successfully </B> <br> ";
Print "<a href = \" multi_upload.php \ "> return </a> ";
Exit;
}
?>
<HTML>
<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Meta name = "generator" content = "Microsoft Visual Studio 6.0">
<Title> upload multiple files </title>
<Style type = "text/CSS">
<! --
Body
{
Padding-Right: 0px;
Margin-top: 0px;
Padding-left: 0px;
Font-size: 8px;
Margin-left: 0px;
Cursor: default;
Color: black;
Margin-Right: 0px;
Padding-top: 0px;
Font-family: Arial;
Background-color: transparent;
Text-align: Center
}
. Txtinput
{
Font-size: 8pt;
Width: 100%;
Cursor: default;
Color: black;
Font-family: Arial;
Height: 21px;
Background-color: white;
Text-align: left
}
. Fieldlabel
{
Font-weight: normal;
Font-size: 9pt;
Width: 100%;
Color: black;
Font-family: Arial;
Background-color: transparent;
Text-align: left
}
. Headbtn
{
Border-Right: Black 1px solid;
Border-top: White 1px solid;
Font-size: 8pt;
Overflow: hidden;
Border-left: White 1px solid;
Width: 70px;
Color: black;
Border-bottom: Black 1px solid;
Font-family: Arial;
Height: 21px;
Background-color: # 8e8dcd;
Text-align: Center
}
. Transex
{
Border-Right: Black 1px solid;
Padding-Right: 8px;
Border-top: White 1px solid;
Padding-left: 8px;
Font-size: 8pt;
Padding-bottom: 3px;
Border-left: White 1px solid;
Width: 720px;
Padding-top: 3px;
Border-bottom: Black 1px solid;
Font-family: Arial;
Background-color: # c0c0c0;
Text-align: Center
}
-->
</Style>
<Script language = "JavaScript">
Function window. onload ()
{
Document. Forms [0]. btnok. onclick = btn_ OK;
}
Function btn_ OK ()
{
For (VAR I = 1; I <= 8; I ++)
{
If (eval ("document. Forms [0]. afile" + I + ". value! = ''"))
Document. Forms [0]. Submit ();
Return true;
}
Alert ("None of file have been selected ");
Return false;
}
</SCRIPT>
</Head>
<Body>
<Form method = "Post" Action = "multi_upload.php" name = "frmupload" enctype = "multipart/form-Data">
<Table id = "divcontainer" style = "height: 100%; width: 380" border = "0">
<Tr Height = "35"> <TD align = "right" valign = "bottom"> Multifile upload </TD> </tr>
<Tr> <TD align = "center" valign = "TOP">
<Table class = "transex" border = "0" cellspacing = "0" cellpadding = "0" style = "width: 360px">
<Tr style = "height: 10px">
<TD style = "width: 5px"> </TD>
<TD colspan = "2"> </TD>
<TD style = "width: 5px"> </TD>
</Tr>
<Tr>
<TD> </TD>
<TD nowrap> <label class = "fieldlabel"> file 1 </label> </TD>
<TD> <input type = "file" class = "txtinput" tabindex = "1" name = "afile1" style = "width: 282px"> </TD>
<TD> </TD>
</Tr>
<Tr>
<TD> </TD>
<TD nowrap> <label class = "fieldlabel"> file 2 </label> </TD>
<TD> <input type = "file" class = "txtinput" tabindex = "2" name = "afile2" style = "width: 282px"> </TD>
<TD> </TD>
</Tr>
<Tr>
<TD> </TD>
<TD nowrap> <label class = "fieldlabel"> file 3 </label> </TD>
<TD> <input type = "file" class = "txtinput" tabindex = "3" name = "afile3" style = "width: 282px"> </TD>
<TD> </TD>
</Tr>
<Tr>
<TD> </TD>
<TD nowrap> <label class = "fieldlabel"> file 4 </label> </TD>
<TD> <input type = "file" class = "txtinput" tabindex = "4" name = "afile4" style = "width: 282px"> </TD>
<TD> </TD>
</Tr>
<Tr>
<TD> </TD>
<TD nowrap> <label class = "fieldlabel"> File 5 </label> </TD>
<TD> <input type = "file" class = "txtinput" tabindex = "5" name = "afile5" style = "width: 282px"> </TD>
<TD> </TD>
</Tr>
<Tr>
<TD> </TD>
<TD nowrap> <label class = "fieldlabel"> file 6 </label> </TD>
<TD> <input type = "file" class = "txtinput" tabindex = "6" name = "afile6" style = "width: 282px"> </TD>
<TD> </TD>
</Tr>
<Tr>
<TD> </TD>
<TD nowrap> <label class = "fieldlabel"> file 7 </label> </TD>
<TD> <input type = "file" class = "txtinput" tabindex = "7" name = "afile7" style = "width: 282px"> </TD>
<TD> </TD>
</Tr>
<Tr>
<TD> </TD>
<TD nowrap> <label class = "fieldlabel"> file 8 </label> </TD>
<TD> <input type = "file" class = "txtinput" tabindex = "8" name = "afile8" style = "width: 282px"> </TD>
<TD> </TD>
</Tr>
<Tr style = "height: 5px">
<TD style = "width: 5px">
<TD style = "width: 350px" colspan = "2"> <HR width = "100%"> </TD>
<TD style = "width: 5px"> </TD>
</Tr>
<Tr>
<TD> </TD>
<TD colspan = "2" align = "Left">
<Button tabindex = "5" class = "headbtn" align = "center" name = "btnok" id = "btnok" accesskey = "O"> OK (<ins> O </INS>) </button>
<Input type = "hidden" name = "ifupload" value = 1>
<Button tabindex = "5" class = "headbtn" align = "center" name = "btncancel" id = "btncancel" accesskey = "C" onclick = "window. close (); "> cancel (<ins> C </INS>) </button> </TD>
<TD> </TD>
</Tr>
<Tr style = "height: 5px">
<TD style = "width: 5px">
<TD style = "width: 350px" colspan = "2"> </TD>
<TD style = "width: 5px"> </TD>
</Tr>
</Table>
</TD>
</Tr>
</Table>
</Form>
</Body>
</Html>