Index: bug_file_upload_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_file_upload_inc.php,v
retrieving revision 1.36
diff -u -r1.36 bug_file_upload_inc.php
--- bug_file_upload_inc.php	24 Oct 2004 19:04:36 -0000	1.36
+++ bug_file_upload_inc.php	20 Dec 2004 20:27:33 -0000
@@ -50,18 +50,25 @@
 <?php } ?>
 		<?php echo lang_get( 'upload_file' ) ?>
 	</td>
+	<td>
+	</td>
 </tr>
 <tr class="row-1">
 	<td class="category" width="15%">
 		<?php echo lang_get( 'select_file' ) ?><br />
 		<?php echo '<span class="small">(' . lang_get( 'max_file_size' ) . ': ' . number_format( $t_max_file_size/1000 ) . 'k)</span>'?>
 	</td>
-	<td width="85%">
+	<td width="65%">
 		<input type="hidden" name="bug_id" value="<?php echo $f_bug_id ?>" />
 		<input type="hidden" name="max_file_size" value="<?php echo $t_max_file_size ?>" />
 		<input name="file" type="file" size="40" />
 		<input type="submit" class="button" value="<?php echo lang_get( 'upload_file_button' ) ?>" />
 	</td>
+	<td width="20%">
+	 <span class="small">
+<? print_bracket_link( 'bug_file_upload_advanced.php?bug_id='.$f_bug_id, lang_get( 'advanced_upload' ) ) ?>
+	 </span>
+	</td>
 </tr>
 </table>
 </form>
Index: lang/strings_english.txt
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/lang/strings_english.txt,v
retrieving revision 1.227
diff -u -r1.227 strings_english.txt
--- lang/strings_english.txt	18 Dec 2004 19:32:28 -0000	1.227
+++ lang/strings_english.txt	20 Dec 2004 20:27:45 -0000
@@ -468,6 +468,13 @@
 $s_select_file = 'Select File';
 $s_upload_file_button = 'Upload File';
 $s_max_file_size = 'Max size';
+$s_advanced_upload = 'Advanced upload';
+
+# bug_file_upload_advanced.php
+$s_paste_clipboard = 'Paste Clipboard';
+$s_capture_screen = 'Capture Screen';
+$s_clear_upload_queue = 'Reset';
+$s_upload_files_button = 'Upload Files';
 
 # bug_reopen.php
 $s_bug_reopened_msg = 'Issue has been reopened...';
