Example #1
0
 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']);
 }
Example #2
0
 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']);
 }
Example #3
0
 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&amp;sortby=' . $_REQUEST['sortby'] . iif($_REQUEST['gid'], '&amp;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']);
 }
Example #4
0
 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&amp;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'] .= '&nbsp;';
                 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']);
 }
Example #5
0
 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&amp;sortby=' . $_REQUEST['sortby'] . iif($_REQUEST['searchid'], '&amp;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'] . '&sectoken=' . $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'] . '&sectoken=' . $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'] .= '&nbsp;';
             }
             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'], '&amp;searchid=' . $_REQUEST['searchid']));
     save_index($_SERVER['REQUEST_URI']);
 }
Example #6
0
 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&amp;what=person', $_REQUEST['what'] == 'person');
     $layerdef[] = array('UNITTYPE_COMPANY', 'action.php?action=products.ushow&amp;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&amp;what=' . $_REQUEST['what'] . iif($_REQUEST['searchid'], '&amp;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&amp;what=' . $_REQUEST['what'] . iif($_REQUEST['searchid'], '&amp;searchid=' . $_REQUEST['searchid']) . '&amp;letter=' . $_REQUEST['letter'] . '&amp;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&amp;what=' . $_REQUEST['what'] . iif($_REQUEST['searchid'], '&amp;searchid=' . $_REQUEST['searchid']) . '&amp;letter=' . $_REQUEST['letter']);
     save_index($_SERVER['REQUEST_URI']);
     //Layer-Footer ausgeben
     $html->layer_footer();
 }
Example #7
0
 function show()
 {
     global $set, $db, $apx, $html;
     //Struktur reparieren
     if ($_REQUEST['repair']) {
         $this->cat->repair();
         echo 'Repair done!';
         return;
     }
     quicklink('faq.add');
     //DnD-Hinweis
     if ($apx->user->has_right('faq.edit')) {
         echo '<p class="hint">' . $apx->lang->get('USEDND') . '</p>';
     }
     $col[] = array('', 1, '');
     $col[] = array('COL_QUESTION', 80, 'class="title"');
     $col[] = array('COL_HITS', 20, 'align="center"');
     $prefix = array();
     $data = $this->cat->getTree(array('*'));
     if (count($data)) {
         //Ausgabe erfolgt
         foreach ($data as $res) {
             ++$i;
             if ($res['starttime']) {
                 $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') . '" />';
             }
             $link = mklink('faq.php?id=' . $res['id'], 'faq,' . $res['id'] . urlformat($res['question']) . '.html');
             $tabledata[$i]['COL2'] = '<a href="' . $link . '" target="_blank">' . replace($res['question']) . '</a>';
             $tabledata[$i]['COL3'] = number_format($res['hits'], 0, '', '.');
             $tabledata[$i]['CLASS'] = 'l' . ($res['level'] - 1) . ($res['children'] ? ' haschildren' : '') . ($res['level'] > 1 ? ' hidden' : '');
             $tabledata[$i]['ID'] = 'node:' . $res['id'];
             //Optionen
             if ($apx->user->has_right('faq.edit')) {
                 $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'faq.edit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT'));
             } else {
                 $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />';
             }
             if ($apx->user->has_right('faq.del')) {
                 $tabledata[$i]['OPTIONS'] .= '<span class="ifhasnochildren">' . optionHTMLOverlay('del.gif', 'faq.del', '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('faq.enable') && !$res['starttime']) {
                 $tabledata[$i]['OPTIONS'] .= optionHTML('enable.gif', 'faq.enable', 'id=' . $res['id'] . '&sectoken=' . $apx->session->get('sectoken'), $apx->lang->get('CORE_ENABLE'));
             } elseif ($apx->user->has_right('faq.disable') && $res['starttime']) {
                 $tabledata[$i]['OPTIONS'] .= optionHTML('disable.gif', 'faq.disable', 'id=' . $res['id'] . '&sectoken=' . $apx->session->get('sectoken'), $apx->lang->get('CORE_DISABLE'));
             } else {
                 $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />';
             }
             /*$tabledata[$i]['OPTIONS'].='&nbsp;';
             		if ( $apx->user->has_right('faq.move') && $follow[$res['id']]['prev'] ) $tabledata[$i]['OPTIONS'].=optionHTML('moveup.gif', 'faq.move', 'direction=up&id='.$res['id'].'&sectoken='.$apx->session->get('sectoken'), $apx->lang->get('MOVEUP'));
             		else $tabledata[$i]['OPTIONS'].='<img src="design/ispace_small.gif" alt="" />';
             		
             		if ( $apx->user->has_right('faq.move') && $follow[$res['id']]['next'] ) $tabledata[$i]['OPTIONS'].=optionHTML('movedown.gif', 'faq.move', 'direction=down&id='.$res['id'].'&sectoken='.$apx->session->get('sectoken'), $apx->lang->get('MOVEDOWN'));
             		else $tabledata[$i]['OPTIONS'].='<img src="design/ispace_small.gif" alt="" />';*/
         }
     }
     $apx->tmpl->assign('TABLE', $tabledata);
     echo '<div class="treeview" id="tree">';
     $html->table($col);
     echo '</div>';
     $open = $apx->session->get('faq_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('faq.edit'));
     $apx->tmpl->parse('show_js');
     save_index($_SERVER['REQUEST_URI']);
 }
