<?php // $Id: handle.php,v 1.17 2004/07/06 00:55:30 entropie Exp $ // include './cfg/cfg.php'; include './libraries/class.main.php'; include './libraries/class.play.php'; include './libraries/class.playlist_in.php'; include './libraries/class.shoutbox.php'; $mp3 = new main(); $mp3play = new play(); $mp3playlist_in = new playlist_in(); $mp3sb = new shoutbox(); if (empty($_GET) && empty($_POST)) { header("location: index.php"); exit; } else { $irray = array_merge($_GET, $_POST); } switch ($irray) { // login case isset($irray['login']): define('LOGIN', TRUE); $_SESSION['LOGIN'] = true; break; // shoutbox: add // shoutbox: add case isset($irray["addsbentry"]) && isset($_POST['sb_text']) && !empty($_POST['sb_text']) && isset($_POST['sb_name']) && !empty($_POST['sb_name']): $mp3sb->insertSbEntry($_POST["sb_name"], $_POST["sb_text"]); break; // shoutbox: del // shoutbox: del
function printFooter($mainTableStr = 'browser', $append = '') { if (!isset($_GET['pathid'])) { $_GET['pathid'] = 0; } // Initialize Shoutbox include './libraries/class.shoutbox.php'; $sb = new shoutbox(); // Initialize user temporary playlists include './libraries/class.playlist_in.php'; $playlist_in = new playlist_in(); // Initialize user playlists include './libraries/class.playlist.php'; $playl = new playlist(); // Check if plalists are availible, if not => empty string if (!($lplayl = $playl->list_playlists())) { $lplayl = ''; } $content = $this->parseXmlFile('style.xml', 'footer'); $proll = $this->parseXmlFile('style.xml', 'prolling'); $proll = ereg_replace(':proll:', PROLL, $proll['main']); $mainTableStr = $this->printLangS('STR_maintabletitle_' . $mainTableStr, $append); $myn = ereg_replace(':user:'******'ADMIN') && ADMIN == 'admin' && defined('USER') ? '@' . USER : (defined('USER') ? USER : '******'), $content['main']); $myn = ereg_replace(':hplink:', $this->evalStyle('hplink', $this->printLangS('STR_hplink')), $myn); $myn = ereg_replace(':pathid:', isset($_GET['pathid']) ? $_GET['pathid'] : 0, $myn); $myn = ereg_replace(':backid:', $this->backId, $myn); $myn = ereg_replace(':playlist:', $lplayl, $myn); $myn = ereg_replace(':checkalldirs:', $this->evalStyle('checkalldirs', $this->printLangS('STR_checkalldirs'), $this->printLangS('STR_uncheckalldirs'), $this->printLangS('STR_uncheckenddirs')), $myn); $myn = ereg_replace(':checkallfiles:', $this->evalStyle('checkallfiles', $this->printLangS('STR_checkallfiles'), $this->printLangS('STR_uncheckallfiles'), $this->printLangS('STR_uncheckendfiles')), $myn); $myn = ereg_replace(':randlink:', $this->evalStyle('randlink', $this->printLangS('STR_randlink')), $myn); $myn = ereg_replace(':helplink:', $this->evalStyle('helplink', $this->printLangS('STR_helplink')), $myn); $myn = ereg_replace(':adminlink:', defined('ADMIN') && ADMIN == 'admin' ? $this->evalStyle('adminlink', $this->printLangS('STR_adminlink')) : '', $myn); $myn = ereg_replace(':INIT_prolling:', $proll, $myn); $myn = ereg_replace(':adminLogin:'******'LOGIN') ? $this->evalStyle('adminLogin') : '', $myn); $myn = ereg_replace(':maintabletitle:', $mainTableStr, $myn); $myn = ereg_replace(':homelink:', $this->evalStyle('homelink'), $myn); // Write 'inputs' for hidden form. $str = ''; if (isset($this->collectArray) && !empty($this->collectArray)) { foreach ($this->collectArray as $pid) { $str .= '<input type="hidden" name="ids[]" value="' . $pid . '">' . "\n" . ' '; } } $myn = ereg_replace(':collectarray:', $str, $myn); // user own temporary playlist $myn = ereg_replace(':playlist_in:', $playlist_in->init(), $myn); // link to validator $myn = ereg_replace(':validator:', $this->evalStyle('validator'), $myn); // shoutbox init $myn = ereg_replace(':INIT_shoutbox:', $sb->printShoutBox(), $myn); // stats & informations $myn = ereg_replace(':botline:', $this->evalStyle('botline', $this->printLangS('botline', $this->JampTime()), $this->printLangS('botlineStats', STATS)), $myn); print $myn; ob_end_flush(); }
{ // include SQL data for uninstallation include $this->root_path . 'plugins/shoutbox/includes/data/sql.php'; for ($i = 1; $i <= count($shoutboxSQL['uninstall']); $i++) { $this->add_sql(SQL_UNINSTALL, $shoutboxSQL['uninstall'][$i]); } } /** * post_uninstall * Define Post Uninstall */ public function post_uninstall() { // clear cache $this->pdc->del('pdh_shoutbox_table'); // clear RSS feed $this->pfh->Delete($this->pfh->FilePath('shoutbox.xml', 'shoutbox')); } /** * gen_admin_menu * Generate the Admin Menu */ private function gen_admin_menu() { $admin_menu = array(array('name' => $this->user->lang('shoutbox'), 'icon' => './../../plugins/shoutbox/images/adminmenu/shoutbox.png', 1 => array('link' => 'plugins/shoutbox/admin/settings.php' . $this->SID, 'text' => $this->user->lang('settings'), 'check' => 'a_shoutbox_', 'icon' => 'manage_settings.png'), 2 => array('link' => 'plugins/shoutbox/admin/manage.php' . $this->SID, 'text' => $this->user->lang('sb_manage_archive'), 'check' => 'a_shoutbox_delete', 'icon' => './../glyphs/archive.png'))); return $admin_menu; } } if (version_compare(PHP_VERSION, '5.3.0', '<')) { registry::add_const('short_shoutbox', shoutbox::__shortcuts()); }