Ejemplo n.º 1
0
    $character = get_character($character_id);
    if ($character['project']['user_id'] != $user_id || $character['project']['project_id'] != $project_id) {
        $error = "This character is not part of this project";
    }
}
if (!$error && !empty($_POST['data'])) {
    $save_data = array('characters' => array($character_id => array()));
    foreach ($_POST['data'] as $key => $value) {
        if (isset($character['character'][$key])) {
            if (trim($value) != trim($character['character'][$key])) {
                $save_data['characters'][$character_id][$key] = $value;
            }
        }
    }
    if (!empty($save_data)) {
        if (save_project_data($project_id, $save_data)) {
            $saveMessage = "Save Succssful!";
        } else {
            $saveMessage = "There was a problem saving the data.";
        }
    }
}
?>
<!DOCTYPE html>
<html>
<head>
	<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
	<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
	<link rel="stylesheet" href="css/input.css">
	<script src="includes/jquery-1.9.0.min.js"></script>
	<script type="text/javascript" src="/includes/colorbox.js"></script>
Ejemplo n.º 2
0
         $user_data = $_POST["user_data"];
         $notify_user = $_POST["notify_user"];
         $apache_vars = $_SERVER;
         draw_page_top($page);
         save_user_data($user_data, $user_table, $notify_user, $apache_vars);
         draw_page_bottom();
     }
     break;
     # SAVE POSTED NEW PROJECT DATA.  IN: $project_data[] array
 # SAVE POSTED NEW PROJECT DATA.  IN: $project_data[] array
 case "saveproject":
     admin_check();
     if ($just_posted) {
         $project_data = $_POST["project_data"];
         draw_page_top($page);
         save_project_data($project_data, $project_table);
         draw_page_bottom();
     }
     break;
     ###################################
     #   END OF ADMIN-SPECIFIC PAGES   #
     ###################################
     # GENERIC BIT BUCKET FOR BOGUS PAGE REQUEST
 ###################################
 #   END OF ADMIN-SPECIFIC PAGES   #
 ###################################
 # GENERIC BIT BUCKET FOR BOGUS PAGE REQUEST
 default:
     no_cache();
     $ref = htmlentities($_SERVER['HTTP_REFERER']);
     print '<html><body><meta http-equiv="refresh" content="6; url=' . 'codetrack.php?page=login&invalidpage=' . $page . '"><center><h4><br /><br /><br />' . "Invalid page requested '{$page}'<br /><br />Referring page: {$ref} <em><br /><br />" . "Redirecting to login page in six seconds. </em></center></h4></body></html>";