示例#1
0
			<tbody>
				<?php 
    if ($q) {
        while ($alert = mysqli_fetch_assoc($q)) {
            $movie = mysqli_fetch_assoc($mysqli->query("SELECT title, year FROM movies WHERE id=" . $alert['id']));
            ?>
						<tr class="mov-alert" id="a<?php 
            echo $alert['id'];
            ?>
">
							<td><i data-toggle="tooltip" data-placement="top" title="Remove alert" id="del-alert-<?php 
            echo $alert['id'];
            ?>
" class="fa fa-times-circle"></i></td>
							<td><?php 
            echo "<a href='movie/" . $alert['id'] . "/" . rewriteUrl($movie['title']) . "'>" . $movie['title'] . "</a> (" . $movie['year'] . ")";
            ?>
</td>
							<td><div class="form-group"><input type="checkbox" name="any"<?php 
            if ($alert['any'] == 1) {
                echo ' checked';
            }
            ?>
></div></td>
							<td><div class="form-group"><input type="checkbox" name="itunes"<?php 
            if ($alert['itunes'] == 1) {
                echo ' checked';
            }
            ?>
></div></td>
							<td><div class="form-group"><input type="checkbox" name="amazon"<?php 
示例#2
0
<?php

require_once '../includes/mysqli_connect.php';
require_once '../includes/functions.php';
$id = $_POST['id'];
$relatedMovies = array();
$query = "SELECT a.id, a.name, a.photo, r.character FROM roles r INNER JOIN actors a ON a.id = r.actor_id AND r.movie_id = {$id} ORDER BY r.star DESC";
$response = "";
if ($r = $mysqli->query($query)) {
    if ($director = mysqli_fetch_assoc($mysqli->query("SELECT a.photo, a.name, a.id FROM actors a INNER JOIN movies m on m.director = a.id WHERE m.id = {$id}"))) {
        $response .= "\n    <div class='complete-cast-director'>\n      <h4>Director</h4>\n      <img src='" . (strlen($director['photo']) > 0 ? "http://image.tmdb.org/t/p/w92{$director['photo']}" : "images/no_image_found.png") . "'>\n      <div class='cast-entry-names' style='margin-left:60px'>\n        <a class='actorLink' data-hovercard='{$director['id']}' href='actor/{$director['id']}/" . rewriteUrl($director['name']) . "'>\n          <b>" . $director['name'] . "</b>\n        </a>\n      </div>\n    </div>";
    }
    $response .= "<h4>Cast</h4>";
    while ($actor = mysqli_fetch_assoc($r)) {
        $response .= "\n    <div class='complete-cast-entry'>\n      <img src='" . (strlen($actor['photo']) > 0 ? "http://image.tmdb.org/t/p/w92{$actor['photo']}" : "images/no_image_found.png") . "'>\n      <div class='cast-entry-names'>\n        <a class='actorLink' data-hovercard='{$actor['id']}' href='actor/{$actor['id']}/" . rewriteUrl($actor['name']) . "'>\n          <b>" . $actor['name'] . "</b>\n        </a><br><span class='char-indent'>" . stripslashes($actor['character']) . "</span>\n      </div>\n    </div>";
    }
}
echo strlen($response) > 0 ? $response : "Sorry, we don't have the cast for this movie.";
示例#3
0
        echo '</div>
					 				</div>
					 				<div class="mov-caption">
					 					<a href="movie/' . $movUrl . '">' . $movThumb['title'] . '</a> <span class="year">' . $movThumb['year'] . '</span>
					 				</div>
					 			</div>';
    }
}
?>
			  	</div>
			  	<div role="tabpanel" class="tab-pane fade" id="pop-crackle">
				  	<?php 
