$tpl->D = $row; unset($row); $tpl->loadvod('play'); $tpl->replaceVod(); $tpl->playdownlist('play'); $tpl->H = str_replace('[vod:playnum]', $tpl->P['num'], $tpl->H); $tpl->H = str_replace('[vod:playsrc]', $tpl->P['src'], $tpl->H); $tpl->getUrlName('play'); $tpl->H = str_replace('[vod:playerinfo]', '<script>' . $tpl->getUrlInfo('play') . ' </script>' . "\n", $tpl->H); $tpl->H = str_replace('[vod:player]', '<script src="' . $MAC['site']['installdir'] . 'js/playerconfig.js"></script><script src="' . $MAC['site']['installdir'] . 'js/player.js"></script>' . "\n", $tpl->H); $tpl->playdownlist("down"); } elseif ($method == 'down') { $tpl->C["siteaid"] = 18; $tpl->P['cp'] = 'voddown'; $tpl->P['cn'] = $tpl->P['id'] . '-' . $tpl->P['src'] . '-' . $tpl->P['num']; echoPageCache($tpl->P['cp'], $tpl->P['cn']); $db = new AppDb($MAC['db']['server'], $MAC['db']['user'], $MAC['db']['pass'], $MAC['db']['name']); $sql = "SELECT * FROM {pre}vod WHERE d_hide=0 AND d_id=" . $tpl->P['id']; $row = $db->getRow($sql); if (!$row) { showMsg("获取数据失败,请勿非法传递参数", MAC_PATH); } if (!getUserPopedom($row["d_type"], "down")) { showMsg("您没有权限浏览播放页", MAC_PATH . "index.php?m=user-index.html"); } if ($MAC['user']['status'] == 1) { $uid = intval($_SESSION['userid']); if ($row["d_stint"] > 0 && $uid == 0) { showMsg("此为收费数据请先登录再观看", MAC_PATH . "index.php?m=user-index.html"); } $rowu = $db->getRow("SELECT * FROM {pre}user where u_id=" . $uid);
$xml .= "<actor><![CDATA[" . $row["d_starring"] . "]]></actor>"; $xml .= "<director><![CDATA[" . $row["d_directed"] . "]]></director>"; $xml .= "<dl>" . $tempurl . "</dl>"; $xml .= "<des><![CDATA[" . $row["d_content"] . "]]></des>"; $xml .= "</video>"; } $xml .= "</list>"; } unset($rs); $xmla .= $xml . "</rss>"; setPageCache($cp, $cn, $xml); echo $xmla; } else { $cp = 'api'; $cn = 'list' . $t . "-" . $pg . "-" . $wd . "-" . $h; echoPageCache($cp, $cn); $xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; $xml .= "<rss version=\"5.1\">"; //视频列表开始 if (maccms_field_vod_source != "") { $tempmaccms_field_vod_source = "," . maccms_table_vod . "." . maccms_field_vod_source; } $sql = "select d_id,d_name,d_enname,d_type,d_time,d_remarks,d_playfrom,d_addtime from {pre}vod where 1=1 "; $sql1 = "select count(*) from {pre}vod where 1=1 "; if ($t > 0) { $where .= " and d_type=" . mysql_real_escape_string($t); } if ($MAC['api']['vod']['vodfilter'] != "") { $where .= " " . $MAC['api']['vod']['vodfilter'] . " "; } if ($wd != "") {