예제 #1
0
                        $phone_field = "phone_mobile";
                    }
                    # tracy: now get all the phone numbers that should not rcv text msg
                    $sql = "SELECT \n\t\t\t\t\t\t  module.{$phone_field}\n\t\t\t\t\t\tFROM {$tbl} module\n\t\t\t\t\t\t  INNER JOIN prospect_lists_prospects ON (module.id = prospect_lists_prospects.related_id)\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t  (prospect_lists_prospects.prospect_list_id = \"{$row1['prospect_list_id']}\") AND \n\t\t\t\t\t\t  (prospect_lists_prospects.deleted = 0)";
                    $rs_fones = $db->query($sql);
                    while ($row_fone = $db->fetchByAssoc($rs_fones)) {
                        $fone_num = preg_replace('/[^0-9]/', '', $row_fone[$phone_field]);
                        //ignore empty phone numbers
                        if (!empty($fone_num)) {
                            $emailman->restricted_phone_numbers[$fone_num] = 1;
                        }
                    }
                }
            }
        }
        if (!$emailman->sendSMS($massemailer_email_copy, $test)) {
            $GLOBALS['log']->fatal("SMS delivery FAILED:" . print_r($row, true));
        } else {
            $GLOBALS['log']->debug("SMS delivery SUCCESS:" . print_r($row, true));
        }
    }
    $send_all = $send_all ? !$no_items_in_queue : $send_all;
} while ($send_all == true);
if (isset($temp_user)) {
    $current_user = $temp_user;
}
if (isset($_REQUEST['return_module']) && isset($_REQUEST['return_action']) && isset($_REQUEST['return_id'])) {
    $from_wiz = ' ';
    if (isset($_REQUEST['from_wiz']) && $_REQUEST['from_wiz'] == true) {
        header("Location: index.php?module={$_REQUEST['return_module']}&action={$_REQUEST['return_action']}&record={$_REQUEST['return_id']}&from=test");
    } else {