Example #8
0
 function catshow()
 {
     global $set, $db, $apx, $html;
     //Struktur reparieren
     if ($_REQUEST['repair']) {
         $this->cat->repair();
         echo 'Repair done!';
         return;
     }
     quicklink('videos.catadd');
     //DnD-Hinweis
     if ($apx->user->has_right('videos.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_VIDEOS', 25, 'align="center"');
     $data = $this->cat->getTree(array('title', 'open'));
     if (count($data)) {
         //Ausgabe erfolgt
         foreach ($data as $res) {
             ++$i;
             if ($res['open']) {
                 list($videos) = $db->first("SELECT count(id) FROM " . PRE . "_videos WHERE catid='" . $res['id'] . "'");
             }
             $tabledata[$i]['COL1'] = $res['id'];
             $tabledata[$i]['COL2'] = replace($res['title']);
             $tabledata[$i]['COL3'] = iif(isset($videos), $videos, '&nbsp;');
             $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('videos.catedit')) {
                 $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'videos.catedit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT'));
             } else {
                 $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />';
             }
             if ($apx->user->has_right('videos.catdel') && !$videos) {
                 $tabledata[$i]['OPTIONS'] .= '<span class="ifhasnochildren">' . optionHTMLOverlay('del.gif', 'videos.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('videos.catclean') && $videos) {
                 $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('clean.gif', 'videos.catclean', 'id=' . $res['id'], $apx->lang->get('CLEAN'));
             } else {
                 $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />';
             }
             //Anordnen nur bei Unterkategorien
             /*$tabledata[$i]['OPTIONS'].='&nbsp;';
             		if ( $apx->user->has_right('videos.catmove') && $follow[$res['id']]['prev'] ) $tabledata[$i]['OPTIONS'].=optionHTML('moveup.gif', 'videos.catmove', 'direction=up&id='.$res['id'].'&sectoken='.$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('videos.catmove') && $follow[$res['id']]['next'] ) $tabledata[$i]['OPTIONS'].=optionHTML('movedown.gif', 'videos.catmove', 'direction=down&id='.$res['id'].'&sectoken='.$apx->session->get('sectoken'), $apx->lang->get('MOVEDOWN'));
             		else $tabledata[$i]['OPTIONS'].='<img src="design/ispace_small.gif" alt="" style="vertical-align:middle;" />';
             		*/
             unset($videos);
         }
     }
     $apx->tmpl->assign('TABLE', $tabledata);
     //Mit Unter-Kategorien
     echo '<div class="treeview" id="tree">';
     $html->table($col);
     echo '</div>';
     $open = $apx->session->get('videos_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('videos.edit'));
     $apx->tmpl->parse('catshow_js');
     save_index($_SERVER['REQUEST_URI']);
 }
Example #9
0
 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('&nbsp;', 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&amp;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="" />', '&nbsp;');
             $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'] . '&sectoken=' . $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'] . '&sectoken=' . $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']);
 }
