<?php

include "../config.php";
include './app_functions.php';
$output = "";
$sql_crausel_mov = getRecords("SELECT * FROM apps_contest WHERE cnt_status = '1' ORDER BY contest_id DESC");
foreach ($sql_crausel_mov as $no => $row_data) {
    $output .= '<contest>
				<contest_id> ' . $row_data->contest_id . ' </contest_id>
				<contest_name><![CDATA[ ' . nl2br(stripslashes($row_data->contest_name)) . ']]></contest_name>
				<thumb_image> ' . $row_data->thumb_image . ' </thumb_image>
				<description><![CDATA[ ' . htmlentities($row_data->description) . ']]></description>
				<contest_url> ' . $row_data->contest_url . ' </contest_url>
				<start_date> ' . DateFormatWhole($row_data->start_date) . ' </start_date>
				<end_date> ' . DateFormatWhole($row_data->end_date) . ' </end_date>
			</contest>';
}
header('Content-Type: application/xml; charset=utf-8');
echo '<?xml version="1.0" encoding="utf-8"?>
	<contest_list>
		' . $output . '
</contest_list>';
 $arriving_time = $row_data->AiringDateTime;
 $remtime = date('Y-m-d H:i:s', strtotime($arriving_time . "- 1 hour"));
 $curtime = date('Y-m-d H:i:s');
 $start_time = date('d-m-Y H:i:s', strtotime($arriving_time . "- 1 hour"));
 $end_time = date('d-m-Y H:i:s', strtotime($arriving_time . "-30 min"));
 $reminder = "";
 if ($curtime >= $remtime) {
     $reminder = "no";
 } else {
     $reminder = "yes";
 }
 $movieurl = WEBSITE_PATH . getmoviename($row_data->Title, $row_data->MovieID);
 $output .= '<movie>
     <movie_id> ' . $row_data->MovieID . ' </movie_id>        
     <title><![CDATA[' . $row_data->Title . ']]></title>  
     <tuning>' . DateFormatWhole($row_data->AiringDateTime) . '</tuning>
     <starring><![CDATA[ ' . $row_data->Starring . ']]></starring>
     <directedby><![CDATA[ ' . $row_data->DirectedBy . ']]></directedby>
     <genre><![CDATA[' . $row_data->Genre . ']]></genre>
     <duration> ' . formatduration($row_data->Duration) . ' </duration>
     <synopsis><![CDATA[ ' . stripslashes($row_data->Synopsis) . ']]></synopsis>        
     <poster_img><![CDATA[' . IMAGE_PATH . $row_data->FilePathBig . ']]></poster_img>	
     <crausel_img><![CDATA[' . IMAGE_PATH . $row_data->HomeCarausalPath . ']]></crausel_img>        
     <movie_url><![CDATA[' . $movieurl . ']]></movie_url>
     <thumb_path><![CDATA[' . IMAGE_PATH . $row_data->FilePath . ']]></thumb_path>
     <highlights>' . $row_data->IsHighlight . '</highlights>
     <originals>' . $row_data->Originals . '</originals>
     <is_hd>' . $is_hd . '</is_hd>
     <movie_video_url><![CDATA[ ' . $row_data->VideoPath . ']]></movie_video_url>
     <s_time>' . $start_time . '</s_time>
     <e_time>' . $end_time . '</e_time>
Beispiel #3
0
<?php

include "../config.php";
include './app_functions.php';
$sql_crausel_mov = getRecords("SELECT * FROM apps_cnst_update WHERE cnt_status = '1' ORDER BY id DESC");
foreach ($sql_crausel_mov as $no => $row_data) {
    $output .= '<updates>
				<id>' . $row_data->id . '</id>
				<title><![CDATA[' . nl2br(stripslashes($row_data->title)) . ']]></title>
				<thumb_image><![CDATA[' . $row_data->thumb_image . ']]></thumb_image>
				<description><![CDATA[' . htmlentities($row_data->description) . ' ]]></description>
                                <update_url><![CDATA[' . htmlentities($row_data->updates_url) . ' ]]></update_url>
				<date>' . DateFormatWhole($row_data->update_date) . '</date>
			</updates>';
}
header('Content-Type: application/xml; charset=utf-8');
echo '<?xml version="1.0" encoding="utf-8"?>
	<update_list>
		' . $output . '
</update_list>';