Beispiel #1
0
    
    <div id="lang"><?php 
make_lang_link();
?>
</div>
  </div>
  
  <div id="connect"><?php 
if (empty($_GET['f'])) {
    make_connect_link();
}
?>
</div>
  
  <?php 
if (!is_user_connected() || !empty($_GET['f'])) {
    ?>
  
  <a id="logo" href="index.php">ShareMe</a>
      
  <p class="slogan"><?php 
    echo e('Drag, drop, share.');
    ?>
</p>
          
  <?php 
} else {
    include_once 'core/auto_dropzone.php';
}
?>
</header>
Beispiel #2
0
</head>

<body id="main_body" >

<!--	CONTROLLER VARS	-->
<?php 
if ($_SERVER["REQUEST_METHOD"] != "POST") {
    //case tried to access file in a wrong way
    die('<script>window.location.assign("index.php")</script>');
}
$username_err = $password_err = "";
$username = $_POST["username"];
$password = $_POST["password"];
include_once 'logic/login-controller.php';
$is_logged_in = is_user_connected();
$connected_user_name = connected_user_name();
if (array_key_exists('section', $_GET)) {
    $section = $_GET["section"];
}
if (array_key_exists('section', $_POST)) {
    $section = $_POST["section"];
}
?>

<!--	JUMBOTRON	-->
<div class="jumbotron">
  <h1 class="text-center">Coupons <small>I wish I had lots of money</small></h1>
</div>

<!--	MAIN SECTION	-->
Beispiel #3
0
" />
        <p id="min"><?php 
        echo e('Min: 6 characters');
        ?>
</p>
      <?php 
    }
    ?>
      <?php 
    if (is_user_connected()) {
        newToken();
    }
    ?>
      <div>
        <?php 
    if ($f && !$n && !is_user_connected()) {
        echo '<input id="cookie" type="checkbox" value="cookie" name="cookie" /><label for="cookie">' . e('Stay connected', false) . '</label>';
    }
    ?>
        <input id="submit" type="submit" class="btn" value="Ok" />	
      </div>
    </form>
  </div>

<?php 
} else {
    echo '<p id="message">' . e('You do not have permission to access this page!', false) . '</p>';
}
if ($n || $p) {
    echo '<script type="text/javascript" src="' . THEME_PATH . 'js/doublecheckcolor.js"></script>';
}
    }
    if (!array_key_exists('phonenumber', $_POST) | $_POST['phonenumber'] === "") {
        $phonenumber_err = "*Mandatory field";
        $valid = false;
    }
    if (!array_key_exists('date_of_birth', $_POST) | $_POST['date_of_birth'] === "") {
        $date_of_birth_err = "*Mandatory field";
        $valid = false;
    }
    if (!array_key_exists('username', $_POST) | $_POST['username'] === "") {
        $username_err = "*Mandatory field";
        $valid = false;
    }
    if (!username_is_free($username)) {
        $username_err = $username_err . " *Username is in use";
        $valid = false;
    }
    if (!array_key_exists('password', $_POST) | $_POST['password'] === "") {
        $password_err = "*Mandatory field";
        $valid = false;
    }
    if (!array_key_exists('gender', $_POST) | $_POST['gender'] === "") {
        $gender_err = "*Mandatory field";
        $valid = false;
    }
    return $valid;
}
if ($validFields && !is_user_connected()) {
    signup_client($firstname, $lastname, $email, $phonenumber, $date_of_birth, $username, $password, $interests, $gender);
    session_login($username, $password);
}
<?php

/**
 * BoZoN GET/POST page:
 * handles the GET & POST data
 * @author: Bronco (bronco@warriordudimanche.net)
 **/
# avoid user control: only admin
if (!function_exists('newToken') || !is_user_connected()) {
    exit;
}
######################################################################
# $_GET DATA
######################################################################
# edit file (for editor page)
if (!empty($_GET['file']) & !empty($_GET['p']) && $_GET['p'] == 'editor' && is_allowed('markdown editor')) {
    $file = id2file($_GET['file']);
    if (!empty($file) && is_file($file)) {
        $editor_content = file_get_contents($file);
    } else {
        $editor_content = '';
        $file = '';
        if (!is_writable($file)) {
            $msg = '<div class="error">' . $file . ' ' . e('is not writable', false) . '</div>';
        }
    }
}
# regen ids base
if (isset($_GET['regen'])) {
    $ids = updateIDs($ids, $_GET['regen']);
    header('location:index.php?p=admin&token=' . TOKEN);
Beispiel #6
0
<?php

include_once '../model/session_manager.php';
$is_connected = array();
if (is_user_connected()) {
    $is_connected["connected"] = "yes";
} else {
    $is_connected["connected"] = "no";
}
$is_connected["status"] = "success";
echo json_encode($is_connected);
Beispiel #7
0
function is_allowed($action, $profile = null)
{
    global $RIGHTS;
    if (!is_user_connected()) {
        return false;
    }
    if (!isset($RIGHTS)) {
        return false;
    }
    if (!$profile && !empty($_SESSION['status'])) {
        $profile = $_SESSION['status'];
    } elseif (!$profile) {
        return false;
    }
    if ($profile == 'superadmin') {
        return true;
    }
    if (isset($RIGHTS[$profile][$action])) {
        return true;
    } else {
        return false;
    }
}
Beispiel #8
0
     break;
     # Check if password needed
 # Check if password needed
 case 'details':
     # Retrieve pins
     $array = Aastra_get_meetme_room_details_Asterisk($confno);
     # No PIN
     if ($array['adminpin'] == '' and $array['userpin'] == '') {
         # Straight to details
         require_once 'AastraIPPhoneExecute.class.php';
         $object = new AastraIPPhoneExecute();
         $object->addEntry($XML_SERVER . '&action=display&mode=admin&confno=' . $confno);
     } else {
         # Check if user connected
         $user = Aastra_get_userdevice_Asterisk($ext);
         $return = is_user_connected($confno, $user);
         # User connected
         if ($return['connected']) {
             # Straight to details
             require_once 'AastraIPPhoneExecute.class.php';
             $object = new AastraIPPhoneExecute();
             if ($return['admin']) {
                 $object->addEntry($XML_SERVER . '&action=display&mode=admin&confno=' . $confno);
             } else {
                 $object->addEntry($XML_SERVER . '&action=display&mode=user&confno=' . $confno);
             }
         } else {
             # Enter PIN
             require_once 'AastraIPPhoneInputScreen.class.php';
             $object = new AastraIPPhoneInputScreen();
             $object->setDestroyOnExit();
Beispiel #9
0
function make_connect_link($label_admin = '&nbsp;', $label_logout = '&nbsp;', $label_login = '******')
{
    if (is_user_connected()) {
        if (!empty($_SESSION['login']) && $label_admin == '&nbsp;') {
            $label_admin = $_SESSION['login'];
        }
        if (function_exists('returntoken')) {
            $token = returnToken();
        } else {
            $token = '';
        }
        echo '<a id="logout_button" class="btn" href="index.php?deconnexion" title="' . e('Logout', false) . '">' . $label_logout . '</a>';
        echo '<a id="admin_button" class="btn" href="index.php?p=admin&amp;token=' . $token . '" title="' . e('Admin', false) . '">' . $label_admin . '</a>';
    } else {
        echo '<a id="login_button" class="btn" href="index.php?p=login" title="' . e('Connection', false) . '">' . $label_login . '</a>';
    }
}