Image path in HTML output

Hi all,
I'm trying to deliver a BI report using the ftp device.
The report is delivered in HTML format correctly, but
when I try to open it, images that should display charts
are not visible.
Giving a look at the HTML code I've noticed that the image
source path is:
<img src="/xmlpserver/xdo/tmp/xdoimgZA4ql3v7Hz31567.gif">
which is not the correct path.
Is there a way to automatically set that path when the
report is delivered?
Thank you in advance,
Roberto

If you were to output the same report as PDF instead of HTML, I'm guessing the PDF file would contain the actual image. (Am I right anyone?) However, when you output as HTML, there is no way to embed an image in the HTML output.
HTML can only reference external images via URLs, so it appears from your output HTML code that BI Publisher creates a temporary GIF image and allows it to be referenced via that unique URL. Who knows how long that URL is valid?
After you FTP the output to another server, the <img src> reference is no longer valid, because the path in the src attribute is relative to the HTML file itself. The FTP'd report might show the image if you edit the HTML file so the src attribute includes the full URL to the image:
<img src="http://bi.publisher.host:port/xmlpserver/xdo/tmp/xdoimgZA4ql3v7Hz31567.gif"/>
But again, how long does BI Publisher cache the image, and how long until the login session times out so you can no longer access it anyway? Note that you would have to use the same browser session to view the FTP'd report as was used to run the report in the first place. In other words, run the BIP report initially using a browser on the host that is the FTP destination for the report. Then edit the <img> tag, and finally open the HTML file in the same browser.
A note to other readers: Images in RTF templates are often used as mere placeholders for charts created when the report is run. It is the "Alternate Text" assigned to the dummy image that tells the XSL-FO processor how to replace the image with a chart displaying the report output data.
To solve this problem in a more supportable way, please see this Tim Dexter blog entry:
http://blogs.oracle.com/xmlpublisher/2006/10/31/
Edited by: Multiverse on Aug 15, 2009 7:59 PM (added Tim Dexter blog reference)

