Example #1
0
 /**
  * Returns exhibition
  * @return string
  * @todo showImages() is a default method - but we don't use it anymore
  **/
 public function front_exhibit()
 {
     if (empty($this->exhibit['exhibit'])) {
         return;
     } else {
         return empty($this->exhibit['exhibit']) ? showImages($this->result['id']) : $this->exhibit['exhibit'];
     }
 }
Example #2
0
<!-- Inner Images -->
<div class="col-sm-9" id="imageShowcase">
  <?php 
if (isset($_POST['homeSearchButton'])) {
    $type = $_POST['homeSearch'];
    if ($type != null) {
        homeSearch($type);
    } else {
        nullSearch();
    }
} else {
    if (isset($_POST['homeFilter'])) {
        $option = $_POST['homeFilterOption'];
        homeFilter($option);
    } else {
        showImages();
    }
}
?>
</div>
</div>
<div class="row">
  <h4 id="termsandConditions"><a href="#">Terms and Conditions Apply *** </a></h4>
<div>
</div>

<div class="modal fade" id="registration" tabindex="-1" role="dialog"
aria-labelledby="myModalRegistration">
<div class="modal-dialog" role="document">
  <div class="modal-content">
    <div class="modal-header">
Example #3
0
<?php

/*
 * @author: jevy18
 * @date: 01/22/2016 Updated Version
 */
ini_set('display_error', 'on');
error_reporting(E_ALL || E_STRICT);
//function call
return showImages();
//Function definition
function showImages()
{
    $out = "<h1>Image Gallery</h1>";
    $out .= "<ul id='images'";
    $folder = "img";
    $filesInFolder = new DirectoryIterator($folder);
    //Iterate through the directory for images
    //with different file types
    while ($filesInFolder->valid()) {
        $file = $filesInFolder->current();
        $filename = $file->getFilename();
        $src = "{$folder}/{$filename}";
        $fileInfo = new Finfo(FILEINFO_MIME_TYPE);
        $mimeType = $fileInfo->file($src);
        if ($mimeType === 'image/jpeg' || $mimeType === 'image/pjpeg' || $mimeType === 'image/png' || $mimeType === 'image/gif') {
            $out .= "<li><img src='{$src}' /></li>";
        }
        $filesInFolder->next();
    }
    $out .= "</ul>";
Example #4
0
        saveOrder($cid);
        break;
    case 'reset_hits':
        resetHits($cid);
        break;
    case 'copy_images':
        copyImage($cid, $option);
        break;
    case 'move_images':
        moveImages($cid, $option);
        break;
    case 'showImages':
        showImages($option);
        break;
    default:
        showImages($option);
}
/**
* Compiles a list of records
* @param database A database connector object
*/
function showImages($option)
{
    global $mainframe, $mosConfig_list_limit;
    $database = JFactory::getDBO();
    $gallery_id = intval($mainframe->getUserStateFromRequest("gallery_id{$option}", 'gallery_id', 0));
    $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
    $limitstart = intval($mainframe->getUserStateFromRequest("view{$option}limitstart", 'limitstart', 0));
    $search = $mainframe->getUserStateFromRequest("search{$option}", 'search', '');
    $search = $database->getEscaped(trim(strtolower($search)));
    $where = array();
Example #5
0
?>
"/>

        <div>
            <label for="file">Выберите файл для закачки: </label><input type="file" name="file"
                                                                        accept=".jpg,.jpeg,.png,.gif"><br>
        </div>
        <div>
            <label for="title">Краткое описание: </label><input id="title" type="text"
                                                                      name="title"><br>
        </div>
        <div>
            <label for="alt">Альтернативный текст: </label><input id="alt" type="text"
                                                                          name="alt"><br>
        </div>
        <div>
            <input type="submit" value="Отправить">
        </div>
    </form>
</div>

<h3 class="alertText"><?php 
echo $message;
?>
</h3>

<div>
    <?php 
showImages($listOfImages, $folderForBigImages, $folderForSmallImages);
?>
</div>
Example #6
0
    <title>Задание 6</title>
  </head>
  <body>
      <h1>Галерея</h1>
      <ul class="menu">
          <li class="current_page_item"><a href="/gallery.php">Галерея</a></li>
          <li><a href="/auth.php?action=exit"><?php 
echo $_SESSION['login'];
?>
 (Выход)</a></li>
      </ul>

      <form action="gallery.php" method="post" enctype="multipart/form-data">
        <input type="hidden" name="MAX_FILE_SIZE" value="5242880"/>
        <label for="file">Выберите файл для закачки: </label><input type="file" name="file" accept=".jpg,.jpeg,.png,.gif">
        <input type="submit" value="Отправить">
      </form>

      <h3 class="alertText"><?php 
echo $alertText;
?>
</h3>

      <div>
        <?php 
showImages($listOfImages);
?>
      </div>
  </body>
</html>
Example #7
0
include 'DataBaseConnection.php';
if (isset($_POST["type"]) && $_POST["type"] == "privacypolicy") {
    echo privacypolicy();
}
if (isset($_POST["type"]) && $_POST["type"] == "returnpolicy") {
    echo returnpolicy();
}
if (isset($_POST["cartSize"]) && $_POST["cartSize"] == "get") {
    echo numberOfItemsInCart();
}
if (isset($_POST["displaySL"]) && $_POST["displaySL"] == "small") {
    echo displaySmall();
}
if (isset($_POST["displayLG"]) && $_POST["displayLG"] == "large") {
    echo showImages();
}
if (isset($_POST["cookieSetting"]) && $_POST["cookieSetting"] == "unset") {
    logout();
}
function login($email, $password)
{
    $conn = dbConnection();
    $sql = "select * from memberdetails where Email='{$email}' And password='******'";
    $result = $conn->query($sql);
    //  echo $email;
    //  echo $password;
    //  echo "query executed";
    if ($result->num_rows > 0) {
        //  echo "> 0";
        session_impl($email, $password);
Example #8
0
function getImageNamesFromDB()
{
    // Создаем подключени е БД и проверяем его. Если подключения нет прекращаем всю работу и выводим ошибку
    $galleryDbConnect = mysqli_connect('localhost', 'root', '', 'gallery_db');
    if (!$galleryDbConnect) {
        die(mysqli_connect_error());
    }
    // Запрос на получение всех имен файлов
    $query = "SELECT file_name FROM gallery ORDER BY visit_counter DESC";
    $result = mysqli_query($galleryDbConnect, $query);
    $listOfImages = [];
    while ($date = mysqli_fetch_array($result)[0]) {
        $listOfImages[] = $date;
    }
    // Заполнение галереи уменьшенными изображениями
    showImages($listOfImages);
}
Example #9
0
<?php

include "modules.php";
$query = ["jeans" => "select product.ProductName,images.PID,images.Image1, images.Image2,product.DesignerName,product.Price from images inner join product on images.PID = product.PID and product.type='Jeans'", "tshirt" => "select product.ProductName,images.PID,images.Image1, images.Image2,product.DesignerName,product.Price from images inner join product on images.PID = product.PID and product.type='Tshirt'", "bag" => "select product.ProductName,images.PID,images.Image1, images.Image2,product.DesignerName,product.Price from images inner join product on images.PID = product.PID and product.type='Bag'"];
$data = $_POST['showCase'];
showImages($query[$data]);