Example #10
0
 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&amp;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']);
 }
Example #11
0
 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']);
 }
Example #12
0
 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('&nbsp;', 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&amp;sortby=' . $_REQUEST['sortby'] . iif($_REQUEST['gid'], '&amp;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&amp;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="" />', '&nbsp;');
             $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'], '&amp;gid=' . $_REQUEST['gid']));
     save_index($_SERVER['REQUEST_URI']);
 }
Example #13
0
 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']);
 }
Example #14
0
 function show()
 {
     global $set, $db, $apx, $html;
     //Struktur reparieren
     if ($_REQUEST['repair']) {
         $this->cat->repair();
         echo 'Repair done!';
         return;
     }
     quicklink('navi.add', 'action.php', 'nid=' . $_REQUEST['nid']);
     $_REQUEST['nid'] = (int) $_REQUEST['nid'];
     if (!$_REQUEST['nid']) {
         $_REQUEST['nid'] = 1;
     }
     $navidata = array();
     foreach ($set['navi']['groups'] as $id => $title) {
         $navidata[] = array('ID' => $id, 'TITLE' => compatible_hsc($title), 'SELECTED' => $_REQUEST['nid'] == $id);
     }
     $apx->tmpl->assign('NAVI', $navidata);
     $apx->tmpl->parse('show_choose');
     //DnD-Hinweis
     if ($apx->user->has_right('navi.edit')) {
         echo '<p class="hint">' . $apx->lang->get('USEDND') . '</p>';
     }
     $col[] = array('ID', 0, 'align="center"');
     $col[] = array('COL_TEXT', 100, 'class="title"');
     $data = $this->cat->getTree(array('text'), null, "nid='" . $_REQUEST['nid'] . "'");
     if (count($data)) {
         //Ausgabe erfolgt
         foreach ($data as $res) {
             ++$i;
             if ($res['level'] == 1) {
                 ++$tree;
             }
             $tabledata[$i]['COL1'] = $res['id'];
             $tabledata[$i]['COL2'] = $space[$res['id']] . ' ' . replace(shorttext($res['text'], 100));
             $tabledata[$i]['CLASS'] = 'l' . ($res['level'] - 1) . ($res['children'] ? ' haschildren' : '') . ($res['level'] > 1 ? ' hidden' : '');
             $tabledata[$i]['ID'] = 'node:' . $res['id'];
             //Optionen
             if ($apx->user->has_right('navi.edit')) {
                 $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'navi.edit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT'));
             } else {
                 $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />';
             }
             if ($apx->user->has_right('navi.del')) {
                 $tabledata[$i]['OPTIONS'] .= '<span class="ifhasnochildren">' . optionHTMLOverlay('del.gif', 'navi.del', '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="" />';
             }
             /*$tabledata[$i]['OPTIONS'].='&nbsp;';
             		if ( $apx->user->has_right('navi.move') && $follow[$res['id']]['prev'] ) $tabledata[$i]['OPTIONS'].=optionHTML('moveup.gif', 'navi.move', 'direction=up&id='.$res['id'].'&sectoken='.$apx->session->get('sectoken'), $apx->lang->get('MOVEUP'));
             		else $tabledata[$i]['OPTIONS'].='<img src="design/ispace_small.gif" alt="" />';
             		if ( $apx->user->has_right('navi.move') && $follow[$res['id']]['next'] ) $tabledata[$i]['OPTIONS'].=optionHTML('movedown.gif', 'navi.move', 'direction=down&id='.$res['id'].'&sectoken='.$apx->session->get('sectoken'), $apx->lang->get('MOVEDOWN'));
             		else $tabledata[$i]['OPTIONS'].='<img src="design/ispace_small.gif" alt="" />';*/
         }
     }
     $apx->tmpl->assign('TABLE', $tabledata);
     echo '<div class="treeview" id="tree">';
     $html->table($col);
     echo '</div>';
     $open = $apx->session->get('navi_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('navi.edit'));
     $apx->tmpl->parse('show_js');
     save_index($_SERVER['REQUEST_URI']);
 }
