/web/htdocs/www.euroroma.net/home/admin/apertura/inserisci.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<? session_start();

if(!
array_key_exists('user'$_SESSION))
{
    
header("Location: index.php");
    exit;
}
?>
<? 
//Salvataggio articolo linkato
include("../setConn.php");

$ID $_GET['ID'];

?>

<?

$namedb 
"Sql603025_1";
if (
$db == FALSE)
die (
"Errore nella connessione.");
$sql "UPDATE apertura SET IDarticolow='".$ID."' WHERE ID=1";
mysql_select_db($namedb);
$Result1 mysql_query($sql) or die(mysql_error());
mysql_close($db);

?>

<html>
<head>
<? include("../jstextarea.php"); ?>
<link rel="stylesheet" href="../style.css" type="text/css" media="screen" />

<title></title>

</head>
<body>
<div id="container">
    
    <div id="content">
    <TABLE width="100%" border="0">
        <TR>
            <TD valign="top">
                <TABLE>
                <TR>
                    <td height="50"><H1><? echo str_replace("_"" "$_GET['nomecat']); ?></H1></td>
                </TR>
                </TABLE>
            </TD>
        </TR>
        </TABLE>
        <?  //Configura le variabili
            
include("../setConn.php");
            include(
"../class_utility.php");
            
$special = new class_utility();
            
$namedb "Sql603025_1";
            if (
$db == FALSE)
                die (
"Errore nella connessione.");
            
$sql "SELECT * FROM apertura WHERE ID=1";
            
$result mysql_db_query($namedb$sql$db);
            while(
$results mysql_fetch_array($result))
            {
                
$autore $special->specialChars($results["Autore"]);
                
$titolo $special->specialChars($results["Titolo"]);
                
$sottotitolo $special->specialChars($results["Sottotitolo"]);
                
$testo $special->specialChars($results["Testo"]);
                
$url $special->specialChars($results["URLimg"]);
                
$data $special->specialChars($results["Data_e_ora"]);
                
$aperturavideo $results["Aperturavideo"];
                
$video $results["Video"];
            }
        
            
$rubrica str_replace("\"""&quot;"$rubrica);
            
$autore str_replace("\"""&quot;"$autore);
            
$titolo str_replace("\"""&quot;"$titolo);
            
$sottotitolo str_replace("\"""&quot;"$sottotitolo);
        
        
        
?>
        
        <FORM enctype="multipart/form-data" method="POST" action='save.php'>
            <INPUT TYPE="hidden" name="ID" value="1">
            <INPUT TYPE="hidden" name="IDarticolo" value="<? echo $ID?>">
            <INPUT TYPE="hidden" name="nomecat" value="APERTURA">
            <INPUT TYPE="hidden" name="url" value="<? echo $url?>">
            <INPUT TYPE="hidden" name="data" value="<? echo date("Y-m-d H:i:s"); ?>">
        <TABLE width="100%" border="0">
        <TR>
            <TD width="200">Seleziona per apertura Video:</TD>
            <TD>
                <INPUT TYPE="checkbox" NAME="aperturavideo" value="1" <? if($aperturavideo==1){ echo "checked='checked'";} ?> >
            </TD>
        </TR>
        <TR>
            <TD width="200"><B>Codice Youtube</B> (Larghezza Video 570px):</TD>
            <TD valign="top">
                <INPUT TYPE="text" NAME="video" size="80" maxlength="500" class="modulo" value='<?echo $video;?>'>
            </TD>
        </TR>
        <TR>
            <TD width="200"><B>Titolo</B>:</TD>
            <TD valign="top">
                <INPUT TYPE="text" NAME="titolo" size="80" maxlength="500" class="modulo"  value="<? echo $titolo?>">
            </TD>
        </TR>
        <TR>
            <TD width="200"><B>Sottotitolo</B>:</TD>
            <TD valign="top">
                <INPUT TYPE="text" NAME="sottotitolo" size="80" maxlength="500" class="modulo"  value="<? echo $sottotitolo?>">
            </TD>
        </TR>
        <TR>
            <TD width="200"><B>Autore</B>:</TD>
            <TD valign="top">
                <INPUT TYPE="text" NAME="autore" size="80" maxlength="500" class="modulo"  value="<? echo $autore?>">
            </TD>
        </TR>
        <TR>
            <TD width="200"><B>Testo</B>:</TD>
            <TD valign="top">
                <TEXTAREA id="testo" NAME="testo" ROWS="15" COLS="100" class="modulo"><? echo $testo?></TEXTAREA>
            </TD>
        </TR>

        <TR>
            <TD width="100%" height="50" colspan="2"><HR></TD>
        </TR>
        
        <? if($url!=""){?>
            <TR>
                <TD width="200"><B>Foto pubblicata:</B></TD>
                <TD>
                    <? echo "<IMG SRC='".$url."'>"?>
                </TD>
            </TR>
            <TR>
                <TD width="200">Seleziona per cancellare la foto pubblicata:</TD>
                <TD>
                    <INPUT TYPE="checkbox" NAME="cancella" value="1">
                </TD>
            </TR>
            <?}?>
            
            <TR>
                <TD width="200" height="100"><B>Foto:</B></TD>
                <TD>
                    <input name="userfile" type="file" class="modulo">
                </TD>
            </TR>

            <TR>
                <TD width="100%" height="50" colspan="2"><HR></TD>
            </TR>

        <TR>
            <TD><INPUT TYPE="submit" value="Modifica" class="modulo"></TD>
        </TR>
        </TABLE>
        </FORM>
        
        <br><br>


            <B>LINK ALL'ARTICOLO:</B><BR><BR>        
            <?
    
                $special 
