示例#1
0
<?php

require_once "../../class/user.class.php";
require_once "../../class/database.class.php";
session_start();
$db = new database();
$link = $db->connect();
require_once "functionsAdmin.php";
if ($_POST) {
    $email = trim(strip_tags($_POST['email']));
    delete_email($email, $link);
} else {
    header('Location : login.php');
}
示例#2
0
文件: teamteach.php 项目: rrusso/EARS
                    accept_reject_email($teamteach, $user, false);
                }
            }
        }
        // Refresh accept and remove forms due to new information
        $accept_form = new teamteach_accept_form();
        $remove_form = new teamteach_remove_form();
    } else {
        if ($data = $remove_form->get_data()) {
            // Prematurely set heading that the form submission was processed and necessary emails were sent
            $heading = get_string('email_sent', 'block_courseprefs');
            $teamteaches = array();
            // Iterate over selected team teach requests and delete them accordingly
            foreach ($remove_form->selected_teamteaches as $id) {
                $teamteaches[$id] = CoursePrefsTeamTeach::findById($id);
                delete_email($teamteaches[$id], $user);
            }
            reset_prefs($teamteaches);
            // Refresh remove form due to new information
            $remove_form = new teamteach_remove_form();
        }
    }
}
// Render the page headers and forms
$heading_main = get_string('teamteach_heading', 'block_courseprefs');
$navigation = array(array('name' => get_string('blockname', 'block_courseprefs'), 'link' => '', 'type' => 'title'), array('name' => $heading_main, 'link' => '', 'type' => 'title'));
print_header_simple($heading_main, '', build_navigation($navigation));
print_heading_with_help($heading_main, 'teamteach', 'block_courseprefs');
if ($heading) {
    print_heading($heading, 'center', 3);
}