Beispiel #1
0
<?php

include_once 'ressources/class.emailings.inc';
if (isset($_GET["popup-add-contact"])) {
    popup_add_contact();
    exit;
}
if (isset($_GET["add-contact"])) {
    popup_add_contact_save();
    exit;
}
if (isset($_GET["del-contact"])) {
    popup_del_contact();
    exit;
}
js();
function js()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $title = $tpl->_ENGINE_parse_body("{add_contact}");
    if ($_GET["ID"] != null) {
        $title = $tpl->_ENGINE_parse_body("{edit_contact}::{$_GET["ID"]}::{$_GET["dbname"]}");
    }
    $start = "emailings_contact_add_start();";
    $ou = $_GET["ou"];
    if ($_GET["delete"] != null) {
        $start = "emailings_contact_del_start()";
    }
    $html = "\n\t\t\n\tfunction emailings_contact_add_start(){\n\t\tYahooWin5('550','{$page}?popup-add-contact=yes&ou={$_GET["ou"]}&dbname={$_GET["dbname"]}&ID={$_GET["ID"]}','{$title}');\n\t\n\t}\n\t\n\tvar x_emailings_contact_del_start= function (obj) {\n\t\t\tvar tempvalue=obj.responseText;\n\t\t\tif(tempvalue.length>3){alert(tempvalue)};\n\t\t\tif(document.getElementById('emailing_table_content_bases')){\n\t\t\t\tvar ss=document.getElementById('emailing-search').value;\n\t\t\t\teMailingSearch(ss);\n\t\t\t}\n\t\t\t\n\t\t}\t\t\n\t\n\t\n\tfunction emailings_contact_del_start(){\n\t\t\tvar XHR = new XHRConnection();\n\t      \tXHR.appendData('del-contact','yes');\n\t      \tXHR.appendData('ou','{$_GET["ou"]}');\n\t      \tXHR.appendData('db','{$_GET["dbname"]}');\n\t      \tXHR.appendData('ID','{$_GET["ID"]}');\t\n\t      \tif(document.getElementById('emailing_table_content_bases')){\n\t      \t\tdocument.getElementById('emailing_table_content_bases').innerHTML='<center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center>';\n\t\t\t}\n\t\t  \tXHR.sendAndLoad('{$page}', 'GET',x_emailings_contact_del_start);\t\t      \t\n\t}\n\t\n\t{$start}";
    echo $html;
<?php
	include_once('ressources/class.emailings.inc');
	
	
	if(isset($_GET["popup-add-contact"])){popup_add_contact();exit;}
	if(isset($_GET["add-contact"])){popup_add_contact_save();exit;}
	if(isset($_GET["del-contact"])){popup_del_contact();exit;}
	js();
	
	

	
function js(){

	$tpl=new templates();
	$page=CurrentPageName();
	$title=$tpl->_ENGINE_parse_body("{add_contact}");
	
	if($_GET["ID"]<>null){$title=$tpl->_ENGINE_parse_body("{edit_contact}::{$_GET["ID"]}::{$_GET["dbname"]}");}
	
	$start="emailings_contact_add_start();";
	$ou=$_GET["ou"];
	
	if($_GET["delete"]<>null){$start="emailings_contact_del_start()";}
	
	$html="
		
	function emailings_contact_add_start(){
		YahooWin5('550','$page?popup-add-contact=yes&ou={$_GET["ou"]}&dbname={$_GET["dbname"]}&ID={$_GET["ID"]}','$title');
	
	}