예제 #1
0
<?php

require_once dirname(__FILE__) . '/../../../../../core/php/core.inc.php';
include_file('core', 'authentification', 'php');
if (!isConnect()) {
    throw new Exception('401 Unauthorized');
}
?>

<div class="form-group cmd" data-mode="?" data-type="i">
    <input type="text" class="cmdAttr form-control" data-l1key="id" value="" style="display: none;"/>
    <input type="text" class="cmdAttr form-control" data-l1key="type" value="info" style="display: none;"/>
    <input type="text" class="cmdAttr form-control" data-l1key="subType" value="numeric" style="display: none;"/>
    <input type="text" class="cmdAttr form-control" data-l1key="eventOnly" value="1" style="display: none;"/>
    <input type="text" class="cmdAttr form-control" data-l1key="configuration" data-l2key="mode" value="?" style="display: none;"/>
    <input type="text" class="cmdAttr form-control" data-l1key="configuration" data-l2key="type" value="i" style="display: none;"/>
    <label class="col-lg-1 control-label" >Nom</label>
    <div class="col-lg-1">
        <input type="text" class="cmdAttr form-control" data-l1key="name" value="Impulsion"/>
    </div>
    <label class="col-lg-1 control-label" >Historiser</label>
    <div class="col-lg-1">
        <input class="cmdAttr form-control" data-l1key="isHistorized" type="checkbox" />
    </div>
    <label class="col-lg-1 control-label" >Calcul</label>
    <div class="col-lg-1">
        <input type="text" class="cmdAttr form-control" data-l1key="configuration" data-l2key="calcul" value="#V#" />
    </div>
    <label class="col-lg-1 control-label" >Unité</label>
    <div class="col-lg-1">
        <input type="text" class="cmdAttr form-control" data-l1key="unite" value="" />
예제 #2
0
 * 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.
 *
 * Jeedom 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 Jeedom. If not, see <http://www.gnu.org/licenses/>.
 */
try {
    require_once dirname(__FILE__) . '/../../core/php/core.inc.php';
    include_file('core', 'authentification', 'php');
    if (!isConnect('admin')) {
        throw new Exception(__('401 - Accès non autorisé', __FILE__), -1234);
    }
    if (init('action') == 'remove') {
        $connection = connection::byId(init('id'));
        if (!is_object($connection)) {
            throw new Exception(__('Connexion inconnue. Vérifiez l\'id', __FILE__));
        }
        $connection->remove();
        ajax::success();
    }
    if (init('action') == 'ban') {
        $connection = connection::byId(init('id'));
        if (!is_object($connection)) {
            throw new Exception(__('Connexion inconnue. Vérifiez l\'id', __FILE__));
        }
            } else {
                if (isset($_GET['to']) && $_GET['to'] == 'signaler' && isConnect() && isset($_GET['activite'])) {
                    if (isset($_POST['modifier'])) {
                        formModifierActivite();
                    } else {
                        modifierActivite();
                        reponseSignalement();
                        gererSignalement();
                    }
                } else {
                    $idActivite = proposerActivite($cat);
                    gererReponse($cat, $idActivite);
                    if (isset($_GET['to']) && $_GET['to'] == 'modif' && isConnect() && isset($_GET['activite'])) {
                        modifActivite();
                    } else {
                        if (isset($_GET['to']) && !isConnect() || isset($_GET['to']) && ($_GET['to'] != 'modif' || $_GET['to'] != 'signaler') && isConnect()) {
                            header('Location: ../');
                        }
                    }
                }
            }
        }
    } else {
        echo "<div class='alert alert-danger' role='alert'>Votre catégorie est fausse, cliquez sur un des boutons proposés !</div>";
        echo "<meta http-equiv='refresh' content='1; URL=choisirCategorie.page.php'>";
    }
} else {
    echo "<div class='alert alert-danger' role='alert'>Vous n'avez pas de catégorie !</div>";
    echo "<meta http-equiv='refresh' content='1; URL=choisirCategorie.page.php'>";
}
?>
예제 #4
0
파일: menu.php 프로젝트: AymericDu/PicOne
/*
Thibault Arloing
Aymeric Ducroquetz
*/
require_once "lib/auth.php";
require_once "lib/biblio.php";
?>

