HOME


Mini Shell 1.0
DIR: /home/islapiiu/sites/forbes/contact-form/img/
Upload File :
Current File : /home/islapiiu/sites/forbes/contact-form/img/attraction.php.tar
home/islapiiu/sites/visitlanka/attraction.php000064400000016105150766067120015505 0ustar00<?php
include_once(dirname(__FILE__) . '/class/include.php');
$banner = new Banner(7);
  $ATTRACTION = Attraction::all();
?>
<!DOCTYPE html>

<html dir="ltr" lang="en-US">

<head>


    <meta charset="utf-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>Try Lanka Travels in Sri Lanka || Attractions</title>
    <meta name="description"
        content="Try Lanka Holidays Travels has any lovely captions of Sri Lanaka which arrange to feel  beauty of Sri Lanka."
        http-equiv="description" />
    <meta name="keywords"
        content="Try Lanka Holidays travel attractions, places to visit in sri lanka ,excursion, excursion in srilnaka ,attractions in sri lanka<?php  foreach ($ATTRACTION as $attraction){echo ', '.$attraction['title'];}?>"
        http-equiv="keywords" />


    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />

    <link rel="icon" type="image/png" sizes="16x16" href="images/icons/1.PNG">


    <link href='https://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css'>

    <link href='https://fonts.googleapis.com/css?family=PT+Serif' rel='stylesheet' type='text/css'>

    <link href='https://fonts.googleapis.com/css?family=Mr+De+Haviland' rel='stylesheet' type='text/css'>

    <link href='https://fonts.googleapis.com/css?family=Raleway:300,100' rel='stylesheet' type='text/css'>

    <link href="https://fonts.googleapis.com/css2?family=Langar&display=swap" rel="stylesheet">




    <link rel="stylesheet" href="../../../netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">

    <link rel="stylesheet" href="css/bootstrap.css" type="text/css" />



    <link rel="stylesheet" href="css/style.css" type="text/css" />

    <link rel="stylesheet" href="css/dark.html" type="text/css" />

    <link rel="stylesheet" href="css/font-icons.css" type="text/css" />

    <link rel="stylesheet" href="css/animate.css" type="text/css" />

    <link rel="stylesheet" href="css/magnific-popup.css" type="text/css" />

    <link href="custom.css" rel="stylesheet" type="text/css" />

    <link rel="stylesheet" href="css/responsive.css" type="text/css" />
    <link href="css/footer.css" rel="stylesheet" type="text/css" />


    <script type="text/javascript" src="js/jquery.js"></script>
    <link href="css/activity-new.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/plugins.js"></script>
</head>

