Commit b964c21e authored by Marco Kellershoff's avatar Marco Kellershoff
Browse files

Add support for multiple portals

- add support for multiple portals
- add switch for news gif
parent 7e9e379d
......@@ -3,7 +3,8 @@
<head>
<title>Signatur-Generator</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="style.css" />
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="container">
......@@ -11,7 +12,7 @@
<p>Name und Jobtitel und der ganze Kram.. und ab geht die Post <img alt="Embedded Image" width="20" height="24" src="data:image/gif;base64,R0lGODlhFAAYANUDAP/mIEA0EFVACP////bKAP/aFI1dAPraEP/iHPK2APrWDPK+AO6qAP/eGG1MBFlACPrSCO6yAHFVBN6VAPLGAOadAKVpBMKNAPbCAOqhAKVxBM6NAGVQHEAUEPLCALKNAPbOBM6FAN62ANalAJVhBK6BBOaZAKp1BOKVAO6uAG1QBOalAO66AKVtAJlxBK6JBLp1AMqFAN6uAJlpBK6FAK59AOqqAMqlAPbGAJ19BNauAGFMGAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/iREZXNpZ24gYnkgQWl3YW4gKHd3dy5rb2xvYm9rLndyZy5ydSkAIfkEBWQAPAAsAAAAABQAGAAABtxAnnBILBqPQwPSqBQ2l0Wl9Al1GqhVnmDLzQokLx2OMiqpBEtBDqQ4HBQQAsuFNj5uikYjEEDwCQsXD0UCH3l+AwMBiQEECSd1QhIgDYh8l4oYNg5DhQoIAIuXfIoEERp1AiIHoIuMiaUJG6kUrAChfLgBBY4TtJ+3wcEFB6a+QgIyEA3CwgUKGAwhqTQEts0FvAkZLZESC9aVtwgNvAsMKJydNeAQu8QKAQspFRaRQg8XCR4EowkMFWAMMiJgxooICfgwyDCBxD1CDjRsqGAihgUHD49w6ZKlI48gACH5BAUPADwALAYACAAJAAYAAAYeQB4PgeA1DkIeYLksQJTMppMXEAKE1SizUIBem7wgACH5BAkyADwALAAAAAAUABgAAAY1QJ5wSC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CMysRCQkRDBkTSKS750DDhgomYlhwMBBJFi1FggAAOw%3D%3D" /></p>
<form name="sigform" method="post" action="sig.php" charset="UTF-8">
<label>
<input class="input_text" type="text" name="firstname" value="" />
<input autofocus="true" class="input_text" type="text" name="firstname" value="" />
Vorname
</label>
<label>
......@@ -19,7 +20,7 @@
Nachname
</label>
<label>
<input type="text" class="input_text" name="email" value="@gofeminin.de" />
<input type="email" class="input_text" name="email" value="NAME@gofeminin.de" />
E-Mail
</label>
<label>
......@@ -27,18 +28,39 @@
Jobtitel
</label>
<label>
<input type="text" class="input_text" name="telephone" value="+49 (0) 22 03 / 20 25-" />
<input type="tel" class="input_text" name="telephone" value="+49 (0) 22 03 / 20 25-" />
Telefon
</label>
<label>
<input type="text" class="input_text" name="fax" value="+49 (0) 22 03 / 20 25-555" />
<input type="tel" class="input_text" name="fax" value="+49 (0) 22 03 / 20 25-555" />
Fax
</label>
<label>
<input type="checkbox" class="radio" name="newsgif" value="true" />
News GIF
</label>
<fieldset>
Portal
<label>
<input type="radio" class="radio" name="portal" value="gofeminin" checked="checked" />
gofeminin.de
</label>
<label>
<input type="radio" class="radio" name="portal" value="onmeda" />
Onmeda
</label>
<label>
<input type="radio" class="radio" name="portal" value="bdf" />
Bild der Frau
</label>
</fieldset>
<fieldset>
Signatur Datei Erstellen?
<label>
<input type="radio" class="radio" name="genfile" value="true" />
Ja, klar
</label>
<label>
<input type="radio" class="radio" name="genfile" value="false" checked="checked" />
Nein, gib mir nur den Code
</label>
......
(function(){
var $ = function(s){return document.querySelectorAll(s);},
preview = $('#preview')[0],
gen_file = $('input[type="radio"]')[0],
gen_file = $('input[type="radio"]')[2],
code = $('#code')[0],
form = $('form')[0],
iframe = $('iframe')[0],
......
<?php
/* define('STREAM', file_get_contents('php://input')); */
define('TMP_DIR','/tmp');
function get_post_data_by_key ( $key ) {
if ( isset ($_POST[ $key ] ) )
return $_POST[ $key ];
else
return '';
};
define('FILENAME','signature.html');
define('PORTAL', get_post_data_by_key('portal'));
switch ( PORTAL ) {
case 'onmeda':
$template_contents = file_get_contents('templates/onmeda.de.html');
break;
default:
if ( get_post_data_by_key('newsgif') === '' )
$template_contents = file_get_contents('templates/gofeminin_without_newsgif.html');
else
$template_contents = file_get_contents('templates/gofeminin.html');
break;
}
$template_contents = file_get_contents('html.html');
$template_contents = str_replace(
array(
'{{firstname}}',
......@@ -15,12 +33,12 @@ $template_contents = str_replace(
'{{fax}}'
),
array(
$_POST['firstname'],
$_POST['lastname'],
$_POST['jobtitle'],
$_POST['email'],
$_POST['telephone'],
$_POST['fax']
get_post_data_by_key('firstname'),
get_post_data_by_key('lastname'),
get_post_data_by_key('jobtitle'),
get_post_data_by_key('email'),
get_post_data_by_key('telephone'),
get_post_data_by_key('fax')
),
$template_contents
);
......
......@@ -12,6 +12,11 @@ html,body {
max-width: 550px;
}
#preview {
max-width: 100%;
overflow: auto;
}
iframe {
display: none;
}
......
......@@ -19,7 +19,7 @@
</tr>
<tr>
<td align="left">
<img width="600" vspace="10" height="130" alt="et la femme crea aufeminin" src="http://i.onmeda.de/signature_koeln_2011.gif">
<img width="600" vspace="10" height="130" alt="gofeminin.de" src="http://i.onmeda.de/signature_koeln_2011.gif">
</td>
</tr>
<tr>
......
<table cellspacing="2" cellpadding="0" width="600" border="0" bgcolor="#ffffff">
<tbody>
<tr>
<td width="100%" align="left">
<font face="Arial, Verdana, sans-serif" size="2" style="font-size:13px;">
<font color="#951F60">
<strong>{{firstname}} {{lastname}}</strong>
</font>
<br>
<font color="#68696b">{{jobtitle}}</font>
<br>
<a style="text-decoration:none;" href="mailto:{{email}}">
<font color="#68696b" style="text-decoration:none;">{{email}}</font>
</a>
<br>
<font color="#68696b">Tel. {{telephone}}</font>
</font>
</td>
</tr>
<tr>
<td align="left">
<img width="600" vspace="10" height="130" alt="gofeminin.de" src="http://i.onmeda.de/signature_koeln_2011.gif">
</td>
</tr>
<tr>
<td width="100%" align="left">
<table cellspacing="0" cellpadding="5" width="1" border="0" bgcolor="#ffffff">
<tbody>
<tr>
<td>
<a target="_blank" href="https://www.facebook.com/goFeminin">
<img width="30" height="30" border="0" alt="Facebook" src="http://www.gofeminin.de/mailing/signature-af/facebook.png">
</a>
</td>
<td>
<a target="_blank" href="https://twitter.com/gofeminin_de">
<img width="30" height="30" border="0" alt="Twitter" src="http://www.gofeminin.de/mailing/signature-af/twitter.png">
</a>
</td>
<td>
<a target="_blank" href="https://plus.google.com/+gofeminin/">
<img width="30" height="30" border="0" alt="Google Plus" src="http://www.gofeminin.de/mailing/signature-af/google.png">
</a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table cellspacing="2" cellpadding="0" width="600" border="0" bgcolor="#ffffff">
<tbody>
<tr>
<td width="100%" align="left">
<font face="Arial, Verdana, sans-serif" size="2" style="font-size:13px;">
<font color="#0095c8">
<strong>{{firstname}} {{lastname}}</strong>
</font>
<br>
<font color="#68696b">{{jobtitle}}</font>
<br>
<a style="text-decoration:none;" href="mailto:{{email}}">
<font color="#68696b" style="text-decoration:none;">{{email}}</font>
</a>
<br>
<font color="#68696b">Tel. {{telephone}}</font>
</font>
</td>
</tr>
<tr>
<td align="left">
<img width="600" vspace="10" height="130" alt="gofeminin.de" src="http://admin.onmeda.de/signature/templates/onmeda.de/signature.png">
</td>
</tr>
<tr>
<td width="100%" align="left">
<table cellspacing="0" cellpadding="5" width="1" border="0" bgcolor="#ffffff">
<tbody>
<tr>
<td>
<a target="_blank" href="https://www.facebook.com/onmeda">
<img width="30" height="30" border="0" alt="Facebook" src="http://admin.onmeda.de/signature/templates/onmeda.de/facebook.png">
</a>
</td>
<td>
<a target="_blank" href="https://plus.google.com/+onmeda/">
<img width="30" height="30" border="0" alt="Google Plus" src="http://admin.onmeda.de/signature/templates/onmeda.de/google.png">
</a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment