?
Current Path : /home1/savoy/public_html/savoyglobal.net/sgms/draft/application/views/Training/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/sgms/draft/application/views/Training/view_calendar.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?> <link media="screen" rel="stylesheet" type="text/css" href="<?=base_url()?>assets/css/fullcalendar.css" /> <script type='text/javascript' src='<?=base_url()?>assets/js/jquery-ui-1.8.6.custom.min.js'></script> <script type='text/javascript' src='<?=base_url()?>assets/js/fullcalendar.min.js'></script> <div class="select-bar"> <label> <img src="<?=base_url()?>assets/images/add-icon.png" title="Add New" class="clickimage" onclick="addformdisplay('add_event','Training')" alt="Add New" align = "center" width="25" height="25" /> <img src="<?=base_url()?>assets/images/view_detail.png" title="View all events" class="clickimage" onclick="viewdata('training','viewintrainingsearch','search_calendar','view_event','<?=$_SESSION['pagenum'];?>')" alt="Back" align = "center" width="25" height="25" /> </label> </div> <div id="searchdiv"> <?php $attributes=array('id'=>'searchvalidateform','class'=>'customForm'); echo form_open('training/viewintrainingsearch/search_calendar/view_event/1',$attributes); if(isset($_SESSION['searchdata'])) { $searchdata=$_SESSION['searchdata']; if(!empty($searchdata)) { $searchtext=$searchdata['searchtext']; $searchfield=$searchdata['searchopt']; } else { $searchtext = ""; $searchfield = ""; } } else { $searchtext = ""; $searchfield = ""; } ?> Search For <input type="text" name="searchtext" id="searchtext" value="<?=$searchtext;?>"> In <select name="searchopt" id="searchopt"> <option value="event_title">Select</option> <option <?php if ($searchfield == "event_title") echo "selected"; ?> value="event_title">Event Title</option> <option <?php if ($searchfield == "trainer_name") echo "selected"; ?> value="trainer_name">Event Trainer</option> <option <?php if ($searchfield == "event_start_date") echo "selected"; ?> value="event_start_date">Start Date</option> <option <?php if ($searchfield == "event_end_date") echo "selected"; ?> value="event_end_date">End Date</option> <option <?php if ($searchfield == "event_location") echo "selected"; ?> value="event_location">Location</option> </select> <input type="submit" id="button1" onclick="addformdata('searchvalidateform')" class="clickimage" value="Search"/> <?php echo form_close(); ?> </div> <script type='text/javascript'> (function() { Date.prototype.toYMD = Date_toYMD; function Date_toYMD() { var year, month, day; year = String(this.getFullYear()); month = String(this.getMonth() + 1); if (month.length == 1) { month = "0" + month; } day = String(this.getDate()); if (day.length == 1) { day = "0" + day; } return year + "-" + month + "-" + day; } })(); $(document).ready(function() { var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); var calendar = $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, selectable: true, selectHelper: true, select: function(start, end, allDay) { var title = prompt('Event Title:'); if (title) { calendar.fullCalendar('renderEvent', { title: title, start: start, end: end, allDay: allDay }, true // make the event "stick" ); var dt = new Date(start); var str = dt.toYMD(); var dtend = new Date(end); var strend = dtend.toYMD(); var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("Your browser broke!"); return false; } } } url = "<?= site_url('training/insertevent/') ?>/" +title+'/'+str+'/'+strend; ajaxRequest.open("GET",url, true); ajaxRequest.send(null); // Create a function that will receive data sent from the server ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4){ } } } calendar.fullCalendar('unselect'); }, editable: true, events: [ <?php if ($viewinfo->num_rows() > 0) { foreach ($viewinfo->result() as $row) { ?> { title: '<?=$row->event_title;?>', start: '<?=$row->event_start_date;?>', end: '<?=$row->event_end_date;?>', eventid: '<?=$row->event_id;?>' }, <?php } } ?> ] }); }); function showeventcolorbox(id) { $("#eventdiv").load("<?= site_url('training/single_page')?>/"+id+"/calendar/event_id/single_event_calendar"); $(".inliexample2").colorbox({width:"65%",height:"65%", inline:true, href:"#eventdiv"}); } </script> <div id="calendar"> </div> <div id="eventdiv"> </div>