<body class="stretched">

    <div id="wrapper" class="clearfix">



        <?php include './header.php'; ?>

        <section id="slider" class="boxed-slider large bgcolor-white hidden-sm hidden-xs">
            <div class="fade-overlay"></div>
            <div class="fslider main" data-easing="easeInQuad">
                <div class="flexslider">
                    <div class="slider-wrap">
                        <!--                <div class="encore-caption center dark">                                                         <h2>Encore</h2>                    <h4 class="subtext serif bottommargin-sm">Resort &amp; Hotel</h4>                    <a href="#" class="button button-medium button-border button-dark button-outline tright nomargin"><span>BOOK TODAY</span></a>                                 </div>                                                   -->
                        <div class="slide slide-height"> <img class="banner-img" src="images/banner-img.webp" alt="">
                            <div class="centered-img">
                                <h3 class="centered-txt">ATTRAC<span>TION</span></h3>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <section id="slider" class="boxed-slider large bgcolor-white visible-sm visible-xs">
            <div class="fade-overlay"></div>
            <div class="fslider main" data-easing="easeInQuad">
                <div class="flexslider  mobil-slider2">
                    <div class="slider-wrap">
                       
                        <div class="slide">
                            <img src="images/banner-img.webp" alt="">
                            <div class="centered-img">
                            <h3 class="centered-txt">ATTRAC<span>TION</span></h3>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>



        <section class="popular-packages bgcolor-grey " style="padding-top: 30px;">
            <div class="container">

                <div class="row">
                    <?php
                      
                        foreach ($ATTRACTION as $attraction) {
                            ?>
                    <div class="col-md-4 col-sm-8">
                        <div class="single-package">
                            <div class="package-image">
                                <a href="attraction-view.php?id=<?php echo $attraction["id"]; ?>">
                                    <img src="upload/attraction/<?php echo $attraction["image_name"]; ?>" alt="">
                                </a>
                            </div>
                            <div class="package-content white-bg">
                                <center>
                                    <h3><a href="attraction-view.php?id=<?php echo $attraction["id"]; ?>"
                                            class="activity-title">
                                            <?php echo $attraction["title"]; ?></a></h3>
                                </center>
                                <?php echo substr($attraction["description"], 0, 75); ?>...
                                <div class="clearfix"></div>
                                <center>
                                    <a href="attraction-view.php?id=<?php echo $attraction["id"]; ?>"
                                        class="button button-small button-black button-reveal button-dark">
                                        <span>View More</span> <i class="icon-chevron-right"></i></a>
                                </center>

                            </div>

                        </div>
                    </div> <!-- single package end -->
                    <?php
                        }
                        ?>
                </div>
            </div>
        </section>

        <?php include './footer.php'; ?>
    </div>

    <script type="text/javascript">



    </script>
    <!-- Footer Scripts -->

    <script type="text/javascript" src="js/functions.js"></script>

    <script src="js/modernizr.js"></script>





    <!-- Calendar Script -->

    <script src="js/pikaday.js"></script>

    <script>
    var pickerDefault = new Pikaday({

        field: document.getElementById('datepicker-arrive'),

        theme: 'dark-theme'

    });



    var pickerTheme = new Pikaday({

        field: document.getElementById('datepicker-depart'),

        theme: 'dark-theme'

    });
    </script>



    <!-- Random Backgrounds -->

    <script src="js/rand.bg.js"></script>

    <script>
    $(".randbg").RandBG();
    </script>



</body>

</html>home/islapiiu/sites/toursatsrilanka/attraction.php000064400000050677150766127140016601 0ustar00<?php
include_once(dirname(__FILE__) . '/class/include.php');
?><?php ?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="Find travel ideas for planning your holiday to Sri Lanka. Discover things to see and do, places to stay and more Travel makes one modest, you see what a tiny place you occupy in the world.">
        <meta name="keywords" content="attraction in sri lanka,tour at sri lanka, watching attraction with tour at sri lanka,<?php foreach (Attraction::all() as $Attr) {
    echo "," . $Attr['title'];
} ?> ">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Attractions || Tours-at-srilanka</title>
        <!-- favicon -->
        <link rel="shortcut icon" href="images/logo/logo.png" type="image/x-icon">
        <link href="css/fontawesome.min.css" rel="stylesheet" type="text/css"/>
        <link href="css/flaticon.css" rel="stylesheet" type="text/css"/>
        <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
        <link href="css/owl.carousel.min.css" rel="stylesheet" type="text/css"/>
        <link href="css/lightcase.css" rel="stylesheet" type="text/css"/>
        <link href="css/style.css" rel="stylesheet" type="text/css"/>
        <link href="css/responsive.css" rel="stylesheet" type="text/css"/>
        <link href="css/custom.css" rel="stylesheet" type="text/css"/>
        <link rel="stylesheet" type="text/css" href="css-1/fullwidth.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="rs-plugin/css/settings.css" media="screen" />
        <link rel="stylesheet" href="css-1/rev-settings.css" type="text/css">
        <!--<link href="fontawesome/css/all.css" rel="stylesheet" type="text/css"/>-->
        <link href="font-awesome-4.7.0/css/font-awesome.css" rel="stylesheet" type="text/css"/>
    </head>

    <body>

        <!-- preloader start -->

        <!-- preloader end -->

        <!--  header-section start  -->
