コード例 #1
0
ファイル: plan.configure.php プロジェクト: GaelGRIFFON/core
<?php

if (!isConnect('admin')) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
$plan = plan::byLinkTypeLinkIdPlanHedaerId(init('link_type'), init('link_id'), init('planHeader_id'));
if (!is_object($plan)) {
    throw new Exception('Impossible de trouver le design');
}
$link = $plan->getLink();
sendVarToJS('id', $plan->getId());
?>
<div id="div_alertPlanConfigure"></div>
<a class='btn btn-success btn-xs pull-right cursor' style="color: white;" id='bt_saveConfigurePlan'><i class="fa fa-check"></i> Sauvegarder</a>
<a class='btn btn-danger  btn-xs pull-right cursor' style="color: white;" id='bt_removeConfigurePlan'><i class="fa fa-times"></i> Supprimer</a>
<form class="form-horizontal">
    <fieldset id="fd_planConfigure">
        <legend>Général</legend>
        <input type="text"  class="planAttr form-control" data-l1key="id" style="display: none;"/>
        <input type="text"  class="planAttr form-control" data-l1key="link_type" style="display: none;"/>
        <?php 
if ($plan->getLink_type() == 'eqLogic' || $plan->getLink_type() == 'scenario') {
    ?>
           <div class="form-group">
            <label class="col-lg-4 control-label">{{Taille du widget}}</label>
            <div class="col-lg-2">
                <?php 
    if ($plan->getLink_type() == 'eqLogic') {
        echo '<input type="text" class="planAttr form-control" data-l1key="css" data-l2key="zoom" value="0.65"/>';
    }
    if ($plan->getLink_type() == 'scenario') {
コード例 #2
0
ファイル: plan.ajax.php プロジェクト: GaelGRIFFON/core
     $plan = plan::byId(init('id'));
     if (is_object($plan)) {
         ajax::success(utils::o2a($plan));
     }
     $plan = plan::byLinkTypeLinkIdObjectId(init('link_type'), init('link_id'), init('object_id'));
     if (is_object($plan)) {
         ajax::success(utils::o2a($plan));
     }
     throw new Exception(__('Aucun plan correspondant'));
 }
 if (init('action') == 'remove') {
     $plan = plan::byId(init('id'));
     if (is_object($plan)) {
         ajax::success($plan->remove());
     }
     $plan = plan::byLinkTypeLinkIdPlanHedaerId(init('link_type'), init('link_id'), init('object_id'));
     if (is_object($plan)) {
         ajax::success($plan->remove());
     }
     throw new Exception(__('Aucun plan correspondant'));
 }
 if (init('action') == 'removePlanHeader') {
     if (!isConnect('admin')) {
         throw new Exception(__('401 - Accès non autorisé', __FILE__));
     }
     $planHeader = planHeader::byId(init('id'));
     if (!is_object($planHeader)) {
         throw new Exception(__('Objet inconnu verifié l\'id', __FILE__));
     }
     $planHeader->remove();
     ajax::success();