Jump to content

emediastudios

Members
  • Posts

    418
  • Joined

  • Last visited

Posts posted by emediastudios

  1. I have this code that works great except for one thing.

    It doesnt load the large image on the top layer, thumbnails show on top.

     

    This is my CSS

    <style type="text/css"> 
    #imgmenu {position:relative; top:0px; left:0px; width: auto; background-color: #FFFFFF;  border:solid 1px #FFFFFF} 
    #imgmenu .p1 {display:block; width: auto; height: auto; text-decoration:none; background: #FFFFFF; top:0; left:0; border:0;} 
    #imgmenu .p1:hover {text-decoration:none; background-color: #FFFFFF; color:#000;} 
    #imgmenu .large {
    width:0;
    height:0;
    border:0;
    top:0;
    left:0;
    z-index: 601;
    visibility: visible;
    float:left;
    } 
    #imgmenu .p1:hover .large {display:block; position:absolute; top:-85px; left:50px; width: auto; height: auto; border:3px solid #FFFFFF;} 
    #info {z-index:500; height:22em;} 
    </style> 

     

    This is my thumnail code

    <td><div id="imgmenu"> 
    <a class="p1" href="#nogo" title="thumbnail image"><img src="/emma/photography/babies/Ralph3.jpg" alt="Thumbnail image" border="0" title="Thumbnail image" / ><img src="babies/big/Ralph3.jpg" alt="Enlarged view of image" name="info" class="large" id="info" title="Enlarged view of image" /></a> 
    </div> </td>

     

    I have tried using z index and it doesnt work ???

  2. I have a site built in PHP and it displays fine in IE, but on testing in FireFox i have a few issues.

    Mainly it is aligned left in FireFox and centered in IE, i want it centered in FireFox.

    Anyone help me.

     

    Heres the link

    www.worldmuaythaimedia.com

     

    Can this be done in CSS and inline?

    Which way best?

     

    Thanks everyone

  3. Hi everyone.

    This code worked fine and i havent changed it, bu tnow i get this error

     

    Fatal error: Call to undefined function htmlspecialchars_decode() in C:\Program Files\Apache Group\Apache2\htdocs\worldgym\penrith\display_resumes.php on line 18

     

    Is strange, this is the code, but like i said, it used to work but now it doesnt.

     

    <?php
    if($secret == "56"){
    $q = "SELECT * FROM resume WHERE email <> ''";
    $r = mysql_query($q) or die(mysql_error());
    $i = " class='td2'";
    if(mysql_num_rows($r) > 0)
    {
      while($result = mysql_fetch_array($r)){
        $content .= "<left><table width='300px' cellspacing='0' cellpadding='5'>";
         $content .= "<tr><td colspan=2 $i><a href='admin.php?p=delete&email=".$result[email]."'><left>Delete this Application</left></a></td></tr>";
        foreach($result as $key => $value){
         if(!is_int($key)){
          if($key == "file"){ 
           if(file_exists($value) === TRUE){
            $content .=  "<tr><td style='text-transform: capitalize;'".$i.">".$key . ":</td><td".$i."><a href='" . $value ."'>Download Resume</a></td></tr>";
           }
          }
          else if($key == "address" || $key == "history") $content .= "<tr><td colspan=2 style='text-align:left; text-transform: capitalize;'".$i.">".$key."</td></tr><tr><td colspan=2".$i.">".htmlspecialchars_decode($value)."</td></tr>";
          else $content .= "<tr><td style='text-transform: capitalize;'".$i.">".$key . ":</td><td".$i."> " . nl2br($value) ."</td></tr>";
          if($i == " class='td2'") $i = "";
          else $i = " class='td2'";
         }
        }
        $content .= "</table></left><br><br>";
      }
    } else $content .= "No one at the moment. <br /><a href=\"admin.php\">Click here to return to admin menu</a>";
    } else $content .= "You Must Be Logged In To Do That. <br /><a href=\"admin.php\">Click here to return to admin menu</a>";
    ?>
    

  4. I have this code a friend wrote for me.

     

    mysql_query("UPDATE resume SET file = '".$target_path."' WHERE email='".$_POST[email]."'");
    mail("mike@worldgymaustralia.com","New Application at your website", "Please go to your website to see the application");

     

    It works, but he forgot to add the sent from part of the script and it ends up in the spam box.

    Can someone please tell me how to add that into this script please.

  5. here you go

     

    $content .="<td><a href='" .$result[photo]. "' onclick=\"window.open(this.href); return false;\"><img src='".$result[photo]."' width='".$width_of_thumb."' height='".$height_of_thumb."'><br><left>".$result[title]."<br></left></a></td>";

    Your the man.

     

    :);):D;D

  6. How do i open the link in a new window, im hopeless. ???

       $content .="<td><a href='" .$result[photo]. "'><img src='".$result[photo]."' width='".$width_of_thumb."' height='".$height_of_thumb."'><br><left>".$result[title]."<br></left></a></td>";

  7. I just want the script that draws all my images from my gallery (sql database table name : gallery, 3 fields - ID, title and photo.

    and places them side by side with there $title below it,

    I want to build a scrolling gallery that i will place inside a div.

    when they click the image it will load in a new page.

     

    I have this in my admin section but want to edit it so i can use it in my public galley minus the delete option and login requirements.

     

    Heres the code i have now.

     

    <?php
    if($secret == "56"){
    $items_per_row = "3";
    $width_of_thumb = "100";
    $height_of_thumb ="100";
    $q = "SELECT * FROM gallery";
    $r = mysql_query($q) or die(mysql_error());
    if(mysql_num_rows($r) > 0)
    {
      $content .="<table style='width:100%; height: 100%;'>";
      while($result = mysql_fetch_array($r)){
       $ctr++;
       if($ctr == $items_per_row){ 
        $content .= "</tr><tr>";
        $ctr=1;
       }  
       $content .="<td><a href='" .$result[photo]. "'><img src='".$result[photo]."' width='".$width_of_thumb."' height='".$width_of_thumb."'><br><left>".$result[title]."<br><a href='admin.php?p=delete_image&id=".$result[iD]."'>Delete This Image</a></left></a></td>";
      
      }
    $content .="</table>";
    } 
    else $content .= "No Photos Uploaded Yet. <br /><a href=\"admin.php\">Click here to return to admin menu</a>";
    }
    else $content .= "You Must Be Logged In TO Do That. <br /><a href=\"admin.php\">Click here to return to admin menu</a>";
    ?>
    
    

     

    Even if i get a new code and dont use this one be ok.

     

  8. Can someone see an error here.

    I dont get one on screen but it doesnt work.

    <?php
    if($secret == "56"){
    $r = mysql_fetch_array(mysql_query("SELECT * FROM gallery WHERE ID='".$_GET[id]."'"));
    unlink($r[photo]);
    mysql_query("DELETE FROM gallery WHERE ID='".$_GET[id]."'");
    echo "<script>window.location = 'admin.php?p=admin_gallery';</script>";
    }
    else{
    $content .= "You Must Be Logged In To Do That";
    }?>

  9. Hi all.

    I have this code.

    I want to set the image size.

     

          $content .="<td><a href='".$result[photo]."'><img src='".$result[photo]."' width='".$width_of_thumb."px' width='".$height_of_thumb."px' ><br><center>".$result[title]."<br><a href='delete_image.php?id=".$result[iD]."'>Delete This Image</a></center></a></td>";
      }

     

     

     

  10. Hi all

    Just want a line break inbetween name, email etc... Tried putting the <br>

    everywhere and cant get it to work.

    So simple yet it troubles me. Heres the code.

    // prepare email body text
    $Body = "";
    $Body .= "Hi, My name is: ";
    $Body .= $First;
    $Body .= "\n";
    $Body .= "My email address is: ";
    $Body .= $email;
    $Body .= "\n";
    $Body .= "My Comments are : ";
    $Body .= $feedback;
    $Body .= "\n";
    $Body .= "I heard about u guys by -  : ";
    $Body .= $survey;
    $Body .= "\n";

  11. I have a script that uploads an image and inserts some info into my database, it works well on my home computer with apache but i get the error bellow on the net.

     

    Upload: gang2.jpg

    Type: image/pjpeg

    Size: 5.95927734375 Kb

     

    Warning: move_uploaded_file(../gallery/gang2.jpg): failed to open stream: Permission denied in /data/www/w00074/penrith/admin/process.php on line 26

     

    Warning: move_uploaded_file(): Unable to move '/var/tmp/phpjBrRZe' to '../gallery/gang2.jpg' in /data/www/w00074/penrith/admin/process.php on line 26

     

    Stored in: ../gallery/gang2.jpg

    Your file upload was successful, to upload another file click here, to view updated gallery click here.

     

    Line 26 of my code is marked below

     

    <?php require_once('../../Connections/worldgym.php');
    error_reporting(E_ALL);
    
    //This gets all the other information from the form 
    $photo=($_FILES['photo']['name']); 
    $title=$_POST['title']; 
    
    if ((($_FILES["photo"]["type"] == "image/gif")
    || ($_FILES["photo"]["type"] == "image/jpeg")
    || ($_FILES["photo"]["type"] == "image/jpg")
    || ($_FILES["photo"]["type"] == "image/pjpeg"))
    && ($_FILES["photo"]["size"] < 20000000))
      {
      if ($_FILES["photo"]["error"] > 0)
        {
        echo "Return Code: " . $_FILES["photo"]["error"] . "<br />";
        }
      else
        {
        echo "Upload: " . $_FILES["photo"]["name"] . "<br />";
        echo "Type: " . $_FILES["photo"]["type"] . "<br />";
        echo "Size: " . ($_FILES["photo"]["size"] / 10240) . " Kb<br />";
         
    
          move_uploaded_file($_FILES["photo"]["tmp_name"], --------------------------------Line 26
    
    
          "../gallery/" . $_FILES["photo"]["name"]);
          echo "Stored in: " . "../gallery/" . $_FILES["photo"]["name"]."<br />";
      
      //Writes the information to the database 
    
    $host="localhost"; // Host name 
        $username="******"; // Mysql username 
        $password="******;// Mysql password 	 
    $db_name="wgym"; // Database name 
        $tbl_name="gallery"; // Table name 
    mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
        mysql_select_db("$db_name")or die("cannot select DB");
    mysql_query("INSERT INTO `gallery` VALUES (NULL,'$photo','$title')") ; 
      echo "Your file upload was successful, to upload another file <a href='upload.php'>click here</a>, to view updated gallery <a href='../gallery.php'>click here.</a> ";
          }
        }
    
      
    else
      {
      echo "Invalid file";
      }
    ?>

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.