<?php include_once '../funcs.php'; if (!isset($_SESSION['id'])) { session_start(); } checkIfLogged(); parse_str($_SERVER['QUERY_STRING']); deleteProfile($_SESSION['token'], $profileID); header("Location: http://" . homeLink() . "/SafeFront/index.php?action=listProfiles&method=Profile%20deleted%20sucessfully");
exit; } } $json = getProfiles(); $profiles = json_decode($json); foreach ($profiles as $profile) { if ($profile->profileID == $profileID) { if ($action != 'editpersonalPage') { unset($profile->personalPages[$personalPageID]); $profile->personalPages = array_values($profile->personalPages); } else { $profile->personalPages[$personalPageID] = $_POST['desc']; } $profile->token = $_SESSION['token']; echo $insert = editProfile($profile); break; } } if (empty($insert)) { if ($action == 'deletepersonalPage') { header("Location: http://" . homeLink() . "/SafeFront/index.php?action=personalPages&profileID=" . $profileID . "&method=Personal%20Page%20deleted%20sucessfully"); } else { header("Location: http://" . homeLink() . "/SafeFront/index.php?action=personalPages&profileID=" . $profileID . "&method=Personal%20Page%20edited%20sucessfully"); } } else { echo $insert; } ?> </body> </html>
<meta charset="utf-8" />'; if ($website_viewport['comment']) { echo '<meta name="viewport" content="width=device-width, initial-scale=1" />'; } if ($website_description['comment']) { echo '<meta name="description" content="' . $website_description['content'] . '" />'; } if ($website_style_admin['comment']) { echo '<link rel="stylesheet" href="css/home.css" />'; } if ($website_favicon['comment']) { echo '<link rel="shortcut icon" type="image/png" href="' . $website_favicon['content'] . '" />'; } echo '<title>' . $website_title['content'] . '</title> </head>'; echo '<body>'; function homeLink($lang, $country) { echo '<a href="index.php?lang=' . $lang . '" data-filter=".home">' . $country . '</a>'; } echo '<img src="img/bp-home.png" alt="Logo" /> <p>'; homeLink('fr', 'FRANCE'); echo ' | '; //homeLink('ru', 'RUSSIA'); //echo ' | '; //homeLink('cn', 'CHINA'); //echo ' | '; homeLink('en', 'INTERNATIONAL'); echo '</p></body>'; include 'include/foot.php';
include_once '../funcs.php'; include_once '../conf.php'; if (!isset($_POST['submit'])) { echo '<h1>You have done it again, you silly!</h1>'; exit; } $adress = new address(); $adress->streetAddress = $_POST['street']; $adress->locality = $_POST['locality']; $adress->postCode = $_POST['post']; $adress->countryName = $_POST['country']; $json = getProfiles(); $profiles = json_decode($json); foreach ($profiles as $profile) { if ($profile->profileID == $_POST['profileID']) { echo '<p>DEPOIS</p>'; array_push($profile->addresses, $adress); $profile->token = $_SESSION['token']; echo $insert = editProfile($profile); break; } } if (empty($insert)) { header("Location: http://" . homeLink() . "/SafeFront/index.php?action=profileAddress&profileID=" . $_POST['profileID'] . "&method=Address%20Inserted%20Sucessfully"); } else { echo $insert; } ?> </body> </html>
<body> <?php session_start(); include_once '../classes/profile.php'; include_once '../classes/address.php'; include_once '../funcs.php'; include_once '../conf.php'; if (!isset($_POST['submit'])) { echo '<h1>You have done it again, you silly!</h1>'; exit; } $personalPage = $_POST['desc']; $json = getProfiles(); $profiles = json_decode($json); foreach ($profiles as $profile) { if ($profile->profileID == $_POST['profileID']) { array_push($profile->personalPages, $personalPage); $profile->token = $_SESSION['token']; echo $insert = editProfile($profile); break; } } if (empty($insert)) { header("Location: http://" . homeLink() . "/SafeFront/index.php?action=personalPages&profileID=" . $_POST['profileID'] . "&method=Allergy%20added%20Sucessfully"); } else { echo $insert; } ?> </body> </html>
$xml = new SimpleXMLElement($result); $result = (string) $xml; if ($result != 'error') { $_SESSION['poke'] = $result; } break; case 'lock': $result = lockPhone($_SESSION['token'], $androidID); break; case 'unlock': $result = unLockPhone($_SESSION['token'], $androidID); break; case 'photo': $result = requestPhoto($_SESSION['token'], $androidID); $xml = new SimpleXMLElement($result); $result = (string) $xml; if ($result != 'error') { $_SESSION['mobileImagesRequest'][$result] = 0; } break; case 'audio': $result = requestAudio($_SESSION['token'], $androidID, $_POST['number']); break; default: break; } if ($result == "error") { header("Location: http://" . homeLink() . "/SafeFront/index.php?action=androidActions&method=" . $action . "%20was%20not%20sucessfull&error=1&result=" . $result); } else { header("Location: http://" . homeLink() . "/SafeFront/index.php?action=androidActions&method=" . $action . "%20sucessfull&error=0&result=" . $result); }
<li><a href="./index.php?action=androidActions">Android Actions</a></li> <li><a href="./index.php?action=requestedPhotos">Requested Photos</a></li> <li><a href="./index.php?action=requestedPoke">Requested Poke</a></li> </ul> </li>'; } ?> </ul> <ul class="nav pull-right"> <?php $link = "https://" . redirectAuthLink() . "/login?redirecturl=http://" . redirectLink() . "/SafeFront/index.php"; $imageSRC = "https://developers.google.com/+/images/branding/sign-in-buttons/Red-signin_Long_base_44dp.png"; $height = 150; $widht = 150; if (isset($_SESSION['id'])) { $link = "http://" . homeLink() . "/SafeFront/index.php?action=logout"; $imageSRC = "./img/LogOut.png"; $height = 70; $widht = 70; echo '<li class="active"><a href="">' . $_SESSION['name'] . '</a></li>'; echo '<img style="" width="40" height="40" src="' . $_SESSION['picture'] . '">'; echo '<a href="' . $link . '"> <button class="btn btn-danger" style="vertical-align: top" type="button">Logout</button></a>'; } else { echo '<a href="' . $link . '"><img style="vertical-align: text-top;" width="' . $widht . '" height="' . $height . '"src="' . $imageSRC . '"></a>'; } ?> </ul> </div><!--/.nav-collapse --> </div> </div> </div>
} } $json = getProfiles(); $profiles = json_decode($json); foreach ($profiles as $profile) { if ($profile->profileID == $profileID) { echo '<p>Depois</p>'; if ($action != 'editDisease') { unset($profile->diseases[$diseaseID]); $profile->diseases = array_values($profile->diseases); } else { $profile->diseases[$diseaseID] = $_POST['desc']; } $profile->token = $_SESSION['token']; echo $insert = editProfile($profile); break; } } if (empty($insert)) { if ($action == 'deleteDisease') { header("Location: http://" . homeLink() . "/SafeFront/index.php?action=profileDiseases&profileID=" . $profileID . "&method=Disease%20deleted%20sucessfully"); } else { header("Location: http://" . homeLink() . "/SafeFront/index.php?action=profileDiseases&profileID=" . $profileID . "&method=Disease%20edited%20sucessfully"); } } else { echo $insert; } ?> </body> </html>
<?php include_once './funcs.php'; if (!isset($_SESSION['id'])) { session_start(); } checkIfLogged(); if (isset($_POST['sub'])) { if (!is_null($_POST['message']) and !is_null($_POST['name'])) { $result = sendMail("From: " . $_POST['name'] . " Message: " . $_POST['message']); header("Location: http://" . homeLink() . "/SafeFront/index.php?method=Your%20message%20was%20sent"); /* Redirect browser */ } } else { echo '<h1>You have done it again, you silly!</h1>'; exit; }