echo "Invalid input."; exit; } $user_id = $_SESSION['user_id']; $bearer_id = $_GET['bearer']; $receiver_id = $_GET['receiver']; $project_id = $activeProject['project_id']; $type = null; if (!empty($_GET['type'])) { $type = $_GET['type']; } if (empty($type)) { echo "No type set"; exit; } $opinion = get_character_opinions($type, $project_id, $bearer_id, $receiver_id); $data_from = $opinion['from']; $note_text = ''; $subHeader = ''; $header = ''; switch ($type) { case 'c2c': if (!empty($opinion['c2c']['opinion_word'])) { $note_text .= "Opinion of character {$opinion['receiver']['character']['character_name']}: <strong>" . $opinion['c2c']['opinion_word'] . "</strong><br >"; } else { $note_text .= "No specific opinion of character {$opinion['receiver']['character']['character_name']}<br >"; } case 'c2f': if (!empty($opinion['c2f']['opinion_word'])) { $note_text .= "Opinion of faction {$opinion['receiver']['faction']['faction_name']}: <strong>" . $opinion['c2f']['opinion_word'] . "</strong><br >"; } else {
$owned = false; foreach ($projects as $project) { if ($character_data['character']['project_id'] == $project['project_id']) { $owned = true; break; } } if (!$owned) { header("Location: new_project.php"); exit; } foreach ($characters as $faction_num => $faction_characters) { foreach ($faction_characters as $character_num => $faction_character) { $opinion['opinion_word'] = "No character details set."; if ($character_data['character']['character_id'] != $faction_character['character_id']) { $opinion = get_character_opinions('c2c', $project_id, $character_data['character']['character_id'], $faction_character['character_id']); } $characters[$faction_num][$character_num]['opinion'] = $opinion; } } if (!isset($_GET['character']) || empty($_GET['character']) == true) { $a = 1; $result = mysql_result(mysql_query("SELECT `character_id` FROM `characters` WHERE `project_id`='{$project_id}' && `character_number` = '{$a}' && `faction`='{$a}'"), 0); echo '<meta HTTP-EQUIV="REFRESH" content="0; url=character_card.php?character=' . $result . '">'; exit; } ?> <!DOCTYPE html> <html> <head> <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">