Skip to content

Commit

Permalink
finito
Browse files Browse the repository at this point in the history
  • Loading branch information
grentis committed Jan 31, 2011
1 parent ee2c159 commit aad0ea2
Show file tree
Hide file tree
Showing 9 changed files with 322 additions and 34 deletions.
Binary file modified mokup/Sito internet Bicecci&Partners2.ppt
Binary file not shown.
20 changes: 4 additions & 16 deletions site/data/news.xml
@@ -1,19 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<news>
<new xml:id="news_3" date="28/02/2011">
<date>28/02/2011</date>
<title>Benvenuti nel sito2</title>
<description>&lt;p&gt;Rob sei un culetto :)&lt;/p&gt;</description>
</new>

<new xml:id="news_4" date="31/01/2011"><date>31/01/2011</date><title>Benvenuti di nuovo nel sito2222</title><description>&lt;p&gt;Aliquam eget nunc id ipsum iaculis cursus. Morbi fermentum mollis leo, eget ullamcorper tellus aliquam nec. &lt;br /&gt;&lt;br /&gt;Sed luctus, enim et fringilla cursus, neque elit fringilla massa, sit amet ornare augue sapien eget velit. Sed faucibus mollis ipsum, a elementum ligula dignissim vel.&lt;/p&gt;</description></new>
<new xml:id="news_5" date="20/01/2011">
<date>20/01/2011</date>
<title>Bella rob</title>
<description>&lt;p&gt;asdasd asdasd asdasd asdasd asdasd &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;</description>
</new>
<new xml:id="news_6" date="30/06/2011">
<date>30/06/2011</date>
<title>Benvenuti nel sito nartra volta</title>
<description>&lt;p&gt;Bella rob&lt;/p&gt;</description>
</new>
</news>


<new xml:id="news_5" date="31/01/2011"><date>31/01/2011</date><title>Nuovo sito</title><description>&lt;p&gt;Benvenuti nel nuovo sito &lt;strong&gt;mblex&lt;/strong&gt;&lt;/p&gt;</description></new><new xml:id="news_6" date="31/01/2011"><date>31/01/2011</date><title>Benvenuti di nuovo nel sito2222</title><description>&lt;p&gt;&lt;strong&gt;Lorem Ipsum&lt;/strong&gt;&amp;nbsp;is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum&lt;/p&gt;</description></new><new xml:id="news_7" date="01/02/2011"><date>01/02/2011</date><title>543543</title><description>&lt;p&gt;yhtfghgf&lt;/p&gt;</description></new></news>
68 changes: 60 additions & 8 deletions site/it/contacts.php
Expand Up @@ -8,6 +8,9 @@
<!DOCTYPE HTML>
<html>
<?php include_once('../template/__head.php'); ?>
<!--[if IE 7]>
<body class="it ie ie7">
<![endif]-->
<!--[if IE]>
<body class="it ie">
<![endif]-->
Expand All @@ -32,7 +35,56 @@
Per maggiori informazioni e per sottoporci le vostre domande compilate il form qui di seguito e sarete al più presto ricontattati da un nostro collaboratore.<br/>
Grazie.
</p>
<form action="" method="post" id="contact-form">
<?php

