encrypted messenger php

Sent Page Encrypted Messenger PHP

Sent Page

Encrypted Messenger PHP


Create a file named index.php


<?php
function secured_error () { die("Secured By Omid Bahrami"); }
set_error_handler("secured_error");

require '../secured/secured-structure.php';
require '../secured/secured-database.php';
require '../secured/secured-encryption.php';

session_start();
gns_check_https();

if(!isset($_SESSION["secured"]))
header('location:../sign-in/');

$e1=FALSE;

if(isset($_GET["secured"]))
{

$xix=gns_decode_invisible($_GET["secured"]);
$xux=gns_hash_fix($_SESSION["secured"]);

gns_delete_sent($xix,$xux);
$e1=TRUE;

}

$xux=gns_hash_fix($_SESSION["secured"]);
$xrx=gns_get_sent($xux);
$xnx=$xrx->num_rows;

?>
<?php
$t=$_SESSION["secured"];
gns_head_pro($t);
?>
<div class="jumbotron">
<?php

if ($e1)
echo '<p class="text-primary text-center"> Message Has Been Deleted </p>';

else if ($xnx==0)
echo '<p class="text-primary text-center"> No Messages In Sent </p>';

else
gns_welcome("Sent");

?>
</div>
<?php

if ($xnx!=0)
echo '<div class="row">';

for($i=0;$i<$xnx;$i++)
{
$xcx=$xrx->fetch_assoc();

echo
'<div class="col-md-6">
<div class="jumbotron">
<table class="table table-condensed">
<tbody>
<tr class="active">
<td width="50%">'.gns_decode($xcx["xtaker"]).'</td>
<td width="50%">'.gns_decode($xcx["subject"]).'</td>
</tr>
<tr class="active">
<td colspan="2">'.gns_decode($xcx["text"]).'</td>
</tr>
<tr class="active">
<td>'.date(" d-F ",gns_decode($xcx["time"])).'</td>
<td>
<a href="?secured='.gns_encode_invisible($xcx["id"]).'"> Delete </a> </td>
</tr>
</tbody>
</table>
</div>
</div>';

}

if ($xnx!=0)
echo '</div>';

?>
<?php gns_foot(); ?>

Full structure is available at Encrypted Messenger PHP