Index: bug_file_add_advanced.php
===================================================================
RCS file: bug_file_add_advanced.php
diff -N bug_file_add_advanced.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ bug_file_add_advanced.php	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,57 @@
+<?php
+	# Mantis - a php based bugtracking system
+	# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+	# Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+	# This program is distributed under the terms and conditions of the GPL
+	# See the README and LICENSE files for details
+
+	# --------------------------------------------------------
+	# $Id: bug_file_add.php,v 1.45 2004/10/05 14:59:08 thraxisp Exp $
+	# Contributed by Mike Haller <info@jupload.biz>
+	# --------------------------------------------------------
+?>
+<?php
+	# Add file to a bug and then view the bug
+?>
+<?php
+	require_once( 'core.php' );
+	
+	$t_core_path = config_get( 'core_path' );
+	
+	require_once( $t_core_path.'file_api.php' );
+?>
+<?php
+	$f_bug_id	= gpc_get_int( 'bug_id' );
+	
+	if ( ! file_allow_bug_upload( $f_bug_id ) ) {
+		access_denied();
+	}
+
+	access_ensure_bug_level( config_get( 'upload_bug_file_threshold' ), $f_bug_id );
+
+
+	foreach($_FILES as $f_file)
+	{
+		if ( !is_uploaded_file( $f_file['tmp_name'] ) || 0 == $f_file['size'] ) {
+			trigger_error( ERROR_UPLOAD_FAILURE, ERROR );
+		}
+
+		file_add( $f_bug_id, $f_file['tmp_name'], $f_file['name'], $f_file['type'], 'bug' );
+	}
+
+	# Determine which view page to redirect back to.
+	$t_redirect_url = string_get_bug_view_url( $f_bug_id );
+
+	html_page_top1();
+	html_meta_redirect( $t_redirect_url );
+	html_page_top2();
+?>
+<br />
+<div align="center">
+<?php
+	echo lang_get( 'operation_successful' ) . '<br />';
+	print_bracket_link( $t_redirect_url, lang_get( 'proceed' ) );
+?>
+</div>
+
+<?php html_page_bottom1( __FILE__ ) ?>
Index: bug_file_upload_advanced.php
===================================================================
RCS file: bug_file_upload_advanced.php
diff -N bug_file_upload_advanced.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ bug_file_upload_advanced.php	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,167 @@
+<?php
+	# Mantis - a php based bugtracking system
+	# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+	# Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+	# This program is distributed under the terms and conditions of the GPL
+	# See the README and LICENSE files for details
+
+	# --------------------------------------------------------
+	# $Id$
+	# Contributed by Mike Haller <info@jupload.biz>
+	# --------------------------------------------------------
+?>
+<?php
+	require_once( 'core.php' );
+	
+	$t_core_path = config_get( 'core_path' );
+	
+	require_once( $t_core_path.'bug_api.php' );
+	require_once( $t_core_path.'custom_field_api.php' );
+	require_once( $t_core_path.'compress_api.php' );
+	require_once( $t_core_path.'current_user_api.php' );
+	require_once( $t_core_path.'file_api.php' );
+	require_once( $t_core_path.'date_api.php' );
+	require_once( $t_core_path.'relationship_api.php' );
+?>
+<?php
+	$f_bug_id	= gpc_get_int( 'bug_id' );
+	$f_history	= gpc_get_bool( 'history', config_get( 'history_default_visible' ) );
+
+	if ( ADVANCED_ONLY == config_get( 'show_view' ) ) {
+		print_header_redirect ( 'bug_view_advanced_page.php?bug_id=' . $f_bug_id );
+	}
+
+	access_ensure_bug_level( VIEWER, $f_bug_id );
+
+	$t_bug = bug_prepare_display( bug_get( $f_bug_id, true ) );
+
+	$t_access_level_needed = config_get( 'view_history_threshold' );
+	$t_can_view_history = access_has_bug_level( $t_access_level_needed, $f_bug_id );
+
+	compress_enable();
+
+	$t_bugslist = gpc_get_cookie( config_get( 'bug_list_cookie' ), false );
+?>
+<?php html_page_top1( bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) ) ?>
+<?php html_page_top2() ?>
+
+<div id="upload_form_open">
+
+<form name="JUploadForm">
+		<input type="hidden" name="bug_id" value="<?php echo $f_bug_id ?>" />
+		<input type="hidden" name="max_file_size" value="<?php echo $t_max_file_size ?>" />
+</form>
+
+<table class="width100" cellspacing="1">
+
+	<!-- Title -->
+	<tr>
+		<td class="form-title" colspan="3">
+			<?php echo lang_get( 'advanced_upload' ) ?>
+		</td>
+	</tr>
+
+	<!-- spacer -->
+	<tr height="5" class="spacer">
+		<td colspan="3"></td>
+	</tr>
+
+	<tr>
+		<td>
+			<input
+			 type="button"
+			 value="<?php echo lang_get( 'paste_clipboard' ) ?>"
+			 onClick="document.JUpload.jsPasteClipboardImage()">
+		</td>
+		<td>
+			<input
+			 type="button"
+			 value="<?php echo lang_get( 'capture_screen' ) ?>"
+			 onClick="document.JUpload.jsCaptureScreenshot()">
+		</td>
+		<td width="*">
+		</td>
+	</tr>
+
+	<tr>
+		<td colspan="3">
+			 <applet 
+			  code="JUpload.startup"
+			  archive="lib/jupload.jar"
+			  width="200"
+			  height="60"
+			  mayscript="mayscript"
+			  name="JUpload"
+			  alt="JUpload by www.jupload.biz">
+			 <!-- Java Plug-In Options -->
+			 <param name="progressbar" value="true">
+			 <param name="boxmessage" value="Loading JUpload Applet ...">
+			 <!-- Target links -->
+			 <param name="actionURL" value="bug_file_add_advanced.php">
+			 <param name="completeURL" value="view.php?id=<? echo $f_bug_id ?>">
+			 <param name="backgroundColor" value="#ffffff">
+			 <param name="captureScreen" value="true">
+			 <param name="replaceDocument" value="false">
+			 <param name="realTimeResponse" value="false">
+             <param name="showSuccessDialog" value="false">
+			 <param name="showServerResponse" value="false">
+			 <param name="showStatusPanel" value="false">
+			 <param name="autoselectLastFile" value="true">
+			 <!param name="dimensionFilter" value="((width>=640 and width<=1024) and (height>=480 and height <= 768)) or ((width>=480 and width<=768) and (height>=640 and height <= 1024)) or (width=-1 and height=-1)">
+			 <param name="debug" value="false">
+			 </applet>
+		</td>
+	</td>
+
+	<!-- spacer -->
+	<tr height="5" class="spacer">
+		<td colspan="3"></td>
+	</tr>
+
+	<tr>
+		<td>
+			<input
+			 type="button"
+			 value="<?php echo lang_get( 'clear_upload_queue' ) ?>"
+			 onClick="document.JUpload.jsClickRemove()">
+		</td>
+		<td>
+			<input
+			 type="button"
+			 value="<?php echo lang_get( 'upload_files_button' ) ?>"
+			 onClick="document.JUpload.jsClickUpload()">
+		</td>
+		<td>
+		</td>
+	</td>
+
+	<!-- spacer -->
+	<tr height="5" class="spacer">
+		<td colspan="3"></td>
+	</tr>
+
+	<tr>
+		<td colspan="3">
+			<applet 
+			  code="JUploadPlugin_ImagePreview"
+			  archive="lib/jupload.jar"
+			  width="480"
+			  height="320"
+			  mayscript="mayscript"
+			  name="JUploadPlugin_ImagePreview"
+			  alt="JUpload Plugin: Image preview">
+			 <param name="backgroundColor" value="#ffffff">
+			</applet>
+		</td>
+	</tr>
+	<!-- spacer -->
+	<tr height="5" class="spacer">
+		<td colspan="3"></td>
+	</tr>
+</table>
+</form>
+</div>
+
+<?
+	html_page_bottom1( __FILE__ );
+?>
