<?php //prepare the templates and include all neccessary if (!isset($rootpath)) { $rootpath = ''; } require_once './lib/common.inc.php'; global $stat_menu, $mnu_siteid; //Preprocessing if ($error == false) { //user logged in? if ($usr == false) { $target = myUrlEncode(tpl_get_current_page()); tpl_redirect('login.php?target=' . $target); } else { // check for old-style parameters if (isset($_REQUEST['userid'])) { $user_id = $_REQUEST['userid']; } else { $user_id = $usr['userid']; } tpl_set_var('userid', $user_id); require $stylepath . '/viewprofile.inc.php'; require $stylepath . '/lib/icons.inc.php'; $tplname = 'viewprofile'; if ($user_id != $usr['userid']) { // do not highlight My stats menu item if browsing other users stats $mnu_siteid = 'start'; } $stat_menu = array('title' => tr('Statictics'), 'menustring' => tr('Statictics'), 'siteid' => 'statlisting', 'navicolor' => '#E8DDE4', 'visible' => false, 'filename' => 'viewprofile.php?userid=' . $user_id, 'submenu' => array(array('title' => tr('graph_find'), 'menustring' => tr('graph_find'), 'visible' => true, 'filename' => 'ustatsg2.php?userid=' . $user_id, 'newwindow' => false, 'siteid' => 'findstat', 'icon' => 'images/actions/stat'), array('title' => tr('graph_created'), 'menustring' => tr('graph_created'), 'visible' => true, 'filename' => 'ustatsg1.php?userid=' . $user_id, 'newwindow' => false, 'siteid' => 'createstat', 'icon' => 'images/actions/stat'))); $content = "";
<?php //prepare the templates and include all neccessary require_once './lib/common.inc.php'; //Preprocessing if ($error == false) { //user logged in? if ($usr == false) { $target = urlencode(tpl_get_current_page()); tpl_redirect('login.php?target=' . $target); } else { $tplname = 'removemp3'; // gibt es nicht ... require_once $stylepath . '/removemp3.inc.php'; $uuid = isset($_REQUEST['uuid']) ? $_REQUEST['uuid'] : ''; $allok = true; if ($uuid == '') { $allok = false; } if ($allok == true) { $rs = sql("SELECT `object_type`, `object_id`, `user_id`, `id`, `url` FROM `mp3` WHERE `uuid`='&1'", $uuid); if (mysql_num_rows($rs) == 0) { $allok = false; } } if ($allok == true) { $r = sql_fetch_array($rs); mysql_free_result($rs); $type = $r['object_type']; $objectid = $r['object_id']; $user_id = $r['user_id'];
function handleUserLogged() { // check if user logged in - $usr is set in common.inc.php global $usr; if ($usr == false) { // user not logged - redirect to login page... $target = urlencode(tpl_get_current_page()); tpl_redirect('login.php?target=' . $target); exit; } }