Browse Source

add advertisement

develop
Carmine De Rosa 7 years ago
parent
commit
e64c56e7cb
  1. 123
      blocks/addADV.php
  2. 75
      blocks/advFormSubmit.php
  3. 2
      blocks/contactForm.php
  4. 81
      blocks/removeADV.php
  5. 2
      consiglio-direttivo.php
  6. 81
      css/styles.css
  7. BIN
      docs/files/advertisement/COZe-NegozioLivelli.pdf
  8. 1200
      docs/files/advertisement/package-lock.json
  9. 90
      inserzioni.php
  10. 21
      js/scripts.js
  11. BIN
      scss/.sass-cache/bdcb2ec4843708bc0e130897363854e74056ec3e/colorbox.scssc
  12. BIN
      scss/.sass-cache/bdcb2ec4843708bc0e130897363854e74056ec3e/forms.scssc
  13. BIN
      scss/.sass-cache/bdcb2ec4843708bc0e130897363854e74056ec3e/global.scssc
  14. 3
      scss/colorbox.scss
  15. 26
      scss/forms.scss
  16. 17
      scss/global.scss

123
blocks/addADV.php

@ -0,0 +1,123 @@
<?php
session_start();
@include '../cgi-bin/conn.conn';
@include '../cgi-bin/functions.inc';
@include '../cgi-bin/params.inc';
$GLOBALS['conn'];
$conn=@mysqli_connect($DATAhst,$DATAusr,$DATApwd,$DATAdtb)or die("CONNECTION ERROR");
mysqli_set_charset($conn, "utf8");
?>
<!DOCTYPE html>
<html>
<head>
<title>Ordine dei Farmacisti della Provincia di Salerno</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href="<?php echo $BASE_URL;?>/">
<link href="<?php echo $BASE_URL;?>/css/styles.css" rel="stylesheet" type="text/css"/>
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="row no-gutters">
<?php
if(!$_SESSION['AUTH']){
?>
<div id="actions" class="row mx-auto text-center">
<div class="col-10 my-3 mx-auto">
<button class="is-user">Sono iscritto all'Ordine di Salerno</button>
</div>
<div class="col-10 my-3 mx-auto">
<button class="not-user">NON sono iscritto all'Ordine di Salerno</button>
</div>
</div>
<form id="login-form" method="post">
<div class="row no-gutters">
<div class="col-10 col-sm-6 mx-auto">
<label class="font-10">Username</label>
<input type="text" name="usr" placeholder="username">
<label class="font-10">Password</label>
<input type="password" name="pwd" placeholder="password">
<input type="submit" name="go" value="Accedi">
</div>
</div>
</form>
<?php
}
?>
<form id="adv-form" method="post" enctype="multipart/form-data" action="<?php echo $BASE_URL;?>/blocks/advFormSubmit.php" <?php if($_SESSION['AUTH']){echo "style=\"display: block\"";}?>>
<div class="row no-gutters">
<div class="col-10 mx-auto">
<span class="font-12">Tipologia inserzione</span>
<select class="input" name="type">
<option value="find">Cerco lavoro</option>
<option value="offer">Offro lavoro</option>
<option value="adv">Anninci di compravendita</option>
</select>
</div>
<div class="col-sm-4 d-none d-sm-block"></div>
<div class="col-10 mx-auto">
<span class="font-12">Nome e Cognome</span>
<input type="text" name="full_name" <?php if($_SESSION['AUTH']){echo "value=\"".$_SESSION['AUTH']['last_name']." ".$_SESSION['AUTH']['first_name']."\" readonly";}?>>
</div>
<div class="col-10 mx-auto">
<span class="font-12">Testo inserzione</span>
<textarea cols="40" rows="6" name="text"></textarea>
</div>
<div class="col-10 mx-auto">
<span class="font-12">Comune di residenza*</span>
<input type="text" name="city" required>
</div>
<div class="col-10 mx-auto">
<span class="font-12">Recapiti telefonici*</span>
<input type="text" name="contact_phone" required>
</div>
<div class="col-10 mx-auto">
<span class="font-12">Email contatto*</span>
<input type="text" name="contact_email" required <?php if($_SESSION['AUTH']){echo "value=\"".$_SESSION['AUTH']['email']."\"";}?>>
</div>
<div class="col-10 mx-auto">
<span class="font-12">Allegato (opzionale, ES: curriculum)</span><br>
<input type="file" name="append">
</div>
<div class="col-10 mx-auto">
<div class="g-recaptcha" data-sitekey="6Le7kkUUAAAAAK-lsvoefiaBsH1TycWnHipCC8VF"></div>
</div>
<div class="col-10 mt-3 mx-auto font-10">
<p>L'inserzione avrà una durata di 3 mesi, decorsi i quali verrà automaticamente cancellata.</p>
<p>ATTENZIONE: Per effettuare la pubblicazione diretta di un annuncio bisogna essere un utente iscritto all'Albo ed effettuare il log-in. Per coloro che sono iscritti ad altri Ordini oppure non ancora iscritti, è possibile pubblicare un'inserzione cliccando su "Non sono iscritto all'Ordine di Salerno"; in tal caso l'annuncio verrà valutato ed eventualmente approvato dallo staff dell'Ordine.</p>
</div>
<div class="col-10 mx-auto">
<button type="submit">Pubblica inserzione</button>
</div>
</div>
</form>
</div>
<script type="text/javascript" src="<?php echo $BASE_URL;?>/node_modules/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="https://www.google.com/recaptcha/api.js"></script>
<script>
$('#actions .not-user').on('click', function(){
$('#actions').fadeOut( function(){
$('#adv-form').fadeIn();
});
});
$('#actions .is-user').on('click', function(){
$('#actions').fadeOut( function(){
$('#login-form').fadeIn();
});
});
</script>
</body>
</html>

