HOME


Mini Shell 1.0
DIR: /home/islapiiu/sites/forbes/contact-form/img/
Upload File :
Current File : /home/islapiiu/sites/forbes/contact-form/img/Banner.php.tar
home/islapiiu/sites/forbes/class/Banner.php000064400000004450150767112340014756 0ustar00<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of banner
 *
 * @author Suharshana DsW
 */
class Banner {

    public $id;
    public $title;
    public $image_name;

    public function __construct($id) {
        if ($id) {

            $query = "SELECT `id`,`title`,`image_name` FROM `banner` WHERE `id`=" . $id;

            $db = new Database();

            $result = mysql_fetch_array($db->readQuery($query));

            $this->id = $result['id'];
            $this->title = $result['title'];
            $this->image_name = $result['image_name'];


            return $this;
        }
    }

    public function create() {

        $query = "INSERT INTO `banner` (`title`,`image_name`) VALUES  ('"
                . $this->title . "','"
                . $this->image_name . "')";


        $db = new Database();

        $result = $db->readQuery($query);

        if ($result) {
            $last_id = mysql_insert_id();

            return $this->__construct($last_id);
        } else {
            return FALSE;
        }
    }

    public function all() {

        $query = "SELECT * FROM `banner`";
        $db = new Database();
        $result = $db->readQuery($query);
        $array_res = array();

        while ($row = mysql_fetch_array($result)) {
            array_push($array_res, $row);
        }

        return $array_res;
    }

    public function update() {

        $query = "UPDATE  `banner` SET "
                . "`title` ='" . $this->title . "', "
                . "`image_name` ='" . $this->image_name . "' "
                . "WHERE `id` = '" . $this->id . "'";

        $db = new Database();

        $result = $db->readQuery($query);

        if ($result) {
            return $this->__construct($this->id);
        } else {
            return FALSE;
        }
    }

    public function delete() {

        $query = 'DELETE FROM `banner` WHERE id="' . $this->id . '"';
   
        unlink(Helper::getSitePath() . "upload/banner/" . $this->image_name);
        
        $db = new Database();

        return $db->readQuery($query);
    }

}
home/islapiiu/sites/helpsrilankango/class/Banner.php000064400000004367150770557040016672 0ustar00<?php

/*

 * To change this license header, choose License Headers in Project Properties.

 * To change this template file, choose Tools | Templates

 * and open the template in the editor.

 */

/**

 * Description of banner

 *

 * @author Suharshana DsW

 */
class Banner {

    public $id;
    public $title;
    public $image_name;

    public function __construct($id) {

        if ($id) {



            $query = "SELECT `id`,`title`,`image_name` FROM `banner` WHERE `id`=" . $id;



            $db = new Database();



            $result = mysql_fetch_array($db->readQuery($query));



            $this->id = $result['id'];

            $this->title = $result['title'];

            $this->image_name = $result['image_name'];





            return $this;
        }
    }

    public function create() {



        $query = "INSERT INTO `banner` (`title`,`image_name`) VALUES  ('"
                . $this->title . "','"
                . $this->image_name . "')";





        $db = new Database();



        $result = $db->readQuery($query);



        if ($result) {

            $last_id = mysql_insert_id();



            return $this->__construct($last_id);
        } else {

            return FALSE;
        }
    }

    public function all() {



        $query = "SELECT * FROM `banner`";

        $db = new Database();

        $result = $db->readQuery($query);

        $array_res = array();



        while ($row = mysql_fetch_array($result)) {

            array_push($array_res, $row);
        }



        return $array_res;
    }

    public function update() {



        $query = "UPDATE  `banner` SET "
                . "`title` ='" . $this->title . "', "
                . "`image_name` ='" . $this->image_name . "' "
                . "WHERE `id` = '" . $this->id . "'";



        $db = new Database();



        $result = $db->readQuery($query);



        if ($result) {

            return $this->__construct($this->id);
        } else {

            return FALSE;
        }
    }

