/
anag_elenco_maisoci.php
104 lines (83 loc) · 3.04 KB
/
anag_elenco_maisoci.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Bici e Dintorni - Anagrafiche dei mai soci</title>
<meta name="description" content="">
<meta name="author" content="Adriano">
<meta name="viewport" content="width=device-width; initial-scale=1.0">
<!-- Uso di Bootstrap per rendere la pagina responsive -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
</head>
<body>
<div class="container-fluid">
<header>
<h1>Elenco anagrafiche senza iscrizioni in archivio Bici e Dintorni</h1>
</header>
<button class="btn" type="button" onclick="javascript:location.href='http://www.biciedintorni.it/application/admin.php?fun=modass'">Menu anagrafiche</button>
<?php
/**
* Anag_ecc File Doc Comment
*
* PHP version 5.3
* Programma che fornisce l'elenco completo delle anagrafiche nel db di
* Bici e Dintorni che non sono mai state associate a Bici e Dintorni
*
* @category Programma
* @package Root
* @author Adriano Comai <adriano-liste@fastwebnet.it>
* @license Proprietà FIAB Torino Bici e Dintorni
* @link http://www.biciedintorni.it/
*/
$servername = "62.149.150.56";
$username = "Sql145958";
$password = "c36d0fc2";
$dbname = "Sql145958_1";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT id, nome, cognome FROM anagrafiche WHERE a2007 = '0' && a2008 = '0' && a2009 = '0'
&& a2010 = '0' && a2011 = '0' && a2012 = '0' && a2013 = '0' && a2014 = '0'
&& a2015 = '0' && a2016 = '0' && a2017 = '0' ORDER BY cognome, nome;" ;
$result = $conn->query($sql);
echo "<table style='width:100%'>";
if ($result->num_rows > 0) {
// output data of each row
echo "<tr>" .
"<th align='left'>" . "id" . "</th>" .
"<th align='left'>" . "Nome" . "</th>" .
"<th align='left'>" . "Cognome" . "</th>" .
"<th align='left'>" . " " . "</th>" .
"</tr>";
while ($row = $result->fetch_assoc()) {
echo
"<tr>" .
"<td>" . $row["id"]. "</td>" .
"<td>" . $row["nome"]. "</td>" .
"<td>" . $row["cognome"]. "</td>" .
"<td><a href=\"admin.php?fun=modass&id=".$row['id']."\">Modifica</a></td>" .
"</tr>";
//"id: " . $row["id"]. " - Ragione sociale: " . $row["rag_sociale"]. " - Indirizzo: " . $row["indirizzo"]. "<br>";
}
} else {
echo "0 results";
}
echo "</table>";
$conn->close();
?>
<footer>
<hr />
<button class="btn" type="button" onclick="javascript:location.href='http://www.biciedintorni.it/application/admin.php?fun=modass'">Menu anagrafiche</button>
<p>
<a href="http://www.biciedintorni.it/wordpress">FIAB Torino Bici e Dintorni - Home page</a>
</p>
</footer>
</div>
</body>
</html>