75
blocks/advFormSubmit.php

@ -0,0 +1,75 @@
<?php
session_start();
@include '../cgi-bin/conn.conn';
@include '../cgi-bin/functions.inc';
@include '../cgi-bin/params.inc';
$GLOBALS['conn'];
$conn=@mysqli_connect($DATAhst,$DATAusr,$DATApwd,$DATAdtb)or die("CONNECTION ERROR");
mysqli_set_charset($conn, "utf8");
?>
<!DOCTYPE html>
<html>
<head>
<title>Ordine dei Farmacisti della Provincia di Salerno</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href="<?php echo $BASE_URL;?>/">
<link href="<?php echo $BASE_URL;?>/css/styles.css" rel="stylesheet" type="text/css"/>
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="row no-gutters py-4">
<?php
if(sizeof($_POST)>0 && $_POST['g-recaptcha-response']){
$uid = $_SESSION['AUTH']['id'] ? $_SESSION['AUTH']['id'] : 0;
$email = $_SESSION['AUTH']['email'] ? $_SESSION['AUTH']['email'] : "";
$append = 0;
if(is_uploaded_file($_FILES['append']['tmp_name'])){
$filename = preg_replace('/[^a-zA-Z0-9\-\._]/','', $_FILES['append']['name']);
$filesize = ($_FILES['append']['size'] < 1000000) ? round($_FILES['append']['size'] / 1000)."k" : round($_FILES['append']['size'] / 1000000)."M";
move_uploaded_file($_FILES['append']['tmp_name'], "../docs/files/advertisement/$filename");
$qf=mysqli_query($conn, "INSERT INTO files VALUES(null, '$filename', '$filename', '/docs/files/advertisement', NOW(), '$filesize')");
$append = mysqli_insert_id($conn);
}
$q=mysqli_query($conn, "INSERT INTO advertisement VALUES(null, $uid, '".addslashes(trim($_POST['full_name']))."',
'".addslashes(trim($email))."', NOW(), '".addslashes(nl2br($_POST['text']))."',
'".addslashes(trim($_POST['city']))."', '".addslashes(trim($_POST['contact_phone']))."',
'".addslashes(trim($_POST['contact_email']))."', $append, '".$_POST['type']."', 1)");
echo "<script>setTimeout( function(){parent.location = parent.location;},1500); </script>";
?>
<div class="col-10 text-center mx-auto">
<p><i class="fa fa-check-circle font-alert p-4"></i></p>
Annuncio aggiunto correttamente!
</div>
<?php
}else{
if(sizeof($_POST) > 0 &&
(!$_POST['g-recaptcha-response'] ||
strlen($_POST['full_name']) < 5 ||
strlen($_POST['city']) < 5 ||
strlen($_POST['contact_phone']) < 5 ||
strlen($_POST['contact_email']) < 5)){
echo "<div class=\"col-10 mx-auto text-red text-center\">
<p><i class=\"fa fa-exclamation-triangle font-alert p-4\"></i></p>
ATTENZIONE: Ricorda ti compilare tutti i campi contrassegnati con * ed effettuare il controllo si sicurezza.</div>";
}
}
?>
</div>
</body>
</html>