    public function delete() {



        $query = 'DELETE FROM `banner` WHERE id="' . $this->id . '"';



        unlink(Helper::getSitePath() . "upload/banner/" . $this->image_name);



        $db = new Database();



        return $db->readQuery($query);
    }

}
home/islapiiu/sites/holidaytours/class/Banner.php000064400000004303150770616330016223 0ustar00<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of banner
 *
 * @author Suharshana DsW
 */
class Banner {

    public $id;
    public $title;
    public $image_name;

    public function __construct($id) {
        if ($id) {

            $query = "SELECT `id`,`title`,`image_name` FROM `banner` WHERE `id`=" . $id;

            $db = new Database();

            $result = mysql_fetch_array($db->readQuery($query));

            $this->id = $result['id'];
            $this->title = $result['title'];
            $this->image_name = $result['image_name'];


            return $this;
        }
    }

    public function create() {

        $query = "INSERT INTO `banner` (`title`,`image_name`) VALUES  ('"
                . $this->title . "','"
                . $this->image_name . "')";


        $db = new Database();

        $result = $db->readQuery($query);

        if ($result) {
            $last_id = mysql_insert_id();

            return $this->__construct($last_id);
        } else {
            return FALSE;
        }
    }

    public function all() {

        $query = "SELECT * FROM `banner`";
        $db = new Database();
        $result = $db->readQuery($query);
        $array_res = array();

        while ($row = mysql_fetch_array($result)) {
            array_push($array_res, $row);
        }

        return $array_res;
    }

    public function update() {

        $query = "UPDATE  `banner` SET "
                . "`title` ='" . $this->title . "', "
                . "`image_name` ='" . $this->image_name . "' "
                . "WHERE `id` = '" . $this->id . "'";

        $db = new Database();

        $result = $db->readQuery($query);

        if ($result) {
            return $this->__construct($this->id);
        } else {
            return FALSE;
        }
    }

    public function delete() {

        $query = 'DELETE FROM `banner` WHERE id="' . $this->id . '"';
   
        unlink(Helper::getSitePath() . "upload/banner/" . $this->image_name);
        
        $db = new Database();

        return $db->readQuery($query);
    }

}
home/islapiiu/sites/bnb/class/Banner.php000064400000004450150770771730014247 0ustar00<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of banner
 *
 * @author Suharshana DsW
 */
class Banner {

    public $id;
    public $title;
    public $image_name;

    public function __construct($id) {
        if ($id) {

            $query = "SELECT `id`,`title`,`image_name` FROM `banner` WHERE `id`=" . $id;

            $db = new Database();

            $result = mysql_fetch_array($db->readQuery($query));

            $this->id = $result['id'];
            $this->title = $result['title'];
            $this->image_name = $result['image_name'];


            return $this;
        }
    }

    public function create() {

        $query = "INSERT INTO `banner` (`title`,`image_name`) VALUES  ('"
                . $this->title . "','"
                . $this->image_name . "')";


        $db = new Database();

        $result = $db->readQuery($query);

        if ($result) {
            $last_id = mysql_insert_id();

            return $this->__construct($last_id);
        } else {
            return FALSE;
        }
    }

    public function all() {

        $query = "SELECT * FROM `banner`";
        $db = new Database();
        $result = $db->readQuery($query);
        $array_res = array();

        while ($row = mysql_fetch_array($result)) {
            array_push($array_res, $row);
        }

        return $array_res;
    }

    public function update() {

        $query = "UPDATE  `banner` SET "
                . "`title` ='" . $this->title . "', "
                . "`image_name` ='" . $this->image_name . "' "
                . "WHERE `id` = '" . $this->id . "'";

        $db = new Database();

        $result = $db->readQuery($query);

        if ($result) {
            return $this->__construct($this->id);
        } else {
            return FALSE;
        }
    }

    public function delete() {

        $query = 'DELETE FROM `banner` WHERE id="' . $this->id . '"';
   
        unlink(Helper::getSitePath() . "upload/banner/" . $this->image_name);
        
        $db = new Database();

        return $db->readQuery($query);
    }

}
home/islapiiu/sites/magnoliya/class/Banner.php000064400000005176150771025570015467 0ustar00<?php

