Autor Beitrag
CenBells
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1547

Win 7
Delphi XE5 Pro
BeitragVerfasst: Di 06.07.04 18:33 
HAllo leute,

ich habe hier ne htm datei, in der eine tabelle drin ist. diese ist gefüllt mit checkboxen wie folgt
ausblenden Quelltext
1:
<input type='checkbox' name='Day[]' value='1'>					

beim abschicken wird das Array Day an ein php skript übergeben.
Zur Automatisierung aus einem delphi-programm heraus, will ich den php-aufruf mit delphi absetzen. Ich weiß nur leider nicht, wie ich ein array dieser art übergebe.

Kann mir da jemand helfen?

Gruß
Ken

Hinweis: X-Post mit der DP

_________________
Eine Klasse beschreibt die Struktur und das Verhalten einer Menge gleichartiger Objekte.
neojones
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1206
Erhaltene Danke: 1



BeitragVerfasst: Di 06.07.04 18:41 
Schreib mal den Quellcode der ganzen HTML-Datei hier rein und den der Datei, die als Form-Action angegeben ist. Da steckt nämlich der Casus Cnacksus.

_________________
Ha! Es compiliert! Wir können ausliefern!
CenBells Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1547

Win 7
Delphi XE5 Pro
BeitragVerfasst: Di 06.07.04 20:07 
hallo,

hier der code
ausblenden volle Höhe Quelltext
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:
<HTML>
<HEAD>
<TITLE>Neuer Kalendereintrag</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFCC">
            <!--  start  body  -->

!--<FORM ACTION="datneure.phtml" METHOD=POST>
!--<center><h2><font face='Arial' color='#3B4579'>Juli 2004</font></h2><table border='1' cellpadding='5' cellspacing='5'><tr><th><b><font face='Arial' color='#3B4579'>So</font></b></th><th><b><font face='Arial' color='#3B4579'>Mo</font></b></th><th><b><font face='Arial' color='#3B4579'>Di</font></b></th><th><b><font face='Arial' color='#3B4579'>Mi</font></b></th><th><b><font face='Arial' color='#3B4579'>Do</font></b></th><th><b><font face='Arial' color='#3B4579'>Fr</font></b></th><th><b><font face='Arial' color='#3B4579'>Sa</font></b></th>
!--<tr><td></td><td></td><td></td><td></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='1'><font face='Arial' color='#3B4579'>1</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='2'><font face='Arial' color='#3B4579'>2</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='3'><font face='Arial' color='#3B4579'>3</font></td></tr><tr><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='4'><font face='Arial' color='#3B4579'>4</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='5'><font face='Arial' color='#3B4579'>5</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='6'><font face='Arial' color='#3B4579'>6</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='7'><font face='Arial' color='#3B4579'>7</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='8'><font face='Arial' color='#3B4579'>8</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='9'><font face='Arial' color='#3B4579'>9</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='10'><font face='Arial' color='#3B4579'>10</font></td></tr><tr><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='11'><font face='Arial' color='#3B4579'>11</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='12'><font face='Arial' color='#3B4579'>12</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='13'><font face='Arial' color='#3B4579'>13</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='14'><font face='Arial' color='#3B4579'>14</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='15'><font face='Arial' color='#3B4579'>15</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='16'><font face='Arial' color='#3B4579'>16</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='17'><font face='Arial' color='#3B4579'>17</font></td></tr><tr><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='18'><font face='Arial' color='#3B4579'>18</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='19'><font face='Arial' color='#3B4579'>19</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='20'><font face='Arial' color='#3B4579'>20</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='21'><font face='Arial' color='#3B4579'>21</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='22'><font face='Arial' color='#3B4579'>22</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='23'><font face='Arial' color='#3B4579'>23</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='24'><font face='Arial' color='#3B4579'>24</font></td></tr><tr><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='25'><font face='Arial' color='#3B4579'>25</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='26'><font face='Arial' color='#3B4579'>26</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='27'><font face='Arial' color='#3B4579'>27</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='28'><font face='Arial' color='#3B4579'>28</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='29'><font face='Arial' color='#3B4579'>29</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='30'><font face='Arial' color='#3B4579'>30</font></td><td valign='top' height='10' width='10'><input type='checkbox' name='Day[]' value='31'><font face='Arial' color='#3B4579'>31</font></td></tr><tr><tr><td colspan="7"><center><br><a href='datneu.phtml?month=06&year=2004'><font face='Arial' color='#3B4579'>vorheriger Monat</font></a>   <a href='datneu.phtml?month=08&year=2004'><font face='Arial' color='#3B4579'>nächster Monat</font></a></td></tr></table><table cellspacing="3" cellpadding="3" border="0"><tr>
<td>
<font face='Arial' color='#3B4579'>Kurzbeschreibung</font><br>
<input type='text' size='30' name='Event'>
</td>

<td></td>

<td>

<font face='Arial' color='#3B4579'>Ansprechpartner:</font><br>
<input type='text' size='30' name='Contact'>
</td>

</tr>

<tr>
<td>

<font face='Arial' color='#3B4579'>E-Mail:</font><br>
<input type='text' size='30' name='Email'>
</td>