2
blocks/contactForm.php

@ -1,6 +1,6 @@
<form id="contact-form" method="post" action="<?php echo $BASE_URL;?>/blocks/contactFormSubmit.php"> <form id="contact-form" method="post" action="<?php echo $BASE_URL;?>/blocks/contactFormSubmit.php">
<div class="row py-4">
<div class="row">
<div class="col-10 col-sm-6 mx-auto"> <div class="col-10 col-sm-6 mx-auto">
<span class="font-12">Destinatario</span> <span class="font-12">Destinatario</span>
<select class="input" name="dest"> <select class="input" name="dest">

81
blocks/removeADV.php

@ -0,0 +1,81 @@
<?php
session_start();
@include '../cgi-bin/conn.conn';
@include '../cgi-bin/functions.inc';
@include '../cgi-bin/params.inc';
$GLOBALS['conn'];
$conn=@mysqli_connect($DATAhst,$DATAusr,$DATApwd,$DATAdtb)or die("CONNECTION ERROR");
mysqli_set_charset($conn, "utf8");
?>
<!DOCTYPE html>
<html>
<head>
<title>Ordine dei Farmacisti della Provincia di Salerno</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href="<?php echo $BASE_URL;?>/">
<link href="<?php echo $BASE_URL;?>/css/styles.css" rel="stylesheet" type="text/css"/>
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="row no-gutters">
<?php
if($_POST['delete']){
$q=mysqli_query($conn, "DELETE FROM advertisement WHERE id=".$_POST['delete']);
echo "<script>parent.$.fn.colorbox.close(); </script>";
}
if($_SESSION['AUTH'] && $_SESSION['AUTH']['id'] == $_GET['uid']){
?>
<form method="post">
<div class="row">
<div class="col-10 col-sm-6 mx-auto text-center">
<p><i class="fa fa-question-circle font-alert pb-4"></i></p>
<p class="my-3">Sei sicuro di voler eliminare questo annuncio?</p>
<input type="hidden" name="delete" value="<?= $_GET['id'];?>">
<input type="submit" name="go" value="Elimina annuncio">
</div>
</div>
</form>
<?php
}else{
?>
<div class="col-10 text-center mx-auto">
<p><i class="fa fa-exclamation-triangle font-alert pb-4"></i></p>
ATTENZIONE:<br>
Accesso non autorizzato, controlla di avere i permessi per eliminare l'annuncio.
</div>
<?php
}
?>
</div>
<script type="text/javascript" src="<?php echo $BASE_URL;?>/node_modules/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="https://www.google.com/recaptcha/api.js"></script>
<script>
$('#actions .not-user').on('click', function(){
$('#actions').fadeOut( function(){
$('#adv-form').fadeIn();
});
});
$('#actions .is-user').on('click', function(){
$('#actions').fadeOut( function(){
$('#login-form').fadeIn();
});
});
</script>
</body>
</html>

2
consiglio-direttivo.php

@ -11,7 +11,7 @@
<div class="row bod my-4"> <div class="row bod my-4">
<div class="col-1 pl-0"> <div class="col-1 pl-0">
<a class="cboxElement avatar" href="<?= $r['avatar'];?>">
<a class="cboxElementPhoto avatar" href="<?= $r['avatar'];?>">
<img src="<?= $r['avatar'];?>"> <img src="<?= $r['avatar'];?>">
</a> </a>
</div> </div>

81
css/styles.css

