Tuesday, July 31, 2018

How To Create Web Calendar In PHP with JQuery and Ajax

How To Create Web Calendar In PHP with JQuery and Ajax


Today we are looking at how to create calender in php using JQuery and Ajax,this tutorials is have a web calendar displaying on our web calendar automatically.The feature of this calendar is that it has a left and right arrow which can use to navigate to next and previous month and year.For those of us who may want to test it on a local server before installing it to their web page,you need to run it through a server like Xampp server,Wamp server etc.

 php.jpg

Before we proceed there are some basic things we need to know to make the feature more effectively.

�    We need to build a style for our our calendar
�    We need a JQuery script to run this feature,you can download your JQuery Script online
�    We need to build an Ajax page that will call our PHP class
�    We need to build a PHP class
�    Finally we also need to create an index page
Steps To Create Our Web Calendar
  1.  Create a page and name it style.css with the below codes
body {

    font-family: calibri;

}



#calendar-outer {

    width: 574px;

}



#calendar-outer ul {

    margin: 0px;

    padding: 0px;

}



#calendar-outer ul li {

    margin: 0px;

    padding: 0px;

    list-style-type: none;

}



.prev {

    display: inline-block;

    float: left;

    cursor: pointer

}



.next {

    display: inline-block;

    float: right;

    cursor: pointer

}



:focus {

    outline: none;

    background: #ff8e8e;

}



div.calendar-nav {

    background-color: #ff8e8e;

    border-radius: 4px;

    text-align: center;

    padding: 10px;

    color: #FFF;

    box-sizing: border-box;

    font-weight: bold;

}



#calendar-outer .week-name-title li {

    display: inline-block;

    padding: 10px 27px;

    color: #90918b;

    font-size: 0.95em;

    font-weight: 600;

}



.week-day-cell li {

    display: inline-block;

    width: 80px;

    height: 80px;

    text-align: center;

    line-height: 80px;

    vertical-align: middle;

    background-color: #f6ffc6;

    color: #ff8e8e;

    border: 1px solid #f1f0f0;

    border-radius: 4px;

    font-size: 1.2em;

}

#body-overlay {background-color: rgba(0, 0, 0, 0.6);z-index: 999;position: absolute;left: 0;top: 0;width: 100%;height: 100%;display: none;}

#body-overlay div {position:absolute;left:50%;top:50%;margin-top:-32px;margin-left:-32px;}

2.   Create a PHP Class and name it class.calender.php with the code given below.

<?php

class PHPCalendar {

    private $weekDayName = array ("MON","TUE","WED","THU","FRI","SAT","SUN");

    private $currentDay = 0;

    private $currentMonth = 0;

    private $currentYear = 0;

    private $currentMonthStart = null;

    private $currentMonthDaysLength = null;   

   

    function __construct() {

        $this->currentYear = date ( "Y", time () );

        $this->currentMonth = date ( "m", time () );

       

        if (! empty ( $_POST [year] )) {

            $this->currentYear = $_POST [year];

        }

        if (! empty ( $_POST [month] )) {

            $this->currentMonth = $_POST [month];

        }

        $this->currentMonthStart = $this->currentYear . - . $this->currentMonth . -01;

        $this->currentMonthDaysLength = date ( t, strtotime ( $this->currentMonthStart ) );

    }

   

    function getCalendarHTML() {

        $calendarHTML = <div id="calendar-outer">;

        $calendarHTML .= <div class="calendar-nav"> . $this->getCalendarNavigation() . </div>;

        $calendarHTML .= <ul class="week-name-title"> . $this->getWeekDayName () . </ul>;

        $calendarHTML .= <ul class="week-day-cell"> . $this->getWeekDays () . </ul>;       

        $calendarHTML .= </div>;

        return $calendarHTML;

    }

   

