Beispiel #1
0
function getClosest($zona, $status, $mode)
{
    $area;
    /*
    echo "<h3>Asignacion de Area</h3><br><div>";
    if($mode == 1) echo "Zona: ".$zona;
    //else echo "Zona 1: ".$zona[0]." + Zona 2: ".$zona[1];
    echo " | Estatus: ".$status." | Mode: ".$mode."</div>";
    */
    $matrix = Type()[$status];
    //echo "<pre>";
    if ($mode == 1) {
        //print_r($matrix[$zona]);
        $indexes = $matrix[$zona];
        for ($i = 0; $i < count($indexes); $i++) {
            $area = $indexes[$i];
            //echo "<div>Selected: E".$area."</div>";
            $libres = libres($area);
            if (count($libres) > 0) {
                break;
            }
        }
    }
    $x = Points()[$area][$zona]['x'];
    $y = Points()[$area][$zona]['y'];
    $lower = 100000;
    $id = -1;
    foreach ($libres as $key => $value) {
        $distance = sqrt(pow($x - $value['x'], 2) + pow($y - $value['y'], 2));
        //echo "<div>X: ".$value['x']." | Y: ".$value['y']." | Distance: ".$distance."</div>";
        if ($distance < $lower) {
            $id = $key;
            $lower = $distance;
        }
    }
    //echo "<div>Id :".$id." | Distance: ".$lower."</div>";
    $output = array();
    if ($id != -1) {
        $output['area'] = $area;
        $output['recomendado'] = $libres[$id];
        unset($libres[$id]);
        $output['disponibles'] = $libres;
    } else {
        $output['area'] = 0;
    }
    return $output;
    //echo "</pre>";
}
Beispiel #2
0
					    <li data-target="#myCarouselMini" data-slide-to="4"></li>
					  </ol>
					
					  <!-- Wrapper for slides -->
					  <div class="carousel-inner" role="listbox" style="height: 370px;width:295px;">
					  <?php 
for ($i = 0; $i < 5; $i++) {
    $class = "";
    $imgs_tend = images($oeuvretend, $i);
    $p = pubData($oeuvretend, $i);
    $title = body_title($oeuvretend, $i);
    if ($i == 0) {
        $class = "active";
    }
    echo '<div class="item ' . $class . '">';
    echo '<a href="oeuvre.php?artiste=' . $p[0] . '&oeuvre=' . ID($oeuvretend, $i) . '&type=' . Type($oeuvretend, $i) . '"><div class="oeuvre_detail"><strong>&ldquo;' . $p[0] . '&rdquo;</strong><br>' . $title . '</div><br/><img src="' . $imgs_tend[count($imgs_tend) - 1] . '" width="295"/></a>';
    echo '</div>';
}
?>
					  </div>
					
					</div>
                    

                   


                    <div class="sub_seagreen"><a href="contact.php?q=oeuvre"><span style="color:#fff;">Ajouter une Oeuvre</span></a></div><br>
                    

Beispiel #3
0
                <br>



               <div id="minioeuvress">
               


                <?php 
$result = requete('{"query":{"bool":{"must":[{"query_string":{"default_field":"parentUrl","query":"tendance"}}],"must_not":[],"should":[{"query_string":{"default_field":"_all","query":"tendance"}}]}},"from":0,"size":10,"sort":[],"facets":{}}');
for ($i = 0; $i < 3; $i++) {
    $imgs = images($result, $i);
    $p = pubData($result, $i);
    $a = $p[0];
    echo '<div class="minioeuvres">';
    echo '<a href="oeuvre.php?artiste=' . $p[0] . '&oeuvre=' . ID($result, $i) . '&type=' . Type($result, $i) . '"><img src=' . $imgs[count($imgs) - 1] . ' class="peloton"></a>';
    echo '<div>';
    echo '<div class="left">';
    echo '<p>' . $a . '</p>';
    echo '</div>';
    echo '</div>';
    echo '<br>';
    echo '</div>';
}
?>
                  <div id="fb-root"></div>
					<script>(function(d, s, id) {
					  var js, fjs = d.getElementsByTagName(s)[0];
					  if (d.getElementById(id)) return;
					  js = d.createElement(s); js.id = id;
					  js.src = "//connect.facebook.net/fr_FR/sdk.js#xfbml=1&version=v2.4";
Beispiel #4
0
                 <h3>Ses Oeuvres</h3>
                      <div class="slider center">
                      <?php 
$img_normal = images_normal_oeuvre($oeuvre);
for ($i = 0; $i < count($img_normal) - 1; $i++) {
    echo '<div><h3><a href=' . $img_normal[$i] . ' class="zoombox zgallery1" title="oeuvre.php?artiste=' . $p[0] . '&oeuvre=' . $id . '&type=' . $_GET["type"] . '+' . $p[8] . '" ><img src=' . $img_normal[$i] . ' ></a></h3></div>';
}
?>
                      <?php 
$result = requete('{"query":{"bool":{"must":[{"query_string":{"default_field":"pubDate","query":"\\"' . $_GET["artiste"] . '\\""}}],"must_not":[],"should":[]}},"sort":[],"facets":{}} ');
for ($i = 0; $i < $result['hits']['total']; $i++) {
    $imgs = images($result, $i);
    $p = pubData($result, $i);
    $aid = images_normal_oeuvre_aid($imgs[count($imgs) - 1]);
    //$aid = "http://www.vosartistes.com/sites/default/files/".after('http://www.vosartistes.com/sites/default/files/imagecache/tableau/',$imgs[count($imgs)-1]);
    echo '<div style="width:130px;"><h3><a href=' . $aid . ' class="zoombox zgallery1" title="oeuvre.php?artiste=' . $p[0] . '&oeuvre=' . ID($result, $i) . '&type=' . Type($result, $i) . '+' . $p[8] . '" ><img src=' . $imgs[count($imgs) - 1] . ' ></a></h3></div>';
}
?>
                        
                      </div>
                  </div>
               
              </div>
               <div class="animation_image" style="display:none; position: relative; top: 30px; left: 160px;" align="center"><img src="ajax-loader.gif"></div>
<br>
               <br>
           </section>
            
          
            <footer>
           
Beispiel #5
0
                echo '<div class="tableaux_detail">';
                echo '<span class="tableaux_titre">' . $p . '</span><br>';
                echo '<span class="tableaux_nombre">' . (count($idoev) - 1) . ' oeuvres publiées </span>';
                echo '</div>';
                echo '<span class="tableaux_servol"><a href="artiste.php?artiste=' . $p . '"><img src="images/survol.png"></a> </span>';
                echo '</div>';
            } else {
                $imgs = images_new($r);
                $p = pubData_new($r);
                $a = $p[0];
                //echo $a;
                echo '<div class="oeuvresLight">';
                echo '<img src=' . $imgs[count($imgs) - 1] . '>';
                echo '<div class="oeuvres_detail">';
                echo '<div id="oeuvres_detail_title" class="oeuvres_titre"><span>' . $a . '</span><br></div>';
                echo '<div id="oeuvres_detail_img" class="oeuvres_servol"><span><a href="oeuvre.php?artiste=' . $p[0] . '&oeuvre=' . ID($result, $i) . '&type=' . Type($result, $i) . '"><img src="images/survol2.png"></a></span></div>';
                echo '</div>';
                echo '</div>';
            }
            //echo $i;
            $i++;
        }
    case "bbb":
    case "eee":
    case "fff":
    case "ccc":
}
?>
              
               </div>