@ -0,0 +1,6 @@ |
|||||
|
max_execution_time = 100 |
||||
|
max_input_time = 100 |
||||
|
max_input_nesting_level = 100 |
||||
|
memory_limit = 128M |
||||
|
upload_max_filesize = 128M |
||||
|
post_max_size = 128M |
@ -0,0 +1,6 @@ |
|||||
|
max_execution_time = 100 |
||||
|
max_input_time = 100 |
||||
|
max_input_nesting_level = 100 |
||||
|
memory_limit = 128M |
||||
|
upload_max_filesize = 128M |
||||
|
post_max_size = 128M |
@ -0,0 +1,11 @@ |
|||||
|
|
||||
|
<div class="col-10 col-md-5 my-5 mx-auto"> |
||||
|
<form method="post"> |
||||
|
<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"> |
||||
|
</form> |
||||
|
</div> |
@ -0,0 +1,74 @@ |
|||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Aggiungi accesso</div> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
|
||||
|
<div class="sheet-box p-4"> |
||||
|
|
||||
|
<?php |
||||
|
if($_POST['go']){ |
||||
|
|
||||
|
$sections = implode(',',$_POST['sec']); |
||||
|
$q=mysqli_query($conn, "INSERT INTO users VALUES(null, '".$_POST['usr']."', '".md5($_POST['pwd'])."', '".$_POST['name']."', '".$sections."')"); |
||||
|
|
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-check-circle font-alert p-4"></i></p> |
||||
|
Accesso aggiunto correttamente! |
||||
|
</div>'; |
||||
|
|
||||
|
}else{ |
||||
|
?> |
||||
|
<form method="post"> |
||||
|
<div class="row"> |
||||
|
<div class="col-4"> |
||||
|
<span class="font-12">Nome utente</span> |
||||
|
<input type="text" name="name"> |
||||
|
</div> |
||||
|
<div class="col-4"> |
||||
|
<span class="font-12">Username</span> |
||||
|
<input type="text" name="usr"> |
||||
|
</div> |
||||
|
<div class="col-4"> |
||||
|
<span class="font-12">Password</span> |
||||
|
<input type="password" name="pwd"> |
||||
|
</div> |
||||
|
<div class="col-12 mt-3"> |
||||
|
<span class="font-12">Sezioni</span> |
||||
|
</div> |
||||
|
<?php |
||||
|
$all_sections = array( |
||||
|
'Gestione iscritti' => 'user', |
||||
|
'Notizie' => 'news', |
||||
|
'E-mail' => 'email', |
||||
|
'Files' => 'files', |
||||
|
'Links' => 'links', |
||||
|
'Inserzioni' => 'advertisement', |
||||
|
'Farmacie' => 'pharmacy', |
||||
|
'Parafarmacie' => 'parapharmacy', |
||||
|
'FTP' => 'ftp', |
||||
|
'FTP (sola lettura)' => 'ftp-readonly', |
||||
|
'Gestione accessi' => 'access', |
||||
|
); |
||||
|
|
||||
|
foreach($all_sections as $k => $v){ |
||||
|
echo '<div class="col-3"> |
||||
|
<input type="checkbox" name="sec[]" id="'.$v.'" value="'.$v.'"><label for="'.$v.'">'.$k.'</label> |
||||
|
</div>'; |
||||
|
} |
||||
|
?> |
||||
|
<div class="col-12 mt-3 text-right"> |
||||
|
<button type="submit" name="go" value="1">Aggiungi accesso</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
@ -0,0 +1,86 @@ |
|||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Elenco accessi</div> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
<div class="sheet-box p-4"> |
||||
|
|
||||
|
<?php |
||||
|
if($_POST['go']){ |
||||
|
|
||||
|
|
||||
|
foreach ($_POST['users'] as $index => $usr) { |
||||
|
mysqli_query($conn, "DELETE FROM users WHERE id='$usr'"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-check-circle font-alert p-4"></i></p> |
||||
|
Accesso/i eliminato/i correttamente! |
||||
|
</div>'; |
||||
|
|
||||
|
|
||||
|
}else{ |
||||
|
?> |
||||
|
<div class="col-12 p-0"> |
||||
|
<div class="admin-list-item row no-gutters font-12 font-bold"> |
||||
|
<div class="col-3">Nome utente</div> |
||||
|
<div class="col-3">Username</div> |
||||
|
<div class="col-3">Sezioni abilitate</div> |
||||
|
<div class="col-3 text-right"></div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-12 p-0 admin-list"> |
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<?php |
||||
|
|
||||
|
$all_sections = array( |
||||
|
'user' => 'Gestione iscritti', |
||||
|
'news' => 'Notizie', |
||||
|
'email' => 'E-mail', |
||||
|
'files' => 'Files', |
||||
|
'links' => 'Links', |
||||
|
'advertisement' => 'Inserzioni', |
||||
|
'pharmacy' => 'Farmacie', |
||||
|
'parapharmacy' => 'Parafarmacie', |
||||
|
'ftp' => 'FTP', |
||||
|
'ftp-readonly' => 'FTP (sola lettura)', |
||||
|
'access' => 'Gestione accessi', |
||||
|
); |
||||
|
|
||||
|
$q = mysqli_query($conn, "SELECT * FROM users ORDER BY name ASC"); |
||||
|
$cnt=0; |
||||
|
while($r = mysqli_fetch_array($q)){ |
||||
|
if($r['usr'] != 'dslaky@gmail.com') { |
||||
|
$cnt++; |
||||
|
$bg = ($cnt%2) ? "bg-light-grey" : "bg-white"; |
||||
|
$sec = array(); |
||||
|
foreach(explode(',',$r['sections']) as $s){ |
||||
|
$sec[] = $all_sections[$s]; |
||||
|
} |
||||
|
echo "<div class=\"admin-list-item row no-gutters font-12 $bg\"> |
||||
|
<div class=\"col-3\">".$r['name']."</div> |
||||
|
<div class=\"col-3\">".$r['usr']."</div> |
||||
|
<div class=\"col-3\">".implode(', ',$sec)."</div> |
||||
|
<div class=\"col-3 text-right\"> |
||||
|
<input type=\"checkbox\" name=\"users[]\" id=\"".$r['id']."\" value=\"".$r['id']."\"><label for=\"".$r['id']."\"><i class=\"fa fa-trash\"></i></label> |
||||
|
</div> |
||||
|
</div>"; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
?> |
||||
|
<div class="col-12 text-right mt-3"> |
||||
|
<button type="submit" name="go" value="1">Elimina accesso/i</button> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
@ -0,0 +1,100 @@ |
|||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Aggiungi inserzione</div> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
|
||||
|
<div class="sheet-box p-4"> |
||||
|
|
||||
|
<?php |
||||
|
if($_POST['go']){ |
||||
|
|
||||
|
$uid = 0; |
||||
|
$append = 0; |
||||
|
|
||||
|
if(is_uploaded_file($_FILES['append']['tmp_name'])){ |
||||
|
$filename = date("YmdHis")."-".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"; |
||||
|
$path = '/docs/files/advertisement'; |
||||
|
move_uploaded_file($_FILES['append']['tmp_name'], "..$path/$filename"); |
||||
|
$qf=mysqli_query($conn, "INSERT INTO files VALUES(null, '$filename', '$filename', '".$path."', NOW(), '$filesize')"); |
||||
|
$append = mysqli_insert_id($conn); |
||||
|
} |
||||
|
|
||||
|
$q=mysqli_query($conn, "INSERT INTO advertisement VALUES(null, $uid, '".addslashes(trim($_POST['full_name']))."', |
||||
|
'".addslashes(trim($_POST['email']))."', '".trim(conv_date_en($_POST['date']))."', '".addslashes(nl2br($_POST['text']))."', |
||||
|
'".addslashes(trim($_POST['city']))."', '".addslashes(trim($_POST['contact_phone']))."', |
||||
|
'".addslashes(trim($_POST['contact_email']))."', $append, '".$_POST['type']."', |
||||
|
'".$_POST['enabled']."',1)"); |
||||
|
|
||||
|
|
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-check-circle font-alert p-4"></i></p> |
||||
|
Inserzione aggiunta correttamente! |
||||
|
</div>'; |
||||
|
|
||||
|
|
||||
|
}else{ |
||||
|
?> |
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="row"> |
||||
|
|
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<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">Annunci di compravendita</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Data</span> |
||||
|
<input type="text" name="date" class="datepicker" value="<?= date("d/m/Y");?>"> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Nome e Cognome</span> |
||||
|
<input type="text" name="full_name"> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Testo inserzione</span> |
||||
|
<textarea cols="40" rows="6" name="text"></textarea> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Comune di residenza*</span> |
||||
|
<input type="text" name="city" required> |
||||
|
</div> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Recapiti telefonici*</span> |
||||
|
<input type="text" name="contact_phone" required> |
||||
|
</div> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Email contatto*</span> |
||||
|
<input type="text" name="contact_email" required > |
||||
|
</div> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Allegato (opzionale, ES: curriculum)</span><br> |
||||
|
<input type="file" name="append"> |
||||
|
</div> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Stato inserzione</span> |
||||
|
<select class="input" name="enabled"> |
||||
|
<option value="0">NON abilitata</option> |
||||
|
<option value="1">Abilitata</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
<div class="col-12 text-right"> |
||||
|
<button type="submit" name="go" value="1">Aggiungi inserzione</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
@ -0,0 +1,120 @@ |
|||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Elimina inserzione</div> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
|
||||
|
<div class="sheet-box p-4"> |
||||
|
|
||||
|
<?php |
||||
|
if($_POST['go']){ |
||||
|
|
||||
|
|
||||
|
$qa=mysqli_query($conn, "SELECT append FROM advertisement WHERE id=".trim($getQ[3])); |
||||
|
$ra=mysqli_fetch_array($qa); |
||||
|
|
||||
|
$qtf=mysqli_query($conn, "SELECT * FROM files WHERE id IN (".$ra['append'].")"); |
||||
|
while($rtf=mysqli_fetch_array($qtf)){ |
||||
|
@unlink("..".$rtf['path']."/".$rtf['filename']); |
||||
|
$qtf=mysqli_query($conn, "DELETE FROM files WHERE id=".$rtf['id']); |
||||
|
} |
||||
|
|
||||
|
$q=mysqli_query($conn, "DELETE FROM advertisement WHERE id=".trim($getQ[3])); |
||||
|
|
||||
|
|
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-check-circle font-alert p-4"></i></p> |
||||
|
Inserzione elimina correttamente! |
||||
|
</div>'; |
||||
|
|
||||
|
}else{ |
||||
|
|
||||
|
if($getQ[3]){ |
||||
|
|
||||
|
$q=mysqli_query($conn, "SELECT * FROM advertisement WHERE id = ".trim($getQ[3])); |
||||
|
$r=mysqli_fetch_array($q); |
||||
|
|
||||
|
$TYPE['find'] = "Cerco lavoro"; |
||||
|
$TYPE['offer'] = "Offro lavoro"; |
||||
|
$TYPE['adv'] = "Annunci di compravendita"; |
||||
|
|
||||
|
?> |
||||
|
|
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="row"> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Tipologia inserzione</span> |
||||
|
<p><?= $TYPE[$r['type']];?></p><br> |
||||
|
</div> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Data</span> |
||||
|
<p><?= conv_date($r['date']);?></p><br> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Nome e Cognome</span> |
||||
|
<p><?= $r['full_name'];?></p><br> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Testo inserzione</span> |
||||
|
<p><?= $r['text'];?></p><br> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Comune di residenza</span> |
||||
|
<p><?= $r['city'];?></p><br> |
||||
|
</div> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Recapiti telefonici</span> |
||||
|
<p><?= $r['contact_phone'];?></p><br> |
||||
|
</div> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Email contatto</span> |
||||
|
<p><?= $r['contact_email'];?></p><br> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12 text-right"> |
||||
|
<button type="submit" name="go" value="1">Elimina inserzione</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
<?php |
||||
|
}else{ |
||||
|
|
||||
|
?> |
||||
|
<form method="post" class="form-mod" data-path="<?= $BASE_URL;?>/sheets/advertisement/del"> |
||||
|
<div class="col-12 col-sm-10 mx-auto"> |
||||
|
<div class="row"> |
||||
|
<div class="col"> |
||||
|
<span class="font-12">Seleziona una inserzione</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col"> |
||||
|
<select name="id" class="id"> |
||||
|
<?php |
||||
|
$qn=mysqli_query($conn, "SELECT * FROM advertisement ORDER BY date DESC"); |
||||
|
while($rn=mysqli_fetch_array($qn)){ |
||||
|
echo "<option value=\"".$rn['id']."\">".conv_date($rn['date'])." - ".$rn['full_name']."</option>"; |
||||
|
} |
||||
|
?> |
||||
|
</select> |
||||
|
</div> |
||||
|
<div class="col-auto"> |
||||
|
<button type="submit">Elimina</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
<?php |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
@ -0,0 +1,37 @@ |
|||||
|
|
||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Elenco Inserzioni</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
|
||||
|
<div class="col-12 p-0 admin-list"> |
||||
|
|
||||
|
<?php |
||||
|
$q=mysqli_query($conn, "SELECT * FROM advertisement ORDER BY date DESC"); |
||||
|
|
||||
|
$TYPE['find'] = "Cerco lavoro"; |
||||
|
$TYPE['offer'] = "Offro lavoro"; |
||||
|
$TYPE['adv'] = "Annunci di compravendita"; |
||||
|
|
||||
|
while($r = mysqli_fetch_array($q)){ |
||||
|
$cnt++; |
||||
|
$bg = ($cnt%2) ? "bg-light-grey" : "bg-white"; |
||||
|
$status = $r['enabled'] ? "<i class=\"fa fa-check-circle text-green\"></i>" : "<i class=\"fa fa-ban text-red\"></i>"; |
||||
|
echo "<div class=\"admin-list-item $bg\">$status |
||||
|
<span>".conv_date($r['date'])." - ".$TYPE[$r['type']]." - ".$r['full_name']."</span> |
||||
|
<div class=\"right\"> |
||||
|
<a href=\"$BASE_URL/sheets/advertisement/mod/".$r['id']."\" class=\"button button-small\"><i class=\"fa fa-edit\"></i> Modifica</a> |
||||
|
<a href=\"$BASE_URL/sheets/advertisement/del/".$r['id']."\" class=\"button button-small\"><i class=\"fa fa-trash\"></i> Elimina</a> |
||||
|
</div></div>"; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
@ -0,0 +1,149 @@ |
|||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Modifica inserzione</div> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
|
||||
|
<div class="sheet-box p-4"> |
||||
|
|
||||
|
<?php |
||||
|
if($_POST['go']){ |
||||
|
|
||||
|
$append = ''; |
||||
|
|
||||
|
if(is_uploaded_file($_FILES['append']['tmp_name'])){ |
||||
|
$filename = date("YmdHis")."-".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"; |
||||
|
$path = '/docs/files/advertisement'; |
||||
|
move_uploaded_file($_FILES['append']['tmp_name'], "..$path/$filename"); |
||||
|
$qf=mysqli_query($conn, "INSERT INTO files VALUES(null, '$filename', '$filename', '".$path."', NOW(), '$filesize')"); |
||||
|
$append = "append='".mysqli_insert_id($conn)."', "; |
||||
|
} |
||||
|
|
||||
|
$q=mysqli_query($conn, "UPDATE advertisement SET |
||||
|
full_name='".addslashes(trim($_POST['full_name']))."', |
||||
|
email='".addslashes(trim($_POST['email']))."', |
||||
|
date='".trim(conv_date_en($_POST['date']))."', |
||||
|
text='".addslashes(nl2br($_POST['text']))."', |
||||
|
city='".addslashes(trim($_POST['city']))."', |
||||
|
contact_phone='".addslashes(trim($_POST['contact_phone']))."', |
||||
|
contact_phone='".addslashes(trim($_POST['contact_email']))."', |
||||
|
$append |
||||
|
type='".$_POST['type']."', |
||||
|
enabled=".$_POST['enabled']." WHERE id=".trim($getQ[3])); |
||||
|
|
||||
|
|
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-check-circle font-alert p-4"></i></p> |
||||
|
Inserzione modificata correttamente! |
||||
|
</div>'; |
||||
|
|
||||
|
}else{ |
||||
|
|
||||
|
if($getQ[3]){ |
||||
|
|
||||
|
$q=mysqli_query($conn, "SELECT * FROM advertisement WHERE id = ".trim($getQ[3])); |
||||
|
$r=mysqli_fetch_array($q); |
||||
|
|
||||
|
$appendLink = '<span class="font-12">Nessun allegato presente.</span>'; |
||||
|
if($r['append']) { |
||||
|
$qa=mysqli_query($conn, "SELECT * FROM files WHERE id = ".$r['append']); |
||||
|
$ra=mysqli_fetch_array($qa); |
||||
|
$appendLink = '<a class="font-12" href="'.$BASE_URL.'/..'.$ra['path'].'/'.$ra['filename'].'">'.$ra['filename'].'</a>'; |
||||
|
} |
||||
|
|
||||
|
?> |
||||
|
|
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="row"> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Tipologia inserzione</span> |
||||
|
<select class="input" name="type"> |
||||
|
<option value="find" <?php if($r['type']=="find"){echo "selected";}?>>Cerco lavoro</option> |
||||
|
<option value="offer" <?php if($r['type']=="offer"){echo "selected";}?>>Offro lavoro</option> |
||||
|
<option value="adv" <?php if($r['type']=="adv"){echo "selected";}?>>Annunci di compravendita</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Data</span> |
||||
|
<input type="text" name="date" class="datepicker" value="<?= conv_date($r['date']);?>"> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Nome e Cognome</span> |
||||
|
<input type="text" name="full_name" value="<?= $r['full_name'];?>"> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Testo inserzione</span> |
||||
|
<textarea cols="40" rows="6" name="text"><?= strip_tags($r['text']);?></textarea> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Comune di residenza*</span> |
||||
|
<input type="text" name="city" value="<?= $r['city'];?>"> |
||||
|
</div> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Recapiti telefonici*</span> |
||||
|
<input type="text" name="contact_phone" value="<?= $r['contact_phone'];?>"> |
||||
|
</div> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Email contatto*</span> |
||||
|
<input type="text" name="contact_email" value="<?= $r['contact_email'];?>" > |
||||
|
</div> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Allegato (opzionale, ES: curriculum)</span><br> |
||||
|
<input type="file" name="append"> |
||||
|
<?= $appendLink; ?> |
||||
|
</div> |
||||
|
<div class="col-12 col-sm-6"> |
||||
|
<span class="font-12">Stato inserzione</span> |
||||
|
<select class="input" name="enabled"> |
||||
|
<option value="0" <?php if($r['enabled']==0){echo "selected";}?>>NON abilitata</option> |
||||
|
<option value="1" <?php if($r['enabled']==1){echo "selected";}?>>Abilitata</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
<div class="col-12 text-right"> |
||||
|
<button type="submit" name="go" value="1">Modifica inserzione</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
<?php |
||||
|
}else{ |
||||
|
|
||||
|
?> |
||||
|
<form method="post" class="form-mod" data-path="<?= $BASE_URL;?>/sheets/advertisement/mod"> |
||||
|
<div class="col-12 col-sm-10 mx-auto"> |
||||
|
<div class="row"> |
||||
|
<div class="col"> |
||||
|
<span class="font-12">Seleziona una inserzione</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col"> |
||||
|
<select name="id" class="id"> |
||||
|
<?php |
||||
|
$qn=mysqli_query($conn, "SELECT * FROM advertisement ORDER BY date DESC"); |
||||
|
while($rn=mysqli_fetch_array($qn)){ |
||||
|
echo "<option value=\"".$rn['id']."\">".conv_date($rn['date'])." - ".$rn['full_name']."</option>"; |
||||
|
} |
||||
|
?> |
||||
|
</select> |
||||
|
</div> |
||||
|
<div class="col-auto"> |
||||
|
<button type="submit">Modifica</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
<?php |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
@ -0,0 +1,257 @@ |
|||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Invia E-mail</div> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
|
||||
|
<div class="sheet-box p-4"> |
||||
|
|
||||
|
<?php |
||||
|
|
||||
|
if($_POST['go']) { |
||||
|
|
||||
|
$_SESSION['maillist']=array(); |
||||
|
$_SESSION['subject']=$_POST['title']; |
||||
|
$_SESSION['message_text']=convert_mce($_POST['text']); |
||||
|
$_SESSION['append']=0; |
||||
|
|
||||
|
if(is_uploaded_file($_FILES['append']['tmp_name'])){ |
||||
|
$filename = date("Ymd")."-".preg_replace('/[^a-zA-Z0-9\-\._]/','_', $_FILES['append']['name']); |
||||
|
$path = '../docs/files/email'; |
||||
|
move_uploaded_file($_FILES['append']['tmp_name'], "$path/$filename"); |
||||
|
$_SESSION['append'] = "$path/$filename"; |
||||
|
} |
||||
|
|
||||
|
if(@$_POST['board']){ |
||||
|
$q=mysqli_query($conn, "SELECT email, last_name, first_name FROM board WHERE email!='' AND newsletter=1"); |
||||
|
while($res=mysqli_fetch_array($q)){ |
||||
|
$_SESSION['maillist'][]=$res['email']; |
||||
|
} |
||||
|
$_SESSION['maillist'][]="dslaky@gmail.com"; |
||||
|
} |
||||
|
|
||||
|
if(@$_POST['board_no_nl']){ |
||||
|
$q=mysqli_query($conn, "SELECT email, last_name, first_name FROM board WHERE email!='' AND newsletter=0"); |
||||
|
while($res=mysqli_fetch_array($q)){ |
||||
|
$_SESSION['maillist'][]=$res['email']; |
||||
|
} |
||||
|
$_SESSION['maillist'][]="dslaky@gmail.com"; |
||||
|
} |
||||
|
|
||||
|
if(@$_POST['board_salerno']){ |
||||
|
$q=mysqli_query($conn, "SELECT email, last_name, first_name FROM board WHERE city LIKE '%salerno%' AND email!='' AND newsletter=1"); |
||||
|
while($res=mysqli_fetch_array($q)){ |
||||
|
$_SESSION['maillist'][]=$res['email']; |
||||
|
} |
||||
|
$_SESSION['maillist'][]="dslaky@gmail.com"; |
||||
|
} |
||||
|
|
||||
|
if(@$_POST['board_salerno_no_nl']){ |
||||
|
$q=mysqli_query($conn, "SELECT email, last_name, first_name FROM board WHERE city LIKE '%salerno%' AND email!='' AND newsletter=0"); |
||||
|
while($res=mysqli_fetch_array($q)){ |
||||
|
$_SESSION['maillist'][]=$res['email']; |
||||
|
} |
||||
|
$_SESSION['maillist'][]="dslaky@gmail.com"; |
||||
|
} |
||||
|
|
||||
|
if(@$_POST['salerno']){ |
||||
|
$q=mysqli_query($conn, "SELECT pharmacy, email FROM pharmacy WHERE pharmacy!='COMUNALE' AND city='SALERNO'"); |
||||
|
while($res=mysqli_fetch_array($q)){ |
||||
|
$_SESSION['maillist'][]=$res['email']; |
||||
|
} |
||||
|
$_SESSION['maillist'][]="dslaky@gmail.com"; |
||||
|
} |
||||
|
|
||||
|
if(@$_POST['province']){ |
||||
|
$q=mysqli_query($conn, "SELECT pharmacy, email FROM pharmacy WHERE pharmacy!='COMUNALE' AND city!='SALERNO'"); |
||||
|
while($res=mysqli_fetch_array($q)){ |
||||
|
$_SESSION['maillist'][]=$res['email']; |
||||
|
} |
||||
|
$_SESSION['maillist'][]="dslaky@gmail.com"; |
||||
|
} |
||||
|
|
||||
|
if(@$_POST['municipal']){ |
||||
|
$q=mysqli_query($conn, "SELECT pharmacy, email FROM pharmacy WHERE pharmacy='COMUNALE' AND city!='SALERNO'"); |
||||
|
while($res=mysqli_fetch_array($q)){ |
||||
|
$_SESSION['maillist'][]=$res['email']; |
||||
|
} |
||||
|
$_SESSION['maillist'][]="dslaky@gmail.com"; |
||||
|
} |
||||
|
|
||||
|
if(@$_POST['rural']){ |
||||
|
$q=mysqli_query($conn, "SELECT pharmacy, email FROM pharmacy WHERE type='Rurale'"); |
||||
|
while($res=mysqli_fetch_array($q)){ |
||||
|
$_SESSION['maillist'][]=$res['email']; |
||||
|
} |
||||
|
$_SESSION['maillist'][]="dslaky@gmail.com"; |
||||
|
} |
||||
|
|
||||
|
if(@$_POST['urban']){ |
||||
|
$q=mysqli_query($conn, "SELECT pharmacy, email FROM pharmacy WHERE type='Urbana'"); |
||||
|
while($res=mysqli_fetch_array($q)){ |
||||
|
$_SESSION['maillist'][]=$res['email']; |
||||
|
} |
||||
|
$_SESSION['maillist'][]="dslaky@gmail.com"; |
||||
|
} |
||||
|
|
||||
|
if(@$_POST['parapharmacy']){ |
||||
|
$q=mysqli_query($conn, "SELECT parapharmacy, email FROM parapharmacy"); |
||||
|
while($res=mysqli_fetch_array($q)){ |
||||
|
$_SESSION['maillist'][]=$res['email']; |
||||
|
} |
||||
|
$_SESSION['maillist'][]="dslaky@gmail.com"; |
||||
|
} |
||||
|
|
||||
|
if(@$_POST['other']){ |
||||
|
$allmail=explode("\n",$_POST['other_dest']); |
||||
|
for($i=0;$i<count($allmail);$i++){ |
||||
|
$_SESSION['maillist'][]=trim($allmail[$i]); |
||||
|
} |
||||
|
$_SESSION['maillist'][]="dslaky@gmail.com"; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
$mailcount=count($_SESSION['maillist']); |
||||
|
|
||||
|
// 200 mail 20 min |
||||
|
|
||||
|
if($mailcount){ |
||||
|
|
||||
|
if($mailcount>200){ |
||||
|
echo "<br><br><br><center><br><h2>INVIO IN CORSO</h2><br>Non chiudere o ricaricare la pagina.<br><br>"; |
||||
|
echo "<b>".$mailcount."</b> mail alla conclusione.<br><br>"; |
||||
|
echo "<img src=\"$BASE_URL/../images/loading_spinner.gif\"></center>"; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
$mailsend = array_slice($_SESSION['maillist'],0,200); |
||||
|
|
||||
|
$SM_email = "dslaky@gmail.com"; |
||||
|
$SM_email2 = 0; |
||||
|
$SM_email_CC = 0; |
||||
|
$SM_subject = $_SESSION['subject']; |
||||
|
$SM_message = $_SESSION['message_text']; |
||||
|
$SM_showalert = 0; |
||||
|
$SM_append = $_SESSION['append']; |
||||
|
|
||||
|
foreach($mailsend as $email){ |
||||
|
if(trim($email) != '') { |
||||
|
$SM_email = $email; |
||||
|
|
||||
|
$mailFooter = "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" style=\"border-top: 1px solid gray\">". |
||||
|
"<tr><td colspan=\"2\" align=\"center\" style=\"text-align:justify; font-size:6pt; color: gray\">". |
||||
|
"Ricevi questa mail perchè sei iscritto alla newsletter dell'Ordine dei Farmacisti della Provincia di Salerno, se ti sei iscritto per sbaglio o se desideri non ricevere più email come questa accedi al tuo account ed annulla l'iscrizione, oppure <a href=\"$BASE_URL/../unsubscribe/$SM_email\">clicca qui</a></td></tr></table>"; |
||||
|
sendMail($SM_email,$SM_email2,$SM_email_CC,$SM_subject,$SM_message,$SM_showalert,$SM_append); |
||||
|
//echo $SM_email."<br>";.'<br><br>'.$mailFooter |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//sendMail("dslaky@gmail.com",$SM_email2,$SM_email_CC,$SM_subject." (-".(round($mailcount/200)).")",$SM_message,$SM_showalert,$SM_append); |
||||
|
|
||||
|
array_splice($_SESSION['maillist'],0,200); |
||||
|
|
||||
|
if($mailcount<=200){ |
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-check-circle font-alert p-4"></i></p> |
||||
|
E-mail inviate correttamente! |
||||
|
</div>'; |
||||
|
}else{ |
||||
|
echo "<script>setTimeout('window.location=\"$BASE_URL/sheets/email/send\"',120000);</script>"; |
||||
|
} |
||||
|
|
||||
|
} else { |
||||
|
|
||||
|
|
||||
|
?> |
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Oggetto</span> |
||||
|
<input type="text" name="title"> |
||||
|
</div> |
||||
|
<div class="col-12 pb-2"> |
||||
|
<span class="font-12">Testo</span> |
||||
|
<textarea cols="40" rows="6" name="text" class="mce"></textarea> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Allegato</span> |
||||
|
<input type="file" name="append"> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12 row mt-3"> |
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Destinatari</span> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
<input type="checkbox" name="board" id="board"> |
||||
|
<label for="board">Iscritti all'albo (che hanno acconsentito all'invio di newsletter)</label> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
<input type="checkbox" name="board_no_nl" id="board_no_nl"> |
||||
|
<label for="board_no_nl">Iscritti all'albo (che hanno NON acconsentito all'invio di newsletter)</label> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
<input type="checkbox" name="board_salerno" id="board_salerno"> |
||||
|
<label for="board_salerno">Iscritti all'albo residenti a Salerno città (che hanno acconsentito all'invio di newsletter)</label> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
<input type="checkbox" name="board_salerno_no_nl" id="board_salerno_no_nl"> |
||||
|
<label for="board_salerno_no_nl">Iscritti all'albo residenti a Salerno città (che NON hanno acconsentito all'invio di newsletter)</label> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-6"> |
||||
|
<input type="checkbox" name="salerno" id="salerno"> |
||||
|
<label for="salerno">Farmacie di Salerno città</label> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-6"> |
||||
|
<input type="checkbox" name="province" id="province"> |
||||
|
<label for="province">Farmacie della Provincia (esclusa Salerno città)</label> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-6"> |
||||
|
<input type="checkbox" name="parapharmacy" id="parapharmacy"> |
||||
|
<label for="parapharmacy">Parafarmacie</label> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-6"> |
||||
|
<input type="checkbox" name="municipal" id="municipal"> |
||||
|
<label for="municipal">Farmacie Comunali (esclusa Salerno città)</label> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-6"> |
||||
|
<input type="checkbox" name="rural" id="rural"> |
||||
|
<label for="rural">Farmacie Rurali (tutte)</label> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-6"> |
||||
|
<input type="checkbox" name="urban" id="urban"> |
||||
|
<label for="urban">Farmacie Urbane (tutte)</label> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12 pr-0"> |
||||
|
<input type="checkbox" name="other" id="other"> |
||||
|
<label for="other">Altri destinatari - Indirizzi E-Mail (uno sotto l'altro)</label> |
||||
|
<textarea name="other_dest" cols="40" rows="3" style="width: 100%"></textarea> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12 text-right"> |
||||
|
<button type="submit" name="go" value="1">Invia</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
@ -0,0 +1,62 @@ |
|||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Elenco files</div> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
|
||||
|
<div class="sheet-box p-4"> |
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Cerca in</span> |
||||
|
<select name="path" onChange="this.form.submit()"> |
||||
|
<option value="">- Seleziona una sezione - </option> |
||||
|
|
||||
|
<option value="/docs/amministrazione-trasparente" <?php if($_POST['path']=="/docs/amministrazione-trasparente"){echo "selected";}?>>Amministrazione trasparente</option> |
||||
|
<option value="/docs/bilanci" <?php if($_POST['path']=="/docs/bilanci"){echo "selected";}?>>Bilanci dell'Ordine</option> |
||||
|
<option value="/docs/concorsi" <?php if($_POST['path']=="/docs/concorsi"){echo "selected";}?>>Concorsi, avvisi e bandi</option> |
||||
|
<option value="/docs/consigli-sanitari" <?php if($_POST['path']=="/docs/consigli-sanitari"){echo "selected";}?>>Consigli sanitari</option> |
||||
|
<option value="/docs/dipartimento-farmacia" <?php if($_POST['path']=="/docs/dipartimento-farmacia"){echo "selected";}?>>Dipartimento di Farmacia</option> |
||||
|
<option value="/docs/ecm" <?php if($_POST['path']=="/docs/ecm"){echo "selected";}?>>E.C.M.</option> |
||||
|
<option value="/docs/farmaci-ritirati" <?php if($_POST['path']=="/docs/farmaci-ritirati"){echo "selected";}?>>Farmaci ritirati</option> |
||||
|
<option value="/docs/farmacopea" <?php if($_POST['path']=="/docs/farmacopea"){echo "selected";}?>>Farmacopea ufficiale</option> |
||||
|
<option value="/docs/farmacovigilanza" <?php if($_POST['path']=="/docs/farmacovigilanza"){echo "selected";}?>>Farmacovigilanza</option> |
||||
|
<option value="/docs/ricette-e-timbri" <?php if($_POST['path']=="/docs/ricette-e-timbri"){echo "selected";}?>>Furti ricette/timbri</option> |
||||
|
<option value="/docs/leggi-decreti-normative" <?php if($_POST['path']=="/docs/leggi-decreti-normative"){echo "selected";}?>>Leggi, decreti e normative UE</option> |
||||
|
<option value="/docs/modulistica/privata" <?php if($_POST['path']=="/docs/modulistica/privata"){echo "selected";}?>>Modulistica privata</option> |
||||
|
<option value="/docs/modulistica/pubblica" <?php if($_POST['path']=="/docs/modulistica/pubblica"){echo "selected";}?>>Modulistica pubblica</option> |
||||
|
<option value="/docs/ordinanze-tar" <?php if($_POST['path']=="/docs/ordinanze-tar"){echo "selected";}?>>Ordinanze T.A.R. Campania</option> |
||||
|
<option value="/docs/rassegna-stampa" <?php if($_POST['path']=="/docs/rassegna-stampa"){echo "selected";}?>>Rassegna stampa</option> |
||||
|
<option value="/docs/ricette-veterinarie" <?php if($_POST['path']=="/docs/ricette-veterinarie"){echo "selected";}?>>Ricette veterinarie</option> |
||||
|
<option value="/docs/slides" <?php if($_POST['path']=="/docs/slides"){echo "selected";}?>>Slides</option> |
||||
|
<option value="/docs/variazioni-albo" <?php if($_POST['path']=="/docs/variazioni-albo"){echo "selected";}?>>Variazioni Albo</option> |
||||
|
<option value="/docs/variazioni-farmacie" <?php if($_POST['path']=="/docs/variazioni-farmacie"){echo "selected";}?>>Variazioni Farmacie</option> |
||||
|
<option value="/docs/files/tmpfiles" <?php if($_POST['path']=="/docs/files/tmpfiles"){echo "selected";}?>>FILES TEMPORANEI</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
|
||||
|
<div class="col-12 p-0 admin-list"> |
||||
|
<?php |
||||
|
if($_POST['path']){ |
||||
|
|
||||
|
$q = mysqli_query($conn, "SELECT * FROM files WHERE path='".$_POST['path']."' ORDER BY date DESC"); |
||||
|
$cnt=0; |
||||
|
while($r = mysqli_fetch_array($q)){ |
||||
|
$cnt++; |
||||
|
$bg = ($cnt%2) ? "bg-light-grey" : "bg-white"; |
||||
|
echo "<div class=\"admin-list-item row no-gutters font-12 $bg\"> |
||||
|
<div class=\"col-5\">".$r['title']."</div> |
||||
|
<div class=\"col-5\"> <a target=\"_black\" href=\"$BASE_URL/..".$_POST['path']."/".$r['filename']."\">".$r['filename']."</a></div> |
||||
|
<div class=\"col-2 text-right\"> ".conv_date($r['date'])."</div> |
||||
|
</div>"; |
||||
|
} |
||||
|
} |
||||
|
?> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
@ -0,0 +1,94 @@ |
|||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Aggiungi file</div> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
|
||||
|
<div class="sheet-box p-4"> |
||||
|
|
||||
|
<?php |
||||
|
if($_POST['go']){ |
||||
|
|
||||
|
if($_FILES['files']){ |
||||
|
$files = reArrayFiles($_FILES['files']); |
||||
|
foreach ($files as $index => $file) { |
||||
|
if(is_uploaded_file($file['tmp_name'])){ |
||||
|
$filename = date("YmdHis")."-".preg_replace('/[^a-zA-Z0-9\-\._]/','_', $file['name']); |
||||
|
$filesize = ($file['size'] < 1000000) ? round($file['size'] / 1000)."k" : round($file['size'] / 1000000)."M"; |
||||
|
$title = $_POST['titles'][$index]; |
||||
|
|
||||
|
move_uploaded_file($file['tmp_name'], "../docs/ftp/$filename"); |
||||
|
$qf=mysqli_query($conn, "INSERT INTO ftp VALUES(null, '$title', '$filename', ".$_POST['municipality'].", NOW(), ".$_POST['year'].",'$filesize')"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-check-circle font-alert p-4"></i></p> |
||||
|
File aggiunto/i correttamente! |
||||
|
</div>'; |
||||
|
|
||||
|
|
||||
|
}else{ |
||||
|
?> |
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="row"> |
||||
|
<div class="col-8"> |
||||
|
<span class="font-12">Carica in</span> |
||||
|
<select name="municipality"> |
||||
|
<option value="">- Seleziona un comune - </option> |
||||
|
|
||||
|
<?php |
||||
|
$q = mysqli_query($conn, "SELECT * FROM comuni ORDER BY comune ASC"); |
||||
|
$cnt=0; |
||||
|
while($r = mysqli_fetch_array($q)){ |
||||
|
echo '<option value="'.$r['id'].'" '.($_POST['municipality'] == $r['id'] ? 'selected' : '').'>'.$r['comune'].'</option>'; |
||||
|
} |
||||
|
?> |
||||
|
</select> |
||||
|
</div> |
||||
|
<div class="col-4"> |
||||
|
<span class="font-12">Anno</span> |
||||
|
<select name="year"> |
||||
|
<option value="">- Seleziona l'anno - </option> |
||||
|
|
||||
|
<?php |
||||
|
for($i = 2020; $i <= date('Y'); $i++){ |
||||
|
echo '<option value="'.$i.'" '.(date('Y') == $i ? 'selected' : '').'>'.$i.'</option>'; |
||||
|
} |
||||
|
?> |
||||
|
</select> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Files</span> |
||||
|
<div class="files-list"> |
||||
|
<div class="list"> |
||||
|
<div class="row master"> |
||||
|
<div class="col-8"> |
||||
|
<input type="text" name="titles[]" placeholder="Nome del file"> |
||||
|
</div> |
||||
|
<div class="col-4"> |
||||
|
<input type="file" name="files[]"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<button class="button button-small add-file"><i class="fa fa-plus"></i> aggiungi riga</button> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
<div class="col-12 text-right"> |
||||
|
<button type="submit" name="go" value="1">Aggiungi file</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
@ -0,0 +1,94 @@ |
|||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Elenco files</div> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
|
||||
|
<div class="sheet-box p-4"> |
||||
|
<?php |
||||
|
if($_POST['go']){ |
||||
|
|
||||
|
foreach ($_POST['files'] as $index => $file) { |
||||
|
|
||||
|
$qf=mysqli_query($conn, "SELECT * FROM ftp WHERE id='$file'"); |
||||
|
$rf = mysqli_fetch_array($qf); |
||||
|
|
||||
|
@unlink("../docs/ftp/".$rf['filename']); |
||||
|
mysqli_query($conn, "DELETE FROM ftp WHERE id='$file'"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-check-circle font-alert p-4"></i></p> |
||||
|
File eliminato correttamente! |
||||
|
</div>'; |
||||
|
|
||||
|
} else { |
||||
|
?> |
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="row"> |
||||
|
<div class="col-8"> |
||||
|
<span class="font-12">Visualizza in</span> |
||||
|
<select name="municipality" onChange="this.form.submit()"> |
||||
|
<option value="">- Seleziona un comune - </option> |
||||
|
|
||||
|
<?php |
||||
|
$q = mysqli_query($conn, "SELECT * FROM comuni ORDER BY comune ASC"); |
||||
|
$cnt=0; |
||||
|
while($r = mysqli_fetch_array($q)){ |
||||
|
echo '<option value="'.$r['id'].'" '.($_POST['municipality'] == $r['id'] ? 'selected' : '').'>'.$r['comune'].'</option>'; |
||||
|
} |
||||
|
?> |
||||
|
</select> |
||||
|
</div> |
||||
|
<div class="col-4"> |
||||
|
<span class="font-12">Anno</span> |
||||
|
<select name="year" onChange="this.form.submit()"> |
||||
|
<option value="">- Seleziona l'anno - </option> |
||||
|
|
||||
|
<?php |
||||
|
for($i = 2019; $i <= date('Y'); $i++){ |
||||
|
echo '<option value="'.$i.'" '.($_POST['year'] == $i ? 'selected' : '').'>'.$i.'</option>'; |
||||
|
} |
||||
|
?> |
||||
|
</select> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</form> |
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="col-12 p-0 admin-list"> |
||||
|
|
||||
|
<?php |
||||
|
if($_POST['municipality']){ |
||||
|
|
||||
|
$q = mysqli_query($conn, "SELECT * FROM ftp WHERE municipality='".$_POST['municipality']."' AND year='".$_POST['year']."' ORDER BY date DESC"); |
||||
|
$cnt=0; |
||||
|
while($r = mysqli_fetch_array($q)){ |
||||
|
$cnt++; |
||||
|
$bg = ($cnt%2) ? "bg-light-grey" : "bg-white"; |
||||
|
echo "<div class=\"admin-list-item row no-gutters font-12 $bg\"> |
||||
|
<div class=\"col-4\"><a target=\"_black\" href=\"$BASE_URL/../docs/ftp/".$r['filename']."\">".$r['title']."</a></div> |
||||
|
<div class=\"col-4\"><a target=\"_black\" href=\"$BASE_URL/../docs/ftp/".$r['filename']."\">".substr($r['filename'],15)."</a></div> |
||||
|
<div class=\"col-2\"> ".conv_date($r['date'])."</div> |
||||
|
<div class=\"col-1 text-right\"> ".$r['size']."</div> |
||||
|
<div class=\"col-1 text-right\"> |
||||
|
<input type=\"checkbox\" name=\"files[]\" id=\"".$r['id']."\" value=\"".$r['id']."\"><label for=\"".$r['id']."\"><i class=\"fa fa-trash\"></i></label> |
||||
|
</div> |
||||
|
</div>"; |
||||
|
} |
||||
|
} |
||||
|
?> |
||||
|
</div> |
||||
|
<div class="col-12 text-right"> |
||||
|
<button type="submit" name="go" value="1">Elimina file/s</button> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
@ -0,0 +1,109 @@ |
|||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Importa parafarmacie</div> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
|
||||
|
<div class="sheet-box p-4"> |
||||
|
|
||||
|
<?php |
||||
|
|
||||
|
if($_POST['go']){ |
||||
|
|
||||
|
/* |
||||
|
[0] => RAGIONE SOCIALE |
||||
|
[1] => INDIRIZZO |
||||
|
[2] => CAP |
||||
|
[3] => LOCALITA |
||||
|
[4] => PROVINCIA |
||||
|
[5] => CODICE |
||||
|
[6] => TELEFONO |
||||
|
[7] => E-MAIL |
||||
|
|
||||
|
parapharmacy |
||||
|
city |
||||
|
address |
||||
|
phone |
||||
|
fax |
||||
|
web |
||||
|
email |
||||
|
*/ |
||||
|
|
||||
|
if(is_uploaded_file($_FILES['file']['tmp_name'])){ |
||||
|
|
||||
|
$dest="tmpfiles/tmpparapharmacy"; |
||||
|
|
||||
|
if(move_uploaded_file($_FILES['file']['tmp_name'],$dest)){ |
||||
|
|
||||
|
$myfile = fopen($dest, "r") or die("Unable to open file!"); |
||||
|
|
||||
|
while(!feof($myfile)) { |
||||
|
$r = explode("|",fgets($myfile)); |
||||
|
|
||||
|
if($r[0]!='N_Albo' && $r[0]!=''){ |
||||
|
$q="INSERT INTO parapharmacy VALUES( |
||||
|
'".addslashes(trim(anyToUTF8($r[0])))."','','','".addslashes(trim(anyToUTF8($r[3])))."', |
||||
|
'".addslashes(trim(anyToUTF8($r[1])))."','".addslashes(trim(anyToUTF8($r[6])))."','','', |
||||
|
'".addslashes(trim(anyToUTF8($r[7])))."') |
||||
|
ON DUPLICATE KEY UPDATE |
||||
|
parapharmacy='".addslashes(trim(anyToUTF8($r[0])))."', |
||||
|
city='".addslashes(trim(anyToUTF8($r[3])))."', |
||||
|
address='".addslashes(trim(anyToUTF8($r[1])))."', |
||||
|
phone='".addslashes(trim(anyToUTF8($r[6])))."', |
||||
|
email='".addslashes(trim(anyToUTF8($r[7])))."'"; |
||||
|
} |
||||
|
|
||||
|
mysqli_query($conn, $q); |
||||
|
} |
||||
|
|
||||
|
fclose($myfile); |
||||
|
|
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-exclamation-triangle font-alert p-4"></i></p> |
||||
|
<p>File importato correttamente!</p> |
||||
|
</div>'; |
||||
|
}else{ |
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-exclamation-triangle font-alert p-4"></i></p> |
||||
|
<p>ATENZIONE: Errore nell\'importazione del file!</p> |
||||
|
</div>'; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
}else{ |
||||
|
?> |
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="row"> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">File *.CSV</span> |
||||
|
<div class="files-list"> |
||||
|
<div class="list"> |
||||
|
<div class="row master"> |
||||
|
<div class="col"> |
||||
|
<input type="file" name="file"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<p>ATTENZIONE: assicurarsi che il file sia del formato corretto.</p> |
||||
|
</div> |
||||
|
<div class="col-12 text-right"> |
||||
|
<button type="submit" name="go" value="1">Importa da file</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
@ -0,0 +1,111 @@ |
|||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Importa farmacie</div> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
|
||||
|
<div class="sheet-box p-4"> |
||||
|
|
||||
|
<?php |
||||
|
|
||||
|
if($_POST['go']){ |
||||
|
|
||||
|
/* |
||||
|
[0] => RAGIONE SOCIALE |
||||
|
[1] => INDIRIZZO |
||||
|
[2] => CAP |
||||
|
[3] => LOCALITA |
||||
|
[4] => PROVINCIA |
||||
|
[5] => CODICE |
||||
|
[6] => TELEFONO |
||||
|
[7] => E-MAIL |
||||
|
|
||||
|
pharmacy |
||||
|
city |
||||
|
address |
||||
|
phone |
||||
|
web |
||||
|
email |
||||
|
email_cert |
||||
|
type |
||||
|
|
||||
|
*/ |
||||
|
|
||||
|
if(is_uploaded_file($_FILES['file']['tmp_name'])){ |
||||
|
|
||||
|
$dest="tmpfiles/tmppharmacy"; |
||||
|
|
||||
|
if(move_uploaded_file($_FILES['file']['tmp_name'],$dest)){ |
||||
|
|
||||
|
$myfile = fopen($dest, "r") or die("Unable to open file!"); |
||||
|
|
||||
|
while(!feof($myfile)) { |
||||
|
$r = explode("|",fgets($myfile)); |
||||
|
|
||||
|
if($r[0]!='N_Albo' && $r[0]!=''){ |
||||
|
$q="INSERT INTO pharmacy VALUES( |
||||
|
'".addslashes(trim(anyToUTF8($r[0])))."','','','".addslashes(trim(anyToUTF8($r[3])))."', |
||||
|
'".addslashes(trim(anyToUTF8($r[1])))."','".addslashes(trim(anyToUTF8($r[6])))."','', |
||||
|
'".addslashes(trim(anyToUTF8($r[7])))."','') |
||||
|
ON DUPLICATE KEY UPDATE |
||||
|
pharmacy='".addslashes(trim(anyToUTF8($r[0])))."', |
||||
|
city='".addslashes(trim(anyToUTF8($r[3])))."', |
||||
|
address='".addslashes(trim(anyToUTF8($r[1])))."', |
||||
|
phone='".addslashes(trim(anyToUTF8($r[6])))."', |
||||
|
email='".addslashes(trim(anyToUTF8($r[7])))."'"; |
||||
|
} |
||||
|
|
||||
|
mysqli_query($conn, $q); |
||||
|
} |
||||
|
|
||||
|
fclose($myfile); |
||||
|
|
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-exclamation-triangle font-alert p-4"></i></p> |
||||
|
<p>File importato correttamente!</p> |
||||
|
</div>'; |
||||
|
}else{ |
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-exclamation-triangle font-alert p-4"></i></p> |
||||
|
<p>ATENZIONE: Errore nell\'importazione del file!</p> |
||||
|
</div>'; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
}else{ |
||||
|
?> |
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="row"> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">File *.CSV</span> |
||||
|
<div class="files-list"> |
||||
|
<div class="list"> |
||||
|
<div class="row master"> |
||||
|
<div class="col"> |
||||
|
<input type="file" name="file"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<p>ATTENZIONE: assicurarsi che il file sia del formato corretto.</p> |
||||
|
</div> |
||||
|
<div class="col-12 text-right"> |
||||
|
<button type="submit" name="go" value="1">Importa da file</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
@ -0,0 +1,143 @@ |
|||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Importa utenti</div> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
|
||||
|
<div class="sheet-box p-4"> |
||||
|
|
||||
|
<?php |
||||
|
|
||||
|
if($_POST['go']){ |
||||
|
|
||||
|
/* |
||||
|
[0] => N_Albo |
||||
|
[1] => Data_Iscrizione |
||||
|
[2] => COGNOME |
||||
|
[3] => NOME |
||||
|
[4] => INDIRIZZO |
||||
|
[5] => CAP |
||||
|
[6] => LOCALITA |
||||
|
[7] => PROVINCIA |
||||
|
[8] => DATA DI NASCITA |
||||
|
[9] => LOCALITÀ DI NASCITA |
||||
|
[10] => DATA DI LAUREA |
||||
|
[11] => UNIVERSITÀ DI LAUREA |
||||
|
[12] => LAUREA |
||||
|
[13] => ANNO |
||||
|
[14] => UNIVERSITÀ ABILITAZIONE |
||||
|
[15] => E-MAIL |
||||
|
|
||||
|
0 iscrizione |
||||
|
- usr |
||||
|
- pwd |
||||
|
15 email |
||||
|
2 cognome |
||||
|
3 nome |
||||
|
8 data_nascita |
||||
|
9 luogo_nascita |
||||
|
1 data_iscr |
||||
|
4 indirizzo |
||||
|
5 cap |
||||
|
6 citta |
||||
|
7 provincia |
||||
|
11 laurea_a |
||||
|
10 laurea_il |
||||
|
12 laurea_in |
||||
|
13 abilitazione_nel |
||||
|
14 abilitazione_a |
||||
|
- abilitato |
||||
|
- specializzazioni |
||||
|
*/ |
||||
|
|
||||
|
if(is_uploaded_file($_FILES['file']['tmp_name'])){ |
||||
|
|
||||
|
$dest="tmpfiles/tmpusers"; |
||||
|
|
||||
|
if(move_uploaded_file($_FILES['file']['tmp_name'],$dest)){ |
||||
|
|
||||
|
$myfile = fopen($dest, "r") or die("Unable to open file!"); |
||||
|
|
||||
|
while(!feof($myfile)) { |
||||
|
$r = explode("|",fgets($myfile)); |
||||
|
|
||||
|
if($r[0]!='N_Albo' && $r[0]!=''){ |
||||
|
$q="INSERT INTO board VALUES( |
||||
|
'".addslashes(trim(anyToUTF8($r[0])))."','','','".addslashes(trim(anyToUTF8($r[15])))."','".addslashes(trim(anyToUTF8($r[2])))."', |
||||
|
'".addslashes(trim(anyToUTF8($r[3])))."','".addslashes(trim(anyToUTF8($r[8])))."','".addslashes(trim(anyToUTF8($r[9])))."', |
||||
|
'".addslashes(trim(anyToUTF8($r[1])))."','".addslashes(trim(anyToUTF8($r[4])))."','".addslashes(trim(anyToUTF8($r[5])))."', |
||||
|
'".addslashes(trim(anyToUTF8($r[6])))."','".addslashes(trim(anyToUTF8($r[7])))."','".addslashes(trim(anyToUTF8($r[11])))."', |
||||
|
'".addslashes(trim(anyToUTF8($r[10])))."','".addslashes(trim(anyToUTF8($r[12])))."','".addslashes(trim(anyToUTF8($r[13])))."', |
||||
|
'".addslashes(trim(anyToUTF8($r[14])))."',0,'',0,0) |
||||
|
ON DUPLICATE KEY UPDATE |
||||
|
email='".addslashes(trim(anyToUTF8($r[15])))."', |
||||
|
last_name='".addslashes(trim(anyToUTF8($r[2])))."', |
||||
|
first_name='".addslashes(trim(anyToUTF8($r[3])))."', |
||||
|
birth_date='".addslashes(trim(anyToUTF8($r[8])))."', |
||||
|
birth_place='".addslashes(trim(anyToUTF8($r[9])))."', |
||||
|
register_date='".addslashes(trim(anyToUTF8($r[1])))."', |
||||
|
address='".addslashes(trim(anyToUTF8($r[4])))."', |
||||
|
zip_code='".addslashes(trim(anyToUTF8($r[5])))."', |
||||
|
city='".addslashes(trim(anyToUTF8($r[6])))."', |
||||
|
province='".addslashes(trim(anyToUTF8($r[7])))."', |
||||
|
degree_place='".addslashes(trim(anyToUTF8($r[11])))."', |
||||
|
degree_date='".addslashes(trim(anyToUTF8($r[10])))."', |
||||
|
degree='".addslashes(trim(anyToUTF8($r[12])))."', |
||||
|
qualification_date='".addslashes(trim(anyToUTF8($r[13])))."', |
||||
|
qualification_place='".addslashes(trim(anyToUTF8($r[14])))."'"; |
||||
|
} |
||||
|
|
||||
|
mysqli_query($conn, $q); |
||||
|
} |
||||
|
|
||||
|
fclose($myfile); |
||||
|
|
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-exclamation-triangle font-alert p-4"></i></p> |
||||
|
<p>File importato correttamente!</p> |
||||
|
</div>'; |
||||
|
}else{ |
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-exclamation-triangle font-alert p-4"></i></p> |
||||
|
<p>ATENZIONE: Errore nell\'importazione del file!</p> |
||||
|
</div>'; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
}else{ |
||||
|
?> |
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="row"> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">File *.CSV</span> |
||||
|
<div class="files-list"> |
||||
|
<div class="list"> |
||||
|
<div class="row master"> |
||||
|
<div class="col"> |
||||
|
<input type="file" name="file"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<p>ATTENZIONE: assicurarsi che il file sia del formato corretto.</p> |
||||
|
</div> |
||||
|
<div class="col-12 text-right"> |
||||
|
<button type="submit" name="go" value="1">Importa da file</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
@ -0,0 +1,17 @@ |
|||||
|
|
||||
|
RewriteEngine On |
||||
|
|
||||
|
Options -Multiviews |
||||
|
|
||||
|
Rewritebase /FTP/ |
||||
|
|
||||
|
RewriteCond %{HTTPS} off |
||||
|
RewriteCond %{HTTP:X-Forwarded-Proto} !https |
||||
|
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
||||
|
|
||||
|
|
||||
|
RewriteCond %{REQUEST_FILENAME} !-f |
||||
|
RewriteCond %{REQUEST_FILENAME} !-d |
||||
|
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] |
||||
|
|
||||
|
|
@ -0,0 +1,6 @@ |
|||||
|
max_execution_time = 100 |
||||
|
max_input_time = 100 |
||||
|
max_input_nesting_level = 100 |
||||
|
memory_limit = 128M |
||||
|
upload_max_filesize = 128M |
||||
|
post_max_size = 128M |
@ -0,0 +1,6 @@ |
|||||
|
|
||||
|
<div id="MainContainer" class="col-12 col-md-10 px-0 pr-sm-0 px-md-2 pt-2"> |
||||
|
<?php |
||||
|
@include 'sheets/'.$getQ[1].'/'.$getQ[2].'.php'; |
||||
|
?> |
||||
|
</div> |
@ -0,0 +1,23 @@ |
|||||
|
|
||||
|
<header> |
||||
|
<div class="container main"> |
||||
|
<div class="row"> |
||||
|
<div class="col-2 col-md-4"></div> |
||||
|
<img class="logo" src="<?php echo $BASE_URLs;?>/images/header.png"> |
||||
|
|
||||
|
<div class="middle-right text-white px-5"> |
||||
|
<p class="font-16 font-bold"> |
||||
|
ARCHIVIO FTP |
||||
|
</p> |
||||
|
|
||||
|
<?php |
||||
|
if($_SESSION['ADMAUTH']) { |
||||
|
echo "<p class=\"font-normal\">Benvenuto ".$_SESSION['ADMAUTH']['name']."</p>"; |
||||
|
echo "<a class=\"font-normal text-white font-12\" href=\"".$BASE_URL."/logout\">[Logout]</a>"; |
||||
|
} |
||||
|
?> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</header> |
@ -0,0 +1,95 @@ |
|||||
|
<?php |
||||
|
|
||||
|
session_start(); |
||||
|
|
||||
|
@include '../cgi-bin/conn.conn'; |
||||
|
@include '../cgi-bin/functions.inc'; |
||||
|
@include '../cgi-bin/params.inc'; |
||||
|
|
||||
|
$GLOBALS['getQ'][0]="home"; |
||||
|
$GLOBALS['conn']; |
||||
|
|
||||
|
$conn=@mysqli_connect($DATAhst,$DATAusr,$DATApwd,$DATAdtb);//or die("CONNECTION ERROR"); |
||||
|
@mysqli_set_charset($conn, "utf8"); |
||||
|
|
||||
|
if(@$_GET['q']){ |
||||
|
$GLOBALS['getQ']=explode("/",$_GET['q']); |
||||
|
} |
||||
|
|
||||
|
$BASE_URL = $BASE_URL."/FTP"; |
||||
|
|
||||
|
|
||||
|
if($_POST['usr'] && $_POST['pwd']){ |
||||
|
$q=mysqli_query($conn, "SELECT * FROM users WHERE usr='".$_POST['usr']."' AND pwd='".md5($_POST['pwd'])."'"); |
||||
|
if(mysqli_num_rows($q)){ |
||||
|
$_SESSION['ADMAUTH']=mysqli_fetch_array($q); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if($getQ[0]=="logout"){ |
||||
|
unset($_SESSION['ADMAUTH']); |
||||
|
session_destroy(); |
||||
|
header('Location: '.$BASE_URL); |
||||
|
} |
||||
|
|
||||
|
//$_SESSION['ADMAUTH']=0; |
||||
|
|
||||
|
?> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<!DOCTYPE html> |
||||
|
<html> |
||||
|
<head> |
||||
|
|
||||
|
<title>FTP | Ordine dei Farmacisti della Provincia di Salerno</title> |
||||
|
|
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
||||
|
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'> |
||||
|
|
||||
|
<base href="<?php echo $BASE_URL;?>/"> |
||||
|
|
||||
|
<link href="<?php echo $BASE_URL;?>/../css/styles.css" rel="stylesheet" type="text/css"/> |
||||
|
<link href="<?php echo $BASE_URL;?>/../css/admin.css" rel="stylesheet" type="text/css"/> |
||||
|
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'> |
||||
|
|
||||
|
</head> |
||||
|
<body class="admin"> |
||||
|
|
||||
|
<?php |
||||
|
@include 'header.php'; |
||||
|
?> |
||||
|
<section> |
||||
|
<div id="MainContent" class="container px-2"> |
||||
|
<div class="row"> |
||||
|
<?php |
||||
|
|
||||
|
if($_SESSION['ADMAUTH']) { |
||||
|
@include 'menu.php'; |
||||
|
@include 'content.php'; |
||||
|
} else { |
||||
|
@include 'login.php'; |
||||
|
} |
||||
|
|
||||
|
?> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<script type="text/javascript" src="<?php echo $BASE_URL;?>/../node_modules/jquery/dist/jquery.min.js"></script> |
||||
|
<script type="text/javascript" src="<?php echo $BASE_URL;?>/../node_modules/jquery-colorbox/jquery.colorbox-min.js"></script> |
||||
|
<script type="text/javascript" src="<?php echo $BASE_URL;?>/../node_modules/tinymce/tinymce.min.js"></script> |
||||
|
<script type="text/javascript" src="<?php echo $BASE_URL;?>/../node_modules/jquery.datepicker-plus-css/jquery-datepicker.js"></script> |
||||
|
<script type="text/javascript" src="<?php echo $BASE_URL;?>/../node_modules/jquery-ui-datepicker-with-i18n/ui/i18n/jquery.ui.datepicker-it.js"></script> |
||||
|
|
||||
|
<script type="text/javascript" src="<?php echo $BASE_URL;?>/../js/scripts.js"></script> |
||||
|
<script type="text/javascript" src="<?php echo $BASE_URL;?>/js/scripts.js"></script> |
||||
|
|
||||
|
|
||||
|
</body> |
||||
|
</html> |
||||
|
|
||||
|
|
||||
|
<?php |
||||
|
@mysqli_close($conn); |
||||
|
?> |
@ -0,0 +1,67 @@ |
|||||
|
|
||||
|
$(document).ready( function(){ |
||||
|
|
||||
|
tinymce.init({ |
||||
|
selector: '.mce', |
||||
|
height: 300, |
||||
|
theme: 'modern', |
||||
|
menubar: false, |
||||
|
language: 'it', |
||||
|
forced_root_block : '', |
||||
|
force_br_newlines : true, |
||||
|
relative_urls : false, |
||||
|
remove_script_host : false, |
||||
|
plugins: [ |
||||
|
'advlist autolink lists link paste' |
||||
|
], |
||||
|
toolbar: 'bold italic underline | alignleft aligncenter alignright alignjustify | link bullist numlist| removeformat', |
||||
|
image_advtab: false, |
||||
|
content_css: [ |
||||
|
'//fonts.googleapis.com/css?family=Lato:300,300i,400,400i', |
||||
|
] |
||||
|
}); |
||||
|
|
||||
|
$( ".datepicker" ).datepicker({ |
||||
|
changeMonth: true, |
||||
|
changeYear: true, |
||||
|
dateFormat: 'dd/mm/yy', |
||||
|
yearRange: new Date().getFullYear()-90 + ':' + new Date().getFullYear(), |
||||
|
maxDate: "+1M", |
||||
|
regional:['it'] |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
$('.form-mod').on('submit', function(e){ |
||||
|
e.preventDefault(); |
||||
|
var id = $(this).find('.id').val(); |
||||
|
var path = $(this).data('path') + "/" + id.trim(); |
||||
|
window.location = path; |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
$('.files-list .add-file').on('click', function(e){ |
||||
|
e.preventDefault(); |
||||
|
var master = $(this).siblings('.list').find('.master:first-child').clone(); |
||||
|
$(this).siblings('.list').append($(master)); |
||||
|
|
||||
|
$(master).find('[name="files[]"]').on('change', function(){ |
||||
|
$(master).find('[name="titles[]"]').val($(this).val().split('\\').pop()); |
||||
|
}) |
||||
|
}); |
||||
|
|
||||
|
$('.files-list .row').each( function(index, elem){ |
||||
|
$(elem).find('[name="files[]"]').on('change', function(){ |
||||
|
$(elem).find('[name="titles[]"]').val($(this).val().split('\\').pop()); |
||||
|
}) |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
|
||||
|
$('.emailForm').on('submit', function(event) { |
||||
|
$.colorbox({width:"600px", height:"400px", iframe:true, href:"/ADMIN/sheets/email/cbSend.php?" + $(this).serialize()}); |
||||
|
event.preventDefault(); |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
|
||||
|
}); |
@ -0,0 +1,16 @@ |
|||||
|
|
||||
|
<div class="col-10 col-md-5 my-5 mx-auto"> |
||||
|
<form method="post"> |
||||
|
<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"> |
||||
|
</form> |
||||
|
</div> |
||||
|
|
||||
|
<?php |
||||
|
|
||||
|
//echo md5('OrdFarmSaNews'); |
||||
|
?> |
@ -0,0 +1,57 @@ |
|||||
|
|
||||
|
<?php |
||||
|
|
||||
|
function checkAdminSections($sec) { |
||||
|
|
||||
|
$s = $_SESSION['ADMAUTH']['sections']; |
||||
|
$sa = explode(',',$s); |
||||
|
$return = ''; |
||||
|
|
||||
|
if($s == 'ALL') { |
||||
|
$return = ''; |
||||
|
} else { |
||||
|
if(!in_array($sec,$sa)) { |
||||
|
$return = 'd-none'; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
return $return; |
||||
|
} |
||||
|
?> |
||||
|
|
||||
|
<div id="menuLeft" class="col-12 col-md-2 p-2"> |
||||
|
|
||||
|
<?php |
||||
|
|
||||
|
$s = $_SESSION['ADMAUTH']['sections']; |
||||
|
$sa = explode(',',$s); |
||||
|
$return = ''; |
||||
|
|
||||
|
if($s == 'ALL' || in_array('ftp',$sa) || in_array('ftp-readonly',$sa)) { |
||||
|
|
||||
|
?> |
||||
|
|
||||
|
<div class="dropdown <?= $getQ[1]=="ftp" ? "active":"active" ?> "> |
||||
|
<div class="title">Files</div> |
||||
|
<ul class="items"> |
||||
|
<li><a href="<?= $BASE_URL ?>/sheets/ftp/list">Elenco files </a></li> |
||||
|
<?php |
||||
|
if($s == 'ALL' || in_array('ftp',$sa)) { |
||||
|
?> |
||||
|
<li><a href="<?= $BASE_URL ?>/sheets/ftp/add">Aggiungi file </a></li> |
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
</ul> |
||||
|
</div> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<?php //echo md5('0rdF4rmS4FTP');?>
|
||||
|
|
||||
|
|
@ -0,0 +1,102 @@ |
|||||
|
<?php |
||||
|
$s = $_SESSION['ADMAUTH']['sections']; |
||||
|
$sa = explode(',',$s); |
||||
|
if($s == 'ALL' || in_array('ftp',$sa)) { |
||||
|
?> |
||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Aggiungi file</div> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
|
||||
|
<div class="sheet-box p-4"> |
||||
|
|
||||
|
<?php |
||||
|
if($_POST['go']){ |
||||
|
|
||||
|
if($_FILES['files']){ |
||||
|
$files = reArrayFiles($_FILES['files']); |
||||
|
foreach ($files as $index => $file) { |
||||
|
if(is_uploaded_file($file['tmp_name'])){ |
||||
|
$filename = date("YmdHis")."-".preg_replace('/[^a-zA-Z0-9\-\._]/','_', $file['name']); |
||||
|
$filesize = ($file['size'] < 1000000) ? round($file['size'] / 1000)."k" : round($file['size'] / 1000000)."M"; |
||||
|
$title = $_POST['titles'][$index]; |
||||
|
|
||||
|
move_uploaded_file($file['tmp_name'], "../docs/ftp/$filename"); |
||||
|
$qf=mysqli_query($conn, "INSERT INTO ftp VALUES(null, '$title', '$filename', ".$_POST['municipality'].", NOW(), ".$_POST['year'].",'$filesize')"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-check-circle font-alert p-4"></i></p> |
||||
|
File aggiunto/i correttamente! |
||||
|
</div>'; |
||||
|
|
||||
|
|
||||
|
}else{ |
||||
|
?> |
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="row"> |
||||
|
<div class="col-8"> |
||||
|
<span class="font-12">Carica in</span> |
||||
|
<select name="municipality"> |
||||
|
<option value="">- Seleziona un comune - </option> |
||||
|
|
||||
|
<?php |
||||
|
$q = mysqli_query($conn, "SELECT * FROM comuni ORDER BY comune ASC"); |
||||
|
$cnt=0; |
||||
|
while($r = mysqli_fetch_array($q)){ |
||||
|
echo '<option value="'.$r['id'].'" '.($_POST['municipality'] == $r['id'] ? 'selected' : '').'>'.$r['comune'].'</option>'; |
||||
|
} |
||||
|
?> |
||||
|
</select> |
||||
|
</div> |
||||
|
<div class="col-4"> |
||||
|
<span class="font-12">Anno</span> |
||||
|
<select name="year"> |
||||
|
<option value="">- Seleziona l'anno - </option> |
||||
|
|
||||
|
<?php |
||||
|
for($i = 2020; $i <= date('Y'); $i++){ |
||||
|
echo '<option value="'.$i.'" '.(date('Y') == $i ? 'selected' : '').'>'.$i.'</option>'; |
||||
|
} |
||||
|
?> |
||||
|
</select> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Files</span> |
||||
|
<div class="files-list"> |
||||
|
<div class="list"> |
||||
|
<div class="row master"> |
||||
|
<div class="col-8"> |
||||
|
<input type="text" name="titles[]" placeholder="Nome del file"> |
||||
|
</div> |
||||
|
<div class="col-4"> |
||||
|
<input type="file" name="files[]"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<button class="button button-small add-file"><i class="fa fa-plus"></i> aggiungi riga</button> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
<div class="col-12 text-right"> |
||||
|
<button type="submit" name="go" value="1">Aggiungi file</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
@ -0,0 +1,112 @@ |
|||||
|
<?php |
||||
|
$s = $_SESSION['ADMAUTH']['sections']; |
||||
|
$sa = explode(',',$s); |
||||
|
?> |
||||
|
|
||||
|
<div class="row"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Elenco files</div> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
|
||||
|
<div class="sheet-box p-4"> |
||||
|
<?php |
||||
|
if($_POST['go'] && ($s == 'ALL' || in_array('ftp',$sa))){ |
||||
|
|
||||
|
foreach ($_POST['files'] as $index => $file) { |
||||
|
|
||||
|
$qf=mysqli_query($conn, "SELECT * FROM ftp WHERE id='$file'"); |
||||
|
$rf = mysqli_fetch_array($qf); |
||||
|
|
||||
|
@unlink("../docs/ftp/".$rf['filename']); |
||||
|
mysqli_query($conn, "DELETE FROM ftp WHERE id='$file'"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
echo '<div class="col-10 text-center mx-auto my-5"> |
||||
|
<p><i class="fa fa-check-circle font-alert p-4"></i></p> |
||||
|
File eliminato correttamente! |
||||
|
</div>'; |
||||
|
|
||||
|
} else { |
||||
|
?> |
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="row"> |
||||
|
<div class="col-8"> |
||||
|
<span class="font-12">Visualizza in</span> |
||||
|
<select name="municipality" onChange="this.form.submit()"> |
||||
|
<option value="">- Seleziona un comune - </option> |
||||
|
|
||||
|
<?php |
||||
|
$q = mysqli_query($conn, "SELECT * FROM comuni ORDER BY comune ASC"); |
||||
|
$cnt=0; |
||||
|
while($r = mysqli_fetch_array($q)){ |
||||
|
echo '<option value="'.$r['id'].'" '.($_POST['municipality'] == $r['id'] ? 'selected' : '').'>'.$r['comune'].'</option>'; |
||||
|
} |
||||
|
?> |
||||
|
</select> |
||||
|
</div> |
||||
|
<div class="col-4"> |
||||
|
<span class="font-12">Anno</span> |
||||
|
<select name="year" onChange="this.form.submit()"> |
||||
|
<option value="">- Seleziona l'anno - </option> |
||||
|
|
||||
|
<?php |
||||
|
for($i = 2019; $i <= date('Y'); $i++){ |
||||
|
echo '<option value="'.$i.'" '.($_POST['year'] == $i ? 'selected' : '').'>'.$i.'</option>'; |
||||
|
} |
||||
|
?> |
||||
|
</select> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</form> |
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="col-12 p-0 admin-list"> |
||||
|
|
||||
|
<?php |
||||
|
if($_POST['municipality']){ |
||||
|
|
||||
|
$q = mysqli_query($conn, "SELECT * FROM ftp WHERE municipality='".$_POST['municipality']."' AND year='".$_POST['year']."' ORDER BY date DESC"); |
||||
|
$cnt=0; |
||||
|
while($r = mysqli_fetch_array($q)){ |
||||
|
$cnt++; |
||||
|
$bg = ($cnt%2) ? "bg-light-grey" : "bg-white"; |
||||
|
echo "<div class=\"admin-list-item row no-gutters font-12 $bg\"> |
||||
|
<div class=\"col-4\"><a target=\"_black\" href=\"$BASE_URL/../docs/ftp/".$r['filename']."\">".$r['title']."</a></div> |
||||
|
<div class=\"col-4\"><a target=\"_black\" href=\"$BASE_URL/../docs/ftp/".$r['filename']."\">".substr($r['filename'],15)."</a></div> |
||||
|
<div class=\"col-2\"> ".conv_date($r['date'])."</div>"; |
||||
|
|
||||
|
|
||||
|
if($s == 'ALL' || in_array('ftp',$sa)) { |
||||
|
|
||||
|
echo "<div class=\"col-1 text-right\"> ".$r['size']."</div> |
||||
|
<div class=\"col-1 text-right\"> |
||||
|
<input type=\"checkbox\" name=\"files[]\" id=\"".$r['id']."\" value=\"".$r['id']."\"><label for=\"".$r['id']."\"><i class=\"fa fa-trash\"></i></label> |
||||
|
</div>"; |
||||
|
} else { |
||||
|
echo "<div class=\"col-2 text-right\"> ".$r['size']."</div>"; |
||||
|
} |
||||
|
echo "</div>"; |
||||
|
} |
||||
|
} |
||||
|
?> |
||||
|
</div> |
||||
|
<?php |
||||
|
if($s == 'ALL' || in_array('ftp',$sa)) { |
||||
|
?> |
||||
|
<div class="col-12 text-right"> |
||||
|
<button type="submit" name="go" value="1">Elimina file/s</button> |
||||
|
</div> |
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
</form> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
@ -0,0 +1,129 @@ |
|||||
|
<?php |
||||
|
$DATAhst="62.149.150.48"; |
||||
|
$DATAusr="Sql90805"; |
||||
|
$DATApwd="601ea4bd"; |
||||
|
$DATAdtb="Sql90805_1"; |
||||
|
|
||||
|
$conn=mysqli_connect($DATAhst,$DATAusr,$DATApwd,$DATAdtb); |
||||
|
|
||||
|
$q = mysqli_query($conn, "SELECT * FROM inserzioni"); |
||||
|
|
||||
|
$query=''; |
||||
|
$cnt=1281; |
||||
|
|
||||
|
while($r=mysqli_fetch_array($q)){ |
||||
|
|
||||
|
if($r[9]!="") { |
||||
|
$NEW = 'files/advertisement/'; |
||||
|
$DIR = "../../OLD/docs/inserzioni"; |
||||
|
|
||||
|
|
||||
|
$filePath = $DIR.'/'.$r[9]; |
||||
|
$filePathInfo = pathinfo($filePath); |
||||
|
|
||||
|
if(file_exists($filePath)){ |
||||
|
|
||||
|
$filename = preg_replace('/[^a-zA-Z0-9\-\._]/','', $filePathInfo['basename']); |
||||
|
$filesize = (filesize($filePath) < 1000000) ? round(filesize($filePath) / 1000)."k" : round(filesize($filePath) / 1000000)."M"; |
||||
|
$title = $filename; |
||||
|
$path = '../../docs/'.$NEW; |
||||
|
$dbPath = '/docs/'.$NEW; |
||||
|
|
||||
|
copy($filePath, "$path/$filename"); |
||||
|
|
||||
|
$query.="INSERT INTO files VALUES(null, '$title', '$filename', '".$dbPath."', '".date("Y-m-d", filemtime($filePath))."', '$filesize');\n"; |
||||
|
|
||||
|
$r[9] = $cnt; |
||||
|
$cnt++; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
$query.="INSERT INTO advertisement VALUES(". |
||||
|
"'".$r[0]."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[1]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[2]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[3]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[4]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[5]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[6]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[7]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[8]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[9]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[10]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[11]))."' ". |
||||
|
");\n"; |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
echo $query; |
||||
|
//mysql_query($query); |
||||
|
|
||||
|
mysqli_close($conn); |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/* |
||||
|
|
||||
|
@include 'new/cgi-bin/conn.conn'; |
||||
|
$conn = mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db("Sql90805_1"); |
||||
|
|
||||
|
$op=fopen("alboNew.csv","r"); |
||||
|
|
||||
|
while($res=fgets($op)){ |
||||
|
|
||||
|
$scom=explode("%",$res); |
||||
|
|
||||
|
$q=mysql_query("UPDATE albo SET |
||||
|
email='".$scom[13]."', |
||||
|
cognome='".$scom[2]."', |
||||
|
nome='".$scom[3]."', |
||||
|
data_iscr='".$scom[1]."', |
||||
|
indirizzo='".$scom[4]."', |
||||
|
cap='".$scom[5]."', |
||||
|
citta='".$scom[6]."', |
||||
|
provincia='".$scom[7]."', |
||||
|
laurea_a='".$scom[9]."', |
||||
|
laurea_il='".$scom[8]."', |
||||
|
laurea_in='".$scom[10]."', |
||||
|
abilitazione_nel='".$scom[11]."', |
||||
|
abilitazione_a='".$scom[12]."' |
||||
|
WHERE iscrizione='".$scom[0]."'"); |
||||
|
|
||||
|
|
||||
|
if($q){ |
||||
|
echo "ok <br>"; |
||||
|
}else{ |
||||
|
echo "ERRORE <br>"; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
fclose($op);*/ |
||||
|
?> |
@ -0,0 +1,110 @@ |
|||||
|
<?php |
||||
|
$DATAhst="62.149.150.48"; |
||||
|
$DATAusr="Sql90805"; |
||||
|
$DATApwd="601ea4bd"; |
||||
|
$DATAdtb="Sql90805_1"; |
||||
|
|
||||
|
$conn=mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db($DATAdtb); |
||||
|
|
||||
|
$q = mysql_query("SELECT * FROM albo"); |
||||
|
|
||||
|
$query=''; |
||||
|
|
||||
|
while($r=mysql_fetch_array($q)){ |
||||
|
|
||||
|
$query.="INSERT INTO board VALUES(". |
||||
|
"'".addslashes($r[0])."', ". |
||||
|
"'".addslashes($r[1])."', ". |
||||
|
"'".md5($r[2])."', ". |
||||
|
"'".addslashes($r[3])."', ". |
||||
|
"'".addslashes($r[4])."', ". |
||||
|
"'".addslashes($r[5])."', ". |
||||
|
"'".addslashes($r[6])."', ". |
||||
|
"'".addslashes($r[7])."', ". |
||||
|
"'".addslashes($r[8])."', ". |
||||
|
"'".addslashes($r[9])."', ". |
||||
|
"'".addslashes($r[10])."', ". |
||||
|
"'".addslashes($r[11])."', ". |
||||
|
"'".addslashes($r[12])."', ". |
||||
|
"'".addslashes($r[13])."', ". |
||||
|
"'".addslashes($r[14])."', ". |
||||
|
"'".addslashes($r[15])."', ". |
||||
|
"'".addslashes($r[16])."', ". |
||||
|
"'".addslashes($r[17])."', ". |
||||
|
"'".addslashes($r[18])."', ". |
||||
|
"'".addslashes($r[19])."', ". |
||||
|
"0,0 );\n"; |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
$conn2 = mysql_connect($DATAhst,$DATAusr,$DATApwd,"Sql90805_5"); |
||||
|
echo $query; |
||||
|
mysql_query($query); |
||||
|
|
||||
|
mysql_close($conn); |
||||
|
mysql_close($conn2); |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/* |
||||
|
|
||||
|
@include 'new/cgi-bin/conn.conn'; |
||||
|
$conn = mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db("Sql90805_1"); |
||||
|
|
||||
|
$op=fopen("alboNew.csv","r"); |
||||
|
|
||||
|
while($res=fgets($op)){ |
||||
|
|
||||
|
$scom=explode("%",$res); |
||||
|
|
||||
|
$q=mysql_query("UPDATE albo SET |
||||
|
email='".$scom[13]."', |
||||
|
cognome='".$scom[2]."', |
||||
|
nome='".$scom[3]."', |
||||
|
data_iscr='".$scom[1]."', |
||||
|
indirizzo='".$scom[4]."', |
||||
|
cap='".$scom[5]."', |
||||
|
citta='".$scom[6]."', |
||||
|
provincia='".$scom[7]."', |
||||
|
laurea_a='".$scom[9]."', |
||||
|
laurea_il='".$scom[8]."', |
||||
|
laurea_in='".$scom[10]."', |
||||
|
abilitazione_nel='".$scom[11]."', |
||||
|
abilitazione_a='".$scom[12]."' |
||||
|
WHERE iscrizione='".$scom[0]."'"); |
||||
|
|
||||
|
|
||||
|
if($q){ |
||||
|
echo "ok <br>"; |
||||
|
}else{ |
||||
|
echo "ERRORE <br>"; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
fclose($op);*/ |
||||
|
?> |
@ -0,0 +1,40 @@ |
|||||
|
<?php |
||||
|
$DATAhst="62.149.150.48"; |
||||
|
$DATAusr="Sql90805"; |
||||
|
$DATApwd="601ea4bd"; |
||||
|
$DATAdtb="Sql90805_5"; |
||||
|
|
||||
|
$conn=mysqli_connect($DATAhst,$DATAusr,$DATApwd,$DATAdtb); |
||||
|
|
||||
|
$NEW = 'variazioni/farmacie'; |
||||
|
$DIR = "../../OLD/docs/variazioni/farmacie"; |
||||
|
|
||||
|
$d=dir($DIR); |
||||
|
while($r=$d->read()){ |
||||
|
|
||||
|
if(substr($r,0,1)!='.'){ |
||||
|
|
||||
|
$filePath = $DIR.'/'.$r; |
||||
|
$filePathInfo = pathinfo($filePath); |
||||
|
|
||||
|
if(file_exists($filePath)){ |
||||
|
|
||||
|
$filename = preg_replace('/[^a-zA-Z0-9\-\._]/','', $filePathInfo['basename']); |
||||
|
$filesize = (filesize($filePath) < 1000000) ? round(filesize($filePath) / 1000)."k" : round(filesize($filePath) / 1000000)."M"; |
||||
|
$title = $filename; |
||||
|
$path = '../../docs/'.$NEW; |
||||
|
$dbPath = '/docs/'.$NEW; |
||||
|
|
||||
|
copy($filePath, "$path/$filename"); |
||||
|
|
||||
|
$query.="INSERT INTO files VALUES(null, '$title', '$filename', '".$dbPath."', '".date("Y-m-d", filemtime($filePath))."', '$filesize');\n"; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
echo $query; |
||||
|
//mysql_query($query); |
||||
|
|
||||
|
mysqli_close($conn); |
@ -0,0 +1,52 @@ |
|||||
|
<?php |
||||
|
$DATAhst="62.149.150.48"; |
||||
|
$DATAusr="Sql90805"; |
||||
|
$DATApwd="601ea4bd"; |
||||
|
$DATAdtb="Sql90805_5"; |
||||
|
|
||||
|
$conn=mysqli_connect($DATAhst,$DATAusr,$DATApwd,$DATAdtb); |
||||
|
|
||||
|
$NEW = 'variazioni-albo'; |
||||
|
$DIR = "../../OLD/docs/variazioni/albo"; |
||||
|
|
||||
|
$d=dir($DIR); |
||||
|
while($r=$d->read()){ |
||||
|
|
||||
|
if(substr($r,0,1)!='.'){ |
||||
|
|
||||
|
//@mkdir('../..//docs/'.$NEW.'/'.$r); |
||||
|
|
||||
|
$df=dir($DIR."/".$r); |
||||
|
|
||||
|
while($rf=$df->read()){ |
||||
|
if(substr($rf,0,1)!='.'){ |
||||
|
|
||||
|
$filePath = $DIR."/".$r."/".$rf; |
||||
|
$filePathInfo = pathinfo($filePath); |
||||
|
|
||||
|
|
||||
|
if(file_exists($filePath)){ |
||||
|
|
||||
|
$filename = preg_replace('/[^a-zA-Z0-9\-\._]/','', $filePathInfo['basename']); |
||||
|
$filesize = (filesize($filePath) < 1000000) ? round(filesize($filePath) / 1000)."k" : round(filesize($filePath) / 1000000)."M"; |
||||
|
$title = $filename; |
||||
|
$path = '../../docs/'.$NEW; |
||||
|
$dbPath = '/docs/'.$NEW; |
||||
|
|
||||
|
copy($filePath, "$path/$filename"); |
||||
|
|
||||
|
$query.="INSERT INTO files VALUES(null, '$title', '$filename', '".$dbPath."', '".substr($rf,0,10)."', '$filesize');\n"; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
echo $query; |
||||
|
//mysql_query($query); |
||||
|
|
||||
|
mysqli_close($conn); |
@ -0,0 +1,76 @@ |
|||||
|
<?php |
||||
|
$DATAhst="62.149.150.48"; |
||||
|
$DATAusr="Sql90805"; |
||||
|
$DATApwd="601ea4bd"; |
||||
|
$DATAdtb="Sql90805_5"; |
||||
|
|
||||
|
$conn=mysqli_connect($DATAhst,$DATAusr,$DATApwd,$DATAdtb); |
||||
|
|
||||
|
$NEW = 'ricette-e-timbri'; |
||||
|
$DIR = "../../OLD/docs/ricette_timbri"; |
||||
|
|
||||
|
$month = array(); |
||||
|
$month["Gennaio"]="01"; |
||||
|
$month["Febbraio"]="02"; |
||||
|
$month["Marzo"]="03"; |
||||
|
$month["Aprile"]="04"; |
||||
|
$month["Maggio"]="05"; |
||||
|
$month["Giugno"]="06"; |
||||
|
$month["Luglio"]="07"; |
||||
|
$month["Agosto"]="08"; |
||||
|
$month["Settembre"]="09"; |
||||
|
$month["Ottobre"]="10"; |
||||
|
$month["Novembre"]="11"; |
||||
|
$month["Dicembre"]="12"; |
||||
|
|
||||
|
$d=dir($DIR); |
||||
|
while($r=$d->read()){ |
||||
|
|
||||
|
if(substr($r,0,1)!='.'){ |
||||
|
|
||||
|
$dy=dir($DIR."/".$r); |
||||
|
while($ry=$dy->read()){ |
||||
|
if(substr($ry,0,1)!='.'){ |
||||
|
|
||||
|
$fileDate = $r."-".$month[$ry]."-01"; |
||||
|
|
||||
|
$df=dir($DIR."/".$r."/".$ry); |
||||
|
while($rf=$df->read()){ |
||||
|
if(substr($rf,0,1)!='.'){ |
||||
|
|
||||
|
if(intval($r) > 2008){ |
||||
|
$fileDate = substr($rf,0,4)."-".substr($rf,4,2)."-".substr($rf,6,2); |
||||
|
} |
||||
|
|
||||
|
$filePath = $DIR."/".$r."/".$ry."/".$rf; |
||||
|
$filePathInfo = pathinfo($filePath); |
||||
|
|
||||
|
//echo $fileDate."------".$filePath."<br>"; |
||||
|
|
||||
|
if(file_exists($filePath)){ |
||||
|
|
||||
|
$filename = preg_replace('/[^a-zA-Z0-9\-\._]/','', $filePathInfo['basename']); |
||||
|
$filesize = (filesize($filePath) < 1000000) ? round(filesize($filePath) / 1000)."k" : round(filesize($filePath) / 1000000)."M"; |
||||
|
$title = $filename; |
||||
|
$path = '../../docs/'.$NEW; |
||||
|
$dbPath = '/docs/'.$NEW; |
||||
|
|
||||
|
copy($filePath, "$path/$filename"); |
||||
|
|
||||
|
$query.="INSERT INTO files VALUES(null, '$title', '$filename', '".$dbPath."', '".date("Y-m-d", filemtime($filePath))."', '$filesize');\n"; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
echo $query; |
||||
|
//mysql_query($query); |
||||
|
|
||||
|
mysqli_close($conn); |
@ -0,0 +1,121 @@ |
|||||
|
<?php |
||||
|
$DATAhst="62.149.150.48"; |
||||
|
$DATAusr="Sql90805"; |
||||
|
$DATApwd="601ea4bd"; |
||||
|
$DATAdtb="Sql90805_1"; |
||||
|
|
||||
|
$conn=mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db($DATAdtb); |
||||
|
|
||||
|
$q = mysql_query("SELECT * FROM news"); |
||||
|
|
||||
|
$query=''; |
||||
|
$cnt=1; |
||||
|
|
||||
|
while($r=mysql_fetch_array($q)){ |
||||
|
|
||||
|
$append = array(); |
||||
|
$dl = strpos($r[3], 'download.php?file='); |
||||
|
|
||||
|
if($dl>0){ |
||||
|
$offset = strpos($r[3], '"', $dl); |
||||
|
//echo $dl." - ".$offset." - ".str_replace('download.php?file=','',substr($r[3], $dl, $offset-$dl))."<br>\n"; |
||||
|
$filePath = str_replace("//","/", "../../docs/".str_replace('download.php?file=','',substr($r[3], $dl, $offset-$dl))); |
||||
|
$filePathInfo = pathinfo($filePath); |
||||
|
|
||||
|
if(file_exists($filePath)){ |
||||
|
//print_r($filePathInfo); |
||||
|
|
||||
|
//echo filesize($filePath)."\n<br>"; |
||||
|
$filename = $cnt.'_'.preg_replace('/[^a-zA-Z0-9\-\._]/','', $filePathInfo['basename']); |
||||
|
$filesize = (filesize($filePath) < 1000000) ? round(filesize($filePath) / 1000)."k" : round(filesize($filePath) / 1000000)."M"; |
||||
|
$title = "Scarica la relativa circolare"; |
||||
|
$path = '../../docs/files/news'; |
||||
|
|
||||
|
copy($filePath, "$path/$filename"); |
||||
|
|
||||
|
$query.="INSERT INTO files VALUES($cnt, '$title', '$filename', '".$path."', '".$r[1]."', '$filesize');\n"; |
||||
|
$append[$index] = $cnt; |
||||
|
$cnt++; |
||||
|
} |
||||
|
|
||||
|
$r[3]=substr($r[3],0,strpos($r[3],'<hr size="1">')); |
||||
|
} |
||||
|
|
||||
|
$query.="INSERT INTO news VALUES(". |
||||
|
"'".$r[0]."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[2]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[3]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[1]))."', ". |
||||
|
"'".implode(',',$append)."' ". |
||||
|
");\n"; |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
echo $query; |
||||
|
//mysql_query($query); |
||||
|
|
||||
|
mysql_close($conn); |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/* |
||||
|
|
||||
|
@include 'new/cgi-bin/conn.conn'; |
||||
|
$conn = mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db("Sql90805_1"); |
||||
|
|
||||
|
$op=fopen("alboNew.csv","r"); |
||||
|
|
||||
|
while($res=fgets($op)){ |
||||
|
|
||||
|
$scom=explode("%",$res); |
||||
|
|
||||
|
$q=mysql_query("UPDATE albo SET |
||||
|
email='".$scom[13]."', |
||||
|
cognome='".$scom[2]."', |
||||
|
nome='".$scom[3]."', |
||||
|
data_iscr='".$scom[1]."', |
||||
|
indirizzo='".$scom[4]."', |
||||
|
cap='".$scom[5]."', |
||||
|
citta='".$scom[6]."', |
||||
|
provincia='".$scom[7]."', |
||||
|
laurea_a='".$scom[9]."', |
||||
|
laurea_il='".$scom[8]."', |
||||
|
laurea_in='".$scom[10]."', |
||||
|
abilitazione_nel='".$scom[11]."', |
||||
|
abilitazione_a='".$scom[12]."' |
||||
|
WHERE iscrizione='".$scom[0]."'"); |
||||
|
|
||||
|
|
||||
|
if($q){ |
||||
|
echo "ok <br>"; |
||||
|
}else{ |
||||
|
echo "ERRORE <br>"; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
fclose($op);*/ |
||||
|
?> |
@ -0,0 +1,97 @@ |
|||||
|
<?php |
||||
|
$DATAhst="62.149.150.48"; |
||||
|
$DATAusr="Sql90805"; |
||||
|
$DATApwd="601ea4bd"; |
||||
|
$DATAdtb="Sql90805_1"; |
||||
|
|
||||
|
$conn=mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db($DATAdtb); |
||||
|
|
||||
|
$q = mysql_query("SELECT * FROM parafarmacie"); |
||||
|
|
||||
|
$query=''; |
||||
|
|
||||
|
while($r=mysql_fetch_array($q)){ |
||||
|
|
||||
|
$query.="INSERT INTO parapharmacy VALUES(". |
||||
|
"'".addslashes($r[8])."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[1]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[0]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[2]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[3]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[4]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[5]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[6]))."' ". |
||||
|
");\n"; |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
$conn2 = mysql_connect($DATAhst,$DATAusr,$DATApwd,"Sql90805_5"); |
||||
|
echo $query; |
||||
|
mysql_query($query); |
||||
|
|
||||
|
mysql_close($conn); |
||||
|
mysql_close($conn2); |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/* |
||||
|
|
||||
|
@include 'new/cgi-bin/conn.conn'; |
||||
|
$conn = mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db("Sql90805_1"); |
||||
|
|
||||
|
$op=fopen("alboNew.csv","r"); |
||||
|
|
||||
|
while($res=fgets($op)){ |
||||
|
|
||||
|
$scom=explode("%",$res); |
||||
|
|
||||
|
$q=mysql_query("UPDATE albo SET |
||||
|
email='".$scom[13]."', |
||||
|
cognome='".$scom[2]."', |
||||
|
nome='".$scom[3]."', |
||||
|
data_iscr='".$scom[1]."', |
||||
|
indirizzo='".$scom[4]."', |
||||
|
cap='".$scom[5]."', |
||||
|
citta='".$scom[6]."', |
||||
|
provincia='".$scom[7]."', |
||||
|
laurea_a='".$scom[9]."', |
||||
|
laurea_il='".$scom[8]."', |
||||
|
laurea_in='".$scom[10]."', |
||||
|
abilitazione_nel='".$scom[11]."', |
||||
|
abilitazione_a='".$scom[12]."' |
||||
|
WHERE iscrizione='".$scom[0]."'"); |
||||
|
|
||||
|
|
||||
|
if($q){ |
||||
|
echo "ok <br>"; |
||||
|
}else{ |
||||
|
echo "ERRORE <br>"; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
fclose($op);*/ |
||||
|
?> |
@ -0,0 +1,99 @@ |
|||||
|
<?php |
||||
|
$DATAhst="62.149.150.48"; |
||||
|
$DATAusr="Sql90805"; |
||||
|
$DATApwd="601ea4bd"; |
||||
|
$DATAdtb="Sql90805_1"; |
||||
|
|
||||
|
$conn=mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db($DATAdtb); |
||||
|
|
||||
|
$q = mysql_query("SELECT * FROM farmacie"); |
||||
|
|
||||
|
$query=''; |
||||
|
|
||||
|
while($r=mysql_fetch_array($q)){ |
||||
|
|
||||
|
$query.="INSERT INTO pharmacy VALUES(". |
||||
|
"'".addslashes($r[7])."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[1]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[0]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[2]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[3]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[4]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[5]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[6]))."', ". |
||||
|
"'".addslashes(str_replace(''','\'',$r[8]))."' ". |
||||
|
");\n"; |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
$conn2 = mysql_connect($DATAhst,$DATAusr,$DATApwd,"Sql90805_5"); |
||||
|
echo $query; |
||||
|
mysql_query($query); |
||||
|
|
||||
|
mysql_close($conn); |
||||
|
mysql_close($conn2); |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/* |
||||
|
|
||||
|
@include 'new/cgi-bin/conn.conn'; |
||||
|
$conn = mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db("Sql90805_1"); |
||||
|
|
||||
|
$op=fopen("alboNew.csv","r"); |
||||
|
|
||||
|
while($res=fgets($op)){ |
||||
|
|
||||
|
$scom=explode("%",$res); |
||||
|
|
||||
|
$q=mysql_query("UPDATE albo SET |
||||
|
email='".$scom[13]."', |
||||
|
cognome='".$scom[2]."', |
||||
|
nome='".$scom[3]."', |
||||
|
data_iscr='".$scom[1]."', |
||||
|
indirizzo='".$scom[4]."', |
||||
|
cap='".$scom[5]."', |
||||
|
citta='".$scom[6]."', |
||||
|
provincia='".$scom[7]."', |
||||
|
laurea_a='".$scom[9]."', |
||||
|
laurea_il='".$scom[8]."', |
||||
|
laurea_in='".$scom[10]."', |
||||
|
abilitazione_nel='".$scom[11]."', |
||||
|
abilitazione_a='".$scom[12]."' |
||||
|
WHERE iscrizione='".$scom[0]."'"); |
||||
|
|
||||
|
|
||||
|
if($q){ |
||||
|
echo "ok <br>"; |
||||
|
}else{ |
||||
|
echo "ERRORE <br>"; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
fclose($op);*/ |
||||
|
?> |
Can't render this file because it has a wrong number of fields in line 7.
|
Can't render this file because it has a wrong number of fields in line 2.
|
@ -0,0 +1,157 @@ |
|||||
|
|
||||
|
<?php |
||||
|
|
||||
|
|
||||
|
@include 'new/cgi-bin/conn.conn'; |
||||
|
$conn = mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db("Sql90805_5"); |
||||
|
|
||||
|
$op=fopen("ALBO-15-07-2009.csv","r"); |
||||
|
|
||||
|
while($res=fgets($op)){ |
||||
|
|
||||
|
$scom=explode("%",$res); |
||||
|
|
||||
|
$qval=mysql_query("SELECT * FROM albo WHERE iscrizione='".$scom[0]."'"); |
||||
|
|
||||
|
$res=mysql_fetch_array($qval); |
||||
|
|
||||
|
// 0 N_Albo |
||||
|
// 1 Data_Iscrizione |
||||
|
// 2 COGNOME |
||||
|
// 3 NOME |
||||
|
// 4 INDIRIZZO |
||||
|
// 5 CAP |
||||
|
// 6 LOCALITA |
||||
|
// 7 PROVINCIA |
||||
|
// 8 DATA DI NASCITA |
||||
|
// 9 LOCALITÀ DI NASCITA |
||||
|
// 10 PROVINCIA DI NASCITA |
||||
|
// 11 DATA DI LAUREA |
||||
|
// 12 LOCALITÀ DI LAUREA |
||||
|
// 13 LAUREA |
||||
|
// 14 DATA DI ABILITAZIONE |
||||
|
// 15 ABILITAZIONE |
||||
|
// 16 E-MAIL |
||||
|
|
||||
|
//iscrizione usr pwd email cognome nome data_iscr indirizzo cap citta provincia laurea_a laurea_il laurea_in abilitazione_nel abilitazione_a abilitato |
||||
|
|
||||
|
$iscrizione=$scom[0]; |
||||
|
$usr=$res['usr']; |
||||
|
$pwd=$res['pwd']; |
||||
|
$email=$scom[16]; |
||||
|
$cognome=$scom[2]; |
||||
|
$nome=$scom[3]; |
||||
|
$data_nascita=$scom[8]; |
||||
|
$luogo_nascita=$scom[9]; |
||||
|
$data_iscr=$scom[1]; |
||||
|
$indirizzo=$scom[4]; |
||||
|
$cap=$scom[5]; |
||||
|
$citta=$scom[6]; |
||||
|
$provincia=$scom[7]; |
||||
|
$laurea_a=$scom[12]; |
||||
|
$laurea_il=$scom[11]; |
||||
|
$laurea_in=$scom[13]; |
||||
|
$abilitazione_nel=$scom[14]; |
||||
|
$abilitazione_a=$scom[15]; |
||||
|
$abilitato=$res['abilitato']; |
||||
|
|
||||
|
$query="INSERT INTO albotmp VALUES(". |
||||
|
"'$iscrizione', ". |
||||
|
"'$usr', ". |
||||
|
"'$pwd', ". |
||||
|
"'$email', ". |
||||
|
"'$cognome', ". |
||||
|
"'$nome', ". |
||||
|
"'$data_nascita', ". |
||||
|
"'$luogo_nascita', ". |
||||
|
"'$data_iscr', ". |
||||
|
"'$indirizzo', ". |
||||
|
"'$cap', ". |
||||
|
"'$citta', ". |
||||
|
"'$provincia', ". |
||||
|
"'$laurea_a', ". |
||||
|
"'$laurea_il', ". |
||||
|
"'$laurea_in', ". |
||||
|
"'$abilitazione_nel', ". |
||||
|
"'$abilitazione_a', ". |
||||
|
"'$abilitato' )"; |
||||
|
|
||||
|
$q=mysql_query($query); |
||||
|
|
||||
|
if($q){ |
||||
|
echo "ok <br>"; |
||||
|
}else{ |
||||
|
echo "ERRORE <br>"; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
fclose($op); |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/* |
||||
|
|
||||
|
@include 'new/cgi-bin/conn.conn'; |
||||
|
$conn = mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db("Sql90805_1"); |
||||
|
|
||||
|
$op=fopen("alboNew.csv","r"); |
||||
|
|
||||
|
while($res=fgets($op)){ |
||||
|
|
||||
|
$scom=explode("%",$res); |
||||
|
|
||||
|
$q=mysql_query("UPDATE albo SET |
||||
|
email='".$scom[13]."', |
||||
|
cognome='".$scom[2]."', |
||||
|
nome='".$scom[3]."', |
||||
|
data_iscr='".$scom[1]."', |
||||
|
indirizzo='".$scom[4]."', |
||||
|
cap='".$scom[5]."', |
||||
|
citta='".$scom[6]."', |
||||
|
provincia='".$scom[7]."', |
||||
|
laurea_a='".$scom[9]."', |
||||
|
laurea_il='".$scom[8]."', |
||||
|
laurea_in='".$scom[10]."', |
||||
|
abilitazione_nel='".$scom[11]."', |
||||
|
abilitazione_a='".$scom[12]."' |
||||
|
WHERE iscrizione='".$scom[0]."'"); |
||||
|
|
||||
|
|
||||
|
if($q){ |
||||
|
echo "ok <br>"; |
||||
|
}else{ |
||||
|
echo "ERRORE <br>"; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
fclose($op);*/ |
||||
|
?> |
@ -0,0 +1,100 @@ |
|||||
|
|
||||
|
<?php |
||||
|
|
||||
|
|
||||
|
@include 'new/cgi-bin/conn.conn'; |
||||
|
$conn = mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db("Sql90805_5"); |
||||
|
$count=0; |
||||
|
|
||||
|
$qval=mysql_query("SELECT * FROM albo WHERE iscrizione<2829"); |
||||
|
while($res=mysql_fetch_array($qval)){ |
||||
|
$data1=explode("/",$res['data_nascita']); |
||||
|
$data2=explode("/",$res['data_iscr']); |
||||
|
$data3=explode("/",$res['laurea_il']); |
||||
|
|
||||
|
$query="UPDATE albo SET ". |
||||
|
"data_nascita='".$data1[1]."/".$data1[0]."/".$data1[2]."', ". |
||||
|
"data_iscr='".$data2[1]."/".$data2[0]."/".$data2[2]."', ". |
||||
|
"laurea_il='".$data3[1]."/".$data3[0]."/".$data3[2]."' ". |
||||
|
"WHERE iscrizione='".$res['iscrizione']."'"; |
||||
|
|
||||
|
$count++; |
||||
|
// echo $query."<br>"; |
||||
|
$q=mysql_query($query); |
||||
|
|
||||
|
if($q){ |
||||
|
echo "ok <br>"; |
||||
|
}else{ |
||||
|
echo "ERRORE <br>"; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
echo $count; |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/* |
||||
|
|
||||
|
@include 'new/cgi-bin/conn.conn'; |
||||
|
$conn = mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db("Sql90805_1"); |
||||
|
|
||||
|
$op=fopen("alboNew.csv","r"); |
||||
|
|
||||
|
while($res=fgets($op)){ |
||||
|
|
||||
|
$scom=explode("%",$res); |
||||
|
|
||||
|
$q=mysql_query("UPDATE albo SET |
||||
|
email='".$scom[13]."', |
||||
|
cognome='".$scom[2]."', |
||||
|
nome='".$scom[3]."', |
||||
|
data_iscr='".$scom[1]."', |
||||
|
indirizzo='".$scom[4]."', |
||||
|
cap='".$scom[5]."', |
||||
|
citta='".$scom[6]."', |
||||
|
provincia='".$scom[7]."', |
||||
|
laurea_a='".$scom[9]."', |
||||
|
laurea_il='".$scom[8]."', |
||||
|
laurea_in='".$scom[10]."', |
||||
|
abilitazione_nel='".$scom[11]."', |
||||
|
abilitazione_a='".$scom[12]."' |
||||
|
WHERE iscrizione='".$scom[0]."'"); |
||||
|
|
||||
|
|
||||
|
if($q){ |
||||
|
echo "ok <br>"; |
||||
|
}else{ |
||||
|
echo "ERRORE <br>"; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
fclose($op);*/ |
||||
|
?> |
@ -0,0 +1,106 @@ |
|||||
|
|
||||
|
<?php |
||||
|
|
||||
|
|
||||
|
@include 'new/cgi-bin/conn.conn'; |
||||
|
$conn = mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db("Sql90805_5"); |
||||
|
|
||||
|
$op=fopen("farmacie.csv","r"); |
||||
|
|
||||
|
while($res=fgets($op)){ |
||||
|
|
||||
|
$scom=explode("%",$res); |
||||
|
|
||||
|
|
||||
|
$query="INSERT INTO farmacieNew VALUES(". |
||||
|
"'$scom[3]', ". |
||||
|
"'$scom[0]', ". |
||||
|
"'$scom[1]', ". |
||||
|
"'$scom[5]', ". |
||||
|
"'', ". |
||||
|
"'$scom[6]', ". |
||||
|
"'$scom[7]', ". |
||||
|
"'', ". |
||||
|
"'".trim($scom[8])."')"; |
||||
|
|
||||
|
echo $query."<br>"; |
||||
|
|
||||
|
$q=mysql_query($query); |
||||
|
|
||||
|
if($q){ |
||||
|
echo "ok <br>"; |
||||
|
}else{ |
||||
|
echo "ERRORE <br>"; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
fclose($op); |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/* |
||||
|
|
||||
|
@include 'new/cgi-bin/conn.conn'; |
||||
|
$conn = mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db("Sql90805_1"); |
||||
|
|
||||
|
$op=fopen("alboNew.csv","r"); |
||||
|
|
||||
|
while($res=fgets($op)){ |
||||
|
|
||||
|
$scom=explode("%",$res); |
||||
|
|
||||
|
$q=mysql_query("UPDATE albo SET |
||||
|
email='".$scom[13]."', |
||||
|
cognome='".$scom[2]."', |
||||
|
nome='".$scom[3]."', |
||||
|
data_iscr='".$scom[1]."', |
||||
|
indirizzo='".$scom[4]."', |
||||
|
cap='".$scom[5]."', |
||||
|
citta='".$scom[6]."', |
||||
|
provincia='".$scom[7]."', |
||||
|
laurea_a='".$scom[9]."', |
||||
|
laurea_il='".$scom[8]."', |
||||
|
laurea_in='".$scom[10]."', |
||||
|
abilitazione_nel='".$scom[11]."', |
||||
|
abilitazione_a='".$scom[12]."' |
||||
|
WHERE iscrizione='".$scom[0]."'"); |
||||
|
|
||||
|
|
||||
|
if($q){ |
||||
|
echo "ok <br>"; |
||||
|
}else{ |
||||
|
echo "ERRORE <br>"; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
fclose($op);*/ |
||||
|
?> |
@ -0,0 +1,105 @@ |
|||||
|
|
||||
|
<?php |
||||
|
|
||||
|
|
||||
|
@include '../cgi-bin/conn.conn'; |
||||
|
$conn = mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db("Sql90805_1"); |
||||
|
|
||||
|
$op=fopen("PARAFARMACIE.csv","r"); |
||||
|
|
||||
|
while($res=fgets($op)){ |
||||
|
|
||||
|
$scom=explode("%",$res); |
||||
|
|
||||
|
|
||||
|
$query="INSERT INTO parafarmacie VALUES(". |
||||
|
"'$scom[3]', ". |
||||
|
"'$scom[0]', ". |
||||
|
"'$scom[1]', ". |
||||
|
"'$scom[5]', ". |
||||
|
"'', ". |
||||
|
"'', ". |
||||
|
"'$scom[6]', ". |
||||
|
"'','')"; |
||||
|
|
||||
|
echo $query."<br>"; |
||||
|
|
||||
|
$q=mysql_query($query); |
||||
|
|
||||
|
if($q){ |
||||
|
echo "ok <br>"; |
||||
|
}else{ |
||||
|
echo "ERRORE <br>"; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
fclose($op); |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/* |
||||
|
|
||||
|
@include 'new/cgi-bin/conn.conn'; |
||||
|
$conn = mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db("Sql90805_1"); |
||||
|
|
||||
|
$op=fopen("alboNew.csv","r"); |
||||
|
|
||||
|
while($res=fgets($op)){ |
||||
|
|
||||
|
$scom=explode("%",$res); |
||||
|
|
||||
|
$q=mysql_query("UPDATE albo SET |
||||
|
email='".$scom[13]."', |
||||
|
cognome='".$scom[2]."', |
||||
|
nome='".$scom[3]."', |
||||
|
data_iscr='".$scom[1]."', |
||||
|
indirizzo='".$scom[4]."', |
||||
|
cap='".$scom[5]."', |
||||
|
citta='".$scom[6]."', |
||||
|
provincia='".$scom[7]."', |
||||
|
laurea_a='".$scom[9]."', |
||||
|
laurea_il='".$scom[8]."', |
||||
|
laurea_in='".$scom[10]."', |
||||
|
abilitazione_nel='".$scom[11]."', |
||||
|
abilitazione_a='".$scom[12]."' |
||||
|
WHERE iscrizione='".$scom[0]."'"); |
||||
|
|
||||
|
|
||||
|
if($q){ |
||||
|
echo "ok <br>"; |
||||
|
}else{ |
||||
|
echo "ERRORE <br>"; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
fclose($op);*/ |
||||
|
?> |
Can't render this file because it has a wrong number of fields in line 2.
|
@ -0,0 +1,192 @@ |
|||||
|
<?php |
||||
|
@include '../cgi-bin/params.inc'; |
||||
|
|
||||
|
function sendMail($SM_email, $SM_email2, $SM_email_CC, $SM_subject, $SM_message, $SM_showalert, $SM_append) { |
||||
|
|
||||
|
$host = "https://".$_SERVER['HTTP_HOST'].""; |
||||
|
$send_date = date("Y-m-d");//conv_date(date("Y-m-d")); |
||||
|
$message = ""; |
||||
|
|
||||
|
$top="<html><head><style> |
||||
|
body{font-family: sans, Arial; margin: 0px; font-size: 10pt;} |
||||
|
td{font-family: sans-serif; font-size: 10pt;} |
||||
|
</style><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body style=\"background-color: #4e984a\"><center> |
||||
|
<table border=\"0\" style=\"width: 90%; min-width:300px\" cellspadding=\"20\"> |
||||
|
<tr><td align=\"center\" colspan=\"2\"> |
||||
|
<br><br><img src=\"$host/images/header.png\" alt=\"Ordine dei Farmacisti di Salerno\" width=\"400\"><br></td></tr> |
||||
|
<tr><td align=\"left\" style=\"padding:5px; color: white\" ><b>$SM_subject</b></td> |
||||
|
<td align=\"right\" style=\"padding:5px; color: white\" >$send_date</td></tr> |
||||
|
<tr><td style=\"border-top: 8px solid #FFFFFF;border-left: 1px solid #FFFFFF;border-right: 1px solid #FFFFFF;border-bottom: 8px solid #FFFFFF;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px; padding:30px;line-height:23px;background-color: white\" colspan=\"2\">"; |
||||
|
|
||||
|
|
||||
|
$bottom="</td></tr><tr><td colspan=\"2\" align=\"center\" style=\"text-align:justify; font-size:8pt; color: white\"><br>". |
||||
|
"Questa e-mail contiene informazioni di proprietà e di natura confidenziale. Se non siete il destinatario corretto di questo messaggio, vi ricordiamo che ogni diffusione, distribuzione o copia di questo messaggio è severamente proibita. Se avete ricevuto questo messaggio per errore, siete pregati di cancellarlo immediatamente. Quanto precede ai fini del rispetto del D.L. n. 196/03 sulla tutela dei dati personali.<br>-<br>". |
||||
|
"This e-mail (and any attachments) is strictly confidential and for use only by intendend recipients. If you are not an intended recipients, we point you that any diffusion, distribution or copy of this message is severely forbidden. If you have received t his message by mistake please destroy it immediately (under the observance of D.L. n. 196/03 which protects personal data).". |
||||
|
"<br>Rispetta l'ambiente. Non stampare questa mail se non è necessaria.<br><br></td></tr></table></center></body></html>"; |
||||
|
|
||||
|
|
||||
|
$headers = "From: \"Ordine Farmacisti Salerno\" <info@ordinefarmacistisalerno.it>\r\n"; |
||||
|
$headers .= "Reply-To: \"Ordine Farmacisti Salerno\" <info@ordinefarmacistisalerno.it>\r\n"; |
||||
|
|
||||
|
if($SM_email_CC) { $headers .= "CC: $SM_email_CC\r\n"; } |
||||
|
|
||||
|
$headers .= "MIME-Version: 1.0\r\n"; |
||||
|
|
||||
|
if($SM_append){ |
||||
|
|
||||
|
$append_name = basename($SM_append); |
||||
|
$append_type = mime_content_type($SM_append); |
||||
|
|
||||
|
$data = chunk_split(base64_encode(file_get_contents($SM_append))); |
||||
|
|
||||
|
$semi_rand = md5(time()); |
||||
|
$mime_boundary = md5(uniqid(time()));//"==Multipart_Boundary_x{$semi_rand}x"; |
||||
|
|
||||
|
$headers .= "Content-Type: multipart/mixed; boundary=\"$mime_boundary\"\r\n"; |
||||
|
$headers .= "X-Mailer: PHP " . phpversion()."\r\n"; |
||||
|
|
||||
|
$message .= "This is a multi-part message in MIME format.\r\n"; |
||||
|
$message .= "--$mime_boundary\r\n"; |
||||
|
$message .= "Content-Type: text/html; charset=\"utf-8\"\r\n"; |
||||
|
$message .= "Content-Transfer-Encoding: 7bit\r\n"; |
||||
|
$message .= $top.$SM_message.$bottom."\r\n"; |
||||
|
$message .= "--$mime_boundary\r\n"; |
||||
|
$message .= "Content-Type: {$append_type}; name=\"{$append_name}\"\r\n"; |
||||
|
$message .= "Content-Transfer-Encoding: base64\r\n"; |
||||
|
$message .= "Content-Disposition: attachment; filename=\"{$append_name}\"\r\n"; |
||||
|
$message .= $data."\r\n\r\n"; |
||||
|
$message .= "--$mime_boundary--"; |
||||
|
|
||||
|
} else { |
||||
|
$headers .= "Content-Type: text/html; charset=\"utf-8\"\r\n"; |
||||
|
$message = $top.$SM_message.$bottom; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
$success = mail($SM_email, $SM_subject, $message, $headers); |
||||
|
if(!$success) { |
||||
|
$errorMessage = error_get_last()['message']; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
if($_POST['title']) { |
||||
|
|
||||
|
$SM_email = $_POST['dest']; |
||||
|
$SM_email2 = $_POST['dest']; |
||||
|
$SM_email_CC = $_POST['dest']; |
||||
|
$SM_subject = $_POST['title']; |
||||
|
$SM_message = $_POST['text']; |
||||
|
$SM_showalert = 0; |
||||
|
$SM_append = 0; |
||||
|
|
||||
|
|
||||
|
if(is_uploaded_file($_FILES['append']['tmp_name'])){ |
||||
|
$filename = date("Ymd")."-".preg_replace('/[^a-zA-Z0-9\-\._]/','_', $_FILES['append']['name']); |
||||
|
$path = "../docs/files/email"; |
||||
|
move_uploaded_file($_FILES['append']['tmp_name'], "$path/$filename"); |
||||
|
$SM_append = "$path/$filename"; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
sendMail($SM_email, $SM_email2, $SM_email_CC, $SM_subject, $SM_message, $SM_showalert, $SM_append); |
||||
|
|
||||
|
echo "Mail inviata"; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
?> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
<!DOCTYPE html> |
||||
|
<html> |
||||
|
<head> |
||||
|
<title>TEST EMAIL</title> |
||||
|
|
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
||||
|
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'> |
||||
|
<base href="<?php echo $BASE_URL;?>/"> |
||||
|
<link href="<?php echo $BASE_URL;?>/css/styles.css" rel="stylesheet" type="text/css"/> |
||||
|
<link href="<?php echo $BASE_URL;?>/css/admin.css" rel="stylesheet" type="text/css"/> |
||||
|
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'> |
||||
|
|
||||
|
</head> |
||||
|
<body class="admin"> |
||||
|
|
||||
|
|
||||
|
<form method="post" enctype="multipart/form-data"> |
||||
|
<div class="row px-6 mx-auto"> |
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Destinatario</span> |
||||
|
<input type="text" name="dest"> |
||||
|
</div> |
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Oggetto</span> |
||||
|
<input type="text" name="title"> |
||||
|
</div> |
||||
|
<div class="col-12 pb-2"> |
||||
|
<span class="font-12">Testo</span> |
||||
|
<textarea cols="40" rows="6" name="text" class="mce"></textarea> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
<span class="font-12">Allegato</span> |
||||
|
<input type="file" name="append"> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12 text-right"> |
||||
|
<button type="submit" name="go" value="1">Invia</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
|
||||
|
|
||||
|
<script type="text/javascript" src="<?php echo $BASE_URL;?>/node_modules/jquery/dist/jquery.min.js"></script> |
||||
|
<script type="text/javascript" src="<?php echo $BASE_URL;?>/node_modules/tinymce/tinymce.min.js"></script> |
||||
|
|
||||
|
<script type="text/javascript"> |
||||
|
|
||||
|
$(document).ready( function(){ |
||||
|
tinymce.init({ |
||||
|
selector: '.mce', |
||||
|
height: 300, |
||||
|
theme: 'modern', |
||||
|
menubar: false, |
||||
|
language: 'it', |
||||
|
forced_root_block : '', |
||||
|
force_br_newlines : true, |
||||
|
relative_urls : false, |
||||
|
remove_script_host : false, |
||||
|
plugins: [ |
||||
|
'advlist autolink lists link paste' |
||||
|
], |
||||
|
toolbar: 'bold italic underline | alignleft aligncenter alignright alignjustify | link bullist numlist| removeformat', |
||||
|
image_advtab: false, |
||||
|
content_css: [ |
||||
|
'//fonts.googleapis.com/css?family=Lato:300,300i,400,400i', |
||||
|
] |
||||
|
}); |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,23 @@ |
|||||
|
|
||||
|
<?php |
||||
|
|
||||
|
|
||||
|
@include 'new/cgi-bin/conn.conn'; |
||||
|
$conn = mysql_connect($DATAhst,$DATAusr,$DATApwd); |
||||
|
mysql_select_db("Sql90805_5"); |
||||
|
|
||||
|
|
||||
|
$qval=mysql_query("SELECT * FROM lavoro"); |
||||
|
|
||||
|
while($r=mysql_fetch_array($qval)){ |
||||
|
$qusr=mysql_query("SELECT * FROM albo WHERE iscrizione=".$r['utente'].""); |
||||
|
$ru=mysql_fetch_array($qusr); |
||||
|
|
||||
|
|
||||
|
mysql_query("INSERT INTO inserzioni VALUES('','".$ru['iscrizione']."','".$ru['nome']." ".$ru['cognome']."','".$ru['email']."', |
||||
|
'".$r['data']."','".$r['testo']."','','".$r['tipo']."',1)"); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
?> |
@ -0,0 +1,56 @@ |
|||||
|
|
||||
|
<?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='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="row no-gutters py-4"> |
||||
|
|
||||
|
<?php |
||||
|
|
||||
|
|
||||
|
if($_GET['delid']){ |
||||
|
|
||||
|
$q=mysqli_query($conn, "UPDATE board SET |
||||
|
usr='', |
||||
|
pwd='', |
||||
|
enabled=0, |
||||
|
privacy=0, |
||||
|
newsletter=0 |
||||
|
WHERE id='".$_SESSION['AUTH']['id']."' |
||||
|
"); |
||||
|
|
||||
|
echo "<div class=\"col-10 text-center mx-auto\">". |
||||
|
"<p><i class=\"fa fa-check-circle font-alert p-4\"></i></p>". |
||||
|
"<b>Account eliminato correttamente.</b><br>". |
||||
|
"</div>"; |
||||
|
|
||||
|
echo "<script>parent.location='".$BASE_URL."';</script>"; |
||||
|
|
||||
|
unset($_SESSION['AUTH']); |
||||
|
session_destroy(); |
||||
|
} |
||||
|
|
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,49 @@ |
|||||
|
|
||||
|
<?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='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="row no-gutters py-4"> |
||||
|
|
||||
|
<?php |
||||
|
|
||||
|
|
||||
|
if($_GET['delid']){ |
||||
|
|
||||
|
$_SESSION['AUTH']['newsletter'] = $_GET['newsletter']; |
||||
|
$q=mysqli_query($conn, "UPDATE board SET |
||||
|
newsletter=".$_GET['newsletter']." |
||||
|
WHERE id='".$_SESSION['AUTH']['id']."' |
||||
|
"); |
||||
|
|
||||
|
echo "<div class=\"col-10 text-center mx-auto\">". |
||||
|
"<p><i class=\"fa fa-check-circle font-alert p-4\"></i></p>". |
||||
|
"<b>Iscrizione alla newsletter modificata correttamente.</b><br>". |
||||
|
"</div>"; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,21 @@ |
|||||
|
<div class="row pb-4"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Bilanci dell'Ordine</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12 file-list"> |
||||
|
<div class="item-title pt-4"> |
||||
|
<div class=" row"> |
||||
|
<div class="title col-6 col-sm-8 font-bold">nome del file</div> |
||||
|
<div class="size col-2 font-bold">dimensione</div> |
||||
|
<div class="date text-right col-4 col-sm-2 font-bold">ultima mod.</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<?php |
||||
|
$q=mysqli_query($conn,"SELECT * FROM files WHERE path='/docs/bilanci' ORDER BY date DESC"); |
||||
|
while($r=mysqli_fetch_array($q)){ |
||||
|
item_file($r); |
||||
|
} |
||||
|
?> |
||||
|
</div> |
||||
|
</div> |
@ -0,0 +1,21 @@ |
|||||
|
<div class="row pb-4"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Dipartimento di Farmacia - Materiale didattico studenti</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12 file-list"> |
||||
|
<div class="item-title pt-4"> |
||||
|
<div class=" row"> |
||||
|
<div class="title col-6 col-sm-8 font-bold">nome del file</div> |
||||
|
<div class="size col-2 font-bold">dimensione</div> |
||||
|
<div class="date text-right col-4 col-sm-2 font-bold">ultima mod.</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<?php |
||||
|
$q=mysqli_query($conn,"SELECT * FROM files WHERE path='/docs/dipartimento-farmacia' ORDER BY date DESC"); |
||||
|
while($r=mysqli_fetch_array($q)){ |
||||
|
item_file($r); |
||||
|
} |
||||
|
?> |
||||
|
</div> |
||||
|
</div> |
@ -0,0 +1,21 @@ |
|||||
|
<div class="row pb-4"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Slides</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12 file-list"> |
||||
|
<div class="item-title pt-4"> |
||||
|
<div class=" row"> |
||||
|
<div class="title col-6 col-sm-8 font-bold">nome del file</div> |
||||
|
<div class="size col-2 font-bold">dimensione</div> |
||||
|
<div class="date text-right col-4 col-sm-2 font-bold">ultima mod.</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<?php |
||||
|
$q=mysqli_query($conn,"SELECT * FROM files WHERE path='/docs/slides' ORDER BY date DESC"); |
||||
|
while($r=mysqli_fetch_array($q)){ |
||||
|
item_file($r); |
||||
|
} |
||||
|
?> |
||||
|
</div> |
||||
|
</div> |
@ -1 +0,0 @@ |
|||||
|
|
@ -1,3 +0,0 @@ |
|||||
asdfgdjnbfghdn |
|
||||
g hgsfj |
|
||||
rtg |
|
@ -1 +0,0 @@ |
|||||
s |
|
@ -1 +0,0 @@ |
|||||
|
|
@ -1,3 +0,0 @@ |
|||||
asdfgdjnbfghdn |
|
||||
g hgsfj |
|
||||
rtg |
|
@ -1 +0,0 @@ |
|||||
s |
|
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 135 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 111 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 234 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 129 KiB |
After Width: | Height: | Size: 134 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 184 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 451 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 97 KiB |