Esempio n. 1
0
}
//error
$handle = fopen($dataFolder . $file, "r");
$cleanTitle = clean_title($file);
if (isset($_GET['tab']) && $_GET['tab'] == "photos") {
    $movieArray = $imdb->getMovieInfo($cleanTitle, 3);
} else {
    if ($settings_data['imdb_mode'] == 'false') {
        $movieArray = arrayFile("{$dataFolder}/{$file}");
    } else {
        $movieArray = $imdb->getMovieInfo($cleanTitle, 2);
    }
}
if ($handle) {
    $videodata = explode("\n", file_get_contents("{$dataFolder}/{$file}"));
    $toggle = cleanWAMP($videodata[2]);
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title><?php 
echo $template->videoTitle($movieArray['title'], $movieArray['year']);
?>
</title>
<?php 
$template->headerFiles(true);
?>
</head>
    public function printMobileVideos($fp, $name = "", $cat = "")
    {
        global $settings_data, $lang_search_searchingFor;
        $searchContent = "";
        if (isset($_POST['sname'])) {
            $searchContent = $_POST['sname'];
        }
        if ($fp == false) {
            if ($name != "") {
                echo '<div class="mobilesearch"><h3>' . $lang_search_searchingFor . ' "' . $searchContent . '"</h3></div>';
            } else {
                if ($cat != "" && $name != "") {
                    echo '<div class="pick">' . $lang_mobile_pickVideo . '</div>';
                }
            }
        }
        $files = sortFileList();
        $i = 1;
        foreach ($files as $entry) {
            $videodata = explode("\n", file_get_contents($entry));
            $movie_rating = $videodata[5] * 10;
            if ($cat != "" && strstr($videodata[4], $cat) == false) {
                continue;
            }
            ?>

			<div style="width:100%;height:170px;"><a href="m_info.php?name=<?php 
            echo urlencode($videodata[1]);
            ?>
&raw=<?php 
            echo urlencode(cleanWAMP($videodata[6]));
            ?>
" style="text-decoration:none;"><div style="float:left;"><img src="<?php 
            echo $this->printPoster($videodata[3]);
            ?>
" border="0" width="100" height="150"></div><div class="mobile_video_title"><?php 
            echo $videodata[1];
            ?>
<br>

			<div align="left"><div class="classification"><div class="cover"></div>
    		<div class="progress" style="width:<?php 
            echo $movie_rating;
            ?>
%;"></div>
    		<div class="mobile_rated">Rated: <?php 
            echo formatRating($videodata[7]);
            ?>
</div>
    		<div class="mobile_plot"><?php 
            echo $videodata[8];
            ?>
</div>
    		</div></div></div></a></div>

			<?php 
            if ($fp == true) {
                if ($i == $settings_data['m_display']) {
                    break;
                }
            }
            $i++;
        }
    }
 function createPhotos($array, $max = 0)
 {
     global $movieArray;
     $printArray = '';
     //for WAMP
     if (empty($array)) {
         return;
     }
     $i = 0;
     foreach ($array as $pics) {
         if ($i >= $max) {
             continue;
         }
         $cleanID = cleanWAMP($movieArray['title_id']);
         if ($cleanID != "" && file_exists('pics/' . $cleanID . "_{$i}.jpg") == false) {
             file_put_contents('pics/' . $cleanID . "_{$i}.jpg", file_get_contents($pics));
         }
         $printArray .= '<div style="float:left;padding:5px;"><a href="pics/' . $cleanID . "_{$i}.jpg" . '" data-lightbox="pics"><img width="100" height="100" src="pics/' . $cleanID . "_{$i}.jpg" . '" border="0"></a></div>';
         $i++;
     }
     return $printArray;
 }
function sortSeasonsList($raw)
{
    global $garbage, $settings_data;
    if (!file_exists(cleanWAMP($raw))) {
        return;
    }
    //error
    if ($handle = opendir(cleanWAMP($raw))) {
        while (false !== ($file = readdir($handle))) {
            if (!in_array($file, $garbage)) {
                $files[] = $file;
            }
        }
        closedir($handle);
        if (!empty($files)) {
            if ($settings_data["tvshow_season_order"] == 'SORT_ASC') {
                array_multisort($files, SORT_ASC);
            } else {
                array_multisort($files, SORT_DESC);
            }
        }
        return $files;
    }
}