<?php include_once "config.php"; include_once "{$INCLUDE_PATH}/system.php"; include_once "{$INCLUDE_PATH}/error.php"; include_once "{$INCLUDE_PATH}/engine/sid.php"; include_once "{$INCLUDE_PATH}/engine/validation.php"; include_once "{$INCLUDE_PATH}/engine/campaign.class.php"; include_once "{$INCLUDE_PATH}/engine/character.class.php"; include_once "{$INCLUDE_PATH}/engine/templates.php"; include_once "{$INCLUDE_PATH}/engine/serialization.php"; // Try to respawn a session to keep the menu nav in context. $sid = new SId(); if ($REQUIRE_LOGIN && !$sid->IsSessionValid()) { draw_page('login_required.php'); exit; } // Validate permission for the requested character. $id = (int) $_POST['id']; if (!$id) { $id = (int) $_GET['id']; } $campaign = new Campaign($id); if ($sid->GetUserName() != $campaign->owner) { draw_page('view_campaign_error.php'); exit; } $title = $campaign->cname; draw_page('campaign_summary.php');
include_once "{$INCLUDE_PATH}/engine/character.class.php"; include_once "{$INCLUDE_PATH}/engine/templates.php"; include_once "{$INCLUDE_PATH}/engine/serialization.php"; // Try to respawn a session to keep the menu nav in context. $sid = new SId(); if ($REQUIRE_LOGIN && !$sid->IsSessionValid()) { draw_page('login_required.php'); exit; } // Validate permission for the requested character. $id = (int) $_POST['id']; if (!$id) { $id = (int) $_GET['id']; } $campaign = new Campaign($id); if ($campaign->owner == $sid->GetUserName()) { if (isset($_POST['invite_character'])) { $update_invite = process_invite_character($campaign, (int) $_POST['invite_character']); } if (isset($_POST['cancel_join'])) { $update_invite = process_cancel_join((int) $_POST['cancel_join']); } if (isset($_POST['accept_join_request'])) { $update_char = process_accept_join($campaign, (int) $_POST['accept_join_request']); } } draw_page('view_campaign.php'); function process_invite_character(&$campaign, $char_id) { $character = new Character($char_id); if ($character->campaign_id > 0 || $character->GetPendingCampaign()) {