[- use TEK::Utils; use TEK::Icons; use TEK::Config; use TEK::Database; use TEK::Copyright; my $conf = new TEK::Config; my $db = new TEK::Database; if ( not is_allowed( $SEC_EXTRANET ) ) { use Apache; use Apache::Constants qw(REDIRECT); $req_rec->status( REDIRECT ); $req_rec->header_out("Location" => "http://$ENV{'SERVER_NAME'}/" ); } else { %data = $db->select1( "*", $USER_TABLE, "$USER_NAME = '$ENV{REMOTE_USER}'" ); $data{ IMAGE } = imagename( $USER_IMG_DIR, $data{ $USER_ID }, $USER_IMG_WEB_DIR ); if ( not null $fdat{ DELETE } ) { my %file = $db->select1( "*", $DL_TABLE, "$DL_ID = $fdat{DELETE}" ); $db->delete( $DL_TABLE, "$DL_ID = $fdat{ DELETE }" ); unlink untaint "$DL_DIR/$file{ $DL_FILE }"; } if ( not null $fdat{ UPDATE_BUTTON } ) { if ( not null $fdat{ NEW_FILE } and not null $fdat{ $DL_DESC } ) { use TEK::Upload; my $ul = new TEK::Upload( $fdat{ NEW_FILE } ); $fdat{ $DL_BASENAME } = lc( $ul->get_name() ); $fdat{ $DL_FILE_EXT } = lc( $ul->get_ext() ); $fdat{ FILE } = "$DL_DIR/$fdat{ $DL_BASENAME }.$fdat{ $DL_FILE_EXT }"; $fdat{ $DL_FILE } = "$fdat{ $DL_BASENAME }.$fdat{ $DL_FILE_EXT }"; if ( -e $fdat{ FILE } ) { my $add = "0"; $filename = $fdat{ FILE }; $fdat{ FILE } = "$DL_DIR/$fdat{$DL_BASENAME}-$add.$fdat{$DL_FILE_EXT}"; $fdat{ $DL_FILE } = "$fdat{ $DL_BASENAME }-$add.$fdat{ $DL_FILE_EXT }"; while ( -e $fdat{ FILE } ) { $add++; $fdat{ FILE } = "$DL_DIR/$fdat{ $DL_BASENAME }-$add.$fdat{ $DL_FILE_EXT }"; $fdat{ $DL_FILE } = "$fdat{ $DL_BASENAME }-$add.$fdat{ $DL_FILE_EXT }"; } } $ul->save_image( $fdat{ FILE } ); } $fdat{ $DL_ID } = time; $fdat{ $DL_UP } = $data{ $USER_ID }; $fdat{ $DL_DOWN } = ''; $db->insert_esc( $DL_TABLE, map( ($_, $fdat{ $_ }), @DL_FIELDS ) ); foreach( @DL_FIELDS ) { $fdat{ $_ } = ''; } } @list = $db->select( "*", $DL_TABLE, "$DL_DOWN ~* '$data{ $USER_ID }'", "$DL_UP != $data{ $USER_ID }" ); @mlist = $db->select( "*", $DL_TABLE, "$DL_UP = $data{ $USER_ID }" ); foreach ( @list, @mlist ) { $_->{ $DL_ICON } = iconlink( $_->{ $DL_FILE } ); } } -] Global Tool & Automation Corp. - Extranet
GTA Logo [+ pbtektools(); +]
[$ if ( $filename ) $]
Thank you. The file: [+ $filename +] has been successfully uploaded.
[$ endif $]
[$ if not null $data{ IMAGE } $]
[$ endif $] [+ $data{ $USER_WELCOME } +]

Upload Your Files Here
Type in a file description, then browse to find the file to upload.
Click on the submit button.
A confirmation message will appear at the top
of this page once the file has been successfully uploaded.

File Description:

Upload New File:
 
 
Files Uploaded for You
Files here were uploaded for you to download.
Click on the file to save it.


[$ if @list $]
File Description File Name Size
[+ $list[$row]->{ $DL_DESC } +] {$DL_FILE} +]"> {$DL_FILE} +]">[+ $list[$row]->{$DL_FILE} +] [+ int( (-s "$DL_DIR/" . $list[$row]->{$DL_FILE}) / 1000 ) +]K
  [$ endif $]
Files You Have Uploaded
Files here were uploaded by you for GTA.
You can remove a file by clicking on the trash can next to it.


[$ if @mlist $]
File Description File Name Size  
[+ $mlist[$row]->{$DL_DESC } +] {$DL_FILE} +]"> {$DL_FILE} +]">[+ $mlist[$row]->{$DL_FILE} +] [+ int( (-s "$DL_DIR/" . $mlist[$row]->{$DL_FILE}) / 1000 ) +]K
[$ endif $]
[+ tekfooter(); +]