コード例 #1
0
/* 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 (!isset($called_via_url)) {
コード例 #2
0
    $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);
        if ($val == 1) {
            $_MAIN_MESSAGE .= "<br>" . ___("Eintrag wurde aktiviert.");
コード例 #3
0
//
${$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;
    }
    if (!is_numeric($import_offset_user)) {
コード例 #4
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;
 }
コード例 #5
0
ファイル: send_it.php プロジェクト: aydancoskun/octobercms
$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
    global $tm_logpath;
    //make a constant!
コード例 #6
0
ファイル: bl_new.inc.php プロジェクト: aydancoskun/octobercms
 //checkinput
 if (empty($expr)) {
     $check = false;
     $_MAIN_MESSAGE .= "<br>" . ___("Der Ausdruck darf nicht leer sein.");
 }
 //syntaxcheck wenn email
 if ($type == "email") {
     $check_mail = checkEmailAdr($expr, $EMailcheck_Intern);
     if (!$check_mail[0]) {
         $check = false;
         $_MAIN_MESSAGE .= "<br>" . sprintf(___("E-Mail %s hat ein falsches Format."), display($expr)) . " " . $check_mail[1];
     }
 }
 if ($check) {
     if (!DEMO) {
         $BLACKLIST = new tm_BLACKLIST();
         //dublettencheck, anders als in adr_list, dort ist nur typ domain und email, hier wuerde isBlacklisted bei regexp probleme machen, ganze email erwartet!
         //eintrag suchen:
         $BL = $BLACKLIST->getBL(0, array("type" => $type, "expr" => $expr));
         //wenn nix gefunden, eintragen:
         if (count($BL) < 1) {
             $BLACKLIST->addBL(array("siteid" => TM_SITEID, "expr" => $expr, "aktiv" => $aktiv, "type" => $type));
         } else {
             $_MAIN_MESSAGE .= "<br>" . sprintf(___("Der Eintrag %s ist bereits vorhanden."), "'<b>" . display($expr) . "</b>'");
         }
         //if count
     }
     //demo
     $_MAIN_MESSAGE .= "<br>" . sprintf(___("Neuer Eintrag %s wurde angelegt."), "'<b>" . display($expr) . "</b>'");
     $action = "bl_list";
     include_once TM_INCLUDEPATH . "/bl_list.inc.php";
コード例 #7
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 = ___("Blacklist verwalten");
$_MAIN_MESSAGE .= "";
$BLACKLIST = new tm_BLACKLIST();
$bl_id = getVar("bl_id");
$set = getVar("set");
$val = getVar("val");
$doit = getVar("doit");
//wird per js an url angefuegt!!! confirm()
$InputName_Type = "type";
${$InputName_Type} = getVar($InputName_Type);
if (empty(${$InputName_Type})) {
    ${$InputName_Type} = "expr";
}
//sort array:
$sortIndex = getVar("si");
if (empty($sortIndex)) {
    $sortIndex = "type";
}
コード例 #8
0
 	--> 1*3500< 9999
 	get(5000,3500)
 run:1
 	--> 2*3500< 9999
 	get(8500,3500)
 run:2
 	--> 3*3500> 9999
 		limit_run=9999-2*3500=9999-7000=2999
 	get(11000,2999)
 */
 //anzahl adressen die auf einmal in ein array gepackt und geschrieben werden sollen, abhaengig vom Speicher fuer PHP. wird definiert in tm_lib
 $export_limit_run = $adr_row_limit;
 //default limit adressen im array pro durchgang
 //addressen initialisieren
 $ADDRESS = new tm_ADR();
 $BLACKLIST = new tm_BLACKLIST();
 //ggf nach status filtern?
 $search['status'] = $status;
 $code = 0;
 /*********************************************/
 //gesamtanzahl adressen ermitteln
 $adc = $ADDRESS->countAdr($adr_grp_id, $search);
 //grp_id,search//
 $export_total = $adc;
 if (DEBUG) {
     $_MAIN_MESSAGE .= "<br>export_total={$export_total}";
 }
 //wenn limit_usr angegeben ist, und kleiner oder gleich export_total(anzahl eintraege gesamt), dann setze export_total=limit_usr
 //if (limit_usr > 0 && !empty && limit_usr <= export_total) export_total=limit_usr
 if ($export_limit_user > 0 && $export_limit_user <= $export_total) {
     if (DEBUG) {
コード例 #9
0
/* check Homepage for Updates and more Infos                                    */
/* Besuchen Sie die Homepage fuer Updates und weitere Infos                     */
/********************************************************************************/
$_MAIN_DESCR = ___("Blacklist bearbeiten");
$_MAIN_MESSAGE .= "";
$set = getVar("set");
$bl_id = getVar("bl_id");
$created = date("Y-m-d H:i:s");
#$author=$LOGIN->USER['name'];
$InputName_Expr = "expr";
${$InputName_Expr} = getVar($InputName_Expr);
$InputName_Type = "type";
${$InputName_Type} = getVar($InputName_Type);
$InputName_Aktiv = "aktiv";
${$InputName_Aktiv} = getVar($InputName_Aktiv);
$BLACKLIST = new tm_BLACKLIST();
$BL = $BLACKLIST->getBL($bl_id);
if ($set == "save") {
    $check = true;
    //checkinput
    if (empty($expr)) {
        $check = false;
        $_MAIN_MESSAGE .= "<br>" . ___("Der Ausdruck darf nicht leer sein.");
    }
    //syntaxcheck wenn email
    $check_mail = checkEmailAdr($expr, $EMailcheck_Intern);
    if ($type == "email" && !$check_mail[0]) {
        $check = false;
        $_MAIN_MESSAGE .= "<br>" . sprintf(___("E-Mail %s hat ein falsches Format."), display($expr)) . " " . $check_mail[1];
    }
    if ($check) {