= new class_utility();
                
                
$namedb "Sql603025_1";

                if (
$db == FALSE)
                    die (
"Errore nella connessione.");
                
$sql "SELECT * FROM apertura WHERE ID=1";
                
$result mysql_db_query($namedb$sql$db);
                
                
//Numero per colore sfondo
                
$i=0;

                while(
$results mysql_fetch_array($result)){
                    
                    
$IDarticolo $results["IDarticolow"];
                    
                    if(
$IDarticolow==0){
                        echo 
"<p><A HREF='cerca1.php?ID=".$results["ID"]."&nomecat=APERTURA'>SELEZIONA ARTICOLO...</A></p>";
                    }
                    
                    
$sfondo="fotobianca"

                    if ( 
$i == ) { 
                        
$sfondo="fotoblu"
                    }
                    
                    
//connessione alla tabella articoli
                    
if ($db == FALSE)
                            die (
"Errore nella connessione.");

                        
$sql2 "SELECT * FROM risultati WHERE ID=".$IDarticolo;

                        
$result2 mysql_db_query($namedb$sql2$db);
                        
                        while(
$results2 mysql_fetch_array($result2))
                        {
                            echo 
"<DIV class=".$sfondo.">";
                            echo 
"<TABLE width='98%' cellpadding='0' cellspacing='0'><TR><TD>";
                            echo 
"<p class='data'>".$results2["Data_e_ora"]."</p>";
                            echo 
"<DIV align='justify'><B>".$special->specialChars($results2["Rubrica"])."</B></DIV>";
                            if(
$results2["URLimg"]){
                                echo 
"<DIV align='justify'><IMG SRC='".$results2["URLimg"]."'></DIV>";
                            }
                            echo 
"<DIV align='justify'>".$special->specialChars($results2["Titolo"])."</DIV>";
                            echo 
"<DIV align='justify'>".$special->specialChars($results2["Sottotitolo"])."</DIV>";
                            echo 
"<DIV align='justify'>".$special->specialChars($results2["Autore"])."</DIV>";
                            echo 
"&nbsp;&nbsp;&nbsp;";
                            echo 
"</DIV>";
                            echo 
"</TD></TR></TABLE>";
                            echo 
"</DIV>";
                            echo 
"<!-- RIGA -->";
                            echo 
"<hr>";
                        }
                    
//fine connessione alla tabella articoli

                    
$i++;
                }
                
                include(
"../paginazione.php");


                
mysql_close($db);
            
?>

    </div>
</div>
</body>
</html>