<?
if ($akashaID == $ID) {
include ("includes/global.inc"); // Global Variables
include ("includes/functions.inc"); // Global Functions
include ("includes/head.inc"); // Standart Headers
include ("stylesheets/homestyle.inc"); // Stylesheets
if ($attached ==1) {
$dosyaadi = "$attach_dir$ID######msgbody.txt";
$msgbody = fread(fopen($dosyaadi, "r"), filesize($dosyaadi));
fclose($fp);
unlink("$dosyaadi");
} else {
$msgbody=stripslashes($msgbody);
$msgbody=rawurlencode($msgbody);
}
?>
<script language="JavaScript">
<!--
function submitonce(theform){
if (document.all||document.getElementById){
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
tempobj.disabled=true
}
}
}
//-->
</script>
<script language="JavaScript">
<!--
function loadframes() {
// var args=loadframes.arguments;
if (loadframes.arguments[2] == 1) {
parent.side.location = "navbar.php?ID="+loadframes.arguments[0];
parent.upper.location = "top2.php?ID="+loadframes.arguments[0];
}
}
//-->
</script>
</head>
<body onLoad="loadframes('<? echo $ID ?>','<? echo $giris ?>');" bgcolor='#FFFFFF' text='#000000' link='#3457A9' vlink='#3457A9' alink='#009966'>
<?
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0' height='200'>\n";
echo " <tr>\n";
echo " <td valign='top'>\n";
echo " <table width='100%' border='0' cellspacing='0' cellpadding='0'>\n";
echo " <tr bgcolor='#2B3D61'>\n";
$mailadress = getUserMailAdress($ID);
echo " <td><b><font color='#DCD7CB'><i>Folders</i></font></b></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <br>\n";
echo " <br>\n";
echo " <table width='550' border='0' cellspacing='1' cellpadding='0' align='center' bgcolor='#999999'>\n";
echo " <tr>\n";
echo " <td>\n";
echo " <table width='100%' border='0' cellspacing='1' cellpadding='1'>\n";
echo " <tr bgcolor='#DFDFDF'>\n";
echo " <td width='26%'><b><font color='#4E4E4E'>Folders</font></b></td>\n";
echo " <td width='33%'>\n";
echo " <div align='center'><b><font color='#4E4E4E'>Total Message Count</font></b></div>\n";
echo " </td>\n";
echo " <td width='41%' nowrap> </td>\n";
echo " </tr>\n";
echo " <tr bgcolor='#FFFFFF'>\n";
echo " <td width='26%'><a href='mailbox.php?ID=$ID&mbox_id=inbox'>Inbox</a></td>\n";
echo " <td width='33%'>\n";
$username = getUsername($ID);
$password = getPassword($ID);
$mbox = imap_open("{".$domain."/pop3:110}INBOX", "$username", "$password");
if ($mbox) {
$mboxstatus=imap_check($mbox);
$mesajsayisi=$mboxstatus->Nmsgs;
}
imap_close($mbox);
echo " <div align='center'>$mesajsayisi</div>\n";
echo " </td>\n";
echo " <td width='41%' nowrap> </td>\n";
echo " </tr>\n";
$user_id = findUserByHash($ID);
$query = "select mbox_tip,mbox_id,mboxname from tblMailBoxes where user_id = $user_id";
$result = mysql_db_query("$dbname",$query);
if($result) {
while ($r = mysql_fetch_array($result)) {
$mbox_id = $r["mbox_id"];
$mboxname = $r["mboxname"];
$mbox_tip = $r["mbox_tip"];
if ($mbox_tip == 3) {
echo " <tr bgcolor='#FFFFFF'>\n";
echo " <td width='26%'><a href='mailbox.php?ID=$ID&mbox_id=$mbox_id'>$mboxname</a></td>\n";
echo " <td width='33%'>\n";
$messagecount = findUserMessageCount($mbox_id,$user_id);
echo " <div align='center'>$messagecount</div>\n";
echo " </td>\n";
echo " <td width='41%' nowrap>\n";
echo " <table width='100%' border='0' cellspacing='0' cellpadding='0'>\n";
echo " <tr>\n";
echo " <td width='50%' nowrap>\n";
echo " <div align='right'><a href='folder_delete.php?ID=$ID&mbox_id=$mbox_id'>Delete Folder</a></div>\n";
echo " </td>\n";
echo " <td width='4%'>\n";
echo " <div align='center'>-</div>\n";
echo " </td>\n";
echo " <td width='46%'><a href='folder_rename.php?ID=$ID&mbox_id=$mbox_id'>Rename Folder</a></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
} else {
echo " <tr bgcolor='#FFFFFF'>\n";
echo " <td width='26%'><a href='mailbox.php?ID=$ID&mbox_id=$mbox_id'>$mboxname</a></td>\n";
echo " <td width='33%'>\n";
$messagecount = findUserMessageCount($mbox_id,$user_id);
echo " <div align='center'>$messagecount</div>\n";
echo " </td>\n";
echo " <td width='41%' nowrap> </td>\n";
echo " </tr>\n";
}
}
}
echo " <tr bgcolor='#DFDFDF'>\n";
echo " <td width='26%'> </td>\n";
echo " <td width='33%'> </td>\n";
echo " <td width='41%' nowrap> </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <table width='550' border='0' cellspacing='0' cellpadding='0' align='center'>\n";
echo " <tr align='right'>\n";
echo " <td>\n";
echo " <form method='post' action='folder_add.php?ID=$ID' onSubmit='submitonce(this)'>\n";
echo " Create a New Folder : \n";
echo " <input type='text' name='txtyenidizin'>\n";
echo " <input type='image' src='images/ok.gif' width='30' height='30' align='top'>\n";
echo " </form>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "</body>\n";
echo "</html>\n";
} else {
Header("Location: main.php?error_code=1");
}
?>