    function getCalendarNavigation() {

        $prevMonthYear = date ( m,Y, strtotime ( $this->currentMonthStart. -1 Month  ) );

        $prevMonthYearArray = explode(",",$prevMonthYear);

       

        $nextMonthYear = date ( m,Y, strtotime ( $this->currentMonthStart . +1 Month  ) );

        $nextMonthYearArray = explode(",",$nextMonthYear);

       

        $navigationHTML = <div class="prev" data-prev-month=" . $prevMonthYearArray[0] . " data-prev-year = " . $prevMonthYearArray[1]. "><</div>;

        $navigationHTML .= <span id="currentMonth"> . date ( M, strtotime ( $this->currentMonthStart ) ) . </span>;

        $navigationHTML .= <span contenteditable="true" id="currentYear" style="margin-left:5px">.    date ( Y, strtotime ( $this->currentMonthStart ) ) . </span>;

        $navigationHTML .= <div class="next" data-next-month=" . $nextMonthYearArray[0] . " data-next-year = " . $nextMonthYearArray[1]. ">></div>;

        return $navigationHTML;

    }

   

    function getWeekDayName() {

        $WeekDayName= ;       

        foreach ( $this->weekDayName as $dayname ) {           

            $WeekDayName.= <li> . $dayname . </li>;

        }       

        return $WeekDayName;

    }

   

    function getWeekDays() {

        $weekLength = $this->getWeekLengthByMonth ();

        $firstDayOfTheWeek = date ( N, strtotime ( $this->currentMonthStart ) );

        $weekDays = "";

        for($i = 0; $i < $weekLength; $i ++) {

            for($j = 1; $j <= 7; $j ++) {

                $cellIndex = $i * 7 + $j;

                $cellValue = null;

                if ($cellIndex == $firstDayOfTheWeek) {

                    $this->currentDay = 1;

                }

                if (! empty ( $this->currentDay ) && $this->currentDay <= $this->currentMonthDaysLength) {

                    $cellValue = $this->currentDay;

                    $this->currentDay ++;

                }

                $weekDays .= <li> . $cellValue . </li>;

            }

        }

        return $weekDays;

    }

   

    function getWeekLengthByMonth() {

        $weekLength =  intval ( $this->currentMonthDaysLength / 7 );   

        if($this->currentMonthDaysLength % 7 > 0) {

            $weekLength++;

        }

        $monthStartDay= date ( N, strtotime ( $this->currentMonthStart) );       

        $monthEndingDay= date ( N, strtotime ( $this->currentYear . - . $this->currentMonth . - . $this->currentMonthDaysLength) );

        if ($monthEndingDay < $monthStartDay) {           

            $weekLength++;

        }

       

        return $weekLength;

    }

}

?>

3. Next proceed by creating PHP Ajax page and name it calendar-ajax.php with the below code
<?php

require_once class.calendar.php;

$phpCalendar = new PHPCalendar ();



$calendarHTML = $phpCalendar->getCalendarHTML();

echo $calendarHTML;

?>

4.    Finally create an index.php page with the given code below
<?php

require_once class.calendar.php;

$phpCalendar = new PHPCalendar ();

?>

<html>

<head>

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

<title>PHP Calendar</title>

</head>

<body>

<div id="body-overlay"><div><img src="loading.gif" width="64px" height="64px"/></div></div>

<div id="calendar-html-output">

<?php

$calendarHTML = $phpCalendar->getCalendarHTML();

echo $calendarHTML;

?>

</div>

<script src="jquery-1.11.2.min.js" type="text/javascript"></script>

<script>

