Permalink
Browse files

Logout fixed, authentication now needed to access back office pages

  • Loading branch information...
1 parent f28f962 commit 75d08dce9142067b5878b4ffebe75bd48ae57e5c Ludovic Landry committed Jul 17, 2011
@@ -17,26 +17,32 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
- use Entities\Application,
- Entities\Developer,
- Entities\Device,
- Entities\Invitation,
- Entities\Tester,
- Entities\Version;
-
- require_once __DIR__ . '/../constants.php';
- require_once __DIR__ . '/../core/index.php';
- require_once __DIR__ . '/../tools.php';
-
- $entityManager = initDoctrine();
-
- // Retrieve all testers
- $applications = $entityManager->getRepository('Entities\Application')->findAll();
-
-?>
-<!doctype html>
+session_start();
+
+use Entities\Application,
+ Entities\Developer,
+ Entities\Device,
+ Entities\Invitation,
+ Entities\Tester,
+ Entities\Version;
+
+require_once __DIR__ . '/../constants.php';
+require_once __DIR__ . '/../core/index.php';
+require_once __DIR__ . '/../core/Membership.php';
+require_once __DIR__ . '/../tools.php';
+
+if (!Membership::isLoggedIn()) {
+ header('Location: ../index.php');
+ die();
+}
+
+$entityManager = initDoctrine();
+
+// Retrieve all testers
+$applications = $entityManager->getRepository('Entities\Application')->findAll();
+
+?><!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -18,6 +18,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+session_start();
+
+require_once __DIR__ . '/../core/Membership.php';
+
+if (!Membership::isLoggedIn()) {
+ header('Location: ../index.php');
+ die();
+}
+
?><!doctype html>
<html>
<head>
@@ -17,37 +17,41 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
- use Entities\Application;
- use Entities\Version;
-
- require_once __DIR__ . '/../lib/cfpropertylist/CFPropertyList.php';
- require_once __DIR__ . '/../tools.php';
- require_once __DIR__ . '/../core/index.php';
- require_once __DIR__ . '/../constants.php';
- require_once __DIR__ . '/../lib/PngCompote/PngCompote.php';
-
- function unzipApplication($upload_path, $filename) {
+session_start();
- $zip = new ZipArchive;
- $res = $zip->open($upload_path . $filename);
- if ($res === TRUE) {
+use Entities\Application;
+use Entities\Version;
- $appName = substr($filename, 0, -4);
- $zip->extractTo($upload_path . $appName . '/');
- $zip->close();
+require_once __DIR__ . '/../lib/cfpropertylist/CFPropertyList.php';
+require_once __DIR__ . '/../tools.php';
+require_once __DIR__ . '/../core/index.php';
+require_once __DIR__ . '/../core/Membership.php';
+require_once __DIR__ . '/../constants.php';
+require_once __DIR__ . '/../lib/PngCompote/PngCompote.php';
- return true;
+if (!Membership::isLoggedIn()) {
+ header('Location: ../index.php');
+ die();
+}
- } else {
- return false;
- }
- }
+function unzipApplication($upload_path, $filename) {
-?>
+ $zip = new ZipArchive;
+ $res = $zip->open($upload_path . $filename);
+ if ($res === TRUE) {
+
+ $appName = substr($filename, 0, -4);
+ $zip->extractTo($upload_path . $appName . '/');
+ $zip->close();
+
+ return true;
+ } else {
+ return false;
+ }
+}
-<!doctype html>
+?><!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -1,11 +1,19 @@
<?php
+session_start();
+
use Entities\Developer;
require_once __DIR__ . '/../core/index.php';
require_once __DIR__ . '/../core/functions.php';
+require_once __DIR__ . '/../core/Membership.php';
require_once __DIR__ . '/../tools.php';
+if (!Membership::isLoggedIn()) {
+ header('Location: ../index.php');
+ die();
+}
+
if (!isset($_POST['name'], $_POST['email'], $_POST['pwd']) ) {
die('parameters needed.');
}
@@ -0,0 +1,75 @@
+<?php
+
+/*
+ * RunThisApp allows sharing test builds of iOS apps with testers.
+ * Copyright (C) 2011 Ludovic Landry & Pascal Cans
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+session_start();
+
+require_once __DIR__ . '/../core/Membership.php';
+
+if (!Membership::isLoggedIn()) {
+ header('Location: ../index.php');
+ die();
+}
+
+?><!doctype html>
+<html lang="en-us">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Run This App | Developer Profile</title>
+ <link href="../css/style-0001.css" media="screen" type="text/css" rel="stylesheet">
+</head>
+<body>
+
+ <?php include __DIR__ . '/../header.php'; ?>
+
+ <div id="content" class="box">
+ <div class="boxtop"></div>
+ <div class="column first">
+ <div class="boxheader">
+ <h2>Developer Profile</h2>
+ </div>
+ <div>
+ <p>//TODO:</p>
+ </div>
+ </div>
+
+ <div class="column last">
+ <div class="boxheader">
+ <h2>Deployment steps</h2>
+ </div>
+ <div class="function">
+ <h6>Send Invitations</h6>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+ </div>
+ <hr>
+ <div class="function">
+ <h6>Tester get registered</h6>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+ </div>
+ <hr>
+ <div class="function">
+ <h6>They install your app Over-The-Air</h6>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
+ </div>
+ </div>
+ <div class="boxbottom"></div>
+ </div>
+
+</body>
+</html>
@@ -18,7 +18,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+session_start();
+
require_once __DIR__ . '/../constants.php';
+require_once __DIR__ . '/../core/Membership.php';
+
+if (!Membership::isLoggedIn()) {
+ header('Location: ../index.php');
+ die();
+}
?><!doctype html>
<html>
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+session_start();
+
use Entities\Application,
Entities\Developer,
Entities\Device,
@@ -27,11 +29,16 @@
require_once __DIR__ . '/../core/index.php';
require_once __DIR__ . '/../core/functions.php';
+require_once __DIR__ . '/../core/Membership.php';
+
+if (!Membership::isLoggedIn()) {
+ header('Location: ../index.php');
+ die();
+}
$entityManager = initDoctrine();
-?>
-<!doctype html>
+?><!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+session_start();
+
use Entities\Application,
Entities\Developer,
Entities\Device,
@@ -26,14 +28,20 @@
Entities\Version;
require_once __DIR__ . '/../credentials.php';
+require_once __DIR__ . '/../constants.php';
require_once __DIR__ . '/../core/index.php';
-require_once __DIR__ . '/../mail.php';
+require_once __DIR__ . '/../core/Membership.php';
require_once __DIR__ . '/../core/functions.php';
+require_once __DIR__ . '/../mail.php';
require_once __DIR__ . '/../tools.php';
require_once __DIR__ . '/../lib/Swift/lib/swift_required.php';
+if (!Membership::isLoggedIn()) {
+ header('Location: ../index.php');
+ die();
+}
+
$entityManager = initDoctrine();
-date_default_timezone_set('Europe/Paris');
//send the invits
$nbInvitations = 0;
@@ -120,8 +128,7 @@ function sendInvitationForDevice($device, $mailer, $url, $version, $msg, $entity
$entityManager->flush();
-?>
-<!doctype html>
+?><!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -18,17 +18,26 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+session_start();
+
use Entities\Application,
Entities\Developer,
Entities\Device,
Entities\Invitation,
Entities\Tester,
Entities\Version;
+
require_once __DIR__ . '/../core/index.php';
require_once __DIR__ . '/../core/functions.php';
+require_once __DIR__ . '/../core/Membership.php';
require_once __DIR__ . '/../tools.php';
+if (!Membership::isLoggedIn()) {
+ header('Location: ../index.php');
+ die();
+}
+
if (!isset($_POST['name'], $_POST['email']) ) {
die('parameters needed.');
}
View
@@ -18,6 +18,26 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+session_start();
+
+use Entities\Application,
+ Entities\Developer,
+ Entities\Device,
+ Entities\Invitation,
+ Entities\Tester,
+ Entities\Version;
+
+require_once __DIR__ . '/../core/index.php';
+require_once __DIR__ . '/../core/functions.php';
+require_once __DIR__ . '/../core/Membership.php';
+
+if (!Membership::isLoggedIn()) {
+ header('Location: ../index.php');
+ die();
+}
+
+$entityManager = initDoctrine();
+
?><!doctype html>
<html>
<head>
@@ -28,8 +48,7 @@
<body>
<?php include __DIR__ . '/../header.php';?>
-
-
+
<div id="content" class="box">
<div class="boxtop"></div>
<div class="column first">
@@ -43,18 +62,6 @@
<?php
- use Entities\Application,
- Entities\Developer,
- Entities\Device,
- Entities\Invitation,
- Entities\Tester,
- Entities\Version;
-
- require_once __DIR__ . '/../core/index.php';
- require_once __DIR__ . '/../core/functions.php';
-
- $entityManager = initDoctrine();
-
// Retrieve all testers
$testers = $entityManager->getRepository('Entities\Tester')->findAll();
Oops, something went wrong.

0 comments on commit 75d08dc

Please sign in to comment.