当前位置: 首页>>代码示例>>PHP>>正文


PHP isConnect函数代码示例

本文整理汇总了PHP中isConnect函数的典型用法代码示例。如果您正苦于以下问题:PHP isConnect函数的具体用法?PHP isConnect怎么用?PHP isConnect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了isConnect函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dirname

<?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="" />
开发者ID:Wators,项目名称:jeedom_plugins,代码行数:31,代码来源:digital.impulsion.php

示例2: dirname

 * 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__));
        }
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:connection.ajax.php

示例3: formModifierActivite

            } 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'>";
}
?>
开发者ID:OvynFlavian,项目名称:IntegrationTP_Groupe_1,代码行数:31,代码来源:proposerActivite.page.php

示例4:

/*
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>
开发者ID:AymericDu,项目名称:PicOne,代码行数:30,代码来源:menu.php

示例5: foreach

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 
开发者ID:saez0pub,项目名称:core,代码行数:31,代码来源:plan.php

示例6: initRequire

<?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">
开发者ID:OvynFlavian,项目名称:IntegrationTP_Groupe_1,代码行数:31,代码来源:connexion.page.php

示例7: hasRight

 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();
 }
开发者ID:GaelGRIFFON,项目名称:core,代码行数:26,代码来源:scenario.class.php

示例8: isLeader

/**
 * 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;
        }
    }
}
开发者ID:OvynFlavian,项目名称:IntegrationTP_Groupe_1,代码行数:16,代码来源:amis.lib.php

示例9: hasRight

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();
}
开发者ID:saez0pub,项目名称:core,代码行数:14,代码来源:authentification.php

示例10: hasRight

 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();
 }
开发者ID:saez0pub,项目名称:core,代码行数:28,代码来源:eqLogic.class.php

示例11: getSessionUser

/**
 * Fonction permettant de récupérer la variable session lié à un utilisateur
 * @return string
 */
function getSessionUser()
{
    return isConnect() ? $_SESSION['User'] : new User(array());
}
开发者ID:OvynFlavian,项目名称:IntegrationTP_Groupe_1,代码行数:8,代码来源:session.lib.php

示例12: unsubscribe

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";
}
开发者ID:AymericDu,项目名称:PicOne,代码行数:25,代码来源:biblio.php

示例13: initRequire

 * 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>
开发者ID:OvynFlavian,项目名称:IntegrationTP_Groupe_1,代码行数:31,代码来源:devenirPremium.page.php


注:本文中的isConnect函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。