Example #1
0
     //       if($fromProfileId!=3 ||$fromProfileId!=4)
     //       {
     //           $nameQuery="Select CONCAT(first_name,' ', last_name) name from staff where profile_id=$fromProfileId and staff_id=$fromUserId  ";
     //       }
     //       if($fromProfileId==3)
     //       {
     //           $nameQuery="Select CONCAT(first_name,' ', last_name) name from students where profile_id=$fromProfileId and staff_id=$fromUserId  ";
     //       }
     //       if($fromProfileId==4)
     //       {
     //           $nameQuery="Select CONCAT(first_name,' ', last_name) name from people where profile_id=$fromProfileId and staff_id=$fromUserId  ";
     //       }
     //       $name=  DBGet(DBQuery($nameQuery));
     //       $name=$name[1]['NAME'];
     ////       echo "<br> ".$name;
     $inbox_info[$key]['FROM_USER'] = GetNameFromUserName($value['FROM_USER']);
     //print_r($fromProfile);
 }
 echo '<div style="overflow:auto; width:820px;">';
 echo '<div id="students" >';
 $columns = array('FROM_USER' => 'FROM', 'MAIL_SUBJECT' => 'SUBJECT', 'MAIL_DATETIME' => 'DATE/TIME');
 $extra['SELECT'] = ",Concat(NULL) AS CHECKBOX";
 $extra['LO_group'] = array('MAIL_ID');
 $extra['columns_before'] = array('CHECKBOX' => '</A><INPUT type=checkbox value=Y name=controller onclick="checkAll(this.form,this.form.controller.checked,\'mail\');"><A>');
 $extra['new'] = true;
 if (is_array($extra['columns_before'])) {
     $LO_columns = $extra['columns_before'] + $columns;
     $columns = $LO_columns;
 }
 $link['MAIL_SUBJECT']['link'] = "Modules.php?modname=messaging/Inbox.php&modfunc=body";
 $link['MAIL_SUBJECT']['variables'] = array('mail_id' => 'MAIL_ID');
Example #2
0
            echo "<script>window.location.href='Modules.php?modname=messaging/Trash.php&msg=4'</script>";
        }
    } else {
        PopTable('header', 'Alert Message');
        echo "<CENTER><h4>Please select atleast one message to delete</h4><br><FORM action={$PHP_tmp_SELF} METHOD=POST><INPUT type=button class=btn_medium name=delete_cancel value=OK onclick='window.location=\"Modules.php?modname=messaging/Trash.php\"'></FORM></CENTER>";
        PopTable('footer');
        return false;
    }
}
if (isset($_REQUEST['modfunc']) && $_REQUEST['modfunc'] == 'body') {
    PopTable('header', 'Message Details');
    $mail_id = $_REQUEST['mail_id'];
    $mail_body = "select mail_body,to_user,from_user,mail_datetime,mail_attachment from msg_inbox where mail_id='{$mail_id}'";
    $mail_body_info = DBGet(DBQuery($mail_body));
    foreach ($mail_body_info as $k => $v) {
        echo "<table width='100%' style='width:650px'>\r\n               <tr>\r\n               <td align='left'><b>From:</b> " . GetNameFromUserName($v['FROM_USER']) . "</td>\r\n               <td align='right'><b>Date/Time:</b> " . $v['MAIL_DATETIME'] . "</tr>";
        if ($v['TO_CC_MULTIPLE'] != '') {
            echo "<tr>\r\n                   <td align='left'>\r\n                   <b>CC:</b> " . $v['TO_CC_MULTIPLE'] . "</td><td></td>\r\n                   </tr>";
        }
        if ($v['TO_BCC_MULTIPLE'] != '') {
            $to_bcc_arr = explode(',', $v['TO_BCC_MULTIPLE']);
            if (in_array($userName, $to_bcc_arr)) {
                echo "<tr>\r\n                        <td align='left'>BCC: " . $userName . "</td><td></td></tr>";
            }
        }
        if ($v['MAIL_ATTACHMENT'] != '') {
            echo "<tr>\r\n                 <td align='left'>\r\n                  Attachment: ";
            $attach = explode(',', $v['MAIL_ATTACHMENT']);
            foreach ($attach as $user => $img) {
                $img_pos = strrpos($img, '/');
                $img_name[] = substr($img, $img_pos + 1, strlen($img));
Example #3
0
             $outbox_info[$id]['TO1'] = $outbox_info[$id]['TO_GRPNAME'] . ',' . $outbox_info[$id]['TO_CC'];
         }
     } else {
         $user = explode(' ', $outbox_info[$id]['TO1']);
         if ($user[1]) {
             $outbox_info[$id]['TO1'] = $user[0] . ',' . $user[1];
         }
     }
     $TOMULTIPLE = "";
     $TOARR = explode(",", $outbox_info[$id]['TO1']);
     foreach ($TOARR as $key => $v) {
         $add;
         if ($v == $outbox_info[$id]['TO_GRPNAME']) {
             $add = $v;
         } else {
             $add = GetNameFromUserName($v);
         }
         if ($TOMULTIPLE == "") {
             $TOMULTIPLE = $add;
         } else {
             $TOMULTIPLE .= " ," . $add;
         }
     }
     $outbox_info[$id]['TO1'] = $TOMULTIPLE;
     if ($value['MAIL_ATTACHMENT'] != '') {
         $outbox_info[$id]['MAIL_SUBJECT'] = $outbox_info[$id]['MAIL_SUBJECT'] . "<img align='right' src='./assets/attachment.png'>";
     }
 }
 echo '<div style="overflow:auto; width:820px;">';
 echo "<div id='students' >";
 $columns = array('TO1' => 'TO', 'MAIL_SUBJECT' => 'SUBJECT', 'MAIL_DATETIME' => 'DATE/TIME');