$(document).ready(function(){

    $(document).on("click", .prev, function(event) {

        var month =  $(this).data("prev-month");

        var year =  $(this).data("prev-year");

        getCalendar(month,year);

    });

    $(document).on("click", .next, function(event) {

        var month =  $(this).data("next-month");

        var year =  $(this).data("next-year");

        getCalendar(month,year);

    });

    $(document).on("blur", #currentYear, function(event) {

        var month =  $(#currentMonth).text();

        var year = $(#currentYear).text();

        getCalendar(month,year);

    });

});

function getCalendar(month,year){

    $("#body-overlay").show();

    $.ajax({

        url: "calendar-ajax.php",

        type: "POST",

        data_month=+month+&year=+year,

        success: function(response){

            setInterval(function() {$("#body-overlay").hide(); },500);

            $("#calendar-html-output").html(response);   

        },

        error: function(){}

    });

   

}

</script>

</body>

</html>


Note:You have to put all this code in the same folder,also note that the line (35,36,37) which is highlighted is calling the JQuery script I ask you to download earlier before we proceeded to this tutorial.

visit link download
Read more »

AppDev Android Development Using Eclipse Graphics Bluetooth And TabletsiNKiSO

AppDev Android Development Using Eclipse Graphics Bluetooth And TabletsiNKiSO


AppDev Android Development Using Eclipse Graphics Bluetooth And TabletsiNKiSO

Type : rar
Size : 651 MB
Artis :
Android Download All
Rating :






Search Result


AppDev Android Development Using Eclipse Graphics Bluetooth And ...
AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets-iNKiSO | ISO | 651 MB The Advanced Android Development using Eclipse course will take a deeper ...

AppDev Android Development Using Eclipse Graphics Bluetooth And ...
AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets-iNKiSO | 651 MBGenre: eLearningThe Advanced Android Development using Eclipse course will take ...

� AppDev Android Development Using Eclipse Graphics Bluetooth And ...
AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets-iNKiSO is a post in Android, Applications category

AppDev Android Development Using Eclipse Graphics Bluetooth And ...
AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets-iNKiSO English ... AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets

AppDev Android Development Using Eclipse Graphics Bluetooth ...
AppDev Android Development Using Eclipse Graphics Bluetooth & Tablets (ISO) ISO | 651 MB The Advanced Android Development using Eclipse course

AppDev Android Development Using Eclipse Graphics Bluetooth And ...
AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets-iNKiSO English ... AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets-iNKiSO.

AppDev Android Development Using Eclipse Graphics Bluetooth & ...
http://bitshare.com/files/3ozekp49/AppDev.Android.Development.Using.Eclipse.Graphics.Bluetooth.And.TabletsiNKiSO.part1.rar.html

AppDev Android Development Using Eclipse Graphics Bluetooth And ...
AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets-iNKiSO Download on Rapidshare,Putlocker, Extabit,Netload,Torrent, Turbobit, Mediafire AppDev ...

AppDev Android Development Using Eclipse Graphics Bluetooth ...
AppDev Android Development Using Eclipse Graphics Bluetooth & Tablets (ISO) ISO | 651 MB AppDev Android Development Using Eclipse Graphics Bluetooth & Tablets (ISO ...

Appdev android development using eclipse graphics bluetooth and ...
appdev android development using eclipse graphics bluetooth and tablets-inkiso full downloads for all


Description


appdev android development using eclipse graphics bluetooth and tablets-inkiso full downloads for all,AppDev Android Development Using Eclipse Graphics Bluetooth & Tablets (ISO) ISO | 651 MB AppDev Android Development Using Eclipse Graphics Bluetooth & Tablets (ISO ...,AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets-iNKiSO Download on Rapidshare,Putlocker, Extabit,Netload,Torrent, Turbobit, Mediafire AppDev ...,http://bitshare.com/files/3ozekp49/AppDev.Android.Development.Using.Eclipse.Graphics.Bluetooth.And.TabletsiNKiSO.part1.rar.html,AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets-iNKiSO English ... AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets-iNKiSO.,AppDev Android Development Using Eclipse Graphics Bluetooth & Tablets (ISO) ISO | 651 MB The Advanced Android Development using Eclipse course,AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets-iNKiSO English ... AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets,AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets-iNKiSO is a post in Android, Applications category,AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets-iNKiSO | 651 MBGenre: eLearningThe Advanced Android Development using Eclipse course will take ...,AppDev Android Development Using Eclipse Graphics Bluetooth And Tablets-iNKiSO | ISO | 651 MB The Advanced Android Development using Eclipse course will take a deeper ...


Similar Post


  • Genesis [Premium] v1 2 1 (Android) {apk+data} [JOKER]
  • Amanita Design Machinarium v1 6 13 ANDROiD rGPDA
  • File Expert Pro v4 1 6 APK (No Key Needed)
  • com hyperkani sliceice 8
  • admc 1 0 Android
  • MusicSleep 1 1 3
  • MtG Tracker 4 1 4 Android
  • WRITEIMEI R1 5 9001
  • Ant Smasher Free Game 2 1 32
  • Desktop 3 Suite



visit link download
Read more »

Another Live Leaked Photos Of Xiaomi Note 5 Shows Bezel Less Display Dual Rear Cameras

Another Live Leaked Photos Of Xiaomi Note 5 Shows Bezel Less Display Dual Rear Cameras


Xiaomi Redmi Note 5 has been expected to launch earlier this year and now the year is coming to an end and no launch is still seen rather we keep seeing some leaked photos Of the device. Another Live photo which was recently leaked by weibo users points 18:9 display with minimal bezels on all sides, a dual rear camera setup, as well as a rear fingerprint sensor, apart from a metallic body and  will be powered by a Snapdragon 660 or MediaTek Helio P25 SoC, sport 16-megapixel and 5-megapixel rear camera sensors, and be powered by a 4000mAh battery.






The Xiaomi Redmi Note 5 show a smartphone with a grey metallic body. Looking at the front panel, we can see minimal bezels on all sides. The top bezel is especially thin, despite containing the front camera and earpiece. There is virtually no bezel at the bottom, and, no home button either. The bezel-less display is expected give the smartphone a display aspect ratio of 18:9, as seen in several recent handsets including the Xiaomi Mi MIX 2, with a 5.5-inch size.


  • Also Read: See Photos: Xiaomi Redmi Note 5 Set To Come With Dual Camera Setup And A Near Bezel-less Design

On the rear panel, the purported Xiaomi Redmi Note 5 live photos show a vertical dual rear camera setup, with the fingerprint sensor. According to report seen on weibo the pricing for the smartphone � the 3GB RAM/ 16GB storage variant is said to be priced at CNY 999, the 3GB RAM/ 32GB storage variant is said to be priced at CNY 1,299, while the 4GB RAM/ 64GB storage variant is said to be priced at CNY 1,699.


visit link download
Read more »

Angry Birds Stella v1 0 1 apk For Free

Angry Birds Stella v1 0 1 apk For Free




Download-Telechargement-?????????

Description:

Stella has teamed up with Dahlia, Poppy, Willow and Luca � the newest flock on the block! These fearless pals have a strong bond but even stronger personalities. You could even say they�re best friends forever... most of the time.

But now these brave birds need to pull together and fight to save the island from Gale, the Bad Princess who�s stolen their scrapbook and is destroying their magical home.

It�s an all-new physics-based slingshot adventure � get ready to get fierce!

--------------

- PLAY OVER 120 LEVELS! Slingshot your way through the treetops of Golden Island!
- MEET THE FIERCE FLOCK! Six fun birds with unique personalities!
- MASTER THE MOVES! New kick-ass superpowers � tap and hold to target attacks!
- STOP BAD PRINCESS! Her pesky piggies are wreaking havoc across the island!
- COMPLETE YOUR SCRAPBOOK! Collect pics and wacky outfits to use in the game!
- SEE FRIENDS� SCORES! Then try to beat them! (but don�t fall out!)
- SCAN YOUR TELEPODS! Bring extra-special birds into the game!
- ENJOY LUSH GRAPHICS! Vivid visuals that put the �gold� in Golden Island!

Whats New
We addressed some minor issues in order to improve the user experience. Thanks for playing, and keep popping those pigs!


visit link download
Read more »

Solar Power City Inspection

Solar Power City Inspection


We passed last week (we live outside the city, so it was actually Santa Clara County), and how have another 12 days for PG&E to put in a new time-of-use power meter and bless the installation so we can turn it on.

It took a bit of prodding for SolarCity to get the inspections setup, at least thats the way it seemed. After the install, they sent me an email saying please pay the invoice, but they hadnt sent me an invoice. I waited a few days then asked them if they were going to send me one, then they sent it. After they get paid they are supposed to schedule the inspection. They say it can take a month or so to complete the inspections. After a week or two I emailed and asked when the inspection might happen, and a few days later it was scheduled for the following week. They sent someone to wait at my house for the inspector, so we didnt need to be there, other than making sure they had access to the basement where the inverter is installed.

The ground source heat pump is taking a bit longer than hoped. The supplies have been hard to source on the West Coast, it seems that there are relatively few GSHP installations in California so far. Im hoping to get the detailed planning approval and install done in the coming week.

visit link download
Read more »