Completato sistema di registrazione e di login (Senza grafica);
Completato sistema di banner e rotazioni Inserito sistema per ricerca full text
This commit is contained in:
@@ -10,4 +10,9 @@ db.runCommand({
|
||||
|
||||
|
||||
INDEX DA CREARE
|
||||
db.notizia.ensureIndex({"about.author":"text",titolo:"text",sottotitolo:"text",testo:"text"})
|
||||
db.notizia.ensureIndex({"about.author":"text",titolo:"text",sottotitolo:"text",testo:"text"},{default_language: "italian"})
|
||||
db.administrators.ensureIndex({nome:"text",cognome:"text",email:"text"},{default_language: "italian"})
|
||||
db.mail.ensureIndex({recipient:"text",subject:"text",body:"text"},{default_language: "italian"})
|
||||
db.users.ensureIndex({nome:"text",cognome:"text",email:"text"},{default_language: "italian"})
|
||||
db.banner.ensureIndex({customer:"text",link:"text"},{default_language: "italian"})
|
||||
db.commenti.ensureIndex({titolo:"text",testo:"text"},{default_language: "italian"})
|
||||
|
||||
@@ -190,9 +190,13 @@ class AnalyticsHelper {
|
||||
if (array_key_exists("HTTP_REFERER",$_SERVER)){
|
||||
$source = $_SERVER['HTTP_REFERER'];
|
||||
}
|
||||
|
||||
|
||||
$function = '$.ajax({url: "stats/bannerImpression.php", method: "POST", data: { "ip": "'.$ip.'", "banner": "'.$id.'", "source": "'.$source.'" }, dataType: "html" });';
|
||||
GUIHandler::addOnLoadJsEvent($function);
|
||||
echo '<script type="text/javascript">'.$function.'</script>';
|
||||
|
||||
// OLD VERSION
|
||||
// $function = '$.ajax({url: "stats/bannerImpression.php", method: "POST", data: { "ip": "'.$ip.'", "banner": "'.$id.'", "source": "'.$source.'" }, dataType: "html" });';
|
||||
// GUIHandler::addOnLoadJsEvent($function);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -285,17 +289,18 @@ class AnalyticsHelper {
|
||||
$rval = null;
|
||||
if (ASDSessionHandler::sessionValueExists("bannerActive")){
|
||||
$shown = ASDSessionHandler::getSessionValue("bannerActive");
|
||||
|
||||
|
||||
if (!is_null($replaced) && in_array($replaced, $shown)){
|
||||
$key = array_search($needle, $shown);
|
||||
$key = array_search($replaced, $shown);
|
||||
unset($shown[$key]);
|
||||
ASDSessionHandler::setSessionValue("bannerActive",$shown);
|
||||
}
|
||||
}
|
||||
|
||||
// idlist contiene gli id dei banner in ordine di visualizzazione crescente (esclusi quelli non visualizzati)
|
||||
$pipeline = PipelineHelper::getTodaysBannerVisualizationPipeline($position);
|
||||
$stats = GlobalVariables::get("dao")->aggregate("StatisticModel",$pipeline);
|
||||
var_dump($stats);
|
||||
// var_dump($stats);
|
||||
$idList = array();
|
||||
if (sizeof($stats)>0){
|
||||
foreach ($stats as $stat){
|
||||
@@ -316,7 +321,7 @@ class AnalyticsHelper {
|
||||
}
|
||||
|
||||
if (is_null($rval)){
|
||||
$todayLessShown = array_diff($idList, $shown);
|
||||
$todayLessShown = array_values(array_diff($idList, $shown));
|
||||
if (sizeof($todayLessShown)>0){
|
||||
$i = 0;
|
||||
while (is_null($rval) && $i<sizeof($todayLessShown)){
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/*
|
||||
Author: Riccardo Di Dato
|
||||
Creation Date: 11/mar/2016
|
||||
*/
|
||||
|
||||
class BannerHelper{
|
||||
private static $INTERNAL_COUNT = 1;
|
||||
|
||||
public static function printBanner($position = BannerModel::POSITION_HEAD){
|
||||
$cur = self::getPlaceholderId();
|
||||
?>
|
||||
<div id="<?php echo $cur;?>"><script type="text/javascript">$(document).ready(function () {bannerRoll('<?php echo $cur;?>',<?php echo $position;?>);});</script></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
private static function getPlaceholderId(){
|
||||
return 'banPlaceholder_'.(self::$INTERNAL_COUNT++);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -285,10 +285,12 @@ class GenericDao{
|
||||
|
||||
$cursor = $collection->find($useFilter,array('score' => array('$meta' => 'textScore')));
|
||||
|
||||
$sortArray = array('score' => array('$meta' => 'textScore'));
|
||||
$sortArray = array();
|
||||
if (array_key_exists("sort",$options)){
|
||||
$sortArray = array_merge($sortArray,$options["sort"]);
|
||||
$sortArray = $options["sort"];
|
||||
}
|
||||
$sortArray = array_merge($sortArray,array('score' => array('$meta' => 'textScore')) );
|
||||
|
||||
$cursor->sort($sortArray);
|
||||
if (array_key_exists("skip",$options)){
|
||||
$cursor->skip($options["skip"]);
|
||||
|
||||
@@ -24,6 +24,14 @@ class UserModel extends Model{
|
||||
if(!$this->hasProperty("password")){
|
||||
new CoreException("Impossible to create a user without a password");
|
||||
}
|
||||
|
||||
if(!$this->hasProperty("active")){
|
||||
$this->active = false;
|
||||
}
|
||||
|
||||
if(!$this->hasProperty("activationSent")){
|
||||
$this->activationSent = false;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getCollectionName(){
|
||||
|
||||
@@ -147,7 +147,7 @@ class DatatablesHelper {
|
||||
{"className":"lastVisible","targets":[<?php echo sizeof($columns)-2;?>]},
|
||||
{"className":"hidden","targets":[<?php echo sizeof($columns)-1;?>]}
|
||||
],
|
||||
"searchDelay":800,
|
||||
"searchDelay":600,
|
||||
});
|
||||
$('#<?php echo $tabId;?> tbody').on( 'click', 'tr', function () {
|
||||
if ( $(this).hasClass('selected') ) {
|
||||
|
||||
@@ -153,12 +153,13 @@ class GUIHandler {
|
||||
'Settembre', 'Ottobre', 'Novembre','Dicembre');
|
||||
$day = date("d");
|
||||
|
||||
ASDSessionHandler::setSessionValue("bannerActive",array());
|
||||
?>
|
||||
<div id="floating" style="display:none;"></div>
|
||||
<div class="headContainer">
|
||||
<div class="upperBar">
|
||||
<div class="dateBar"><?php echo $day." ".$mesi[date("n")]." ".date("Y"); ?> - Aggiornato alle <span style="color:#f68235;"><?php echo date("H:i");?></span></div>
|
||||
<div class="loginReg"><a href="#">LOGIN</a> | <a id="regButton" href="javascript:openRegistrationModal();">REGISTRATI</a></div>
|
||||
<div class="loginReg"><?php echo UserLoginManager::isLogged()?UserLoginManager::getLogged()->nome." ".UserLoginManager::getLogged()->cognome:'<a href="javascript:openLoginModal();">LOGIN</a>';?> | <a id="regButton" href="javascript:openRegistrationModal();">REGISTRATI</a></div>
|
||||
<div class="socialBar">
|
||||
<a class="socialLink" href="https://www.facebook.com/ifattidinapoli" target="_blank"><div style="background-image:url(images/fb.png);"></div></a>
|
||||
<a class="socialLink" href="https://twitter.com/fattidinapoli" target="_blank"><div style="background-image:url(images/twitter.png);"></div></a>
|
||||
@@ -168,9 +169,14 @@ class GUIHandler {
|
||||
</div>
|
||||
</div>
|
||||
<div class="middleBar">
|
||||
<div class="leftBanner topBanner"><img src="images/ads.png" alt=""><span style="color:red;">BANNER</span></div><?php //TODO: Bannerizzare?>
|
||||
<div class="leftBanner topBanner mediaContent">
|
||||
<?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?>
|
||||
<!-- <div id="topLeftBan"><script type="text/javascript">$(document).ready(function () {bannerRoll('topLeftBan');});</script></div> -->
|
||||
</div>
|
||||
<div class="logo"><img src="images/logo_uff.png"></div>
|
||||
<div class="rightBanner topBanner"><img src="images/ads.png" alt=""><span style="color:red;">BANNER</span></div><?php //TODO: Bannerizzare?>
|
||||
<div class="rightBanner topBanner mediaContent">
|
||||
<?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottomBar" style="height:40px;width:1000px;"></div>
|
||||
</div>
|
||||
@@ -314,8 +320,8 @@ class GUIHandler {
|
||||
<div id="rightBarContainer" class="">
|
||||
<div class="rotoBanner">
|
||||
<div>Guarda anche</div>
|
||||
<div class="bannerContainer mediaContent"><img alt="" src="images/ads_big.png" /><span style="color:red;">BANNER</span></div> <?php //TODO: Bannerizzare?>
|
||||
<div class="bannerContainer mediaContent"><img alt="" src="images/ads_big.png" /><span style="color:red;">BANNER</span></div> <?php //TODO: Bannerizzare?>
|
||||
<div class="bannerContainer mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
<div class="bannerContainer mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
</div>
|
||||
<div class="reader">
|
||||
<div class="lastNews">
|
||||
@@ -338,8 +344,8 @@ class GUIHandler {
|
||||
</div>
|
||||
<div class="rotoBanner not">
|
||||
<div>Guarda anche</div>
|
||||
<div class="bannerContainer mediaContent"><img alt="" src="images/ads_big.png" /><span style="color:red;">BANNER</span></div> <?php //TODO: Bannerizzare?>
|
||||
<div class="bannerContainer mediaContent"><img alt="" src="images/ads_big.png" /><span style="color:red;">BANNER</span></div> <?php //TODO: Bannerizzare?>
|
||||
<div class="bannerContainer mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
<div class="bannerContainer mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
@@ -25,7 +25,7 @@ GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_ADMIN, "jquery-ui.min.js");
|
||||
|
||||
// GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_ADMIN, "jquery.dataTables.min.js");
|
||||
|
||||
GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_ADMIN, "jquery.form.js");
|
||||
GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_GENERAL, "jquery.form.js");
|
||||
|
||||
GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_ADMIN, "chosen.jquery.min.js");
|
||||
|
||||
|
||||
@@ -44,4 +44,7 @@ require_once(dirname(__FILE__)."/FDN_MailHelper.php");
|
||||
require_once(dirname(__FILE__)."/AnalyticsHelper.php");
|
||||
require_once(dirname(__FILE__)."/PipelineHelper.php");
|
||||
|
||||
require_once(dirname(__FILE__)."/BannerHelper.php");
|
||||
|
||||
|
||||
?>
|
||||
@@ -17,7 +17,8 @@ class MediaHtml5 extends MediaRenderer{
|
||||
$height = 'width:'.self::$SIZES[$size]["height"].'px;';
|
||||
}
|
||||
|
||||
return '<div style="'.$height.$width.'overflow:hidden;">'.$this->code.'</div>';
|
||||
return $this->code;
|
||||
// return '<div style="'.$height.$width.'overflow:hidden;height:100%;width:100%;">'.$this->code.'</div>';
|
||||
}
|
||||
|
||||
public function render(array $opt = array()){
|
||||
|
||||
+30
-8
@@ -5,21 +5,43 @@ Creation Date: 02/mar/2016
|
||||
*/
|
||||
|
||||
|
||||
require_once(dirname(__FILE__)."/load.php");
|
||||
require_once(dirname(__FILE__)."/load.php");
|
||||
|
||||
// if (array_key_exists("id",$_GET)) {
|
||||
$replaced = null;
|
||||
if (array_key_exists("replaced",$_GET)) {
|
||||
$replaced = $_GET["replaced"];
|
||||
}
|
||||
|
||||
$position = BannerModel::POSITION_HEAD;
|
||||
if (array_key_exists("pos",$_GET)) {
|
||||
$intPost = intval($_GET["pos"]);
|
||||
if (array_key_exists($intPost,BannerModel::$BANNER_POSITIONS)){
|
||||
$position = $intPost;
|
||||
}
|
||||
}
|
||||
|
||||
// $banner = GlobalVariables::get("dao")->getFirst("BannerModel",array("id"=>$_GET['id']));
|
||||
ASDSessionHandler::setSessionValue("bannerActive",array());
|
||||
$banner = AnalyticsHelper::getBannerToShow(BannerModel::POSITION_HEAD);
|
||||
|
||||
// ASDSessionHandler::setSessionValue("bannerActive",array());
|
||||
$banner = AnalyticsHelper::getBannerToShow($position,$replaced);
|
||||
// var_dump($replaced);
|
||||
|
||||
if (!is_null($banner)){
|
||||
$media = DaoMediaHandler::getMainMediaFromModel($banner);
|
||||
echo '<a href="javascript:'.AnalyticsHelper::getBannerClickLink($banner).'">';
|
||||
echo '<a id="'.$banner->id.'" href="javascript:'.AnalyticsHelper::getBannerClickLink($banner).'">';
|
||||
$media->renderMedia();
|
||||
echo '</a>';
|
||||
AnalyticsHelper::logBannerImpression($banner->id);
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var rand = Math.floor((Math.random() * 100) + 1);
|
||||
setTimeout(function () {
|
||||
bannerRoll('<?php echo $banner->id;?>',<?php echo $position; ?>);
|
||||
},15000+rand);
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
// }
|
||||
|
||||
GUIHandler::generateHtmlHeaders(array(),true);
|
||||
?>
|
||||
// GUIHandler::generateHtmlHeaders(array(),true);
|
||||
?>
|
||||
|
||||
+3
-3
@@ -242,7 +242,7 @@ catch (Exception $ex){
|
||||
<?php }
|
||||
}?>
|
||||
|
||||
<div class="middleBanner"><img alt="" src="images/bannerMiddle.png"></div>
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
<div class="ristorantiTitle">
|
||||
<div class="categoryBar" style="text-align:left;">
|
||||
<div class="categoryTag"><span>RISTORANTI</span></div>
|
||||
@@ -267,7 +267,7 @@ catch (Exception $ex){
|
||||
</div>
|
||||
<div class="rightBarNews">
|
||||
<div class="meteo"><img alt="" src="images/meteo.png"></div>
|
||||
<div class="middleRightBanner"><img alt="" src="images/ads_big.png"></div>
|
||||
<div class="middleRightBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
<div class="lastNews">
|
||||
<div class="categoryBar" style="text-align:left;">
|
||||
<div class="categoryTag"><span>Più Letti</span></div>
|
||||
@@ -285,7 +285,7 @@ catch (Exception $ex){
|
||||
<?php }
|
||||
}?>
|
||||
</div>
|
||||
<div class="middleRightBanner"><img alt="" src="images/ads_big.png"></div>
|
||||
<div class="middleRightBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
<div class="lastGossip">
|
||||
<div class="categoryBar" style="text-align:left;">
|
||||
<div class="categoryTag"><span>GOSSIP</span></div>
|
||||
|
||||
+20
-10
@@ -27,18 +27,28 @@ function openRegistrationModal(){
|
||||
});
|
||||
}
|
||||
|
||||
function sendRegistration(){
|
||||
function openLoginModal(){
|
||||
$.ajax({
|
||||
method:'POST',
|
||||
url:'sendRegistrationBackend.php',
|
||||
method:"POST",
|
||||
url:'login.php',
|
||||
dataType:'html',
|
||||
data:$('#regForm').serialize(),
|
||||
success: function(data){
|
||||
// $("#regForm").remove();
|
||||
$(".modalResponse").html(data);
|
||||
/* Verificare se si possa eliminare la form in caso di registrazione avvenuta con successo assegnando un parametro
|
||||
* allo span di avvenuta registrazione*/
|
||||
// $(".modalError").html("");
|
||||
$("#floating").html(data);
|
||||
var off = $("#regButton").offset();
|
||||
var right = $(document).width()-off.left - $("#regButton").outerWidth();
|
||||
$("#floating").css("position","absolute").css("right",right).css("top",off.top+25);
|
||||
$("#floating").show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function bannerRoll(prev,pos){
|
||||
$.ajax({
|
||||
method:"POST",
|
||||
url:'getBanner.php?replaced='+prev+'&pos='+pos,
|
||||
dataType:'html',
|
||||
success: function(data){
|
||||
$('#'+prev).parent().html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/*
|
||||
Author: Riccardo Di Dato
|
||||
Creation Date: 11/mar/2016
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__)."/load.php");
|
||||
|
||||
try {
|
||||
$msg = "";
|
||||
$action = PostHandler::get("action");
|
||||
if (!is_null($action) && strcmp($action, "login")==0){
|
||||
$username = PostHandler::get("username");
|
||||
$pass = PostHandler::get("password");
|
||||
|
||||
if (!is_null($username) && strcmp($username,"")!=0 && !is_null($pass) && strcmp($pass,"")!=0){
|
||||
if (!UserLoginManager::login($username, $pass)){
|
||||
$msg = "Invalid Data";
|
||||
}
|
||||
else {
|
||||
GUIHandler::redirect("index.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}catch(GUIException $ex){
|
||||
$msg = $ex->getMessage();
|
||||
$err = true;
|
||||
}catch (Exception $exec){
|
||||
$msg = LogModel::fromException($exec);
|
||||
GlobalVariables::get("dao")->save($msg);
|
||||
}
|
||||
if ($saved){
|
||||
echo "Registrazione avvenuta con successo";
|
||||
}
|
||||
else {
|
||||
?>
|
||||
<div class="topReg"><span></span><div><a class="close" href="javascript:void(0);" onClick="$('#floating').hide();">x</a></div></div>
|
||||
<div style="color:red;"><?php echo $msg;?></div>
|
||||
<div class="modalBody">
|
||||
<form id="logForm">
|
||||
<input type="hidden" name="action" value=""/>
|
||||
<div>Username: <input type="text" name="username" value=""/></div>
|
||||
<div>Password: <input type="password" name="password" value="" /></div>
|
||||
<div ><a id="loginBtn" href="javascript:void(0);">Accedi</a></div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$("#loginBtn").click(function () {
|
||||
$("#logForm input[name=action]").val("login");
|
||||
$.ajax({
|
||||
method:"POST",
|
||||
url:'login.php',
|
||||
data:$("#logForm").serialize(),
|
||||
success: function(data){
|
||||
$("#floating").html(data);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
+91
-15
@@ -3,24 +3,100 @@
|
||||
require_once(dirname(__FILE__)."/load.php");
|
||||
|
||||
try {
|
||||
?>
|
||||
<div class="topReg"><span></span><div><a class="close" href="javascript:void(0);" onClick="$('#floating').hide();">x</a></div></div>
|
||||
<div class="modalBody">
|
||||
<div class="modalResponse"></div>
|
||||
<form id="regForm">
|
||||
<div>Email: <input type="text" name="email" value="" /></div>
|
||||
<div>Username: <input type="text" name="username" value=""/></div>
|
||||
<div>Password: <input type="password" name="pass" value="" /></div>
|
||||
<div>Conferma password: <input type="password" name="passwordConfirm" value="" /></div>
|
||||
<div>Vuoi iscriverti alla newsletter? <input type="checkbox" name="newsletter" value="true" checked /></div>
|
||||
<div class="regMe"><a href="javascript:sendRegistration();">Registrami</a></div>
|
||||
</form>
|
||||
</div>
|
||||
$msg = "";
|
||||
$saved = false;
|
||||
|
||||
<?php
|
||||
$action = PostHandler::get("action");
|
||||
if (!is_null($action) && strcmp($action, "save")==0){
|
||||
$obj = new stdClass();
|
||||
$obj->nome = PostHandler::get("nome");
|
||||
$obj->cognome = PostHandler::get("cognome");
|
||||
|
||||
$email = trim(PostHandler::get("email"));
|
||||
if (is_null($email) || !preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/",$email)){
|
||||
throw new GUIException("L'email inserita non è in un formato valido ($email)");
|
||||
}
|
||||
if (GlobalVariables::get("dao")->count("AdminModel",array("email",$email)) > 0 ){
|
||||
throw new GUIException("L'email inserita è già in uso ($email)");
|
||||
}
|
||||
$obj->email = $email;
|
||||
|
||||
$username = trim(PostHandler::get("username"));
|
||||
|
||||
// Validate Username
|
||||
if (is_null($username) || strcmp($username,"")==0){
|
||||
throw new GUIException("Inserire un nome utente valido");
|
||||
}
|
||||
if (GlobalVariables::get("dao")->count("UserModel",array("username"=>$username ) ) > 0 ){
|
||||
throw new GUIException("Il nome utente '".$username."' è già in uso");
|
||||
}
|
||||
|
||||
$obj->username = $username;
|
||||
|
||||
$pass = trim(PostHandler::get("password"));
|
||||
$passConf = trim(PostHandler::get("password_confirm"));
|
||||
if (is_null($pass) || strcmp($pass,"")==0){
|
||||
throw new GUIException("Inserire una password");
|
||||
}
|
||||
if (strcmp($pass,$passConf)!=0){
|
||||
throw new GUIException("Le password inserite non coincidono");
|
||||
}
|
||||
$obj->password = sha1($pass);
|
||||
|
||||
$obj->newsletter = false;
|
||||
$news = PostHandler::get("newsletter");
|
||||
if (!is_null($news) && strcasecmp("true", $news)){
|
||||
$obj->newsletter = true;
|
||||
}
|
||||
$user = new UserModel($obj);
|
||||
GlobalVariables::get("dao")->save($user);
|
||||
$saved = true;
|
||||
}
|
||||
|
||||
}catch(GUIException $ex){
|
||||
$msg = $ex->getMessage();
|
||||
$err = true;
|
||||
}catch (Exception $exec){
|
||||
$msg = LogModel::fromException($exec);
|
||||
GlobalVariables::get("dao")->save($msg);
|
||||
}
|
||||
// echo "zzzzzzzzzzzzzzzzzzzzzz";
|
||||
if ($saved){
|
||||
echo "Registrazione avvenuta con successo";
|
||||
}
|
||||
else {
|
||||
?>
|
||||
<div class="topReg"><span></span><div><a class="close" href="javascript:void(0);" onClick="$('#floating').hide();">x</a></div></div>
|
||||
<div style="color:red;"><?php echo $msg;?></div>
|
||||
<div class="modalBody">
|
||||
<form id="regForm">
|
||||
<input type="hidden" name="action" value=""/>
|
||||
<div>Nome: <input type="text" name="nome" value="" /></div>
|
||||
<div>Cognome: <input type="text" name="cognome" value="" /></div>
|
||||
<div>Email: <input type="text" name="email" value="" /></div>
|
||||
<div>Username: <input type="text" name="username" value=""/></div>
|
||||
<div>Password: <input type="password" name="password" value="" /></div>
|
||||
<div>Conferma password: <input type="password" name="password_confirm" value="" /></div>
|
||||
<div>Vuoi iscriverti alla newsletter? <input type="checkbox" name="newsletter" value="true" checked /></div>
|
||||
<div ><a id="regMe" href="javascript:void(0);">Registrami</a></div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$("#regMe").click(function () {
|
||||
$("#regForm input[name=action]").val("save");
|
||||
$.ajax({
|
||||
method:"POST",
|
||||
url:'registration.php',
|
||||
data:$("#regForm").serialize(),
|
||||
success: function(data){
|
||||
$("#floating").html(data);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -14,7 +14,7 @@ try {
|
||||
|
||||
$notizie = GlobalVariables::get("dao")->search("NotiziaModel",$searchParameters,
|
||||
array("status"=>NotiziaModel::STATUS_ACCEPTED),
|
||||
array("sort"=>array("about.data"=>-1),"limit"=>10)
|
||||
array("limit"=>10)
|
||||
);
|
||||
|
||||
if (sizeof($notizie)>0){
|
||||
|
||||
@@ -78,6 +78,7 @@ body{font-family:lato, arial;}
|
||||
-moz-box-shadow: 0px 0px 10px -3px;
|
||||
padding: 10px 5px 5px;
|
||||
margin-left: 1px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
|
||||
@@ -136,7 +137,9 @@ body{font-family:lato, arial;}
|
||||
.ansa{border:solid #d6d6d6 1px;border-left:0px;border-right:0px;border-top:0px;height:180px;}
|
||||
.ansa> div {display:inline-block;vertical-align:top;}
|
||||
|
||||
.mediaContent > *{max-height:100%;max-width:100%;}
|
||||
.mediaContent{overflow:hidden;}
|
||||
.mediaContent *{max-height:100%;max-width:100%;}
|
||||
.mediaContent > a{height:100%; width:100%;display:inline-block;}
|
||||
|
||||
.ansaImage{display:inline-block;margin:15px 7px;width:150px; height:113px; overflow:hidden;text-align:center;}
|
||||
.ansaNews{margin-top:2px;width:330px;cursor:pointer;}
|
||||
@@ -224,7 +227,7 @@ body{font-family:lato, arial;}
|
||||
|
||||
.ristorantiTitle, .culturaTitle{font-weight: bold;text-align: left;font-size: 12px;}
|
||||
.ristorantiBlock .ristorantiLink > a, .culturaNews .culturaLink > a{color:#3498d4;font-size:13px;}
|
||||
.middleBanner{max-height:165px;}
|
||||
.middleBanner{height:165px;}
|
||||
.middleBanner > img{max-height:100px;max-width:220px;}
|
||||
|
||||
.ristorantiTitle{margin-top:10px;}
|
||||
@@ -232,7 +235,7 @@ body{font-family:lato, arial;}
|
||||
.rightBarNews{display:inline-block;width:230px;height:1380px;vertical-align:top;margin-top:20px;}
|
||||
.meteo{max-height:165px;max-width:220px;}
|
||||
.meteo > img{max-width:220px;max-height:165px;}
|
||||
.middleRightBanner{width:220px;overflow:hidden;}
|
||||
.middleRightBanner{width: 220px;overflow: hidden;height: 165px;margin: 5px 0;}
|
||||
.middleRightBanner > img{max-width:220px; max-heigth:200px;}
|
||||
|
||||
.reader > .lastContainer, .lastContainer{max-height:120px;margin-top:5px;margin-bottom:5px;border-bottom:dotted #C1B4B4 1px;}
|
||||
|
||||
Reference in New Issue
Block a user