//ende upload if (!$uploaded_file_new) { if (!empty($file_existing)) { $IMPORT_MESSAGE .= "<br>" . sprintf(___("Importiere bestehende CSV-Datei %s"), "<b>" . $tm_datadir . "/" . $CSV_Filename . "</b>"); $CSV_Filename = $file_existing; $check = true; } } ####################### //new group? if ($check && $group_new == 1 && $delete != 1 && $blacklist != 1 && $blacklist_domains != 1) { if (empty($group_new_name)) { $_MAIN_MESSAGE .= "<br>" . ___("Name der Gruppe nicht angegeben."); $group_new_name = "Import " . $created; } $new_group_id = $ADDRESS->addGrp(array("name" => $group_new_name, "public" => 0, "public_name" => "", "descr" => $group_new_name, "aktiv" => 1, "prod" => 0, "created" => $created, "author" => $author)); $_MAIN_MESSAGE .= "<br>" . sprintf(___("Neue Addressgruppe %s wurde erstellt."), "'<b>" . display($group_new_name) . "</b>'"); //gruppe zu ausgewaehlten hinzufuegen $adr_grp[count($adr_grp)] = $new_group_id; } ####################### if ($check && $delete != 1 && $blacklist != 1 && $blacklist_domains != 1) { $IMPORT_MESSAGE .= "<br>" . ___("Status für neue Adressen: "); $IMPORT_MESSAGE .= tm_icon($STATUS['adr']['statimg'][$status_new], display($STATUS['adr']['descr'][$status_new])); $IMPORT_MESSAGE .= " " . display($STATUS['adr']['status'][$status_new]) . " (" . display($STATUS['adr']['descr'][$status_new]) . ")"; $IMPORT_MESSAGE .= "<br>" . ___("Status für bestehende Adressen: "); if ($status_ex > 0) { $IMPORT_MESSAGE .= tm_icon($STATUS['adr']['statimg'][$status_ex], display($STATUS['adr']['descr'][$status_ex])); $IMPORT_MESSAGE .= " " . display($STATUS['adr']['status'][$status_ex]) . " (" . display($STATUS['adr']['descr'][$status_ex]) . ")"; } else { $IMPORT_MESSAGE .= " " . ___("Keine Änderung");
$InputName_PublicName = "public_name"; //range from ${$InputName_PublicName} = getVar($InputName_PublicName); $InputName_Prod = "prod"; //range from ${$InputName_Prod} = getVar($InputName_Prod); $check = true; if ($set == "save") { //checkinput if (empty($name)) { $check = false; $_MAIN_MESSAGE .= "<br>" . ___("Name der Gruppe sollte nicht leer sein."); } if ($check) { $ADDRESS = new tm_ADR(); $ADDRESS->addGrp(array("name" => $name, "public" => $public, "public_name" => $public_name, "descr" => $descr, "aktiv" => $aktiv, "prod" => $prod, "created" => $created, "author" => $author)); $_MAIN_MESSAGE .= "<br>" . sprintf(___("Neue Addressgruppe %s wurde erstellt."), "'<b>" . display($name) . "</b>'"); $action = "adr_grp_list"; require_once TM_INCLUDEPATH . "/adr_grp_list.inc.php"; } else { require_once TM_INCLUDEPATH . "/adr_grp_form.inc.php"; require_once TM_INCLUDEPATH . "/adr_grp_form_show.inc.php"; } } else { ${$InputName_Aktiv} = 1; ${$InputName_Prod} = 0; ${$InputName_Name} = ___("Neue Gruppe"); ${$InputName_PublicName} = ___("Neue Gruppe"); ${$InputName_Descr} = ___("Neue Gruppe"); require_once TM_INCLUDEPATH . "/adr_grp_form.inc.php"; require_once TM_INCLUDEPATH . "/adr_grp_form_show.inc.php";
//add newsletter for update mail, use 3rd example group $example_nl_update_id = $NEWSLETTER->addNL(array("subject" => "Aktualisierung / Update {DATE}", "body" => $example_nl_update_body_html, "body_text" => $example_nl_update_body_text, "aktiv" => 1, "status" => 1, "massmail" => 0, "link" => "http://www.tellmatic.org", "created" => date("Y-m-d H:i:s"), "author" => "install", "grp_id" => $example_nl_group_3_id, "rcpt_name" => "Newsletter", "track_image" => "_blank", "content_type" => "text/html", "attachements" => array(), "is_template" => 1, "title" => '', "title_sub" => '', "summary" => '', "track_personalized" => 1)); //add link groups $LINKS = new tm_LNK(); $lnk_group_id_1 = $LINKS->addGrp(array("short" => "tellmatic", "name" => "Tellmatic", "descr" => "Tellmatic Links", "aktiv" => 1, "created" => date("Y-m-d H:i:s"), "author" => "install")); $lnk_group_id_2 = $LINKS->addGrp(array("short" => "index", "name" => "Index", "descr" => "Newsletter Index", "aktiv" => 1, "created" => date("Y-m-d H:i:s"), "author" => "install")); //add links $LINKS->add(array("short" => "tm.home", "name" => "Tellmatic Homepage", "url" => "http://www.tellmatic.org", "descr" => "Tellmatic Homepage", "aktiv" => 1, "created" => date("Y-m-d H:i:s"), "author" => "install"), array(0 => $lnk_group_id_1)); $LINKS->add(array("short" => "tm.doc", "name" => "Tellmatic Documentation", "url" => "http://doc.tellmatic.org", "descr" => "Tellmatic Online Documentation", "aktiv" => 1, "created" => date("Y-m-d H:i:s"), "author" => "install"), array(0 => $lnk_group_id_1)); $LINKS->add(array("short" => "tm.donate", "name" => "Donate to Tellmatic", "url" => "http://www.tellmatic.org/donate", "descr" => "Tellmatic Donation", "aktiv" => 1, "created" => date("Y-m-d H:i:s"), "author" => "install"), array(0 => $lnk_group_id_1)); $LINKS->add(array("short" => "tm.contact", "name" => "Contact / Kontakt", "url" => "http://www.tellmatic.org/contact&sendForm=1&name={F1} {F2}&email={EMAIL}&code={CODE}&adrid={ADRID}&subject=Test", "descr" => "Tellmatic Contact", "aktiv" => 1, "created" => date("Y-m-d H:i:s"), "author" => "install"), array(0 => $lnk_group_id_1)); $LINKS->add(array("short" => "idx.top", "name" => "Top", "url" => "#top", "descr" => "Jump to Top", "aktiv" => 1, "created" => date("Y-m-d H:i:s"), "author" => "install"), array(0 => $lnk_group_id_2)); $LINKS->add(array("short" => "idx.bottom", "name" => "Bottom", "url" => "#bottom", "descr" => "Jump to Bottom", "aktiv" => 1, "created" => date("Y-m-d H:i:s"), "author" => "install"), array(0 => $lnk_group_id_2)); //adr gruppe $ADDRESS = new tm_ADR(); $ADDRESS->addGrp(array("name" => "ADR Group 1", "descr" => "zum testen / for testings", "aktiv" => 1, "prod" => 1, "author" => "install", "created" => $created, "editor" => "install", "updated" => $created, "public" => 1, "public_name" => "Test 1")); $ADDRESS->setGRPStd(1, 1); $ADDRESS->addGrp(array("name" => "ADR Group 2", "descr" => "zum testen / for testings", "aktiv" => 0, "prod" => 0, "author" => "install", "created" => $created, "editor" => "install", "updated" => $created, "public" => 0, "public_name" => "Test 2")); //adr : ok, bounce $code = rand(111111, 999999); $new_adr_grp[0] = 1; $ADDRESS->addAdr(array("email" => "*****@*****.**", "aktiv" => 1, "created" => date("Y-m-d H:i:s"), "author" => "install", "status" => 3, "code" => $code, "proof" => 0, "source" => "user", "source_id" => 1, "source_extern_id" => 0, "memo" => $created, "f0" => "Herr", "f1" => "Telly", "f2" => "Tellmatic", "f3" => "", "f4" => "", "f5" => "", "f6" => "", "f7" => "", "f8" => "", "f9" => ""), $new_adr_grp); $code = rand(111111, 999999); $new_adr_grp[0] = 1; $ADDRESS->addAdr(array("email" => "*****@*****.**", "aktiv" => 1, "created" => date("Y-m-d H:i:s"), "author" => "install", "status" => 1, "code" => $code, "proof" => 0, "source" => "user", "source_id" => 1, "source_extern_id" => 0, "memo" => $created, "f0" => "Herr", "f1" => "Tello", "f2" => "Bounce", "f3" => "", "f4" => "", "f5" => "", "f6" => "", "f7" => "", "f8" => "", "f9" => ""), $new_adr_grp); //form $FORMULAR = new tm_FRM(); $new_adr_grp[0] = 1; $FORMULAR->addForm(array("name" => "Form 1", "action_url" => "", "descr" => "zum testen / for testing", "aktiv" => 1, "standard" => 1, "created" => date("Y-m-d H:i:s"), "author" => "install", "double_optin" => 1, "use_captcha" => 1, "digits_captcha" => 4, "check_blacklist" => 1, "proof" => 1, "force_pubgroup" => 0, "overwrite_pubgroup" => 0, "multiple_pubgroup" => 1, "subscribe_aktiv" => 1, "nl_id_doptin" => $example_nl_doptin_id, "nl_id_greeting" => $example_nl_welcome_id, "nl_id_update" => $example_nl_update_id, "message_doptin" => "Double OptIn Message", "message_greeting" => "Greeting Message", "message_update" => "Update Message", "host_id" => 1, "submit_value" => "Subscribe / Anmelden", "reset_value" => "Reset / Eingaben zurücksetzen", "email" => "E-Mail-Adresse", "f0" => "Anrede", "f1" => "Name", "f2" => "Name2", "f3" => "", "f4" => "", "f5" => "", "f6" => "", "f7" => "", "f8" => "", "f9" => "", "f0_type" => "select", "f1_type" => "text", "f2_type" => "text", "f3_type" => "text", "f4_type" => "text", "f5_type" => "text", "f6_type" => "text", "f7_type" => "text", "f8_type" => "text", "f9_type" => "text", "f0_required" => 0, "f1_required" => 1, "f2_required" => 1, "f3_required" => 0, "f4_required" => 0, "f5_required" => 0, "f6_required" => 0, "f7_required" => 0, "f8_required" => 0, "f9_required" => 0, "f0_value" => "--;Frau;Herr;Firma;Verein", "f1_value" => "", "f2_value" => "", "f3_value" => "", "f4_value" => "", "f5_value" => "", "f6_value" => "", "f7_value" => "", "f8_value" => "", "f9_value" => "", "f0_expr" => "", "f1_expr" => "^[A-Za-z_ ][A-Za-z0-9_ ]*\$", "f2_expr" => "^[A-Za-z_ ][A-Za-z0-9_ ]*\$", "f3_expr" => "", "f4_expr" => "", "f5_expr" => "", "f6_expr" => "", "f7_expr" => "", "f8_expr" => "", "f9_expr" => "", "email_errmsg" => "Ungültige E-Mail-Adresse", "captcha_errmsg" => "Spamschutz! Bitte geben Sie untenstehenden Zahlencode ein.", "blacklist_errmsg" => "Blacklisted", "pubgroup_errmsg" => "Bitte Gruppe wählen", "f0_errmsg" => "", "f1_errmsg" => "Bitte füllen Sie das Feld Name aus", "f2_errmsg" => "Bitte füllen Sie das Feld Name2 aus", "f3_errmsg" => "", "f4_errmsg" => "", "f5_errmsg" => "", "f6_errmsg" => "", "f7_errmsg" => "", "f8_errmsg" => "", "f9_errmsg" => ""), $new_adr_grp); $FORMULAR->setStd(1); }