$crackleQuery = "SELECT movies.id, movies.title, movies.year, movies.img_link, crackle.link \n\t\t\t\t  \t\t\t\t\tFROM movies \n\t\t\t\t  \t\t\t\t\tJOIN popular \n\t\t\t\t  \t\t\t\t\tON movies.id = popular.id \n\t\t\t\t  \t\t\t\t\tJOIN crackle\n\t\t\t\t  \t\t\t\t\tON popular.id = crackle.id\n\t\t\t\t  \t\t\t\t\tAND popular.type = 'crackle'\n\t\t\t\t  \t\t\t\t\tLIMIT 18";
if ($crackle1 = $mysqli->query($crackleQuery)) {
    while ($movThumb = mysqli_fetch_assoc($crackle1)) {
        $movUrl = $movThumb['id'] . "/" . rewriteUrl($movThumb['title']);
        echo '<div class="related-mov pop-movie">
					 				<img alt="' . $movThumb['title'] . '" src="' . (strlen($movThumb['img_link']) > 0 ? 'http://image.tmdb.org/t/p/w92' . $movThumb['img_link'] : 'images/no_image_found.png') . '">
					 				<div class="legend">
					 					<div class="legend-inner">
					 						<i class="fa fa-external-link"></i> <a target="_blank" href="' . $movThumb['link'] . '">Crackle</a><br>Free (with ads)
					 					</div>
					 				</div>
					 				<div class="mov-caption">
					 					<a href="movie/' . $movUrl . '">' . $movThumb['title'] . '</a> <span class="year">' . $movThumb['year'] . '</span>
					 				</div>
					 			</div>';
    }
}
?>
			  	</div>
	</div> <!-- .mov-info -->
	<div class="mobile-mov-info reveal">
		<div class="about">
			<p><?php 
echo parse_bio($about, $name);
?>
</p>
		</div>
		<div class="starring reveal">
		<?php 
if ($knownForMovies > 0) {
    ?>
			<b>Known for</b>: 
			<?php 
    foreach ($knownForMovies as $key => $movie) {
        echo '<b><a href="movie/' . $movie['id'] . '/' . rewriteUrl($movie['title']) . '">' . $movie['title'] . '</a></b> (' . $movie['year'] . ')' . ($key == min(4, $movieCount) - 1 ? "." : ", ");
    }
}
?>
		</div>
	</div>
	<div style="clear: both"></div>
</div>

