Example #1
0
$base = dirname(dirname(__FILE__));
//chdir($base);
require_once "Connections/freedomrising.php";
require_once "mailblast/smtp_client.php";
require_once "mailblast/functions.php";
//include_once("glog.php");
//glog_set_level(LOG_DEBUG);
//glog_set_file($base."/blast.log");
##################################################################3
$test = false;
// if true, we don't actually send mail
$process_delay = 100;
// the time to sleep between emails
// value of 1000 is one second
# give our own handler a chance to process the request
if (handle_request()) {
    return;
    # we are done
} else {
    # otherwise, let processor.php handle the request
    $process_function = 'do_email_batch';
    $count_function = 'get_count';
    $controls_function = 'print_controls';
    $chunk_size = 20;
    // how many emails to process at a time
    $refresh_delay = 10;
    // the delay between processing chunks
    // value of 1000 is one second
    $title = "Mail Blast";
    # pass off to processor.php
    include "mailblast/processor.php";
Example #2
0
<?php

// define our application directory
define('APP_PATH', $_SERVER['DOCUMENT_ROOT']);
require APP_PATH . "/data/topic.php";
function handle_request()
{
    # GET params
    $topic_name = $_POST['topic_name'];
    $topic_desc = $_POST['topic_desc'];
    $resource_name = $_POST['resource_name'];
    $resource_desc = $_POST['resource_desc'];
    $resource_uri = $_POST['resource_uri'];
    $resource_type = $_POST['resource_type'];
    #echo($topic_name);
    # PROCESS request
    Topic::create($topic_name, $topic_desc, $resource_name, $resource_desc, $resource_uri, $resource_type);
    header("location: list.php");
}
try {
    echo handle_request();
} catch (Exception $e) {
    echo "Sorry, there was an error: " . $e->getMessage() . ".";
}
Example #3
0
function handle_delete($path)
{
    handle_request('DELETE', $path, array(), array_slice(func_get_args(), 1));
}