Example #1
0
                    break;
                case UPLOAD_ERR_PARTIAL:
                    $msg .= "文件传输出错!";
                    break;
                case UPLOAD_ERR_NO_FILE:
                    continue 2;
                    $msg .= "没有文件上传!";
                    break;
                default:
                    $msg .= "未知错误";
            }
            break;
        }
    }
}
$attachments = bbs_upload_read_fileinfo();
$filecount = count($attachments);
$allnames = array();
$totalsize = 0;
for ($i = 0; $i < $filecount; $i++) {
    $allnames[] = $attachments[$i]["name"];
    $totalsize += $attachments[$i]["size"];
}
$allnames = implode(",", $allnames);
page_header("上传附件", FALSE);
?>
<body>
<script type="text/javascript">
<!--
function checkAnyFiles() {
	var frm = document.forms[0];
Example #2
0
 /**
  * function *Att
  * the three functions below handle user upload file
  * they are hard to place any model
  *
  * @return array(size, name, pos)
  * @static
  * @access public
  */
 public static function listAttach()
 {
     $ret = bbs_upload_read_fileinfo();
     return (array) $ret;
 }