<td></td>

<td>

<font face='Arial' color='#3B4579'>Telefon:</font><br>
<input type='text' size='30' name='Phone'>
</td>

</tr>

<tr>
<td>

<font face='Arial' color='#3B4579'>Weitere Informationen:</font><br>
<TEXTAREA NAME="Information" ROWS=11 COLS=30 wrap>
</TEXTAREA>
</td>

<td></td>

<td>

<br>
<font face='Arial' color='#3B4579'>Eingetragen von:</font><br>
<input type='Text' size='30' name='Submitter' value='Admin'>
</td></tr>


<input type='hidden' name='New_ID' value=''>
<input type="hidden" name="Month" value="07"><input type="hidden" name="Year" value="2004">
<td>
<INPUT TYPE="submit" NAME="Submit" VALUE="O.K.">
</td>
</center>
</table>

            <!--  End  Body  -->
<CENTER>
<br><hr width='70%'><br>
| <a href="../index.phtml"><font face='Arial' color='#29305A'>Kalender ansehen</font></a> |
 <a href="admind.phtml"><font face='Arial' color='#29305A'>Administration</font></a> |
<br>
</CENTER>
</BODY>
</HTML>


gruß
Ken

_________________
Eine Klasse beschreibt die Struktur und das Verhalten einer Menge gleichartiger Objekte.
CenBells Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1547

Win 7
Delphi XE5 Pro
BeitragVerfasst: Di 06.07.04 23:46 
übersehen, daß auch der code der action datei gefragt wurde
ausblenden volle Höhe Quelltext
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:
<?
require( "../function.php3");
commonHeader( "Eintrag hinzugefügt");
DBInfo();

if ($Start_Time2==""):
$Start_Time2="00";
endif;
if ($Start_Time1=="") {
$Start_Time = "";
} else{
$Start_Time="$Start_Time1:$Start_Time2";
}

if ($End_Time2==""):
$End_Time2="00";
endif;
if ($End_Time1=="") {
$End_Time = "";
} else{
$End_Time="$End_Time1:$End_Time2";
}

if ($Event == '') {
echo "<center><h1>You forgot to provide a Short Description of this event!<br>";
echo "This item WAS NOT added to the calendar!<br>Backup and give me a Short";
echo " Description.</h1></center>";
exit;
} elseif ($Day[0] == '') {
echo "<center><h1>Es wurde kein Datum angegeben!<br>";
echo "Dieser Eintrag wurde dem Kalender nicht hinzugefügt!<br>Backup and give me a";
echo " Date.</h1></center>";
exit;
} else {
$i=0;
while ($Day[$i]) {
mysql_connect("$DBHost","$DBUser","$DBPass");
mysql_select_db("$my_db") or die( "Unable to select database");
mysql("$my_db", "INSERT INTO Contents VALUES (
'$Month',
'$Day[$i]',
'$Year',
'$Start_Time',
'$Start_Period',
'$End_Time',
'$End_Period',
'$Event',
'$Information',
'$Submitter',
'$Event_ID',
'$Contact',
'$Email',
'$Phone')");
$i++;
  }
}
echo "<font face='Arial'><b>Folgendes wurde im Kalender eingetragen:</b><br></font>";
$n=0;
/* query the database to get the new values */
mysql_connect("$DBHost","$DBUser","$DBPass");
mysql_select_db("$my_db") or die( "Unable to select database");
while ($n<$i):
$result  =  mysql_query( "SELECT * from Contents WHERE Event='$Event' and Day='$Day[$n]' and Month='$Month' and Year='$Year'");
while($row = mysql_fetch_row($result)) {
$Mn = $row[0];
$Dy = $row[1];
$Yr = $row[2];
$ST = $row[3];
$SP = $row[4];
$ET = $row[5];
$EP = $row[6];
$Ev = $row[7];
$In = $row[8];
$Su = $row[9];
$EID = $row[10];
$Co = $row[11];
$Em = $row[12];
$Ph = $row[13];
}


echo "<b>Monat:</b> $Mn<br>";
echo "<b>Tag:</b> $Dy<br>";
echo "<b>Jahr:</b> $Yr<br>";

if ($ST == '') {
echo "";
} else {
echo "<b>Start Time:</b> $ST $SP<br>";
}

if ($ET == '') {
echo "";
} else {
echo "<b>End Time:</b> $ET $EP<br>";
}

echo "<b>Event:</b> $Ev<br>";

if ($In == '') {
echo "";
} else {
echo "<b>Information:</b> $In<br>";
}

if ($Co == '') {
echo "";
} else {
echo "<b>Ansprechpartner:</b> $Co<br>";
}

if ($Em == '') {
echo "";
} else {
echo "<b> E-Mail:</b> $Em<br>";
}

if ($Ph == '') {
echo "";
} else {
echo "<b>Telefon:</b> $Ph<br>";
}
echo "<br><br>";
$n++;
endwhile;


adminFooter();
?>


Gruß
Ken

_________________
Eine Klasse beschreibt die Struktur und das Verhalten einer Menge gleichartiger Objekte.