0xV3NOMx
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.191.37.129


Current Path : /proc/thread-self/root/var/www/misc/public_html/oums_old/
Upload File :
Current File : //proc/thread-self/root/var/www/misc/public_html/oums_old/messages.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" />
</head>
<center>
<body>
	<?php
		include("header.php") 
	?>
	<div id="page-middle">
		<div class="page_content_outer">
			<FORM id="messages" name="messages" method="post" action="messages.php">				
			<div class="page-container-head">
				<div id="page-container-titl">
					Messages
				</div>

				<div id="page-container-link"> 
				</div>				
			</div>				
			<div id="page-container-body">
				<div id="page-container-grid">
					<table width="100%" border="1">
						<tr>
							<th> # </th>
							<th> Date </th>
							<th> User ID </th>							
							<th> Message </th>
							<th> Status </th>								
							<th> Action </th>																
							<th> <input type="checkbox" id="CheckAll" name="CheckAll" onClick="check_all(document.messages)"/></th>																
						</tr>
						<?php
						include("mysql_db_connect.php");
						$mysql="select * from messages order by fmesscode";
						$myres=mysqli_query($mycon,$mysql);
						$i=0;
						while($row = @mysqli_fetch_assoc($myres))
						{
						if($i%2==0)
						$classname="evenRow";
						else
						$classname="oddRow";
						
						?>
						<tr class="<?php if(isset($classname)) echo $classname;?>" ondblClick="window.location='messages_save.php?id=<?php echo $row["ftrancode"];?>'">
						<td width="4%" align="center"> <?php echo $i+1; ?> </td>							
						<td width="10%" align="center"><?php echo substr($row["fmessdate"],0,10); ?></td>						
						<td width="10%" align="center"><?php echo $row["fusername"]; ?></td>
						<td width="40%" align="left"><?php echo substr($row["fmesstext"],0,50); ?></td>							
						<td width="8%" align="center"><?php echo $row["fmessstat"]; ?></td>							
												
						<td width="20%" align="center">
							<select id="txtclntid"  name="txtclntid" style="width:100%;">						
								<option value="0">-Select-</option>
								<?php
								$mysql1="select * from masaction order by factndesc";
								$myres1=mysqli_query($mycon,$mysql1);
								$i=0;
								while($row1 = @mysqli_fetch_assoc($myres1))
								{
								?>
								<option value="<?php echo $row1["factndesc"]; ?>"><?php echo $row1["factndesc"];?></option>						
								<?php
								}
								?>
							</select> 						
						</td>
						
						<td width="4%" align="center"><input type="checkbox" name="check_list[]" id="check_list[]" value="<?php echo $row["ftrancode"]; ?>"></td>														
						</tr>
						<?php
						$i++;
						}
						?>
						<tr>
							<td class="grid_footer" colspan="8" style="text-align:right;"> Total : <?php echo "$i"; ?> </td>
						</tr>
						<?php
						mysqli_close($mycon);			
						?>
					</table>
				</form>						
				</div>	
			</div>
		</div>
	</div>
</body>
</center>
</html> 
<?php
if(isset($_POST['delete'])){//check to see if the delete button has been pressed
  	include("mysql_db_connect.php");   
    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
			if (strtoupper($val)=="LSYS")
			{
			echo("<script language=\"JavaScript\" type=\"text/JavaScript\">\n");
			echo("alert('LSYS cannot be deleted!');\n");
			echo("</script>\n");						  	
			}
			else
			{
			$num++;
			$mysqldel="delete from masclnt where fclntcode='$val' and fclntcode<>'LSYS' and fclntcode<>'$clnt_id'";//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 "<meta http-equiv=\"refresh\" content=\"0;URL=clients.php\">";
		echo("<script language=\"JavaScript\" type=\"text/JavaScript\">\n");
		echo("alert(\"$num\"+' client deleted!');\n");
		echo("</script>\n");			
		}
   }
   else
   {//no boxes checked
		echo("<script language=\"JavaScript\" type=\"text/JavaScript\">\n");
		echo("alert('No client selected!');\n");
		echo("</script>\n");			
   }
}
?>