$xoopsConfig['generator'] = $mydirname . ' ' . $xoopsModule->getVar('version'); $tpl->assign('config', $xoopsConfig); $tpl->assign('builddate', formatTimestamp(time(), 'rss')); if (preg_match('/(iPod|iTunes)/', $name)) { $cache_id = "{$mydirname}/track.php?lid={$lid}"; header("Content-Type: text/xml; charset=UTF-8"); header("Content-Disposition:attachment;filename=\"{$mydirname}.xml\""); header("Cache-Control: public"); header("Pragma: public"); $tpl->xoops_setCaching(2); $tpl->xoops_setCacheTime(3600); if (true || !$tpl->is_cached('db:medialinks_rss.xml', $cache_id)) { include_once 'functions.php'; $content = new MediaContent($mid); $tpl->assign('pubdate', formatTimestamp($content->getVar('mtime'), 'rss')); $item = $content->dispVars(); $item['url'] = $url; $item['item_title'] = htmlspecialchars($name); if (preg_match('/\\.mov$/i', $url)) { $type = 'video/quicktime'; } elseif (preg_match('/\\.(m4v|mp4)$/i', $url)) { $type = 'video/mp4'; } elseif (preg_match('/\\.(wmv|avi)$/i', $url)) { $type = 'video/x-msvideo'; } $item['mimetype'] = $type; $item['pubdate'] = formatTimestamp($content->getVar('mtime'), 'rss'); $tpl->assign('items', array($item)); $tpl->assign('builddate', formatTimestamp(time(), 'rss')); } $tpl->template_dir = XOOPS_ROOT_PATH . "/modules/{$mydirname}/templates";
include_once "functions.php"; if (isset($_POST['delete'])) { $mid = isset($_POST['mid']) ? intval($_POST['mid']) : 0; } else { $mid = isset($_GET['mid']) ? intval($_GET['mid']) : 0; } if (!$mid || !is_object($xoopsUser)) { redirect_header('index.php', 3, _NOPERM); exit; } $content = new MediaContent($mid); $mid = $content->getVar('mid'); if (empty($mid) || $content->getVar('status') == 'X' || $content->getVar('poster') != $xoopsUser->getVar('uid') && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { redirect_header('index.php', 3, _NOPERM); exit; } if (isset($_POST['delete'])) { $content->setVar('status', 'X'); if ($content->store()) { redirect_header('index.php', 1, _MD_DBUPDATE_DEL); } else { redirect_header('index.php', 2, _MD_DBUPDATE_FAIL); } } include XOOPS_ROOT_PATH . "/header.php"; $xoopsOption['template_main'] = 'medialinks_operate.html'; //$xoopsTpl->assign('xoops_pagetitle', htmlspecialchars($xoopsModule->getVar('name')._MD_SEP.$content->getVar('title'))); $xoopsTpl->assign('fields', $content->dispVars(false)); $button = "<input type='hidden' name='mid' value='{$mid}'/>\n" . "<div>" . _MD_CONTENT_DELETE . "</div>\n" . "<input name='delete' type='submit' value='" . _DELETE . "'/>\n"; $xoopsTpl->assign('button', $button); include XOOPS_ROOT_PATH . "/footer.php";
$keyid = intval($_GET['keyid']); $xoopsTpl->assign('keypath', $keypath); $res = $xoopsDB->query("SELECT midref FROM " . RELAY . " WHERE keyref=" . $keyid); $mids = array(); while (list($mid) = $xoopsDB->fetchRow($res)) { $mids[] = $mid; } $cond .= " AND mid IN (" . join(',', $mids) . ")"; } if (!$isadmin) { $uid = is_object($xoopsUser) ? $xoopsUser->getVar('uid') : 0; $acl = "LEFT JOIN " . ACLS . " ON amid=mid AND auid=" . $uid; $cond .= " AND (nacl=0 OR auid>0)"; } $res = $xoopsDB->query("SELECT count(mid) FROM " . MAIN . " {$acl} WHERE {$cond}"); list($n) = $xoopsDB->fetchRow($res); $start = isset($_GET['start']) ? intval($_GET['start']) : 0; $max = $xoopsModuleConfig['max_list']; $res = $xoopsDB->query("SELECT * FROM " . MAIN . " {$acl} WHERE {$cond} ORDER BY {$order}", $max, $start); $nav = new XoopsPageNav($n, $max, $start, "start"); if ($n > $max) { $xoopsTpl->assign('pagenav', $nav->renderNav()); } $list = array(); while ($content->load(0, $res)) { $fields = $content->dispVars(); $fields['detail'] = "detail.php?mid=" . $content->getVar('mid'); $list[] = $fields; } $xoopsTpl->assign('list', $list); include XOOPS_ROOT_PATH . "/footer.php";
// <http://www.xoops.org/> // // ------------------------------------------------------------------------ // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // // // You may not change or alter any portion of this comment or credits // // of supporting developers from this source code or any supporting // // source code which is considered copyrighted (c) material of the // // original comment or credit authors. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // include '../../mainfile.php'; include 'functions.php'; require_once XOOPS_ROOT_PATH . '/class/template.php'; $mid = $com_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0; $content = new MediaContent($mid); $tpl = new XoopsTpl(); $tpl->assign('fields', $content->dispVars()); $com_replytext = $tpl->fetch('db:medialinks_item.html'); $com_replytitle = htmlspecialchars($content->getVar('title')); include XOOPS_ROOT_PATH . '/include/comment_new.php';