Commit 7e9e379d authored by Marco Kellershoff's avatar Marco Kellershoff
Browse files

Initial commit

parents
<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="et la femme crea aufeminin" src="http://i.onmeda.de/signature_koeln_2011.gif">
</td>
</tr>
<tr>
<td>
<a target="_blank" href="http://www.gofeminin.de">
<img width="600" height="60" border="0" src="http://www.gofeminin.de/reloaded/emailSignature.gif">
</a>
</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>
<!DOCTYPE html>
<html>
<head>
<title>Signatur-Generator</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="container">
<h1>Signatur-Generator</h1>
<p>Name und Jobtitel und der ganze Kram.. und ab geht die Post <img alt="Embedded Image" width="20" height="24" src="data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kVFnI8DxcJHmsEBB4JDBUwgEQCMysRCQkRDDJMIKEunwMNGyqYiGHBQUEkWbQUCQIAIfkEBQ8APAAsAQACABIAFQAABslAnnBIFBqKSN7RmEwen8umYEptCgWSVyBAGZVUgqRgGxgMAhACyxUmPspn8/lAWFwew/F5uw8UOAQJJ20SHGRlZBwFEBg2DjwCHwoIAJVklRx0ERpTIgeUlaGVBQWBG1MUn6KipIETqJOrlR0Fmq8CMhANsgC0ChgMIVM0BKqifqUJGS1hEgvFDYcNpQsMKI+QNc8QB1sHCnUpFRZtPA8XCR4E6wQeCQwVMHhEAjMrEQkJEQwZEyTl9Bxo2FDBRAwLDgAioVKlSBAAIfkEBTIAPAAsBwAHAAYADAAABh9AHgDAKwoBBOOQoSQwjdCotCOFdoidLBExRBgLBWMQACH5BAkKADwALAEAAgASABUAAAYuQJ5wSCwaj8ikcslsGgcDpxAadQ4CAek1K+16jQBvWDpmAs7cJRYrZX/f8LgwCAAh+QQFCgA8ACwBAAEAEgAWAAAGzUCecEjkGYpI4/CYRB6fzObSEJXyBNisVSB56XCUUUklSApyoEDgoCawXGXi46YIDAZ2PGFxeQwFH3V4amp6CSdxEiANdoSFARAYNg5XgQh5eHd4BwQRGlgiBwgAhKRqBQUECRtYFKIAsLGwqKoTrQqjsrEFnBG2AjIQDbq7ChgMIVg0BK+6tAkZLWUSC8wBuZepCwwolFc11RCOCnspFRZxPA8XCR4EbR4JDBUwfkQCMysRCQkRDBkTSKS750DDhgomYlhwMBBJFi1FggAAOw%3D%3D" /></p>
<form name="sigform" method="post" action="sig.php" charset="UTF-8">
<label>
<input class="input_text" type="text" name="firstname" value="" />
Vorname
</label>
<label>
<input class="input_text" type="text" name="lastname" value="" />
Nachname
</label>
<label>
<input type="text" class="input_text" name="email" value="@gofeminin.de" />
E-Mail
</label>
<label>
<input type="text" class="input_text" name="jobtitle" value="" />
Jobtitel
</label>
<label>
<input type="text" 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" />
Fax
</label>
<fieldset>
Signatur Datei Erstellen?
<label>
<input type="radio" class="radio" name="genfile" value="true" />
Ja, klar
<input type="radio" class="radio" name="genfile" value="false" checked="checked" />
Nein, gib mir nur den Code
</label>
</fieldset>
<button>Ich bin soweit!</button>
</form>
<div contenteditable="true" id="code"></div>
<div id="preview"></div>
<iframe name="hidden_iframe" src="about:blank"></iframe>
</div>
<script src="magic.js"></script>
</body>
</html>
(function(){
var $ = function(s){return document.querySelectorAll(s);},
preview = $('#preview')[0],
gen_file = $('input[type="radio"]')[0],
code = $('#code')[0],
form = $('form')[0],
iframe = $('iframe')[0],
headlines = {
code: document.createElement('h2'),
preview: document.createElement('h2')
},
submit_btn = $('button')[0];
headlines.code.innerHTML = 'Code';
headlines.preview.innerHTML = 'Preview';
iframe.onload = function() {
var contents;
if ( this.contentDocument ) {
contents = this.contentDocument.getElementsByTagName('body')[0];
} else if ( iFrame.contentWindow ) {
contents = this.contentWindow.document.getElementsByTagName('body')[0];
}
preview.parentNode.insertBefore(headlines.preview, preview.previousSibling);
preview.innerHTML = contents.outerHTML;
code.parentNode.insertBefore(headlines.code, code.previousSibling);
code.innerHTML = contents.outerHTML.replace(/[\u00A0-\u9999<>\&]/gim, function(i) {
return '&#'+i.charCodeAt(0)+';';
});
code.style.border = '1px solid #000';
window.location.href='#code';
};
submit_btn.onclick = function ( ev ) {
ev.preventDefault();
if ( gen_file.checked ) {
form.target = '_self';
} else {
form.target = 'hidden_iframe';
}
form.submit();
};
}());
<?php
/* define('STREAM', file_get_contents('php://input')); */
define('TMP_DIR','/tmp');
define('FILENAME','signature.html');
$template_contents = file_get_contents('html.html');
$template_contents = str_replace(
array(
'{{firstname}}',
'{{lastname}}',
'{{jobtitle}}',
'{{email}}',
'{{telephone}}',
'{{fax}}'
),
array(
$_POST['firstname'],
$_POST['lastname'],
$_POST['jobtitle'],
$_POST['email'],
$_POST['telephone'],
$_POST['fax']
),
$template_contents
);
if( $_POST['genfile'] === "true" ) {
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Content-Type: application/force-download, charset=utf-8');
header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename='.FILENAME);
header('Content-Transfer-Encoding: binary');
} else {
header('Content-Type: text/html, charset=utf-8');
}
echo $template_contents;
?>
html,body {
margin: 0;
padding: 0;
font-size: 62,5%;
font-family: 'Comic Sans', Verdana, Arial, Helvetica, sans-serif;
background-color: #fff;
}
.container {
padding: 20px;
margin: 20px auto;
max-width: 550px;
}
iframe {
display: none;
}
fieldset {
border: 0 none;
display: block;
}
label {
display: block;
padding: 10px;
}
input {
border: 1px solid #000;
border-radius:5px;
padding: 10px;
}
input:hover {
background-color: #ffd;
}
input:focus {
background-color: #ffa;
}
textarea {
border: 1px solid #000;
width: 320px;
height: 60px;
border-radius:5px;
padding: 10px;
}
textarea:hover {
background-color: #ffd;
}
textarea[disabled]:hover {
background-color: #D4D0C8;
}
textarea:focus {
background-color: #ffa;
}
input.input_text {
width: 220px;
}
input.input_integer {
width: 50px;
}
input.radio {
border: none;
}
button {
border: 1px solid #000;
border-radius:5px;
padding: 20px;
font-weight: bold;
}
#preview_sigpic {
height: 18px;
border: 0;
}
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