/*

 * To change this license header, choose License Headers in Project Properties.

 * To change this template file, choose Tools | Templates

 * and open the template in the editor.

 */

/**

 * Description of banner

 *

 * @author Suharshana DsW

 */
class Banner {

    public $id;
    public $title;
    public $description;
    public $image_name;

    public function __construct($id) {

        if ($id) {



            $query = "SELECT `id`,`title`,`description`,`image_name` FROM `banner` WHERE `id`=" . $id;



            $db = new Database();



            $result = mysql_fetch_array($db->readQuery($query));



            $this->id = $result['id'];

            $this->title = $result['title'];

            $this->description = $result['description'];

            $this->image_name = $result['image_name'];





            return $this;
        }
    }

    public function create() {



        $query = "INSERT INTO `banner` (`title`,`description`,`image_name`) VALUES  ('"
                . $this->title . "','"
                . $this->description . "','"
                . $this->image_name . "')";





        $db = new Database();



        $result = $db->readQuery($query);



        if ($result) {

            $last_id = mysql_insert_id();



            return $this->__construct($last_id);
        } else {

            return FALSE;
        }
    }

    public function all() {



        $query = "SELECT * FROM `banner`";

        $db = new Database();

        $result = $db->readQuery($query);

        $array_res = array();



        while ($row = mysql_fetch_array($result)) {

            array_push($array_res, $row);
        }



        return $array_res;
    }

    public function update() {



        $query = "UPDATE  `banner` SET "
                . "`title` ='" . $this->title . "', "
                . "`description` ='" . $this->description . "', "
                . "`image_name` ='" . $this->image_name . "' "
                . "WHERE `id` = '" . $this->id . "'";



        $db = new Database();



        $result = $db->readQuery($query);



        if ($result) {

            return $this->__construct($this->id);
        } else {

            return FALSE;
        }
    }

    public function delete() {



        $query = 'DELETE FROM `banner` WHERE id="' . $this->id . '"';



        unlink(Helper::getSitePath() . "upload/banner/" . $this->image_name);



        $db = new Database();



        return $db->readQuery($query);
    }

}
home/islapiiu/sites/jetlinetravels/class/Banner.php000064400000004303151061410240016512 0ustar00<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of banner
 *
 * @author Suharshana DsW
 */
class Banner {

    public $id;
    public $title;
    public $image_name;

    public function __construct($id) {
        if ($id) {

            $query = "SELECT `id`,`title`,`image_name` FROM `banner` WHERE `id`=" . $id;

            $db = new Database();

            $result = mysql_fetch_array($db->readQuery($query));

            $this->id = $result['id'];
            $this->title = $result['title'];
            $this->image_name = $result['image_name'];


            return $this;
        }
    }

    public function create() {

        $query = "INSERT INTO `banner` (`title`,`image_name`) VALUES  ('"
                . $this->title . "','"
                . $this->image_name . "')";


        $db = new Database();

        $result = $db->readQuery($query);

        if ($result) {
            $last_id = mysql_insert_id();

            return $this->__construct($last_id);
        } else {
            return FALSE;
        }
    }

    public function all() {

        $query = "SELECT * FROM `banner`";
        $db = new Database();
        $result = $db->readQuery($query);
        $array_res = array();

        while ($row = mysql_fetch_array($result)) {
            array_push($array_res, $row);
        }

        return $array_res;
    }

    public function update() {

        $query = "UPDATE  `banner` SET "
                . "`title` ='" . $this->title . "', "
                . "`image_name` ='" . $this->image_name . "' "
                . "WHERE `id` = '" . $this->id . "'";

        $db = new Database();

        $result = $db->readQuery($query);

        if ($result) {
            return $this->__construct($this->id);
        } else {
            return FALSE;
        }
    }

    public function delete() {

        $query = 'DELETE FROM `banner` WHERE id="' . $this->id . '"';
   
        unlink(Helper::getSitePath() . "upload/banner/" . $this->image_name);
        
        $db = new Database();

        return $db->readQuery($query);
    }

}