<?php include './header.php'; ?>
        <!--  header-section end  -->

        <section class="single-banner advisors-one-banner">
            <div class="page-breadcums">
                <div class="container">
                    <ul class="page-list">
                        <li><a href="index.php">Home</a></li>
                        <li><a href="attraction.php">Attractions</a></li>
                    </ul>
                </div>
            </div>
            <div class="banner-content-area">
                <div class="container">
                    <div class="row justify-content-center">
                        <div class="col-lg-10">
                            <div class="banner-content text-center">
                                <h1 class="banner-title">Attractions</h1>
                                <p class="text-center"> Find travel ideas for planning your holiday to Sri Lanka. Discover things to see and do, places to stay and more Travel makes one modest, you see what a tiny place you occupy in the world.</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- teacher-grid-section start -->
        <section class="teacher-grid-section section-padding">
            <div class="container">
                <div class="teacher-grid-wrapper">


                    <div class="row mt-mb-15 teacher-grid-block">
                        <?php
                        foreach (Attraction::all() as $AllAttraction) {
                            ?>
                            <div class="col-xl-3 col-lg-4 col-md-6">

                                <div class="teacher-single text-center">
                                    <div class="teacher-thumb">
                                        <img src="upload/attraction/<?php echo $AllAttraction['image_name']; ?>">
                                    </div>
                                    <div class="teacher-content">
                                        <h4 class="teacher-name"><a href="view-attraction.php?id=<?php echo $AllAttraction['id']; ?>">                                            <?php
                                                if (strlen($AllAttraction['title']) > 15) {
                                                    echo substr($AllAttraction['title'], 0, 15) . '...';
                                                } else {
                                                    echo $AllAttraction['title'];
                                                }
                                                ?>
                                            </a></h4>
                                        <p> 
                                            <?php
                                            if (strlen($AllAttraction['short_description']) > 130) {
                                                echo substr($AllAttraction['short_description'], 0, 130) . '...';
                                            } else {
                                                echo $AllAttraction['short_description'];
                                            }
                                            ?>

                                        </p>
                                        <br>
                                        <a href="view-attraction.php?id=<?php echo $AllAttraction['id']; ?>" class="simple-btn">Read More<i class="fa fa-long-arrow-right"></i></a>
                                    </div>
                                </div>     

                            </div><!-- teacher-single end-->
                            <?php
                        }
                        ?>
                    </div>  


                </div>
            </div>
        </section>
        <!-- teacher-grid-section end -->

        <!-- scroll-to-top start -->
        <div class="scroll-to-top">
            <span class="scroll-icon">
                <i class="fa fa-rocket" aria-hidden="true"></i>
            </span>
        </div>
        <!-- scroll-to-top end -->
        <!-- footer-section start -->
<?php include './footer.php'; ?>
        <!-- footer-section end -->

        <!-- scroll-to-top start -->
        <div class="scroll-to-top">
            <span class="scroll-icon">
                <i class="fa fa-rocket" aria-hidden="true"></i>
            </span>
        </div>
        <!-- scroll-to-top end -->

        <!-- jquery js link -->
        <script src="rs-plugin/js/pluginson3step.js" type="text/javascript"></script>
        <!--<script src="js/jquery-3.3.1.min.js"></script>-->
        <!-- bootstrap js link -->
        <script src="rs-plugin/js/plugin-set.js" type="text/javascript"></script>
        <script src="js/bootstrap.bundle.js"></script>
        <script src="js/bootstrap.min.js"></script>
        <!-- owl carousel js link -->
        <script src="js/owl.carousel.min.js"></script>
        <!-- lightcase js link -->
        <script src="js/lightcase.js"></script>
        <!-- waypoints js link -->
        <script src="js/jquery.waypoints.min.js"></script>
        <!-- countup js link -->
        <script src="js/jquery.countup.min.js"></script>
        <!-- circle-progress js link -->
        <script src="js/circle-progress.min.js"></script>
        <!-- countdown js link -->
        <script src="js/jquery.countdown.js"></script>
        <!-- goolg-map-activate js link -->
        <script src="js/goolg-map-activate.js"></script>
        <!-- main js link -->
        <script src="js/main.js"></script>
        <script src="rs-plugin/js/jquery.themepunch.tools.min.js"></script>
        <script src="rs-plugin/js/jquery.themepunch.revolution.min.js"></script>
        <script src="rs-plugin/js/custom.js" type="text/javascript"></script>
        <script src="rs-plugin/js/on3step.js" type="text/javascript"></script>
        <script async src="https://www.jscache.com/wejs?wtype=selfserveprop&amp;uniq=649&amp;locationId=13147684&amp;lang=en_US&amp;rating=true&amp;nreviews=4&amp;writereviewlink=true&amp;popIdx=true&amp;iswide=true&amp;border=true&amp;display_version=2" data-loadtrk onload="this.loadtrk = true"></script>
        <script type="text/javascript">
            function googleTranslateElementInit() {
                new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, autoDisplay: false}, 'google_translate_element');
            }
        </script>
        <script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit" type="text/javascript"></script>

    </body>

