allright here is what i did :
*code modified from newthread.php and acceptupload function *
this is the code in files.php .. with this code if admin set submissions on user can submit files .. but not working ..
PHP Code:
if (is_array($HTTP_POST_FILES)) {
$attachment = $HTTP_POST_FILES['attachment']['tmp_name'];
$attachment_name = $HTTP_POST_FILES['attachment']['name'];
$attachment_size = $HTTP_POST_FILES['attachment']['size'];
if (is_uploaded_file($attachment)) {
if ($safeupload) {
$path = "$tmppath/vba".substr(uniqid(microtime()),-8);
move_uploaded_file($attachment, "$path");
$attachment = $path;
}
$attachment_name = strtolower($attachment_name);
$filenum = fopen($attachment,"rb");
$filestuff = fread($filenum,$filesize);
fclose($filenum);
@unlink($attachment);
$DB_site->query("INSERT INTO file_attach (aid,userid,filename,filedata,fileid) VALUES (NULL,$bbuserinfo[userid],'".addslashes($attachment_name)."','".addslashes($filestuff)."',$id)");
$aid=$DB_site->insert_id();
}
}
info : i created my own attachment table for files archive .. and editted * a little * the vb functions ..
if i can figure out how i will add this also to admin panel ..
greetz