//add a first testnewsletter in first group $example_nl_1_id = $NEWSLETTER->addNL(array("subject" => "{DATE} Newsletter 1", "body" => $example_nl_body_html, "body_text" => $example_nl_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_1_id, "rcpt_name" => "Newsletter", "track_image" => "_blank", "content_type" => "text/html", "attachements" => array(), "is_template" => 0, "title" => 'Titel', "title_sub" => 'Titel 2', "summary" => 'Zusammenfassender Text zBsp. zur Anzeige auf der Webseite etc.', "track_personalized" => 1)); //add a second testnewsletter in 2nd group $example_nl_2_id = $NEWSLETTER->addNL(array("subject" => "{DATE} Newsletter 2", "body" => $example_nl_body_html, "body_text" => $example_nl_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_2_id, "rcpt_name" => "Newsletter", "track_image" => "_blank", "content_type" => "text/html", "attachements" => array(), "is_template" => 0, "title" => 'Titel', "title_sub" => 'Titel 2', "summary" => 'Zusammenfassender Text zBsp. zur Anzeige auf der Webseite etc.', "track_personalized" => 1)); //add newsletter for doubleoptin message, use 3rd example group $example_nl_doptin_id = $NEWSLETTER->addNL(array("subject" => "Newsletteranmeldung / Subscribe {DATE}", "body" => $example_nl_doptin_body_html, "body_text" => $example_nl_doptin_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 newsletter for welcome/subscribe message, use 3rd example group $example_nl_welcome_id = $NEWSLETTER->addNL(array("subject" => "Willkommen / Welcome {DATE}", "body" => $example_nl_welcome_body_html, "body_text" => $example_nl_welcome_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 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);
if (empty($name)) { $check = false; $_MAIN_MESSAGE .= "<br>" . ___("Name sollte nicht leer sein."); } if (!check_dbid($lnk_grp[0])) { $check = false; $_MAIN_MESSAGE .= "<br>" . ___("Bitte mindestens eine Gruppe wählen."); } //dublettencheck, kuerzel sollte eindeutig sein! $LNK = $LINK->get(0, array("short" => $short)); if (count($LNK) > 0) { $check = false; $_MAIN_MESSAGE .= "<br>" . ___("Eine Eintrag mit diesem Kürzel existiert bereits. Das Kürzel muss eindeutig sein."); } if ($check) { $LINK->add(array("short" => $short, "name" => $name, "url" => $url, "descr" => $descr, "aktiv" => $aktiv, "created" => $created, "author" => $author), $lnk_grp); $_MAIN_MESSAGE .= "<br>" . sprintf(___("Neuer Eintrag %s (%s) wurde erstellt."), "'<b>" . display($name) . "</b>'", "<em>" . display($short) . "</em>"); $action = "link_list"; require_once TM_INCLUDEPATH . "/link_list.inc.php"; } else { require_once TM_INCLUDEPATH . "/link_form.inc.php"; require_once TM_INCLUDEPATH . "/link_form_show.inc.php"; } } else { srand((double) microtime() * 1000000); $randomval = rand(1111, 9999); ${$InputName_Aktiv} = 1; ${$InputName_Short} = "lnk" . $randomval; ${$InputName_Name} = ___("Neuer Link"); ${$InputName_URL} = ___("http://"); ${$InputName_Descr} = ___("Beschreibung/Title");