Chirurgia cranio-cerebrală minim invazivă
Tehnicile minim invazive impun utilizarea unei tehnologii ultramoderne. Endoscoapele operatorii de diverse tipuri, microscopul operator dedicat, neuronavigația, neuroelectrofiziologia, tehnicile avansate de anestezie, chirurgia cu pacientul treaz reprezintă armamentarium fără de care neurochirurgia prin "gaura cheii" nu ar fi posibilă. Folosind tehnicile de mai sus, tratăm un spectru larg de patologii cranio-cerebrale. www.neurohope.ro |
Google ical upcoming event list
Last Updated: Oct 26 2019 10:57, Started by
razvanh255
, Sep 07 2019 21:37
·
0
#1
Posted 07 September 2019 - 21:37
Salutare la toata lumea!
As vrea sa pun intr-un iframe pe site-ul propriu o lista cu evenimentele viitoare, personale si publice din Google calendar sub forma de lista, cu denumirea evenimentului si data. Am gasit ceva de genul: <?php class ics { /* Function is to get all the contents from ics and explode all the datas according to the events and its sections */ function getIcsEventsAsArray($file) { $icalString = file_get_contents ( $file ); $icsDates = array (); /* Explode the ICs Data to get datas as array according to string ‘BEGIN:’ */ $icsData = explode ( "BEGIN:", $icalString ); /* Iterating the icsData value to make all the start end dates as sub array */ foreach ( $icsData as $key => $value ) { $icsDatesMeta [$key] = explode ( "\n", $value ); } /* Itearting the Ics Meta Value */ foreach ( $icsDatesMeta as $key => $value ) { foreach ( $value as $subKey => $subValue ) { /* to get ics events in proper order */ $icsDates = $this->getICSDates ( $key, $subKey, $subValue, $icsDates ); } } return $icsDates; } /* funcion is to avaid the elements wich is not having the proper start, end and summary informations */ function getICSDates($key, $subKey, $subValue, $icsDates) { if ($key != 0 && $subKey == 0) { $icsDates [$key] ["BEGIN"] = $subValue; } else { $subValueArr = explode ( ":", $subValue, 2 ); if (isset ( $subValueArr [1] )) { $icsDates [$key] [$subValueArr [0]] = $subValueArr [1]; } } return $icsDates; } } /* Replace the URL / file path with the .ics url De preferat mai multe link-uri */ $file = "https://calendar.google.com/calendar/ical/ro.romanian%23holiday%40group.v.calendar.google.com/public/basic.ics"; /* Getting events from isc file */ $obj = new ics(); $icsEvents = $obj->getIcsEventsAsArray( $file ); /* Here we are getting the timezone to get the event dates according to gio location */ $timeZone = trim ( $icsEvents [1] ['X-WR-TIMEZONE'] ); unset( $icsEvents [1] ); $html = '<table><tr><td> Event </td><td> Start at </td><td> End at </td></tr>'; foreach( $icsEvents as $icsEvent){ /* Getting start date and time */ $start = isset( $icsEvent ['DTSTART;VALUE=DATE'] ) ? $icsEvent ['DTSTART;VALUE=DATE'] : $icsEvent ['DTSTART']; /* Converting to datetime and apply the timezone to get proper date time */ $startDt = new DateTime ( $start ); $startDt->setTimeZone ( new DateTimezone ( $timeZone ) ); $startDate = $startDt->format ( 'm/d/Y h:i' ); /* Getting end date with time */ $end = isset( $icsEvent ['DTEND;VALUE=DATE'] ) ? $icsEvent ['DTEND;VALUE=DATE'] : $icsEvent ['DTEND']; $endDt = new DateTime ( $end ); $endDate = $endDt->format ( 'm/d/Y h:i' ); /* Getting the name of event */ $eventName = $icsEvent['SUMMARY']; $html .= '<tr><td>'.$eventName.'</td><td>'.$startDate.'</td><td>'.$endDate.'</td></tr>'; } echo $html.'</table>'; ?> rezultatul este: insa as vrea sa obtin ceva de genul urmator, evident cu class-e pentru stilizare in css: (facand abstractie de datele eronate) Cam acelasi lucru vreau sa-l fac si pentru stiri rss. Multumesc pentru orice ajutor! Attached Files |
#3
Posted 26 October 2019 - 05:43
Gratis nu, vino cu o oferta consistenta si vei primi solutia tehnica
Nu mai folosi doar cod scris de altii.Exemplele puse sunt pt a te insipira si a nu le da copy and paste. Daca iti vine un audit de software , nu te vad bine deloc. |
#4
Posted 26 October 2019 - 10:57
Anunturi
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users