- Aggiornato alle
-
+
diff --git a/public/articolo.php b/public/articolo.php
index 00062d2..79b1fcc 100644
--- a/public/articolo.php
+++ b/public/articolo.php
@@ -7,6 +7,7 @@ Creation Date: 05/feb/2016
require_once(dirname(__FILE__)."/load.php");
try {
+ $sendComment = false;
$articolo = null;
if (array_key_exists("id", $_GET)){
$articolo = GlobalVariables::get("dao")->getFirst("NotiziaModel",array("id"=>$_GET["id"],"status"=>NotiziaModel::STATUS_ACCEPTED));
@@ -22,7 +23,7 @@ try {
$media = DaoMediaHandler::getMainMediaFromModel($articolo);
$medias = DaoMediaHandler::getMedias($articolo);
// echo $articolo->titolo;
- var_dump($medias);
+// var_dump($medias);
$mesi = array(1=>'Gennaio', 'Febbraio', 'Marzo', 'Aprile',
'Maggio', 'Giugno', 'Luglio', 'Agosto',
'Settembre', 'Ottobre', 'Novembre','Dicembre');
@@ -36,6 +37,7 @@ try {
else if ($media->mediaType == MediaModel::TYPE_IMAGE){
$mediaMetaInfo = 'itemprop="image"';
}
+
}catch(GUIException $ex){
$error = $ex->getMessage();
}catch (Exception $exec){
@@ -102,14 +104,20 @@ try {
@@ -149,5 +157,36 @@ try {
// alert(actualLeft);
}
});
+
+ $("#submit").click(function (){
+// $("form#commentoForm").submit(function (){
+ $.ajax({
+ method:'POST',
+ url:'sendCommentoBackend.php',
+ dataType:'html',
+ data:$("#commentoForm").serialize(),
+ success: function(data){
+ $("#commentoArea").remove();
+ $("#sentMessage").html(data);
+ }
+ });
+// });
+ });
+
+
+// $("form#commentoForm").on('submit',function (){
+// $.ajax({
+// type:'post',
+// url:'sendCommentoBackend.php',
+// dataType:'html',
+// data:$("#commentoForm").serialize(),
+// target: '#sentMessage',
+// complete: function(){
+// $("#commentoArea").remove();
+
+// }
+// });
+// });
+
});
\ No newline at end of file
diff --git a/public/js/functions.js b/public/js/functions.js
index bbd8319..2157ff7 100644
--- a/public/js/functions.js
+++ b/public/js/functions.js
@@ -11,3 +11,22 @@ function bannerClick(banner, link){
$.ajax({url: "stats/bannerClick.php", method: "POST", data: { "banner": banner, "source": window.location.href }, dataType: "html" });
window.open(link);
}
+
+function openRegistrationModal(){
+ $.ajax({
+ method:"POST",
+ url:'registration.php',
+ dataType:'html',
+ success: function(data){
+ $("#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 sendRegistration(){
+
+}
\ No newline at end of file
diff --git a/public/registration.php b/public/registration.php
new file mode 100644
index 0000000..c633af2
--- /dev/null
+++ b/public/registration.php
@@ -0,0 +1,19 @@
+
+
+ save($msg);
+}
+echo "zzzzzzzzzzzzzzzzzzzzzz";
+?>
\ No newline at end of file
diff --git a/public/sendCommentoBackend.php b/public/sendCommentoBackend.php
new file mode 100644
index 0000000..84746ff
--- /dev/null
+++ b/public/sendCommentoBackend.php
@@ -0,0 +1,41 @@
+getFirst("NotiziaModel",array("id"=>$id,"status"=>NotiziaModel::STATUS_ACCEPTED));
+ if(!is_null($articolo)){
+
+ $news = new stdClass();
+ $news->notizia = $articolo->id;
+ $news->user = UserLoginManager::getLogged();
+
+ $commento = new CommentoModel($news);
+ $commento->titolo = $titolo;
+ $commento->testo = $testo;
+ $commento->status = CommentoModel::STATUS_PENDING;
+
+ GlobalVariables::get("dao")->save($commento);
+ echo '';
+ }
+ }
+// }
+ else{
+ echo '';
+ }
+
+}catch (Exception $exec){
+ var_dump($exec);
+// echo '';
+ $msg = LogModel::fromException($exec);
+ GlobalVariables::get("dao")->save($msg);
+}
+?>
\ No newline at end of file
diff --git a/public/style/public.css b/public/style/public.css
index 31f17c3..01d5ce4 100644
--- a/public/style/public.css
+++ b/public/style/public.css
@@ -76,6 +76,40 @@ body{font-family:lato, arial;}
margin-left: 1px;
}
+
+/*
+ __ __ _ _
+| \/ | ___ __| | __ _| |
+| |\/| |/ _ \ / _` |/ _` | |
+| | | | (_) | (_| | (_| | |
+|_| |_|\___/ \__,_|\__,_|_|
+
+*/
+
+#floating{
+ background-color:green;
+ z-index:4;
+}
+
+#modalBlock{}/*
+ margin-left:auto;
+ margin-right:auto;
+ background-color:green;
+ width:500px;
+ height:500px;
+ opacity:0;
+} */
+
+
+
+
+
+
+
+
+
+
+
/*
_ _
| | | | ___ _ __ ___ ___ _ __ __ _ __ _ ___