</html>home/islapiiu/sites/holidaytripslanka/attraction.php000064400000030135150766670310017062 0ustar00<!DOCTYPE html>
<?php
include './db.php';
include './function.php';
?>
<html lang="en-US" prefix="og: http://ogp.me/ns#">
    <head>
        <meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <title>Attraction | Visitlanka | Unawatuna</title>

        <meta name="description" content="Tour Sri Lanka with our visitlanka packages which let you experience the sri lankan’s rich cultural & natural heritage as well as a range of adventurous activities."/>
        <meta name="keywords" content="sri lanka visitlanka tours, visitlanka tours, sri lanka tours, tour sri lanka, beach tour, cultural tour, wildlife tour, national parks, cultural attractions, festivals, historical sites, adventure activities, sri lanka"/>
        <meta name="author" content="sublime holding">
        <!-- This site is optimized with the Yoast SEO plugin v4.6 - https://yoast.com/wordpress/plugins/seo/ -->

        <meta property="og:locale" content="en_US" />
        <meta property="og:type" content="object" />
        <meta property="og:title" content="Tours Archive - Adventure Tours" />
        <meta property="og:url" content="../index.html" />
        <meta property="og:site_name" content="Adventure Tours" />
        <meta name="twitter:card" content="summary" />
        <meta name="twitter:title" content="Tours Archive - Adventure Tours" />

        <!-- / Yoast SEO plugin. -->

        <link href="assets/css/custom.css" rel="stylesheet" type="text/css"/>
        <link rel='stylesheet' id='theme-addons-css'  href='assets/css/theme-addons.min3cae.css?ver=2.2.7' type='text/css' media='all' />
        <link rel='stylesheet' id='style-css-css'  href='assets/css/main-custom125b.css?ver=4.7.4' type='text/css' media='all' />
        <link rel='stylesheet' id='theme-font-google-fonts-css'  href='http://fonts.googleapis.com/css?family=Oxygen%3A400normal%2C700normal%7CKaushan+Script%3A400normal&amp;ver=4.7.4' type='text/css' media='all' />
        <link rel='stylesheet' id='icons-font-91928a4ccfed267a31035a3c6376b372-css'  href='../../../cdn-adventure-tours.themedelight.com/wp-content/themes/adventure-tours/assets/csslib/adventure-tours-icons125b.css?ver=4.7.4' type='text/css' media='all' />
        <script type="text/javascript">
            window._wpemojiSettings = {"baseUrl": "https:\/\/s.w.org\/images\/core\/emoji\/2.2.1\/72x72\/", "ext": ".png", "svgUrl": "https:\/\/s.w.org\/images\/core\/emoji\/2.2.1\/svg\/", "svgExt": ".svg", "source": {"concatemoji": "http:\/\/adventure-tours.themedelight.com\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.7.4"}};
            !function (a, b, c) {
                function d(a) {
                    var b, c, d, e, f = String.fromCharCode;
                    if (!k || !k.fillText)
                        return!1;
                    switch (k.clearRect(0, 0, j.width, j.height), k.textBaseline = "top", k.font = "600 32px Arial", a) {
                        case"flag":
                            return k.fillText(f(55356, 56826, 55356, 56819), 0, 0), !(j.toDataURL().length < 3e3) && (k.clearRect(0, 0, j.width, j.height), k.fillText(f(55356, 57331, 65039, 8205, 55356, 57096), 0, 0), b = j.toDataURL(), k.clearRect(0, 0, j.width, j.height), k.fillText(f(55356, 57331, 55356, 57096), 0, 0), c = j.toDataURL(), b !== c);
                        case"emoji4":
                            return k.fillText(f(55357, 56425, 55356, 57341, 8205, 55357, 56507), 0, 0), d = j.toDataURL(), k.clearRect(0, 0, j.width, j.height), k.fillText(f(55357, 56425, 55356, 57341, 55357, 56507), 0, 0), e = j.toDataURL(), d !== e
                    }
                    return!1
                }
                function e(a) {
                    var c = b.createElement("script");
                    c.src = a, c.defer = c.type = "text/javascript", b.getElementsByTagName("head")[0].appendChild(c)
                }
                var f, g, h, i, j = b.createElement("canvas"), k = j.getContext && j.getContext("2d");
                for (i = Array("flag", "emoji4"), c.supports = {everything:!0, everythingExceptFlag:!0}, h = 0; h < i.length; h++)
                    c.supports[i[h]] = d(i[h]), c.supports.everything = c.supports.everything && c.supports[i[h]], "flag" !== i[h] && (c.supports.everythingExceptFlag = c.supports.everythingExceptFlag && c.supports[i[h]]);
                c.supports.everythingExceptFlag = c.supports.everythingExceptFlag && !c.supports.flag, c.DOMReady = !1, c.readyCallback = function () {
                    c.DOMReady = !0
                }, c.supports.everything || (g = function () {
                    c.readyCallback()
                }, b.addEventListener ? (b.addEventListener("DOMContentLoaded", g, !1), a.addEventListener("load", g, !1)) : (a.attachEvent("onload", g), b.attachEvent("onreadystatechange", function () {
                    "complete" === b.readyState && c.readyCallback()
                })), f = c.source || {}, f.concatemoji ? e(f.concatemoji) : f.wpemoji && f.twemoji && (e(f.twemoji), e(f.wpemoji)))
            }(window, document, window._wpemojiSettings);
        </script>
        <style type="text/css">
            img.wp-smiley,
            img.emoji {
                display: inline !important;
                border: none !important;
                box-shadow: none !important;
                height: 1em !important;
                width: 1em !important;
                margin: 0 .07em !important;
                vertical-align: -0.1em !important;
                background: none !important;
                padding: 0 !important;
            }
        </style>

        <style id='rs-plugin-settings-inline-css' type='text/css'>
            .tp-caption a{color:#ff7302;text-shadow:none;-webkit-transition:all 0.2s ease-out;-moz-transition:all 0.2s ease-out;-o-transition:all 0.2s ease-out;-ms-transition:all 0.2s ease-out}.tp-caption a:hover{color:#ffa902}
        </style>

        <style type="text/css">.home .layout-container{
                margin-top:60px;
            }
            .widget_categories label.screen-reader-text{
                display:none;
            }
            .tour-list-home{
                margin-top:-5px;
            }
            .page-shortcodes-typography-table{
                margin-bottom:50px;
            }
            .page-shortcodes-typography-buttons{
                text-align:center;
            }
            .page-shortcodes-typography-buttons .atbtn{
                margin-right:20px;
                margin-bottom: 15px;
            }
            .page-shortcodes-typography-buttons-delimiter1{
                display:block;
                margin:0;
                border:none;
            }
            .page-shortcodes-typography-buttons-delimiter2{
                display:block;
                margin-bottom:25px;
                border:none;
            }
            .demo-page-shortcode-tours.atlist .atlist__item__image{
                width:26%;
            }
            @media(max-width:767px){
                .demo-page-shortcode-tours.atlist
                .atlist__item__image{
                    width:100%;
                }
            }
        </style>

        <noscript>
        <style type="text/css"> 
            .wpb_animate_when_almost_visible { 
                opacity: 1; 
            }
        </style>
        </noscript>

    </head>
    <body class="archive post-type-archive post-type-archive-product woocommerce woocommerce-page wpb-js-composer js-comp-ver-5.1.1 vc_responsive">


        <div class="layout-content">

            <!--header-->
            <?php
            include './header.php';
            ?>
            <!--End Header-->

            <div class="header-section header-section--with-banner parallax-section parallax-section--header">
                <div class="parallax-image" style="background-image:url(images/banner/10.jpg); background-repeat:repeat;">

                </div>
                <div class="container-fluid grad" >
                    <div class="container">
                        <div class="breadcrumbs">
                            <ul>
                                <li>
                                    <a href="./">Home</a>
                                </li>
                                <li>Attraction</li>
                            </ul>
                        </div>
                        <div class="header-section__content">
                            <h1 class="header-section__title">Attraction</h1>
                            <p class="header-section__description">We share stories and give advice</p>
                        </div>
                    </div>
                </div>
            </div>

            <div class="container layout-container margin-top margin-bottom">
                <div class="row">
                    <main class="col-md-12" role="main">
                        <div class="atgrid">

                            <div class="row atgrid__row">
                                <?php
                                $attractions = getAllAttractions();
                                foreach ($attractions as $attraction) {
                                    ?>
                                    <div class="col-md-3 col-sm-12 col-xs-12 atgrid__item-wrap mpadding" style="padding-bottom: 30px;">
                                        <div class="atgrid__item">
                                            <div class="atgrid__item__top">
                                                <a href="view_attraction.php?id=<?php echo $attraction['id']; ?>" class="atgrid__item__top__image">
                                                    <img width="720" height="480" src="images/attractions/<?php echo $attraction['image_name']; ?>" class="attachment-thumb_tour_listing size-thumb_tour_listing wp-post-image" alt="Alaska Lake" />
                                                </a>
                                            </div>
                                            <div class="atgrid__item__content">
                                                <h3 class="atgrid__item__title">
                                                    <a href="view_attraction.php?id=<?php echo $attraction['id']; ?>"><?php echo substr($attraction['title'], 0, 20); ?></a>
                                                </h3>
                                                <div class="atgrid__item__description text-justify" style="text-align: justify"><?php echo substr($attraction['description'], 0, 100) . '...'; ?></div>
                                            </div>
                                            <div class="item-attributes">
                                                <div class="atlist__item__read-more" style="text-align: center ">
                                                    <a href="view_attraction.php?id=<?php echo $attraction['id']; ?>" class="atbtn atbtn--small atbtn--rounded atbtn--light">Read More</a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <?php
                                }
                                ?>
                            </div>
                        </div>
                    </main>

                </div>
            </div><!-- .container -->

            <!--footer-->
            <?php
            include './footer.php';
            ?>
            <!--End footer-->

        </div>
        <!-- .layout-content -->

        <script src="assets/js/jquery-scrolltofixed.js" type="text/javascript"></script>
        <script src="assets/js/slick.js" type="text/javascript"></script>
        <script src="assets/js/custom.js" type="text/javascript"></script>
        <script type='text/javascript' src='assets/js/extensions/theme-full.min324d.js?ver=3.1.0'></script>

    </body>


</html>
home/islapiiu/sites/forbes/control-panel/post-and-get/attraction.php000064400000007633150767311110021675 0ustar00<?php

include_once(dirname(__FILE__) . '/../../class/include.php');

if (isset($_POST['create'])) {

    $ATTRACTION = new Attraction(NULL);
    $VALID = new Validator();


    $ATTRACTION->title = mysql_real_escape_string($_POST['title']);
    $ATTRACTION->short_description = mysql_real_escape_string($_POST['short_description']);
    $ATTRACTION->description = mysql_real_escape_string($_POST['description']);

    $dir_dest = '../../upload/attraction/';

    $handle = new Upload($_FILES['image']);

    $imgName = null;

    if ($handle->uploaded) {
        $handle->image_resize = true;
        $handle->file_new_name_ext = 'jpg';
        $handle->image_ratio_crop = 'C';
        $handle->file_new_name_body = Helper::randamId();
        $handle->image_x = 900;
        $handle->image_y = 500;

        $handle->Process($dir_dest);

        if ($handle->processed) {
            $info = getimagesize($handle->file_dst_pathname);
            $imgName = $handle->file_dst_name;
        }
    }

    $ATTRACTION->image_name = $imgName;

    $VALID->check($ATTRACTION, [
        'title' => ['required' => TRUE],
        'short_description' => ['required' => TRUE],
        'description' => ['required' => TRUE],
        'image_name' => ['required' => TRUE]
    ]);

    if ($VALID->passed()) {
        $ATTRACTION->create();

        if (!isset($_SESSION)) {
            session_start();
        }
        $VALID->addError("Your data was saved successfully", 'success');
        $_SESSION['ERRORS'] = $VALID->errors();
        header("location: ../view-attraction-photos.php?id=" . $ATTRACTION->id);
    } else {

        if (!isset($_SESSION)) {
            session_start();
        }

        $_SESSION['ERRORS'] = $VALID->errors();

        header('Location: ' . $_SERVER['HTTP_REFERER']);
    }
}

if (isset($_POST['update'])) {
    $dir_dest = '../../upload/attraction/';

    $handle = new Upload($_FILES['image']);

    $imgName = null;

    if ($handle->uploaded) {
        $handle->image_resize = true;
        $handle->file_new_name_body = TRUE;
        $handle->file_overwrite = TRUE;
        $handle->file_new_name_ext = FALSE;
        $handle->image_ratio_crop = 'C';
        $handle->file_new_name_body = $_POST ["oldImageName"];
        $handle->image_x = 900;
        $handle->image_y = 500;

        $handle->Process($dir_dest);

        if ($handle->processed) {
            $info = getimagesize($handle->file_dst_pathname);
            $imgName = $handle->file_dst_name;
        }
    }

    $ATTRACTION = new Attraction($_POST['id']);


    $ATTRACTION->image_name = $_POST['oldImageName'];
    $ATTRACTION->title = mysql_real_escape_string($_POST['title']);
    $ATTRACTION->short_description = mysql_real_escape_string($_POST['short_description']);
    $ATTRACTION->description = mysql_real_escape_string($_POST['description']);

    $VALID = new Validator();
    $VALID->check($ATTRACTION, [
        'title' => ['required' => TRUE],
        'short_description' => ['required' => TRUE],
        'description' => ['required' => TRUE],
        'image_name' => ['required' => TRUE]
    ]);

    if ($VALID->passed()) {
        $ATTRACTION->update();

        if (!isset($_SESSION)) {
            session_start();
        }
        $VALID->addError("Your changes saved successfully", 'success');
        $_SESSION['ERRORS'] = $VALID->errors();

        header('Location: ' . $_SERVER['HTTP_REFERER']);
    } else {

        if (!isset($_SESSION)) {
            session_start();
        }

        $_SESSION['ERRORS'] = $VALID->errors();

        header('Location: ' . $_SERVER['HTTP_REFERER']);
    }
}

if (isset($_POST['save-data'])) {

    foreach ($_POST['sort'] as $key => $img) {
        $key = $key + 1;

        $ATTRACTION = Attraction::arrange($key, $img);

        header('Location: ' . $_SERVER['HTTP_REFERER']);
    }
}