|
|
|
|
Menu |
|
|
Home |
| |
|
Discussions |
| |
|
Tools |
| |
|
Affiliates |
| |
|
Content |
| |
|
Info |
| | |
|
|
|
|
|
User Info |
|
Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144
People Online:
Visitors: 100
Members: 0
Total: 100
|
|
|
|
|
|
Full disclosure |
|
|
|
|
|
|
|
|
|
IT Security and Insecurity Portal |
|
|
Please help me decode( |
|
Posted: Sun Sep 30, 2012 12:17 pm |
|
|
sarik1986 |
Regular user |
|
|
Joined: Jul 02, 2012 |
Posts: 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Posted: Sun Sep 30, 2012 12:47 pm |
|
|
demon |
Moderator |
|
|
Joined: Sep 22, 2010 |
Posts: 485 |
|
|
|
|
|
|
|
i think all files are the same ?
Code: | <?php
function main()
{
include("../conn.php");
include("../message.php");
$emailquery = mysql_query("select * from zw_websetting");
$emailfetch = mysql_fetch_array($emailquery);
$webname = $emailfetch['webname'];
$defaultcurrency = $emailfetch['currency'];
$userid = mysql_real_escape_string($_SESSION['userid']);
$page_record = mysql_real_escape_string($_REQUEST['page_record']);
$total_records = mysql_real_escape_string($_REQUEST['total_records']);
$pageno = mysql_real_escape_string($_REQUEST['pageno']);
$rs0 = mysql_fetch_array(mysql_query("select * from zw_websetting"));
$pagelimits = $rs0['rec_per_page'];
$records_per_page = $pagelimits;
if (isset($_REQUEST['cur_page'])) {
$page_num = $_REQUEST['cur_page'] + 1;
} else {
$page_num = $cur_page + 1;
}
$cur_page = $_REQUEST['cur_page'];
$str = mysql_query("select * from messages where to_user_id='{$userid}' order by sent_on desc");
$str_num = mysql_num_rows($str);
$query_data = mysql_fetch_array($str);
$total_num_page = ceil(mysql_num_rows($str) / $records_per_page);
if (empty($cur_page)) {
$cur_page = 0;
}
$limit_str = "LIMIT " . $cur_page * $records_per_page . ",{$records_per_page}";
if (!($inbox_messages = mysql_query("select * from messages where to_user_id='{$userid}' order by sent_on desc {$limit_str}"))) {
exit(mysql_error());
}
$num_rows = mysql_num_rows($inbox_messages);
echo "<div class=\"mainheading_mem\" style=\"margin-bottom:10px;\" align=\"left\">My Messages List »Inbox</div>\r\n<div style=\"float:right\"> ";
echo "<s";
echo "pan class=\"alink\"><a href=\"member_create_msg.php\">Create Message</a> ;; <a href=\"member_sent.php\">Sent</a></span></div>\r\n\r\n";
if (mysql_real_escape_string($_REQUEST['send']) == "msg_deleted") {
echo "<span class='messagesred'>Message deleted successfully</span>";
}
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"tbl_bdr\">\r\n<form action=\"member_inbox.php\" method=\"post\" name=\"member_inbox\" id=\"member_inbox\">\r\n<tr class=\"sde_mnu_hdr_blue\">\r\n<td width=\"9%\" height=\"32\" align=\"center\" valign=\"middle\" style=\"padding-left:5px;\">";
echo "<s";
echo "trong>S.No</strong></td>\r\n<td width=\"23%\" align=\"left\" valign=\"middle\" style=\"padding-left:5px;\">";
echo "<s";
echo "trong>Sender Name </strong></td>\r\n<td height=\"32\" align=\"center\" valign=\"middle\" style=\"padding-left:5px;\">";
echo "<s";
echo "trong>Sent Date </strong></td>\r\n<td height=\"29\" colspan=\"2\" align=\"left\" valign=\"middle\" style=\"padding-left:5px;\">";
echo "<s";
echo "trong>Subject</strong></td>\r\n<td height=\"29\" colspan=\"2\" align=\"center\" valign=\"middle\" style=\"padding-left:5px;\">";
echo "<s";
echo "pan style=\"padding-left:5px;\">";
echo "<s";
echo "trong>Action</strong></span></td>\r\n</tr>\r\n";
if ($num_rows != "0") {
$i = 0;
while ($fetch_msg = mysql_fetch_array($inbox_messages)) {
++$i;
if (!($user_name = mysql_fetch_array(mysql_query("select * from user_details where user_id='{$fetch_msg['from_user_id']}'")))) {
exit(mysql_error());
}
$date_time = explode(" ", $fetch_msg['sent_on']);
$date = $date_time[0];
$time = $date_time[1];
if ($date == date("Y-m-d")) {
$sent_on = $time;
} else {
$sent_on = $date;
}
echo "<tr>\r\n<td height=\"29\" align=\"center\" style=\"padding-left:5px;\">";
echo $i;
echo "</td>\r\n<td height=\"29\" style=\"padding-left:5px;\">";
echo "<s";
echo "pan class=\"alink\"><a href=\"inbox_details.php?msgid=";
echo $fetch_msg[id];
echo "\">";
echo $user_name['user_name'];
echo "</a></span></td>\r\n<td width=\"14%\" height=\"29\" align=\"center\" style=\"padding-left:5px;\">";
echo $sent_on;
echo "</td>\r\n<td height=\"29\" colspan=\"2\" align=\"left\" style=\"padding-left:5px;\">";
if ($fetch_msg['subject'] != "") {
echo $fetch_msg['subject'];
echo "....<a href=\"inbox_details.php?msgid=";
echo $fetch_msg[id];
echo "\">More</a>";
}
echo "</td>\r\n<td width=\"6%\" height=\"29\" align=\"center\" style=\"padding-left:5px;\"><a href=\"inbox_details.php?msgid=";
echo $fetch_msg[id];
echo "\"><img src=\"images/view.gif\" width=\"16\" height=\"16\" border=\"0\" title=\"Show\" /></a></td>\r\n<td width=\"6%\" align=\"center\" style=\"padding-left:5px;\"><a href=\"delete_inbox.php?msgid=";
echo $fetch_msg[id];
echo "\" onclick=\"javascript: return confirm('All the information related to this Member will be deleted.\\n\\nDo you really want to delete the Member?');\"><img src=\"images/del.gif\" width=\"16\" height=\"16\" border=\"0\" title=\"Delete\" /></a></td>\r\n</tr>\r\n";
}
}
echo "<tr>\r\n <td height=\"29\" colspan=\"9\" align=\"center\" valign=\"middle\">";
echo $no_mem_inbox;
echo "</td>\r\n</tr>\r\n";
echo "<tr>\r\n<td colspan=\"9\" align=\"center\" valign=\"middle\" style=\"padding-top:10px\">\r\n";
if ($pagelimits < $str_num) {
if (1 < $page_num) {
$prev_page = $cur_page - 1;
echo "<span class='alink'><a href='{$_SERVER['PHP_SELF']}?cur_page={$prev_page}'>Prev</a></span>";
echo " ;; ;;";
}
$j = 1;
$i = 0;
while ($i < $total_num_page) {
echo "<span class='alink'><a href='{$_SERVER['PHP_SELF']}?cur_page={$i}'>{$j}</a></span>";
++$j;
echo " ;; ;;";
++$i;
}
if ($page_num < $total_num_page) {
$next_page = $cur_page + 1;
$last_page = $total_num_page - 1;
echo "<span class='alink'>\r\n<a href='{$_SERVER['PHP_SELF']}?cur_page={$next_page}&&page_record=next&&total_records={$num}'>Next</a></span>";
echo " ;; ;;";
}
}
echo "\t\r\n</td>\r\n</tr>\r\n<tr>\r\n<td height=\"29\" colspan=\"9\" align=\"center\" valign=\"middle\" class=\"innertxt\"> ;;</td>\r\n</tr>\r\n</form>\r\n</table>\r\n\r\n";
}
session_start();
include_once("template1.php");
echo "\r\n";
?>
|
|
|
_________________ Go BIG or go HOME ! |
|
|
|
|
www.waraxe.us Forum Index -> Php
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
All times are GMT
Page 1 of 1
|
|
|
Powered by phpBB © 2001-2008 phpBB Group
|
|
|
|
|
|
|