PHP Classes

File: aksara/Modules/Galleries/Views/read.php

Recommend this page to a friend!
  Classes of Aby Dahana  >  Aksara  >  aksara/Modules/Galleries/Views/read.php  >  Download  
File: aksara/Modules/Galleries/Views/read.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Aksara
A CodeIgniter based API and CRUD generator
Author: By
Last change: Initial commit for update 4.2.8

The update under this commit:
1. Core: refine the grid view and validation statement;
2. Enlarge the group privileges modal;
3. Add the sample individual user privileges;
4. Refine the core module views;
5. Change the login component to use view instead.
Initial commit for update 4.2.8

1. Update the installation (database migration) for the timestamp field type;
2. Removing bubble animation for landing page and blogs;
3. Change the excel export with PHPOffice/PHPSpreadSheet;
4. Change the default return type for i18n asset.
Initial commit for update 4.2.8

- Add the capability to get nearest features when using OpenLayers;
- Refine the core module views.
Redesign the gallery page
Date: 7 hours ago
Size: 3,574 bytes
 

Contents

Class file image Download
<?php
    $count
= 0;
   
$images = json_decode($results[0]->gallery_images);
   
$attributes = json_decode($results[0]->gallery_attributes);
   
$current = service('request')->uri->getSegment(3);
   
$carousel = null;
   
    if(
$images)
    {
        foreach(
$images as $key => $val)
        {
           
$carousel .= '
                <div class="carousel-item text-center'
. ($current == $key ? ' active' : null) . '">
                    <div class="full-height d-flex align-items-center justify-content-center bg-secondary">
                        <img src="'
. get_image('galleries', $key) . '" class="img-fluid" alt="' . $val . '">
                        <div class="carousel-caption d-none d-md-block text-shadow">
                            '
. $val . '
                        </div>
                    </div>
                </div>
            '
;
           
           
$count++;
        }
    }
?>
<style type="text/css">
    .modal-header
    {
        display: none
    }
</style>
<div class="row no-gutters bg-light">
    <div class="col-lg-8">
        <div class="sticky-top" style="top:15px">
            <div class="photo-view">
                <div class="relative" style="overflow: hidden">
                    <div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
                        <div class="carousel-inner">
                            <?php echo $carousel; ?>
</div>
                        <?php if($count > 1) { ?>
<a class="carousel-control-prev gradient-right" href="#carouselExampleControls" role="button" data-slide="prev">
                                <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                                <span class="sr-only">
                                    <?php echo phrase('previous'); ?>
</span>
                            </a>
                            <a class="carousel-control-next gradient-left" href="#carouselExampleControls" role="button" data-slide="next">
                                <span class="carousel-control-next-icon" aria-hidden="true"></span>
                                <span class="sr-only">
                                    <?php echo phrase('next'); ?>
</span>
                            </a>
                        <?php } ?>
</div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-4 p-3 bg-white">
        <div class="sticky-top" style="top:15px">
            <div class="row mb-3">
                <div class="col-3 col-md-2 pr-0">
                    <a href="<?php echo base_url('user/' . $results[0]->username); ?>" class="--xhr">
                        <img src="<?php echo get_image('users', $results[0]->photo, 'thumb'); ?>" class="img-fluid rounded" />
                    </a>
                </div>
                <div class="col-9 col-md-10">
                    <a href="<?php echo current_page('../../', array('gallery_slug' => null)); ?>" class="float-right font-weight-bold --xhr">
                        <i class="mdi mdi-window-close"></i>
                    </a>
                    <a href="<?php echo base_url('user/' . $results[0]->username); ?>" class="--xhr">
                        <b class="mb-0">
                            <?php echo $results[0]->first_name . ' ' . $results[0]->last_name; ?>
</b>
                    </a>
                    <p class="mt-0">
                        <span class="text-sm text-muted" data-toggle="tooltip" title="<?php echo $results[0]->updated_timestamp; ?>">
                            <?php echo time_ago($results[0]->updated_timestamp); ?>
</span>
                    </p>
                </div>
            </div>
            <?php
               
if($attributes)
                {
                    foreach(
$attributes as $key => $val)
                    {
                        if(!isset(
$val->label) && !isset($val->value)) continue;
                       
                        echo
'
                            <div class="row">
                                <div class="col-sm-4 col-lg-3">
                                    <label class="d-block text-muted">
                                        '
. $val->label . '
                                    </label>
                                </div>
                                <div class="col-sm-8 col-lg-9">
                                    <label>
                                        '
. $val->value . '
                                    </label>
                                </div>
                            </div>
                        '
;
                    }
                }
           
?>
<div>
                <?php echo $results[0]->gallery_description; ?>
</div>
            <div>
                <?php echo load_comment_plugin(current_page()); ?>
</div>
        </div>
    </div>
</div>

For more information send a message to info at phpclasses dot org.