function show() { global $set, $db, $apx, $html; quicklink_multi('newsletter.add'); if ($apx->is_module('news')) { quicklink_multi('newsletter.addnews'); } quicklink_out(); list($rec) = $db->first("\n\t\tSELECT count(DISTINCT eid)\n\t\tFROM " . PRE . "_newsletter_emails AS ne\n\t\tJOIN " . PRE . "_newsletter_emails_cat AS nec ON ne.id=nec.eid\n\t\tWHERE active=1\n\t"); echo '<p class="hint">' . $apx->lang->get('CURRENTREC') . ': ' . number_format($rec, 0, '', '.') . '</p>'; $orderdef[0] = 'addtime'; $orderdef['subject'] = array('subject', 'ASC', 'COL_SUBJECT'); $orderdef['addtime'] = array('addtime', 'DESC', 'SORT_ADDTIME'); $orderdef['sendtime'] = array('sendtime', 'DESC', 'COL_SENDTIME'); $col[] = array(' ', 1, ''); $col[] = array('COL_SUBJECT', 50, 'class="title"'); $col[] = array('COL_CATEGORY', 30, 'align="center"'); $col[] = array('COL_SENDTIME', 20, 'align="center"'); list($count) = $db->first("SELECT count(id) FROM " . PRE . "_newsletter"); pages('action.php?action=newsletter.show&sortby=' . $_REQUEST['sortby'], $count); $data = $db->fetch("SELECT id,catid,subject,done,sendtime FROM " . PRE . "_newsletter " . getorder($orderdef) . getlimit()); if (count($data)) { foreach ($data as $res) { ++$i; if ($res['done']) { $tabledata[$i]['COL1'] = '<img src="design/check.gif" alt="' . $apx->lang->get('ISSEND') . '" title="' . $apx->lang->get('ISSEND') . '" />'; } else { $tabledata[$i]['COL1'] = ' '; } $tabledata[$i]['COL2'] = replace($res['subject']); $tabledata[$i]['COL3'] = replace($set['newsletter']['categories'][$res['catid']]); $tabledata[$i]['COL4'] = iif($res['sendtime'], apxdate($res['sendtime']), '-'); //Optionen if ($apx->user->has_right('newsletter.edit')) { $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'newsletter.edit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('newsletter.del')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'newsletter.del', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('newsletter.send')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('emailsend.gif', 'newsletter.send', 'id=' . $res['id'], $apx->lang->get('SEND')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('newsletter.preview')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('emailpreview.gif', 'newsletter.preview', 'id=' . $res['id'], $apx->lang->get('PREVIEW')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } } } $apx->tmpl->assign('TABLE', $tabledata); $html->table($col); orderstr($orderdef, 'action.php?action=newsletter.show'); save_index($_SERVER['REQUEST_URI']); }
function show() { global $set, $db, $apx, $html; quicklink('contact.add'); $orderdef[0] = 'title'; $orderdef['title'] = array('title', 'ASC', 'COL_TITLE'); $orderdef['email'] = array('email', 'ASC', 'COL_EMAIL'); $col[] = array('ID', 3, 'align="center"'); $col[] = array('COL_TITLE', 50, 'class="title"'); $col[] = array('COL_EMAIL', 47, ''); list($count) = $db->first("SELECT count(id) FROM " . PRE . "_contact"); pages('action.php?action=contact.show&sortby=' . $_REQUEST['sortby'], $count); $data = $db->fetch("SELECT id,title,email FROM " . PRE . "_contact " . getorder($orderdef) . getlimit()); if (count($data)) { foreach ($data as $res) { ++$i; $tabledata[$i]['COL1'] = $res['id']; $tabledata[$i]['COL2'] = replace($res['title']); $tabledata[$i]['COL3'] = replace($res['email']); //Optionen if ($apx->user->has_right('contact.edit')) { $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'contact.edit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT')); } if ($apx->user->has_right('contact.del')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'contact.del', 'id=' . $res['id'], $apx->lang->get('CORE_DEL')); } } } $apx->tmpl->assign('TABLE', $tabledata); $html->table($col); orderstr($orderdef, 'action.php?action=contact.show'); save_index($_SERVER['REQUEST_URI']); }
function show() { global $set, $db, $apx, $html; quicklink('poll.add'); $orderdef[0] = 'addtime'; $orderdef['question'] = array('question', 'ASC', 'COL_QUESTION'); $orderdef['addtime'] = array('addtime', 'DESC', 'COL_ADDTIME'); $orderdef['starttime'] = array('starttime', 'DESC', 'COL_STARTTIME'); $orderdef['endtime'] = array('endtime', 'DESC', 'COL_ENDTIME'); $col[] = array('', 1, 'align="center"'); $col[] = array('COL_QUESTION', 60, 'class="title"'); $col[] = array('COL_STARTTIME', 20, 'align="center"'); $col[] = array('COL_ENDTIME', 20, 'align="center"'); list($count) = $db->first("SELECT count(id) FROM " . PRE . "_poll"); pages('action.php?action=poll.show&sortby=' . $_REQUEST['sortby'], $count); $data = $db->fetch("SELECT id,secid,question,addtime,starttime,endtime,days,allowcoms FROM " . PRE . "_poll " . getorder($orderdef) . getlimit()); if (count($data)) { foreach ($data as $res) { ++$i; if (!$res['starttime']) { $tabledata[$i]['COL1'] = '<img src="design/reddot.gif" alt="' . $apx->lang->get('CORE_INACTIVE') . '" title="' . $apx->lang->get('CORE_INACTIVE') . '" />'; } elseif ($res['endtime'] < time()) { $tabledata[$i]['COL1'] = '<img src="design/greendotcross.gif" alt="' . $apx->lang->get('CORE_INACTIVE') . '" title="' . $apx->lang->get('CORE_INACTIVE') . '" />'; } elseif ($res['starttime'] > time()) { $tabledata[$i]['COL1'] = '<img src="design/greendotwait.gif" alt="' . $apx->lang->get('CORE_ACTIVE') . '" title="' . $apx->lang->get('CORE_ACTIVE') . '" />'; } else { $tabledata[$i]['COL1'] = '<img src="design/greendot.gif" alt="' . $apx->lang->get('CORE_ACTIVE') . '" title="' . $apx->lang->get('CORE_ACTIVE') . '" />'; } $tmp = unserialize_section($res['secid']); $question = shorttext(strip_tags($res['question']), 60); $link = mklink('poll.php?id=' . $res['id'], 'poll,' . $res['id'] . urlformat($res['question']) . '.html', iif($set['main']['forcesection'], iif(unserialize_section($res['secid']) == array('all'), $apx->section_default, array_shift($tmp)), 0)); $tabledata[$i]['COL2'] = '<a href="' . $link . '" target="_blank">' . $question . '</a>'; if ($res['starttime']) { $tabledata[$i]['COL3'] = mkdate($res['starttime'], '<br />'); } if ($res['starttime']) { $tabledata[$i]['COL4'] = mkdate($res['starttime'] + $res['days'] * 24 * 3600, '<br />'); } //Optionen if ($apx->user->has_right('poll.edit')) { $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'poll.edit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('poll.del')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'poll.del', 'id=' . $res['id'], $apx->lang->get('CORE_DEL')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ((!$res['starttime'] || $res['endtime'] < time()) && $apx->user->has_right('poll.enable')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('enable.gif', 'poll.enable', 'id=' . $res['id'], $apx->lang->get('CORE_ENABLE')); } elseif ($res['starttime'] && $apx->user->has_right('poll.disable')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('disable.gif', 'poll.disable', 'id=' . $res['id'], $apx->lang->get('CORE_DISABLE')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } //Kommentare if ($apx->is_module('comments')) { $tabledata[$i]['OPTIONS'] .= ' '; list($comments) = $db->first("SELECT count(mid) FROM " . PRE . "_comments WHERE ( module='poll' AND mid='" . $res['id'] . "' )"); if ($comments && ($apx->is_module('comments') && $set['poll']['coms']) && $res['allowcoms'] && $apx->user->has_right('comments.show')) { $tabledata[$i]['OPTIONS'] .= optionHTML('comments.gif', 'comments.show', 'module=poll&mid=' . $res['id'], $apx->lang->get('COMMENTS')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } } } } $apx->tmpl->assign('TABLE', $tabledata); $html->table($col); orderstr($orderdef, 'action.php?action=poll.show'); save_index($_SERVER['REQUEST_URI']); }
function show() { global $set, $db, $apx, $html; //Suche durchführen if ($_REQUEST['item'] && ($_REQUEST['title'] || $_REQUEST['text']) || $_REQUEST['secid'] || $_REQUEST['catid'] || $_REQUEST['userid']) { $where = ''; $_REQUEST['secid'] = (int) $_REQUEST['secid']; $_REQUEST['catid'] = (int) $_REQUEST['catid']; $_REQUEST['userid'] = (int) $_REQUEST['userid']; //Suche wird ausgeführt... if ($_REQUEST['title']) { $sc[] = "title LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; } if ($_REQUEST['text']) { $sc[] = "text LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; } if (is_array($sc)) { $where .= ' AND ( ' . implode(' OR ', $sc) . ' )'; } //Sektion if (!$apx->session->get('section') && $_REQUEST['secid']) { $where .= " AND ( secid LIKE '%|" . $_REQUEST['secid'] . "|%' OR secid='all' ) "; } //Kategorie if ($_REQUEST['catid']) { $where .= " AND catid='" . $_REQUEST['catid'] . "' "; } //Benutzer if ($_REQUEST['userid']) { $where .= " AND userid='" . $_REQUEST['userid'] . "' "; } $data = $db->fetch("SELECT id FROM " . PRE . "_content WHERE 1 " . $where); $ids = get_ids($data, 'id'); $ids[] = -1; $searchid = saveSearchResult('admin_content', $ids, array('title' => $_REQUEST['title'], 'text' => $_REQUEST['text'], 'item' => $_REQUEST['item'], 'catid' => $_REQUEST['catid'], 'secid' => $_REQUEST['secid'], 'userid' => $_REQUEST['userid'])); header("HTTP/1.1 301 Moved Permanently"); header('Location: action.php?action=content.show&searchid=' . $searchid); return; } //Vorgaben $_REQUEST['title'] = 1; $_REQUEST['text'] = 1; quicklink('content.add'); $orderdef[0] = 'time'; $orderdef['title'] = array('a.title', 'ASC', 'COL_TITLE'); $orderdef['user'] = array('b.username', 'ASC', 'COL_USER'); $orderdef['time'] = array('a.time', 'DESC', 'COL_ADDTIME'); $orderdef['lastchange'] = array('a.lastchange', 'DESC', 'COL_LASTCHANGE'); $orderdef['hits'] = array('a.hits', 'DESC', 'COL_HITS'); $col[] = array('', 1, 'align="center"'); $col[] = array('COL_TITLE', 50, 'class="title"'); $col[] = array('COL_USER', 20, 'align="center"'); $col[] = array('COL_LASTCHANGE', 20, 'align="center"'); $col[] = array('COL_HITS', 10, 'align="center"'); //Suchergebnis? $resultFilter = ''; if ($_REQUEST['searchid']) { $searchRes = getSearchResult('admin_content', $_REQUEST['searchid']); if ($searchRes) { list($resultIds, $resultMeta) = $searchRes; $_REQUEST['item'] = $resultMeta['item']; $_REQUEST['title'] = $resultMeta['title']; $_REQUEST['text'] = $resultMeta['text']; $_REQUEST['catid'] = $resultMeta['catid']; $_REQUEST['secid'] = $resultMeta['secid']; $_REQUEST['userid'] = $resultMeta['userid']; $resultFilter = " AND a.id IN (" . implode(', ', $resultIds) . ")"; } else { $_REQUEST['searchid'] = ''; } } //Sektionen auflisten $seclist = ''; if (is_array($apx->sections) && count($apx->sections)) { foreach ($apx->sections as $res) { $seclist .= '<option value="' . $res['id'] . '"' . iif($_REQUEST['secid'] == $res['id'], ' selected="selected"') . '>' . replace($res['title']) . '</option>'; } } //Kategorien auflisten $catlist = ''; $data = $set['content']['groups']; if (count($data)) { foreach ($data as $id => $title) { $catlist .= '<option value="' . $id . '"' . iif($_REQUEST['catid'] == $id, ' selected="selected"') . '>' . replace($title) . '</option>'; } } //Benutzer auflisten $userlist = ''; $data = $db->fetch("SELECT b.userid,b.username FROM " . PRE . "_content AS a LEFT JOIN " . PRE . "_user AS b USING (userid) WHERE a.userid!=0 GROUP BY userid ORDER BY username ASC"); if (count($data)) { foreach ($data as $res) { $userlist .= '<option value="' . $res['userid'] . '"' . iif($_REQUEST['userid'] == $res['userid'], ' selected="selected"') . '>' . replace($res['username']) . '</option>'; } } $apx->tmpl->assign('ITEM', compatible_hsc($_REQUEST['item'])); $apx->tmpl->assign('STITLE', (int) $_REQUEST['title']); $apx->tmpl->assign('STEXT', (int) $_REQUEST['text']); $apx->tmpl->assign('SECLIST', $seclist); $apx->tmpl->assign('CATLIST', $catlist); $apx->tmpl->assign('USERLIST', $userlist); $apx->tmpl->assign('EXTENDED', $searchRes); $apx->tmpl->parse('search'); list($count) = $db->first("SELECT count(id) FROM " . PRE . "_content AS a WHERE 1 " . $resultFilter . section_filter()); pages('action.php?action=content.show&sortby=' . $_REQUEST['sortby'] . iif($_REQUEST['searchid'], '&searchid=' . $_REQUEST['searchid']), $count); $data = $db->fetch("SELECT a.id,a.secid,a.title,a.lastchange,a.allowcoms,a.allowrating,a.active,a.hits,b.userid,b.username FROM " . PRE . "_content AS a LEFT JOIN " . PRE . "_user AS b USING(userid) WHERE 1 " . $resultFilter . section_filter(true, 'a.secid') . " " . getorder($orderdef) . getlimit()); if (count($data)) { foreach ($data as $res) { ++$i; if ($res['active']) { $tabledata[$i]['COL1'] = '<img src="design/greendot.gif" alt="' . $apx->lang->get('CORE_ACTIVE') . '" title="' . $apx->lang->get('CORE_ACTIVE') . '" />'; } else { $tabledata[$i]['COL1'] = '<img src="design/reddot.gif" alt="' . $apx->lang->get('CORE_INACTIVE') . '" title="' . $apx->lang->get('CORE_INACTIVE') . '" />'; } $title = $res['title']; $title = strip_tags($title); //$title=str_replace('=>','»',$title); $title = str_replace('->', '»', $title); $title = shorttext($title, 40); $title = replace($title); $temp = explode('->', $res['title']); $tmp = unserialize_section($res['secid']); $link = mklink('content.php?id=' . $res['id'], 'content,' . $res['id'] . urlformat(array_pop($temp)) . '.html', iif($set['main']['forcesection'], iif(unserialize_section($res['secid']) == array('all'), $apx->section_default, array_shift($tmp)), 0)); $tabledata[$i]['COL2'] = '<a href="' . $link . '" target="_blank">' . $title . '</a>'; $tabledata[$i]['COL3'] = replace($res['username']); $tabledata[$i]['COL4'] = mkdate($res['lastchange'], '<br />'); $tabledata[$i]['COL5'] = $res['hits']; //Optionen if ($apx->user->has_right('content.edit') && ($res['userid'] == $apx->user->info['userid'] || $apx->user->has_spright('content.edit'))) { $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'content.edit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT')); } if ($apx->user->has_right('content.del') && ($res['userid'] == $apx->user->info['userid'] || $apx->user->has_spright('content.del'))) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'content.del', 'id=' . $res['id'], $apx->lang->get('CORE_DEL')); } if ($res['active'] && $apx->user->has_right('content.disable') && ($res['userid'] == $apx->user->info['userid'] || $apx->user->has_spright('content.disable'))) { $tabledata[$i]['OPTIONS'] .= optionHTML('disable.gif', 'content.disable', 'id=' . $res['id'] . '§oken=' . $apx->session->get('sectoken'), $apx->lang->get('CORE_DISABLE')); } elseif (!$res['active'] && $apx->user->has_right('content.enable') && ($res['userid'] == $apx->user->info['userid'] || $apx->user->has_spright('content.enable'))) { $tabledata[$i]['OPTIONS'] .= optionHTML('enable.gif', 'content.enable', 'id=' . $res['id'] . '§oken=' . $apx->session->get('sectoken'), $apx->lang->get('CORE_ENABLE')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } //Kommentare + Bewertungen if ($apx->is_module('comments') || $apx->is_module('ratings')) { $tabledata[$i]['OPTIONS'] .= ' '; } if ($apx->is_module('comments')) { list($comments) = $db->first("SELECT count(id) FROM " . PRE . "_comments WHERE ( module='content' AND mid='" . $res['id'] . "' )"); if ($comments && ($apx->is_module('comments') && $set['content']['coms']) && $res['allowcoms'] && $apx->user->has_right('comments.show')) { $tabledata[$i]['OPTIONS'] .= optionHTML('comments.gif', 'comments.show', 'module=content&mid=' . $res['id'], $apx->lang->get('COMMENTS') . ' (' . $comments . ')'); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } } if ($apx->is_module('ratings')) { list($ratings) = $db->first("SELECT count(id) FROM " . PRE . "_ratings WHERE ( module='content' AND mid='" . $res['id'] . "' )"); if ($ratings && ($apx->is_module('ratings') && $set['content']['ratings']) && $res['allowrating'] && $apx->user->has_right('ratings.show')) { $tabledata[$i]['OPTIONS'] .= optionHTML('ratings.gif', 'ratings.show', 'module=content&mid=' . $res['id'], $apx->lang->get('RATINGS') . ' (' . $ratings . ')'); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } } } } $apx->tmpl->assign('TABLE', $tabledata); $html->table($col); orderstr($orderdef, 'action.php?action=content.show' . iif($_REQUEST['searchid'], '&searchid=' . $_REQUEST['searchid'])); save_index($_SERVER['REQUEST_URI']); }
function ushow() { global $set, $db, $apx, $html; //Suche durchführen if ($_REQUEST['item'] && ($_REQUEST['title'] || $_REQUEST['text'])) { $where = ''; //Suche wird ausgeführt... if ($_REQUEST['title']) { $sc[] = "title LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; $sc[] = "fullname LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; } if ($_REQUEST['text']) { $sc[] = "text LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; } if ($_REQUEST['else']) { $sc[] = "address LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; $sc[] = "email LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; $sc[] = "phone LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; $sc[] = "website LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; $sc[] = "founder LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; $sc[] = "founding_year LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; $sc[] = "founding_country LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; $sc[] = "legalform LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; $sc[] = "headquaters LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; $sc[] = "executive LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; $sc[] = "sector LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; $sc[] = "products LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; } if (is_array($sc)) { $where .= ' AND ( ' . implode(' OR ', $sc) . ' )'; } $data = $db->fetch("SELECT id FROM " . PRE . "_products_units WHERE 1 " . $where); $ids = get_ids($data, 'id'); $ids[] = -1; $searchid = saveSearchResult('admin_products_units', $ids, array('title' => $_REQUEST['title'], 'text' => $_REQUEST['text'], 'else' => $_REQUEST['else'], 'item' => $_REQUEST['item'])); header("HTTP/1.1 301 Moved Permanently"); header('Location: action.php?action=products.ushow&what=' . $_REQUEST['what'] . '&searchid=' . $searchid); return; } //Vorgaben $_REQUEST['title'] = 1; $_REQUEST['text'] = 1; quicklink('products.uadd'); //Layer Header ausgeben $layerdef[] = array('UNITTYPE_ALL', 'action.php?action=products.ushow', !$_REQUEST['what']); $layerdef[] = array('UNITTYPE_PERSON', 'action.php?action=products.ushow&what=person', $_REQUEST['what'] == 'person'); $layerdef[] = array('UNITTYPE_COMPANY', 'action.php?action=products.ushow&what=company', $_REQUEST['what'] == 'company'); $html->layer_header($layerdef); $typeFilter = ''; if (in_array($_REQUEST['what'], array('company', 'person'))) { $typeFilter = " AND type='" . $_REQUEST['what'] . "' "; } $orderdef[0] = 'title'; $orderdef['title'] = array('title', 'ASC', 'COL_TITLE'); //Suchergebnis? $resultFilter = ''; if ($_REQUEST['searchid']) { $searchRes = getSearchResult('admin_products_units', $_REQUEST['searchid']); if ($searchRes) { list($resultIds, $resultMeta) = $searchRes; $_REQUEST['item'] = $resultMeta['item']; $_REQUEST['title'] = $resultMeta['title']; $_REQUEST['text'] = $resultMeta['text']; $_REQUEST['else'] = $resultMeta['else']; $resultFilter = " AND id IN (" . implode(', ', $resultIds) . ")"; } else { $_REQUEST['searchid'] = ''; } } $apx->tmpl->assign('ITEM', compatible_hsc($_REQUEST['item'])); $apx->tmpl->assign('STITLE', (int) $_REQUEST['title']); $apx->tmpl->assign('STEXT', (int) $_REQUEST['text']); $apx->tmpl->assign('SELSE', (int) $_REQUEST['else']); $apx->tmpl->assign('WHAT', $_REQUEST['what']); $apx->tmpl->parse('usearch'); //Letters letters('action.php?action=products.ushow&what=' . $_REQUEST['what'] . iif($_REQUEST['searchid'], '&searchid=' . $_REQUEST['searchid'])); if (!$_REQUEST['letter']) { $_REQUEST['letter'] = 0; } $letterfilter = ''; if ($_REQUEST['letter'] === 'spchar') { $letterfilter = " AND title NOT REGEXP(\"^[a-zA-Z]\") "; } elseif ($_REQUEST['letter']) { $letterfilter = " AND title LIKE '" . addslashes($_REQUEST['letter']) . "%' "; } list($count) = $db->first("SELECT count(id) FROM " . PRE . "_products_units WHERE 1 " . $typeFilter . $resultFilter . $letterfilter); pages('action.php?action=products.ushow&what=' . $_REQUEST['what'] . iif($_REQUEST['searchid'], '&searchid=' . $_REQUEST['searchid']) . '&letter=' . $_REQUEST['letter'] . '&sortby=' . $_REQUEST['sortby'], $count); $data = $db->fetch("SELECT * FROM " . PRE . "_products_units WHERE 1 " . $typeFilter . $resultFilter . $letterfilter . getorder($orderdef) . getlimit()); $this->ushow_print($data); orderstr($orderdef, 'action.php?action=products.ushow&what=' . $_REQUEST['what'] . iif($_REQUEST['searchid'], '&searchid=' . $_REQUEST['searchid']) . '&letter=' . $_REQUEST['letter']); save_index($_SERVER['REQUEST_URI']); //Layer-Footer ausgeben $html->layer_footer(); }
function show() { global $set, $db, $apx, $html; quicklink('affiliates.add'); //DnD-Hinweis if ($set['affiliates']['orderby'] == 1 && $apx->user->has_right('articles.edit')) { echo '<p class="hint">' . $apx->lang->get('USEDND') . '</p>'; } if ($set['affiliates']['orderby'] != 1) { $orderdef[0] = 'title'; $orderdef['title'] = array('title', 'ASC', 'COL_TITLE'); $orderdef['hits'] = array('hits', 'ASC', 'COL_HITS'); } $col[] = array(' ', 1, ''); $col[] = array('COL_TITLE', 50, 'class="title"'); $col[] = array('COL_IMAGE', 30, 'align="center"'); $col[] = array('COL_HITS', 20, 'align="center"'); $data = $db->fetch("SELECT id,title,link,image,hits,active FROM " . PRE . "_affiliates " . iif(is_array($orderdef), getorder($orderdef), " ORDER BY ord ASC")); $count = count($data); if ($count) { foreach ($data as $res) { ++$i; $size = @getimagesize(BASEDIR . getpath('uploads') . $res['image']); if ($size[0] && $size[0] > 300) { $imageWidth = 300; } if ($res['active']) { $tabledata[$i]['COL1'] = '<img src="design/greendot.gif" alt="' . $apx->lang->get('CORE_ACTIVE') . '" title="' . $apx->lang->get('CORE_ACTIVE') . '" />'; } else { $tabledata[$i]['COL1'] = '<img src="design/reddot.gif" alt="' . $apx->lang->get('CORE_INACTIVE') . '" title="' . $apx->lang->get('CORE_INACTIVE') . '" />'; } $tabledata[$i]['COL2'] = '<a href="../misc.php?action=redirect&url=' . urlencode($res['link']) . '" target="_blank">' . replace($res['title']) . '</a>'; $tabledata[$i]['COL3'] = iif($res['image'], '<img src="../' . getpath('uploads') . $res['image'] . '" width="' . $imageWidth . '" alt="" />', ' '); $tabledata[$i]['COL4'] = number_format($res['hits'], 0, '', '.'); $tabledata[$i]['ID'] = 'node:' . $res['id']; //Optionen if ($apx->user->has_right('affiliates.edit')) { $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'affiliates.edit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('affiliates.del')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'affiliates.del', 'id=' . $res['id'], $apx->lang->get('CORE_DEL')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($res['active'] && $apx->user->has_right('affiliates.disable')) { $tabledata[$i]['OPTIONS'] .= optionHTML('disable.gif', 'affiliates.disable', 'id=' . $res['id'] . '§oken=' . $apx->session->get('sectoken'), $apx->lang->get('CORE_ENABLE')); } elseif (!$res['active'] && $apx->user->has_right('affiliates.enable')) { $tabledata[$i]['OPTIONS'] .= optionHTML('enable.gif', 'affiliates.enable', 'id=' . $res['id'] . '§oken=' . $apx->session->get('sectoken'), $apx->lang->get('CORE_DISABLE')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } } } $apx->tmpl->assign('TABLE', $tabledata); if ($set['affiliates']['orderby'] == 1 && $apx->user->has_right('articles.edit')) { echo '<div class="listview" id="list">'; $html->table($col); echo '</div>'; $apx->tmpl->parse('show_js'); } else { $html->table($col); } orderstr($orderdef, 'action.php?action=affiliates.show'); save_index($_SERVER['REQUEST_URI']); }
function show() { global $set, $db, $apx, $html; //Layer generieren if (!$this->mid) { $data = $db->fetch("SELECT module FROM " . PRE . "_ratings GROUP BY module ORDER BY module ASC"); if (count($data)) { foreach ($data as $res) { if (!$apx->is_module($res['module'])) { continue; } ++$mi; if ($mi == 1 && !$this->module) { $this->module = $res['module']; } $commodules[] = $res['module']; } } if (!is_array($commodules)) { return; } foreach ($apx->modules as $module => $trash) { if ($module == 'ratings') { continue; } if (!in_array($module, $commodules) && $_REQUEST['module'] != $module) { continue; } $layerdef[] = array('MODULENAME_' . strtoupper($module), 'action.php?action=ratings.show&module=' . $module, $this->module == $module); } $html->layer_header($layerdef); } $orderdef[0] = 'time'; $orderdef['rating'] = array('rating', 'ASC', 'COL_RATING'); $orderdef['name'] = array('ip', 'ASC', 'COL_IP'); $orderdef['time'] = array('time', 'DESC', 'COL_TIME'); $col[] = array('COL_RATING', 20, 'align="center"'); $col[] = array('COL_IP', 35, 'align="center"'); $col[] = array('COL_TIME', 45, 'align="center"'); list($count) = $db->first("SELECT count(id) FROM " . PRE . "_ratings WHERE ( module='" . $this->module . "' " . iif($this->mid, "AND mid='" . $this->mid . "'") . " )"); pages('action.php?action=ratings.show&module=' . $this->module . '&mid=' . $this->mid . '&sortby=' . $_REQUEST['sortby'], $count); $data = $db->fetch("SELECT id,ip,rating,time FROM " . PRE . "_ratings WHERE ( module='" . $this->module . "' " . iif($this->mid, "AND mid='" . $this->mid . "'") . " ) " . getorder($orderdef) . getlimit()); if (count($data)) { foreach ($data as $res) { ++$i; $tabledata[$i]['ID'] = $res['id']; $tabledata[$i]['COL1'] = $res['rating']; $tabledata[$i]['COL2'] = $res['ip']; $tabledata[$i]['COL3'] = mkdate($res['time']); //Optionen if ($apx->user->has_right('ratings.del')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'ratings.del', 'module=' . $this->module . '&mid=' . $this->mid . '&id=' . $res['id'], $apx->lang->get('CORE_DEL')); } } } $multiactions = array(); if ($apx->user->has_right('ratings.del')) { $multiactions[] = array($apx->lang->get('CORE_DEL'), 'action.php?action=ratings.del&module=' . $this->module . '&mid=' . $this->mid, false); } $apx->tmpl->assign('TABLE', $tabledata); $html->table($col, $multiactions); orderstr($orderdef, 'action.php?action=ratings.show&module=' . $this->module . '&mid=' . $this->mid); //Layer-Footer ausgeben if (!$this->mid) { $html->layer_footer(); } save_index($_SERVER['REQUEST_URI']); }
function gshow() { global $set, $apx, $db, $html; quicklink('user.gadd'); $orderdef[0] = 'group'; $orderdef['group'] = array('name', 'ASC', 'COL_GROUP'); $col[] = array('COL_GROUP', 75, 'class="title"'); $col[] = array('COL_USERS', 25, 'align="center"'); $data = $db->fetch("SELECT a.*,count(b.groupid) AS count FROM " . PRE . "_user_groups AS a LEFT JOIN " . PRE . "_user AS b USING(groupid) GROUP BY a.groupid " . getorder($orderdef)); if (count($data)) { foreach ($data as $res) { ++$obj; $tabledata[$obj]['COL1'] = replace($res['name']); $tabledata[$obj]['COL2'] = replace($res['count']); //Optionen if ($apx->user->has_right('user.gedit')) { $tabledata[$obj]['OPTIONS'] .= optionHTML('edit.gif', 'user.gedit', 'id=' . $res['groupid'], $apx->lang->get('CORE_EDIT')); } else { $tabledata[$obj]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($res['groupid'] > 3 && $apx->user->has_right('user.gdel') && !$res['count']) { $tabledata[$obj]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'user.gdel', 'id=' . $res['groupid'], $apx->lang->get('CORE_DEL')); } else { $tabledata[$obj]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('user.gclean') && $res['count']) { $tabledata[$obj]['OPTIONS'] .= optionHTMLOverlay('clean.gif', 'user.gclean', 'id=' . $res['groupid'], $apx->lang->get('CLEAN')); } else { $tabledata[$obj]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } } } $apx->tmpl->assign('TABLE', $tabledata); $html->table($col); orderstr($orderdef, 'action.php?action=user.gshow'); save_index($_SERVER['REQUEST_URI']); }
function sshow() { global $set, $db, $apx, $html; quicklink('news.sadd'); $col[] = array('COL_TITLE', 50, ''); $col[] = array('COL_LINK', 50, ''); $orderdef[0] = 'title'; $orderdef['title'] = array('title', 'ASC', 'SORT_TITLE'); $data = $db->fetch("SELECT * FROM " . PRE . "_news_sources" . getorder($orderdef)); $imax = count($data); if ($imax) { foreach ($data as $res) { ++$i; $tabledata[$i]['COL1'] = replace($res['title']); $tabledata[$i]['COL2'] = '<a href="../misc.php?action=redirect&url=' . urlencode($res['link']) . '" target="_blank">' . shorttext($res['link'], 40) . '</a>'; //Optionen if ($apx->user->has_right('news.sedit')) { $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'news.sedit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT')); } if ($apx->user->has_right('news.sdel')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'news.sdel', 'id=' . $res['id'], $apx->lang->get('CORE_DEL')); } } } $apx->tmpl->assign('TABLE', $tabledata); $html->table($col); orderstr($orderdef, 'action.php?action=news.sshow'); save_index($_SERVER['REQUEST_URI']); }
function show() { global $set, $db, $apx, $html; quicklink('teaser.add'); //Gruppen-Auswahl $_REQUEST['gid'] = (int) $_REQUEST['gid']; $groupdata = array(); foreach ($set['teaser']['groups'] as $id => $title) { $groupdata[] = array('ID' => $id, 'TITLE' => compatible_hsc($title), 'SELECTED' => $_REQUEST['gid'] == $id); } $apx->tmpl->assign('GROUP', $groupdata); $apx->tmpl->parse('show_choose'); //DnD-Hinweis if ($set['teaser']['orderby'] == 1 && $apx->user->has_right('articles.edit')) { echo '<p class="hint">' . $apx->lang->get('USEDND') . '</p>'; } if ($set['teaser']['orderby'] != 1) { $orderdef[0] = 'title'; $orderdef['title'] = array('title', 'ASC', 'COL_TITLE'); $orderdef['hits'] = array('hits', 'ASC', 'COL_HITS'); } $col[] = array(' ', 1, ''); $col[] = array('COL_TITLE', 50, 'class="title"'); $col[] = array('COL_IMAGE', 40, 'align="center"'); $col[] = array('COL_HITS', 10, 'align="center"'); list($count) = $db->first("SELECT count(id) FROM " . PRE . "_teaser WHERE 1 " . iif($_REQUEST['gid'], "AND `group`=" . $_REQUEST['gid'])); pages('action.php?action=teaser.show&sortby=' . $_REQUEST['sortby'] . iif($_REQUEST['gid'], '&gid=' . $_REQUEST['gid']), $count); $data = $db->fetch("SELECT id,title,link,image,hits,starttime,endtime FROM " . PRE . "_teaser WHERE 1 " . iif($_REQUEST['gid'], "AND `group`=" . $_REQUEST['gid']) . section_filter() . " " . iif(is_array($orderdef), getorder($orderdef), " ORDER BY ord ASC") . getlimit()); $count = count($data); if ($count) { foreach ($data as $res) { ++$i; $size = @getimagesize(BASEDIR . getpath('uploads') . $res['image']); if ($size[0] && $size[0] > 300) { $imageWidth = 300; } if (!$res['starttime']) { $tabledata[$i]['COL1'] = '<img src="design/reddot.gif" alt="' . $apx->lang->get('CORE_INACTIVE') . '" title="' . $apx->lang->get('CORE_INACTIVE') . '" />'; } elseif ($res['endtime'] < time()) { $tabledata[$i]['COL1'] = '<img src="design/greendotcross.gif" alt="' . $apx->lang->get('CORE_INACTIVE') . '" title="' . $apx->lang->get('CORE_INACTIVE') . '" />'; } elseif ($res['starttime'] > time()) { $tabledata[$i]['COL1'] = '<img src="design/greendotwait.gif" alt="' . $apx->lang->get('CORE_ACTIVE') . '" title="' . $apx->lang->get('CORE_ACTIVE') . '" />'; } else { $tabledata[$i]['COL1'] = '<img src="design/greendot.gif" alt="' . $apx->lang->get('CORE_ACTIVE') . '" title="' . $apx->lang->get('CORE_ACTIVE') . '" />'; } $tabledata[$i]['COL2'] = '<a href="../misc.php?action=redirect&url=' . urlencode($res['link']) . '" target="_blank">' . replace($res['title']) . '</a>'; $tabledata[$i]['COL3'] = iif($res['image'], '<img src="../' . getpath('uploads') . $res['image'] . '" width="' . $imageWidth . '" alt="" />', ' '); $tabledata[$i]['COL4'] = number_format($res['hits'], 0, '', '.'); $tabledata[$i]['COL5'] = number_format($res['hits'], 0, '', '.'); $tabledata[$i]['ID'] = 'node:' . $res['id']; //Optionen if ($apx->user->has_right('teaser.edit')) { $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'teaser.edit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('teaser.del')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'teaser.del', 'id=' . $res['id'], $apx->lang->get('CORE_DEL')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if (!$res['starttime'] || $res['endtime'] < time()) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('enable.gif', 'teaser.enable', 'id=' . $res['id'], $apx->lang->get('CORE_ENABLE')); } elseif ($res['starttime'] && $apx->user->has_right('teaser.disable')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('disable.gif', 'teaser.disable', 'id=' . $res['id'], $apx->lang->get('CORE_DISABLE')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } } } $apx->tmpl->assign('TABLE', $tabledata); if ($set['teaser']['orderby'] == 1 && $apx->user->has_right('articles.edit')) { echo '<div class="listview" id="list">'; $html->table($col); echo '</div>'; $apx->tmpl->parse('show_js'); } else { $html->table($col); } orderstr($orderdef, 'action.php?action=teaser.show' . iif($_REQUEST['gid'], '&gid=' . $_REQUEST['gid'])); save_index($_SERVER['REQUEST_URI']); }
function catshow() { global $set, $db, $apx, $html; quicklink('glossar.catadd'); $col[] = array('ID', 3, 'align="center"'); $col[] = array('COL_CATNAME', 72, 'class="title"'); $col[] = array('COL_ENTRIES', 25, 'align="center"'); $orderdef[0] = 'title'; $orderdef['title'] = array('title', 'ASC', 'COL_CATNAME'); list($count) = $db->first("SELECT count(id) FROM " . PRE . "_glossar_cat"); pages('action.php?action=glossar.catshow', $count); $data = $db->fetch("SELECT * FROM " . PRE . "_glossar_cat " . getorder($orderdef) . getlimit()); if (count($data)) { //Ausgabe erfolgt foreach ($data as $res) { ++$i; list($entries) = $db->first("SELECT count(id) FROM " . PRE . "_glossar WHERE catid='" . $res['id'] . "'"); $tabledata[$i]['COL1'] = $res['id']; $tabledata[$i]['COL2'] = $space[$res['id']] . ' ' . replace($res['title']); $tabledata[$i]['COL3'] = $entries; //Optionen if ($apx->user->has_right('glossar.catedit')) { $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'glossar.catedit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('glossar.catdel') && !$entries && !$res['children']) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'glossar.catdel', 'id=' . $res['id'], $apx->lang->get('CORE_DEL')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('glossar.catclean') && $entries) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('clean.gif', 'glossar.catclean', 'id=' . $res['id'], $apx->lang->get('CLEAN')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } unset($entries); } } $apx->tmpl->assign('TABLE', $tabledata); $html->table($col); orderstr($orderdef, 'action.php?action=glossar.catshow'); save_index($_SERVER['REQUEST_URI']); }
function show() { global $set, $db, $apx, $html; quicklink_multi('comments.blockip'); quicklink_multi('comments.blockcontent'); quicklink_out(); //Layer generieren if (!$this->mid) { $commodules = array(); $layerdef = array(); $data = $db->fetch("SELECT module FROM " . PRE . "_comments GROUP BY module ORDER BY module ASC"); if (count($data)) { foreach ($data as $res) { //if ( !$apx->is_module($res['module']) ) continue; ++$mi; if ($mi == 1 && !$this->module) { $this->module = $res['module']; } $commodules[] = $res['module']; } } foreach ($apx->modules as $module => $trash) { if ($module == 'comments') { continue; } if (!in_array($module, $commodules) && $_REQUEST['module'] != $module) { continue; } $layerdef[] = array('MODULENAME_' . strtoupper($module), 'action.php?action=comments.show&module=' . $module, $this->module == $module); } if (count($layerdef)) { $html->layer_header($layerdef); } } $orderdef[0] = 'time'; $orderdef['name'] = array('username', 'ASC', 'COL_NAME'); $orderdef['time'] = array('time', 'DESC', 'SORT_TIME'); if ($this->coms->set['mod']) { $col[] = array('', 2, 'align="center"'); } $col[] = array('COL_NAME', 33, 'class="title"'); $col[] = array('COL_TEXT', 50, ''); $col[] = array('COL_IP', 17, 'align="center"'); list($count) = $db->first("SELECT count(id) FROM " . PRE . "_comments WHERE ( module='" . $this->module . "' " . iif($this->mid, "AND mid='" . $this->mid . "'") . " )"); pages('action.php?action=comments.show&module=' . $this->module . '&mid=' . $this->mid . '&sortby=' . $_REQUEST['sortby'], $count); $data = $db->fetch("SELECT id,username,text,ip,active FROM " . PRE . "_comments WHERE ( module='" . $this->module . "' " . iif($this->mid, "AND mid='" . $this->mid . "'") . " ) " . getorder($orderdef) . getlimit()); if (count($data)) { foreach ($data as $res) { ++$i; $icol = 0; //Moderiert -> Icons if ($this->coms->set['mod']) { if ($res['active']) { $tabledata[$i]['COL' . ++$icol] = '<img src="design/greendot.gif" alt="' . $apx->lang->get('CORE_ACTIVE') . '" title="' . $apx->lang->get('CORE_ACTIVE') . '" />'; } else { $tabledata[$i]['COL' . ++$icol] = '<img src="design/reddot.gif" alt="' . $apx->lang->get('CORE_INACTIVE') . '" title="' . $apx->lang->get('CORE_INACTIVE') . '" />'; } } $tabledata[$i]['COL' . ++$icol] = replace($res['username']); $tabledata[$i]['COL' . ++$icol] = shorttext($res['text'], 50); $tabledata[$i]['COL' . ++$icol] = $res['ip'] . iif($apx->user->has_right('comments.blockip'), ' <a href="action.php?action=comments.blockip&setip=' . $res['ip'] . '"><img src="design/block.gif" alt="' . $apx->lang->get('BLOCK') . '" title="' . $apx->lang->get('BLOCK') . '" /></a>'); $tabledata[$i]['ID'] = $res['id']; //Optionen if ($apx->user->has_right('comments.edit')) { $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'comments.edit', 'module=' . $this->module . '&mid=' . $this->mid . '&id=' . $res['id'], $apx->lang->get('CORE_EDIT')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('comments.del')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'comments.del', 'module=' . $this->module . '&mid=' . $this->mid . '&id=' . $res['id'], $apx->lang->get('CORE_DEL')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } //Moderiert -> Enable/Disable if ($this->coms->set['mod']) { if ($res['active'] && $apx->user->has_right("comments.disable")) { $tabledata[$i]['OPTIONS'] .= optionHTML('disable.gif', 'comments.disable', 'module=' . $this->module . '&mid=' . $this->mid . '&id=' . $res['id'] . '§oken=' . $apx->session->get('sectoken'), $apx->lang->get('CORE_DISABLE')); } elseif (!$res['active'] && $apx->user->has_right("comments.enable")) { $tabledata[$i]['OPTIONS'] .= optionHTML('enable.gif', 'comments.enable', 'module=' . $this->module . '&mid=' . $this->mid . '&id=' . $res['id'] . '§oken=' . $apx->session->get('sectoken'), $apx->lang->get('CORE_ENABLE')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } } } } $multiactions = array(); if ($apx->user->has_right('comments.del')) { $multiactions[] = array($apx->lang->get('CORE_DEL'), 'action.php?action=comments.del&module=' . $this->module . '&mid=' . $this->mid); } if ($this->coms->set['mod']) { if ($apx->user->has_right('comments.enable')) { $multiactions[] = array($apx->lang->get('CORE_ENABLE'), 'action.php?action=comments.enable&module=' . $this->module . '&mid=' . $this->mid); } if ($apx->user->has_right('comments.disable')) { $multiactions[] = array($apx->lang->get('CORE_DISABLE'), 'action.php?action=comments.disable&module=' . $this->module . '&mid=' . $this->mid); } } $apx->tmpl->assign('TABLE', $tabledata); $html->table($col, $multiactions); orderstr($orderdef, 'action.php?action=comments.show&module=' . $this->module . '&mid=' . $this->mid); //Layer-Footer ausgeben if (!$this->mid && count($layerdef)) { $html->layer_footer(); } save_index($_SERVER['REQUEST_URI']); }
function catshow() { global $set, $db, $apx, $html; //Struktur reparieren if ($_REQUEST['repair'] && $set['articles']['subcats']) { $this->cat->repair(); echo 'Repair done!'; return; } quicklink('articles.catadd'); //DnD-Hinweis if ($set['articles']['subcats'] && $apx->user->has_right('articles.edit')) { echo '<p class="hint">' . $apx->lang->get('USEDND') . '</p>'; } $col[] = array('ID', 0, 'align="center"'); $col[] = array('COL_CATNAME', 75, 'class="title"'); $col[] = array('COL_ARTICLES', 25, 'align="center"'); if ($set['articles']['subcats']) { $data = $this->cat->getTree(array('title', 'open')); } else { $orderdef[0] = 'title'; $orderdef['title'] = array('title', 'ASC', 'COL_CATNAME'); list($count) = $db->first("SELECT count(id) FROM " . PRE . "_articles_cat"); pages('action.php?action=articles.catshow', $count); $data = $db->fetch("SELECT * FROM " . PRE . "_articles_cat " . getorder($orderdef) . getlimit()); } if (count($data)) { //Ausgabe erfolgt foreach ($data as $res) { ++$i; if ($res['open']) { list($articles) = $db->first("SELECT count(id) FROM " . PRE . "_articles WHERE catid='" . $res['id'] . "'"); } $tabledata[$i]['COL1'] = $res['id']; $tabledata[$i]['COL2'] = replace($res['title']); $tabledata[$i]['COL3'] = iif(isset($articles), $articles, ' '); $tabledata[$i]['CLASS'] = 'l' . ($res['level'] - 1) . ($res['children'] ? ' haschildren' : '') . ($res['level'] > 1 ? ' hidden' : '') . ($res['iscat'] ? ' dark' : ''); $tabledata[$i]['ID'] = 'node:' . $res['id']; //Optionen if ($apx->user->has_right('articles.catedit')) { $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'articles.catedit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('articles.catdel') && !$articles) { $tabledata[$i]['OPTIONS'] .= '<span class="ifhasnochildren">' . optionHTMLOverlay('del.gif', 'articles.catdel', 'id=' . $res['id'], $apx->lang->get('CORE_DEL')) . '</span><span class="ifhaschildren"><img alt="" src="design/ispace.gif"/></span>'; } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('articles.catclean') && $articles) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('clean.gif', 'articles.catclean', 'id=' . $res['id'], $apx->lang->get('CLEAN')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } //Anordnen nur bei Unterkategorien /*if ( $set['articles']['subcats'] ) { $tabledata[$i]['OPTIONS'].=' '; if ( $apx->user->has_right('articles.catmove') && $follow[$res['id']]['prev'] ) $tabledata[$i]['OPTIONS'].=optionHTML('moveup.gif', 'articles.catmove', 'direction=up&id='.$res['id'].'§oken='.$apx->session->get('sectoken'), $apx->lang->get('MOVEUP')); else $tabledata[$i]['OPTIONS'].='<img src="design/ispace_small.gif" alt="" style="vertical-align:middle;" />'; if ( $apx->user->has_right('articles.catmove') && $follow[$res['id']]['next'] ) $tabledata[$i]['OPTIONS'].=optionHTML('movedown.gif', 'articles.catmove', 'direction=down&id='.$res['id'].'§oken='.$apx->session->get('sectoken'), $apx->lang->get('MOVEDOWN')); else $tabledata[$i]['OPTIONS'].='<img src="design/ispace_small.gif" alt="" style="vertical-align:middle;" />'; }*/ unset($articles); } } $apx->tmpl->assign('TABLE', $tabledata); //Mit Unter-Kategorien if ($set['articles']['subcats']) { echo '<div class="treeview" id="tree">'; $html->table($col); echo '</div>'; $open = $apx->session->get('articles_cat_open'); $open = dash_unserialize($open); $opendata = array(); foreach ($open as $catid) { $opendata[] = array('ID' => $catid); } $apx->tmpl->assign('OPEN', $opendata); $apx->tmpl->assign('EDIT_ALLOWED', $apx->user->has_right('articles.edit')); $apx->tmpl->parse('catshow_js'); } else { $html->table($col); orderstr($orderdef, 'action.php?action=articles.catshow'); } save_index($_SERVER['REQUEST_URI']); }
function show() { global $set, $db, $apx, $html; quicklink('banner.add'); //Gruppen-Auswahl $_REQUEST['gid'] = (int) $_REQUEST['gid']; $groupdata = array(); foreach ($set['banner']['groups'] as $id => $title) { $groupdata[] = array('ID' => $id, 'TITLE' => compatible_hsc($title), 'SELECTED' => $_REQUEST['gid'] == $id); } $apx->tmpl->assign('GROUP', $groupdata); $apx->tmpl->parse('show_choose'); $orderdef[0] = 'partner'; $orderdef['partner'] = array('partner', 'ASC', 'COL_PARTNER'); $orderdef['views'] = array('views', 'ASC', 'COL_VIEWS'); $orderdef['group'] = array('a.group', 'ASC', 'COL_GROUP'); $col[] = array('', 1, ''); $col[] = array('COL_PARTNER', 40, 'class="title"'); $col[] = array('COL_PERIOD', 25, 'align="center"'); $col[] = array('COL_VIEWS', 15, 'align="center"'); $col[] = array('COL_GROUP', 20, 'align="center"'); list($count) = $db->first("SELECT count(id) FROM " . PRE . "_banner WHERE 1 " . iif($_REQUEST['gid'], "AND `group`=" . $_REQUEST['gid'])); pages('action.php?action=banner.show&sortby=' . $_REQUEST['sortby'] . iif($_REQUEST['gid'], '&gid=' . $_REQUEST['gid']), $count); $data = $db->fetch("SELECT * FROM " . PRE . "_banner AS a WHERE 1 " . iif($_REQUEST['gid'], "AND `group`=" . $_REQUEST['gid']) . getorder($orderdef) . getlimit()); if (count($data)) { foreach ($data as $res) { ++$i; if (!$res['starttime']) { $tabledata[$i]['COL1'] = '<img src="design/reddot.gif" alt="' . $apx->lang->get('CORE_INACTIVE') . '" title="' . $apx->lang->get('CORE_INACTIVE') . '" />'; } elseif ($res['endtime'] < time()) { $tabledata[$i]['COL1'] = '<img src="design/greendotcross.gif" alt="' . $apx->lang->get('CORE_INACTIVE') . '" title="' . $apx->lang->get('CORE_INACTIVE') . '" />'; } elseif ($res['starttime'] > time()) { $tabledata[$i]['COL1'] = '<img src="design/greendotwait.gif" alt="' . $apx->lang->get('CORE_ACTIVE') . '" title="' . $apx->lang->get('CORE_ACTIVE') . '" />'; } else { $tabledata[$i]['COL1'] = '<img src="design/greendot.gif" alt="' . $apx->lang->get('CORE_ACTIVE') . '" title="' . $apx->lang->get('CORE_ACTIVE') . '" />'; } $period = ''; if ($res['starttime']) { $period = $apx->lang->get('FROM') . ': ' . mkdate($res['starttime']); if ($res['endtime'] != 3000000000) { $period .= '<br />' . $apx->lang->get('TILL') . ': ' . mkdate($res['endtime']); } } $tabledata[$i]['COL2'] = replace($res['partner']); $tabledata[$i]['COL3'] = $period; $tabledata[$i]['COL4'] = number_format($res['views'], 0, '', '.') . iif($res['limit'], ' / ' . number_format($res['limit'], 0, '', '.')); $tabledata[$i]['COL5'] = $set['banner']['groups'][$res['group']]; //Limit erreicht? if ($res['limit'] && $res['views'] >= $res['limit']) { $tabledata[$i]['COL4'] = '<span style="color:red;">' . $tabledata[$i]['COL4'] . '</span>'; } //Optionen if ($apx->user->has_right('banner.edit')) { $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'banner.edit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('banner.del')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'banner.del', 'id=' . $res['id'], $apx->lang->get('CORE_DEL')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ((!$res['starttime'] || $res['endtime'] < time()) && $apx->user->has_right('banner.enable')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('enable.gif', 'banner.enable', 'id=' . $res['id'], $apx->lang->get('CORE_ENABLE')); } elseif ($res['starttime'] && $apx->user->has_right('banner.disable')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('disable.gif', 'banner.disable', 'id=' . $res['id'], $apx->lang->get('CORE_DISABLE')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } } } $apx->tmpl->assign('TABLE', $tabledata); $html->table($col); orderstr($orderdef, "action.php?action=banner.show"); save_index($_SERVER['REQUEST_URI']); }
function rules() { global $set, $apx, $db, $html; quicklink('mediamanager.radd', 'action.php', 'module=' . $this->module); $orderdef[0] = 'extension'; $orderdef['extension'] = array('extension', 'ASC', 'SORT_EXTENSION'); $orderdef['name'] = array('name', 'ASC', 'SORT_NAME'); $col[] = array('', 1, 'align="center"'); $col[] = array('COL_EXTENSION', 20, 'align="center"'); $col[] = array('COL_NAME', 80, 'class="title"'); $data = $db->fetch("SELECT id,extension,name FROM " . PRE . "_mediarules " . getorder($orderdef)); if (count($data)) { foreach ($data as $res) { ++$i; if (file_exists("design/mm/" . strtolower($res['extension']) . ".gif")) { $tabledata[$i]['COL1'] = '<img src="design/mm/' . strtolower($res['extension']) . '.gif" alt="' . strtoupper($res['extension']) . '" title="' . strtoupper($res['extension']) . '" />'; } else { $tabledata[$i]['COL1'] = '<img src="design/mm/blank.gif" alt="' . strtoupper($res['extension']) . '" title="' . strtoupper($res['extension']) . '" />'; } $tabledata[$i]['COL2'] = replace(strtoupper($res['extension'])); $tabledata[$i]['COL3'] = replace($res['name']); //Optionen if ($apx->user->has_right("mediamanager.redit")) { $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'mediamanager.redit', 'id=' . $res['id'] . '&module=' . $this->module, $apx->lang->get('CORE_EDIT')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right("mediamanager.rdel")) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'mediamanager.rdel', 'id=' . $res['id'] . '&module=' . $this->module, $apx->lang->get('CORE_DEL')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } } } $apx->tmpl->assign('TABLE', $tabledata); $html->table($col); orderstr($orderdef, 'action.php?action=mediamanager.rules'); save_index($_SERVER['REQUEST_URI']); }
function ranks() { global $set, $apx, $db, $html; //Aktionen if ($_REQUEST['do'] == 'add') { return $this->ranks_add(); } if ($_REQUEST['do'] == 'edit') { return $this->ranks_edit(); } if ($_REQUEST['do'] == 'del') { return $this->ranks_del(); } //Voreinstellung if (!$_REQUEST['what']) { $_REQUEST['what'] = 'posts'; } echo '<p class="slink">» <a href="action.php?action=forum.ranks&do=add&criteria=' . $_REQUEST['what'] . '">' . $apx->lang->get('ADDRANK') . '</a></p>'; //Layer $layerdef[] = array('LAYER_POST', 'action.php?action=forum.ranks&what=posts', $_REQUEST['what'] == 'posts'); $layerdef[] = array('LAYER_USER', 'action.php?action=forum.ranks&what=user', $_REQUEST['what'] == 'user'); $layerdef[] = array('LAYER_USERGROUPS', 'action.php?action=forum.ranks&what=groups', $_REQUEST['what'] == 'groups'); //Layer Header ausgeben $html->layer_header($layerdef); ///////////////////// Benutzer-Ränge if ($_REQUEST['what'] == 'user') { $col[] = array('COL_RANK', 50, 'class="title"'); $col[] = array('COL_USER', 50, 'align="center"'); $orderdef[0] = 'title'; $orderdef['title'] = array('a.title', 'ASC', 'COL_RANK'); $orderdef['username'] = array('b.username', 'ASC', 'COL_USER'); list($count) = $db->first("SELECT count(id) FROM " . PRE . "_forum_ranks WHERE userid!=''"); pages('action.php?action=forum.ranks&what=' . $_REQUEST['what'] . '&sortby=' . $_REQUEST['sortby'], $count); $data = $db->fetch("SELECT a.id,a.title,a.userid,b.username FROM " . PRE . "_forum_ranks AS a LEFT JOIN " . PRE . "_user AS b USING(userid) WHERE a.userid!='' " . getorder($orderdef) . getlimit()); if (count($data)) { foreach ($data as $res) { ++$i; $tabledata[$i]['COL1'] = $res['title']; $tabledata[$i]['COL2'] = $res['username']; //Optionen $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'forum.ranks', 'do=edit&id=' . $res['id'], $apx->lang->get('CORE_EDIT')); $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'forum.ranks', 'do=del&id=' . $res['id'], $apx->lang->get('CORE_DEL')); } } } elseif ($_REQUEST['what'] == 'groups') { $col[] = array('COL_RANK', 70, 'class="title"'); $col[] = array('COL_USERGROUP', 30, 'align="center"'); $orderdef[0] = 'title'; $orderdef['title'] = array('a.title', 'ASC', 'COL_RANK'); $orderdef['group'] = array('b.name', 'ASC', 'COL_USERGROUP'); list($count) = $db->first("SELECT count(id) FROM " . PRE . "_forum_ranks WHERE groupid!=0"); pages('action.php?action=forum.ranks&what=' . $_REQUEST['what'] . '&sortby=' . $_REQUEST['sortby'], $count); $data = $db->fetch("SELECT a.id,a.title,b.name FROM " . PRE . "_forum_ranks AS a LEFT JOIN " . PRE . "_user_groups AS b USING(groupid) WHERE a.groupid!=0 " . getorder($orderdef) . getlimit()); if (count($data)) { foreach ($data as $res) { ++$i; $tabledata[$i]['COL1'] = $res['title']; $tabledata[$i]['COL2'] = $res['name']; //Optionen $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'forum.ranks', 'do=edit&id=' . $res['id'], $apx->lang->get('CORE_EDIT')); $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'forum.ranks', 'do=del&id=' . $res['id'], $apx->lang->get('CORE_DEL')); } } } else { $col[] = array('COL_RANK', 70, 'class="title"'); $col[] = array('COL_POSTS', 30, 'align="center"'); $orderdef[0] = 'posts'; $orderdef['title'] = array('title', 'ASC', 'COL_RANK'); $orderdef['posts'] = array('minposts', 'ASC', 'COL_POSTS'); list($count) = $db->first("SELECT count(id) FROM " . PRE . "_forum_ranks WHERE minposts!=-1"); pages('action.php?action=forum.ranks&sortby=' . $_REQUEST['sortby'], $count); $data = $db->fetch("SELECT id,title,minposts FROM " . PRE . "_forum_ranks WHERE minposts!=-1 " . getorder($orderdef) . getlimit()); if (count($data)) { foreach ($data as $res) { ++$i; $tabledata[$i]['COL1'] = $res['title']; $tabledata[$i]['COL2'] = $res['minposts']; //Optionen $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'forum.ranks', 'do=edit&id=' . $res['id'], $apx->lang->get('CORE_EDIT')); $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'forum.ranks', 'do=del&id=' . $res['id'], $apx->lang->get('CORE_DEL')); } } } $apx->tmpl->assign('TABLE', $tabledata); $html->table($col); orderstr($orderdef, 'action.php?action=forum.ranks&what=' . $_REQUEST['what']); save_index($_SERVER['REQUEST_URI']); //Layer-Footer ausgeben $html->layer_footer(); }
function show() { global $set, $db, $apx, $html; //Suche durchführen if ($_REQUEST['item'] && ($_REQUEST['title'] || $_REQUEST['text']) || $_REQUEST['secid'] || $_REQUEST['catid'] || $_REQUEST['userid']) { $where = ''; $_REQUEST['secid'] = (int) $_REQUEST['secid']; $_REQUEST['catid'] = (int) $_REQUEST['catid']; $_REQUEST['userid'] = (int) $_REQUEST['userid']; //Suchbegriff if ($_REQUEST['item']) { if ($_REQUEST['title']) { $sc[] = "title LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; } if ($_REQUEST['subtitle']) { $sc[] = "subtitle LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; } if ($_REQUEST['teaser']) { $sc[] = "teaser LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; } if ($_REQUEST['text']) { $sc[] = "text LIKE '%" . addslashes_like($_REQUEST['item']) . "%'"; } if (is_array($sc)) { $where .= ' AND ( ' . implode(' OR ', $sc) . ' )'; } } //Sektion if (!$apx->session->get('section') && $_REQUEST['secid']) { $where .= " AND ( secid LIKE '%|" . $_REQUEST['secid'] . "|%' OR secid='all' ) "; } //Kategorie if ($_REQUEST['catid']) { $tree = $this->cat->getChildrenIds($_REQUEST['catid']); $tree[] = $_REQUEST['catid']; if (is_array($tree)) { $where .= " AND catid IN (" . implode(',', $tree) . ") "; } } //Benutzer if ($_REQUEST['userid']) { $where .= " AND userid='" . $_REQUEST['userid'] . "' "; } $data = $db->fetch("SELECT id FROM " . PRE . "_videos WHERE 1 " . $where); $ids = get_ids($data, 'id'); $ids[] = -1; $searchid = saveSearchResult('admin_videos', $ids, array('item' => $_REQUEST['item'], 'title' => $_REQUEST['title'], 'text' => $_REQUEST['text'], 'catid' => $_REQUEST['catid'], 'secid' => $_REQUEST['secid'], 'userid' => $_REQUEST['userid'])); header("HTTP/1.1 301 Moved Permanently"); header('Location: action.php?action=videos.show&what=' . $_REQUEST['what'] . '&searchid=' . $searchid); return; } //Unbroken setzen $_REQUEST['unbroken'] = (int) $_REQUEST['unbroken']; if ($_REQUEST['unbroken']) { $db->query("UPDATE " . PRE . "_videos SET broken='' WHERE id='" . $_REQUEST['unbroken'] . "' LIMIT 1"); } //Vorgaben $_REQUEST['title'] = 1; $_REQUEST['text'] = 1; quicklink('videos.add'); $layerdef[] = array('LAYER_ALL', 'action.php?action=videos.show', !$_REQUEST['what']); $layerdef[] = array('LAYER_BROKEN', 'action.php?action=videos.show&what=broken', $_REQUEST['what'] == 'broken'); if ($set['videos']['ffmpeg'] && $set['videos']['flvtool2']) { $layerdef[] = array('LAYER_FAILED', 'action.php?action=videos.show&what=failed', $_REQUEST['what'] == 'failed'); } //Layer Header ausgeben $html->layer_header($layerdef); $orderdef[0] = 'creation'; $orderdef['title'] = array('a.title', 'ASC', 'COL_TITLE'); $orderdef['user'] = array('b.username', 'ASC', 'COL_AUTHOR'); $orderdef['category'] = array('c.title', 'ASC', 'COL_CATEGORY'); $orderdef['creation'] = array('a.addtime', 'DESC', 'SORT_ADDTIME'); $orderdef['publication'] = array('a.starttime', 'DESC', 'SORT_STARTTIME'); $orderdef['hits'] = array('a.hits', 'DESC', 'COL_HITS'); $orderdef['downloads'] = array('a.downloads', 'DESC', 'COL_DOWNLOADS'); //Suchergebnis? $resultFilter = ''; if ($_REQUEST['searchid']) { $searchRes = getSearchResult('admin_videos', $_REQUEST['searchid']); if ($searchRes) { list($resultIds, $resultMeta) = $searchRes; $_REQUEST['item'] = $resultMeta['item']; $_REQUEST['title'] = $resultMeta['title']; $_REQUEST['subtitle'] = $resultMeta['subtitle']; $_REQUEST['teaser'] = $resultMeta['teaser']; $_REQUEST['text'] = $resultMeta['text']; $_REQUEST['catid'] = $resultMeta['catid']; $_REQUEST['secid'] = $resultMeta['secid']; $_REQUEST['userid'] = $resultMeta['userid']; $resultFilter = " AND a.id IN (" . implode(', ', $resultIds) . ")"; } else { $_REQUEST['searchid'] = ''; } } //Sektionen auflisten $seclist = ''; if (is_array($apx->sections) && count($apx->sections)) { foreach ($apx->sections as $res) { $seclist .= '<option value="' . $res['id'] . '"' . iif($_REQUEST['secid'] == $res['id'], ' selected="selected"') . '>' . replace($res['title']) . '</option>'; } } //Kategorien auflisten $catlist = ''; $data = $this->cat->getTree(array('title', 'open')); if (count($data)) { foreach ($data as $res) { if ($res['level']) { $space = str_repeat(' ', $res['level'] - 1); } $catlist .= '<option value="' . $res['id'] . '"' . iif($_REQUEST['catid'] == $res['id'], ' selected="selected"') . '>' . $space . replace($res['title']) . '</option>'; } } //Benutzer auflisten $userlist = ''; $data = $db->fetch("SELECT b.userid,b.username FROM " . PRE . "_videos AS a LEFT JOIN " . PRE . "_user AS b USING (userid) WHERE a.userid!=0 GROUP BY userid ORDER BY username ASC"); if (count($data)) { foreach ($data as $res) { $userlist .= '<option value="' . $res['userid'] . '"' . iif($_REQUEST['userid'] == $res['userid'], ' selected="selected"') . '>' . replace($res['username']) . '</option>'; } } $apx->tmpl->assign('ITEM', compatible_hsc($_REQUEST['item'])); $apx->tmpl->assign('SECLIST', $seclist); $apx->tmpl->assign('CATLIST', $catlist); $apx->tmpl->assign('USERLIST', $userlist); $apx->tmpl->assign('STITLE', (int) $_REQUEST['title']); $apx->tmpl->assign('STEXT', (int) $_REQUEST['text']); $apx->tmpl->assign('WHAT', $_REQUEST['what']); $apx->tmpl->assign('EXTENDED', $searchRes); $apx->tmpl->parse('search'); //Filter $layerFilter = ''; if ($_REQUEST['what'] == 'broken') { $layerFilter = " AND a.broken!=0 "; } elseif ($_REQUEST['what'] == 'failed') { $layerFilter = " AND a.status='failed' "; } list($count) = $db->first("SELECT count(userid) FROM " . PRE . "_videos AS a WHERE 1 " . $resultFilter . $layerFilter . section_filter(true, 'secid')); pages('action.php?action=videos.show&what=' . $_REQUEST['what'] . iif($_REQUEST['searchid'], '&searchid=' . $_REQUEST['searchid']) . '&sortby=' . $_REQUEST['sortby'], $count); $data = $db->fetch("SELECT a.id,a.secid,a.title,a.addtime,a.status,a.allowcoms,a.allowrating,a.starttime,a.endtime,a.broken,a.hits,a.downloads,b.userid,b.username,c.title AS catname FROM " . PRE . "_videos AS a LEFT JOIN " . PRE . "_user AS b USING(userid) LEFT JOIN " . PRE . "_videos_cat AS c ON a.catid=c.id WHERE 1 " . $resultFilter . $layerFilter . section_filter(true, 'a.secid') . " " . getorder($orderdef) . getlimit()); $this->show_print($data); orderstr($orderdef, 'action.php?action=videos.show&what=' . $_REQUEST['what'] . iif($_REQUEST['searchid'], '&searchid=' . $_REQUEST['searchid'])); save_index($_SERVER['REQUEST_URI']); //Layer-Footer ausgeben $html->layer_footer(); }
function show() { global $set, $db, $apx, $html; quicklink_multi('guestbook.blockip'); quicklink_multi('guestbook.blockcontent'); quicklink_out(); $orderdef[0] = 'time'; $orderdef['name'] = array('username', 'ASC', 'COL_NAME'); $orderdef['time'] = array('time', 'DESC', 'SORT_TIME'); if ($set['guestbook']['mod']) { $col[] = array('', 1, 'align="center"'); } $col[] = array('COL_NAME', 30, 'class="title"'); $col[] = array('COL_TEXT', 50, ''); $col[] = array('COL_IP', 20, 'align="center"'); list($count) = $db->first("SELECT count(id) FROM " . PRE . "_guestbook"); pages('action.php?action=guestbook.show&sortby=' . $_REQUEST['sortby'], $count); $data = $db->fetch("SELECT id,username,text,ip,active,com_text FROM " . PRE . "_guestbook " . getorder($orderdef) . getlimit()); if (count($data)) { foreach ($data as $res) { ++$i; $icol = 0; //Moderiert -> Icons if ($set['guestbook']['mod']) { if ($res['active']) { $tabledata[$i]['COL' . ++$icol] = '<img src="design/greendot.gif" alt="' . $apx->lang->get('CORE_ACTIVE') . '" title="' . $apx->lang->get('CORE_ACTIVE') . '" />'; } else { $tabledata[$i]['COL' . ++$icol] = '<img src="design/reddot.gif" alt="' . $apx->lang->get('CORE_INACTIVE') . '" title="' . $apx->lang->get('CORE_INACTIVE') . '" />'; } } $tabledata[$i]['COL' . ++$icol] = replace($res['username']); $tabledata[$i]['COL' . ++$icol] = shorttext($res['text'], 50); $tabledata[$i]['COL' . ++$icol] = $res['ip'] . iif($apx->user->has_right('guestbook.blockip'), ' <a href="action.php?action=guestbook.blockip&setip=' . $res['ip'] . '"><img src="design/block.gif" alt="' . $apx->lang->get('BLOCK') . '" title="' . $apx->lang->get('BLOCK') . '" /></a>'); $tabledata[$i]['ID'] = $res['id']; //Optionen if ($apx->user->has_right('guestbook.edit')) { $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'guestbook.edit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('guestbook.del')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'guestbook.del', 'id=' . $res['id'], $apx->lang->get('CORE_DEL')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } //Moderiert -> Enable/Disable if ($set['guestbook']['mod']) { if ($res['active'] && $apx->user->has_right('guestbook.disable')) { $tabledata[$i]['OPTIONS'] .= optionHTML('disable.gif', 'guestbook.disable', 'id=' . $res['id'] . '§oken=' . $apx->session->get('sectoken'), $apx->lang->get('CORE_DISABLE')); } elseif (!$res['active'] && $apx->user->has_right('guestbook.enable')) { $tabledata[$i]['OPTIONS'] .= optionHTML('enable.gif', 'guestbook.enable', 'id=' . $res['id'] . '§oken=' . $apx->session->get('sectoken'), $apx->lang->get('CORE_ENABLE')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } } $tabledata[$i]['OPTIONS'] .= ' '; if ($apx->user->has_right('guestbook.com')) { $icon = 'comment_none.gif'; if ($res['com_text']) { $icon = 'comment.gif'; } $tabledata[$i]['OPTIONS'] .= optionHTML($icon, 'guestbook.com', 'id=' . $res['id'], $apx->lang->get('ADDCOM')); } } } $multiactions = array(); if ($apx->user->has_right('guestbook.del')) { $multiactions[] = array($apx->lang->get('CORE_DEL'), 'action.php?action=guestbook.del&module=' . $this->module . '&mid=' . $this->mid); } if ($set['guestbook']['mod']) { if ($apx->user->has_right('guestbook.enable')) { $multiactions[] = array($apx->lang->get('CORE_ENABLE'), 'action.php?action=guestbook.enable&module=' . $this->module . '&mid=' . $this->mid); } if ($apx->user->has_right('guestbook.disable')) { $multiactions[] = array($apx->lang->get('CORE_DISABLE'), 'action.php?action=guestbook.disable&module=' . $this->module . '&mid=' . $this->mid); } } $apx->tmpl->assign('TABLE', $tabledata); $html->table($col, $multiactions); orderstr($orderdef, 'action.php?action=guestbook.show&id=' . $_REQUEST['id']); save_index($_SERVER['REQUEST_URI']); }
function pshow() { global $set, $db, $apx, $html; $_REQUEST['id'] = (int) $_REQUEST['id']; if (!$_REQUEST['id']) { die('missing ID!'); } quicklink('gallery.padd', 'action.php', 'id=' . $_REQUEST['id']); $orderdef[0] = 'time'; $orderdef['time'] = array('id', 'DESC', 'SORT_ADDTIME'); $orderdef['caption'] = array('caption', 'ASC', 'COL_CAPTION'); $orderdef['hits'] = array('hits', 'DESC', 'COL_HITS'); $col[] = array(' ', 1, ''); $col[] = array(' ', 1, ''); $col[] = array(' ', 1, ''); $col[] = array('COL_THUMBNAIL', 20, 'align="center"'); $col[] = array('COL_CAPTION', 70, 'class="title"'); $col[] = array('COL_HITS', 10, 'align="center"'); list($title) = $db->first("SELECT title FROM " . PRE . "_gallery WHERE ( id='" . $_REQUEST['id'] . "' ) LIMIT 1"); echo '<h2>' . $apx->lang->get('GALLERY') . ': ' . $title . '</h2>'; list($count) = $db->first("SELECT count(id) FROM " . PRE . "_gallery_pics WHERE ( galid='" . $_REQUEST['id'] . "')"); pages('action.php?action=gallery.pshow&id=' . $_REQUEST['id'] . '&sortby=' . $_REQUEST['sortby'], $count); //Preview-Bild list($previewpic) = $db->first("SELECT preview FROM " . PRE . "_gallery WHERE ( id='" . $_REQUEST['id'] . "') LIMIT 1"); $data = $db->fetch("SELECT * FROM " . PRE . "_gallery_pics WHERE galid='" . $_REQUEST['id'] . "' " . getorder($orderdef) . getlimit()); if (count($data)) { foreach ($data as $res) { ++$i; //Aktiv-Anzeige if ($res['active']) { $tabledata[$i]['COL1'] = '<img src="design/greendot.gif" alt="' . $apx->lang->get('CORE_ACTIVE') . '" title="' . $apx->lang->get('CORE_ACTIVE') . '" />'; } else { $tabledata[$i]['COL1'] = '<img src="design/reddot.gif" alt="' . $apx->lang->get('CORE_INACTIVE') . '" title="' . $apx->lang->get('CORE_INACTIVE') . '" />'; } //Vorschau-Bild if ($previewpic == $res['thumbnail']) { $tabledata[$i]['COL2'] = '<img src="design/previewicon.gif" alt="' . $apx->lang->get('IS_PREVIEW') . '" title="' . $apx->lang->get('IS_PREVIEW') . '" />'; } else { $tabledata[$i]['COL2'] = ' '; } //POTW if ($res['potw']) { $tabledata[$i]['COL3'] = '<img src="design/default.gif" alt="' . $apx->lang->get('IS_POTW') . '" title="' . $apx->lang->get('IS_POTW') . '" />'; } else { $tabledata[$i]['COL3'] = ' '; } $caption = shorttext(strip_tags($res['caption']), 50); $tabledata[$i]['ID'] = $res['id']; $tabledata[$i]['COL4'] = '<a href="../' . getpath('uploads') . $res['picture'] . '" target="_blank"><img src="../' . getpath('uploads') . $res['thumbnail'] . '" alt="thumbnail" /></a>'; $tabledata[$i]['COL5'] = iif($caption, $caption, ' '); $tabledata[$i]['COL6'] = number_format($res['hits'], 0, '', '.'); //Optionen if ($apx->user->has_right('gallery.pedit')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('edit.gif', 'gallery.pedit', 'id=' . $res['id'] . '&gid=' . intval($_REQUEST['id']), $apx->lang->get('CORE_EDIT')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('gallery.pmove')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('move.gif', 'gallery.pmove', 'id=' . $res['id'] . '&gid=' . intval($_REQUEST['id']), $apx->lang->get('MOVE')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($apx->user->has_right('gallery.pdel')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'gallery.pdel', 'id=' . $res['id'] . '&gid=' . intval($_REQUEST['id']), $apx->lang->get('CORE_DEL')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($res['active'] && $apx->user->has_right('gallery.pdisable') && !$res['potw'] && !$res['preview']) { $tabledata[$i]['OPTIONS'] .= optionHTML('disable.gif', 'gallery.pdisable', 'id=' . $res['id'] . '&gid=' . intval($_REQUEST['id']) . '§oken=' . $apx->session->get('sectoken'), $apx->lang->get('CORE_DISABLE')); } elseif (!$res['active'] && $apx->user->has_right('gallery.penable')) { $tabledata[$i]['OPTIONS'] .= optionHTML('enable.gif', 'gallery.penable', 'id=' . $res['id'] . '&gid=' . intval($_REQUEST['id']) . '§oken=' . $apx->session->get('sectoken'), $apx->lang->get('CORE_ENABLE')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } $tabledata[$i]['OPTIONS'] .= '<br />'; if ($res['active'] && !$res['potw'] && $apx->user->has_right('gallery.potw')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('potw.gif', 'gallery.potw', 'id=' . $res['id'] . '&gid=' . intval($_REQUEST['id']), $apx->lang->get('POTW')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } if ($res['active'] && $previewpic != $res['thumbnail'] && $apx->user->has_right('gallery.preview')) { $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('previewpic.gif', 'gallery.preview', 'id=' . $res['id'] . '&gid=' . intval($_REQUEST['id']), $apx->lang->get('PREVIEW')); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } //Kommentare + Bewertungen if ($apx->is_module('comments')) { list($comments) = $db->first("SELECT count(id) FROM " . PRE . "_comments WHERE ( module='gallery' AND mid='" . $res['id'] . "' )"); if ($comments && ($apx->is_module('comments') && $set['gallery']['coms']) && $res['allowcoms'] && $apx->user->has_right('comments.show')) { $tabledata[$i]['OPTIONS'] .= optionHTML('comments.gif', 'comments.show', 'module=gallery&mid=' . $res['id'], $apx->lang->get('COMMENTS') . ' (' . $comments . ')'); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } } if ($apx->is_module('ratings')) { list($ratings) = $db->first("SELECT count(id) FROM " . PRE . "_ratings WHERE ( module='gallery' AND mid='" . $res['id'] . "' )"); if ($ratings && ($apx->is_module('ratings') && $set['gallery']['ratings']) && $res['allowrating'] && $apx->user->has_right('ratings.show')) { $tabledata[$i]['OPTIONS'] .= optionHTML('ratings.gif', 'ratings.show', 'module=gallery&mid=' . $res['id'], $apx->lang->get('RATINGS') . ' (' . $ratings . ')'); } else { $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />'; } } } } $multiactions = array(); if ($apx->user->has_right('gallery.pmove')) { $multiactions[] = array($apx->lang->get('MOVE'), 'action.php?action=gallery.pmove&gid=' . intval($_REQUEST['id']), true); } if ($apx->user->has_right('gallery.pdel')) { $multiactions[] = array($apx->lang->get('CORE_DEL'), 'action.php?action=gallery.pdel&gid=' . intval($_REQUEST['id']), false); } if ($apx->user->has_right('gallery.penable')) { $multiactions[] = array($apx->lang->get('CORE_ENABLE'), 'action.php?action=gallery.penable&gid=' . intval($_REQUEST['id']), false); } if ($apx->user->has_right('gallery.pdisable')) { $multiactions[] = array($apx->lang->get('CORE_DISABLE'), 'action.php?action=gallery.pdisable&gid=' . intval($_REQUEST['id']), false); } $apx->tmpl->assign('TABLE', $tabledata); $html->table($col, $multiactions); orderstr($orderdef, 'action.php?action=gallery.pshow&id=' . $_REQUEST['id']); save_index($_SERVER['REQUEST_URI']); }