for ($i = 0; $i <= $Max_Index - 1; $i++) {
     $M_ID = trim($MsgList_Array[$i]);
     $MessageInfo = GetMsgInfo($M_ID);
     $MsgList_Array_Data[$i]['ID'] = $M_ID;
     $MsgList_Array_Data[$i]['Seconds'] = $MessageInfo['Seconds'];
     $MsgList_Array_Data[$i]['Months'] = $MessageInfo['Months'];
 }
 usort($MsgList_Array_Data, 'sort_by_time');
 // print_r($MsgList_Array_Data);
 // rsort($MsgList_Array_Data);
 // print_r($MsgList_Array_Data);
 for ($i = 0; $i <= $Max_Index - 1; $i++) {
     // $M_ID = trim($MsgList_Array[$i]);
     $M_ID = $MsgList_Array_Data[$i]['ID'];
     # MOD for updated GetMsgInfo function
     $MessageInfo = GetMsgInfo($M_ID);
     $DB_MsgID = $MessageInfo['ID'];
     $DB_MsgSub = $MessageInfo['Subject'];
     $DB_MsgSeconds = $MessageInfo['Seconds'];
     $DB_MsgMonths = $MessageInfo['Months'];
     $DB_absDay = $MessageInfo['absDay'];
     $DB_absMins = $MessageInfo['absMins'];
     $DB_absHours = $MessageInfo['absHour'];
     $DB_MsgBodyText = $MessageInfo['BodyText'];
     $DB_MsgBodyHTML = $MessageInfo['BodyHTML'];
     # gmp_mod and fmod are not working on my host for some reason. :-(
     $T_minutes = intval($DB_MsgSeconds / 60);
     $T_seconds = $DB_MsgSeconds - $T_minutes * 60;
     $T_hours = intval($T_minutes / 60);
     $T_minutes = $T_minutes - $T_hours * 60;
     $T_days = intval($T_hours / 24);
     $SubscriberInfo = GetSubscriberInfo($Subscriber_ID);
     $DB_SentMsgs = $SubscriberInfo['SentMsgs'];
     $DB_SentMsgs = trim(trim($DB_SentMsgs), ",");
     $SentList_Array = explode(',', $DB_SentMsgs);
     $Max_Index = sizeof($SentList_Array);
     # Explode likes to treat NULL as an element. :/
     if (trim($DB_SentMsgs) == NULL) {
         $Max_Index = 0;
     }
     if ($DB_SentMsgs == "") {
         $Max_Index = 0;
     }
     # Build option list
     $option_list = "";
     for ($i = 0; $i <= $Max_Index - 1; $i++) {
         $MessageInfo = GetMsgInfo(trim($SentList_Array[$i]));
         $DB_MsgID = $MessageInfo['ID'];
         $DB_MsgSub = $MessageInfo['Subject'];
         $option_list .= "     <option value=\"{$DB_MsgID}\">{$DB_MsgSub}</option>\n";
     }
     # Template
     include 'templates/sub_edit.admin.php';
     # Back button
     print "<br> \n";
     $return_action = "edit_users";
     include 'templates/back_button.admin.php';
 } elseif ($action == "sub_delete") {
     $SubscriberInfo = GetSubscriberInfo($Subscriber_ID);
     $DB_TimeJoined = $SubscriberInfo['TimeJoined'];
     $DB_LastActivity = $SubscriberInfo['LastActivity'];
     $CanReceiveHTML = $SubscriberInfo['CanReceiveHTML'];