Exemplo n.º 1
0
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
**************************************************************************/
if (!defined('SCOUT_NUKE')) {
    die("You have accessed this page illegally, please go use the main menu");
}
$location = "Links";
$sql = $data->select_query("links_cats", "ORDER BY position ASC");
$numcats = $data->num_rows($sql);
$links = array();
while ($temp = $data->fetch_array($sql)) {
    $sql2 = $data->select_query("links", "WHERE cat={$temp['id']} ORDER BY position ASC");
    $temp['numlinks'] = $data->num_rows($sql2);
    while ($temp2 = $data->fetch_array($sql2)) {
        $temp['links'][] = $temp2;
    }
    $links[] = $temp;
}
$edit = adminauth("links", "edit") ? true : false;
$editlink = "admin.php?page=links";
$tpl->assign("action", $action);
$tpl->assign("numcats", $numcats);
$tpl->assign("links", $links);
$dbpage = true;
$pagename = "linksdata";
$scriptList['mootabs'] = 1;
Exemplo n.º 2
0
    $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}");
}
if ($pagenum == 0) {
    $pagenum = 1;
}
if ($dbpage == true && isset($pagename) && $pagename != "" && $pagename != "frontpage") {
    $sitecontent = get_temp($pagename, $pagenum);
} elseif (isset($pagename) && $pagename == "frontpage") {
    $sitecontent = $content;
} elseif ($dbpage == false && $message != "") {
    $sitecontent = $message;
Exemplo n.º 3
0
$exempt = array("rss" => true, "patrolpages" => true, "subsite" => true, "logon" => true, "register" => true, "forgot" => true);
if ($exempt[$page] == true || $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = {$safe_page}"))) {
    $validdynamic = true;
}
$dataC = false;
$dbpage = false;
$pagenum = isset($_GET['pagenum']) ? $_GET['pagenum'] : 0;
$filetouse = "";
$othermessage = false;
if (get_auth($page, $type) == 1) {
    if ($type == 1) {
        $filetouse = censor(get_spec($page, $location));
        if ($filetouse && $page != "frontpage" || !$validdynamic) {
            $dataC = true;
            location($location, $check["uid"]);
            $edit = adminauth("content", "edit") ? true : false;
            $editlink = "admin.php?page=content&id={$page}&action=edit&main=1";
        } 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'")));
Exemplo n.º 4
0
     $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;
 }
 if ($dbpage == true && isset($pagename) && $pagename != "" && $pagename != "frontpage" && $sitecontent == "") {
     $sitecontent = get_temp($pagename, $pagenum);
 } elseif (isset($pagename) && $pagename == "frontpage") {
     $sitecontent = $content;
 }
 if ($sitecontent == "") {
     $sitecontent = $pagename;
 }
 if ((!isset($sitecontent) || $sitecontent == "") && (!isset($pagename) || $pagename == "")) {