예제 #1
0
function churchreport__ajax()
{
    $module = new CTChurchReportModule("churchreport");
    $ajax = new CTAjaxHandler($module);
    $res = $ajax->call();
    drupal_json_output($res);
}
예제 #2
0
/**
 *
 */
function churchresource__ajax()
{
    include_once "churchresource_db.php";
    $module = new CTChurchResourceModule("churchresource");
    $ajax = new CTAjaxHandler($module);
    $ajax->addFunction("delException", "administer bookings");
    $ajax->addFunction("delBooking", "edit masterdata");
    drupal_json_output($ajax->call());
}
예제 #3
0
function home__ajax()
{
    $module = new CTHomeModule("home");
    $ajax = new CTAjaxHandler($module);
    drupal_json_output($ajax->call());
}
예제 #4
0
function churchcal__ajax()
{
    include_once CHURCHCAL . "/churchcal_db.php";
    $module = new CTChurchCalModule("churchcal");
    $ajax = new CTAjaxHandler($module);
    $ajax->addFunction("getCalEvents", "view");
    $ajax->addFunction("getCalPerCategory", "view");
    $ajax->addFunction("getAbsents", "view");
    $ajax->addFunction("getMyServices", "view", "churchservice");
    $ajax->addFunction("getBirthdays", "view");
    $ajax->addFunction("deleteCategory", "view");
    $ajax->addFunction("updateEvent", "view");
    $ajax->addFunction("createEvent", "view");
    $ajax->addFunction("getShares", "view");
    $ajax->addFunction("saveShares", "view");
    $ajax->addFunction("getResource", "view", "churchresource");
    $ajax->addFunction("getAllowedGroups", "view", "churchdb");
    $ajax->addFunction("getAllowedPersons", "view", "churchdb");
    $ajax->addFunction("saveCategory", "view");
    $ajax->addFunction("delAddition", "view");
    $ajax->addFunction("deleteEvent", "view");
    // not ready
    $ajax->addFunction("moveCSEvent");
    drupal_json_output($ajax->call());
}
/**
 * churchdb ajax
 */
function churchdb_ajax()
{
    include_once "churchdb_db.php";
    $module = new CTChurchDBModule("churchdb");
    $ajax = new CTAjaxHandler($module);
    // $t=microtime(true);
    // $timer="start:".round(microtime(true)-$t,3)." ";
    drupal_json_output($ajax->call());
}
예제 #6
0
/**
 * function for ajax calls
 */
function churchauth__ajax()
{
    $module = new CTAuthModule("churchauth");
    $ajax = new CTAjaxHandler($module);
    drupal_json_output($ajax->call());
}
예제 #7
0
function admin__ajax()
{
    $module = new CTAdminModule("admin");
    $ajax = new CTAjaxHandler($module);
    drupal_json_output($ajax->call());
}
예제 #8
0
function churchwiki__ajax()
{
    global $user, $files_dir, $base_url, $mapping, $config;
    $auth = churchwiki_getAuthForAjax();
    if (!user_access("view", "churchwiki") && !in_array("churchwiki", $mapping["page_with_noauth"]) && !in_array("churchwiki", $config["page_with_noauth"])) {
        throw new CTNoPermission("view", "churchwiki");
    }
    $module = new CTChurchWikiModule("churchwiki");
    $ajax = new CTAjaxHandler($module);
    $res = $ajax->call();
    drupal_json_output($res);
}
/**
 * churchservice ajax
 */
function churchservice_ajax()
{
    include_once "churchservice_db.php";
    $module = new CTChurchServiceModule("churchservice");
    $ajax = new CTAjaxHandler($module);
    $ajax->addFunction("pollForNews", "view");
    $ajax->addFunction("getNewEventData", "view");
    $ajax->addFunction("getAllEventData", "view");
    $ajax->addFunction("getPersonByGroupIds", "view");
    $ajax->addFunction("saveEvent", "edit events");
    $ajax->addFunction("deleteEvent", "edit events");
    // Facts
    $ajax->addFunction("getAllFacts", "view facts || edit facts");
    $ajax->addFunction("saveFact", "edit facts");
    $ajax->addFunction("deleteService");
    $ajax->addFunction("editService");
    $ajax->addFunction("addOrRemoveServiceToEvent");
    drupal_json_output($ajax->call());
}