Exemplo n.º 1
0
  <div class="gallery-box clearfix">
    <div class="medium-padding container clearfix">
      <div class="clearfix">
        <div class="col-8">
          <h2 class="title-gallery">Galeria</h2>
        </div>
        <div class="amount_gallery pull-right small-tablet-hidden"><?php 
echo count(Out::get('photos'));
?>
</div>
      </div>
      <div class="gallery-slider medium-margin">

        <?php 
foreach (Out::get('photos') as $photo) {
    echo '<div class="zoom-img gallery-item">';
    echo '<img src="';
    echo Template::src('data/' . $photo[0]);
    echo '" alt="';
    echo $photo[1];
    echo '"/>';
    echo '</div>';
}
?>

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

  <div class="divider-project"></div>
Exemplo n.º 2
0
                DB::query("INSERT INTO `photos_to_project` VALUES (null,'" . $key . "','" . Out::get('projectID') . "','" . $value['order'] . "')");
            }
        }
    }
    $result = DB::query("SELECT photos_to_project.IDphoto as ID, photos_to_project.order as 'order', projects.name as name FROM photos, photos_to_project, projects WHERE photos_to_project.IDphoto = photos.ID AND photos_to_project.IDproject = '" . Out::get('projectID') . "'");
    $photosUse = array();
    $name = "";
    while ($row = mysqli_fetch_assoc($result)) {
        $photosUse[$row['ID']] = true;
        $name = $row['name'];
    }
    $result = DB::query("SELECT * FROM photos");
    echo '<h2>Łączenie zdjęć z projektem "' . $name . '"</h2>';
    echo '<form action="" method="post"><div class="clearfix">';
    while ($row = mysqli_fetch_assoc($result)) {
        $resultOrder = DB::query("SELECT photos_to_project.order as 'order' FROM photos, photos_to_project WHERE photos_to_project.IDphoto = '" . $row['ID'] . "' AND photos_to_project.IDproject = '" . Out::get('projectID') . "'");
        $order = mysqli_fetch_assoc($resultOrder);
        $order = isset($order['order']) ? $order['order'] : 0;
        echo '<div class="photo-label">';
        echo '<input class="order" type="text" name="photos[' . $row['ID'] . '][order]" readyonly value="' . $order . '" />';
        echo '<label>';
        echo '<input class="linkPhoto" type="checkbox" name="photos[' . $row['ID'] . '][id]" ';
        if (isset($photosUse[$row['ID']])) {
            echo 'checked="checked"';
        }
        echo '><span>';
        echo '<img width="100%" src="' . Template::src('data/' . $row['name']) . '" ></span>';
        echo '</label></div>';
    }
    echo '</div><input type="submit" value="Zapisz"></form>';
}
Exemplo n.º 3
0
echo Template::src('o-mnie');
?>
" class="button button-next"></a>
      </div>
    </div>
  </div>
</div>

<div id="projects-list" class="project-box clearfix">
  <div class="medium-padding container clearfix">
    <h2 class="title-project">Moje projekty</h2>

    <?php 
foreach (Out::get('project') as $project) {
    $id = $project['ID'];
    $photo = Out::get('projectPhoto');
    $photo = $photo[$id];
    ?>

    <div class="project-element col-6 tablet fullwidth-rwd">
      <a href="<?php 
    echo Project::name2url($project['projectTitle']);
    ?>
" title="<?php 
    echo $project['projectTitle'];
    ?>
">
          <div class="amount_gallery"><?php 
    echo $project['photoCount'];
    ?>
</div>