Jump to content

double post - My movie section wont work


motleycrewl

Recommended Posts

I know this is a double post, I screwed up.  I'm in need of a wizards assistance once again. The problem I have is with the PHP script for the "movies / concerts / events" tabbed section on this website: http://universitycenters.ucsd.edu/new2/index.php .  Now right off the bat, I dont have access to the MYSQL tables so that's super inhibiting.  I have access to the CRUD pages where I can view, edit, and add new rows but I dont have the field names etc. like I would via phpMyAdmin or something.  Anyways, my problem is that I can't get the rollover function for the movie posters working (ie. rollover the name of a movie and its poster pops-up to the right) and I can't get the "Watch Trailer Now" button working: it simply takes me to the directory where all the trailers are but doesn't open the trailer I've selected.  I've tinkered with it a fair amount but most of this PHP is really beyond me and I need help from a master.

 

Below is the code from the include file for the movies section called 'mce-movies':

 

$result = mysql_query($sql);

$count = 0;

print "<div class='mce-data'>";

$poster_images = array();

$poster_video = array();

while ($row = mysql_fetch_array($result, MYSQL_NUM)) {

  if ($count % 2 == 1)

      print("\n<div class=\"odd\">");

  else

      print("\n<div class=\"even\">");

  if ($row[4] == "Movie"){

      $sql = "SELECT poster FROM movies WHERE id=" . $row[0];

      $result_movie = mysql_query($sql);

      $row_movie = mysql_fetch_array($result_movie, MYSQL_NUM);

      $poster_images[$count] = $posters_dir . $row_movie[0];

     

  }

  else{ //not a movie to and need to set image

      $poster_images[$count] = $categories_dir . $categories_imgs[$row[4]];

  }

 

 

  // Cut lengthy movie titles

  $movieTitle =  $row[3];

  $length = 30;

  $replacement = '…';

 

    if (strlen($movieTitle) > $length)

    {

        $output  = substr($movieTitle, 0, $length - 3);

        $output .= $replacement;

        $movieTitle = $output;

    }

    else

    {

        $movieTitle = $movieTitle;

    }

       

  print (" Monday $row[1]/$row[2]</div><div style='float:left;margin:0 5px 0 10px;'>6pm:</div> <div style=' float:left; width:150px; border:0px solid #F00;

  margin:0 0 0 5px;'><a href=\"#\" onmouseover=\"image_swap('$count') \"> $movieTitle [/url]</div>

 

");

  print("\n");

  $count++;

}

print "</div>";

?>

[/color]

 

And this is the code for the homepage part of the movie section:

 

<div class="movies">                           

          <h2>This Week's Movies</h2><?php include ("includes/mce-movies.php"); ?>

        <div class="poster"><img name="event_image" alt="movie poster" src="../events_beta/posters/<?php echo $row_movie[0] ?>" height="133" width="80" />

 

        <a href="../events_beta/movie_clips/<?php echo $row_movie[1] ?>">Watch the Trailer[/url]</div>

        <div style="clear:both;"></div>     

        </div>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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