/** returns user information */ function wiki_fn_user_info() { $auth =& get_auth(); if ($auth->is_logged) { $cb = config('user_info_file_callback'); if ($cb === null) { trigger_error(_t("Config value user_info_file_callback not set"), E_USER_ERROR); } $f = call_user_func($cb, $auth->user); if (!file_exists($f)) { return null; } $user_info = file_get_contents($f); if ($user_info === false) { return null; } return $user_info; } return null; }
} else { include 'frontpage' . $phpex; } } else { if (file_exists($page . $phpex) && $validdynamic) { include $page . $phpex; } elseif (!$validdynamic && $page != "frontpage") { show_message("The module you are trying to access is either not a valid module, or it has been disabled"); } else { include 'frontpage' . $phpex; } $tpl->assign("cpallowed", get_auth("usercp", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'usercp'"))); $tpl->assign("profileallowed", get_auth("profile", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'profile'"))); $tpl->assign("contributionallowed", get_auth("mythings", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'mythings'"))); $tpl->assign("groupsallowed", get_auth("mypatrol", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'mypatrol'"))); $tpl->assign("pmallowed", get_auth("pmmain", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'pmmain'"))); } if ($pagenum == 0) { $pagenum = 1; } if ($dbpage == true && isset($pagename) && $pagename != "" && $pagename != "frontpage") { $dataC = true; $filetouse = get_temp($pagename, $pagenum); } elseif ($pagename == "frontpage") { $dataC = true; $filetouse = $content; } elseif ($dbpage == false && $message != "" && $othermessage == false) { $filetouse = $message; $dataC = true; } if ($filetouse == "") {
function check_shop_auth($url = '', $type = 's') { global $_W, $_GPC; if ($_W['ispost'] && $_GPC['do'] != 'auth') { $auth = get_auth(); load()->func('communication'); $domain = $_SERVER['HTTP_HOST']; $ip = gethostbyname($domain); $setting = setting_load('site'); $id = isset($setting['site']['key']) ? $setting['site']['key'] : '0'; if (empty($type) || $type == 's') { $post_data = array('type' => $type, 'ip' => $ip, 'id' => $id, 'code' => $auth['code'], 'domain' => $domain); } else { $post_data = array('type' => 'm', 'm' => $type, 'ip' => $ip, 'id' => $id, 'code' => $auth['code'], 'domain' => $domain); } $resp = ihttp_post($url, $post_data); $status = $resp['content']; } }
function update($content, $message) { $this->load(); if ($this->has_content && $this->raw_content == $content) { return false; } $storage =& get_storage(); $auth =& get_auth(); $this->user = $auth->user; $this->revision = MW_REVISION_HEAD; $res = new MW_Resource(MW_DS_PAGES); $res->set(MW_RESOURCE_KEY_NAME, $this->name); $res->set(MW_RESOURCE_KEY_CONTENT, $content); $res->set(MW_RESOURCE_KEY_MESSAGE, $message); $res->set(MW_RESOURCE_KEY_AUTHOR, $this->user); $storage->update_resource(MW_DS_PAGES, $res); $this->load(); return true; }
while ($temp = $data->fetch_array($sql)) { $temp['comment'] = censor($temp['comment']); $temp2 = $data->select_fetch_one_row("users", "WHERE id={$temp['uid']}", "uname"); $temp['uname'] = $temp2['uname']; $comments[] = $temp; } $tpl->assign("numcom", $numcom); $tpl->assign("com", $comments); $tpl->assign("comviewallowed", get_auth('comviewallowed', 2)); $tpl->assign("compostallowed", get_auth('compostallowed', 2)); $scriptList['slimbox'] = 1; $location = $view_album_name . " Photo Album"; } } else { if (!$inarticle) { $add = get_auth('addphotoalbum') == 1 ? true : false; $addlink = "index.php?page=addphotoalbum&menuid={$menuid}"; } } $tpl->assign('number_of_albums', $num_albums); if (isset($album_array)) { $tpl->assign('albums', $album_array); } $tpl->assign('album_id', $albumid); if (isset($view_album_name)) { $tpl->assign('view_album_name', $view_album_name); } if (isset($number_of_photos)) { $tpl->assign('number_of_photos', $number_of_photos); } $tpl->assign('location', $where);
function update($content, $message) { $storage =& get_storage(); $auth =& get_auth(); $this->user = $auth->user; $this->revision = MW_REVISION_HEAD; $res = new MW_Resource(MW_DS_UPLOADS); $res->set(MW_RESOURCE_KEY_NAME, $this->upload_name); $res->set(MW_RESOURCE_KEY_CONTENT, $content); $res->set(MW_RESOURCE_KEY_MESSAGE, $message); $res->set(MW_RESOURCE_KEY_AUTHOR, $this->user); $storage->update_resource(MW_DS_UPLOADS, $res); $this->load(); return true; }
$bod = $vbulletin->userinfo['birthday']; if (!empty($bod)) { $year = explode("-", $bod); $bod = $year['2']; } // Get the user's description $description = $vbulletin->userinfo['field1']; // Create a new Auth instance $auth = new CCAuth($user_id, $secret, $api_key, ''); // Authenticate the user $auth->setUserInfo($vbulletin->userinfo['username'], $description, null, $bod, $location, null, $src, array('homepageLink' => $vbulletin->options['bburl'] . '/member.php?' . $vbulletin->userinfo['userid'])); return $auth; } return null; } $auth = get_auth(); if ($auth != null) { if ($_REQUEST['action'] == 'cc_get_uid') { $auth->respondWithUserID(); } if ($_REQUEST['action'] == 'cc_get_token') { $auth->respondWithToken(); } } else { CCAuth::logout(); } /*======================================================================*\ || #################################################################### || # || # CVS: $RCSfile$ - $Revision: 31386 $ || ####################################################################
function is_permitted() { $auth =& get_auth(); $page =& get_current_page(); return $auth->is_action_permitted($this, $page); }
print_log('Link : ' . $xml['Links']['Link'], '+', 1, false); print_log('Delete Link : ' . $xml['Links']['DelLink'], '+', 1, false); print_log('---------------------------------------------------------------------------', '+', 1, true); } else { if (array_key_exists('Error', $xml)) { print_log('Cannot compile uploaded file. (Reason: ' . $xml['Error'] . '). Exit', 'do_get_links', 0, true); } else { print_log('Invalid responds. (Reason: unknown XML). Exit', 'do_get_links', 0, true); } } } else { print_log('Invalid responds. Exit', 'do_get_links', 0, true); } } if (!empty($argv[1])) { $filepath = $argv[1]; } if (check_args()) { if (!file_exists($filepath)) { print_log('File is not exists. Exit.', '', 0, true); } $chkpath = str_split($filepath); if ($chkpath[0] != '/') { print_log('Path must be an absolute/full path. Exit.', 'check_path', 0, true); } remove_link(); create_link(); get_auth(); } else { print_log('Must be execute with \'path filename\' arguments. Exit.', 'check_args', 0, true); }
$rssuname = safesql(md5($check['uname']), "text"); if ($data->num_rows($data->select_query("rssfeeds", "WHERE itemid={$temp3['id']} AND type=1 AND uname={$rssuname}", "id"))) { $temp3['rss'] = 1; } else { $temp3['rss'] = 0; } $temp3['nummods'] = 0; $sql4 = $data->select_query("forummods", "WHERE fid={$temp3["id"]}"); $temp3['nummods'] = $data->num_rows($sql4); $temp3['mods'] = array(); while ($temp4 = $data->fetch_array($sql4)) { if ($temp4['type'] == 0) { $sql5 = $data->select_query("users", "WHERE id='{$temp4['mid']}'", "uname, publicprofile"); $temp5 = $data->fetch_array($sql5); $temp4['name'] = $temp5['uname']; $temp4['clickable'] = $temp5['publicprofile'] && get_auth("profile", 0); $temp4['type'] = 0; } else { $sql5 = $data->select_query("groups", "WHERE id={$temp4['mid']}", "teamname, ispublic"); $temp5 = $data->fetch_array($sql5); $temp4['name'] = $temp5['teamname']; $temp4['clickable'] = $temp5['ispublic']; $temp4['type'] = 1; } $temp3['mods'][] = $temp4; } $subforums[] = $temp3; } else { $name = $temp3['name']; $temp3['name'] = "You do not have access to the \"{$name}\" forum"; $temp3['allowed'] = 0;
$sql = $data->select_query("comments", "WHERE item_id={$id} AND type=0 AND allowed = 1"); $numcom = $data->num_rows($sql); $comments = array(); while ($temp = $data->fetch_array($sql)) { $temp['comment'] = censor($temp['comment']); $temp2 = $data->select_fetch_one_row("users", "WHERE id={$temp['uid']}", "uname"); $temp['uname'] = $temp2['uname']; $comments[] = $temp; } $article['detail'] = censor($article['detail']); $article['title'] = censor($article['title']); $location = $article['title']; $tpl->assign("numcom", $numcom); $tpl->assign("com", $comments); $tpl->assign("comviewallowed", get_auth('comviewallowed', 2)); $tpl->assign("compostallowed", get_auth('compostallowed', 2)); $tpl->assign("article", $article); $tpl->assign("topicid", $tid); } elseif ($action == "topic" && $tid != 'NULL') { $mode = "viewtopic"; $topic = $data->select_fetch_one_row("articletopics", "WHERE id={$tid}"); if (isset($patrolid) && $patrolid != '') { $sql = $data->select_query("patrol_articles", "WHERE patrol = {$patrolid} AND topics <> 'N;' AND topics <> '' AND allowed = 1 AND trash = 0 ORDER BY {$topic['sort']} {$topic['order']}"); } else { $sql = $data->select_query("patrol_articles", "WHERE topics <> 'N;' AND topics <> '' AND allowed = 1 AND trash = 0 ORDER BY {$topic['sort']} {$topic['order']}"); } $articles = array(); $numarticles = 0; $numon = 0; $numbertodisplay = $topic['perpage']; $start = isset($_GET['start']) ? $_GET['start'] : 0;
include '../lib/util.php'; include '../lib/source/serpent.class.php'; require_once '../model/utilisateur.inc.php'; clear_deprecated_reserved_matches(); session_start(); $sections = array('accueil', 'inscription', 'login', 'matchs', 'panier', 'achat', 'match_detail', 'signout', 'reservation_billet', 'confirmation_achat_billet', 'achat_billet', 'configuration', 'admin_matches', 'admin_arenas', 'admin'); $section = get($_GET, 'section', 'accueil'); if ($section == 'accueil') { $section = get($_POST, 'section', 'accueil'); } if (!in_array($section, $sections)) { $section = 'unknown'; } $vars = array(); $vars['userid'] = get_auth(); $vars['is_admin'] = is_admin(); $vars['is_logged'] = $vars['userid'] >= 0; $vars['theme'] = 'standard.css'; include $section . '.php'; generate_vars($section, $vars); $vars['section_name'] = ucfirst(str_replace('_', ' ', $section)); if ($vars['is_logged']) { $user = Utilisateur::get($vars['userid']); if ($user->theme == 'Dark') { $vars['theme'] = 'dark.css'; } } $serpent = new serpent(); $serpent->compile_dir = '../view/templates_compiled'; $serpent->addPluginConfig('resource', 'file', array('template_dir' => '../view/templates/'));
function &get_current_webdav_client() { if ($this->cur_client === null) { $auth =& get_auth(); if ($auth->is_invalid()) { $user = null; $pass = null; } else { $user = $auth->user; $pass = $auth->pass; } $this->cur_client = $this->get_webdav_client($user, $pass); } return $this->cur_client; }
function get_authcode() { $auth = get_auth(); return empty($auth['code']) ? '' : $auth['code']; }
function wiki_include($page, $args = null, $flat_args = false, $as_current = true) { $auth =& get_auth(); if (!$auth->is_action_permitted(get_action(MW_ACTION_VIEW), $page)) { return '[[' . $page->name . ']]'; } $ret = '{{&push_vars}}'; if ($as_current) { $ret .= '{{&set|curpage|' . $page->name . '}}'; } if ($args !== null && count($args) > 0) { $args_str = ''; if ($flat_args) { $args_str = '|' . join('|', $args); } else { foreach ($args as $name => $value) { $args_str .= '|' . $name . '|' . $value; } } $ret .= '{{&set' . $args_str . '}}'; } $ret .= str_replace("\r", '', $page->get_wiki_content()); $ret .= '{{&pop_vars}}'; return $ret; }
* echo debug message (if MW_DEBUG is true) * msg: message to show */ function debug($msg) { if (MW_DEBUG) { echo '<div class="debug">' . htmlspecialchars('DEBUG: ' . $msg, ENT_NOQUOTES), "</div>\n"; } } ini_set('include_path', ini_get('include_path') . ':.'); include 'miniwiki.php'; miniwiki_boot(); $req =& get_request("MW_PageRequest"); $page = $req->get_page(); set_current_page($page); $auth =& get_auth(); if ($auth->is_invalid()) { add_info_text(_t('Invalid login.')); } $storage =& get_storage(); if (!$auth->is_logged && $storage->requires_login()) { $action = get_action(MW_ACTION_LOGIN); $action->handle(); } $req =& get_request("MW_ActionRequest"); $action = $req->get_action(); if ($action === null) { trigger_error(_t("Unknown action."), E_USER_ERROR); } while ($action !== null) { if (!$action->is_valid()) {
if (isset($_GET['pagenum'])) { $pagenum = $_GET['pagenum']; } else { $pagenum = 0; } $sitecontent = ""; $sitecontent = get_page_subs($content, $patrolid, 1); $pageid = get_page_id_subs($content, $patrolid, 1); if ($content == '' || !isset($content)) { $sitecontent = get_frontpage_subs($patrolid, 1); $edit = adminauth("patrol", "edit") && !adminauth("patrol", "limit") || adminauth("patrol", "edit") && adminauth("patrol", "limit") && user_group_id($check['id'], $patrolid) ? true : false; $add = adminauth("patrol", "add") && !adminauth("patrol", "limit") || adminauth("patrol", "add") && adminauth("patrol", "limit") && user_group_id($check['id'], $patrolid) ? true : false; $addlink = "admin.php?page=patrol&subpage=patrolcontent&action=new&pid={$patrolid}"; $editlink = "admin.php?page=patrol&subpage=patrolmenus&pid={$patrolid}"; } elseif ($sitecontent == "" && file_exists($content . $phpex)) { if (get_auth($content, 0) == 1) { include $content . $phpex; } else { $dataC = true; $dbpage = false; show_message("You do not have the required permissions to view that page", "index.php?page=patrolpages&patrol={$patrolid}&menuid={$menuid}"); } } else { $edit = adminauth("patrol", "edit") && !adminauth("patrol", "limit") || adminauth("patrol", "edit") && adminauth("patrol", "limit") && user_group_id($check['id'], $patrolid) ? true : false; $add = adminauth("patrol", "add") && !adminauth("patrol", "limit") || adminauth("patrol", "add") && adminauth("patrol", "limit") && user_group_id($check['id'], $patrolid) ? true : false; $addlink = "admin.php?page=patrol&subpage=patrolcontent&action=new&pid={$patrolid}"; $editlink = "admin.php?page=patrol&subpage=patrolcontent&id={$content}&action=edit&pid={$patrolid}"; } if ($sitecontent === false) { show_message("That page is only accessible by members of the group", $site != NULL ? "index.php?page=patrolpages&patrol={$patrolid}&menuid={$menuid}&site={$site}" : "index.php?page=patrolpages&patrol={$patrolid}&menuid={$menuid}"); }
$tpl->assign('dataC', $dataC); $tpl->assign("photopath", $config["photopath"] . "/"); $tpl->assign('userdisp', $userdisp); $tpl->assign('islogged', $islogged); $tpl->assign('usersname', $check['uname']); $tpl->assign('uname', $check['uname']); $tpl->assign('userid', $check['id']); $tpl->assign("timeoffset", getuseroffset($check['uname'])); $tpl->assign("serverOffset", getoffset($config['zone'])); $tpl->assign("editable", $edit); $tpl->assign("editlink", $editlink); $tpl->assign("addable", $add); $tpl->assign("addlink", $addlink); $tpl->assign("script", $script); $tpl->assign("profileAllowed", get_auth("profile", 0)); $tpl->assign("pmAllowed", get_auth("pmmain", 0)); include "page_footer.php"; //Check for user message $uid = safesql($check['uid'], "text"); $messages = $data->select_fetch_one_row("messages", "WHERE uid={$uid} AND type <> 3"); $data->delete_query("messages", "uid={$uid}"); if ($messages) { $tpl->assign("ismessage", true); $tpl->assign("infomessage", $messages['message'] . ($messages['type'] == 0 ? " (Click on the message to hide)" : "")); if ($messages['post'] != NULL) { $post = unserialize($messages['post']); $tpl->assign("repost", $post); } if ($messages['type'] == 1) { $tpl->assign("nohide", true); }
$results[str_replace(' ', '', $_POST['option'][$i])] = 0; } $results = safesql(serialize($results), "text"); $sql = $data->insert_query("polls", "NULL, {$poll['pollq']}, {$timestamp}, {$poll['stopdate']}, {$options}, {$results}, {$allow}, 0"); if ($sql) { $polling = $data->select_fetch_one_row("polls", "WHERE question = {$poll['pollq']} AND date_start={$timestamp} ORDER BY id DESC", "id"); if ($data->insert_query("owners", "'', {$polling['id']}, 'pollitems', {$check['id']}, 0, 0, 0")) { if (confirm('poll')) { confirmMail("poll", $polling); } else { email('newitem', array("poll", $polling)); } show_message($message, "index.php?page=mythings&menuid={$menuid}"); } else { show_message("There was an error adding your poll. If this error persists please contact the site administrator.", "index.php?page=addpoll&menuid={$menuid}", true); } } } } else { show_message("There where some errors with some fields, please check them again and resubmit.", "index.php?page=addpoll&menuid={$menuid}", true); } } $script .= "{literal}\nfunction initialiseInputs() {\n // Clear any old values from the inputs (that might be cachedate by the browser after a page reload)\n document.getElementById(\"sdate\").value = \"\";\n}\n\ndatePickerController.addEvent(window, 'load', initialiseInputs);\n{/literal}"; $scriptList['datepicker'] = 1; $sql = $data->select_query("polls", "WHERE sidebox=1", "question"); $sideboxpoll = $data->fetch_array($sql); $tpl->assign('sideboxpoll', $sideboxpoll); $authorization['sideboxpoll'] = get_auth('sideboxpoll'); $tpl->assign('auth', $authorization); $dbpage = true; $pagename = "addpoll";
/** * returns non-empty string if current user has permission on given action * for revision (set to revision variable if omitted; head means HEAD revision) * and page (set to page variable if omitted) */ function wiki_fn_is_action_permitted($args, $renderer_state) { $action_name = array_shift($args); $revision = array_shift($args); if ($revision === null) { $revision = $renderer_state->wiki_variables->get('revision'); } $page_name = array_shift($args); if ($page_name === null) { $page_name = $renderer_state->wiki_variables->get('page'); } if ($revision == 'head') { $revision = MW_REVISION_HEAD; } $page = new_page($page_name, $revision); $auth =& get_auth(); $action = get_action($action_name); return $action !== null && $auth->is_action_permitted($action, $page) ? 'true' : ''; }
$temp['edate'] = strftime("%Y/%m/%d", $temp['enddate']); $temp['stime'] = strftime("%H:%M", $temp['startdate']); $temp['etime'] = strftime("%H:%M", $temp['enddate']); $calendar .= "\n <div class=\"newsitem\">\n <h3>" . censor($temp['summary']) . "</h3>\n <span class=\"smalltext\"><b>Start Date: </b>{$temp['sdate']} | <b>Start Time: </b>{$temp['stime']}</span><br />\n <span class=\"smalltext\"><b>End Date: </b>{$temp['edate']} | <b>End Time: </b>{$temp['etime']}</span>"; if ($temp['detail'] != NULL) { $calendar .= "<p>" . censor($temp['detail']) . "</p>"; } $calendar .= "</div>"; } } } else { $calendar .= "There are no events happening during {$month}."; } $calendar .= "<div class=\"smalltext\">You can see a year view by clicking on the <img src=\"{$templateinfo['imagedir']}calendar.png\" border=\"0\" title=\"Year View\" alt=\"Year View\"/> icon <br />You can see a month view by clicking on the <img src=\"{$templateinfo['imagedir']}view_month.png\" title=\"View Month\" alt=\"View Month\" border=\"0\"/> icon <br />You can goto the current date by clicking on the <img src=\"{$templateinfo['imagedir']}today.png\" border=\"0\" title=\"Today\" alt=\"Today\"/> icon</div>"; } $add = get_auth('addevent') == 1 ? true : false; $addlink = "index.php?page=addevent&menuid={$menuid}"; $rssuname = safesql(md5($check['uname']), "text"); if ($data->num_rows($data->select_query("rssfeeds", "WHERE itemid=1 AND type=3 AND uname={$rssuname}", "id"))) { $rss = 1; } else { $rss = 0; } $tpl->assign("calendar", $calendar); $tpl->assign("rss", $rss); $show_detail = false; } } else { $calendar = new vcalendar(); $calsql = $data->select_query("calendar_items", "WHERE allowed = 1 AND trash=0"); while ($temp = $data->fetch_array($calsql)) {
function link() { $link = parent::link(); $auth =& get_auth(); if ($auth->is_logged) { $link->set_old_user($auth->user); } return $link; }
$numpolls++; $temp['expire'] = $temp2['expire']; $temp['type_owner'] = $temp2['type_owner']; $temp['expired'] = $temp2['expire'] >= $timestamp || $temp2['expire'] == 0 ? 0 : 1; $pollitems[] = $temp; } } } $authorization = array(); $authorization['album'] = get_auth('addphotoalbum', 2); $authorization['article'] = get_auth('addarticle', 2); $authorization['notice'] = get_auth('addnotice', 2); $authorization['event'] = get_auth('addevent', 2); $authorization['down'] = get_auth('adddown', 2); $authorization['news'] = get_auth('addnews', 2); $authorization['poll'] = get_auth('addpoll', 2); $tpl->assign("pageactive", $pageactive); $tpl->assign("action", $action); $tpl->assign("auth", $authorization); $tpl->assign("numalbums", $numalbums); $tpl->assign("albums", $album); $tpl->assign("numart", $numart); $tpl->assign("articles", $articles); $tpl->assign("numevents", $numevents); $tpl->assign("events", $events); $tpl->assign("numdown", $numdown); $tpl->assign("downloads", $downloads); $tpl->assign("numnews", $numnews); $tpl->assign("newsitems", $newsitems); $tpl->assign("numpolls", $numpolls); $tpl->assign("pollitems", $pollitems);
function is_permitted() { $auth =& get_auth(); $page =& get_current_page(); $req =& get_request("MW_RenameRequest"); $new_name = $req->get_new_name(); if ($new_name !== null) { $new_page = new_page($new_name, MW_REVISION_HEAD); if (!$auth->is_action_permitted($this, $new_page)) { return false; } } return parent::is_permitted(); }
die("You have accessed this page illegally, please go use the main menu"); } $level = $check['level']; $frontsql = $data->select_query("frontpage", "ORDER BY pos ASC"); $content = ""; while ($item = $data->fetch_array($frontsql)) { if ($item['type'] == 0) { if (get_auth($item['item'], 1) == 1) { $pagesql = $data->select_query("static_content", "WHERE id = '{$item['item']}' AND trash=0"); $stuff = $data->fetch_array($pagesql); $content .= "<div class=\"frontpage\">" . censor($stuff['content']) . "</div>"; } } elseif ($item['type'] == 1) { $funsql = $data->select_query("functions", "where id = '{$item['item']}'"); $stuff = $data->fetch_array($funsql); if (get_auth($stuff['code'], 0) == 1) { if (file_exists($stuff['code'] . $phpex)) { include $stuff['code'] . $phpex; } if ($dbpage == true && isset($pagename) && $pagename != "" && $pagename != "frontpage") { $content .= "<div class=\"frontpage\">" . get_temp($pagename, $pagenum) . "</div>"; } } } $content .= "<br />"; } if ($content == "") { $content = "No frontpage defined"; } $add = false; $edit = false;
$dbpage = false; if (isset($_GET['pagenum'])) { $pagenum = $_GET['pagenum']; } else { $pagenum = 0; } $sitecontent = ""; $sitecontent = get_page_subs($content, $subsite, 2); if ($content == '' || !isset($content)) { $sitecontent = get_frontpage_subs($subsite, 2); $edit = adminauth("subsite", "edit") ? true : false; $add = adminauth("subsite", "add") ? true : false; $addlink = "admin.php?page=subsite&subpage=subcontent&action=new&sid={$subsite}"; $editlink = "admin.php?page=subsite&subpage=submenu&sid={$subsite}"; } elseif ($sitecontent == "" && file_exists($content . $phpex)) { if (get_auth($content) == 1) { include $content . $phpex; } else { $dataC = true; $dbpage = false; $filetouse = "You do not have the required permisions to view this page."; $denied = true; } } else { $edit = adminauth("subsite", "edit") ? true : false; $add = adminauth("subsite", "add") ? true : false; $addlink = "admin.php?page=subsite&subpage=subcontent&action=new&sid={$subsite}"; $editlink = "admin.php?page=subsite&subpage=subcontent&id={$content}&action=edit&sid={$subsite}"; } if ($pagenum == 0) { $pagenum = 1;