<section id="menu">
	<?php 
if (isConnect()) {
    echo "<p>Connecté : " . $_SESSION["ident"]->prenom . " " . $_SESSION["ident"]->nom . " (" . $_SESSION["ident"]->login . ")</p>";
}
?>
	
	<h2><span class="green">P</span>age(s)</h2>
	
	<p><a href="home.php">Accueil</a></p>
	<?php 
if (isConnect()) {
    echo "<p><a href=\"mylibrary.php?collection=" . $_SESSION["ident"]->login . "\">Ma Photothèque</a></p>";
}
?>
	
	<?php 
if (!isset($register) && !isset($account)) {
    require "lib/search.php";
}
?>
</section>
예제 #5
0
파일: plan.php 프로젝트: saez0pub/core
if (init('noControl') == '') {
    ?>
<div id="div_planHeader">
    <select class="form-control input-sm" style="width: 200px;display: inline-block" id="sel_planHeader">
        <?php 
    foreach ($planHeaders as $planHeader_select) {
        if ($planHeader_select->getId() == $planHeader->getId()) {
            echo '<option selected value="' . $planHeader_select->getId() . '">' . $planHeader_select->getName() . '</option>';
        } else {
            echo '<option value="' . $planHeader_select->getId() . '">' . $planHeader_select->getName() . '</option>';
        }
    }
    ?>
  </select>
  <?php 
    if (isConnect('admin')) {
        ?>
   <a class="btn btn-success btn-sm" style="margin-bottom: 3px;" id="bt_addPlanHeader" title="{{Ajouter un design}}"><i class="fa fa-plus-circle"></i></a>
   <a class="btn btn-danger btn-sm tooltips" style="margin-bottom: 3px;" id='bt_removePlanHeader' title="{{Supprimer le design}}"><i class="fa fa-trash"></i></a>
   <a class="btn btn-default btn-sm editMode tooltips" style="margin-bottom: 3px;display: none;" id="bt_configurePlanHeader" title="{{Editer/configurer le design}}"><i class="fa fa-cogs"></i></a>
   <?php 
        if (is_object($planHeader)) {
            ?>
   <a class="btn btn-default btn-sm editMode tooltips" style="margin-bottom: 3px;display: none;" id='bt_duplicatePlanHeader' title="{{Dupliquer le design}}"><i class="fa fa-files-o"></i></a>

   <?php 
        }
        ?>
   <a class="btn btn-default pull-right btn-sm" style="margin-bottom: 3px;" id="bt_switchFullScreen"><i class="fa fa-pencil"></i> {{Plein écran}}</a>
   <a class="btn btn-warning pull-right btn-sm" style="margin-bottom: 3px;" id="bt_editPlan" data-mode="0"><i class="fa fa-pencil"></i> {{Mode édition}}</a>
   <?php 
<?php

/**
 * Created by PhpStorm.
 * User: Flavian Ovyn
 * Date: 1/10/2015
 * Time: 14:34
 */
require "../Library/constante.lib.php";
require "../Library/Fonctions/Fonctions.php";
initRequire();
initRequirePage("connexion");
initRequireEntityManager();
startSession();
$isConnect = isConnect();
$tabRetour = array();
if ($isConnect) {
    session_destroy();
    header("Location:../");
}
if (isPostFormulaire()) {
    $tabRetour = doConnect();
    if ($tabRetour['Retour'] && $tabRetour['Valide'] && $tabRetour['Banni']) {
        header("Location:../");
    }
}
$configIni = getConfigFile();
?>

<!doctype html>
<html lang="fr">
예제 #7
0
 public function hasRight($_right, $_needAdmin = false, $_user = null)
 {
     if (!is_object($_user)) {
         $_user = $_SESSION['user'];
     }
     if (!is_object($_user)) {
         return false;
     }
     if (!isConnect()) {
         return false;
     }
     if (isConnect('admin')) {
         return true;
     }
     if ($_right == 'x') {
         $rights = rights::byuserIdAndEntity($_user->getId(), 'scenario' . $this->getId() . 'action');
     } elseif ($_right == 'w') {
         $rights = rights::byuserIdAndEntity($_user->getId(), 'scenario' . $this->getId() . 'edit');
     } elseif ($_right == 'r') {
         $rights = rights::byuserIdAndEntity($_user->getId(), 'scenario' . $this->getId() . 'view');
     }
     if (!is_object($rights)) {
         return $_needAdmin ? false : true;
     }
     return $rights->getRight();
 }
/**
 * Fonction permettant de savoir si le membre est un chef de groupe ou non.
 * @return bool : true si il est chef de groupe, false si il ne l'est pas.
 */
function isLeader()
{
    if (isConnect()) {
        $gm = new GroupeManager(connexionDb());
        $isLeader = $gm->getGroupeByLeader($_SESSION['User']);
        if ($isLeader->getDescription() != NULL) {
            return true;
        } else {
            return false;
        }
    }
}
예제 #9
0
function hasRight($_right, $_needAdmin = false)
{
    if (!isConnect()) {
        return false;
    }
    if (isConnect('admin')) {
        return true;
    }
    $rights = rights::byuserIdAndEntity($_SESSION['user']->getId(), $_right);
    if (!is_object($rights)) {
        return $_needAdmin ? false : true;
    }
    return $rights->getRight();
}
예제 #10
0
 public function hasRight($_right, $_needAdmin = false, $_user = null)
 {
     if (!is_object($_user)) {
         if (session_status() != PHP_SESSION_NONE || !isset($_SESSION) || !isset($_SESSION['user'])) {
             return true;
         }
         $_user = $_SESSION['user'];
     }
     if (!is_object($_user)) {
         return false;
     }
     if (!isConnect()) {
         return false;
     }
     if (isConnect('admin')) {
         return true;
     }
     $rights = null;
     if ($_right == 'x') {
         $rights = rights::byuserIdAndEntity($_user->getId(), 'eqLogic' . $this->getId() . 'action');
     } elseif ($_right == 'r') {
         $rights = rights::byuserIdAndEntity($_user->getId(), 'eqLogic' . $this->getId() . 'view');
     }
     if (!is_object($rights)) {
         return $_needAdmin ? false : true;
     }
     return $rights->getRight();
 }
/**
 * Fonction permettant de récupérer la variable session lié à un utilisateur
 * @return string
 */
function getSessionUser()
{
    return isConnect() ? $_SESSION['User'] : new User(array());
}
예제 #12
0
파일: biblio.php 프로젝트: AymericDu/PicOne
function unsubscribe()
{
    if (!isConnect()) {
        return;
    }
    global $connexion;
    $login = $_SESSION["ident"]->login;
    $delete = $connexion->prepare('delete
			from picone.collections
			where login=:login');
    $delete->bindValue(":login", $login);
    if (!$delete->execute()) {
        echo "<h2>Une erreur s'est produite. Veuillez recommencer !</h2>";
        return;
    }
    $delete = $connexion->prepare('delete
			from picone.identity
			where login=:login');
    $delete->bindValue(":login", $login);
    if (!$delete->execute()) {
        echo "<h2>Une erreur s'est produite. Veuillez recommencer !</h2>";
        return;
    }
    require "logout.php";
}
 * Created by PhpStorm.
 * User: JulienTour
 * Date: 22/11/2015
 * Time: 19:29
 */
require "../Library/constante.lib.php";
require "../Library/Fonctions/Fonctions.php";
initRequire();
initRequireEntityManager();
require "../Library/Page/devenirPremium.lib.php";
require "../Manager/User_DroitManager.manager.php";
$configIni = getConfigFile();
startSession();
connexionDb();
$isConnect = isConnect();
if (!isConnect() or $_SESSION['User']->getDroit()[0]->getLibelle() == 'Premium' or $_SESSION['User']->getDroit()[0]->getLibelle() == 'Administrateur' or $_SESSION['User']->getDroit()[0]->getLibelle() == 'Moderateur') {
    header("Location:../");
}
?>

<!doctype html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <title>Devenir membre Premium</title>
    <link rel="icon" type="image/png" href="../Images/favicon.png" />
    <link rel="stylesheet" type="text/css" href="../vendor/twitter/bootstrap/dist/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../Style/general.css">

    <script src="https://code.jquery.com/jquery-2.1.4.min.js" defer></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" defer></script>