Similar Messages

  • Image sizing for HTML output

    Hi,
    ias904
    the user help About Images states:
    "The size of the object that contains the URL defines the size of the image in the HTML output.   Any elasticity properties applied to the object are ignored."
    I've got an item of type Image URL and I'm unable to get images to display using their original size definition - Reports always apply its own sizing - resulting images are skewed
    Is this a feature or can any properties be set to fix this??
    Thanks
    Pete

    Hi Pete,
    I've got an item of type Image URL If the image is present on the local file system, then if you choose Vertical and Horizontal elasticity as variable, the images are automatically sized to their correct size. In this case, the Reports Server has access to the images while formatting the report, so it can leave appropriate width and height for the image.
    However, in case the image is a web URL, then Reports Server (while formatting the report) does not get access to the actual images. So it does not know how much exact width and height should be left. So the only way out in this case is that you design the Image URL object according to the final size of the image. It means that at design time, you will have to manually compare the size of the object with the image, and resize the object accordingly.
    Navneet.

  • Image not displayed in html output used webservice to store in a location

    hi
    we have used webservices to store the pdf and html outputs but the problem is when we are seeing the preview in the bi publisher we can see the image in pdf and html but when we run through webservices and see the output files that are stored in some location image in the html output is not displayed but in the pdf we can see the image.
    i have used the direct insertion image option in the header section. is the problem because i have used the direct insertion.
    can you give the idea how to import logo from an external location so that we can check the if it is problem with direct insertion or problem with the webservice as we are storing the output files outside the catlog but it may not be wrong because in pdf we can see the image.
    I am not having any idea how to solve thsi issue..
    Sorry to bother you with these many questions
    Thanks in Advance
    Have a Nice day.

    Please state which BI Publisher version you are using.
    In case it is 10g then please always test the application with the latest patch first!.
    BTW today there is been a new patch 11846804 released for 10.1.3.4.1 (March 2011).
    regards
    Jorge

  • Can I link to images using absolute paths in HTML Help and still see them locally?

    I'm publishing HTML help pages to a Web server.  All .htm files on the Web server are in their own folder, and all image files are in a separate folder.  Links to images are generally of the form <img src="/images/clear.png" height="14" width="8">.  That is, the images use an absolute path reference from the doc root folder (rather than relative path from the current file folder, such as "../images/myImg.png").
    I can modify the HTML for the images to follow this convention, but then I cannot see the images locally within RoboHelp, but must instead wait until the files are integrated with the Web server.  Is there a way to set up a RoboHelp project so that I can force an image path of "/images" both locally and in the HTML?
    Using RoboHelp 9.0.1.232.
    Thanks.

    RoboHelp expects the images to be within the project and will need that if you are to see them when working. It then uploads them to the server when you publish.  There is a check box when you publish so that only updated files get  uploaded.
    You could point Resource Manager to the server folder with the images and then link to those images. What happens then is the image gets downloaded into your project so that you see it when working. If the server image changes you will see the icon in Project Manager changes so that you can update the local copy. It would be a one-off exercise changing your workflow.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Image path not storing in sql database

    Hello,
    I have read here on the forum how to upload an image to server and store path in  your database, the image uploads correctly to the correct folder on my server but the image path does not get stored on my sql database (not local hosting). I receive the error: The file has been uploaded, and your information has been added to the directory. Column 'image' cannot be null.
    My database has the following columns:
    id
    datum
    image
    sectie
    My code is as follows:
    <?php require_once('Connections/dbTroch.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    mysql_select_db($database_dbTroch, $dbTroch);
    $query_rs_aanbod = "SELECT * FROM tblSlideshow ORDER BY id ASC";
    $rs_aanbod = mysql_query($query_rs_aanbod, $dbTroch) or die(mysql_error());
    $row_rs_aanbod = mysql_fetch_assoc($rs_aanbod);
    $totalRows_rs_aanbod = mysql_num_rows($rs_aanbod);
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    $target = "images/slides/";  //This is the directory where images will be saved// 
    $target = $target . basename( $_FILES['image']['name']); //change the image and name to whatever your database fields are called//
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "add-photos-aanbod")) {
      $insertSQL = sprintf("INSERT INTO tblSlideshow (image, sectie) VALUES (%s, %s)",
                           GetSQLValueString($_POST['file'], "text"),
                           GetSQLValueString($_FILES['image']['name'], "text"));
    //This code writes the photo to the server//
    if(move_uploaded_file($_FILES['image']['tmp_name'], $target))
    //And confirms it has worked//
    echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory";
    else {
    //Gives error if not correct//
    echo "Sorry, there was a problem uploading your file.";
      mysql_select_db($database_dbTroch, $dbTroch);
      $Result1 = mysql_query($insertSQL, $dbTroch) or die(mysql_error());
    ?>
    <!doctype html>
    <html>
    <meta charset="utf-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Troch Project Solutions - Admin - Toevoegen</title>
      <link rel="stylesheet" href="css/foundation.css" />
      <link rel="stylesheet" href="css/layout.css" />
      <!-- Fonts
      ================================================== -->
      <script type="text/javascript" src="//use.typekit.net/vob8gxg.js"></script>
      <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
      <!-- jQuery
      ================================================== -->
      <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
      <script src="js/vendor/modernizr.js"></script>
    </head>
    <body>
        <div class="row">
          <div class="large-8 medium-8 small-8 large-centered medium-centered small-centered columns intro">
              <h2 class="subheader text-center">Admin</h2>
              <p><a>Log uit</a></p>
              <p><a href="admin.php">Terug naar Admin menu</a>
              <h4>image toevoegen naar aanbod slideshows:</h4>
              <form action="<?php echo $row_rs_aanbod['']; ?>" method="POST" name="add-photos-aanbod" id="add-photos-aanbod" enctype="multipart/form-data">
              <table>
                    <tbody>
                         <tr>
                              <td><label for="image">Kies foto:</label></td>
                              <td><input name="image" type="file" id="image" value="<?php echo $row_rs_aanbod['image']; ?>" /></td>
                        <tr>
                              <td>Sectie:</td>
                              <td><select name="sectie" id="sectie" option value="sectie">
                                <?php
    do { 
    ?>
                                <option value="<?php echo $row_rs_aanbod['sectie']?>"><?php echo $row_rs_aanbod['sectie']?></option>
                                <?php
    } while ($row_rs_aanbod = mysql_fetch_assoc($rs_aanbod));
      $rows = mysql_num_rows($rs_aanbod);
      if($rows > 0) {
          mysql_data_seek($rs_aanbod, 0);
          $row_rs_aanbod = mysql_fetch_assoc($rs_aanbod);
    ?>
                              </select></td> 
                        </tr>
                        <tr>
                            <td><input type="Submit" name="Add" id="add" value="Toevoegen" /></td>
                        </tr>
                </tbody>
            </table>
            <input type="hidden" name="MM_insert" value="add-photos-aanbod" />
        </form>
          </div><!-- end large-8 -->
        </div><!-- end row -->
    <script src="js/vendor/jquery.js"></script>
    <script src="/js/vendor/fastclick.js"></script>
    <script src="js/foundation.min.js"></script>
    <script>
                $(document).foundation();
            </script>
    </body>
    </html>
    <?php
    mysql_free_result($rs_aanbod);
    ?>
    I cannot work out what is wrong and I would appreciate any help on this. Thanks

    Your form field and array variable names do not match
    <td><input name="image" type="file" id="image" value="<?php echo $row_rs_aanbod['image']; ?>" /></td>
    GetSQLValueString($_POST['file'], "text"),

  • HTML output and missing graph

    I am developing a report having a graph in BI Publisher 10.1.3.3.0. When the report o/p is genereated to PDF, the graph is showing up, but the same report doesnt return the chart in HTML output (it shows small icon in the place of graph). I followed Tim Dexter's blog http://blogs.oracle.com/xmlpublisher/2006/10/31 here. But, I didnt understand where i need to make the settings for 'Base image URI' and 'Image file directory' .
    In the Runtime configuration properties for this report, under HTML output, I see the foll.
    -show header
    -show footer
    -replace smart quotes
    -character set
    -make HTML output accessible
    -user percentage width for table columns.
    I even tried the o/p in excel and rtf but, the graph is missing in the o/p as well.
    Thanks in advance

    Can someone help me how to get the graph in HTML?

  • 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.

  • Dynamic images in reports -- PDF output

    In Reports uilder I can link an image object to a URL as described in the product help. This works well with an HTML output but in PDF only the image URL appears.
    How could I solve this problem?
    Thank you.

    Hi,
    The URL method of including images in valid only for HTML output.
    The Reports Builder Help on "Images says that:
    You can add an image to a report by:
    - selecting a column in the database that contains images
    - importing the image from a file into the report layout
    - linking an image object to a file
    - for HTML output, selecting a column in the database that contains URL links to images or linking an image object to a URL
    If you reference a URL for an image, the image is displayed when you format your report for HTML output. For other output formats, the URL text displays in the Paper Design view
    The reason for this is that Oracle Reports will only write the URL in the output. In case of HTML output, the browser can understand the URL, so it will fetch the image from the URL and show it. But this cannot be done by Acrobat Reader.
    For PDF output you will have to use one of the other methods of inserting an image.
    Navneet.

  • CQ inserting divs into HTML output?

    Hey y'all,
    I'm working on a project using CQ5.5 and am noticing a bizarre result in the HTML that I am getting from my templates. I'm noticing divs inserted that appear nowhere in my jsp files that I can only assume are being put there by CQ (because the naming convention "cq-gen#" appears). Example below (textandheading is the name of a custom component I created):
    <div id="cq-gen7" class="textandheading text parbase textheading cq-element-textheading">
    This wouldn't be a problem except that some of these divs are overriding the styles from the CSS I'm using and causing my text/images etc to display incorrectly. Has anyone experienced anything like this before? It's inserting a whole bunch of divs like the one I pasted in above all over the place. I would like to find a way of removing these divs from my HTML output.
    Thanks in advance for your help!

    Please try the suggestions mentioned in http://forums.adobe.com/message/4294983
    Jörg

  • Stop desktop's title from getting rendered in the final HTML output

    Is there a way to stop the desktop's title value from being rendered and displayed in the HTML source of the page? I don't want to use a backing file to achieve this -- looking for a simple easy configuration to remove all the desktop property definitions from getting rendered to the final HTML output.
    Specifically trying to remove the title:
    <title >Microsite Desktop</title>
    <meta name="bea-portal-meta-skeleton" content="/framework/skeletons/testmicrositeskel"/>
    <meta name="bea-portal-meta-skin" content="/framework/skins/testcardsskin"/>
    <meta name="bea-portal-meta-skin-images" content="/framework/skins/testcardsskin/images"/>
    Edited by sjayas01 at 12/18/2007 8:38 AM

    Try this function.
    data: label type string.
    CALL FUNCTION 'DDIF_FIELDLABEL_GET'
      EXPORTING
        tabname              = 'MARA'
        FIELDNAME            = 'MATNR'
    *   LANGU                = SY-LANGU
    *   LFIELDNAME           = ' '
      IMPORTING
        LABEL                = label.
    Regards,
    Rich Heilman

  • Adding HTML output TO J3D

    Hi all;
    i want to show HTML page on a java 3D object say a on a face of a Cube or Sphere.
    plz suggest something..
    Thanks in advance!!

    Hi Shendi,
    Probable solution for doing this is as
    1> Try to capture HTML output
    2> Write the captured HTML output to the Buffered Image
    3> Use that buffered image for displaying it on Java 3D/2D Object.
    Hope this will work. Only thing is that the HTML page will not interact like in web browser, because 3D/2D deals with images.
    Regards

  • Page based on template don't update image path

    When I create a new page beased on a template in the
    templates folder some of the image paths don't update.
    A div in the template has the following style code
    "background-image: url(../images/leftframe.png);
    background-repeat:repeat-y".
    When the new page is created, and before it is saved in the
    correct folder the code turns to: "background-image:
    url(file:///MYDISK/CLIENTFOLDER/client_webpages/images/leftframe.png);
    background-repeat:repeat-y".
    This is perfect, because the new page still don't know its
    correct path. But in CS3, and earlier versions of Deamweaver the
    path was updated when the new page was saved. That does not happen
    in CS4.
    Linked css files and other image and file paths are updated
    as it should, but this div style is not.
    I know the work arounds; move the div style code to the css
    file, open the html page in an other html editor correct it and
    paste it back...
    I don't want to spend time changing my templates or perform
    work arounds when it is obvious that there is a bug in CS4.
    Others with the same experience or a way to solve the
    problem? Or should I send Adobe a bug report?
    Stavanger

    > I know the work arounds; move the div style code to the
    css file, open the
    > html page in an other html editor correct it and paste
    it back...
    Here's a better one - make the link root relative rather than
    document
    relative.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Mr. Stavanger" <[email protected]> wrote in
    message
    news:gmu4dv$i4q$[email protected]..
    > When I create a new page beased on a template in the
    templates folder some
    > of
    > the image paths don't update.
    > A div in the template has the following style code
    "background-image:
    > url(../images/leftframe.png);
    background-repeat:repeat-y".
    >
    > When the new page is created, and before it is saved in
    the correct folder
    > the
    > code turns to: "background-image:
    >
    url(file:///MYDISK/CLIENTFOLDER/client_webpages/images/leftframe.png);
    > background-repeat:repeat-y".
    >
    > This is perfect, because the new page still don't know
    its correct path.
    > But
    > in CS3, and earlier versions of Deamweaver the path was
    updated when the
    > new
    > page was saved. That does not happen in CS4.
    >
    > Linked css files and other image and file paths are
    updated as it should,
    > but
    > this div style is not.
    >
    > I know the work arounds; move the div style code to the
    css file, open the
    > html page in an other html editor correct it and paste
    it back...
    >
    > I don't want to spend time changing my templates or
    perform work arounds
    > when
    > it is obvious that there is a bug in CS4.
    >
    > Others with the same experience or a way to solve the
    problem? Or should I
    > send Adobe a bug report?
    >
    > Stavanger
    >

  • How to i add an image path with spry data set

    hi
    how to i add an image path with spry data set. I made a xml file and then created a data set in html but image won't load
    this is my XML
    <?xml version="1.0" encoding="UTF-8"?>
    <banner width = "185" height = "400">
        <item>
            <image scr = "nui-panforte-recipe_01.jpg" ></image>
            <description>CHOC-COCONUT PANFORTE</description>      
            <text1>Try this delicious GLUTEN FREE Christmas treat</text1>
            <text2>CHOC-COCONUT PANFORTE</text2>
        </item>
    </banner>
    this is my HTML
    <!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" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="../../SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="../../SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.XMLDataSet("recipe_banner.xml", "banner/item");
    //-->
    </script>
    </head>
    <body>
    <div spry:region="ds1">
      <table>
        <tr spry:repeat="ds1">
          <td>{image}</td>
          <td>{description}</td>
          <td>{text1}</td>
          <td>{text2}</td>
          <td>{text3}</td>
          <td>{text4}</td>
          <td>{link}</td>
          <td>{url}</td>
          <td>{target}</td>
        </tr>
      </table>
    </div>
    </body>
    </html>

    It would be helpfull if you actually created an <img> tag to start with
    <img src="{image/@src}" />
    would work.

  • How to embed image tag in HTML Editor Standard

    Hi all,
    I am using HTML editor standard in my application. I have placed a custom image to show on header region in custom folder. Now i want to give a image tag in HTML editor with a source to this file path. Now when i press save button, then the complete HTML with the image tag should be saved in the custom table.
    Can anyone help me in this regard?,
    With Regards,
    Sunil Bhatia

    Hi Ajantha,
    You can do the same as well in css..as  below..see sampl styles applied for Tab control...
    Tab.modifyTab
    selectedDownSkin: Embed(source="../images/tab_first.png"); 
    selectedOverSkin: Embed(source="../images/tab_first.png"); 
    selectedUpSkin: Embed(source="../images/tab_first.png"); 
    overSkin: Embed(source="../images/tab_first.png"); 
    upSkin: Embed(source="../images/tab_first.png");}
    I suggest you to use Button control instead of Image control .... so that you have more control as you need a click functionality ...
    So you can use the same to serve your purpose..
    <mx:Button id="btnSave" styleName="saveIcon" buttonMode="true" toolTip="Save comments"
                click="doSave();" />
    and your css is as shown below:
    .saveIcon{
     upSkin:Embed(source="/assets/icons/save_it_icon.png"); 
    upSkin:Embed(source="/assets/icons/save_it_icon.png");  
    overSkin:Embed(source="/assets/icons/save_it_icon.png"); 
    downSkin:Embed(source="/assets/icons/save_it_icon.png"); 
    disabledSkin:Embed(source="/assets/icons/save_it_icon.png");}
    You can use different images for different states of the Button..
    If this post answers your question or helps, please mark it as such.
    Thanks,
    Bhasker Chari

  • Rendering HTML output on Java 2D/3D Objects

    Hi all, I want to read an HTML file and render an HTML output to the objects in Java 2D or Java 3D world.
    For doing this, I am following the steps as
    1> Read HTML file
    2> Capture its output
    3> Write captured output to the buffered image.
    4> Use that buffered image to be shown on Java 2D/3D object as a texture.
    How can I capture the HTML output?
    If you have any other way, please suggest me.
    Regards

    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Image;
    import java.awt.image.BufferedImage;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.swing.JEditorPane;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class captureHTML extends JPanel{
        public BufferedImage bufferedImage ;
        public Image image, capturedImage ;
        public Graphics2D g2d;
        public captureHTML() {
            capturedImage = capture("http://www.google.com");
            bufferedImage = new BufferedImage(1000,700,BufferedImage.TYPE_INT_RGB);
            g2d = bufferedImage.createGraphics();
            g2d.drawImage(capturedImage,0,0,this);
            image = bufferedImage.getScaledInstance
                        ((int)(-1),
                        (int)(-1), 
                        Image.SCALE_SMOOTH) ;
        public Image capture(String str)
            URL url;
            JEditorPane jep = null;
            try {
                url = new URL(str);
                try {
                    jep = new JEditorPane(url);
                    jep.setContentType("text/html");
                    jep.setPage(url);
                } catch (IOException ex) {
                    ex.printStackTrace();
            } catch (MalformedURLException ex) {
                ex.printStackTrace();
            Image jepImage = jep.createImage(500,500);
            return jepImage;
        public void paint(Graphics g)
                System.out.println("paint called");
                if (getSize().width <= 0 || getSize().height <= 0)
                    return;
                Graphics2D g2 = (Graphics2D) g;
                if (image != null && isShowing()) 
                    g2.drawImage(image, 0, 0, this);
        public static void main(String args[])
            JFrame f = new JFrame();
            int w = 1000;
            int h = 700;
            f.setSize(w, h);
            f.getContentPane().setSize(w, h);
            f.getContentPane().add(new captureHTML());
            f.setDefaultCloseOperation(1);
            f.setVisible(true);
    }I Implemented the code as db suggested, I think it will work. But at the moment without any error I am getting only blank black screen. Please have a look at capture( ) method. I think there is a problem in this method but I cant figure out whats going wrong.
    Regards

Maybe you are looking for

  • How much is my ipad 2 with Att 3g worth?

    How much is my IPad ll worth with ATT 3G?

  • Passing parameters to RFC iview

    Hi Can anyone let me know how to pass parameters to RFC iview ? i want to pass the parameter through URL to the RFC iview (funtion_params_name1) thanks

  • Premiere Pro CS6 Error Message Codec Missing or unavailable?

    I know there is already a thread about this... but I couldn't figure out how to add to that thread. I have been googling for like 2 hours and get this figured out! Sorry if this is a silly question, I am very new! A videographer sent my company a har

  • Flex 10 and VGA Projector

    I have just bought a Flex 10 being assured that I can use it to drive a projector through a Belkin HDMI to VGA Projector Adapter.  It works OK with a VGA computer monitor connected via extended desktop, however it just refuses to work when connected

  • Printing causes crash

    I've just connectede an Epson photo 14000 onto my Mac (Leopard 10.5.8). Everytime i try to print an image using Photoshop CS2, Photoshop quits. Prints ok from PDF with Acrobat. any ideas? Thanks BB