<?php 
function parse_bio($string, $name)
{
    if ($pos = strpos($string, 'Description above from')) {
        $string = substr($string, 0, $pos);
    }
    $string = str_replace('From Wikipedia, the free encyclopedia. ', '', $string);
示例#5
0
				</span>
			</div>
			<div class="ellipsis">
				<div>
					<?php 
echo stripslashes(fix_aps($params['synopsis']));
?>
				</div>
			</div>

		<?php 
$numActors = sizeof($cast);
echo "<div class='cast-short'>\n\t\t\t\t<div class='cast-actors'>";
for ($j = 0; $j < min(3, $numActors); $j++) {
    if ($cast[$j]['name'] !== "") {
        echo '<div class="cast"><b><a class="actorLink" data-hovercard="' . $cast[$j]['actor_id'] . '" href="actor/' . $cast[$j]['actor_id'] . '/' . rewriteUrl($cast[$j]['name']) . '">' . stripslashes($cast[$j]['name']) . '</a></b></div>';
    }
}
echo '</div>
		<div class="cast-characters">';
for ($k = 0; $k < min(3, $numActors); $k++) {
    if ($cast[$k]['character'] !== "") {
        echo "<div class='char'><span class='char-indent'>" . stripslashes($cast[$k]['character']) . "</span></div>";
    }
}
echo "</div>\n\t\t</div>";
?>
		<div class="complete-cast"></div>
		<div class="complete-cast-message"><i class="fa fa-spinner fa-spin"></i></div>

	</div>
$query = "SELECT rltd.related_id, mvs.title, mvs.year, mvs.img_link\n          FROM related rltd\n          JOIN movies mvs\n          ON rltd.related_id = mvs.id\n          AND rltd.id = {$id}\n          LIMIT {$more} OFFSET {$offset}";
if ($r = $mysqli->query($query)) {
    while ($relatedMov = mysqli_fetch_assoc($r)) {
        $relatedMovies[] = $relatedMov;
    }
}
if (count($relatedMovies) == 0) {
    $query = "SELECT mvs.id, m.title, m.year, m.img_link\n      FROM movie_keywords mvs\n      JOIN movie_keywords mvs2\n      ON mvs2.id = {$id} \n      AND mvs.keyword_id = mvs2.keyword_id\n      JOIN movies m\n      ON (m.id = mvs.id AND mvs.id != {$id})\n      GROUP BY mvs.id\n      HAVING COUNT(*) >= 3\n      ORDER BY COUNT(*) DESC\n      LIMIT {$more} OFFSET {$offset}";
    if ($relatedMovs = $mysqli->query($query)) {
        while ($relatedMov = mysqli_fetch_assoc($relatedMovs)) {
            mysqli_query($mysqli, "INSERT INTO related VALUES ({$id}, {$relatedMov['id']})");
            $relatedMovies[] = $relatedMov;
        }
    }
}
$moreRelated = false;
if (count($relatedMovies) == $more) {
    $moreRelated = true;
}
if (count($relatedMovies) > 0) {
    foreach ($relatedMovies as $mov) {
        $movUrl = $mov['related_id'] . "/" . rewriteUrl($mov['title']);
        echo "<div class='related-mov'>\n \t\t\t<a href='movie/{$movUrl}'><img alt='{$mov['title']}' src='" . (strlen($mov['img_link']) > 0 ? "http://image.tmdb.org/t/p/w185{$mov['img_link']}" : "images/no_image_found.png") . "'></a>\n \t\t\t<div class='mov-caption'>\n \t\t\t\t<a href='movie/{$movUrl}'>{$mov['title']}</a> <span class='year'>{$mov['year']}</span>\n \t\t\t</div>\n \t\t</div>";
    }
    if ($moreRelated) {
        echo "<div class='more-related'>\n\t\t\t<div class='get-more-related' data-toggle='tooltip' data-placement='top' title='Show more'><span>...</span></div>\n\t\t</div>";
    }
    echo "</div></div>";
} else {
    echo "<div class='none'><i class='fa fa-exclamation-triangle'></i> We couldn't find any movies related to this.</div>";
}
        echo $actors[$key]['actor_id'] . '/' . rewriteUrl($actors[$key]['name']);
        ?>
">
					<div class="image-centered">
						<img alt="<?php 
        echo $actors[$key]['name'];
        ?>
" src="<?php 
        echo strlen($actors[$key]['photo']) > 0 ? 'http://image.tmdb.org/t/p/w185' . $actors[$key]['photo'] : 'images/no_actor_found.png';
        ?>
">
					</div>
				</a>
				<div class="actor-starring-caption">
					<a href="actor/<?php 
        echo $actors[$key]['actor_id'] . '/' . rewriteUrl($actors[$key]['name']);
        ?>
">
						<?php 
        echo $actors[$key]['name'];
        ?>
					</a>
				</div><?php 
        echo stripslashes($actors[$key]['character']);
        ?>
			</div>
		
			<?php 
    }
    if (sizeof($actors) > 6) {
        echo "<div class='cast-scroll-right'><i class='fa fa-angle-right'></i></div>";
示例#8
0
        $url = $matches[2];
        if (substr($url, 0, 4) != 'http' && substr($url, 0, 1) != '/') {
            return "url('" . $path . '/' . $url . "')";
        } else {
            return $matches[0];
        }
    }, $source);
    return $source;
}
$id = time();
$sheetsInput = $_GET['sheets'];
$sheets = array();
foreach ($sheetsInput as $s) {
    $name = basename($s);
    if (file_exists($styleDir . $name)) {
        $sheets[] = array('href' => $s, 'name' => $name, 'lastModification' => 0, 'lastSize' => 0);
    }
}
do {
    clearstatcache();
    foreach ($sheets as $index => $sheet) {
        $stats = stat($styleDir . $sheet['name']);
        if ($stats['size'] != $sheet['lastSize'] || $stats['mtime'] != $sheet['lastModification']) {
            sendMessage($id, $sheet['name'], rewriteUrl(file_get_contents($styleDir . $sheet['name']), dirname($sheet['href'])));
            $sheets[$index]['lastModification'] = $stats['mtime'];
            $sheets[$index]['lastSize'] = $stats['size'];
        }
    }
    usleep(500000);
    //0.5 s
} while (true);
示例#9
0
            echo "<div class='hovercard' data-hovid='{$id}'><div class='hovercard-wrapper'>";
            $backdrop = $actor['backdrop'] ? "http://image.tmdb.org/t/p/w300" . $actor['backdrop'] : "images/no_backdrop.png";
            echo "<div class='hovercard-contents'>";
            echo "<div class='hov-triangle'></div>";
            echo "<div class='hov-backdrop'>\n\t\t\t\t\t<div class='hov-backdrop-wrapper'>\n\t\t\t\t\t</div>\n\t\t\t\t\t<img src='{$backdrop}' alt='backdrop' class='hov-backdrop-img'>";
            // echo "<div class='triangle-image'>
            //      			<div class='deg-fix'>
            //          			<img class='image-fix' src='$backdrop'/>
            //      			</div>
            //  			</div>";
            if ($bd) {
                echo "<div class='backdrop-title'>\n\t\t\t\t<b><a href='movie/{$actor['backdrop_id']}/" . rewriteUrl($bd['title']) . "'>{$bd['title']}</a></b> ({$bd['year']})\n\t\t\t\t</div>";
            }
            echo "</div>";
            echo "<div class='hovercard-text'>";
            echo "<div class='hov-photo'><a href='actor/{$actor['id']}/" . rewriteUrl($actor['name']) . "'><img src='" . ($actor['photo'] ? "http://image.tmdb.org/t/p/w92{$actor['photo']}" : "images/no_actor_found.png") . "' width=80></a></div>";
            echo "<div class='hov-header'>";
            echo "<a class='hov-title' href='actor/{$actor['id']}/" . rewriteUrl($actor['name']) . "'>{$actor['name']}</a>";
            if ($actor['label'] && $actor['label'] !== 'N/A') {
                echo "<div class='age'><i class='fa fa-film'></i> " . str_replace("|", " &#183; ", $actor['label']) . "</div>";
            }
            echo "<div class='age'>" . birth_and_death($actor['dob'], $actor['dod']) . "</div>";
            echo "</div>";
            if ($kf) {
                echo "<div class='kf'><b>Known for</b>: {$kf}.</div>";
            }
            echo "</div>";
            echo "</div></div></div>";
        }
    }
}
示例#10
0
'>Runtime</a></li>
					  </ul>
					</div>
		
					<?php 
        $adult = " AND adult=0 AND genres NOT LIKE '%Erotic%'";
        if (isset($_SESSION['user'])) {
            $account = mysqli_fetch_assoc($mysqli->query("SELECT adult FROM users WHERE username='******'user'] . "'"));
            if ($account['adult'] == 1) {
                $adult = "";
            }
        }
        $moviesDirectedQuery = "SELECT m.id, m.title, m.year, m.img_link" . ($orderby == "runtime" ? ", m.runtime" : "") . ($orderby == "imdb" ? ", i.imdb_rating" : "") . "\n\t\t\t\t\t\tFROM movies m\n\t\t\t\t\t\t" . ($orderby == "imdb" ? "INNER JOIN imdb i ON i.id=m.id" : "") . " WHERE director = {$id} {$orderQuery}";
        if ($movie = $mysqli->query($moviesDirectedQuery)) {
            while ($mov = mysqli_fetch_assoc($movie)) {
                $movUrl = "{$mov['id']}/" . rewriteUrl($mov['title']);
                $movImg = strlen($mov['img_link']) ? "http://image.tmdb.org/t/p/w185{$mov['img_link']}" : "images/no_image_found.png";
                echo "<div class='related-mov pop-movie actor-film'><a href='movie/{$movUrl}'>\n\t\t\t\t\t \t\t\t\t<div>\n\t\t\t\t\t \t\t\t\t\t<img alt='{$mov['title']}' src='{$movImg}'>\n\t\t\t\t\t \t\t\t\t\t<div class='legend'>\n\t\t\t\t\t \t\t\t\t\t\t<div class='legend-inner'>" . ($orderby == "imdb" ? "<img alt='IMDb' class='imdb' src='images/imdb_white.png'> <strong>{$mov['imdb_rating']}</strong>" : ($orderby == "runtime" ? "Runtime: <b>" . gen_time($mov['runtime']) . "</b>" : "")) . "</div>\n\t\t\t\t\t \t\t\t\t\t</div>\n\t\t\t\t\t \t\t\t\t\t<div>\n\t\t\t\t\t \t\t\t\t\t\t<strong>{$mov['title']}</strong> <span class='year'>{$mov['year']}</span>\n\t\t\t\t\t \t\t\t\t\t</div>\n\t\t\t\t\t \t\t\t\t</div>\n\t\t\t\t\t \t\t\t</a></div>";
            }
        }
        ?>
				</div>
				<?php 
    }
    ?>
			</div>
		
		</div>

		<?php 
    if (!$acted && !$directed) {