?
Current Path : /home1/savoy/www/savoyglobal.net/drafthr/system/application/views/Settings/ |
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/www/savoyglobal.net/drafthr/system/application/views/Settings/reminderpage.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <script type="text/javascript"> function add_remind(rwd) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#viewReminder").load("<?= site_url('settings/addremindpage/') ?>"); } }); } function delremind(rwd,table, field,pageno) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#viewReminder").load("<?= site_url('settings/deletereminder/') ?>" +"/" +table + "/" + field+ "/" + pageno,function(){ viewremind(pageno,field,""); }); } }); } function editremind(rwd,field,pageno,field1,text) { $("#ck_permission").load("<?= site_url('master/check_permissions/') ?>"+"/"+rwd,function(data) { if(data==1) { $("#viewReminder").load("<?= site_url('settings/Get_editreminder_data/') ?>" +"/" + field + "/" + pageno+"/" + field1 + "/" + text); } }); } function viewremind(pageno,field,text) { $("#viewReminder").load("<?= site_url('settings/viewremind/') ?>" +"/" + pageno + "/"+field+"/"+text); } function Insert_Reminder_details() { var RemName=document.getElementById('remind-name').value ; var RemDate=document.getElementById('inputDate').value ; var Description=document.getElementById('description').value ; var numbefore=document.getElementById('numbefore').value ; if(isNaN(numbefore)) { alert('Enter only integer in date before Field') return false; } else { if(validateform('description','remind-name')) { $.post("<?php echo site_url('settings/insertreminder/'); ?>", { 'remname':RemName,'remdt':RemDate,'desc':Description,'numbef':numbefore }, function(data) { alert(data); showreminder(1,'remind_name',''); // RemName=document.getElementById('remind-name').value=""; // RemDate=document.getElementById('inputDate').value="<?php echo date('d-m-Y'); ?>" // Description=document.getElementById('description').value="" ; // numbefore=document.getElementById('numbefore').value="" ; }); } } } function searchreminder(pageno,serctext,seloption) { serctext = serctext.replace(/ /g,"~"); serctext = serctext.replace(/\//g,"_"); $("#viewReminder").empty().html('<CENTER><img src="<?=base_url()?>/assets/images/loading.gif" class="loading"/></CENTER>'); $('#viewReminder').load("<?php echo site_url('settings/viewremind/'); ?>/"+pageno + "/" + seloption + "/" +serctext ); } </script> <div class="select-bar"> <label> <img src="<?=base_url()?>/assets/images/add-icon.png" title="Add New" class="clickimage" onclick="add_remind(1)" alt="Add New" align = "top" width="25" height="25" /></label> <label> Search For <input type="text" name="search" id="search" style="background-image: none;"> in <select id ="selectsearch" name="selectsearch"> <option value="all">All</option> <option value="remind_name">Subject</option> <option value="remind_date">Date</option> </select> </label> <label for="submit"> <button type="submit" class="clickimage" id="submit" onclick="searchreminder(<?php echo $currpage;?>,document.getElementById('search').value,document.getElementById('selectsearch').value);">Search</button></label> </div> <fieldset><legend>View All Reminders</legend> <table class="sort"> <caption>Reminders</caption> <tr> <th width="10%">Sl No.</th> <th width="20%">Subject</th> <th width="25">Description</th> <th width="15%">Date</th> <th width="15%">Show before</th> <th width="15%">Action</th> </tr> <?php $i=(($currpage-1) * 10); foreach ($remlist as $remind) { $i=$i+1; $remind_dat = $this->mastermodel->convdatformat($remind['remind_date']); echo "<tr><td>".$i."</td><td>".$remind['remind_name']."</td><td>".$remind['description']."</td><td>".$remind_dat."</td><td>".$remind['beforedt']."</td><td>"; ?> <img src="<?=base_url()?>/assets/images/edit-icon.gif" id="editRem" title="Edit" width="20" height="20" alt="Edit" align = "center" onclick="editremind(1,<?=$remind['id']?>,<?php echo $currpage ?>,'<?=$field1 ?>','<?=$text ?>');" class="clickimage" /> <img src="<?=base_url()?>/assets/images/delete-icon.png" title="Delete" width="20" height="20" alt="Delete" class="clickimage" onclick="return confirm('Are you sure want to delete this record?'),delremind(2,'reminder',<?=$remind['id']?>,<?php echo $currpage ?>);" align = "center"/> <?php echo "</td></tr>"; } ?> </table> </fieldset> <div style="width:75%; height:30px; float:right;"> <ul> <li class="pagsel" onclick="viewremind('1','<?=$field1 ?>','<?=$text ?>')"> <img src="<?php echo base_url() ?>/assets/images/first.gif"/> </li> <li class="pagsel" <?php if($currpage>0){ ?> onclick="viewremind('<?php echo $currpage-1 ?>','<?=$field1 ?>','<?=$text ?>')" <?php } ?> > <img src="<?php echo base_url() ?>/assets/images/prev.gif"/> </li> <?php $totpage=ceil($totrecord/10); $arr= $this->settingsmodel->getmaxminlist($currpage,$totpage,4); $myarray=$arr['listnos']; for($i=$myarray[0]; $i<=$myarray[1]; $i++) { if($currpage==$i ) { ?> <li class="pagsel"> <?php echo $i ?></li> <?php } else { ?> <li class="pag" onclick="viewremind('<?php echo $i ?>','<?=$field1 ?>','<?=$text ?>')"> <?php echo $i ?></li> <?php } } ?> <li class="pagsel" <?php if($currpage<$totpage){ ?> onclick="viewremind('<?php echo $currpage+1 ?>','<?=$field1 ?>','<?=$text ?>')"<?php } ?>> <img style="vertical-align:top" src="<?php echo base_url() ?>/assets/images/next.gif"/> </li> <li class="pagsel" onclick="viewremind('<?php echo $totpage ?>','<?=$field1 ?>','<?=$text ?>')"><img src="<?php echo base_url() ?>/assets/images/last.gif"/> </li> </ul> </div>