Файловый менеджер - Редактировать - /home/umudio/public_html/repo/listcalendar.php.tar
Назад
home/umudio/public_html/OLD/listcalendar.php 0000644 00000021261 14774443040 0015105 0 ustar 00 <?php if (!$_SESSION){ session_start(); } $acc=$_SESSION['acc']; $yto=$_SESSION['yto']; if(isset($acc) && ($acc=="administratoroftheUmuahiasiteDiocese2016Byto")){?> <?php include("Connecter/dataconn.php"); ?> <?php if (isset($_GET['deltab'])) { unset($temp); if(isset($_GET['deltab'])){ $_GET['deltab']=trim($_GET['deltab']); if(preg_match('/^[0-9]/u',$_GET['deltab'])){ settype($_GET['deltab'], 'int'); $temp=(int)$_GET['deltab']; } } if(!isset($temp)){echo "Sorry! Wrong Data!"; exit();} $deltab=$temp; $sql=sprintf("delete from calend where sn = %s", mysql_real_escape_string($deltab)); $result=mysql_query($sql,$csn) or die(mysql_error()); } if (isset($_GET['arhtab'])) { unset($temp); if(isset($_GET['arhtab'])){ $_GET['arhtab']=trim($_GET['arhtab']); if(preg_match('/^[0-9]/u',$_GET['arhtab'])){ settype($_GET['arhtab'], 'int'); $temp=(int)$_GET['arhtab']; } } if(!isset($temp)){echo "Sorry! Wrong Data!"; exit();} $deltab=$temp; $sql=sprintf("update calend set archived='Yes' where sn = %s", mysql_real_escape_string($deltab)); $result=mysql_query($sql,$csn) or die(mysql_error()); } if (isset($_GET['unarhtab'])) { unset($temp); if(isset($_GET['unarhtab'])){ $_GET['unarhtab']=trim($_GET['unarhtab']); if(preg_match('/^[0-9]/u',$_GET['unarhtab'])){ settype($_GET['unarhtab'], 'int'); $temp=(int)$_GET['unarhtab']; } } if(!isset($temp)){echo "Sorry! Wrong Data!"; exit();} $deltab=$temp; $sql=sprintf("update calend set archived='No' where sn = %s", mysql_real_escape_string($deltab)); $result=mysql_query($sql,$csn) or die(mysql_error()); } $query_dio1 = "SELECT sn, activity, archived, fromdate, todate, date_format(fromdate,'%Y-%b-%d') as fdate, date_format(todate,'%Y-%b-%d') as tdate FROM calend where archived='No' order by fromdate desc"; $dio1 = mysql_query($query_dio1, $csn) or die(mysql_error()); $row_dio1 = mysql_fetch_assoc($dio1); $totalRows_dio1 = mysql_num_rows($dio1); $query_dio = "SELECT sn, activity, archived, fromdate, todate, date_format(fromdate,'%Y-%b-%d') as fdate, date_format(todate,'%Y-%b-%d') as tdate FROM calend where archived='Yes' order by fromdate desc"; $dio = mysql_query($query_dio, $csn) or die(mysql_error()); $row_dio = mysql_fetch_assoc($dio); $totalRows_dio = mysql_num_rows($dio); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php include("head.php"); ?> <?php include("textare.php"); ?> <link rel="stylesheet" type="text/css" href="cal/dhtmlxcalendar.css"> <link rel="stylesheet" type="text/css" href="cal/skins/dhtmlxcalendar_dhx_web.css"> <script src="cal/dhtmlxcalendar.js"></script> <script> function doOnLoad() { var myCalendar = new dhtmlXCalendarObject(["fromdate"]); myCalendar.setSkin('dhx_web'); myCalendar.setWeekStartDay=7; myCalendar.setDateFormat("%Y-%m-%d"); myCalendar.hideTime(); if(document.getElementById('todate').value!=''){ myCalendar.setSensitiveRange(null,document.getElementById('todate').value); } var myCalendar2 = new dhtmlXCalendarObject(["todate"]); myCalendar2.setSkin('dhx_web'); myCalendar2.setWeekStartDay=7; myCalendar2.setDateFormat("%Y-%m-%d"); myCalendar2.hideTime(); myCalendar2.setSensitiveRange(document.getElementById('fromdate').value,null); } </script> <script type="text/javascript"> function yto(){ if(document.getElementById("Day").checked==true){ document.getElementById("dfirst").innerHTML="On"; document.getElementById("dsecond").style.visibility="hidden"; document.getElementById('todate').value=''; } if(document.getElementById("Range").checked==true){ document.getElementById("dfirst").innerHTML="From"; document.getElementById("dsecond").style.visibility="visible"; } } </script> </head> <body> <?php include("top.php"); ?> <?php include("titlebar.php"); ?> <?php include("mast.php"); ?> <?php include("navbar.php"); ?> <?php include("contenttop.php"); ?> <?php include("sidebar.php"); ?> <?php include("mainbartop.php"); ?> <!--Content Goes here--> <div class="headingbiggest">Upcoming Events…</div> <p class="headingbigger"><b>Add Activity</b></p> <form id="form1" name="form1" method="post" action="dadmin.php" enctype="multipart/form-data"> <table width="100%" cellpadding="1" cellspacing="2"> <tr valign="top"> <td style="font-weight:bold; text-align:center">Activity</td> <td align="left" ><input name="activity" type="text" size="70" /></td> </tr> <tr valign="top"> <td style="font-weight:bold; text-align:center"> </td> <td align="left"><?php $a=date('Y'); ?> <div style="height:10px;"> </div> <div> <input type="radio" name="YesNo" value="1" id="Day" onchange="yto()" onmouseup="yto()" onclick="yto()" ondblclick="yto()" /><b>Just a Day</b> <input type="radio" name="YesNo" value="2" id="Range" checked="checked" onchange="yto()" onmouseup="yto()" onclick="yto()" ondblclick="yto()" /><b>Range of Days</b></div> <span id="dfirst" style="font-weight:bold">From</span> <input name="fromdate" id="fromdate" type="text" size="18" readonly="readonly" value="<?php echo(date('Y-m-d')); ?>" onmousedown="doOnLoad();" /> <span id="dsecond"> <b>Till</b> <input name="todate" id="todate" type="text" size="18" readonly="readonly" value="<?php echo($a); ?><?php echo(date('-12-31')); ?>" onmousedown="doOnLoad();" /></span> </td> </tr> <tr valign="top"> <td style="font-weight:bold; text-align:center">Activity Details</td> <td align="left" ><textarea name="details" id="details" cols="70" rows="15"></textarea></td> </tr> <tr valign="top"> <td style="text-align:right; font-size:10px;" colspan="2"><br /><a href="dadmin.php">Cancel</a> <input name="addcal" type="submit" style="font-size:12px;" id="addcal" value=" Add Activity " /> </td> </tr> </table> </form> <hr /> <p class="headingbigger"><b>Existing Activities</b></p> <?php if ($totalRows_dio1>0) { ?> <table width="90%"> <?php do { ?><tr valign="top"> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio1['activity']; ?></td> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio1['fdate']; ?></td> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio1['tdate']; ?></td> <td style="border-bottom:1px solid #333333;"><a href="editcalendar.php?tab=<?php echo $row_dio1['sn']; ?>">Edit</a> | <a href="listcalendar.php?deltab=<?php echo $row_dio1['sn']; ?>">Delete</a> | <a href="listcalendar.php?arhtab=<?php echo $row_dio1['sn']; ?>">Archive</a> </td></tr> <?php } while ($row_dio1 = mysql_fetch_assoc($dio1)); ?> </table> <?php } else { echo ("None Found!"); } ?> <p class="headingbigger"><b>Archived Activities</b></p> <?php if ($totalRows_dio>0) { ?> <table width="90%"> <?php do { ?><tr valign="top"> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio['activity']; ?></td> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio['fdate']; ?></td> <td style="border-bottom:1px solid #333333;"><?php echo $row_dio['tdate']; ?></td> <td style="border-bottom:1px solid #333333;"> <a href="listcalendar.php?unarhtab=<?php echo $row_dio['sn']; ?>">UnArchive</a> </td></tr> <?php } while ($row_dio = mysql_fetch_assoc($dio)); ?> </table> <?php } else { echo ("None Found!"); } ?> <p><a href="dadmin.php">Back to Admin Page</a></p> <p> </p> <!--Content Ends here--> <?php include("mainbarbottom.php"); ?> <?php include("contentbottom.php"); ?> <?php include("footbar.php"); ?> <?php include("bottom.php"); ?> </body> </html> <?php } else { include("ddadmin.php"); }?>