예제 #1
0
    return;
}
ignore_user_abort();
set_time_limit(500);
ob_end_flush();
if (!isset($GLOBALS['tmpdir'])) {
    $GLOBALS['tmpdir'] = ini_get('upload_tmp_dir');
}
if (!is_dir($GLOBALS['tmpdir']) || !is_writable($GLOBALS['tmpdir'])) {
    $GLOBALS['tmpdir'] = ini_get('upload_tmp_dir');
}
#if (ini_get("open_basedir")) {
if (!is_dir($GLOBALS['tmpdir']) || !is_writable($GLOBALS['tmpdir'])) {
    Warn($GLOBALS['I18N']->get('The temporary directory for uploading is not writable, so import will fail') . ' (' . $GLOBALS['tmpdir'] . ')');
}
$import_lists = getSelectedLists('importlists');
$_POST['importlists'] = $import_lists;
if (isset($_REQUEST['import'])) {
    if (!verifyToken()) {
        print Error(s('Invalid security token, please reload the page and try again'));
        return;
    }
    $test_import = isset($_POST['import_test']) && $_POST['import_test'] == 'yes';
    if (empty($_FILES['import_file'])) {
        Fatal_Error($GLOBALS['I18N']->get('No file was specified. Maybe the file is too big?'));
        return;
    }
    if (!$_FILES['import_file']) {
        Fatal_Error($GLOBALS['I18N']->get('File is either too large or does not exist.'));
        return;
    }
예제 #2
0
if ($some == 1) {
    $row = Sql_fetch_array($result);
    printf('<input type="hidden" name="listname[%d]" value="%s"><input type="hidden" name="lists[%d]" value="%d">%s <b>%s</b>', $c, stripslashes($row["name"]), $c, $row["id"], $GLOBALS['I18N']->get('Adding users to list'), stripslashes($row["name"]));
} else {
    print '<h3>' . $GLOBALS['I18N']->get('Select the lists to add the emails to') . '</h3>';
    /*
        while ($row = Sql_fetch_array($result)) {
          printf('<li><input type="hidden" name="listname[%d]" value="%s"><input type="checkbox" name="lists[%d]" value="%d">%s', $c, stripslashes($row["name"]), $c, $row["id"], stripslashes($row["name"]));
          $some = 1;
          $c++;
        }
    */
    if (!$some) {
        echo $GLOBALS['I18N']->get('No lists available') . ' ' . PageLink2("editlist", $GLOBALS['I18N']->get('Add a list'));
    } else {
        $selected_lists = getSelectedLists('lists');
        print listSelectHTML($selected_lists, 'lists', $subselect, s('Select the lists to add the emails to'));
    }
}
/*
}
*/
if (defined('IN_WEBBLER') && Sql_Table_Exists("groups")) {
    $result = Sql_query("SELECT id,name FROM groups ORDER BY listorder");
    $c = 0;
    if (Sql_Affected_Rows() == 1) {
        $row = Sql_fetch_array($result);
        printf('<p class="information"><input type="hidden" name="groupname[%d]" value="%s"><input type="hidden" name="groups[%d]" value="%d">Adding users to group <b>%s</b></p>', $c, $row["name"], $c, $row["id"], $row["name"]);
    } else {
        print '<p class="information">' . $GLOBALS['I18N']->get('Select the groups to add the users to') . '</p>';
        while ($row = Sql_fetch_array($result)) {