eigenes bild --> extension auslesen, jpg oder png erzeugen
	global? --> globale settings auslesen
		blank? --> blank png erzeugen
		eigenes bild --> extension auslesen, jpg oder png erzeugen

	bild ausgeben.
*/
$h_id = getVar("h_id");
$nl_id = getVar("nl_id");
$a_id = getVar("a_id");
$TrackImageType = "png";
$create_track_image = false;
if (checkid($nl_id)) {
    $NEWSLETTER = new tm_NL();
    //nl holen
    $NL = $NEWSLETTER->getNL($nl_id);
    //wenn newsletter gefunden, ok
    if (count($NL) > 0) {
        $create_track_image = true;
    }
    //nl view counter ++
    $NEWSLETTER->addView($nl_id);
    //history id? dann in der historie auf view setzen!
    if (checkid($h_id)) {
        $QUEUE = new tm_Q();
        //nur der erste aufruf wird mit der ip versehen! ansonsten wuerde diese jedesmal ueberschrieben wenn der leser oder ein anderer das nl anschaut.
        $H = $QUEUE->getH($h_id);
        if (isset($H[0])) {
            //https://sourceforge.net/tracker/?func=detail&aid=3114571&group_id=190396&atid=933192
            if (empty($H[0]['ip']) || $H[0]['ip'] == '0.0.0.0') {
                $QUEUE->setHIP($H[0]['id'], getIP());
    $show_top_x = 5;
}
////////////////////////////////////////////////////////////////////////////////////////
require_once TM_INCLUDEPATH . "/status_top_x_form.inc.php";
require_once TM_INCLUDEPATH . "/status_top_x_form_show.inc.php";
////////////////////////////////////////////////////////////////////////////////////////
$_MAIN_OUTPUT .= "<center>";
$_MAIN_OUTPUT .= "<table border=0 ><tr><td valign=top align=left>";
////////////////////////////////////////////////////////////////////////////////////////
//NL Views
////////////////////////////////////////////////////////////////////////////////////////
$_MAIN_OUTPUT .= "<h2>" . sprintf(___("TOP %s - Newsletter"), $show_top_x) . "</h2>";
$_MAIN_OUTPUT .= "<b>" . ___("Views") . "</b>";
$shownlURLPara->addParam("act", "statistic");
$shownlURLPara->addParam("set", "nl");
$NL = $NEWSLETTER->getNL(0, 0, $show_top_x, 0, 0, "views", 1);
$nc = count($NL);
for ($ncc = 0; $ncc < $nc; $ncc++) {
    if (!empty($NL[$ncc]['views'])) {
        $shownlURLPara->addParam("nl_id", $NL[$ncc]['id']);
        $shownlURLPara_ = $shownlURLPara->getAllParams();
        $_MAIN_OUTPUT .= "<br>" . ($ncc + 1) . ".) <a href=\"" . $tm_URL . "/" . $shownlURLPara_ . "\">" . $NL[$ncc]['subject'] . "</a> (" . $NL[$ncc]['views'] . ")";
    }
}
////////////////////////////////////////////////////////////////////////////////////////
//NL - Clicks
////////////////////////////////////////////////////////////////////////////////////////
$_MAIN_OUTPUT .= "<br><b>" . ___("Klicks") . "</b>";
$NL = $NEWSLETTER->getNL(0, 0, $show_top_x, 0, 0, "clicks", 1);
$nc = count($NL);
for ($ncc = 0; $ncc < $nc; $ncc++) {
//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: letzte X Newsletter anzeigen, newsletter aber aus q holen! nur mit status versendet!
//"Newsletter-Archiv"
//This is just a very simple example!
$nl_offset = 0;
//offset, kann auch aus $_GET oder per getVar ermittelt werden....
$nl_limit = 10;
//anzahl anzuzeigender newsletter
$nl_content = 0;
//do not return content
$nl_grpid = 0;
//nl group, 0=all groups
$QUEUE = new tm_Q();
$NL = new tm_NL();
$search_nl['is_template'] = 0;
$search_nl['aktiv'] = 1;
$search_nl['status'] = array(3, 4, 5);
//started, sent, archiv, see Stats.inc.php
$Q = $QUEUE->getQ(0, 0, $nl_limit, 0, $nl_grpid, 4);
foreach ($Q as $q) {
    $N = $NL->getNL($q['nl_id'], 0, 1, 0, 1, "", 1, $search_nl);
    $nl = $N[0];
    $nl_image = "nl_" . date_convert_to_string($nl['created']) . "_1.jpg";
    $nl_imageurl = $tm_URL_FE . "/" . $tm_nlimgdir . "/" . $nl_image;
    echo "created " . display($nl['created']) . " by " . display($nl['author']) . "\n<br>\n" . "last updated " . display($nl['updated']) . " by " . display($nl['editor']) . "\n<br>\n" . "<a href=\"" . $nl['link'] . "\" target=\"_blank\">" . display($nl['title']) . "<br>" . display($nl['title_sub']) . "</a>" . "\n<br>\n" . display($nl['summary']) . "\n<br>\n" . "<a href=\"" . $nl['link'] . "\" target=\"_blank\">" . "<img src=\"" . $nl_imageurl . "\" border=0 width=200 height=200>\n" . "\n<br>\n" . display($nl_imageurl) . "</a>" . "</font>\n";
    echo "<hr>\n";
}
//for / foreach
 /**
  * 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;
 }
}
//NL send as update mail
$Form->new_Input($FormularName, $InputName_NLUpdate, "select", "");
$Form->set_InputJS($FormularName, $InputName_NLUpdate, " onChange=\"flash('submit','#ff0000');\" ");
$Form->set_InputDefault($FormularName, $InputName_NLUpdate, $nl_id_update);
$Form->set_InputStyleClass($FormularName, $InputName_NLUpdate, "mFormSelect", "mFormSelectFocus");
$Form->set_InputDesc($FormularName, $InputName_NLUpdate, ___("Newsletter wählen"));
$Form->set_InputReadonly($FormularName, $InputName_NLUpdate, false);
$Form->set_InputOrder($FormularName, $InputName_NLUpdate, 15);
$Form->set_InputLabel($FormularName, $InputName_NLUpdate, "");
$Form->set_InputSize($FormularName, $InputName_NLUpdate, 0, 1);
$Form->set_InputMultiple($FormularName, $InputName_NLUpdate, false);
//add Data
$NEWSLETTER = new tm_NL();
//nur aktive, keine templates
$NL = $NEWSLETTER->getNL(0, 0, 0, 0, 0, $sortIndex = "id", $sortType = 1, array("aktiv" => 1, "is_template" => 1));
//, "massmail"=>0 does not work yet
$nc = count($NL);
$Form->add_InputOption($FormularName, $InputName_NLUpdate, 0, "--");
for ($ncc = 0; $ncc < $nc; $ncc++) {
    //only use personalized mailing!
    if ($NL[$ncc]['massmail'] == 0) {
        //nur nl mit existierenden templates f. html/textparts
        if (file_exists($tm_nlpath . "/nl_" . date_convert_to_string($NL[$ncc]['created']) . "_n.html") && file_exists($tm_nlpath . "/nl_" . date_convert_to_string($NL[$ncc]['created']) . "_t.txt")) {
            $NLSubj = display($NL[$ncc]['subject']);
            $Form->add_InputOption($FormularName, $InputName_NLUpdate, $NL[$ncc]['id'], $NLSubj);
        }
    }
}
//Beschreibung
$Form->new_Input($FormularName, $InputName_Descr, "textarea", display(${$InputName_Descr}));
//delete logfile
if ($set == "delete_log" && $doit == 1) {
    $Q = $QUEUE->getQ($q_id);
    if (isset($Q[0]['id'])) {
        if (!DEMO && @unlink($tm_logpath . "/" . $logfilename)) {
            $_MAIN_MESSAGE .= "<br>" . ___("Logfile wurde gelöscht.");
        } else {
            $_MAIN_MESSAGE .= "<br>" . ___("Logfile konnte nicht gelöscht werden.");
        }
    }
    //isset Q[id]
}
//if newsletter id is set
//q f. liste holen
if (check_dbid($nl_id)) {
    $NL = $NEWSLETTER->getNL($nl_id);
    $_MAIN_MESSAGE .= "<br>" . sprintf(___("gewähltes Newsletter: %s"), " <b>" . display($NL[0]['subject']) . "</b>");
}
//if address group id is set
if (check_dbid($grp_id)) {
    $GRP = $ADDRESS->getGroup($grp_id);
    $_MAIN_MESSAGE .= "<br>" . sprintf(___("gewählte Gruppe: %s"), " <b>" . display($GRP[0]['name']) . "</b>");
}
//get Queue Entry
$Q = $QUEUE->getQ($id = 0, $offset = 0, $limit = 0, $nl_id, $grp_id, $status = 0, $search = array());
//count entries
$qc = count($Q);
//Action URLS
$reloadURLPara = tmObjCopy($mSTDURL);
$reloadURLPara->addParam("act", "queue_list");
$reloadURLPara->addParam("nl_id", $nl_id);
 $GRP = $ADDRESS->getGroup($Q[0]['grp_id']);
 if (DEBUG) {
     $_MAIN_MESSAGE .= "\nGRP:\n";
 }
 if (DEBUG) {
     $_MAIN_MESSAGE .= print_r($GRP, TRUE);
 }
 //hier pruefung ob host, nl und gruppen ueberhaupt noch existieren...... sonst undefined index wenn ein spassvogel die hosts oder nl oder adrgrp etc loescht
 if ($qcc == 0) {
     $_MAIN_MESSAGE .= "<br>" . sprintf(___("Ausgewählter Mail-Server: %s"), $HOST[0]['name']);
 }
 //nur erster durchlauf
 //wenn status ok, also neu 1, gestartet 2 oder angehalten 5
 //dann neu eintrag in sendeliste/history, q_id, nl_id, grp_id, adr_id
 if ($Q[0]['status'] == 1 || $Q[0]['status'] == 2 || $Q[0]['status'] == 5) {
     $NL = $NEWSLETTER->getNL($Q[0]['nl_id'], 0, 0, 0, 0);
     if (DEBUG) {
         echo "\nNL:\n";
     }
     if (DEBUG) {
         print_r($NL);
     }
     //wenn das Newsletter auch wirklich aktiv ist......
     if ($NL[0]['aktiv'] == 1) {
         $_MAIN_MESSAGE .= "<br>&nbsp;&nbsp;'<b><em>" . display($NL[0]['subject']) . "</em></b>'";
         $_MAIN_MESSAGE .= "&nbsp;&nbsp;==&gt;&nbsp;&nbsp;'<b>" . display($GRP[0]['name']) . "</b>'";
         $hc_fastinsert = $QUEUE->addHQ(array('nl_id' => $Q[0]['nl_id'], 'q_id' => $Q[0]['id'], 'grp_id' => $Q[0]['grp_id'], 'host_id' => $Q[0]['host_id'], 'status' => 1, 'created' => date("Y-m-d H:i:s")));
         $hqtime = $HQTimer->MidResult();
         if (DEBUG) {
             $_MAIN_MESSAGE .= "\nhc_fastinsert:\n";
         }
Beispiel #8
0
 //set log_q_id, nl_id and adr_id
 $log_q_id = $QP[$qpcc]['id'];
 $log_nl_id = $QP[$qpcc]['nl_id'];
 $log_grp_id = $QP[$qpcc]['grp_id'];
 send_log("Preparing " . ($qpcc + 1) . " of {$qpc} Qs");
 send_log("begin");
 send_log("QID=" . $QP[$qpcc]['id']);
 send_log("Status=" . $QP[$qpcc]['status']);
 send_log("nl_id=" . $QP[$qpcc]['nl_id']);
 send_log("grp_id=" . $QP[$qpcc]['grp_id']);
 send_log("host_id=" . $QP[$qpcc]['host_id']);
 send_log("send_at=" . $QP[$qpcc]['send_at']);
 send_log("autogen=" . $QP[$qpcc]['autogen']);
 $ReportMail_HTML = "";
 $G = $ADDRESS->getGroup($QP[$qpcc]['grp_id']);
 $NL = $NEWSLETTER->getNL($QP[$qpcc]['nl_id']);
 $HOST = $HOSTS->getHost($QP[$qpcc]['host_id'], array("aktiv" => 1, "type" => "smtp"));
 send_log("q status=1, q autogen =1");
 send_log("creating recipients list:");
 $h_refresh = $QUEUE->addHQ(array('nl_id' => $QP[$qpcc]['nl_id'], 'q_id' => $QP[$qpcc]['id'], 'grp_id' => $QP[$qpcc]['grp_id'], 'host_id' => $QP[$qpcc]['host_id'], 'status' => 1, 'created' => date("Y-m-d H:i:s")));
 #proof?!
 if ($C[0]['proof'] == 1) {
     if (DEBUG) {
         $MESSAGE .= send_log("proofing global enabled");
     }
     if ($QP[$qpcc]['proof'] == 1) {
         if (DEBUG) {
             $MESSAGE .= send_log("proofing for this q enabled");
         }
         $ADDRESS->proof();
     } else {
     $_MAIN_OUTPUT .= "<br>" . tm_icon("group_error.png", ___("Auswahl öffentlicher Gruppen erzwingen")) . "&nbsp;" . ___("Auswahl öffentlicher Gruppen erzwingen") . ",&nbsp;";
     $_MAIN_OUTPUT .= "<br>&nbsp;&nbsp;&nbsp;" . ___("Fehlermeldung") . ": <em>" . display($FRM[$acc]['pubgroup_errmsg']) . "</em>";
 } else {
     #$_MAIN_OUTPUT.=  "<br>".tm_icon("group.png",___("Auswahl öffentlicher Gruppen nicht erzwingen"))."&nbsp;".___("Auswahl öffentlicher Gruppen nicht erzwingen").",&nbsp;";
 }
 //update/overwrite pubgroup refs
 if ($FRM[$acc]['force_pubgroup'] == 1) {
     $_MAIN_OUTPUT .= "<br>" . tm_icon("group_gear.png", ___("Gruppen überschreiben")) . "&nbsp;" . ___("Gruppen überschreiben") . ",&nbsp;";
 } else {
     #$_MAIN_OUTPUT.=  "<br>".tm_icon("group_link.png",___("Gruppen aktualisieren, nur Neue hinzufügen"))."&nbsp;".___("Gruppen aktualisieren, nur Neue hinzufügen").",&nbsp;";
 }
 //newsletters that are sent as double-optin mail and greeting mail!
 $NEWSLETTER = new tm_NL();
 $_MAIN_OUTPUT .= "<br>" . tm_icon("newspaper_link.png", ___("Double Opt-in Mail")) . "&nbsp;" . ___("Newsletter welcher als Double-Opt-In Mail verschickt wird") . ":";
 if (check_dbid($FRM[$acc]['nl_id_doptin'])) {
     $NLDOptin = $NEWSLETTER->getNL($FRM[$acc]['nl_id_doptin']);
     $_MAIN_OUTPUT .= "<br>" . display($NLDOptin[0]['subject']);
 } else {
     $_MAIN_OUTPUT .= ___("-- STANDARD --");
 }
 $_MAIN_OUTPUT .= "<br>" . tm_icon("newspaper_add.png", ___("Bestätigungs-Mail")) . "&nbsp;" . ___("Newsletter welcher als Bestätigungs-Mail verschickt wird") . ":";
 if (check_dbid($FRM[$acc]['nl_id_greeting'])) {
     $NLGreeting = $NEWSLETTER->getNL($FRM[$acc]['nl_id_greeting']);
     $_MAIN_OUTPUT .= "<br>" . display($NLGreeting[0]['subject']);
 } else {
     $_MAIN_OUTPUT .= ___("-- STANDARD --");
 }
 $_MAIN_OUTPUT .= "<br>" . tm_icon("newspaper_go.png", ___("Aktulisierungs-Mail")) . "&nbsp;" . ___("Newsletter welcher als Aktualisierungs-Mail verschickt wird") . ":";
 if (check_dbid($FRM[$acc]['nl_id_update'])) {
     $NLUpdate = $NEWSLETTER->getNL($FRM[$acc]['nl_id_update']);
     $_MAIN_OUTPUT .= "<br>" . display($NLUpdate[0]['subject']);
//do not return content
$nl_grpid = 0;
//nl group, 0=all groups
//umstaendehalber koennte man auch das sendedatum aus der q auslesen!
//wir gehen aber den einfachen weg
//neues address-objekt
$NL = new tm_NL();
$search_nl['is_template'] = 0;
$search_nl['aktiv'] = 1;
$search_nl['status'] = array(3, 4, 5);
//started, sent, archiv, see Stats.inc.php
#$N=Array();//array
//function getNL($id=0,$offset=0,$limit=0,$group_id=0,$return_content=0,$sortIndex="",$sortType=0, $search=Array())
//get nl_limit newsletters with offset nl_offset and sort by nl_sortIndex, and return Content
//hole nl_limit newsletter, ab nl_offset , sortiere vorher nach nl_sortIndex und gib den Inhalt und Details zurueck
$N = $NL->getNL(0, $nl_offset, $nl_limit, 0, 1, "updated", 1, $search_nl);
#, $nl_grpid, $nl_content, $nl_sortIndex);
echo "<table border=1 width=600>\n";
echo "<tbody>\n";
echo "<tr>\n";
//Array durchwandern und jede Adresse pruefen
$ni = 0;
foreach ($N as $nl) {
    #for ($ni=0;$ni<$nl_limit;$ni++) {
    #	$nl=$N[$ni];
    #if ($nl['status']==3 || $nl['status']==4 || $nl['status']==5 ) {
    $nl_image = "nl_" . date_convert_to_string($nl['created']) . "_1.jpg";
    $nl_imageurl = $tm_URL_FE . "/" . $tm_nlimgdir . "/" . $nl_image;
    echo "<td width=" . round(600 / $nl_columns) . " height=" . round(600 / $nl_rows) . " align=\"center\" valign=\"middle\">\n";
    echo "<font size=1>created " . display($nl['created']) . " by " . display($nl['author']) . "\n<br>\n" . "last updated " . display($nl['updated']) . " by " . display($nl['editor']) . "\n<br>\n" . "<a href=\"" . $nl['link'] . "\" target=\"_blank\">" . display($nl['title']) . "<br>" . display($nl['title_sub']) . "</a>" . "\n<br>\n" . display($nl['summary']) . "\n<br>\n" . "<a href=\"" . $nl['link'] . "\" target=\"_blank\">" . "<img src=\"" . $nl_imageurl . "\" border=0 width=200 height=200>\n" . "\n<br>\n" . display($nl_imageurl) . "</a>" . "</font>\n";
    echo "</td>\n";
Beispiel #11
0
        $NEWSLETTER->delNL($nl_id);
    }
    $_MAIN_MESSAGE .= "<br>" . ___("Eintrag wurde gelöscht.");
}
if ($user_is_manager && $set == "delete_history" && $doit == 1) {
    if (!DEMO) {
        $QUEUE->clearH(array("nl_id" => $nl_id, "not_running" => 1));
    }
    $_MAIN_MESSAGE .= "<br>" . ___("Historie wurde gelöscht.");
    //und nun wie unten bei delete_queue:
    //aber stattdessen setzen wir einfach set auf =queue_delete
    //deswegen MUSS das vor queue_delete stehen!!!
}
//del history single
if ($set == "delete_img" && $doit == 1) {
    $NL = $NEWSLETTER->getNL($nl_id);
    if (!DEMO && @unlink($tm_nlimgpath . "/nl_" . date_convert_to_string($NL[0]['created']) . "_1.jpg")) {
        $_MAIN_MESSAGE .= "<br>" . ___("Bild wurde gelöscht.");
    } else {
        $_MAIN_MESSAGE .= "<br>" . ___("Bild konnte nicht gelöscht werden.");
    }
}
if ($set == "delete_html" && $doit == 1) {
    $NL = $NEWSLETTER->getNL($nl_id);
    if (!DEMO && @unlink($tm_nlpath . "/nl_" . date_convert_to_string($NL[0]['created']) . ".html")) {
        $_MAIN_MESSAGE .= "<br>" . ___("HTML Datei wurde gelöscht.");
    } else {
        $_MAIN_MESSAGE .= "<br>" . ___("HTML Datei konnte nicht gelöscht werden.");
    }
}
if ($set == "queue_delete" && $doit == 1) {
Beispiel #12
0
//is personalized mailing?
$track_personalized = FALSE;
//is personalized tracking? (click on links etc, blindimage)
$valid_nl = FALSE;
//valid nl record?
$valid_adr = FALSE;
//valid address record?
$valid_h = FALSE;
//do we have a valid history entry?
$_NEWSLETTER = "";
//check valid nl id
if (check_dbid($nl_id)) {
    //checkid()?
    $NEWSLETTER = new tm_NL();
    //Link holen
    $NL = $NEWSLETTER->getNL($nl_id, 0, 0, 0, 1);
    //check for valid newsletter, must be active and not a template
    if (isset($NL[0]) && $NL[0]['aktiv'] == 1 && $NL[0]['is_template'] != 1) {
        $valid_nl = TRUE;
        if (DEBUG) {
            echo "nl is valid<br>";
        }
        //check if newsletter and tracking is personalized, massmail==0 track-personalized==1 need at least adr or history id here
        if ($NL[0]['massmail'] == 0 && (check_dbid($a_id) || check_dbid($h_id))) {
            $personalized = TRUE;
            if (DEBUG) {
                echo "nl is personalized<br>";
            }
        }
        if ($personalized && $NL[0]['track_personalized'] == 1) {
            $track_personalized = TRUE;