Code Monkey home page Code Monkey logo

Comments (7)

woottonn avatar woottonn commented on July 30, 2024 1

Hi pakoArtal.

This is the code I used, quite simply really..

// PREPARE THE STATEMENT
$i = 0;
$stmt_meetings = mysqli_query($conn, $sql_meetings);

if($stmt_meetings === false) {
trigger_error('Wrong SQL: ' . $sql_meetings . ' Error: ' .
$conn->error, E_USER_ERROR);
exit();
}

while ($meetings_row = mysqli_fetch_array($stmt_meetings)) {

// CHECK TO SEE IF THERE ARE MULITPLE MEETINGS ON THIS DATE
$sql_meetings_multiple = "SELECT * FROM meetings WHERE DATE(date_from)
= DATE('" . date("Y-m-d", strtotime($meetings_row['date_from'])) . "')
AND $access_levels";

// PREPARE THE STATEMENT
$stmt_meetings_multiple = mysqli_query($conn, $sql_meetings_multiple);

if(mysqli_num_rows($stmt_meetings_multiple) > 1){

// PUT MEETINGS INTO ARRAY IF THERE ARE MULTIPLE MEETINGS
while ($meetings_multiple_row =
mysqli_fetch_array($stmt_meetings_multiple)) {
$multiple_meetings_title = $multiple_meetings_title . '

' .
stripslashes($meetings_multiple_row['title']) . '
Open
';
}

$date = date("Y-m-d", strtotime($meetings_row['date_from']));
$dates[$i] = array(
 'date' => $date,
 'badge' => true,
 'title' => 'Multiple Meetings',
 'body' => '
 <p class="lead">There are multiple meetings on this date</p>' . 

stripslashes($multiple_meetings_title) . '
',
'footer' => '
Close
<a href="MEETINGS_view.php?meetings_view_date_from=' .
date("Y-m-d", strtotime($meetings_row['date_from'])) .
'&today_only=1">

Show All

',
);

// ELSE IF THERE IS ONLY ONE MEETING
}else{

$date = date("Y-m-d", strtotime($meetings_row['date_from']));
$dates[$i] = array(
 'date' => $date,
 'badge' => false,
 'title' => stripslashes($meetings_row['title']) . " - [ " . 

date("H:i", strtotime($meetings_row['date_from'])) . " ]",
'body' => '

' . stripslashes($meetings_row['description']) .
'


',
'footer' => '
Close
Proceed to Meeting

',
);

}
unset($multiple_meetings_title);
$i++;

 }

 echo json_encode($dates);

} else {
echo json_encode(array());
}

.

from calendar.

MartinBodocky avatar MartinBodocky commented on July 30, 2024

Hello Nick,

Thanks for your message, Unfortunately I haven't designed this calendar I have planned to do some changes especially with events, but I didn't.

You can try to contact creator of project here:
https://github.com/zabuto

if there is no response, drop me message again and we will see what we can do :)

Best,

Martin

from calendar.

woottonn avatar woottonn commented on July 30, 2024

Oh, sorry Martin don't know how That happened!

I did a good workaround in the end anyways. Just made the modal list events on that particular day instead of showing just one event

Cheers!

Nick

MartinBodocky [email protected] wrote:

Hello Nick,

Thanks for your message, Unfortunately I haven't designed this calendar
I have planned to do some changes especially with events, but I didn't.

You can try to contact creator of project here:
https://github.com/zabuto

if there is no response, drop me message again and we will see what we
can do :)

Best,

Martin


Reply to this email directly or view it on GitHub:
#1 (comment)

Sent from my Android device with Gmail Plus. Please excuse my brevity.

This e-mail and any attachments may contain confidential and/or privileged
material; it is for the intended addressee(s) only. If you are not a named
addressee, you must not use, retain or disclose such information. The
Streetly Academy cannot guarantee that the email or attachments are free
from viruses.
The Streetly Academy, Registered Address Queslett Road East, Sutton
Coldfield, West Midlands, B74 2EX. Registered in England and Wales.
Registered No. 07841414

from calendar.

pakoArtal avatar pakoArtal commented on July 30, 2024

Hi Nick,
could you explain how did you make the modal list events?

Thank you!

from calendar.

pakito1972 avatar pakito1972 commented on July 30, 2024

Thank you woottonn !

from calendar.

zabuto avatar zabuto commented on July 30, 2024

Server side solution to the problem. Nice stuff!

from calendar.

CamaroMan avatar CamaroMan commented on July 30, 2024

hi - is there a way to update the calendar every x seconds? ie i have linked it to a booking system, and it only displays the changes if i refresh the page.. even clicking to a new month and back doesnt update it. I am loading this through a bootstrap modal. Otherwise thanks for a cool little app -

:p

from calendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.