Example #15
0
 function eshow()
 {
     global $set, $db, $apx, $html;
     //Suche durchführen
     if ($_REQUEST['item']) {
         $where = " AND email LIKE '%" . addslashes_like($_REQUEST['item']) . "%'";
         $data = $db->fetch("SELECT id FROM " . PRE . "_newsletter_emails WHERE 1 " . $where);
         $ids = get_ids($data, 'id');
         $ids[] = -1;
         $searchid = saveSearchResult('admin_newsletter_email', $ids, $_REQUEST['item']);
         header("HTTP/1.1 301 Moved Permanently");
         header('Location: action.php?action=newsletter.eshow&what=' . $_REQUEST['what'] . '&searchid=' . $searchid);
         return;
     }
     //Suchergebnis?
     $resultFilter = '';
     if ($_REQUEST['searchid']) {
         $searchRes = getSearchResult('admin_newsletter_email', $_REQUEST['searchid']);
         if ($searchRes) {
             list($resultIds, $resultMeta) = $searchRes;
             $_REQUEST['item'] = $resultMeta;
             $resultFilter = " AND id IN (" . implode(', ', $resultIds) . ")";
         } else {
             $_REQUEST['searchid'] = '';
         }
     }
     quicklink('newsletter.eadd');
     $layerdef[] = array('LAYER_ALL', 'action.php?action=newsletter.eshow', !$_REQUEST['what']);
     $layerdef[] = array('LAYER_INACTIVE', 'action.php?action=newsletter.eshow&amp;what=inactive', $_REQUEST['what'] == 'inactive');
     //Layer Header ausgeben
     $html->layer_header($layerdef);
     $apx->tmpl->assign('WHAT', $_REQUEST['what']);
     $apx->tmpl->assign('ITEM', compatible_hsc($_REQUEST['item']));
     $apx->tmpl->parse('esearch');
     //Inaktive Adressen
     if ($_REQUEST['what'] == 'inactive') {
         list($count) = $db->first("\n\t\t\tSELECT count(DISTINCT ne.id)\n\t\t\tFROM " . PRE . "_newsletter_emails AS ne\n\t\t\tJOIN " . PRE . "_newsletter_emails_cat AS nec ON ne.id=nec.eid\n\t\t\tWHERE nec.active=0 " . $resultFilter);
         pages('action.php?action=newsletter.eshow&amp;what=inactive&amp;sortby=' . $_REQUEST['sortby'], $count);
         $data = $db->fetch("\n\t\t\tSELECT DISTINCT ne.id, ne.email\n\t\t\tFROM " . PRE . "_newsletter_emails AS ne\n\t\t\tJOIN " . PRE . "_newsletter_emails_cat AS nec ON ne.id=nec.eid\n\t\t\tWHERE nec.active=0 " . $resultFilter . "\n\t\t\tORDER BY ne.email\n\t\t\tASC " . getlimit($set['epp']));
         $this->eshow_print($data);
         save_index($_SERVER['REQUEST_URI']);
     } else {
         list($count) = $db->first("\n\t\t\tSELECT count(id)\n\t\t\tFROM " . PRE . "_newsletter_emails\n\t\t\tWHERE 1 " . $resultFilter);
         pages('action.php?action=newsletter.eshow&amp;sortby=' . $_REQUEST['sortby'], $count);
         $data = $db->fetch("\n\t\t\tSELECT id,email\n\t\t\tFROM " . PRE . "_newsletter_emails\n\t\t\tWHERE 1 " . $resultFilter . "\n\t\t\tORDER BY email ASC\n\t\t\t" . getlimit($set['epp']));
         $this->eshow_print($data);
         save_index($_SERVER['REQUEST_URI']);
     }
     //Layer-Footer ausgeben
     $html->layer_footer();
 }
Example #16
0
 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('&nbsp;', 1, '');
     $col[] = array('&nbsp;', 1, '');
     $col[] = array('&nbsp;', 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&amp;id=' . $_REQUEST['id'] . '&amp;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'] = '&nbsp;';
             }
             //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'] = '&nbsp;';
             }
             $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, '&nbsp;');
             $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']) . '&sectoken=' . $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']) . '&sectoken=' . $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&amp;id=' . $_REQUEST['id']);
     save_index($_SERVER['REQUEST_URI']);
 }