@ -14118,10 +14118,11 @@ a.text-dark:hover, a.text-dark:focus {
/* line 80, colorbox.scss */ /* line 80, colorbox.scss */
#cboxLoadedContent { #cboxLoadedContent {
margin-top: 0px;
margin-top: 20px;
overflow-x: hidden !important;
} }
/* line 84, colorbox.scss */
/* line 85, colorbox.scss */
#cboxTitle { #cboxTitle {
position: absolute; position: absolute;
top: 4px; top: 4px;
@ -14131,7 +14132,7 @@ a.text-dark:hover, a.text-dark:focus {
color: #949494; color: #949494;
} }
/* line 93, colorbox.scss */
/* line 94, colorbox.scss */
#cboxCurrent { #cboxCurrent {
position: absolute; position: absolute;
top: 4px; top: 4px;
@ -14139,17 +14140,17 @@ a.text-dark:hover, a.text-dark:focus {
color: #949494; color: #949494;
} }
/* line 100, colorbox.scss */
/* line 101, colorbox.scss */
#cboxLoadingOverlay { #cboxLoadingOverlay {
background: url(../images/colorbox/loading_background.png) no-repeat center center; background: url(../images/colorbox/loading_background.png) no-repeat center center;
} }
/* line 104, colorbox.scss */
/* line 105, colorbox.scss */
#cboxLoadingGraphic { #cboxLoadingGraphic {
background: url(../images/colorbox/loading.gif) no-repeat center center; background: url(../images/colorbox/loading.gif) no-repeat center center;
} }
/* line 108, colorbox.scss */
/* line 109, colorbox.scss */
#cboxPrevious, #cboxPrevious,
#cboxNext, #cboxNext,
#cboxSlideshow, #cboxSlideshow,
@ -14161,7 +14162,7 @@ a.text-dark:hover, a.text-dark:focus {
width: auto; width: auto;
background: none; background: none;
} }
/* line 118, colorbox.scss */
/* line 119, colorbox.scss */
#cboxPrevious:active, #cboxPrevious:active,
#cboxNext:active, #cboxNext:active,
#cboxSlideshow:active, #cboxSlideshow:active,
@ -14169,14 +14170,14 @@ a.text-dark:hover, a.text-dark:focus {
outline: 0; outline: 0;
} }
/* line 127, colorbox.scss */
/* line 128, colorbox.scss */
#cboxClose { #cboxClose {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
width: 25px; width: 25px;
} }
/* line 133, colorbox.scss */
/* line 134, colorbox.scss */
#cboxClose:before { #cboxClose:before {
content: '\f057'; content: '\f057';
font-family: 'FontAwesome'; font-family: 'FontAwesome';
@ -14184,13 +14185,13 @@ a.text-dark:hover, a.text-dark:focus {
color: black; color: black;
} }
/* line 142, colorbox.scss */
/* line 143, colorbox.scss */
#cboxClose { #cboxClose {
background: white; background: white;
border-radius: 0 0 0 10px; border-radius: 0 0 0 10px;
} }
/* line 147, colorbox.scss */
/* line 148, colorbox.scss */
.cboxIE #cboxTopLeft, .cboxIE #cboxTopLeft,
.cboxIE #cboxTopCenter, .cboxIE #cboxTopCenter,
.cboxIE #cboxTopRight, .cboxIE #cboxTopRight,
@ -14405,16 +14406,26 @@ a:hover {
font-family: 'FontAwesome'; font-family: 'FontAwesome';
padding: 0 5px; padding: 0 5px;
} }
/* line 125, global.scss */
/* line 124, global.scss */
.items-list .item a.button:after {
content: '';
padding: 0;
}
/* line 131, global.scss */
.items-list .item:hover { .items-list .item:hover {
background: #d1efb5; background: #d1efb5;
} }
/* line 127, global.scss */
/* line 133, global.scss */
.items-list .item:hover .fa-angle-right { .items-list .item:hover .fa-angle-right {
margin-left: 5px; margin-left: 5px;
} }
/* line 142, global.scss */
.items-list .item .more .more-content {
margin-top: 10px;
display: none;
}
/* line 134, global.scss */
/* line 150, global.scss */
#MainContent { #MainContent {
position: relative; position: relative;
margin-top: 40px; margin-top: 40px;
@ -14423,7 +14434,7 @@ a:hover {
overflow: hidden; overflow: hidden;
} }
/* line 142, global.scss */
/* line 158, global.scss */
#map { #map {
width: 100%; width: 100%;
border-radius: 3px; border-radius: 3px;
@ -14431,7 +14442,8 @@ a:hover {
padding: 10px; padding: 10px;
} }
/* line 3, forms.scss */
/* line 2, forms.scss */
.button,
input, input,
select, select,
button, button,
@ -14442,6 +14454,7 @@ textarea {
outline: none !important; outline: none !important;
} }
/* line 10, forms.scss */ /* line 10, forms.scss */
.button::-ms-clear,
input::-ms-clear, input::-ms-clear,
select::-ms-clear, select::-ms-clear,
button::-ms-clear, button::-ms-clear,
@ -14449,6 +14462,7 @@ textarea::-ms-clear {
display: none; display: none;
} }
/* line 13, forms.scss */ /* line 13, forms.scss */
.button:focus,
input:focus, input:focus,
select:focus, select:focus,
button:focus, button:focus,
@ -14456,6 +14470,7 @@ textarea:focus {
outline: none; outline: none;
} }
/* line 14, forms.scss */ /* line 14, forms.scss */
.button::-moz-focus-inner,
input::-moz-focus-inner, input::-moz-focus-inner,
select::-moz-focus-inner, select::-moz-focus-inner,
button::-moz-focus-inner, button::-moz-focus-inner,
@ -14474,13 +14489,15 @@ textarea {
width: 100%; width: 100%;
text-align: left; text-align: left;
box-sizing: border-box; box-sizing: border-box;
background: #f9f9f9;
background: white;
} }
/* line 32, forms.scss */ /* line 32, forms.scss */
.button,
input[type=button], input[type=button],
input[type=submit], input[type=submit],
button { button {
display: inline-block;
background-color: #4e984a; background-color: #4e984a;
color: white; color: white;
text-align: center; text-align: center;
@ -14491,22 +14508,27 @@ button {
border: none; border: none;
transition: .5s; transition: .5s;
} }
/* line 46, forms.scss */
/* line 47, forms.scss */
.button:disabled,
input[type=button]:disabled, input[type=button]:disabled,
input[type=submit]:disabled, input[type=submit]:disabled,
button:disabled { button:disabled {
color: white; color: white;
background-color: #aaa; background-color: #aaa;
} }
/* line 51, forms.scss */
/* line 52, forms.scss */
.button:hover,
input[type=button]:hover, input[type=button]:hover,
input[type=submit]:hover, input[type=submit]:hover,
button:hover { button:hover {
opacity: .7;
color: white; color: white;
background-color: #aaa;
/*
background-color: $grey;
*/
} }
/* line 59, forms.scss */
/* line 63, forms.scss */
select { select {
appearance: none; appearance: none;
-moz-appearance: none; -moz-appearance: none;
@ -14518,12 +14540,12 @@ select {
padding-right: 30px; padding-right: 30px;
} }
/* line 71, forms.scss */
/* line 75, forms.scss */
input[type="radio"], input[type="radio"],
input[type="checkbox"] { input[type="checkbox"] {
display: none; display: none;
} }
/* line 75, forms.scss */
/* line 79, forms.scss */
input[type="radio"] + label::before, input[type="radio"] + label::before,
input[type="checkbox"] + label::before { input[type="checkbox"] + label::before {
content: ""; content: "";
@ -14539,7 +14561,7 @@ input[type="checkbox"] + label::before {
line-height: 14px; line-height: 14px;
border-radius: 2px; border-radius: 2px;
} }
/* line 91, forms.scss */
/* line 95, forms.scss */
input[type="radio"]:checked + label::before, input[type="radio"]:checked + label::before,
input[type="checkbox"]:checked + label::before { input[type="checkbox"]:checked + label::before {
font-family: 'FontAwesome'; font-family: 'FontAwesome';
@ -14548,11 +14570,20 @@ input[type="checkbox"]:checked + label::before {
color: #4e984a; color: #4e984a;
} }
/* line 101, forms.scss */
/* line 105, forms.scss */
input[type="radio"] + label::before { input[type="radio"] + label::before {
border-radius: 16px; border-radius: 16px;
} }
/* line 113, forms.scss */
form {
width: 100%;
}
/* line 116, forms.scss */
form#login-form, form#adv-form {
display: none;
}
/* line 2, header.scss */ /* line 2, header.scss */
header { header {
position: relative; position: relative;

BIN
docs/files/advertisement/COZe-NegozioLivelli.pdf

Binary file not shown.

1200
docs/files/advertisement/package-lock.json

File diff suppressed because it is too large

90
inserzioni.php

@ -0,0 +1,90 @@
<div class="row pb-4">
<div class="col-12">
<div class="section-title">Inserzioni</div>
</div>
<div class="col-12 col-sm-8 mt-4 mx-auto text-center">
<form method="post">
<div class="row font-14 font-bold">
<div class="col-12 col-md-auto font-12">
<p style="line-height: 38px;">Filtra per:</p>
</div>
<div class="col-12 col-md">
<select name="type" class="input" onChange="this.form.submit()">
<option value="all" <?php if($_POST['type'] == "all"){echo "selected";}?>>Tutte le inserzioni</option>
<option value="find" <?php if($_POST['type'] == "find"){echo "selected";}?>>Cerco lavoro</option>
<option value="offer" <?php if($_POST['type'] == "offer"){echo "selected";}?>>Offro lavoro</option>
<option value="adv" <?php if($_POST['type'] == "adv"){echo "selected";}?>>Annunci di compravendita</option>
</select>
</div>
<div class="col-12 col-md">
<select name="city" class="input" onChange="this.form.submit()">
<option value="all">Tutti i comuni</option>
<?php
$q=mysqli_query($conn,"SELECT DISTINCT city FROM advertisement WHERE enabled=1 ORDER BY city DESC");
while($r=mysqli_fetch_array($q)){
echo "<option value=\"".$r['city']."\" ";
if($_POST['city'] == $r['city']){echo "selected";}
echo ">".$r['city']."</option>";
}
?>
</select>
</div>
<!-- <div class="col-auto">
<button type="submit"><i class="fa fa-search"></i> Cerca </button>
</div>-->
</div>
</form>
</div>
<div class="col-12 text-right">
<hr>
<a class="button cboxElement" href="<?php echo $BASE_URL;?>/blocks/addADV.php">Aggiungi una inserzione</a>
</div>
<div class="col-12 items-list py-1">
<?php
$qAdd = "";
if($_POST['type'] && $_POST['type'] != "all"){$qAdd.=" AND type ='".$_POST['type']."'";}
if($_POST['city'] && $_POST['city'] != "all"){$qAdd.=" AND city ='".$_POST['city']."'";}
$q=mysqli_query($conn,"SELECT * FROM advertisement WHERE enabled=1 $qAdd ORDER BY date ASC");
while($r=mysqli_fetch_array($q)){
?>
<div class="item">
<i class="fa fa-angle-right"></i> <strong>Annuncio inserito il <?= conv_date($r['date']); ?></strong>
<p class="m-2 ml-4"><?= $r['text']; ?></p>
<div class="more m-2 ml-4">
<span class="more-title button">Info e contatti</span>
<?php
if($_SESSION['AUTH']['id'] == $r['uid']){
echo "<a href=\"$BASE_URL/blocks/removeADV.php?id=".$r['id']."&uid=".$r['uid']."\" class=\"button cboxElement\">Rimuovi annncio</a>";
}
?>
<div class="more-content">
<p class="font-bold text-upper"><?= $r['full_name']; ?></p>
<p class="">Comune di residenza: <?= $r['city']; ?></p>
<p class="">Recapiti telefonici: <?= $r['contact_phone']; ?></p>
<p class="">Email: <?= $r['contact_email']; ?></p>
<?php
if($r['append']){
$qf=mysqli_query($conn,"SELECT * FROM files WHERE id=".$r['append']);
$rf=mysqli_fetch_array($qf);
echo "<p class=\"mt-2\"><a href=\"".$BASE_URL."".$rf['path']."/".$rf['filename']."\" target=\"_blank\">".$rf['title']."</a></p>";
}
?>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>

21
js/scripts.js

@ -1,10 +1,18 @@
$(document).ready(function(){ $(document).ready(function(){
var cbHeight = '98%';
var cbWidth = '98%';
$('.cboxElement').colorbox({height: '80%',transition: 'elastic', close: ''});
if($(window).width() >= 1024){
cbHeight = '80%';
cbWidth = '60%';
}
$('.cboxElementPhoto').colorbox({height: cbHeight, transition: 'elastic', close: ''});
$('.cboxElement').colorbox({height: cbHeight, width: cbWidth, transition: 'elastic', close: '',iframe: true});
$('#contact-form, #register-form, #reset-form').on('submit', function(event) { $('#contact-form, #register-form, #reset-form').on('submit', function(event) {
$.colorbox({width:"60%", height:"60%",transition: 'elastic', close: '', iframe: true, href:$(this).attr('action')+"?" + $(this).serialize()});
$.colorbox({width: cbWidth, height: cbHeight,transition: 'elastic', close: '', iframe: true, href:$(this).attr('action')+"?" + $(this).serialize()});
event.preventDefault(); event.preventDefault();
}); });
@ -55,9 +63,16 @@ $(document).ready(function(){
$('#news-find').on('submit', function(e){ $('#news-find').on('submit', function(e){
e.preventDefault(); e.preventDefault();
window.location = "/news/0/find/" + $('#news-find').find('.q').val(); window.location = "/news/0/find/" + $('#news-find').find('.q').val();
}); });
$('.items-list .item .more .more-title').on('click', function(){
if($(this).siblings('.more-content').is(':visible')){
$(this).siblings('.more-content').stop().slideUp();
}else{
$(this).siblings('.more-content').stop().slideDown();
}
});
}); });

BIN
scss/.sass-cache/bdcb2ec4843708bc0e130897363854e74056ec3e/colorbox.scssc

Binary file not shown.

BIN
scss/.sass-cache/bdcb2ec4843708bc0e130897363854e74056ec3e/forms.scssc

Binary file not shown.

BIN
scss/.sass-cache/bdcb2ec4843708bc0e130897363854e74056ec3e/global.scssc

Binary file not shown.

3
scss/colorbox.scss

@ -78,7 +78,8 @@
} }
#cboxLoadedContent{ #cboxLoadedContent{
margin-top:0px;
margin-top: 20px;
overflow-x: hidden !important;
} }
#cboxTitle{ #cboxTitle{

26
scss/forms.scss

@ -1,5 +1,5 @@
.button,
input, input,
select, select,
button, button,
@ -26,13 +26,14 @@ textarea{
width: 100%; width: 100%;
text-align: left; text-align: left;
box-sizing: border-box; box-sizing: border-box;
background: #f9f9f9;
background: white;
} }
.button,
input[type=button], input[type=button],
input[type=submit], input[type=submit],
button{ button{
display: inline-block;
background-color: $green; background-color: $green;
color: white; color: white;
text-align: center; text-align: center;
@ -49,8 +50,11 @@ button{
} }
&:hover{ &:hover{
color: white;
background-color: $grey;
opacity: .7;
color: white;
/*
background-color: $grey;
*/
} }
} }
@ -102,3 +106,15 @@ input[type="radio"]{
border-radius: 16px; border-radius: 16px;
} }
} }
form{
width: 100%;
&#login-form,
&#adv-form{
display: none;
}
}

17
scss/global.scss

@ -120,6 +120,12 @@ a{
font-family: 'FontAwesome'; font-family: 'FontAwesome';
padding: 0 5px; padding: 0 5px;
} }
&.button{
&:after{
content: '';
padding: 0;
}
}
} }
&:hover{ &:hover{
@ -128,6 +134,16 @@ a{
margin-left: 5px; margin-left: 5px;
} }
} }
.more{
.more-title{
}
.more-content{
margin-top: 10px;
display: none;
}
}
} }
} }
@ -146,3 +162,4 @@ a{
padding: 10px; padding: 10px;
} }

Loading…
Cancel
Save