Inline email images 'splitting' into parts

I've a problem with images in emails appearing as broken segments of the same image, which happens in Safari and Chrome, and Mailplane's app.
OS X 10.8.4, Macbook Air 2013 13" and Macbook Pro 13".
It's the same with my Hotmail and Gmail apps.
I've attached an image to illustrate.
TIA,
SPD.

Cheers Carolyn,
It appears that the image above is made up of a number of smaller images. The browser (and Mailplane) are breaking the image up into its parts.
The matter gets a little more complicated. Below is how it displays in the iPhone Gmail app
And this is how it displays in the iPhone mail app
Any more thoughts?
SPD.

Similar Messages

  • Why are my emails being split into mime-Attachments?

    Hi,
    For some reason whenever I attach a file to my emails (Mail v3.5) some portion of the email text is being truncated into another attachment (mime-attachment) when it lands at the recipient.
    Many times the recipient is not opening the mime-attachment unaware that it contains part of my email.
    It seems to happen in either plain or rich text email formats and whether or not the attachments are attached as windows friendly or not.
    Is there some way to stop this happening?
    Regards,
    Clayton

    Clayton,
    It is much discussed in these forums, and some others. The frequent discussion in these forums about whether to use Plain Text or RTF is relevant to some recipient email programs seeing inline attachments as embedded images due to the presence of the HTML that results from RTF when multiple fonts and attachments are present. Btw, the fact that the person composing sees the attachments with View in Place has no bearing on this issue involving HTML that results from RTF.
    Outlook and Outlook Express don't handle Rich Text well, even when they create it. The messages you have been sending would, I am sure, appear fine in Thunderbird, example on either a Windows or a Mac platform. Mail auto converts RTF to Plain if only one font, or one size/color font is utilized, but if more than one font, even if only introduced in the Signature, then continues with RTF, which then gets converted to HTML. In Plain Text, attachments placed throughout the message will likely work with many recipient email clients, but not all of those. Placing all attachments last -- an option now offered in Mail 3 -- is the surest help when you don't know the recipients system well.
    Ernie

  • After a PRAM reset my MBP 1,1 display is split into 4 parts each displaying the same image. What is causing this and how can I fix it?

    After resetting the PRAM/NVRAM (control, option, P, R) on my Macbook Pro 1,1 (2007) running 10.6.8 The screen is now split into 4 parts, each displaying the same thing. The screen immediately appears this way at the first grey screen, however if I do another NVRAM reset, upon restart after the second startup chime, the screen is normal but once it gets to a certain point around thetime the cog stops spinning, the screen flickers, turns blue and splits into four again.
    Another thing is when I tried using the Apple Hardware Test I couldn't read the instructions as the resolution was too small, but once I restarted and change my display resolution in System Preferences, the resolution was readable in AHT. I assumed the System Settings were loading when the OS had booted and that AHT runs without any of these settings (if that makes sense?)
    I've not used any third party utilites and everything working fine except for some battery issues which are gone now (the reason I tried the PRAM reset)
    Any help would be much appreciated

    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Press and hold Shift and left-click the Reload button.
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (MAC)
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • In the itunes library, a single album appears to be split into two separate parts, how do i combine them?

    my itunes library has several albums that are split into two parts. one contains half of the album's songs and the other the other half. how do i combine these so the album only appears once in it's entirety?

    Generally setting a common Album Artist will fix things.
    For deeper problems see Grouping tracks into albums.
    tt2

  • I use Exchange to sync my iphone4S with Outlook.  On my iphone, my contacts are split into multiple records if they have more than one email address - how can I consolidate them on the iphone

    i use Exchange to sync my iphone4S with Outlook.  On my iphone, my contacts are split into multiple records if they have more than one email address - how can I consolidate them on the iphone

    I have loaded my Firefox bookmarks into Internet Explorer Favorited. I also uninstalled Safari.
    I go to iTunes on my phone and see no wat to connect my iPhone to my laptop. I see Music, Shows, etc., the kind of stuff I would expect, but no clue as to how to proceed.
    Would you please be so kind to fill me in on how to "That syncing is done via iTunes. Connect the device to iTunes, select it, then go to the Summary page and select to sync bookmarks."?
    I am not sure what you mean by "Summary Page"
    Thank you

  • Speedgrade crashes every time I use split into clips function as part of scene detection.

    Speedgrade CC (latest version) crashes every time I use split into clips function as part of scene detection.
    I can use the keyframe function fine, but if i split it into clips it crashes 9 out of 10 times... so to get the job done i simply keep reopening the project, cliping and praying it works, then it crashes.... and i repeat this until it doesnt crash!
    File format im using is a 22min long Prores422 HQ 1080 25P file.
    Any ideas?.... im guessing im going to get the old "reinstall the software" one first... anything else?
    also have issues with Speedgrade just crashing for no good reason at random times while im grading too but ive come to expect that from the buggy software.

    I've got several 1080p mov's that have multiple sequences with 20 to 40 minutes a sequence I've regularly run over to Sg from PrPro. Granted, they're pretty straight forward, mostly simple cuts with a few transitions/wipes, no more than 3 video layers a sequence. Only one has any Ae stuff on it, and again, pretty simple.
    But as noted, there are those who do programs for broadcast with it ... I'm wishing one would chime in. Maybe shooternz ... I think he does b-cast work. Vastly more experienced than I am, PrPro, Ae, Sg, Audition ... the "suite". There's several others around here, though they tend to 'hang' in the PrPro forum more than here.
    Neil

  • Ksh. Integer value splitted into two parts

    Hi ,
    I have code like below in my Ksh script, and getting the sample_id value as '2003 15588' instead of '200315588'
    I'm using this sample_id to run an oracle report. Any help on why the value is getting splitted into two parts like 2003 15588.
    if (( CHECKS == 0 )) || (( CHECKS == 1 ))
    then
    V_SAMPLE_ID=$( $ORACLE_HOME/bin/sqlplus -S / <<EOF
    whenever sqlerror exit 1 rollback;
    whenever oserror exit 1 rollback;
    --Set up pagesize parameters.
    set newpage 0;
    set space 0;
    set echo off;
    set pagesize 0;
    set heading off;
    set verify off;
    set feedback off;
    set trimspool off;
    set termout on;
    set colsep "";
    set linesize 5;
    select substr(SAMPLE_ID,1,15) from sample_m
    where NAME=$MFGLBL and TVALUE=$C_SAMPLE;
    exit;
    EOF
    v_count=$?
    print "V_SAMPLE_ID: $V_SAMPLE_ID" >> $LOG_FILE
    fi
    Pls help . thanks.

    Here the actual outputs,
    from SqlPlus,
    SQL> select substr(SAMPLE_ID,1,15) from nais_sample_attributes where NAME='MFG LABEL NUMBER' and te
    xt_value ='9300141751';
    SUBSTR(SAMPLE_I
    200315588
    used the same query in the script , only difference is name and text_value are
    passing as variables.
    from script log file,
    /app/oracle/product/dev6i/bin/rwrun60 /app//reports/105.rep /@DB18 BATCH=YES DESTYPE=PRINTER DESNAME=nullprinter DESFORMAT=PDF P_SAMPLE_ID=20031 5588
    in the script , when i tried ,
    substr(SAMPLE_ID,1,5 ) it returns 20031 and
    substr(SAMPLE_ID,1,6) it returns 20031 5.

  • I want to reply to e-mail in my own handwriting. I am not thinking of Handwriting Conversion or Notes apps. Exchange client to be used to reply to emails  - one approach is to sketch/free-writing in composer window or send it inline as image.Is it possibl

    I want to reply to e-mail in my own handwriting.
    I am not thinking of Handwriting Conversion or Notes apps.
    Exchange client to be used to reply to emails  - one approach is to sketch/free-writing in composer window
    Or
    send the captured free-flow from another app as an image and attach it inline as image.
    Is it possible to do this - or there would be some restrictions?
    If it is possible, what would be the best approach?

    There are some third-party apps that feature handwriting capture, including a couple that have writing-to-text conversion, but I know of no email app that allows handwriting, so you would have to use an app that saves the handwriting as an image and allows that document to be emailed. Search the App Store for "handwriting" and you may find such an app.
    As to restrictions, the only restriction I can think of, assuming the app in question does indeed allow a document to be emailed, would be the size of the attachment vis-a-vis any limited placed on message size by your email provider or that of the recipient.
    Regard.

  • Selected "Edit in Audition," audio track was split into two files. Preference change?[image included]

    I have no idea what kind of shortcut key or preference I changed.
    When I select any video on any premiere timeline to "edit in audition" i end up with the audio getting split into two wav files instead of one, as the red rectangular shows.  Instead of the single audio track to edit in which you can see in the blue rectangular.
    ***The blue rectangular I got when I dropped a video directly into audition.
    Update: did some testing around in premiere, this issue only happens with clips that are on a timeline, but if I "edit in audition" from "project" (main folder with all material), I can edit it properly.

    Its one file with two different dispalys.
    You can pull the bottom one down by dragging it down or hit the very little triangle on the right side.

  • How to put an image to any part of an e-mail using UTL_SMTP

    We need to send an e-mail with the following format.
    |COMPANY LOGO (JPEC IMAGE)          |
    |                                    |
    |                                    |
    |              HTML table            |
    |                                    |
    |                                    |
    ------------------------------------The exact format is shown here: http://postimage.org/image/76v4e5tmd/
    Above the Automatic Payment Advice is the JPEG image.
    How do we CONSTRUCT THIS e-mail? Our DB is a 10g R2. We use UTL_SMTP. Problem is how to insert an image to any part of the e-mail (not as a separate attachment)?
    Edited by: Channa on May 24, 2012 5:51 AM

    Yes. It is possible. Read this posts of Billy Verreynne to uderstand the MIME format.
    Re: Sending HTML mail with inline/embeded images (My code is constructed on this input)
    embeded image in email body in pl/sql
    DECLARE
      /*LOB operation related varriables */
      v_src_loc  BFILE := BFILENAME('TEMP', 'otn.jpg');
      l_buffer   RAW(54);
      l_amount   BINARY_INTEGER := 54;
      l_pos      INTEGER := 1;
      l_blob     BLOB := EMPTY_BLOB;
      l_blob_len INTEGER;
      v_amount   INTEGER;
      /*UTL_SMTP related varriavles. */
      v_connection_handle  UTL_SMTP.CONNECTION;
      v_from_email_address VARCHAR2(30) := '[email protected]';
      v_to_email_address   VARCHAR2(30) := '[email protected]';
      v_smtp_host          VARCHAR2(30) := 'x.xxx.xxx.xxx'; --My mail server, replace it with yours.
      v_subject            VARCHAR2(30) := 'Your Test Mail';
      l_message            VARCHAR2(32767) := '<html>
    <meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
    <body background=3D"cid:[email protected]">
    ..rest of mail
    </body>
    </html>
      /* This send_header procedure is written in the documentation */
      PROCEDURE send_header(pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS
      BEGIN
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            pi_name || ': ' || pi_header || UTL_TCP.CRLF);
      END;
    BEGIN
      /*Preparing the LOB from file for attachment. */
      DBMS_LOB.OPEN(v_src_loc, DBMS_LOB.LOB_READONLY); --Read the file
      DBMS_LOB.CREATETEMPORARY(l_blob, TRUE); --Create temporary LOB to store the file.
      v_amount := DBMS_LOB.GETLENGTH(v_src_loc); --Amount to store.
      DBMS_LOB.LOADFROMFILE(l_blob, v_src_loc, v_amount); -- Loading from file into temporary LOB
      l_blob_len := DBMS_LOB.getlength(l_blob);
      /*UTL_SMTP related coding. */
      v_connection_handle := UTL_SMTP.OPEN_CONNECTION(host => v_smtp_host);
      UTL_SMTP.HELO(v_connection_handle, v_smtp_host);
      UTL_SMTP.MAIL(v_connection_handle, v_from_email_address);
      UTL_SMTP.RCPT(v_connection_handle, v_to_email_address);
      UTL_SMTP.OPEN_DATA(v_connection_handle);
      send_header('From', '"Sender" <' || v_from_email_address || '>');
      send_header('To', '"Recipient" <' || v_to_email_address || '>');
      send_header('Subject', v_subject);
      --MIME header.
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'MIME-Version: 1.0' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-Type: multipart/related; ' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          ' boundary= "' || 'SAUBHIK.SECBOUND' || '"' ||
                          UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      -- Mail Body
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          '--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-Type: text/html;' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          ' charset=US-ASCII' || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-Transfer-Encoding: quoted-printable' || UTL_TCP.CRLF);                     
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle, l_message || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      -- Mail Attachment
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          '--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-Disposition: inline; filename="otn.jpg"' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-Type: image/jpg; name="otn.jpg"' ||
                          UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-ID: <[email protected]>; ' ||
                          UTL_TCP.CRLF);                     
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-Transfer-Encoding: base64' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      /* Writing the BLOL in chunks */
      WHILE l_pos < l_blob_len LOOP
        DBMS_LOB.READ(l_blob, l_amount, l_pos, l_buffer);
        UTL_SMTP.write_raw_data(v_connection_handle,
                                UTL_ENCODE.BASE64_ENCODE(l_buffer));
        UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
        l_buffer := NULL;
        l_pos    := l_pos + l_amount;
      END LOOP;
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      -- Close Email
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          '--' || 'SAUBHIK.SECBOUND' || '--' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          UTL_TCP.CRLF || '.' || UTL_TCP.CRLF);
      UTL_SMTP.CLOSE_DATA(v_connection_handle);
      UTL_SMTP.QUIT(v_connection_handle);
      DBMS_LOB.FREETEMPORARY(l_blob);
      DBMS_LOB.FILECLOSE(v_src_loc);
    EXCEPTION
      WHEN OTHERS THEN
        UTL_SMTP.QUIT(v_connection_handle);
        DBMS_LOB.FREETEMPORARY(l_blob);
        DBMS_LOB.FILECLOSE(v_src_loc);
        RAISE;
    END;Otn logo is in my database server and It will embade otn logo all over the mail body!.
    Edited by: Saubhik on May 24, 2012 9:06 PM
    Changed the original IP and email address. I should have done this earlier!: Saubhik on May 25, 2012 11:20 AM

  • Embedding image in Description part of Appointment

    In my requirement, I have to send an appointment with image as attachment, embedded (in display mode).
    for creating document, I am using CL_DOCUMENT_BCS  class, inside that class  i am using
    CREATE_FROM_MULTIRELATED method for creating the document. In this method we have to pass below object lo_mime_helper. Before passing it, I am filling it with image and appointment.
    For image:
      CALL METHOD lo_mime_helper->add_binary_part
        EXPORTING
          content      = i_graphic_table
          filename     = 'WIPRO.BMP'
          extension    = 'BMP'
          description  = 'descriptiongif'
          content_type = 'image/bmp'
          length       = l_len
          content_id   = 'content_id_1'.
    For appointment
    lv_sr_title = 'Invitaion for the Meeting'.
    clear lt_text.
    create document as an ica l object
      lt_text = lo_appointment->as_ical_object( ).
      CALL FUNCTION 'SO_RAW_INT_TO_RTF'
        TABLES
          objcont_old = lt_text
          objcont_new = lt_text.
      data wa_text like line of lt_text.
      data text_length type i.
      data full_length type i.
      loop at lt_text INTO wa_text.
         text_length = strlen( wa_text ).
         full_length = full_length + text_length.
         clear text_length.
         CLEAR wa_text.
      endloop.
    clear l_len.
    l_len = full_length.
      CALL METHOD lo_mime_helper->add_textual_part
        EXPORTING
          content      = lt_text
          filename     = 'Appointment Meeting'
          extension    = 'ICS'
         description  =
          content_type = 'application/rtf'
          LENGTH       = l_len
          content_id   = 'content_id_2'
    Now I am passing lo_mime_helper to methofd for creating document
       TRY.
          CALL METHOD cl_document_bcs=>create_from_multirelated
            EXPORTING
              i_subject          = 'my subject'
              i_multirel_service = lo_mime_helper
            RECEIVING
              result             = document.
        CATCH cx_document_bcs .
          MESSAGE e672(so) WITH 'bcs error while creating bcs_doc'.
          EXIT.
        CATCH cx_bcom_mime .
          MESSAGE e672(so) WITH 'mime error while creating bcs_doc'.
          EXIT.
      ENDTRY.
    THis is sending a mail, but both image and appointment are going as attachment, even when I am setting Disposition type as I(Inline) in debugger. I want it to go as appointment with image embedded in body part.
    When I am using CL_APPOINTMENT class, its going as appointment perfectly, but how to embedd a image in body part then.
    Moderator message : Cross-posting not allowed, duplicate thread locked.
    Edited by: Vinod Kumar on Oct 10, 2011 1:35 PM

    Hi try with this code.
    Document = cl_document_bcs=>create_document( i_type = u2018RAWu2019 i_text =
    text i_length = u201912u2032 i_subject = u2018test created u2018 ).
    add attachment to Document
    BCS expects Document content here e.g. from Document upload
    binary_content = u2026
    CALL METHOD Document->add_attachment EXPORTING i_attachment_type = u2018GIFu2019
    i_attachment_subject = u2018My attachmentu2019 i_att_content_hex =
    binary_content.
    add Document to send request
    CALL METHOD send_request->set_document( Document ).
    DATA: send_request TYPE REF TO cl_bcs.
    DATA: text TYPE bcsy_text.
    data: binary_content1 type STANDARD table OF TBL1024 WITH HEADER LINE.
    data: binary_content type solix_tab.
    DATA: Document TYPE REF TO cl_document_bcs.
    DATA: sender TYPE REF TO cl_sapuser_bcs.
    DATA: recipient TYPE REF TO if_recipient_bcs.
    DATA: bcs_exception type ref to cx_bcs.
    data: sent_to_all type os_boolean.
    send_request = cl_bcs=>create_persistent( ).
    sender = cl_sapuser_bcs=>create( sy-uname ).
    CALL METHOD send_request->set_sender EXPORTING i_sender = sender.
    recipient =
    cl_cam_address_bcs=>create_internet_address( u2018 u2018 )
    CALL METHOD send_request->add_recipient
    EXPORTING i_recipient = recipient
    i_express = u2018Xu2019.
    CALL METHOD send_request->set_send_immediately( u2018Xu2019 ).
    CALL METHOD send_request->send( exporting i_with_error_screen = u2018Xu2019
    receiving result = sent_to_all ).
    COMMIT WORK.endform.
    <begging removed by moderator>
    Regards
    chitra
    Edited by: Thomas Zloch on Nov 15, 2011 1:02 PM

  • Html email - image won't load

    You guys are wonderful - when I've worked and worked on a problem and get to the "pulling out my hair" stage, I remember how helpful the forum has been to me . . .
    I have put Outlook 2007 on my computer now so I can easily test the quirks of email rendering in that email client.
    I'm attempting to test using slices for the nav bar (hopefully a work around for "wonderful" Outlook 2007) but can't get past an image that won't load. I recently combined three images and some text into one image because Outlook was floating the images and spacing them wrong.  The image that I'm referring to which now won't load is http://www.theshimogaproject.com/email/images/shimoga_pics_text.jpg
    The original design displays correctly in browsers:  http://www.theshimogaproject.com/email/riverrun-guests-email.html
    Here's the code for the html email as it stands now:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Pinebrook Vacation Rentals - The Shimoga Project</title>
    </head>
    <body style="background-color: #FFFFCC; border-color: #333300; text-decoration: none; font-size: 30px; font-family: Verdana, Geneva, sans-serif; color: #663300; margin-top: 0;">
    <table width="98%" border="0" cellpadding="0" cellspacing="0" id="Container">
      <tr>
           <td><table width="580" align="center" cellpadding="0" cellspacing="0" id="View In Browser">
             <tr>
                <td align="center" style="text-decoration: none; color: #663300; font-size: 11px;"><p>Having difficulty reading this email? <a href="http://www.theshimogaproject.com/email/riverrun-guests-email.html" target="_blank" style="text-decoration: none; color: #663300; font-size: 11px; font-weight: bold;">View it in your browser</a></p></td>
            </tr>
            </table>
       </tr>
       <tr>
         <td><table width="580" border="0" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td rowspan="3" style="text-align: left; font-size: 10px; "><img src="http://www.theshimogaproject.com/email/images/pinebrook-nav_01.jpg" alt="Pinebrook Vacation Rentals" width="229" height="139" align="top" /></td>
        <td colspan="4" ><img src="http://www.theshimgoproject.com/email/images/navArea_top_02.gif" width="351" height="95" align="top" /></td>
        </tr>
      <tr>
        <td><a href="http://www.pinebrookvacationrentals.com/index.html" target="_blank" style="text-decoration: none; color: #FFFFCC; font-size: 10px; "><img src="http://www.theshimogaproject.com/email/images/home.gif" width="57" height="14" alt="Home" /></a></td>
        <td><a href="http://www.pinebrookvacationrentals.com/rentals.html" target="_blank" style="text-decoration: none; color: #FFFFCC; font-size: 10px;"><img src="http://www.theshimogaproject.com/email/images/vacation_rentals.gif" width="120" height="14" alt="Vacation Rentals" /></a></td>
        <td><a href="http://www.pinebrookvacationrentals.com/aboutus.html" target="_blank"style="text-decoration: none; color: #FFFFCC; font-size: 10px;"><img src="http://www.theshimogaproject.com/email/images/about_us.gif" width="78" height="14" alt="About Us" /></a></td>
        <td><a href="http://www.pinebrookvacationrentals.com/contacttemp.html" target="_blank"style="text-decoration: none; color: #FFFFCC; font-size: 10px;"><img src="http://www.theshimogaproject.com/email/images/contact_us.gif" width="78" height="14" alt="Contact Us" /></a></td>
        </tr>
      <tr>
        <td colspan="4" align="top"><img src="http://www.theshimogaproject.com/email/images/navArea_bottom_09.gif" width="351" height="30" /></td>
        </tr>
    </table>  
      <tr>
       <td><table width="580" id="River Run" align="center" >
             <tr>
                <td width="580" style="text-align: left; font-size: 10px; "><img src="http://www.theshimogaproject.com/email/images/rr_pic_text.jpg" alt="Thank You for choosing River Run at Wild Basin" width="580" height="146" /></td>
            </tr>
             <tr valign="top">
               <td bgcolor="#663300" style="padding-left: 15px; padding-right: 15px; padding-bottom: 10px; padding-top: 10px; color: #FFC; font-size: 12px; text-align: center;"><strong>Did you know that your Colorado Vacation is helping a child in need?</strong><br />
                 <br />
    A portion of every rental fee at River Run has been donated toward  building a school for a group of impoverished children in a small, rural village in India. With your help, we have raised over $40,000 of the $103,000 needed to build this school.</td>
             </tr>
           </table>
      </tr>
      <tr>
        <td><table width="580" align="center" id="Shimoga" style="margin-top: 1px; text-align: left; font-size: 10px; ">
      <tr>
        <td><img src="http://www.theshimogaproject.com/email/images/shimoga_pics_text.jpg" alt="The Village Of Shimoga" align="top" /></td>
      </tr> 
         </table>
    </tr>
      <tr>
           <td><table width="580" align="center" cellpadding="0" cellspacing="0" bgcolor="#663300" style="margin-top: 1px;" id="Shimoga Project Link">
             <tr>
                <td align="center" style="padding-bottom: 5px; padding-top: 5px; text-decoration: none; color: #FFC; font-size: 13px;"><p>To learn more about this project:  <a href="http://www.theshimogaproject.com" target="_blank" style="text-decoration: none; color: #FFC; font-size: 13px; font-weight: bold;">---&gt; Click Here</a></p></td>
            </tr>
            </table>
       </tr>
           <tr>
              <td><table width="580" border="0" align="center" cellpadding="0" cellspacing="0" id="Footer">
                <tr>
                  <td align="center" style="padding: 8px; color: #663300; font-size: 11px; text-decoration: none;">
                    <p style="display:inline; padding-right: 15px;">The Shimoga Project</p>
                    <p style="display:inline;"> PO Box 193 </p>
                    <p style="display:inline; padding-right: 15px;"> Allenspark CO 80510 </p>
                    <p style="display:inline;">Phone: (303) 747-2594</p>
                    <br />
                    <p style="display:inline; padding-right: 20px;">Email:<a href="mailto:[email protected]?Subject=River Run Guest" target="_blank" style="text-decoration: none; color: #663300; font-size: 11px; font-weight: bold;"> [email protected]</a></p>
                    <p style="display:inline;"> Web Site: <a href="http://www.theshimogaproject.com" target="_blank" style="text-decoration: none; color: #663300; font-size: 11px; font-weight: bold;"> www.theshimogaproject.com</a></p>    </td>
            </tr>
            </table>
        </tr>
    </table>
    </body>
    </html>

    Thank you for the validator links.  I used them and cleaned up the
    code.  However it is still hanging up at the shimoga_pics_text.jpg
    image.  Any other ideas.  The size of the image is 43KB.  Would that
    have anything to do with it?
    Here's the code as it is now:
    Having difficulty reading this email? View it in your browser
    Did you know that your Colorado Vacation is helping a child in need?
    A portion of every rental fee at River Run has been donated toward building a school for a group of impoverished children in a small, rural village in India. With your help, we have raised over $40,000 of the $103,000 needed to build this school.
    To learn more about this project: ---> Click Here
    The Shimoga Project
    PO Box 193
    Allenspark CO 80510
    Phone: (303) 747-2594
    Email: [email protected]
    Web Site: www.theshimogaproject.com
    Thanks for your help,
    Sandy

  • How to insert a image file into oracle database

    hi all
    can anyone guide me how to insert a image file into oracle database now
    i have created table using
    create table imagestore(image blob);
    but when inserting i totally lost don't know what to do how to write query to insert image file

    Hi I don't have time to explain really, I did have to do this a while ago though so I will post a code snippet. This is using the commons file upload framework.
    Firstly you need a multi part form data (if you are using a web page). If you are not using a web page ignore this bit.
    out.println("<form name=\"imgFrm\" method=\"post\" enctype=\"multipart/form-data\" action=\"FileUploadServlet?thisPageAction=reloaded\" onSubmit=\"return submitForm();\"><input type=\"FILE\" name=\"imgSource\" size='60' class='smalltext' onKeyPress='return stopUserInput();' onKeyUp='stopUserInput();' onKeyDown='stopUserInput();' onMouseDown='noMouseDown(event);'>");
    out.println("   <input type='submit' name='submit' value='Submit' class='smalltext'>");
    out.println("</form>"); Import this once you have the jar file:
    import org.apache.commons.fileupload.*;Now a method I wrote to upload the file. I am not saying that this is correct, or its the best way to do this. I am just saying it works for me.
    private boolean uploadFile(HttpServletRequest request, HttpSession session) throws Exception {
            boolean result = true;
            String fileName = null;
            byte fileData[] = null;
            String fileUploadError = null;
            String imageType = "";
            String error = "";
            DiskFileUpload fb = new DiskFileUpload();
            List fileItems = fb.parseRequest(request);
            Iterator it = fileItems.iterator();
            while(it.hasNext()){
                FileItem fileItem = (FileItem)it.next();
                if (!fileItem.isFormField()) {
                    fileName = fileItem.getName();
                    fileData = fileItem.get();
                    // Get the imageType from the filename extension
                    if (fileName != null) {
                        int dotPos = fileName.indexOf('.');
                        if (dotPos >= 0 && dotPos != fileName.length()-1) {
                            imageType = fileName.substring(dotPos+1).toLowerCase();
                            if (imageType.equals("jpg")) {
                                imageType = "jpeg";
            String filePath = request.getParameter("FILE_PATH");
            session.setAttribute("filePath", filePath);
            session.setAttribute("fileData", fileData);
            session.setAttribute("fileName", fileName);
            session.setAttribute("imageType", imageType);
            return result;  
         } And now finally the method to actually write the file to the database:
    private int writeImageFile(byte[] fileData, String fileName, String imageType, String mode, Integer signatureIDIn, HttpServletRequest request) throws Exception {
            //If the previous code found a file that can be uploaded then
            //save it into the database via a pstmt
            String sql = "";
            UtilDBquery udbq = getUser(request).connectToDatabase();
            Connection con = null;
            int signatureID = 0;
            PreparedStatement pstmt = null;
            try {
                udbq.setUsePreparedStatements(true);
                con = udbq.getPooledConnection();
                con.setAutoCommit(false);
                if((!mode.equals("U")) || (mode.equals("U") && signatureIDIn == 0)) {
                    sql = "SELECT SEQ_SIGNATURE_ID.nextval FROM DUAL";
                    pstmt = con.prepareStatement(sql);
                    ResultSet rs = pstmt.executeQuery();
                    while(rs.next()) {
                       signatureID = rs.getInt(1);
                    if (fileName != null && imageType != null) {
                        sql = "INSERT INTO T_SIGNATURE (SIGNATURE_ID, SIGNATURE) values (?,?)";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setInt(1, signatureID);
                        pstmt.setBinaryStream(2, is2, (int)(fileData.length));
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
                if(mode.equals("U") && signatureIDIn != 0) {
                    signatureID = signatureIDIn.intValue();
                    if (fileName != null && imageType != null) {
                        sql = "UPDATE T_SIGNATURE SET SIGNATURE = ? WHERE SIGNATURE_ID = ?";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setBinaryStream(1, is2, (int)(fileData.length));
                        pstmt.setInt(2, signatureID);
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
            } catch (Exception e) {
                con = null;
                throw new Exception(e.toString());
            return signatureID;
       }

  • Audio stereo signal split into 3 or 4 stereo audio signals (in one single clip)?

    Hi,
    facing massice transcoding issues when exporting a project I had to analyse the involved video/audioclips...
    and found out that for some of the video clips the audio signals have been split into even 3 or 4 complementary stereo channels.
    Note: Each channel contains just a part of the original signal. This is obviously due to cutting action ...
    What can I do? I have no clue!
    My question:
    How to get one single stereo audio signal (2 channels) out of this mess?
    Thanx big time,
    Oliver

    Assuming we're talking about shorter takes and not a longer, spanned clip, I don't think what you want can be done in PP.  Nesting will always bring the audio over as one track.
    You may have to skim the clip sequence in the Program Monitor and copy/paste the portions you want to use into a second sequence for output.  This will preserve the audio.

  • Storing Uploaded Image Path into Mysql

    Hi I am developing a cms and am using the code David gives in his book PHP Solutions,  everything works fine but I can't work out how to extract the uploaded path so that it is stored in my table.
    Help would be really appreciated, I am making good progress in learning the php especially with David's books but am still struggling when it comes to having to customized the code.
    The code for the upload.php is as follows,
    <?php
    class Gp1_Upload{
      protected $_uploaded = array();
      protected $_destination;
      protected $_max = 51200;
      protected $_messages = array();
      protected $_permitted = array('image/gif',
                                    'image/jpeg',
                                    'image/pjpeg',
                                    'image/png');
      protected $_renamed = false;
      public function __construct($path) {
        if (!is_dir($path) || !is_writable($path)) {
          throw new Exception("$path must be a valid, writable directory.");
        $this->_destination = $path;
        $this->_uploaded = $_FILES;
      public function getuploadpath (){
      public function getMaxSize() {
        return number_format($this->_max/1024, 1) . 'kB';
      public function setMaxSize($num) {
        if (!is_numeric($num)) {
          throw new Exception("Maximum size must be a number.");
        $this->_max = (int) $num;
      public function move($overwrite = false) {
        $field = current($this->_uploaded);
        if (is_array($field['name'])) {
          foreach ($field['name'] as $number => $filename) {
            // process multiple upload
            $this->_renamed = false;
            $this->processFile($filename, $field['error'][$number], $field['size'][$number], $field['type'][$number], $field['tmp_name'][$number], $overwrite);   
        } else {
          $this->processFile($field['name'], $field['error'], $field['size'], $field['type'], $field['tmp_name'], $overwrite);
      public function getMessages() {
        return $this->_messages;
      protected function checkError($filename, $error) {
        switch ($error) {
          case 0:
            return true;
          case 1:
          case 2:
            $this->_messages[] = "$filename exceeds maximum size: " . $this->getMaxSize();
            return true;
          case 3:
            $this->_messages[] = "Error uploading $filename. Please try again.";
            return false;
          case 4:
            $this->_messages[] = 'No file selected.';
            return false;
          default:
            $this->_messages[] = "System error uploading $filename. Contact webmaster.";
            return false;
      protected function checkSize($filename, $size) {
        if ($size == 0) {
          return false;
        } elseif ($size > $this->_max) {
          $this->_messages[] = "$filename exceeds maximum size: " . $this->getMaxSize();
          return false;
        } else {
          return true;
      protected function checkType($filename, $type) {
        if (empty($type)) {
          return false;
        } elseif (!in_array($type, $this->_permitted)) {
          $this->_messages[] = "$filename is not a permitted type of file.";
          return false;
        } else {
          return true;
      public function addPermittedTypes($types) {
        $types = (array) $types;
        $this->isValidMime($types);
        $this->_permitted = array_merge($this->_permitted, $types);
      protected function isValidMime($types) {
        $alsoValid = array('image/tiff',
                           'application/pdf',
                           'text/plain',
                           'text/rtf');
          $valid = array_merge($this->_permitted, $alsoValid);
        foreach ($types as $type) {
          if (!in_array($type, $valid)) {
            throw new Exception("$type is not a permitted MIME type");
      protected function checkName($name, $overwrite) {
        $nospaces = str_replace(' ', '_', $name);
        if ($nospaces != $name) {
          $this->_renamed = true;
        if (!$overwrite) {
          $existing = scandir($this->_destination);
          if (in_array($nospaces, $existing)) {
            $dot = strrpos($nospaces, '.');
            if ($dot) {
              $base = substr($nospaces, 0, $dot);
              $extension = substr($nospaces, $dot);
            } else {
              $base = $nospaces;
              $extension = '';
            $i = 1;
            do {
              $nospaces = $base . '_' . $i++ . $extension;
            } while (in_array($nospaces, $existing));
            $this->_renamed = true;
        return $nospaces;
      protected function processFile($filename, $error, $size, $type, $tmp_name, $overwrite) {
        $OK = $this->checkError($filename, $error);
        if ($OK) {
          $sizeOK = $this->checkSize($filename, $size);
          $typeOK = $this->checkType($filename, $type);
          if ($sizeOK && $typeOK) {
            $name = $this->checkName($filename, $overwrite);
            $success = move_uploaded_file($tmp_name, $this->_destination . $name);
            if ($success) {
                $message = "$filename uploaded successfully";
                if ($this->_renamed) {
                  $message .= " and renamed $name";
                $this->_messages[] = $message;
            } else {
              $this->_messages[] = "Could not upload $filename";
    ?>
    The code for my form page is this
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <?php
    //THE FOLLOWING CODE IS FOR THE UPLOADING OF IMAGES AND FILES
    // set the max upload size in bytes
    $max = 51200;
    if (isset ($_POST ['submit']))
                //define the path to the upload folder
                $destination = 'uploads/';
                require_once('classes/Upload.php');
                try {
                    $upload = new Gp1_Upload($destination);
                    $upload->setMaxSize($max);
                    $upload->move();
                    $result = $upload->getMessages();
                } catch (Exception $e) {
                    echo $e->getMessage();
    // END OF UPLOADING OF IMAGES AND FILES
    ?>
    <form id="newvenue" action="" method="post" enctype="multipart/form-data" >
          <?php
               // THIS CODE DISPLAYS ERROR MESSAGES FOR THE FILE UPLOADS
              if (isset($result)){
              echo '<ul>';
              foreach ($result as $message){
                  echo "<li>$message</li>";
              echo '</ul>';
           ?>
      <table id="neweventdisplay" cellpadding="5"  border="0">
        <tr>
      <td></td>
      <td><input type="hidden" name="user_id"  value="" /></td>
      </tr>
      <tr>
      <td></td>
        <td>Organisers Name</td>
        <td><input class="input80px" id="org_name" name="org_name" type="text" /> </td>
      </tr>
      <tr>
      <td></td>
      <td><label for="image">Upload image:</label></td>
      <td><p>
    <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max; ?>" />
    <input type="file" name="image" id="image" />
    </p></td>
    </tr>
      <tr>
      <td></td>
      <td>Details about your upload</td>
      <td><input class="input80px" id="org_uploadcapt" name="org_uploadcapt" type="text"  /></td>
    </tr>
      <tr>
      <td></td>
      <td><input type="submit" name="submit" id="submit" value="upload"></td>
      </tr>
      <tr>
      <td class="heading"> </td>
      <td></td>
      </tr>
    </table>
    </form>
    <prep>
    <?php
    if (isset ($_POST ['submit'])){
        print_r($_FILES);}
        ?>
        </prep>
    </body>
    </html>

    Hi David
    Thank you very much for your help.  I had continued to work on the code and had worked out how to input the image path into the database but it was using the original filename, so when every it is changed it did not work.  The code in my page at that point was the following,
    <?php     // 2. NEW USER REGISTRATION<br />
            include_once ("includes/form_functions.inc.php");
            $max = 100000;
            $destination = 'uploads/';
            // START FORM PROCESSING FOR A NEW REGISTRATION
            if (isset($_POST['submit'])) { // Form has been submitted.
            $errors = array();
            // perform validations on the form data
            $required_fields = array('org_name');
            $errors = array_merge($errors, check_required_fields($required_fields, $_POST));    
            $required_numberfields = array('user_id');
            $errors = array_merge($errors, check_number_fields($required_numberfields, $_POST));
            $fields_with_lengths = array('org_name' => 36, 'org_website' => 100, 'org_contact' => 40,  'org_conemail' => 80, 'org_contel' => 30);
            $errors = array_merge($errors, check_max_field_lengths($fields_with_lengths, $_POST));
            /*Here I am using trim as well as ucwords, this function converts the first letter of each work into a capital letter,  I am using this only on the
            firstname and surname to ensure that the data is how I want it as it is going  into the database,  The better the data is preformated the better the data
            swill be within the database.*/
            $org_name = trim(strtolower(mysql_prep($_POST['org_name'])));
            $org_website = trim(strtolower(mysql_prep($_POST['org_website'])));
            $org_contact = trim(strtolower (mysql_prep($_POST['org_contact'])));
            $org_conemail = trim(strtolower (mysql_prep($_POST['org_conemail'])));
            $org_contel = strtolower (mysql_prep($_POST['org_contel']));
            $userid = $_POST['user_id'];
            $org_uploadcapt = $_POST['org_uploadcapt'];
            $image = $_FILES['image'];
            /*Here is the code that takes the variable captured from the input form and matches it  up with the appropriate field in the database.  An important point with insertion is that  the variables are in the same order as the mysql field names, there will be an error if the number of variables does not match the number of field names.  Note that there is no entry for the user id as this is an auto increment file within mysql and so is not needed to be entered*/
            if ( empty($errors) ) {
                $sql = "INSERT INTO organiser
                          (org_name, org_website, org_contact, org_conemail, org_contel, user_id, org_uploadurl, org_uploadcapt)
                          VALUES
                          ('{$org_name}', '{$org_website}', '{$org_contact}', '{$org_conemail}', '{$org_contel}', '{$userid}', '{$destination}".$image['name']."', '{$org_uploadcapt}' )";
                $result = mysql_query($sql, $connection);
                if ($result) {
                    $message = "The organiser was successfully created.<br />";
                } else {
                    $message = "I am sorry but the organiser could not be added.";
                    $message .= "<br />" . mysql_error();
                } else {
                    /* this counts the number of errors and informs the user of how many fields were
                    incorrectly entered*/
                if (count($errors) == 1) {
                    $message = "There was 1 error in the form.";
                } else {
                    $message = "There were " . count($errors) . " errors in the form.";
        } else { // Form has not been submitted.
            $org_name = "";
            $org_website = "";
            $org_contact = "";
            $org_conemail = "";
            $org_contel = "";
            $userid = "";
            $org_uploadcapt = "";
    //THE FOLLOWING CODE IS FOR THE UPLOADING OF IMAGES AND FILES
    // set the max upload size in bytes
    if (isset ($_POST ['submit']))
                //define the path to the upload folder
                // Use This On The Local Hosting Machine
                //$destination = 'C:/upload_test/';
                // Use This On The Live Server
                require_once('classes/Upload.php');
                try {
                    $upload = new Gp1_Upload($destination);
                    $upload->setMaxSize($max);
                    $upload->move();
                    $result = $upload->getMessages();
                } catch (Exception $e) {
                    echo $e->getMessage();
    // END OF UPLOADING OF IMAGES AND FILES
    ?>
    <title>Horse Events</title>
    <?php include_once("includes/meta.inc.php");?>
    <?php include_once("includes/cssfavgoogle.inc.php");?>
    <link href="css/adminpanel.css" rel="stylesheet" type="text/css" />
    <style>
    input[type="number"] {
        width:40px;
    </style>
    </head>
    <body>
    <div id="wrapper">
        <div id="admincontent">
    <form id="newvenue" action="neworganiser.php" method="post" enctype="multipart/form-data" >
          <?php if (!empty ($message)) {echo "<p class=\"message\">" . $message . "</p>";} ?>
          <?php if (!empty ($errors)) {display_errors($errors); } ?>
          <?php
              // THIS CODE DISPLAYS ERROR MESSAGES FOR THE FILE UPLOADS
              if (isset($result)){
              echo '<ul>';
              foreach ($result as $message){
                  echo "<li>$message</li>";
              echo '</ul>';
           ?>
    <br />
          <table id="neweventdisplay" cellpadding="5"  border="0">
        <tr>
      <td></td>
      <td><input type="hidden" name="user_id"  value="<?php echo $url_userid ['user_id']; ?>" /></td>
      </tr>
      <tr>
      <td> <span class="compuls">*</span></td>
        <td>Organisers Name</td>
        <td><input class="input80px" id="org_name" name="org_name" type="text" />
         </td>
      </tr>
          <tr>
          <td><span class="compuls">*</span></td>
        <td>Their Website</td>
        <td><input class="input80px" id="org_website" name="org_website" type="text" /></td>
      </tr>
        <tr>
        <td><span class="compuls">*</span></td>
        <td>Organisers Contact</td>
        <td><input id="org_contact" name="org_contact" type="text" />eg: Mrs Jean Kelly</td>
      </tr>
        <tr>
        <td><span class="compuls">*</span></td>
        <td>Contact Email</td>
        <td><input class="input80px" id="org_conemail" name="org_conemail" type="text" />
          </td>
      </tr>
        <tr>
        <td><span class="compuls">*</span></td>
      <td>Contact Tel No.</td>
      <td><input id="org_contel" name="org_contel" type="text" /></td>
      </tr>
      <tr>
      <td></td>
      <td><label for="image">Upload image:</label></td>
      <td><p>
    <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max; ?>" />
    <input type="file" name="image" id="image" />
    </p></td>
    </tr>
      <tr>
      <td></td>
      <td>Details about your upload</td>
      <td><input class="input80px" id="org_uploadcapt" name="org_uploadcapt" type="text"  /></td>
    </tr>
      <tr>
      <td></td>
      <td><input type="submit" name="submit" id="submit" value="Add Your Organiser"></td>
      </tr>
      <tr>
      <td class="heading"> </td>
      <td></td>
      </tr>
    </table>
    <a  class="delete" href="controlpanel.php">Cancel</a>
    </form>
        </div>
    I have added the code you kindly forwarded but am getting an error,  I am still trying to learn the basics of php and am unsure of what to do next, my php Upload.php now looks like
    <?php
    class Gp1_Upload{
      protected $_uploaded = array();
      protected $_destination;
      protected $_max = 100000;
      protected $_messages = array();
      protected $_permitted = array('image/gif',
                                    'image/jpeg',
                                    'image/pjpeg',
                                    'image/png');
      protected $_renamed = false;
      protected $_filenames = array();
      public function __construct($path) {
        if (!is_dir($path) || !is_writable($path)) {
          throw new Exception("$path must be a valid, writable directory.");
        $this->_destination = $path;
        $this->_uploaded = $_FILES;
      public function getMaxSize() {
        return number_format($this->_max/100000, 1) . 'kB';
      public function setMaxSize($num) {
        if (!is_numeric($num)) {
          throw new Exception("Maximum size must be a number.");
        $this->_max = (int) $num;
      public function move($overwrite = false) {
        $field = current($this->_uploaded);
        if (is_array($field['name'])) {
          foreach ($field['name'] as $number => $filename) {
            // process multiple upload
            $this->_renamed = false;
            $this->processFile($filename, $field['error'][$number], $field['size'][$number], $field['type'][$number], $field['tmp_name'][$number], $overwrite);   
        } else {
          $this->processFile($field['name'], $field['error'], $field['size'], $field['type'], $field['tmp_name'], $overwrite);
      public function getMessages() {
        return $this->_messages;
      protected function checkError($filename, $error) {
        switch ($error) {
          case 0:
            return true;
          case 1:
          case 2:
            $this->_messages[] = "$filename exceeds maximum size: " . $this->getMaxSize();
            return true;
          case 3:
            $this->_messages[] = "Error uploading $filename. Please try again.";
            return false;
          case 4:
            $this->_messages[] = 'No file selected.';
            return false;
          default:
            $this->_messages[] = "System error uploading $filename. Contact webmaster.";
            return false;
      protected function checkSize($filename, $size) {
        if ($size == 0) {
          return false;
        } elseif ($size > $this->_max) {
          $this->_messages[] = "$filename exceeds maximum size: " . $this->getMaxSize();
          return false;
        } else {
          return true;
      protected function checkType($filename, $type) {
        if (empty($type)) {
          return false;
        } elseif (!in_array($type, $this->_permitted)) {
          $this->_messages[] = "$filename is not a permitted type of file.";
          return false;
        } else {
          return true;
      public function addPermittedTypes($types) {
        $types = (array) $types;
        $this->isValidMime($types);
        $this->_permitted = array_merge($this->_permitted, $types);
      protected function isValidMime($types) {
        $alsoValid = array('image/tiff',
                           'application/pdf',
                           'text/plain',
                           'text/rtf');
          $valid = array_merge($this->_permitted, $alsoValid);
        foreach ($types as $type) {
          if (!in_array($type, $valid)) {
            throw new Exception("$type is not a permitted MIME type");
      protected function checkName($name, $overwrite) {
        $nospaces = str_replace(' ', '_', $name);
        if ($nospaces != $name) {
          $this->_renamed = true;
        if (!$overwrite) {
          $existing = scandir($this->_destination);
          if (in_array($nospaces, $existing)) {
            $dot = strrpos($nospaces, '.');
            if ($dot) {
              $base = substr($nospaces, 0, $dot);
              $extension = substr($nospaces, $dot);
            } else {
              $base = $nospaces;
              $extension = '';
            $i = 1;
            do {
              $nospaces = $base . '_' . $i++ . $extension;
            } while (in_array($nospaces, $existing));
            $this->_renamed = true;
        return $nospaces;
      protected function processFile($filename, $error, $size, $type, $tmp_name, $overwrite) {
        $OK = $this->checkError($filename, $error);
        if ($OK) {
          $sizeOK = $this->checkSize($filename, $size);
          $typeOK = $this->checkType($filename, $type);
          if ($sizeOK && $typeOK) {
            $name = $this->checkName($filename, $overwrite);
            $success = move_uploaded_file($tmp_name, $this->_destination . $name);
            if ($success) {
                $message = "$filename uploaded successfully";
                if ($this->_renamed) {
                  $message .= " and renamed $name";
                $this->_messages[] = $message;
            } else {
              $this->_messages[] = "Could not upload $filename";
      public getFilenames() {
        return $this->_filenames;
    ?>
    The error is Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE.   
    I have not worked with oop before and have only very briefly looked at the principle was on my foundation degree.

Maybe you are looking for