// +----------------------------------------------------------------------+ // | Copyright (c) 2000- APP - Another PHP Program | // +----------------------------------------------------------------------+ // | This source file is subject to version 2 of the GPL, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | http://www.gnu.org/copyleft/gpl.html. | // +----------------------------------------------------------------------+ // | Authors: Alexander Mieland <dma147 at mieland-programming dot de> | // +----------------------------------------------------------------------+ // $Header $ // +----------------------------------------------------------------------+ $HEADER_LOCATION_STRING .= ' » <a href="' . $_SESSION['APCMS']['REL_URL'] . '/index.' . $_SESSION['APCMS']['SUFFIX'] . "?s=admin" . $_SESSION['SID2'] . '"' . _APCMS_HelpSystem($_LANGUAGE['admin_desc']) . '>' . $_LANGUAGE['admincenter'] . '</a>'; $TITLE_LOCATION = $_LANGUAGE['admincenter']; /** Anzeige des Standortes auf UserOnline */ $ONLINE_ANZEIGE = $_LANGUAGE['is_in_the'] . ' {#if#can_access_admin#}<a href="' . $_SESSION['APCMS']['REL_URL'] . '/index.' . $_SESSION['APCMS']['SUFFIX'] . '?s=admin"{#if#enable_helpsys#}' . _APCMS_HelpSystem($_LANGUAGE['admin_desc']) . '{#endif#enable_helpsys#}>{#endif#can_access_admin#}' . $_LANGUAGE['admincenter'] . '{#if#can_access_admin#}</a>{#endif#can_access_admin#}.'; /** Alle User-Online-Updates durchzühren (den User betreffend) */ _APCMS_UpdateOnlineUser($ONLINE_ANZEIGE); /** Prüfen ob Aktion "apcms" active, also eingeschalten ist */ if (!_APCMS_ActionIsActive('can_access_admin')) { _APCMS_MsgBox($_LANGUAGE['admin_is_deactivated'], $_LANGUAGE['admin_is_deactivated_desc'], $_SESSION['APCMS']['REL_URL'] . '/index.' . $_SESSION['APCMS']['SUFFIX'] . $_SESSION['SID1'], 3, 1, $_SESSION['APCMS']['TABLE']['WIDTH']); } /** Prüfen ob der User die Aktion "apcms" ausführen darf */ if (!_APCMS_UserAccess('can_access_admin')) { _APCMS_MsgBox($_LANGUAGE['no_access'], $_LANGUAGE['no_access_desc'], $_SESSION['APCMS']['REL_URL'] . '/index.' . $_SESSION['APCMS']['SUFFIX'] . $_SESSION['SID1'], 3, 1, $_SESSION['APCMS']['TABLE']['WIDTH']); } /** Include der Smarty-Klassen */ require_once $_SESSION['APCMS']['LIB_DIR'] . "/smarty-libs/Smarty.class." . $_SESSION['APCMS']['SUFFIX']; /** Neues Template starten */ $ADMINMAIN = _APCMS_StartNewTemplate(); $NAVIGATION = '';
$BOX_C = $BOX->fetch('content.portal.navbox.html'); if ($BOXARRAY[$bcount]['side'] == 1) { $NAV_BOXES_LEFT .= $BOX_C; } else { $NAV_BOXES_RIGHT .= $BOX_C; } } } /** News-Boxen auslesen und anzeigen */ $query = "SELECT \r\n news.`id` AS newsid, \r\n news.`userid` AS userid, \r\n news.`publicname` AS publicname, \r\n news.`time` AS time, \r\n news.`titel` AS titel, \r\n news.`text` AS text, \r\n newskats.`katpic` AS katpic, \r\n newskats.`groups` AS newsgroups, \r\n kats.`groups` AS katgroups \r\n FROM \r\n `apcms_" . $_SESSION['MYSQLDATA']['SUFFIX'] . "_portal_news` AS news, \r\n `apcms_" . $_SESSION['MYSQLDATA']['SUFFIX'] . "_portal_newskats` AS newskats, \r\n `apcms_" . $_SESSION['MYSQLDATA']['SUFFIX'] . "_portal_newskats` AS kats \r\n WHERE \r\n news.`katid`=newskats.`id` \r\n AND \r\n newskats.`parentid`=kats.`id` \r\n AND \r\n newskats.`active`='1' \r\n ORDER BY \r\n news.`time` DESC \r\n LIMIT \r\n 0," . $_SESSION['APCMS']['news_num'] . " \r\n "; $newsselect = $db->unbuffered_getAll_row($query); $NEWSBOX_C = ""; for ($ncount = 0; $ncount < count($newsselect); $ncount++) { if (_APCMS_CanAccess(stripslashes(chop(trim($newsselect[$ncount][7])))) && _APCMS_CanAccess(stripslashes(chop(trim($newsselect[$ncount][8]))))) { $NEWSBOX = _APCMS_StartNewTemplate(); $NEWS_INFOS = 'written by ' . (_APCMS_ActionIsActive('show_userdetails') && _APCMS_UserAccess('show_userdetails') ? '<a href="' . $_SESSION['APCMS']['REL_URL'] . '/index.' . $_SESSION['APCMS']['SUFFIX'] . '?s=userdetails&userid=' . $newsselect[$ncount][1] . $_SESSION['SID2'] . '"' . _APCMS_HelpSystem("<b>UserDetails</b><br />Klicken Sie hier, um sich Einzelheiten über diesen User anzusehen..") . '>' : '') . htmlspecialchars(stripslashes(chop(trim($newsselect[$ncount][2])))) . (_APCMS_ActionIsActive('show_userdetails') && _APCMS_UserAccess('show_userdetails') ? '</a>' : '') . ' @ ' . date("d.m.Y, H:i", $newsselect[$ncount][3]) . ''; $NEWSBOX->assign("NEWS_TITEL", stripslashes(chop(trim($newsselect[$ncount][4])))); $NEWSBOX->assign("NEWS_TEXT", nl2br(stripslashes(chop(trim($newsselect[$ncount][5]))))); $NEWSBOX->assign("NEWS_INFOS", $NEWS_INFOS); $NEWSBOX->assign("shownewskatpic", chop(trim($newsselect[$ncount][6])) != "" ? "1" : ""); $NEWSBOX->assign("ICON_NEWS_KAT", stripslashes(chop(trim($newsselect[$ncount][6])))); $NEWSBOX_C .= $NEWSBOX->fetch('content.portal.newsbox.html'); } } /** Linke Navigation */ $PORTAL->assign("NAV_BOXES_LEFT", $NAV_BOXES_LEFT); /** Mittlerer Inhalt */ $PORTAL->assign("MIDDLE_BOXES", $NEWSBOX_C); /** Rechte Navigation */ $PORTAL->assign("NAV_BOXES_RIGHT", $NAV_BOXES_RIGHT); //
// +----------------------------------------------------------------------+ // | APCMS v0.0.2 | // +----------------------------------------------------------------------+ // | Copyright (c) 2000- APP - Another PHP Program | // +----------------------------------------------------------------------+ // | This source file is subject to version 2 of the GPL, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | http://www.gnu.org/copyleft/gpl.html. | // +----------------------------------------------------------------------+ // | Authors: Alexander Mieland <dma147 at mieland-programming dot de> | // +----------------------------------------------------------------------+ // $Header $ // +----------------------------------------------------------------------+ /** Anzeige des Standortes auf UserOnline */ $ONLINE_ANZEIGE = $_LANGUAGE['is_on_the'] . ' <a href="' . $_SESSION['APCMS']['REL_URL'] . '/index.' . $_SESSION['APCMS']['SUFFIX'] . '"{#if#enable_helpsys#}' . _APCMS_HelpSystem($_LANGUAGE['click_to_firstpage']) . '{#endif#enable_helpsys#}>' . $_LANGUAGE['firstpage'] . '</a>.'; /** Alle User-Online-Updates durchzühren (den User betreffend) */ _APCMS_UpdateOnlineUser($ONLINE_ANZEIGE); $TITLE_LOCATION = $_LANGUAGE['firstpage']; /** UserOnline-Statistik für index-seite */ if (_APCMS_ActionIsActive('index_useronlinestats') && _APCMS_UserAccess('index_useronlinestats') && (isset($contentinclude) && $contentinclude == "index")) { $OnlineUserIndexStats = _APCMS_GetUserOnline('indexstats'); } if (_APCMS_ActionIsActive('index_usertodayonline') && _APCMS_UserAccess('index_usertodayonline') && (isset($contentinclude) && $contentinclude == "index")) { $TodayOnlineUserStats = _APCMS_GetUserOnline('indextodayonline'); } /** Include der Smarty-Klassen */ require_once $_SESSION['APCMS']['LIB_DIR'] . "/smarty-libs/Smarty.class." . $_SESSION['APCMS']['SUFFIX']; /** Neues Template starten */ $INDEX = _APCMS_StartNewTemplate(); /////////////////////////////////////////////////////////////////////////////////
include $_SESSION['APCMS']['LIB_DIR'] . "/proconfig.lib." . $_SESSION['APCMS']['SUFFIX']; /** Include der Basis-Funktionen des Systems */ include $_SESSION['APCMS']['LIB_DIR'] . "/apcms_general.func." . $_SESSION['APCMS']['SUFFIX']; /** Überprüft Variablen in der URL auf SQL-Injection oder sonstige unerlaubte Zeichenfolgen */ _APCMS_NoScriptKiddies(); $TITLE_LOCATION = ""; $CONTENTTITEL = ""; $CONTENTINHALT = ""; $CONTENT = ""; $target_url = ""; $OnlineUserIndexStats = array(); $TodayOnlineUserStats = array(); if (!isset($_SESSION['APCMS']['CONFIG']['cache_aktiv']) || $_SESSION['APCMS']['CONFIG']['cache_aktiv'] == 0 || ($contentinclude == "handler" || $contentinclude == "queryresults" || $contentinclude == "admin") || isset($must_update_cached_file) && $must_update_cached_file == 1 || $CACHEDFILE['lastupdate'] <= $akt_time - $_SESSION['APCMS']['CONFIG']['cache_aktinterval']) { /** Include der Smarty-Klassen */ require_once $_SESSION['APCMS']['LIB_DIR'] . "/smarty-libs/Smarty.class." . $_SESSION['APCMS']['SUFFIX']; $HEADER_LOCATION_STRING = ' » <a href="' . $_SESSION['APCMS']['REL_URL'] . '/index.' . $_SESSION['APCMS']['SUFFIX'] . $_SESSION['SID1'] . '"' . _APCMS_HelpSystem($_LANGUAGE['click_to_firstpage']) . '>' . $_LANGUAGE['firstpage'] . '</a>'; ///////////////////////////////////////////////////////////////////////////////// // // Die eigentliche Abarbeitung von Funktionen und Variablen, beginnt hier // /** Prüfen ob Aktion "apcms" active, also eingeschalten ist */ if (!_APCMS_ActionIsActive('apcms')) { _APCMS_MsgBox($_LANGUAGE['apcms_is_deactivated'], $_LANGUAGE['apcms_is_deactivated_desc'], '', '', 1, $_SESSION['APCMS']['TABLE']['WIDTH']); } /** Prüfen ob der User die Aktion "apcms" ausführen darf */ if (!_APCMS_UserAccess('apcms')) { _APCMS_MsgBox($_LANGUAGE['no_access'], $_LANGUAGE['no_access_desc'], '', '', 1, $_SESSION['APCMS']['TABLE']['WIDTH']); } include $firstinclude; // // Die eigentliche Abarbeitung von Funktionen und Variablen, endet hier
/** * Holt alle Informationen über OnlineUser * * @param string $whichstats Type der abzurufenden UserOnline-Daten * @since 0.0.1 * @version 0.0.1 * @access private * @return array * @author Alexander Mieland * @copyright 2000-2004 by APP - Another PHP Program */ function _APCMS_GetUserOnline($whichstats = "indexstats") { global $db, $_LANGUAGE; $OnlineUserArray = array(); switch ($whichstats) { case "indexstats": $query = "SELECT COUNT(`sessid`) FROM `apcms_" . $_SESSION['MYSQLDATA']['SUFFIX'] . "_user_online`"; $seluo_gesnum = $db->unbuffered_query_first($query); $gesnum = intval($seluo_gesnum[0]); $query = "SELECT COUNT(`sessid`) as num FROM `apcms_" . $_SESSION['MYSQLDATA']['SUFFIX'] . "_user_online` WHERE `userid`>='1'"; $seluo_mnum = $db->unbuffered_query_first($query); $mnum = intval($seluo_mnum[0]); $guestnum = $gesnum - $mnum; $uomnun = 'Es ' . ($gesnum >= 2 || $gesnum <= 0 ? $_LANGUAGE['sind'] : $_LANGUAGE['ist']) . ' ' . $_LANGUAGE['at_this_time'] . ' ' . (_APCMS_ActionIsActive('useronline') && _APCMS_UserAccess('useronline') ? '<a href="' . $_SESSION['APCMS']['REL_URL'] . '/index.' . $_SESSION['APCMS']['SUFFIX'] . "?s=useronline" . $_SESSION['SID2'] . '"' . _APCMS_HelpSystem($_LANGUAGE['help_useronline_desc']) . '>' : '') . '<strong>' . $gesnum . ' ' . $_LANGUAGE['user'] . '</strong> ' . $_LANGUAGE['on_this_site_online'] . (_APCMS_ActionIsActive('useronline') && _APCMS_UserAccess('useronline') ? '</a>' : '') . ' ('; $uomnun .= $mnum . ' ' . ($mnum >= 2 || $mnum <= 0 ? $_LANGUAGE['members'] : $_LANGUAGE['member']); $uomnun .= ($guestnum >= 1 ? " " . $_LANGUAGE['and'] . " " . $guestnum . " " : "") . ($guestnum >= 2 ? $_LANGUAGE['guests'] : "") . ($guestnum == 1 ? $_LANGUAGE['guest'] : ""); $uomnun .= '):<br />'; $query = "SELECT `userid`,`publicname` FROM `apcms_" . $_SESSION['MYSQLDATA']['SUFFIX'] . "_user_online` WHERE `userid`>='1' ORDER BY `zeit` DESC"; $seluomembers = $db->unbuffered_getAll_row($query); $UserNames = ''; for ($a = 0; $a < count($seluomembers); $a++) { if ($UserNames != "") { $UserNames .= ", "; } $UserNames .= (_APCMS_ActionIsActive('show_userdetails') && _APCMS_UserAccess('show_userdetails') ? '<a href="' . $_SESSION['APCMS']['REL_URL'] . '/index.' . $_SESSION['APCMS']['SUFFIX'] . '?s=userdetails&userid=' . $seluomembers[$a][0] . $_SESSION['SID2'] . '"' . _APCMS_HelpSystem($_LANGUAGE['help_userdetails_desc']) . '>' : '') . htmlspecialchars(stripslashes($seluomembers[$a][1])) . (_APCMS_ActionIsActive('show_userdetails') && _APCMS_UserAccess('show_userdetails') ? '</a>' : ''); } $OnlineUserArray['useronline_onlinenum'] = $gesnum; $OnlineUserArray['useronline_onlinenum_formatted'] = $uomnun; $OnlineUserArray['useronline_onlineuser_formatted'] = $UserNames; break; case "indextodayonline": $todayonlinearray = array(); $OnlineUserArray['usertodayonline_num_formatted'] = 0; $OnlineUserArray['usertodayonline_user_formatted'] = ""; $toac = 0; $todayonlinefile = $_SESSION['APCMS']['LOG_DIR'] . "/users_today_online.log"; if (file_exists($todayonlinefile)) { $todayonlinearray = file($todayonlinefile); if (count($todayonlinearray) >= 1) { for ($lcount = 0; $lcount < count($todayonlinearray); $lcount++) { $thisline = chop(trim($todayonlinearray[$lcount])); $linearray = explode("|", $thisline); if (trim($OnlineUserArray['usertodayonline_user_formatted']) != "") { $OnlineUserArray['usertodayonline_user_formatted'] .= ", "; } $OnlineUserArray['usertodayonline_user_formatted'] .= (_APCMS_ActionIsActive('show_userdetails') && _APCMS_UserAccess('show_userdetails') ? '<a href="' . $_SESSION['APCMS']['REL_URL'] . '/index.' . $_SESSION['APCMS']['SUFFIX'] . '?s=userdetails&userid=' . $linearray[1] . $_SESSION['SID2'] . '"' . _APCMS_HelpSystem($_LANGUAGE['help_userdetails_desc']) . '>' : '') . htmlspecialchars(stripslashes($linearray[2])) . (_APCMS_ActionIsActive('show_userdetails') && _APCMS_UserAccess('show_userdetails') ? '</a>' : '') . ' (' . date("H:i.s", $linearray[0]) . ')'; $OnlineUserArray['usertodayonline_num_formatted']++; } $OnlineUserArray['usertodayonline_num_formatted'] .= ($OnlineUserArray['usertodayonline_num_formatted'] >= 2 || $OnlineUserArray['usertodayonline_num_formatted'] <= 0 ? " Mitglieder" : " Mitglied") . ":<br>"; } } break; default: break; } return $OnlineUserArray; }
$CONTENTINHALT .= ' <tr class="tC2L">'; $CONTENTINHALT .= ' <td width="160"><strong>' . $_LANGUAGE['user'] . '</strong></td>'; if (_APCMS_ActionIsActive('show_uo_location') && _APCMS_UserAccess('show_uo_location')) { $CONTENTINHALT .= ' <td><strong>' . $_LANGUAGE['location'] . '</strong></td>'; } $CONTENTINHALT .= ' <td width="100"><strong>' . $_LANGUAGE['last_activity'] . '</strong></td>'; $CONTENTINHALT .= ' </tr>'; $guestnum = 1; for ($a = 0; $a < count($seluo); $a++) { $class = isset($class) && $class == "A" ? "B" : "A"; $lastact = date("H:i:s", $seluo[$a][0]) . " " . $_LANGUAGE['uhr']; if ($seluo[$a][2] <= 0 && trim($seluo[$a][3]) == "") { $publicname = $_LANGUAGE['guest_number'] . $guestnum . (_APCMS_ActionIsActive('show_ips') && _APCMS_UserAccess('show_ips') ? " (" . $seluo[$a][1] . ")" : ""); $guestnum++; } else { $publicname = (_APCMS_ActionIsActive('show_userdetails') && _APCMS_UserAccess('show_userdetails') ? '<a href="' . $_SESSION['APCMS']['REL_URL'] . '/index.' . $_SESSION['APCMS']['SUFFIX'] . '?s=userdetails&userid=' . $seluo[$a][2] . $_SESSION['SID2'] . '"' . _APCMS_HelpSystem($_LANGUAGE['show_userdetails_desc']) . '>' : '') . htmlspecialchars(stripslashes($seluo[$a][3])) . (_APCMS_ActionIsActive('show_userdetails') && _APCMS_UserAccess('show_userdetails') ? '</a>' : '') . (_APCMS_ActionIsActive('show_ips') && _APCMS_UserAccess('show_ips') ? " (" . $seluo[$a][1] . ")" : ""); } $CONTENTINHALT .= ' <tr class="t' . $class . '2L">'; $CONTENTINHALT .= ' <td width="220">' . $publicname . '</td>'; if (_APCMS_ActionIsActive('show_uo_location') && _APCMS_UserAccess('show_uo_location')) { $onlineanzeige = stripslashes($seluo[$a][4]); /** Parst einen String nach APCMS-eigenen Access-Vars und baut ihn entsprechend der aktuellen Userrechte um */ $onlineanzeige = _APCMS_ParseAccessVars($onlineanzeige); $CONTENTINHALT .= ' <td>' . $onlineanzeige . '</td>'; } $CONTENTINHALT .= ' <td width="100">' . $lastact . '</td>'; $CONTENTINHALT .= ' </tr>'; } $CONTENTINHALT .= ' </table>'; $UONLINE->assign("CONTENTTITEL", $CONTENTTITEL); $UONLINE->assign("CONTENTINHALT", $CONTENTINHALT);