if (isset($_POST['submit'])){
ini_set("SMTP", "mail.intra.acer-euro.com");

$subject = "Richiesta maggiori informazioni - dal sito";
$to = "grentis+test@gmail.com";

$message = "<html>";
$message .= "<body>";
$message .= "<img src=\"http://www.invenium.it/studio_bicecci/logo_email/logo.jpg\" />";
$message .= "<h3>";
$message .= "Richiesta maggiori informazioni:";
$message .= "</h3>";
$message .= "<p>Nome e Cognome: ".$_POST['name']."</p>";
$message .= "<p>Email: ".$_POST['email']."</p>";
$message .= "<p>Azienda/Studio: ".$_POST['company']."</p>";
if (isset($_POST['phone']))
$message .= "<p>Telefono: ".$_POST['phone']."</p>";
if (isset($_POST['address']))
$message .= "<p>Indirizzo (n° civico, CAP): ".$_POST['address']."</p>";
$message .= "<p>Professione: ".$_POST['job']."</p>";

if (isset($_POST['html'])) {
$message .= "<p>Focus/Area di practice</p><ul>";
foreach ($_POST['html'] as $check) {
$message .= "<li>".$check."</li>";
}
$message .= "</ul>";
}

$message .= "<p>Messaggio: ".$_POST['message']."</p>";
$message .= "</body>";
$message .= "</html>";

// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'To: '.$_POST['name'].' <'.$to.'>' . "\r\n";
$headers .= 'From: Studio Legale Bicecci e Partners <info@mblex.it>' . "\r\n";

if (mail("$to", "$subject", "$message", "$headers"))
echo "<h3 class=\"flash-message flash-message-ok\">Richiesta inviata correttamente</h3>";
else
echo "<h3 class=\"flash-message flash-message-ko\">Si è verificato un errore nell'invio della mail. Prego riprovare più tardi.</h3>";
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post" id="contact-form">
<ul class="form">
<li class="field mandatory first">
<label for="name">Nome e Cognome *</label>
Expand Down Expand Up @@ -66,27 +118,27 @@
<span class="checkbox-title">Focus/Area di practice</span>
<ul class="checkbox">
<li>
<input type="checkbox" name="html" value="dirbanfin" id="dirbanfin"/>
<input type="checkbox" name="html[]" value="dirbanfin" id="dirbanfin"/>
<label for="dirbanfin">Diritto bancario e finanziario</label>
</li>
<li>
<input type="checkbox" name="html" value="solcon" id="solcon"/>
<input type="checkbox" name="html[]" value="solcon" id="solcon"/>
<label for="solcon">Soluzione delle controversie</label>
</li>
<li>
<input type="checkbox" name="html" value="proint" id="proint"/>
<input type="checkbox" name="html[]" value="proint" id="proint"/>
<label for="proint">Proprietà intellettuale</label>
</li>
<li>
<input type="checkbox" name="html" value="priequi" id="priequi"/>
<input type="checkbox" name="html[]" value="priequi" id="priequi"/>
<label for="priequi">Private Equity</label>
</li>
<li>
<input type="checkbox" name="html" value="mea" id="mea"/>
<input type="checkbox" name="html[]" value="mea" id="mea"/>
<label for="mea">M&A</label>
</li>
<li>
<input type="checkbox" name="html" value="dirsoccom" id="dirsoccom"/>
<input type="checkbox" name="html[]" value="dirsoccom" id="dirsoccom"/>
<label for="dirsoccom">Diritto societario e commerciale</label>
</li>
</ul>
Expand All @@ -96,7 +148,7 @@
<textarea name="message" id="message"></textarea>
</li>
</ul>
<input type="submit" value="submit" class="button" />
<input type="submit" value="submit" name="submit" class="button" />
</form>
</div>
<div class="clear"></div>
Expand Down
36 changes: 36 additions & 0 deletions site/it/privacy.php
@@ -0,0 +1,36 @@
<?php
$CURRENT_LEVEL = 1;
$CURRENT_PAGE = 'privacy';

require_once('php/local_conf.php');
?>

<!DOCTYPE HTML>
<html>
<?php include_once('../template/__head.php'); ?>
<!--[if IE]>
<body class="it ie">
<![endif]-->
<!--[if !IE]>
<body class="it">
<![endif]-->
<div class="container">
<div class="main">
<?php include_once('../template/__header.php'); ?>
<section>
<div class="section">
<aside></aside>
<div class="content">
<h2 class="first">Privacy</h2>
<p>
Lorem ipsum
</p>
</div>
<div class="clear"></div>
</div>
</section>
</div>
<?php include_once('../template/__footer.php'); ?>
</div>
</body>
</html>
167 changes: 167 additions & 0 deletions site/it/workwithus.php
@@ -0,0 +1,167 @@
<?php
$CURRENT_LEVEL = 1;
$CURRENT_PAGE = 'workwithus';

require_once('php/local_conf.php');
?>

<!DOCTYPE HTML>
<html>
<?php include_once('../template/__head.php'); ?>
<!--[if IE]>
<body class="it ie">
<![endif]-->
<!--[if !IE]>
<body class="it">
<![endif]-->
<div class="container">
<div class="main">
<?php include_once('../template/__header.php'); ?>
<section>
<div class="section">
<aside>
<div class="aside">
<?php include_once('../template/__aside_where.php'); ?>
<a class="l-contactus-small" href="contacts.php">Contattaci ora</a>
</div>
</aside>
<div class="content">
<h2 class="first">Lavora con noi</h2>
<p>
Lo Studio Legale Bicecci & Partners ricerca persone competenti ed in sintonia con i suoi valori, capaci di contribuire con la loro professionalità, al raggiungimento di obiettivi comuni.
</p>
<p>
Per segnalare la propria candidatura è necessario inviare il proprio curriculum vitae a <a class="mail-text" href="info" rel="nofollow"></a> o completare il form presente in questa pagina, autorizzando il trattamento dei propri dati personali nel rispetto della normativa sulla privacy.
</p>
<?php

if (isset($_POST['submit'])){

ini_set("SMTP", "mail.intra.acer-euro.com");
$random_hash = md5(date('r', time()));

$fileatt = $_FILES['cv']['tmp_name'];
$fileatt_type = $_FILES['cv']['type'];
$fileatt_name = $_FILES['cv']['name'];

$attachment = null;
if (is_uploaded_file($fileatt)){
$attachment = chunk_split(base64_encode(file_get_contents($fileatt)));
}

$fileattpap = null;
$fileatt_typepap = null;
$fileatt_namepap = null;
$attachmentpap = null;
if(isset($_FILES['pap'])){
$fileattpap = $_FILES['pap']['tmp_name'];
$fileatt_typepap = $_FILES['pap']['type'];
$fileatt_namepap = $_FILES['pap']['name'];
if (is_uploaded_file($fileattpap)){
$attachmentpap = chunk_split(base64_encode(file_get_contents($fileattpap)));
}
}

$subject = "Invio CV - dal sito";
$to = "grentis+test@gmail.com";

$mime_boundary = "==Multipart_Boundary_x{$random_hash}x";

$headers = "";
$headers .= 'To: '.$_POST['name'].' <'.$to.'>' . "\r\n";
$headers .= 'From: Studio Legale Bicecci e Partners <info@mblex.it>' . "\r\n";

$headers .= "\nMIME-Version: 1.0\n" .
"Content-Type: multipart/mixed;\n" .
" boundary=\"{$mime_boundary}\"";

$message = "This is a multi-part message in MIME format.\n\n" .
"--{$mime_boundary}\n" .
"Content-Type: text/html; charset=\"iso-8859-1\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" .
"<html>" .
"<body>" .
"<img src=\"http://www.invenium.it/studio_bicecci/logo_email/logo.jpg\" />" .
"<h3>Invio CV</h3>" .
"<p>Nome e Cognome: ".$_POST['name']."</p>" .
"</body>" .
"</html>" .
"\n\n";

$message .= "--{$mime_boundary}\n" .
"Content-Type: {$fileatt_type};\n" .
" name=\"{$fileatt_name}\"\n" .
"Content-Disposition: attachment;\n" .
" filename=\"{$fileatt_name}\"\n" .
"Content-Transfer-Encoding: base64\n\n" .
$attachment .
"\n\n";

if($attachmentpap != null) {
$message .= "--{$mime_boundary}\n" .
"Content-Type: {$fileatt_typepap};\n" .
" name=\"{$fileatt_namepap}\"\n" .
"Content-Disposition: attachment;\n" .
" filename=\"{$fileatt_namepap}\"\n" .
"Content-Transfer-Encoding: base64\n\n" .
$attachmentpap .
"\n\n";
}
$message .= "--{$mime_boundary}--\n";

if (mail("$to", "$subject", "$message", "$headers"))
echo "<h3 class=\"flash-message flash-message-ok\">Richiesta inviata correttamente</h3>";
else
echo "<h3 class=\"flash-message flash-message-ko\">Si è verificato un errore nell'invio della mail. Prego riprovare più tardi.</h3>";
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post" id="workwithus-form" enctype="multipart/form-data">
<ul class="form">
<li class="field mandatory first">
<label for="name">Nome e Cognome *</label>
<input type="string" name="name" id="name"/>
</li>
<li class="field mandatory">
<label for="email">Luogo e data di nascita *</label>
<input type="email" name="email" id="email"/>
</li>
<li class="field mandatory">
<label for="company">Codice fiscale *</label>
<input type="string" name="company" id="company"/>
</li>
<li class="field">
<label for="phone">Residenza e contatti (tel, cell, email) *</label>
<input type="string" name="phone" id="phone"/>
</li>
<li class="field">
<label for="address">Titolo di studio</label>
<input type="string" name="address" id="address"/>
</li>
<li class="field mandatory">
<label for="city">CV *</label>
<input type="string" class="fake-file-value" disabled="disabled" />
<input type="file" class="fake-file" name="cv" id="cv" />
</li>
<li class="field">
<label for="job">Lettera di accompagnamento</label>
<input type="string" class="fake-file-value" disabled="disabled" />
<input type="file" class="fake-file" name="pap" id="pap"/>
</li>
</ul>
<input type="submit" value="submit" name="submit" class="button" />
</form>
</div>
<div class="clear"></div>
</div>
</section>
</div>
<?php include_once('../template/__footer.php'); ?>
</div>
</body>
</html>

<script>
$('input[type=file]').change(function(event){
$(this).prev('input.fake-file-value').val($(this).val().substring($(this).val().lastIndexOf('\\')+1));
});
</script>
Binary file added site/resources/images/it/download.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions site/resources/site.js
Expand Up @@ -3,13 +3,39 @@ $(function(){

$(document).ready(function($) {
setTimeout(change_banner,5000);
setTimeout(hideFlash,5000);
checkEmails();

contactForm();
workForm();
initializeGoogleMaps();

});

function workForm(){
var c = $('#workwithus-form');
if(c && c.size() > 0){
c.validate({
rules: {
email: {
required: true
},
name: {
required: true
},
cv: {
required: true,
accept: "pdf"
},
pap: {
accept: "pdf|ppt|doc|dox|pptx"
}
}
});
}

}

function contactForm(){
var c = $('#contact-form');
if(c && c.size() > 0){
Expand Down Expand Up @@ -71,6 +97,12 @@ $(function(){
}
}

function hideFlash(){
$('h3.flash-message').each(function(){
$(this).fadeOut();
});
}

function checkEmails(){
$('a[rel=nofollow]').each(function(index) {
$(this).text($(this).attr('href')+'@mblex.it').attr('href','mailto:'+$(this).text());
Expand Down

0 comments on commit aad0ea2

Please sign in to comment.