Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.116.118.214
<?php include("phpscript/sys_session.php"); ?>
<!DOCTYPE html>
<head>
<link rel="shortcut icon" type="image/x-icon" href="images/logisys-icon.png" />
<link rel="stylesheet" type="text/css" href="style.css" />
<script src="datepicker/grid/js/jquery.min.js" type="text/javascript"></script>
<script src="datepicker/grid/js/themes/jquery-ui.custom.min.js" type="text/javascript"></script>
<script src="jscript/main.js" type="text/javascript"></script>
<SCRIPT TYPE="text/javascript">
$(function(){$( "#txtremndate" ).datepicker({ dateFormat: "yy-mm-dd" });});
$(document).ready(function(){
$("#outbox_panel").hide("");
$("#inbox").click(function(){
$("#inbox").attr("class","tabs_top_load");
$("#outbox").attr("class","tabs_top_unload");
$("#inbox_panel").show();
$("#outbox_panel").hide();
});
$("#outbox").click(function(){
$("#inbox").attr("class","tabs_top_unload");
$("#outbox").attr("class","tabs_top_load");
$("#inbox_panel").hide();
$("#outbox_panel").show();
});
});
</script>
</head>
<body>
<?php
include("header.php");
include("sys_modules.php");
get_page_info(basename($_SERVER['PHP_SELF']));
@$page_mode="";
?>
<form name="<?php echo @$link_name; ?>" id="<?php echo @$link_name; ?>" action="<?php echo @$link_path; ?>" method="post" >
<div id="page-middle">
<div class="page-container-head">
<div id="page-container-titl"><?php echo @$page_mode." ".@$link_tit;?></div>
<div id="page-container-link"><?php echo @$link_but;?></div>
</div>
<div id="page-container-body">
<div class="head_white" style="text-align:left; padding:0px 0px;">
<a id="inbox" class="tabs_top_load" href="#">Inbox</a>
<a id="outbox" class="tabs_top_unload" href="#">Outbox</a>
</div>
<div id="inbox_panel" class="tabs_content">
<?php
include("mysql_db_connect.php");
$evnt_date=date('Y-m-d');
$mysql="select * from reminders where fremnuser='$user_id' and fremntype='inbox' order by fstrtdate desc,fstopdate desc, fremncode desc";
$myres=mysqli_query($mycon,$mysql);
$mycnt=mysqli_num_rows($myres);
if ($mycnt!=0)
{
echo "<table class=table_grid border=1 bgcolor=#FFFFFF>";
echo "<tr>";
echo "<th> # </th>";
echo "<th> Date </th>";
echo "<th> Create by</th>";
echo "<th> Description </th>";
echo "<th> Start date </th>";
echo "<th> Stop date </th>";
echo "<th> <input type=checkbox id=CheckAll name=CheckAll onClick='check_all(document.". $link_name .")'/></th>";
echo "</tr>";
}
else
{
echo "<div class=head_white>Inbox empty!</div>";
}
$i=1;
while($row = @mysqli_fetch_assoc($myres))
{
if(strtoupper($row['fremnmark'])=="READ")
{$classname="message_unread";}
else
{$classname="message_read";}
echo "<tr class=$classname ondblClick=window.location='reminders_save.php?id=$row[fremncode]'>";
echo "<td width=4% align=center>$i</td>";
echo "<td width=10% align=center>$row[fremndate]</td>";
echo "<td width=15% align=left>$row[fusercode]</td>";
echo "<td width=40% align=left>$row[fremntext]</td>";
echo "<td width=10% align=center>$row[fstrtdate]</td>";
echo "<td width=10% align=center>$row[fstopdate]</td>";
// echo "<td width=10% align=center>";
// echo "<button type=submit id=mark name=mark class=button value=$row[fremncode] style=width:60px;>$row[fremnmark]</button>";
// echo "</td>";
// echo "<td width=10% align=center>";
// echo "<button type=submit id=stop name=stop class=button value=$row[fremncode] style=width:60px;>$row[fremnstop]</button>";
// echo "</td>";
echo "<td width=3% align=center>";
echo "<input type=checkbox name=check_list[] id=check_list[] value=$row[fremncode]>";
echo "</td>";
echo "</tr>";
$i++;
}
if ($mycnt!=0)
{
echo "</table>";
}
?>
</div>
<div id="outbox_panel" class="tabs_content">
<?php
include("mysql_db_connect.php");
$evnt_date=date('Y-m-d');
$mysql="select * from reminders where fremnuser='$user_id' and fremntype='outbox' order by fremncode desc";
$myres=mysqli_query($mycon,$mysql);
$mycnt=mysqli_num_rows($myres);
if ($mycnt!=0)
{
echo "<table class=table_grid border=1 bgcolor=#FFFFFF>";
echo "<tr>";
echo "<th> # </th>";
echo "<th> Date </th>";
echo "<th> Create by</th>";
echo "<th> Description </th>";
echo "<th> Start date </th>";
echo "<th> Stop date </th>";
echo "<th> <input type=checkbox id=CheckAll name=CheckAll onClick='check_all(document.". $link_name .")'/></th>";
echo "</tr>";
}
else
{
echo "<div class=head_white>Outbox empty!</div>";
}
$i=1;
while($row = @mysqli_fetch_assoc($myres))
{
if(strtoupper($row['fremnmark'])=="READ")
{$classname="message_unread";}
else
{$classname="message_read";}
echo "<tr class=$classname ondblClick=window.location='reminders_save.php?id=$row[fremncode]'>";
echo "<td width=4% align=center>$i</td>";
echo "<td width=10% align=center>$row[fremndate]</td>";
echo "<td width=15% align=left>$row[fusercode]</td>";
echo "<td width=40% align=left>$row[fremntext]</td>";
echo "<td width=10% align=center>$row[fstrtdate]</td>";
echo "<td width=10% align=center>$row[fstopdate]</td>";
// echo "<td width=10% align=center>";
// echo "<button type=submit id=mark name=mark class=button value=$row[fremncode] style=width:60px;>$row[fremnmark]</button>";
// echo "</td>";
// echo "<td width=10% align=center>";
// echo "<button type=submit id=stop name=stop class=button value=$row[fremncode] style=width:60px;>$row[fremnstop]</button>";
// echo "</td>";
echo "<td width=3% align=center>";
echo "<input type=checkbox name=check_list[] id=check_list[] value=$row[fremncode]>";
echo "</td>";
echo "</tr>";
$i++;
}
if ($mycnt!=0)
{
echo "</table>";
}
?>
</div>
</div>
</div>
</form>
</body>
</html>
<?php
if(isset($_POST['del']))
{//check to see if the delete button has been pressed
if(!isset($_POST['check_list'])){exit();}
if(isset($_POST['check_list'])){ //check to see if any boxes have been checked
$num = 0;//used to count the number of rows that were deleted
$box = $_POST['check_list'];
while (list ($key,$val) = @each ($box))
{ //loop through all the checkboxes
$num++;
include("mysql_db_connect.php");
$mysqldel="delete from reminders where fremncode='$val'";//delete any that match id
$resdel=mysqli_query($mycon,$mysqldel);//send the query to mysql
}
if ($num>0)
{
//print the logs that were deleted
echo("<script language=\"JavaScript\" type=\"text/JavaScript\">\n");
echo("alert(\"$num\"+' reminder deleted!');\n");
echo("</script>\n");
echo "<meta http-equiv=\"refresh\" content=\"0;URL=reminders.php\">";
}
}
unset($_POST['del']);
}
elseif(isset($_POST['mark']))
{
$remn_code=@$_POST['mark'];
include("mysql_db_connect.php");
$mysql="update reminders set fremnmark= case when fremnmark='Read' then 'Unread' when fremnmark='Unread' then 'Read' else 'Read' end where fremncode='$remn_code'";
$myres=mysqli_query($mycon,$mysql);
echo "<meta http-equiv=\"refresh\" content=\"0;URL=reminders.php\">";
unset($_POST['mark']);
}
elseif(isset($_POST['stop']))
{
$remn_code=@$_POST['stop'];
include("mysql_db_connect.php");
$mysql="update reminders set fstopdate='$evnt_date', fremnstop= case when fremnstop='Start' then 'Stop' when fremnstop='Stop' then 'Start' else 'Stop' end where fremncode='$remn_code'";
$myres=mysqli_query($mycon,$mysql);
echo "<meta http-equiv=\"refresh\" content=\"0;URL=reminders.php\">";
unset($_POST['stop']);
}
?>
|