Your IP : 216.73.216.65


Current Path : /home/ataenra/www/ATA/INTRANET/Admin/Gestion_ACC/PV/
Upload File :
Current File : /home/ataenra/www/ATA/INTRANET/Admin/Gestion_ACC/PV/NewPointProdac.php

<style>
        * {
            margin: 0;
            padding: 0;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
        }

        .card {
            background: white;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }

        .header {
            background: #2563eb;
            color: white;
            padding: 1rem;
        }

        .header h1 {
            font-size: 1.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .error-message {
            margin-top: 0.5rem;
            background: #1d4ed8;
            padding: 0.5rem;
            border-radius: 0.25rem;
            font-size: 0.875rem;
        }

        .content {
            padding: 1rem;
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 1rem;
        }

        #map {
            height: 500px;
            border-radius: 0.5rem;
            overflow: hidden;
        }

        .coordinates {
            background: #f8fafc;
            padding: 1rem;
            border-radius: 0.5rem;
        }

        .coordinates h2 {
            font-size: 1.25rem;
            margin-bottom: 1rem;
            color: #1e293b;
        }

        .coordinate-box {
            background: white;
            padding: 0.75rem;
            border-radius: 0.375rem;
            margin-bottom: 0.5rem;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .coordinate-box p:first-child {
            color: #64748b;
            font-size: 0.875rem;
            margin-bottom: 0.25rem;
        }

        .coordinate-box p:last-child {
            font-family: monospace;
            font-size: 1.125rem;
        }

        @media (max-width: 1000px) {
            .content {
                grid-template-columns: 1fr;
            }
        }
    </style>

 <?php 
 
 $IDsite=$_GET['IDsite'];
 $IDpmo=$_GET['IDpmo'];

  //RECUP DES INFORMATIONS SUR TABLE ACC PMO
    //Tableau de tous les projets en cours
    $list1 = $dbco->prepare("SELECT * FROM gest_acc_sites S JOIN gest_acc_pmo P ON S.ID_pmo=P.ID_pmo WHERE S.ID_pmo='$IDpmo' AND S.ID_acc_site ='$IDsite'"); 
    $list1->execute();
    $R1 = $list1->fetch(PDO::FETCH_OBJ);

    ?>
        
    


<form method="post" autocomplete="off">
    <div class="container1">
    <h5 class="btn-lg btn-success">NOUVEAU SITE DE PRODUCTION</h5>
        <div class="row">

            <div class="col-md-6">
                
                <div id="map"></div>    

                <!--<?php //require 'PV/MAPS.php'; ?>-->

                <input type="hidden" name="ID_site" value="<?php echo $_GET['IDsite'];?>" />
                <input type="hidden" name="ID_pmo" id='idpmo' value="<?php echo $IDpmo; ?>"/>
                
            </div>  

            <div class="col-md-3">
            <h6 class="btn-lg btn-success">PRODUCTION</h6>
                                          
                <p> Puissance Centrale : <input class="form-control" type="Text" id='power' name="pcentrale" required/>
                <p> Orientation : <input class="form-control" type="Text" id='orientation' name="orientation" required/>
                <p> Inclinaison : <input class="form-control" type="Text" id='inclinaison' name="inclinaison" required/><br><br>
                
                
            </div>

            <div class="col-md-3">
            <h6 class="btn-lg btn-info">SITE</h6>
            <p>Financement de la centrale :

<select name="f_type" id="f_type" onchange="updateList(this.value)" class="form-control" required>
<option>--Selectionner --</option disabled>
<option value="CPT">Comptant</option>
<option value="FC">Financement</option>
<option value="FATA">Leasing ATA</option>
<option value="FTI">Tiers investisseur</option>
</select></p>

<p id="taux">Taux en % :</p>
<p id="f_taux_ata">Taux en % : 6</p>
<select name="f_taux" id="f_taux" class="form-control">
<option value="0">-- Selectionner --</option disabled>
<option>2.0</option><option>2.1</option><option>2.2</option><option>2.3</option><option>2.4</option><option>2.5</option><option>2.6</option><option>2.7</option><option>2.8</option><option>2.9</option>
<option>3.0</option><option>3.1</option><option>3.2</option><option>3.3</option><option>3.4</option><option>3.5</option><option>3.6</option><option>3.7</option><option>3.8</option><option>3.9</option>
<option>4.0</option><option>4.1</option><option>4.2</option><option>4.3</option><option>4.4</option><option>4.5</option><option>4.6</option><option>4.7</option><option>4.8</option><option>4.9</option>
<option>5.0</option><option>5.1</option><option>5.2</option><option>5.3</option><option>5.4</option><option>5.5</option><option>5.6</option><option>5.7</option><option>5.8</option><option>5.9</option>
<option>6.0</option><option>6.1</option><option>6.2</option><option>6.3</option><option>6.4</option><option>6.5</option><option>6.6</option><option>6.7</option><option>6.8</option><option>6.9</option>
</select>

<input class="form-control"  type="hidden" id='f_taux_ata' name="f_taux1" value="6"/></p>

<p id="duree">Durée en mois :</p>
<p id="f_duree_ata">Durée en mois : 120</p>

<select name="f_duree" id="f_duree" class="form-control">
<option value="0">-- Selectionner --</option disabled>
<option>12</option><option>24</option><option>36</option><option>48</option><option>60</option><option>72</option>
<option>84</option><option>96</option><option>108</option><option>120</option><option>132</option><option>144</option>
</select>

<input class="form-control"  type="hidden" id='f_duree_ata' name="f_duree1" value="120"/></p>

<p id="f_invest1">Tarif de rachat (euros/kwh) :</p>
<select name="f_invest" id="f_invest" class="form-control">
<option>0.15</option>
<option>0.10</option><option>0.11</option><option>0.12</option><option>0.13</option><option>0.14</option><option>0.15</option>
<option>0.16</option><option>0.17</option><option>0.18</option><option>0.19</option><option>0.20</option>
</select>

<br>
                <input class="btn btn-success btn-lg btn-block" type="Submit" name="NSPEAC" value="Enregistrer" /><br>

            
            </div>

        </div> 
    </div>      
</form>


<script>
    var lat = <?php echo $R1->latitude;?>;
    var lng = <?php echo $R1->longitude;?>;
    const DEFAULT_LOCATION = { lat , lng  };
        let map, marker, latitude, longitude;

        function initMap() {
            
            // Fonction pour initialiser la carte avec une position
            function createMap(position) {
                map = new google.maps.Map(document.getElementById('map'), {
                    center: position,
                    zoom: 17,
                    styles: [{
                        featureType: "poi",
                        elementType: "labels",
                        stylers: [{ visibility: "off" }]
                    }]
                });

                // Créer le marqueur
                marker = new google.maps.Marker({
                    position: position,
                    map: map,
                    animation: google.maps.Animation.DROP
                });

            }

            createMap(DEFAULT_LOCATION);
        }
        window.initMap = initMap;
</script>

  
    <script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBJK0GVBASHQUIFbE3NudYEWFtodD9bM_s&callback=initMap"></script>

    <script>

document.getElementById("taux").style.display = "none";
document.getElementById("duree").style.display = "none";
document.getElementById("f_taux").style.display = "none";
document.getElementById("f_duree").style.display = "none";
document.getElementById("f_taux_ata").style.display = "none";
document.getElementById("f_duree_ata").style.display = "none";
document.getElementById("f_invest").style.display = "none";
document.getElementById("f_invest1").style.display = "none";
function updateList(A) {

if (A === "CPT") {
document.getElementById("taux").style.display = "none";
document.getElementById("duree").style.display = "none";
document.getElementById("f_taux").style.display = "none";
document.getElementById("f_duree").style.display = "none";
document.getElementById("f_taux_ata").style.display = "none";
document.getElementById("f_duree_ata").style.display = "none";
document.getElementById("f_invest").style.display = "none";
document.getElementById("f_invest1").style.display = "none";

} else if (A === "FC") {
document.getElementById("taux").style.display = "block";
document.getElementById("duree").style.display = "block";
document.getElementById("f_taux").style.display = "block";
document.getElementById("f_duree").style.display = "block";
document.getElementById("f_taux_ata").style.display = "none";
document.getElementById("f_duree_ata").style.display = "none";
document.getElementById("f_invest").style.display = "none";
document.getElementById("f_invest1").style.display = "none";

} else if (A === "FATA") {
document.getElementById("taux").style.display = "none";
document.getElementById("duree").style.display = "none";
document.getElementById("f_taux").style.display = "none";
document.getElementById("f_duree").style.display = "none";
document.getElementById("f_taux_ata").style.display = "block";
document.getElementById("f_duree_ata").style.display = "block";
document.getElementById("f_invest").style.display = "none";
document.getElementById("f_invest1").style.display = "none";
} 

if (A === "FTI") {
document.getElementById("taux").style.display = "none";
document.getElementById("duree").style.display = "none";
document.getElementById("f_taux").style.display = "none";
document.getElementById("f_duree").style.display = "none";
document.getElementById("f_taux_ata").style.display = "none";
document.getElementById("f_duree_ata").style.display = "none";
document.getElementById("f_invest").style.display = "block";
document.getElementById("f_invest1").style.display = "block";
} 

}

</script>