Example #1
0
                <h1><?php 
echo String::system_project_image;
?>
</h1>
              </div>
            </div>
          </div>

          <?php 
$sql = "SELECT * FROM image order by auto_id ";
$result = mysqli_query($con, $sql);
while ($row = mysqli_fetch_array($result)) {
    $image["auto_id"] = $row["auto_id"];
    $image["name"] = $row["name"];
    $image["description"] = $row["description"];
    $image["url"] = ImageHelper::makeURL($row["url"]);
    $image["activity_name"] = $row["activity_name"];
    $images[] = $image;
}
function showImageOfAlbum($images, $albumName)
{
    $i = 0;
    foreach ($images as $image) {
        if ($image["activity_name"] == $albumName && $i < 3) {
            echo '<div class="col-md-4">';
            echo '<p class="text-center">';
            echo '<a href="show_image.php?activity_name=' . $image["activity_name"] . '" target="_blank">';
            echo '<img ';
            echo 'src="' . $image["url"] . '" ';
            echo 'alt="' . $image["description"] . '" ';
            echo 'class="img-thumbnail">';
Example #2
0
for ($i = 0; $i < count($images); $i++) {
    if ($i == 0) {
        ?>
              <div class="item active">
                <img src="<?php 
        echo ImageHelper::makeURL($images[$i]["url"]);
        ?>
" alt="">
                <div class="carousel-caption"></div>
              </div>
                    <?php 
    } else {
        ?>
              <div class="item">
                <img src="<?php 
        echo ImageHelper::makeURL($images[$i]["url"]);
        ?>
" alt="">
                <div class="carousel-caption"></div>
              </div>
                    <?php 
    }
}
?>
            </div>

            <!-- Controls -->
            <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
              <span class="glyphicon glyphicon-chevron-left"></span>
              <span class="sr-only">Previous</span>
            </a>