<?php include "SubVideo.php"; $db1 = new SQLite3('videoworld.sqlite'); $db2 = new SQLite3('MyVideos105.db'); $res2 = $db2->query('SELECT c09 FROM movie'); $updates = ''; while ($row2 = $res2->fetchArray(SQLITE3_ASSOC)) { if (!empty($row2['c09'])) { $db1->exec('UPDATE movies SET status=2 WHERE status<>2 AND imdb_id="' . $row2['c09'] . '"'); if ($db1->changes()) { if (empty($updates)) { $updates = '"' . $row2['c09'] . '"'; } else { $updates .= ',"' . $row2['c09'] . '"'; } } } } $db1->close(); $db2->close(); if (!empty($updates)) { $stmt = 'SELECT * FROM movies WHERE imdb_id IN (' . $updates . ') ORDER BY title'; PrintVideos($stmt, 0); }
<title>Kellerkino</title> <meta content="EN" http-equiv="Content-Language"></meta> <link type="text/css" rel="stylesheet" href="css/core.css?1.3.57"></link> <link type="text/css" rel="stylesheet" href="css/kellerkino.css?1.3.57"></link> <link type="text/css" media="only screen and (max-device-width: 1024px)" rel="stylesheet" href="css/ipad.css?1.0.5"></link> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <!-- HTML 4.x --> <meta charset="utf-8"> <!-- HTML5 --> <script src="js/my_jquery.min.js"></script> <script src="js/kellerkino.js"></script> </head> <body> <div id="header"> <div id="navigation"> <ul> <li>Video Wishlist</li> </ul> </div> </div> <div id="content"> <?php include "SubVideo.php"; PrintVideos('SELECT * FROM movies WHERE status=1 ORDER BY lfdnr DESC', 0); ?> </div> </body> </html>
<?php session_start(); include "SubVideo.php"; if ($_POST['idStatus'] != '' & $_POST['idStatus'] != -1) { $stmt = 'SELECT * FROM movies WHERE status=' . $_POST['idStatus'] . ' ORDER BY lfdnr DESC'; } elseif ($_POST['idRating'] != '') { $start = $_POST['idRating']; $end = $start + 1; $stmt = 'SELECT * FROM movies WHERE imdbRating BETWEEN ' . $start . ' AND ' . $end . ' ORDER BY lfdnr DESC'; } elseif ($_POST['cVGenre'] != '') { $stmt = 'SELECT * FROM movies WHERE genres LIKE "%' . $_POST['cVGenre'] . '%" ORDER BY title'; } elseif ($_POST['cVTitle'] != '') { $stmt = 'SELECT * FROM movies WHERE idx_title LIKE "' . $_POST['cVTitle'] . '%" ORDER BY idx_title'; } else { $stmt = 'SELECT * FROM movies ORDER BY lfdnr DESC'; } if (empty($_SESSION['UPDATE_AUTH'])) { PrintVideos($stmt, 3); } else { PrintVideos($stmt, 1); }
<?php include "SubVideo.php"; $db1 = new SQLite3('videoworld.sqlite'); $res1 = $db1->query('SELECT imdb_id,count(*) as x FROM movies GROUP BY imdb_id having x>1'); $doubles = ''; while ($row1 = $res1->fetchArray(SQLITE3_ASSOC)) { if ($row1['x'] > 1) { if (!empty($row1['imdb_id'])) { if (empty($doubles)) { $doubles = '"' . $row1['imdb_id'] . '"'; } else { $doubles .= ',"' . $row1['imdb_id'] . '"'; } } } } $db1->close(); if (!empty($doubles)) { $stmt = 'SELECT * FROM movies WHERE imdb_id IN (' . $doubles . ') ORDER BY imdb_id'; PrintVideos($stmt, 2); }