"; echo "" .$sql .""; } } return mysql_query($sql); $sql=""; // or die(mysql_error()); } function menu() { echo "Home
"; echo "Nieuwe mailing
"; echo "Mailing overzicht
"; echo "Ingeschreven
"; echo "Import / Export
"; echo "Statistieken
"; echo "Instellingen
"; echo "Help





"; } function getUserId($gebruikersnaam = "" ,$wachtwoord = "") { if (!empty($gebruikersnaam) && !empty($wachtwoord)) { $gebruikersnaam = $_SESSION["gebruikersnaam"]; $wachtwoord = $_SESSION["wachtwoord"]; } if ($gebruikersnaam=='' || $wachtwoord=='') { // redirect naar login pagina } $gebruikersId = 0; $result = database("SELECT * FROM gebruiker JOIN klant ON geb_cKla=kla_iId WHERE geb_cNam='" .addslashes($gebruikersnaam) ."' AND geb_cWac='" .addslashes($wachtwoord) ."'"); while($row = mysql_fetch_array($result)) { $gebruikersId = $row["geb_iId"]; } if ($gebruikersId==0) { return false; } else { return $gebruikersId; } } function getKlantId($gebruikersId = 0) { $klaId=''; if ($gebruikersId=='') { $gebruikersId = 0; } // echo "SELECT kla_iId FROM gebruiker JOIN klant ON geb_cKla=kla_iId WHERE geb_iId=" .$gebruikersId; $result_ma = database("SELECT kla_iId FROM gebruiker JOIN klant ON geb_cKla=kla_iId WHERE geb_iId=" .$gebruikersId,0); while($row_ma = mysql_fetch_array($result_ma)) { $klaId = $row_ma["kla_iId"]; } if ($klaId=='') { return false; } else { return $klaId; } } /* function stripos($haystack, $needle, $offset=0) { if (strlen(strpos(strtolower($haystack), strtolower($needle), $offset))==0) { return -1; }else { // echo "strpos: " .strpos(strtolower($haystack), strtolower($needle), $offset); return strpos(strtolower($haystack), strtolower($needle), $offset); } } */ function createDateFormat($datum) { $arrDatum["year"] = substr($datum,0,4); $arrDatum["month"] = substr($datum,4,2); $arrDatum["day"] = substr($datum,6,2); $arrDatum["hour"] = substr($datum,8,2); $arrDatum["minute"] = substr($datum,10,2); return $arrDatum; } function stripTechniek($techniek) { for ($i=0; $i "; break; case "P": echo " "; break; case "M": echo " "; break; case "V": echo "Visual Basic"; break; case "A": echo "AJAX"; break; case "B": echo " "; break; case "Z": echo "ASP"; break; case "X": echo "XML"; break; case "N": echo ".NET"; break; } } } function fckedit($naam = "", $content = NULL) { if (strlen($content)==0) { $content = " "; } $sBasePath = "/mailing.v3/fckeditor/"; if ($naam=="") { $oFCKeditor = new FCKeditor(uniqid(rand())) ; } else { $oFCKeditor = new FCKeditor($naam); } $oFCKeditor->BasePath = $sBasePath ; $oFCKeditor->ToolbarSet = "Basic"; $oFCKeditor->Value = $content; $oFCKeditor->Create() ; } function dateTranslate($datum = '', $to_mysql = 0) { if ($datum=='') { $datum=date("Y-m-d H:i:s"); } // echo "

" .$datum ."

"; $maand = array("januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"); if ($to_mysql==0) { // echo "To PHP "; // echo substr($datum,11,2),substr($datum,14,2),substr($datum,17,2),substr($datum,5,2),substr($datum,8,2),substr($datum,0,4); $timestamp = mktime(substr($datum,11,2),substr($datum,14,2),substr($datum,17,2),substr($datum,5,2),substr($datum,8,2),substr($datum,0,4)); return date("d-m-Y H:i:s",$timestamp); } if ($to_mysql==1) { // echo "To MySQL "; // echo substr($datum,3,2),substr($datum,0,2),substr($datum,6,4); $timestamp = mktime(0,0,0,substr($datum,3,2),substr($datum,0,2),substr($datum,6,4)); return date("Y-m-d H:i:s",$timestamp); } } function subscribe($email = '',$klantnummer = 0) { if (!empty($email) && !empty($klantnummer)) { $email = str_replace("\n","",$email); $email = str_replace("\r","",$email); $foundOne = 0; $result = database("SELECT * FROM subscriber WHERE sub_cAdr ='" .htmlentities($email) ."' AND sub_iKla=$klantnummer AND sub_dUit=0",0); while($row = mysql_fetch_array($result)) { $foundOne = 1; database("UPDATE subscriber SET sub_dUit='" .date(YmdHis) ."' WHERE sub_cAdr ='" .htmlentities($email) ."' AND sub_iKla=$klantnummer",0); } if ($foundOne==0) { database("INSERT INTO subscriber (sub_cAdr,sub_dIng,sub_iKla) VALUES ('" .$email ."','" .date(YmdHis) ."','$klantnummer')",0); } } } ?>


Inloggen

"") { echo "

U bent ingelogd.

"; } else { ?>
Inloggen
Gebruikersnaam
Wachtwoord