Example #1
0
/********************************************************************************/
/* this file is part of: / diese Datei ist ein Teil von:                        */
/* tellmatic, the newslettermachine                                             */
/* tellmatic, die Newslettermaschine                                            */
/* 2006/7 by Volker Augustin, multi.art.studio Hanau                            */
/* Contact/Kontakt: info@tellmatic.org                                      */
/* Homepage: www.tellmatic.org                                                   */
/* leave this header in file!                                                   */
/* diesen Header nicht loeschen!                                                */
/* check Homepage for Updates and more Infos                                    */
/* Besuchen Sie die Homepage fuer Updates und weitere Infos                     */
/********************************************************************************/
$_MAIN_DESCR = ___("Formulare verwalten");
$_MAIN_MESSAGE .= "";
$FORMULAR = new tm_FRM();
$ADDRESS = new tm_ADR();
$HOSTS = new tm_Host();
$adr_grp_id = getVar("adr_grp_id");
$frm_id = getVar("frm_id");
$set = getVar("set");
$val = getVar("val");
$doit = getVar("doit");
//wird per js an url angefuegt!!! confirm()
if ($set == "aktiv") {
    $FORMULAR->setAktiv($frm_id, $val);
    if ($val == 1) {
        $_MAIN_MESSAGE .= "<br>" . ___("Eintrag wurde aktiviert.");
    } else {
        $_MAIN_MESSAGE .= "<br>" . ___("Eintrag wurde de-aktiviert.");
    }
}
/* 2006/7 by Volker Augustin, multi.art.studio Hanau                            */
/* Contact/Kontakt: info@tellmatic.org                                      */
/* Homepage: www.tellmatic.org                                                   */
/* leave this header in file!                                                   */
/* diesen Header nicht loeschen!                                                */
/* check Homepage for Updates and more Infos                                    */
/* Besuchen Sie die Homepage fuer Updates und weitere Infos                     */
/********************************************************************************/
//if unsubscribe.php is included in your script, please set $called_via_url=false; $_CONTENT holds the html output
require TM_INCLUDEPATH . "/Lang.inc.php";
//aufruf: unsubscribe.php?h_id=&nl_id=&a_id=
//oder auch ohne parameter
//da wir ja ein formular haben
//und die email abfragen da wir bei massenmails keinen hinweis haben
//und ein massenmailing kein personalisiertes newsletter ist.....
$ADDRESS = new tm_ADR();
$BLACKLIST = new tm_BLACKLIST();
$MESSAGE = "";
$FMESSAGE = "";
$OUTPUT = "";
$set = getVar("set");
$h_id = getVar("h_id");
$nl_id = getVar("nl_id");
$a_id = getVar("a_id");
$code = getVar("code");
if (DEBUG) {
    $FMESSAGE .= tm_debugmessage("DEBUG enabled");
}
if (!isset($_CONTENT)) {
    $_CONTENT = "";
}
         if (empty($H[0]['ip']) || $H[0]['ip'] == '0.0.0.0') {
             $QUEUE->setHIP($H[0]['id'], getIP());
             //save ip
         }
         if ($H[0]['status'] != 7) {
             //7:unsubscribed
             $QUEUE->setHStatus($h_id, 3);
             //view
         }
     }
     //isset H[0]
 }
 //checkid h_id
 //adressid? wenn ja status aendern und view zaehlen
 if (checkid($a_id)) {
     $ADDRESS = new tm_ADR();
     $ADR = $ADDRESS->getAdr($a_id);
     if (isset($ADR[0])) {
         //https://sourceforge.net/tracker/?func=detail&aid=3114571&group_id=190396&atid=933192
         //only set view status if not waiting status or unsubscribed // !5 && !11
         if ($ADR[0]['status'] != 5 && $ADR[0]['status'] != 11) {
             $ADDRESS->setStatus($a_id, 4);
             //view
         }
         //adr view counter ++
         $ADDRESS->addView($a_id);
         //view
         //save memo
         $created = date("Y-m-d H:i:s");
         $memo = "viewed (" . $NL[0]['subject'] . ")";
         $ADDRESS->addMemo($a_id, $memo);
//gruppen ids / group ids
$adr_grp[0] = 1;
#$adr_grp[1]=2;
#$adr_grp[2]=2;
//CONFIG END
if (!DEMO && $user_is_admin) {
    $created = date("Y-m-d H:i:s");
    #$f_text="0123456789abcdefghijklmnopqrstuvwxyz";
    $author = $LOGIN->USER['name'];
    $source = 'user';
    $source_id = $LOGIN->USER['id'];
    $source_extern_id = 0;
    $rnd = rand(1111111, 9999999);
    $gc = count($adr_grp);
    $_MAIN_MESSAGE .= "<br>" . sprintf(___("Erstelle %s Testadressen in der(den) Gruppe(n) :"), $max_adr);
    $ADDRESS = new tm_ADR();
    for ($gcc = 0; $gcc < $gc; $gcc++) {
        $GRP = $ADDRESS->getGroup($adr_grp[$gcc]);
        $_MAIN_MESSAGE .= "<br>" . display($GRP[0]['name']);
    }
    for ($adr_c = 0; $adr_c < $max_adr; $adr_c++) {
        $code = $adr_c + $rnd;
        $email = "test_" . $adr_c . "_" . $code . "@tellmatic.org";
        //random status?
        #$status=rand(1,12);
        //fixed status
        $status = 2;
        //2:new
        $ADDRESS->addAdr(array("email" => $email, "aktiv" => 1, "created" => $created, "author" => $author, "status" => $status, "code" => $code, "memo" => "{$adr_c} testadressen", "source" => "user", "source_id" => $LOGIN->USER['id'], "source_extern_id" => 0, "f0" => "f0_" . $code, "f1" => "f1_" . $code, "f2" => "f2_" . $code, "f3" => "f3_" . $code, "f4" => "f4_" . $code, "f5" => "f5_" . $code, "f6" => "f6_" . $code, "f7" => "f7_" . $code, "f8" => "f8_" . $code, "f9" => "f9_" . $code), $adr_grp);
    }
    //for
$Form->set_InputReadonly($FormularName, $InputName_F, false);
$Form->set_InputOrder($FormularName, $InputName_F, 2);
$Form->set_InputLabel($FormularName, $InputName_F, "F0-F9<br>");
//Gruppe
$Form->new_Input($FormularName, $InputName_Group, "select", "");
$Form->set_InputJS($FormularName, $InputName_Group, " onChange=\"flash('submit','#ff0000');\" ");
$Form->set_InputDefault($FormularName, $InputName_Group, $adr_grp_id);
$Form->set_InputStyleClass($FormularName, $InputName_Group, "mFormSelect", "mFormSelectFocus");
$Form->set_InputDesc($FormularName, $InputName_Group, ___("Suche nach Gruppenzugehörigkeit"));
$Form->set_InputReadonly($FormularName, $InputName_Group, false);
$Form->set_InputOrder($FormularName, $InputName_Group, 3);
$Form->set_InputLabel($FormularName, $InputName_Group, "Gruppe<br>");
$Form->set_InputSize($FormularName, $InputName_Group, 0, 1);
$Form->set_InputMultiple($FormularName, $InputName_Group, false);
//add Data
$ADDRESS = new tm_ADR();
$GRP = $ADDRESS->getGroup(0, 0, 0, 1);
$acg = count($GRP);
$Form->add_InputOption($FormularName, $InputName_Group, "", "-- alle");
for ($accg = 0; $accg < $acg; $accg++) {
    $Form->add_InputOption($FormularName, $InputName_Group, $GRP[$accg]['id'], $GRP[$accg]['name'] . " (" . $GRP[$accg]['adr_count'] . ")");
}
//Author bzw Formular! Form_[ID]
$Form->new_Input($FormularName, $InputName_Author, "select", "");
$Form->set_InputJS($FormularName, $InputName_Author, " onChange=\"flash('submit','#ff0000');\" ");
$Form->set_InputDefault($FormularName, $InputName_Author, ${$InputName_Author});
$Form->set_InputStyleClass($FormularName, $InputName_Author, "mFormSelect", "mFormSelectFocus");
$Form->set_InputDesc($FormularName, $InputName_Author, ___("Herkunft / Quelle"));
$Form->set_InputReadonly($FormularName, $InputName_Author, false);
$Form->set_InputOrder($FormularName, $InputName_Author, 6);
$Form->set_InputLabel($FormularName, $InputName_Author, ___("Herkunft / Quelle") . "<br>");
/********************************************************************************/
/* this file is part of: / diese Datei ist ein Teil von:                        */
/* tellmatic, the newslettermachine                                             */
/* tellmatic, die Newslettermaschine                                            */
/* 2006/11 by Volker Augustin, multi.art.studio Hanau                            */
/* Contact/Kontakt: info@tellmatic.org                                      */
/* Homepage: www.tellmatic.org                                                   */
/* leave this header in file!                                                   */
/* diesen Header nicht loeschen!                                                */
/* check Homepage for Updates and more Infos                                    */
/* Besuchen Sie die Homepage fuer Updates und weitere Infos                     */
/********************************************************************************/
$InputName_Submit = "submit";
$InputName_Reset = "reset";
$ADDRESS = new tm_ADR();
//fuer die gruppen
//Form
$Form = new tm_SimpleForm();
$FormularName = "adr_clean";
//make new Form
$Form->new_Form($FormularName, $_SERVER["PHP_SELF"], "post", "_self");
$Form->set_FormJS($FormularName, " onSubmit=\"switchSection('div_loader');\" ");
$Form->set_FormJS($FormularName, " onSubmit=\"switchSection('div_loader');\"  OnChange=\"checkADRCleanForm();\" onClick=\"checkADRCleanForm();\"");
//add a Description
$Form->set_FormDesc($FormularName, ___("Adressdatenbank bereinigen"));
$Form->new_Input($FormularName, "act", "hidden", $action);
//set --> select!
//////////////////
//add inputfields and buttons....
//////////////////
Example #7
0
 /**
  * save log
  * @param
  * @return boolean
  */
 function log($arr)
 {
     //indexes:
     //author_id = given author id, if not given, check data array for author id, if not given, check login, if not given, set to 0=system
     //action = text = new/edit/delete
     //object = contact/ticket/contact_group/object/contact_type etc
     //data = array with data, e.g. from $contact array addContact Method etc.
     $Return = false;
     //check values
     //set log date
     $this->LOG['date'] = date("Y-m-d H:i:s");
     //chekc for author id
     $this->LOG['author_id'] = 0;
     //default is 0=system
     if (isset($arr['author_id']) && check_dbid($arr['author_id'])) {
         //if valid author_id in arr
         $this->LOG['author_id'] = $arr['author_id'];
     } else {
         //else check for author_id in data array
         if (isset($arr['data']['author_id']) && check_dbid($arr['data']['author_id'])) {
             $this->LOG['author_id'] = $arr['data']['author_id'];
         } else {
             // else, if not set at all get author id from logged in user
             global $LOGIN;
             if (isset($LOGIN->USER['id']) && check_dbid($LOGIN->USER['id'])) {
                 $this->LOG['author_id'] = $LOGIN->USER['id'];
             }
         }
     }
     //action
     //action should always be set, default is --
     $this->LOG['action'] = "--";
     if (isset($arr['action']) && !empty($arr['action'])) {
         //wenn aktion definiert
         $this->LOG['action'] = $arr['action'];
     }
     //object
     //object should always be set, default is --
     $this->LOG['object'] = "--";
     if (isset($arr['object']) && !empty($arr['object'])) {
         //wenn aktion definiert
         $this->LOG['object'] = $arr['object'];
     }
     //edit_id, die id des geaenderten datensatzes! oder neuen datensatzes, defakto muss log() erst am ende einer add methode aufgerufen werden wenn die id bekannt ist!
     //edit_id should always be set, default is 0
     $this->LOG['edit_id'] = 0;
     if (isset($arr['data']['id']) && !empty($arr['data']['id'])) {
         //wenn id
         $this->LOG['edit_id'] = $arr['data']['id'];
     }
     $this->LOG['memo'] = "";
     if (isset($arr['memo'])) {
         $this->LOG['memo'] = $arr['memo'];
     }
     $this->LOG['s_data'] = serialize($arr['data']);
     //hmmm, falls loeschung, daten aus altem datensatz anhand id ermitteln.... hmmmm
     if ($this->LOG['action'] == "delete" && check_dbid($this->LOG['edit_id'])) {
         switch ($this->LOG['object']) {
             //default:
             #no default, default : require_once (TM_INCLUDEPATH."/Welcome.inc.php"); break;
             case 'usr':
                 $LINK = new tm_CFG();
                 $DATA = $LINK->getUser("", $this->LOG['edit_id']);
                 $this->LOG['s_data'] = serialize($DATA);
                 break;
             case 'adr':
                 $LINK = new tm_ADR();
                 $DATA = $LINK->getAdr($this->LOG['edit_id']);
                 $this->LOG['s_data'] = serialize($DATA[0]);
                 break;
             case 'adr_grp':
                 $LINK = new tm_ADR();
                 $DATA = $LINK->getGroup($this->LOG['edit_id']);
                 $this->LOG['s_data'] = serialize($DATA[0]);
                 break;
             case 'nl':
                 $LINK = new tm_NL();
                 $DATA = $LINK->getNL($this->LOG['edit_id']);
                 $this->LOG['s_data'] = serialize($DATA[0]);
                 break;
             case 'nl_grp':
                 $LINK = new tm_NL();
                 $DATA = $LINK->getGroup($this->LOG['edit_id']);
                 $this->LOG['s_data'] = serialize($DATA[0]);
                 break;
             case 'bl':
                 $LINK = new tm_BLACKLIST();
                 $DATA = $LINK->getBL($this->LOG['edit_id']);
                 $this->LOG['s_data'] = serialize($DATA[0]);
                 break;
             case 'frm':
                 $LINK = new tm_FRM();
                 $DATA = $LINK->getForm($this->LOG['edit_id']);
                 $this->LOG['s_data'] = serialize($DATA[0]);
                 break;
             case 'host':
                 $LINK = new tm_HOST();
                 $DATA = $LINK->getHost($this->LOG['edit_id']);
                 $this->LOG['s_data'] = serialize($DATA[0]);
                 break;
             case 'q':
                 $LINK = new tm_Q();
                 $DATA = $LINK->getQ($this->LOG['edit_id']);
                 $this->LOG['s_data'] = serialize($DATA[0]);
                 break;
             case 'lnk':
                 $LINK = new tm_LNK();
                 $DATA = $LINK->get($this->LOG['edit_id']);
                 $this->LOG['s_data'] = serialize($DATA[0]);
                 break;
             case 'lnk_grp':
                 $LINK = new tm_LNK();
                 $DATA = $LINK->getGroup($this->LOG['edit_id']);
                 $this->LOG['s_data'] = serialize($DATA[0]);
                 break;
         }
         //switch
     }
     //if action=delete
     //serialisierte werte speichern, ein eintrag in die db pro aktion!
     $Query = "INSERT INTO " . TM_TABLE_LOG . " (\n\t\t\t\t\t\tdate,\n\t\t\t\t\t\tauthor_id,\n\t\t\t\t\t\taction,\n\t\t\t\t\t\tobject,\n\t\t\t\t\t\tproperty,\n\t\t\t\t\t\tx_value,\n\t\t\t\t\t\tedit_id,\n\t\t\t\t\t\tdata,\n\t\t\t\t\t\tmemo,\n\t\t\t\t\t\tsiteid\n\t\t\t\t\t\t)\n\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\t'" . dbesc($this->LOG["date"]) . "',\n\t\t\t\t\t\t" . checkset_int($this->LOG["author_id"]) . ",\n\t\t\t\t\t\t'" . dbesc($this->LOG["action"]) . "',\n\t\t\t\t\t\t'" . dbesc($this->LOG["object"]) . "',\n\t\t\t\t\t\t'',\n\t\t\t\t\t\t'',\n\t\t\t\t\t\t" . checkset_int($this->LOG["edit_id"]) . ",\n\t\t\t\t\t\t'" . dbesc($this->LOG['s_data']) . "',\n\t\t\t\t\t\t'" . dbesc($this->LOG['memo']) . "',\n\t\t\t\t\t\t'" . TM_SITEID . "')";
     if ($this->DB->Query($Query)) {
         $Return = true;
     } else {
         $Return = FALSE;
         return $Return;
     }
     /*		
     //jeden wert einzeln speichern, ist aber unsinnn!!!!
     //iterate data array, fetch all indexes and values and save...... yes, it becomes a very very big table!!!!! anders gehts halt nicht!
     foreach ($arr['data'] as $data_key => $data_val) {
     	    	if (DEBUG) $_MAIN_MESSAGE.= "$data_key => $data_val\n, ";
     	$Query ="INSERT INTO ".TM_TABLE_LOG." (
     				date,
     				author_id,
     				action,
     				object,
     				property,
     				x_value,
     				edit_id,
     				siteid
     				)
     				VALUES (
     				'".dbesc($this->LOG["date"])."',
     				'".checkset_int($this->LOG["author_id"])."',
     				'".dbesc($this->LOG["action"])."',
     				'".dbesc($this->LOG["object"])."',
     				'".dbesc($data_key)."',
     				'".dbesc($data_val)."',
     				'".checkset_int($this->LOG["edit_id"])."',
     				'".TM_SITEID."')";
     	if (DEBUG_SQL) $_MAIN_MESSAGE.="\n".$Query."<br>";
     	if ($this->DB->Query($Query)) {
     		$Return=true;
     	} else {
     		$Return=FALSE;
     		return $Return;			
     	}
     }//foreach
     */
     return $Return;
 }
//wenn sich public aender loeschen wir dennoch keine referenzen von public groups zu den formularen, das wird in subscribe eh ueberprueft und beim naechsten bearbeiten des formulares bereinigt! (da edit methode alte refs loescht und komplett neu anlegt!)
$InputName_Prod = "prod";
//range from
${$InputName_Prod} = getVar($InputName_Prod);
$ADDRESS = new tm_ADR();
$GRP = $ADDRESS->getGroup($adr_grp_id, 0, 0, 0);
$standard = $GRP[0]['standard'];
if ($set == "save") {
    $check = true;
    //checkinput
    if (empty($name)) {
        $check = false;
        $_MAIN_MESSAGE .= "<br>" . ___("Name der Gruppe sollte nicht leer sein.");
    }
    if ($check) {
        $ADDRESS = new tm_ADR();
        $ADDRESS->updateGrp(array("id" => $adr_grp_id, "name" => $name, "public" => $public, "public_name" => $public_name, "descr" => $descr, "aktiv" => $aktiv, "prod" => $prod, "created" => $created, "author" => $author));
        $_MAIN_MESSAGE .= "<br>" . sprintf(___("Adressgruppe %s wurde aktualisiert."), "'<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 {
    $name = $GRP[0]['name'];
    $public = $GRP[0]['public'];
    $public_name = $GRP[0]['public_name'];
    $descr = $GRP[0]['descr'];
    $aktiv = $GRP[0]['aktiv'];
    $prod = $GRP[0]['prod'];
Example #9
0
require_once TM_INCLUDEPATH . "/Class_SMTP.inc.php";
#require_once (TM_INCLUDEPATH."/phphtmlparser/html2text.inc");
$called_via_url = FALSE;
if (isset($_SERVER['REMOTE_ADDR'])) {
    $called_via_url = TRUE;
}
//a http refresh may work
$reload_intervall = 300;
if ($called_via_url) {
    echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . $encoding . "\">\n";
    echo "<html>\n<body bgcolor=\"#ffffff\">\n";
    echo "<pre>\n";
}
$QUEUE = new tm_Q();
$NEWSLETTER = new tm_NL();
$ADDRESS = new tm_ADR();
$HOSTS = new tm_HOST();
$BLACKLIST = new tm_BLACKLIST();
$T = new Timer();
//zeitmessung
$skip_send = FALSE;
//if true, skip sending routine// is true after new q has been prepared
$log_proc_id = rand(111111, 999999);
$log_q_id = "0";
$log_nl_id = "0";
$log_grp_id = "0";
$log_adr_id = "0";
$log_msg = "";
function send_log($text)
{
    #update log on the fly
Example #10
0
/* 2006/7 by Volker Augustin, multi.art.studio Hanau                            */
/* Contact/Kontakt: info@tellmatic.org                                      */
/* Homepage: www.tellmatic.org                                                   */
/* leave this header in file!                                                   */
/* diesen Header nicht loeschen!                                                */
/* check Homepage for Updates and more Infos                                    */
/* Besuchen Sie die Homepage fuer Updates und weitere Infos                     */
/********************************************************************************/
exit;
#include config file: edit line if you run this script via cronjob, add full path to tellmatic config file
require_once "./tm_config.inc.php";
/********************************************************************************/
if (DEMO) {
    exit;
}
$ADDRESS = new tm_ADR();
$search['recheck'] = 1;
$ADR = $ADDRESS->getAdr(0, 0, $C[0]['checkit_limit'], 0, $search, "", 0, 0);
$ac = count($ADR);
if ($ac > 0) {
    echo sprintf(___("Limit: %s Found: %s"), $C[0]['checkit_limit'], $ac) . "\n";
    for ($acc = 0; $acc < $ac; $acc++) {
        $protocol = "";
        $protocol .= $ADR[$acc]['email'] . "\n";
        $ADR_C = $ADDRESS->getAdr($ADR[$acc]['id']);
        //nochmal kurz pruefen ob recheck noch 1 ist, sonst pruefen wir ggf. doppelt
        if ($ADR_C[0]['recheck'] == 1) {
            //recheck auf 0 setzen
            $ADDRESS->markRecheck($ADR[$acc]['id'], 0);
            //pruefen
            $check_mail = checkEmailAdr($ADR[$acc]['email'], $C[0]['emailcheck_checkit'], $C[0]['checkit_from_email']);
Example #11
0
/* leave this header in file!                                                   */
/* diesen Header nicht loeschen!                                                */
/* check Homepage for Updates and more Infos                                    */
/* Besuchen Sie die Homepage fuer Updates und weitere Infos                     */
/********************************************************************************/
exit;
#include config file: edit line if you run this script via cronjob, add full path to tellmatic config file
require_once "./tm_config.inc.php";
/********************************************************************************/
if (DEMO) {
    exit;
}
$HOSTS = new tm_HOST();
$Mailer = new tm_Mail();
$Bounce = new tm_Bounce();
$ADDRESS = new tm_ADR();
#POP3/IMAP HostID frm global config
$HOST = $HOSTS->getHost($C[0]['bounceit_host']);
if (!isset($HOST[0])) {
    exit;
}
$Mail = array();
$BMail = array();
$Bounces = array();
$bcmatch = 0;
$offset = 0;
$search_mail = array();
if ($C[0]['bounceit_filter_to'] == 1) {
    $search_mail['to'] = $C[0]['bounceit_filter_to_email'];
    echo sprintf(___("Es werden nur E-Mails an die Adresse %s durchsucht."), $C[0]['bounceit_filter_to_email']) . "\n";
}
 $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);
 $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);
Example #13
0
             //if we have valid adr_id yet, lets check if it differs from the adr_i in hostory table... if not, we dont have a valid h record
             if (check_dbid($a_id) && $a_id != $H[0]['adr_id']) {
                 $valid_h = FALSE;
             }
             //also check if newsletter matches history!
             if ($valid_nl && $nl_id != $H[0]['nl_id']) {
                 $valid_h = FALSE;
             }
             //ok, if we have a valid h record, lets do some tracking and logging
         }
         //isset H
     }
     //check_dbid h_id && personalized
     //check for valid address record
     if (check_dbid($a_id) && $personalized) {
         $ADDRESS = new tm_ADR();
         $ADR = $ADDRESS->getAdr($a_id);
         //check if adr isset , active and not unsubscribed, status !=11
         if (isset($ADR[0]) && $ADR[0]['aktiv'] == 1 && $ADR[0]['status'] != 11) {
             $valid_adr = TRUE;
         }
     }
     //isset ADR && aktiv
     //but wait :)
     //we checked for valid h record before, so if we maybe now have a new adr id if none was set, we will check again if the adr id is still the same as the given a_id if we have a valid h record! hehe
     if ($valid_adr && $valid_h && $H[0]['adr_id'] != $a_id) {
         $valid_adr = FALSE;
     }
 }
 //a_id && personalized
 //check for a valid link id, if set, this link, if valid, will replace the internal fixed LINK1
$Form->new_Input($FormularName, $InputName_GroupPub, "select", "");
$Form->set_InputJS($FormularName, $InputName_GroupPub, " onChange=\"flash('submit','#ff0000');\" ");
//$Form->set_InputDefault($FormularName,$InputName_GroupPub,$adr_grp_pub);
$Form->set_InputStyleClass($FormularName, $InputName_GroupPub, "tm_form_group_select", "tm_form_focus_group_select");
#$Form->set_InputDesc($FormularName,$InputName_GroupPub,___("Gruppen wählen, STRG/CTRL gedrückt halten und klicken f. Mehrfachauswahl"));
$Form->set_InputReadonly($FormularName, $InputName_GroupPub, false);
$Form->set_InputOrder($FormularName, $InputName_GroupPub, 111);
$Form->set_InputLabel($FormularName, $InputName_GroupPub, "");
//allow multiple public groups?
if ($FRM[0]['multiple_pubgroup'] == 1) {
    $Form->set_InputMultiple($FormularName, $InputName_GroupPub, TRUE);
} else {
    $Form->set_InputMultiple($FormularName, $InputName_GroupPub, FALSE);
}
//add Data
$ADDRESS = new tm_ADR();
$GRPPUB = $ADDRESS->getGroup(0, 0, $frm_id, 0, array("public_frm_ref" => 1, "aktiv" => 1, "public" => 1));
$acgp = count($GRPPUB);
//set size after counting... no more than 5 rows (only if select, not option. we do not have options yet, but may come)
if ($acgp < 5) {
    $Form->set_InputSize($FormularName, $InputName_GroupPub, 0, 5);
} else {
    $Form->set_InputSize($FormularName, $InputName_GroupPub, 0, $acgp);
}
for ($accgp = 0; $accgp < $acgp; $accgp++) {
    $Form->add_InputOption($FormularName, $InputName_GroupPub, $GRPPUB[$accgp]['id'], $GRPPUB[$accgp]['public_name']);
    $FGROUPDESCR .= "<strong>" . display($GRPPUB[$accgp]['public_name']) . "</strong><br>";
    if (!empty($GRPPUB[$accgp]['descr'])) {
        $FGROUPDESCR .= display($GRPPUB[$accgp]['descr']) . "<br>";
    }
}
Example #15
0
    $adr = array();
}
$InputName_Action = "val";
${$InputName_Action} = getVar($InputName_Action);
if (empty($val)) {
    $val = "list";
}
$InputName_ActionAdr = "val2";
${$InputName_ActionAdr} = getVar($InputName_ActionAdr);
require_once TM_INCLUDEPATH . "/bounce_host_form.inc.php";
require_once TM_INCLUDEPATH . "/bounce_host_form_show.inc.php";
//server ausgewaehlt, wir connecten
if ($set == "connect") {
    $Mailer = new tm_Mail();
    $Bounce = new tm_Bounce();
    $ADDRESS = new tm_ADR();
    $HOST = $HOSTS->getHost($host);
    $search_mail = array();
    //filter? emails suchen?
    if ($filter_to == 1) {
        //nur mails an aktuelle return adesse fuer host
        $search_mail['to'] = $filter_to_smtp_return_path;
        $_MAIN_OUTPUT .= "<br>" . sprintf(___("Es werden nur E-Mails an die Adresse %s angezeigt."), $filter_to_smtp_return_path);
    }
    $_MAIN_OUTPUT .= "<br>" . sprintf(___("Verbindung zum Server %s wird aufgebaut..."), $HOST[0]['name'] . " (" . $HOST[0]['host'] . ":" . $HOST[0]['port'] . "/" . $HOST[0]['type'] . ")");
    $Mailer->Connect($HOST[0]['host'], $HOST[0]['user'], $HOST[0]['pass'], $HOST[0]['type'], $HOST[0]['port'], $HOST[0]['options']);
    if (!empty($Mailer->Error)) {
        $_MAIN_MESSAGE .= "<br><b>" . sprintf(___("Servermeldung: %s"), "" . $Mailer->Error . "") . "</b>";
    }
    //Mails auslesen
    $Mail = $Mailer->getMail(0, $offset, $limit, $search_mail);
Example #16
0
$InputName_Proof = "proof";
//
${$InputName_Proof} = getVar($InputName_Proof);
//new group?
$InputName_GroupNew = "group_new";
//
${$InputName_GroupNew} = getVar($InputName_GroupNew, 0);
//new group name
$InputName_GroupNewName = "group_new_name";
//
${$InputName_GroupNewName} = getVar($InputName_GroupNewName, 0);
$uploaded_file_new = false;
$IMPORT_MESSAGE = "";
$IMPORT_LOG = "";
if ($set == "import") {
    $ADDRESS = new tm_ADR();
    $BLACKLIST = new tm_BLACKLIST();
    $created = date("Y-m-d H:i:s");
    $author = $LOGIN->USER['name'];
    $CSV_Filename = "import_" . date_convert_to_string($created) . ".csv";
    $check = false;
    $EMailcheck_Import = $check_mail_import;
    if ($blacklist_domains == 1) {
        $bl_domains = array();
        //array mit domainnamen in blacklist
    }
    if (empty($adr_grp)) {
        $IMPORT_MESSAGE .= "<br>" . ___("Keine Gruppe gewählt. Es werden keine neuen Daten importiert.");
    } else {
        $check = true;
    }
Example #17
0
 function parseNL($data, $type)
 {
     //$data=Array( nl => $NL(Array) , adr => $ADR(Array))
     //e.g. pass NL[0] as $data['nl']
     //e.g. pass ADR[0] as $data['adr']
     //ouch, another global
     global $tm_URL_FE;
     //should become a constant
     global $tm_nldir, $tm_nlattachdir, $tm_nlimgdir, $tm_nlimgpath, $tm_nlpath;
     //should become a constant too
     $Log = array();
     $AGroups = array();
     //groups the adr belongs to
     $Return = "";
     $nl_id = 0;
     $a_id = 0;
     $q_id = 0;
     $h_id = 0;
     $frm_id = 0;
     $email = "";
     $code = "";
     $memo = "";
     $f0 = $f1 = $f2 = $f3 = $f4 = $f5 = $f6 = $f7 = $f8 = $f9 = "";
     #$personalized=false;
     if (isset($data['nl']) && isset($data['nl']['id']) && check_dbid($data['nl']['id'])) {
         $nl_id = $data['nl']['id'];
         //we can assume that all in ['nl']is set
     }
     //at first we need a nl_id, if not set, exit and return empty string!
     if (!check_dbid($nl_id)) {
         $Return = "!nl_id";
         return $Return;
     }
     //next we need to know the type, parse html or testpart? if not set, exit and return empty string!
     if ($type != "text" && $type != "html") {
         $Return = "!type";
         return $Return;
     }
     $data['text'] = $data['nl']['subject'];
     $NLSUBJECT = $this->parseSubject($data);
     //if isset $data['adr'] we assume that the newsletter is personalized and need personalized parsing with all parameters and variables, unles personalized tracking is disabled, then do not track h_id and adr_id
     if (isset($data['adr']) && isset($data['adr']['id']) && check_dbid($data['adr']['id'])) {
         $ADDRESS = new tm_ADR();
         #$personalized=true;
         $a_id = $data['adr']['id'];
         $email = $data['adr']['email'];
         $code = $data['adr']['code'];
         $memo = $data['adr']['memo'];
         $f0 = $data['adr']['f0'];
         $f1 = $data['adr']['f1'];
         $f2 = $data['adr']['f2'];
         $f3 = $data['adr']['f3'];
         $f4 = $data['adr']['f4'];
         $f5 = $data['adr']['f5'];
         $f6 = $data['adr']['f6'];
         $f7 = $data['adr']['f7'];
         $f8 = $data['adr']['f8'];
         $f9 = $data['adr']['f9'];
         $AGroups = $ADDRESS->getGroup(0, $a_id, $frm_id, 0, array("aktiv" => 1, "public" => 1));
         //fetch only public groups! dont show internal groups, "public_frm_ref"=>1, to show only pub groups with ref to form!
     }
     if (isset($data['q']) && isset($data['q']['id']) && check_dbid($data['q']['id'])) {
         $q_id = $data['q']['id'];
     }
     if (isset($data['h']) && isset($data['h']['id']) && check_dbid($data['h']['id'])) {
         $h_id = $data['h']['id'];
     }
     //parse date
     //if valid q id, then use send_at date! and convert to format for nl
     //if not valid q_id given, use now
     $QUEUE = new tm_Q();
     $Q = $QUEUE->getQ($q_id);
     if (isset($Q[0])) {
         $DATE = strftime(TM_NL_DATEFORMAT, mk_microtime($Q[0]['send_at']));
     } else {
         $DATE = date(TM_NL_DATEFORMAT);
     }
     //filenames
     //html datei//template for html parts
     $NL_Filename_N = "nl_" . date_convert_to_string($data['nl']['created']) . "_n.html";
     //text datei//template for textparts
     $NL_Filename_T = "nl_" . date_convert_to_string($data['nl']['created']) . "_t.txt";
     //image1
     $NL_Imagename1 = "nl_" . date_convert_to_string($data['nl']['created']) . "_1.jpg";
     //use view.php (1088)
     if ($data['nl']['massmail'] != 1) {
         $NLONLINE_URL = $tm_URL_FE . "/view.php?1=1&amp;nl_id=" . $nl_id . "&amp;q_id=" . $q_id . "&amp;a_id=" . $a_id . "&amp;h_id=" . $h_id;
     } else {
         $NLONLINE_URL = $tm_URL_FE . "/view.php?1=1&amp;nl_id=" . $nl_id . "&amp;q_id=" . $q_id;
     }
     $NLONLINE = "<a href=\"" . $NLONLINE_URL . "\" target=\"_blank\">";
     //template values
     $IMAGE1 = "";
     $IMAGE1_URL = "";
     $LINK1 = "";
     $LINK1_URL = "";
     $ATTACHEMENTS = "";
     $ATTACHEMENTS_TEXT = "";
     $GROUP = "";
     foreach ($AGroups as $AGroup) {
         $GROUP .= display($AGroup['name']) . "<br>";
     }
     //IMAGE1
     if (file_exists($tm_nlimgpath . "/" . $NL_Imagename1)) {
         #send_log("NL Image:".$tm_URL_FE."/".$tm_nlimgdir."/".$NL_Imagename1);
         $Log[] = "NL Image:" . $tm_URL_FE . "/" . $tm_nlimgdir . "/" . $NL_Imagename1;
         $IMAGE1_URL = $tm_URL_FE . "/" . $tm_nlimgdir . "/" . $NL_Imagename1;
         $IMAGE1 = "<img src=\"" . $IMAGE1_URL . "\" border=0 alt=\"Image1\">";
     }
     //Attachements!
     $attachements = $data['nl']['attachements'];
     $atc = count($attachements);
     if ($atc > 0) {
         foreach ($attachements as $attachfile) {
             $ATTACHEMENTS .= "<a href=\"" . $tm_URL_FE . "/" . $tm_nlattachdir . "/" . $attachfile['file'] . "\" target=\"_blank\" title=\"" . $attachfile['file'] . "\">";
             $ATTACHEMENTS .= $attachfile['file'];
             $ATTACHEMENTS .= "</a><br>\n";
             $ATTACHEMENTS_TEXT .= $attachfile['file'] . ": " . $tm_URL_FE . "/" . $tm_nlattachdir . "/" . $attachfile['file'];
             $ATTACHEMENTS_TEXT .= "\n";
         }
         //foreach
     }
     //if count/atc
     //Blindimage
     if ($data['nl']['track_personalized'] == 1) {
         $BLINDIMAGE_URL = $tm_URL_FE . "/news_blank.png.php?nl_id=" . $nl_id . "&amp;q_id=" . $q_id . "&amp;a_id=" . $a_id . "&amp;h_id=" . $h_id;
     } else {
         //tracking nicht personalisiert, wie massmail!
         //koennte auch ggf oben global gesetzt werden, hier doppelt!
         $BLINDIMAGE_URL = $tm_URL_FE . "/news_blank.png.php?nl_id=" . $nl_id . "&amp;q_id=" . $q_id;
     }
     $BLINDIMAGE = "<img src=\"" . $BLINDIMAGE_URL . "\" border=0 alt=\"\">";
     //no alt!
     #send_log("NL track personalized: ".$data['nl']['track_personalized']);
     $Log[] = "NL track personalized: " . $data['nl']['track_personalized'];
     #send_log("Blindimage: ".$BLINDIMAGE_URL);
     $Log[] = "Blindimage: " . $BLINDIMAGE_URL;
     //link to unsubscribe
     $UNSUBSCRIBE_URL = $tm_URL_FE . "/unsubscribe.php?nl_id=" . $nl_id . "&amp;q_id=" . $q_id . "&amp;a_id=" . $a_id . "&amp;h_id=" . $h_id . "&amp;code=" . $code;
     $UNSUBSCRIBE = "<a href=\"" . $UNSUBSCRIBE_URL . "\" target=\"_blank\">";
     //subscribe link for touch optin or subscribe
     $SUBSCRIBE_URL = $tm_URL_FE . "/subscribe.php?doptin=1&amp;email=" . $email . "&amp;code=" . $code;
     //."&amp;touch=1"
     //optional fid form id parameter! for optin mails etc
     //check if we have a valid form id, used in subscribe url e.g. for doptin mails!
     if (isset($data['frm']) && isset($data['frm']['id']) && check_dbid($data['frm']['id'])) {
         //add frm_id of form, needed to send subscribe mail and get greeting nl id!
         $SUBSCRIBE_URL .= "&amp;fid=" . $data['frm']['id'];
     }
     $SUBSCRIBE = "<a href=\"" . $SUBSCRIBE_URL . "\" target=\"_blank\">";
     #send_log("Unsubscribe: ".$UNSUBSCRIBE_URL);
     $Log[] = "Unsubscribe: " . $UNSUBSCRIBE_URL;
     #send_log("Subscribe (touch/double optin): ".$SUBSCRIBE_URL);
     $Log[] = "Subscribe (touch/double optin): " . $SUBSCRIBE_URL;
     if (!empty($data['nl']['link'])) {
         if ($data['nl']['track_personalized'] == 1) {
             $LINK1_URL = $tm_URL_FE . "/click.php?nl_id=" . $nl_id . "&amp;q_id=" . $q_id . "&amp;a_id=" . $a_id . "&amp;h_id=" . $h_id;
         } else {
             $LINK1_URL = $tm_URL_FE . "/click.php?nl_id=" . $nl_id . "&amp;q_id=" . $q_id;
         }
     }
     $LINK1 = "<a href=\"" . $LINK1_URL . "\" target=\"_blank\">";
     #send_log("Link1: ".$LINK1_URL);
     $Log[] = "Link1: " . $LINK1_URL;
     //set template vars
     #send_log("parse Template - Massmailing");
     $Log[] = "parse Template";
     $_Tpl_NL = new tm_Template();
     $_Tpl_NL->setTemplatePath($tm_nlpath);
     $_Tpl_NL->setParseValue("IMAGE1", $IMAGE1);
     $_Tpl_NL->setParseValue("LINK1", $LINK1);
     $_Tpl_NL->setParseValue("ATTACH1", "");
     $_Tpl_NL->setParseValue("CLOSELINK", "</a>");
     $_Tpl_NL->setParseValue("BLINDIMAGE", $BLINDIMAGE);
     $_Tpl_NL->setParseValue("UNSUBSCRIBE", $UNSUBSCRIBE);
     $_Tpl_NL->setParseValue("SUBSCRIBE", $SUBSCRIBE);
     $_Tpl_NL->setParseValue("NLONLINE", $NLONLINE);
     $_Tpl_NL->setParseValue("IMAGE1_URL", $IMAGE1_URL);
     $_Tpl_NL->setParseValue("LINK1_URL", $LINK1_URL);
     $_Tpl_NL->setParseValue("ATTACH1_URL", "");
     $_Tpl_NL->setParseValue("NLONLINE_URL", $NLONLINE_URL);
     $_Tpl_NL->setParseValue("BLINDIMAGE_URL", $BLINDIMAGE_URL);
     $_Tpl_NL->setParseValue("UNSUBSCRIBE_URL", $UNSUBSCRIBE_URL);
     $_Tpl_NL->setParseValue("SUBSCRIBE_URL", $SUBSCRIBE_URL);
     $_Tpl_NL->setParseValue("DATE", $DATE);
     $_Tpl_NL->setParseValue("EMAIL", $email);
     $_Tpl_NL->setParseValue("CODE", $code);
     $_Tpl_NL->setParseValue("F0", $f0);
     $_Tpl_NL->setParseValue("F1", $f1);
     $_Tpl_NL->setParseValue("F2", $f2);
     $_Tpl_NL->setParseValue("F3", $f3);
     $_Tpl_NL->setParseValue("F4", $f4);
     $_Tpl_NL->setParseValue("F5", $f5);
     $_Tpl_NL->setParseValue("F6", $f6);
     $_Tpl_NL->setParseValue("F7", $f7);
     $_Tpl_NL->setParseValue("F8", $f8);
     $_Tpl_NL->setParseValue("F9", $f9);
     $_Tpl_NL->setParseValue("MEMO", $memo);
     $_Tpl_NL->setParseValue("TITLE", $data['nl']['title']);
     $_Tpl_NL->setParseValue("TITLE_SUB", $data['nl']['title_sub']);
     $_Tpl_NL->setParseValue("SUMMARY", $data['nl']['summary']);
     $_Tpl_NL->setParseValue("GROUP", $GROUP);
     $_Tpl_NL->setParseValue("SUBJECT", $NLSUBJECT);
     $_Tpl_NL->setParseValue("TM_VERSION", TM_VERSION);
     $_Tpl_NL->setParseValue("TM_APPNAME", TM_APPNAME);
     $_Tpl_NL->setParseValue("TM_APPDESC", TM_APPDESC);
     $_Tpl_NL->setParseValue("TM_APPURL", TM_APPURL);
     $_Tpl_NL->setParseValue("TM_APPTEXT", TM_APPTEXT);
     $_Tpl_NL->setParseValue("TM_DISCLAIMER", TM_DISCLAIMER);
     //add htmlpart!
     if ($type == "html") {
         #if ($data['nl']['content_type']=="html" || $data['nl']['content_type']=="text/html") {
         #send_log("render HTML Template: ".$NL_Filename_N);
         $Log[] = "render HTML Template: " . $NL_Filename_N;
         //attachements html code
         $_Tpl_NL->setParseValue("ATTACHEMENTS", $ATTACHEMENTS);
         //Template rendern und body zusammenbauen
         //create header:
         //1st parse header:
         $HTML_Head = $this->parseHeader(array("text" => TM_NL_HTML_START));
         $HTML_Foot = $this->parseHeader(array("text" => TM_NL_HTML_END));
         //replacement array
         $HTML_search = array("{TITLE}", "{TITLE_SUB}", "{SUBJECT}");
         $HTML_replace = array(display($data['nl']['title']), display($data['nl']['title_sub']), $NLSUBJECT);
         //replace nl vars, title subttle, subject
         $HTML_Head = str_replace($HTML_search, $HTML_replace, $HTML_Head);
         $HTML_Foot = str_replace($HTML_search, $HTML_replace, $HTML_Foot);
         $Return = $HTML_Head . $_Tpl_NL->renderTemplate($NL_Filename_N) . $HTML_Foot;
     }
     //add textpart!
     //use body_text, if body_text is empty or "" or so, convert body to text, this is a fallback, the converting is broken due to wysiwyg and reconverting of e.g. german umlauts to html entitites :O
     if ($type == "text") {
         #if ($data['nl']['content_type']=="text" || $data['nl']['content_type']=="text/html") {
         #if (!empty($NL[0]['body_text']) && $NL[0]['body_text']!="") {
         //attachements text code
         $_Tpl_NL->setParseValue("ATTACHEMENTS", $ATTACHEMENTS_TEXT);
         #$NLBODY_TEXT=$NL[0]['body_text'];
         #send_log("render Text Template: ".$NL_Filename_T);
         $Log[] = "render Text Template: " . $NL_Filename_T;
         $Return = $_Tpl_NL->renderTemplate($NL_Filename_T);
         //text!
         #} else {
         #	$NLBODY_TEXT=$NEWSLETTER->convertNL2Text($NLBODY,$NL[0]['content_type']);
         #}
     }
     //if text text/html
     //finally parse links
     $LINK = new tm_LNK();
     //filter for linkparsing, if text then text, else "" for html version of parsed links
     $filter = "";
     if ($type == "text") {
         $filter = $type;
     }
     if ($data['nl']['track_personalized'] == 1) {
         $Return = $LINK->parseLinks($Return, $filter, array("nl_id" => $nl_id, "q_id" => $q_id, "a_id" => $a_id, "h_id" => $h_id));
     } else {
         $Return = $LINK->parseLinks($Return, $filter, array("nl_id" => $nl_id, "q_id" => $q_id));
     }
     //return string, later on we will return array [0] is text and [1] is log, containing all logmessages as array
     #$Return[0]=$parsedNL Array (subject,body);
     #$Return[1]=$Log;
     return $Return;
 }
Example #18
0
${$InputName_Memo} = getVar($InputName_Memo);
$check = true;
if ($set == "save") {
    //checkinput
    if (empty($email)) {
        $check = false;
        $_MAIN_MESSAGE .= "<br>" . ___("Die E-Mail-Adresse darf nicht leer sein.");
    }
    //email auf gueltigkeit pruefen
    $check_mail = checkEmailAdr($email, $EMailcheck_Intern);
    if (!$check_mail[0]) {
        $check = false;
        $_MAIN_MESSAGE .= "<br>" . ___("Die E-Mail-Adresse ist nicht gültig.") . " " . $check_mail[1];
    }
    if ($check) {
        $ADDRESS = new tm_ADR();
        ///////////////////////////
        //dublettencheck
        $search['email'] = $email;
        //auf existenz pruefen und wenn email noch nicht existiert dann eintragen.
        $ADR = $ADDRESS->getAdr(0, 0, 0, 0, $search);
        $ac = count($ADR);
        //oh! adresse ist bereits vorhanden!
        //wir diffen die gruppen und fuegen nur die referenzen hinzu die noch nicht existieren!
        $new_adr_grp = $adr_grp;
        $adr_exists = false;
        if ($ac > 0) {
            //gruppen denen die adr bereits  angehoert
            $old_adr_grp = $ADDRESS->getGroupID(0, $ADR[0]['id'], 0);
            //neue gruppen nur die die neu sind, denen die adr noch nicht angehoert!
            //adr_grp=gruppen aus dem formular
Example #19
0
        $check = false;
        $_MAIN_MESSAGE .= "<br>" . ___("Wählen Sie ein Newsletter für Updates.");
    }
    if ($check) {
        $FORMULAR = new tm_FRM();
        $FORMULAR->updateForm(array("id" => $frm_id, "name" => $name, "action_url" => $action_url, "descr" => $descr, "aktiv" => $aktiv, "created" => $created, "author" => $author, "use_captcha" => $use_captcha, "digits_captcha" => $digits_captcha, "double_optin" => $double_optin, "subscribe_aktiv" => $subscribe_aktiv, "check_blacklist" => $check_blacklist, "proof" => $proof, "force_pubgroup" => $force_pubgroup, "overwrite_pubgroup" => $overwrite_pubgroup, "multiple_pubgroup" => $multiple_pubgroup, "nl_id_doptin" => $nl_id_doptin, "nl_id_greeting" => $nl_id_greeting, "nl_id_update" => $nl_id_update, "message_doptin" => $message_doptin, "message_greeting" => $message_greeting, "message_update" => $message_update, "submit_value" => $submit_value, "reset_value" => $reset_value, "host_id" => $host_id, "email" => $email, "f0" => $f0, "f1" => $f1, "f2" => $f2, "f3" => $f3, "f4" => $f4, "f5" => $f5, "f6" => $f6, "f7" => $f7, "f8" => $f8, "f9" => $f9, "f0_type" => $f0_type, "f1_type" => $f1_type, "f2_type" => $f2_type, "f3_type" => $f3_type, "f4_type" => $f4_type, "f5_type" => $f5_type, "f6_type" => $f6_type, "f7_type" => $f7_type, "f8_type" => $f8_type, "f9_type" => $f9_type, "f0_required" => $f0_required, "f1_required" => $f1_required, "f2_required" => $f2_required, "f3_required" => $f3_required, "f4_required" => $f4_required, "f5_required" => $f5_required, "f6_required" => $f6_required, "f7_required" => $f7_required, "f8_required" => $f8_required, "f9_required" => $f9_required, "f0_value" => $f0_value, "f1_value" => $f1_value, "f2_value" => $f2_value, "f3_value" => $f3_value, "f4_value" => $f4_value, "f5_value" => $f5_value, "f6_value" => $f6_value, "f7_value" => $f7_value, "f8_value" => $f8_value, "f9_value" => $f9_value, "email_errmsg" => $email_errmsg, "captcha_errmsg" => $captcha_errmsg, "blacklist_errmsg" => $blacklist_errmsg, "pubgroup_errmsg" => $pubgroup_errmsg, "f0_errmsg" => $f0_errmsg, "f1_errmsg" => $f1_errmsg, "f2_errmsg" => $f2_errmsg, "f3_errmsg" => $f3_errmsg, "f4_errmsg" => $f4_errmsg, "f5_errmsg" => $f5_errmsg, "f6_errmsg" => $f6_errmsg, "f7_errmsg" => $f7_errmsg, "f8_errmsg" => $f8_errmsg, "f9_errmsg" => $f9_errmsg, "f0_expr" => $f0_expr, "f1_expr" => $f1_expr, "f2_expr" => $f2_expr, "f3_expr" => $f3_expr, "f4_expr" => $f4_expr, "f5_expr" => $f5_expr, "f6_expr" => $f6_expr, "f7_expr" => $f7_expr, "f8_expr" => $f8_expr, "f9_expr" => $f9_expr), $adr_grp, $adr_grp_pub);
        //+öffentliche gruppen
        $_MAIN_MESSAGE .= "<br>" . sprintf(___("Formular %s wurde bearbeitet."), "'<b>" . display($name) . "</b>'");
        $action = "form_list";
        include_once TM_INCLUDEPATH . "/form_list.inc.php";
    } else {
        require_once TM_INCLUDEPATH . "/form_form.inc.php";
        require_once TM_INCLUDEPATH . "/form_form_show.inc.php";
    }
} else {
    $ADDRESS = new tm_ADR();
    $adr_grp_pub = $ADDRESS->getGroupID(0, 0, $frm_id, array("public_frm_ref" => 1));
    $adr_grp = $ADDRESS->getGroupID(0, 0, $frm_id);
    //hier diffen, da die adressen die als public gewaehlt sind nict als default markiert werden sollen...., öhm, ja!
    //und adr_grp neu arrangieren
    $adr_grp = array_diff($adr_grp, $adr_grp_pub);
    $adr_grp = array_values($adr_grp);
    $name = $FRM[0]['name'];
    $action_url = $FRM[0]['action_url'];
    $descr = $FRM[0]['descr'];
    $aktiv = $FRM[0]['aktiv'];
    $double_optin = $FRM[0]['double_optin'];
    $use_captcha = $FRM[0]['use_captcha'];
    $digits_captcha = $FRM[0]['digits_captcha'];
    $subscribe_aktiv = $FRM[0]['subscribe_aktiv'];
    $check_blacklist = $FRM[0]['check_blacklist'];
/* Contact/Kontakt: info@tellmatic.org                                      */
/* Homepage: www.tellmatic.org                                                   */
/* leave this header in file!                                                   */
/* diesen Header nicht loeschen!                                                */
/* check Homepage for Updates and more Infos                                    */
/* Besuchen Sie die Homepage fuer Updates und weitere Infos                     */
/********************************************************************************/
exit;
//remove this line or add # in front of line
//inclue tm config
include "./include/tm_config.inc.php";
//change path to full path to tm_config if the script is not in tellmatic installation directory!
//Beispielcode: Adressen mit mehr als 1 Gruppe anzeigen
//This is just a very simple example!
//neues address-objekt
$ADR = new tm_ADR();
//
$A = array();
//array mit allen addressids
$B = array();
//zielarray mit addressids mit mehr als 1 gruppe
$bn = 0;
//zaehler f. adressen > 1 gruppe
//Array A fuellen mit AddressIDs aus der DB
//syntax:   function getAdrID($group_id=0,$search=Array())
$A = $ADR->getAdrID();
echo print_r($A, TRUE);
echo "<hr>";
//Array durchwandern und jede Adresse pruefen
foreach ($A as $adr_id) {
    $G = array();
Example #21
0
    }
    $Form->add_InputOption($FormularName, $InputName_Group, $GRP[$accg]['id'], $grp_name . " (" . $GRP[$accg]['adr_count'] . ")");
}
//Public Group, subscriber can choose
$Form->new_Input($FormularName, $InputName_GroupPub, "select", "");
$Form->set_InputJS($FormularName, $InputName_GroupPub, " onChange=\"flash('submit','#ff0000');\" ");
//$Form->set_InputDefault($FormularName,$InputName_GroupPub,$adr_grp_pub);
$Form->set_InputStyleClass($FormularName, $InputName_GroupPub, "mFormSelect", "mFormSelectFocus");
$Form->set_InputDesc($FormularName, $InputName_GroupPub, ___("Gruppen wählen, STRG/CTRL gedrückt halten und klicken f. Mehrfachauswahl"));
$Form->set_InputReadonly($FormularName, $InputName_GroupPub, false);
$Form->set_InputOrder($FormularName, $InputName_GroupPub, 13);
$Form->set_InputLabel($FormularName, $InputName_GroupPub, "");
$Form->set_InputSize($FormularName, $InputName_GroupPub, 0, 5);
$Form->set_InputMultiple($FormularName, $InputName_GroupPub, true);
//add Data
$ADDRESS = new tm_ADR();
$GRPPUB = $ADDRESS->getGroup(0, 0, 0, 1, array("public" => 1));
$acgp = count($GRPPUB);
for ($accgp = 0; $accgp < $acgp; $accgp++) {
    $grp_name = $GRPPUB[$accgp]['name'];
    if ($GRPPUB[$accgp]['aktiv'] != 1) {
        $grp_name .= " (na)";
    }
    $Form->add_InputOption($FormularName, $InputName_GroupPub, $GRPPUB[$accgp]['id'], $grp_name . " [" . $GRPPUB[$accgp]['public_name'] . "] (" . $GRPPUB[$accgp]['adr_count'] . ")");
}
//SubmitValue
$Form->new_Input($FormularName, $InputName_SubmitValue, "text", display(${$InputName_SubmitValue}));
$Form->set_InputJS($FormularName, $InputName_SubmitValue, " onChange=\"flash('submit','#ff0000');\" ");
$Form->set_InputStyleClass($FormularName, $InputName_SubmitValue, "mFormText", "mFormTextFocus");
$Form->set_InputSize($FormularName, $InputName_SubmitValue, 32, 255);
$Form->set_InputDesc($FormularName, $InputName_SubmitValue, "");
Example #22
0
/* this file is part of: / diese Datei ist ein Teil von:                        */
/* tellmatic, the newslettermachine                                             */
/* tellmatic, die Newslettermaschine                                            */
/* 2006/7 by Volker Augustin, multi.art.studio Hanau                            */
/* Contact/Kontakt: info@tellmatic.org                                      */
/* Homepage: www.tellmatic.org                                                   */
/* leave this header in file!                                                   */
/* diesen Header nicht loeschen!                                                */
/* check Homepage for Updates and more Infos                                    */
/* Besuchen Sie die Homepage fuer Updates und weitere Infos                     */
/********************************************************************************/
$_MAIN_DESCR = ___("Newsletter Warteschlange (Q)");
$_MAIN_MESSAGE .= "";
$QUEUE = new tm_Q();
$HOSTS = new tm_HOST();
$ADDRESS = new tm_ADR();
$NEWSLETTER = new tm_NL();
$set = getVar("set");
$val = getVar("val");
$q_id = getVar("q_id");
$nl_id = getVar("nl_id");
$grp_id = getVar("grp_id");
$doit = getVar("doit");
//wird per js an url angefuegt!!! confirm()
//logfile
if (check_dbid($q_id)) {
    $Q = $QUEUE->getQ($q_id);
    $logfilename = "q_.log.html";
    if (isset($Q[0]['id'])) {
        $logfilename = "q_" . $Q[0]['id'] . "_" . $Q[0]['grp_id'] . "_" . date_convert_to_string($Q[0]['created']) . ".log.html";
    }
${$InputName_Public} = getVar($InputName_Public);
$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";
Example #24
0
/* tellmatic, the newslettermachine                                             */
/* tellmatic, die Newslettermaschine                                            */
/* 2006/7 by Volker Augustin, multi.art.studio Hanau                            */
/* Contact/Kontakt: info@tellmatic.org                                      */
/* Homepage: www.tellmatic.org                                                   */
/* leave this header in file!                                                   */
/* diesen Header nicht loeschen!                                                */
/* check Homepage for Updates and more Infos                                    */
/* Besuchen Sie die Homepage fuer Updates und weitere Infos                     */
/********************************************************************************/
$_MAIN_DESCR = ___("Newsletter versenden");
$_MAIN_MESSAGE .= "";
require_once TM_INCLUDEPATH . "/queue_vars.inc.php";
$QUEUE = new tm_Q();
$NEWSLETTER = new tm_NL();
$ADDRESS = new tm_ADR();
//q starten?
if (!isset($startq)) {
    $startq = getVar("startq");
}
//wenn nl id dann queue ids fuer diesen newsletter ermitteln
if (!isset($nl_id)) {
    //damit wir es in queue_new includen koennen.....dort setzen wird diese werte
    $nl_id = getVar("nl_id");
}
if (!isset($q_id)) {
    $q_id = getVar("q_id");
}
if (!isset($grp_id)) {
    $grp_id = getVar("grp_id");
}
/* this file is part of: / diese Datei ist ein Teil von:                        */
/* tellmatic, the newslettermachine                                             */
/* tellmatic, die Newslettermaschine                                            */
/* 2006/7 by Volker Augustin, multi.art.studio Hanau                            */
/* Contact/Kontakt: info@tellmatic.org                                      */
/* Homepage: www.tellmatic.org                                                   */
/* leave this header in file!                                                   */
/* diesen Header nicht loeschen!                                                */
/* check Homepage for Updates and more Infos                                    */
/* Besuchen Sie die Homepage fuer Updates und weitere Infos                     */
/********************************************************************************/
include_once TM_INCLUDEPATH . "/libchart-1.1/libchart.php";
$_MAIN_DESCR = ___("Top X");
$_MAIN_MESSAGE .= "";
$NEWSLETTER = new tm_NL();
$ADDRESS = new tm_ADR();
$QUEUE = new tm_Q();
$FORMULAR = new tm_FRM();
$shownlURLPara = tmObjCopy($mSTDURL);
$shownlURLPara->addParam("s", "s_menu_nl,s_menu_st");
$showformURLPara = tmObjCopy($mSTDURL);
$showformURLPara->addParam("s", "s_menu_frm,s_menu_st");
$showadrURLPara = tmObjCopy($mSTDURL);
$showadrURLPara->addParam("act", "statistic");
$showadrURLPara->addParam("s", "s_menu_adr,s_menu_st");
$showadrURLPara->addParam("set", "adr");
$InputName_TopX = "topx";
$show_top_x = getVar("topx");
if (empty($show_top_x)) {
    $show_top_x = 5;
}
Example #26
0
/* this file is part of: / diese Datei ist ein Teil von:                        */
/* tellmatic, the newslettermachine                                             */
/* tellmatic, die Newslettermaschine                                            */
/* 2006/7 by Volker Augustin, multi.art.studio Hanau                            */
/* Contact/Kontakt: info@tellmatic.org                                      */
/* Homepage: www.tellmatic.org                                                   */
/* leave this header in file!                                                   */
/* diesen Header nicht loeschen!                                                */
/* check Homepage for Updates and more Infos                                    */
/* Besuchen Sie die Homepage fuer Updates und weitere Infos                     */
/********************************************************************************/
include_once TM_INCLUDEPATH . "/libchart-1.1/libchart.php";
$_MAIN_DESCR = ___("Status");
$_MAIN_MESSAGE .= "";
$NEWSLETTER = new tm_NL();
$ADDRESS = new tm_ADR();
$QUEUE = new tm_Q();
$FORMULAR = new tm_FRM();
$shownlgURLPara = tmObjCopy($mSTDURL);
$shownlgURLPara->addParam("act", "nl_grp_list");
$shownlgURLPara->addParam("s", "s_menu_nl,s_menu_st");
$shownlgURLPara_ = $shownlgURLPara->getAllParams();
$shownlURLPara = tmObjCopy($mSTDURL);
$shownlURLPara->addParam("s", "s_menu_nl,s_menu_st");
$showformURLPara = tmObjCopy($mSTDURL);
$showformURLPara->addParam("s", "s_menu_frm,s_menu_st");
$showadrURLPara = tmObjCopy($mSTDURL);
$showadrURLPara->addParam("act", "statistic");
$showadrURLPara->addParam("s", "s_menu_adr,s_menu_st");
$showadrURLPara->addParam("set", "adr");
$showadrgURLPara = tmObjCopy($mSTDURL);
Example #27
0
$InputName_Blacklist = "check_blacklist";
${$InputName_Blacklist} = getVar($InputName_Blacklist);
$InputName_Proof = "proof";
${$InputName_Proof} = getVar($InputName_Proof);
$check = true;
//abgeschickt?
if ($set == "save") {
    if (!empty($nl_id)) {
        $HOST = $HOSTS->getHost($host_id, array("aktiv" => 1, "type" => "smtp"));
        //SMTP Server ausgewaehlt?
        if (count($HOST) == 1) {
            $gc = count($adr_grp);
            //sind ueberhaupt gruppen gewaehlt???
            if ($gc > 0) {
                $QUEUE = new tm_Q();
                $ADDRESS = new tm_ADR();
                $_MAIN_MESSAGE .= "<br>" . sprintf(___("Ausgewählter Mail-Server: %s"), $HOST[0]['name']);
                if ($check_blacklist == 1) {
                    $_MAIN_MESSAGE .= "<br>" . tm_icon("ruby.png", ___("Blacklist")) . "&nbsp;" . ___("Blacklist Überprüfung aktiv");
                }
                //nur q eintraege hinzufügen die noch nicht vorhanden sind oder status gesendet haben
                //status gesendet=4,
                //NICHT:    neu=1, gestartet/wait=2, running=3
                //fuer jede gruppe im array adr_grp!
                for ($gcc = 0; $gcc < $gc; $gcc++) {
                    $group_add = false;
                    $grp_id = $adr_grp[$gcc];
                    $GRP = $ADDRESS->getGroup($grp_id);
                    //function getQ($id=0,$offset=0,$limit=0,$nl_id=0,$grp_id=0,$status=0)
                    $Qnew = $QUEUE->getQ(0, 0, 0, $nl_id, $grp_id, 1);
                    $qc_new = count($Qnew);
Example #28
0
      if adr not exists and no double optin is used, send notify mail to user/admin
      if adr already exists, send update mail to user/admin (optional)
      if adr not exists, count/add subscription to form
      show successmessage      $Form_Filename
if we have a valid form and set is not set to 'save' yet, no double optin confirmation or form input not ok: show form 
*/
if (!isset($_CONTENT)) {
    $_CONTENT = "";
}
if (!isset($called_via_url)) {
    $called_via_url = true;
}
$HOSTS = new tm_HOST();
$NEWSLETTER = new tm_NL();
$FORMULAR = new tm_FRM();
$ADDRESS = new tm_ADR();
$_Tpl_FRM = new tm_Template();
$MESSAGE = "";
$OUTPUT = "";
if (DEBUG && $called_via_url) {
    $OUTPUT .= tm_debugmessage("called via url");
}
if (DEBUG && !$called_via_url) {
    $OUTPUT .= tm_debugmessage("included");
}
$date_sub = date(TM_NL_DATEFORMAT);
//used in template and email, formatted
if (!isset($frm_id) || empty($frm_id)) {
    $frm_id = getVar("fid", 0, 0);
    //formular id, slashes, default=0
}
Example #29
0
$_MAIN_MESSAGE .= "";
if (!isset($offset)) {
    $offset = getVar("offset");
}
if (empty($offset) || $offset < 0) {
    $offset = 0;
}
if (!isset($limit)) {
    $limit = getVar("limit");
}
if (empty($limit)) {
    $limit = 25;
}
$no_list = getVar("no_list");
//sort und sorttype nach search verschoben
$ADDRESS = new tm_ADR();
$QUEUE = new tm_Q();
$BLACKLIST = new tm_BLACKLIST();
$adr_grp_id = getVar("adr_grp_id");
$adr_id = getVar("adr_id");
$set = getVar("set");
$val = getVar("val");
$doit = getVar("doit");
//wird per js an url angefuegt!!! confirm()
if (!isset($search)) {
    $search = array();
}
require_once TM_INCLUDEPATH . "/adr_search.inc.php";
if ($no_list != 1) {
    if ($set == "aktiv") {
        $ADDRESS->setAktiv($adr_id, $val);
Example #30
0
        }
        $Form->add_InputOption($FormularName, $InputName_NL, $NL[$ncc]['id'], $NLOpt);
    }
}
//Gruppe
$Form->new_Input($FormularName, $InputName_Group, "select", "");
$Form->set_InputJS($FormularName, $InputName_Group, " onChange=\"flash('submit','#ff0000');\" ");
$Form->set_InputStyleClass($FormularName, $InputName_Group, "mFormSelect", "mFormSelectFocus");
$Form->set_InputDesc($FormularName, $InputName_Group, ___("Gruppen wählen, STRG/CTRL gedrückt halten und klicken f. Mehrfachauswahl"));
$Form->set_InputReadonly($FormularName, $InputName_Group, false);
$Form->set_InputOrder($FormularName, $InputName_Group, 2);
$Form->set_InputLabel($FormularName, $InputName_Group, "");
$Form->set_InputSize($FormularName, $InputName_Group, 0, 5);
$Form->set_InputMultiple($FormularName, $InputName_Group, true);
//add Data
$ADDRESS = new tm_ADR();
$GRP = $ADDRESS->getGroup(0, 0, 0, 1, array("aktiv" => 1, "prod" => 1));
$acg = count($GRP);
for ($accg = 0; $accg < $acg; $accg++) {
    $valid_adr_c = $ADDRESS->countValidADR($GRP[$accg]['id']);
    if ($valid_adr_c > 0) {
        $Form->add_InputOption($FormularName, $InputName_Group, $GRP[$accg]['id'], display($GRP[$accg]['name']) . " (" . $GRP[$accg]['adr_count'] . " / " . $valid_adr_c . " " . ___("Adressen") . ")");
    }
}
//use blacklist?
$Form->new_Input($FormularName, $InputName_Blacklist, "checkbox", 1);
$Form->set_InputJS($FormularName, $InputName_Blacklist, " onChange=\"flash('submit','#ff0000');\"");
$Form->set_InputDefault($FormularName, $InputName_Blacklist, 1);
$Form->set_InputStyleClass($FormularName, $InputName_Blacklist, "mFormText", "mFormTextFocus");
$Form->set_InputSize($FormularName, $InputName_Blacklist, 48, 256);
$Form->set_InputDesc($FormularName, $InputName_Blacklist, ___("Blacklist prüfen"));