Ejemplo n.º 1
0
         $charset = "utf8";
         $source = "<A HREF='?engine=imdb&mid={$pid}'>IMDB</A> | <B CLASS='active'>MoviePilot</B>";
         if ($person->pilot_imdbfill) {
             $source .= '<SUP>+i</SUP>';
         }
         break;
     default:
         require "imdb_person.class.php";
         $person = new imdb_person($_GET["mid"]);
         $charset = "iso-8859-1";
         $source = "<B CLASS='active'>IMDB</B> | <A HREF='?engine=pilot&mid={$pid}'>MoviePilot</A>";
         break;
 }
 $person->setid($pid);
 echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n";
 echo "<HTML><HEAD>\n <TITLE>" . $person->name() . "</TITLE>\n";
 echo " <STYLE TYPE='text/css'>body,td,th { font-size:12px; font-family:sans-serif; }</STYLE>\n";
 echo "</HEAD>\n<BODY>\n<TABLE BORDER='1' ALIGN='center' STYLE='border-collapse:collapse'>";
 # Name
 echo '<TR><TH COLSPAN="3" STYLE="background-color:#ffb000">';
 echo $person->name();
 echo "<SPAN STYLE='float:right;text-align:right;display:inline !important;font-size:75%;'>Source: [{$source}]</SPAN>";
 echo "</TH></tr>\n";
 flush();
 # Photo
 echo '<TR><TD rowspan="28" valign="top">';
 if (($photo_url = $person->photo_localurl()) != FALSE) {
     echo '<div align="center"><img src="' . $photo_url . '" alt="Cover"></div>';
 } else {
     echo "No photo available";
 }
Ejemplo n.º 2
0
         $source = "<A HREF='?engine=imdb&mid={$pid}'>IMDB</A> | <B CLASS='active'>MoviePilot</B>";
         if ($person->get_pilot_imdbfill()) {
             $source .= '<SUP>+i</SUP>';
         }
         break;
     default:
         require "imdb_person.class.php";
         $person = new imdb_person($_GET["mid"]);
         $charset = "iso-8859-1";
         $source = "<B CLASS='active'>IMDB</B> | <A HREF='?engine=pilot&mid={$pid}'>MoviePilot</A>";
         break;
 }
 $person->setid($pid);
 echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>\n";
 echo "<HTML><HEAD>\n";
 echo " <TITLE>" . $person->name() . " [IMDBPHP2 v" . $person->version . " Demo]</TITLE>\n";
 echo " <STYLE TYPE='text/css'>body,td,th { font-size:12px; font-family:sans-serif; }</STYLE>\n";
 echo "</HEAD>\n<BODY>\n<TABLE BORDER='1' ALIGN='center' STYLE='border-collapse:collapse'>";
 # Name
 echo '<TR><TH COLSPAN="3" STYLE="background-color:#ffb000">';
 echo "[IMDBPHP2 v" . $person->version . " Demo] Details for " . $person->name();
 echo "<SPAN STYLE='float:right;text-align:right;display:inline !important;font-size:75%;'>Source: [{$source}]</SPAN>";
 echo "</TH></tr>\n";
 flush();
 # Photo
 echo '<TR><TD rowspan="28" valign="top">';
 if (($photo_url = $person->photo_localurl()) != FALSE) {
     echo '<div align="center"><img src="' . $photo_url . '" alt="Cover"></div>';
 } else {
     echo "No photo available";
 }
 foreach ($_POST as $key => $value) {
     if (strpos($key, $prefijo_nominacion_actor) === 0) {
         //Empieza por el prefijo de nominación de actores, es un actor nominado
         if ($value > 0) {
             //echo "<b>Actor:</b> ";
             //Si es positivo, el actor si está nominado, el valor es la categoría
             //y la parte final de la clave, el id del actor/actriz
             $id_actor = substr($key, strlen($prefijo_nominacion_actor));
             $sql = "INSERT INTO nominations(year,category_id,picture_id,nominee_id) VALUES(" . $year . "," . $value . ",'" . $id_imdb . "','" . $id_actor . "')";
             //echo $sql."<br>";
             $sqls[] = $sql;
             //Si el actor/actriz no existe, hay que crearlo
             if (!exists_person($bd, $id_actor)) {
                 $person = new imdb_person($id_actor);
                 $person->setid($id_actor);
                 $nuevo_profesional_nombre = $person->name();
                 $sqls[] = "INSERT INTO people(id,name) VALUES('" . $id_actor . "','" . $nuevo_profesional_nombre . "')";
             }
             $id_rol = get_role($bd, $value);
             if ($id_rol > 0) {
                 //La categoria tiene rol, hay que insertarlo
                 $sqls[] = "INSERT INTO person_picture(person_id,picture_id,role_id) VALUES(" . $id_actor . ",'" . $id_imdb . "'," . $id_rol . ")";
             }
         }
     }
 }
 foreach ($sqls as $i => $valor) {
     //echo $i.": ".$valor."<br>";
     $bd->exec($valor);
     $filas_afectadas++;
 }