public function import()
 {
     if (parent::import()) {
         foreach ($this->data as $fields) {
             foreach ($fields as $row) {
                 $this->addField($row);
             }
         }
         return true;
     }
     return false;
 }
	$data['chunks'] = array_chunk(explode(',', $data['users']), $data['batch']);

	$cache = new CacheItem('newsletter_'.$nid);
	$cache->set($data);
	$cache->export();

	echo head();
	ok('admin.php?action=members&job=newsletter3&id='.$nid, $lang->phrase('admin_member_mail_will_be_sent'));
}
elseif ($job == 'newsletter3') {
	$page = $gpc->get('page', int, 1);
	$id = $gpc->get('id', int);

	$cache = new CacheItem('newsletter_'.$id);
	$cache->import();
	$data = $cache->get();

	require_once("classes/mail/class.phpmailer.php");
	$mail = new PHPMailer();
	$mail->From = $data['from_mail'];
	$mail->FromName = $data['from_name'];
	$mail->Subject = $data['title'];
	if ($config['smtp'] == 1) {
		$mail->Mailer = "smtp";
		$mail->IsSMTP();
		$mail->Host = $config['smtp_host'];
		if ($config['smtp_auth'] == 1) {
			$mail->SMTPAuth = true;
			$mail->Username = $config['smtp_username'];
			$mail->Password = $config['smtp_password'];
DEFINE('SCRIPTNAME', 'popup');
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$zeitmessung1 = t1();
$slog = new slog();
$my = $slog->logged();
$lang->init($my->language);
$tpl = new tpl();
($code = $plugins->load('popup_start')) ? eval($code) : null;
if ($_GET['action'] == "hlcode") {
    if (strlen($_GET['fid']) != 32) {
        echo $tpl->parse("popup/header");
        error($lang->phrase('query_string_error'), 'javascript:parent.close();');
    }
    $codeObj = new CacheItem($_GET['fid'], 'cache/geshicode/');
    if (!$codeObj->import()) {
        echo $tpl->parse("popup/header");
        error($lang->phrase('query_string_error'), 'javascript:parent.close();');
    }
    $sourcecode = $codeObj->get();
    $sourcecode['source'] = html_entity_decode($sourcecode['source'], ENT_QUOTES);
    ($code = $plugins->load('popup_hlcode_start')) ? eval($code) : null;
    if ($_GET['temp'] == 1) {
        viscacha_header('Content-Type: text/plain');
        viscacha_header('Content-Length: ' . strlen($sourcecode['source']));
        viscacha_header('Content-Disposition: attachment; filename="' . date('d-m-Y_H-i') . '.txt"');
        echo $sourcecode['source'];
        $slog->updatelogged();
        $db->close();
        exit;
    } else {
function import_error_data($fid)
{
    $cache = new CacheItem($fid, 'temp/errordata/');
    $cache->import();
    $data = $cache->get();
    return $data;
}
Exemple #5
0
        echo $lang->phrase('admin_db_click_if_no_redirection');
        ?>
</a></td>
		  </tr>
		 </table>
		<?php 
        echo foot();
    } else {
        error('admin.php?action=db&job=backup', $lang->phrase('admin_db_backup_missing_permissions'));
        $filesystem->unlink($tfile);
        $x->delete();
    }
} elseif ($job == 'backup4') {
    $name = $gpc->get('name', none);
    $x = new CacheItem('backup_' . $name);
    $x->import();
    $temp = $x->get();
    $x->delete();
    // Speichern der Backup-Datei
    $tfile = "admin/backup/{$name}.sql.tmp";
    $file = "admin/backup/{$name}.sql";
    $filesystem->rename($tfile, $file);
    $ok = $lang->phrase('admin_db_backup_successfully_created');
    if (!empty($temp['zip'])) {
        $zipfile = "admin/backup/{$name}.zip";
        require_once 'classes/class.zip.php';
        $archive = new PclZip($zipfile);
        $v_list = $archive->create($file, PCLZIP_OPT_REMOVE_PATH, dirname($file));
        if ($v_list == 0) {
            $ok = $lang->phrase('admin_db_zip_error_saved_txt') . '<br />' . $lang->phrase('admin_db_error') . ' ' . $archive->errorInfo(true);
        } else {