fRecord.pl
上传用户:qdrechuli
上传日期:2022-08-01
资源大小:917k
文件大小:2k
- #!/usr/bin/perl -w
- use strict;
- use DBI;
- use Jpc::Html;
- sub Titre
- {
- print '<H1 ALIGN="CENTER">',$_[0],"</H1><P>n";
- }
- sub Chapitre
- {
- print '<H3>',$_[0],"</H3>n";
- }
-
-
- sub Fin_Document
- {
- print '</BODY>',"n";
- print '</HTML>',"n";
- }
-
- sub main
- {
- my $sql;
- my $sqlreq;
- my $First;
-
-
- Document("Net-Cam : Visualisation Enregistrements");
- Titre("Net-Cam : Visualisation Enregistrements");
- print "<FONT FACE=verdana>";
-
- my $db = DBI->connect("DBI:mysql:netcam","root","");
-
- print "<FORM METHOD=GET ACTION=fDebRecord.pl>","n";
-
- print '<P><B>Cam閞a <SELECT NAME="VL_Cam" SIZE=4>';
- $sqlreq = "select C_ID,C_Name from cam order by C_ID";
- $sql = $db->prepare($sqlreq);
- $sql->execute();
- $First = 0;
- while ((my $CamID,my $CamName) = $sql->fetchrow())
- {
- $First++;
- if ($First==1) { print '<OPTION SELECTED>'; } else { print '<OPTION>'; }
- print $CamID,"-",$CamName;
- }
- $sql->finish();
- print '</SELECT>',"n";
- (my $sec,my $min,my $hour,my $mday,my $mon,my $year,my $wday,my $yday,my $isdst) = localtime(time);
- $year = $year+1900;
- $mon = $mon+1;
-
- print 'Ann閑 <SELECT NAME="VL_Year" SIZE=1>';
- for (my $i=2002;$i<=2037;$i++)
- {
- print '<OPTION';
- if ($i == $year) { print ' SELECTED'; }
- print '>',$i;
- }
- $sql->finish();
- print '</SELECT>',"n";
-
- print 'Mois <SELECT NAME="VL_Mon" SIZE=1>';
- for (my $i=1;$i<=12;$i++)
- {
- print '<OPTION';
- if ($i == $mon) { print ' SELECTED'; }
- print '>',$i;
- }
- $sql->finish();
- print '</SELECT>',"n";
-
- print 'Jour <SELECT NAME="VL_Day" SIZE=1>';
- for (my $i=1;$i<=31;$i++)
- {
- print '<OPTION';
- if ($i == $mday) { print ' SELECTED'; }
- print '>',$i;
- }
- $sql->finish();
- print '</SELECT>',"n";
- print 'Heure <SELECT NAME="VL_Hour" SIZE=1>';
- for (my $i=0;$i<=23;$i++)
- {
- print '<OPTION';
- if ($i == $hour) { print ' SELECTED'; }
- print '>',$i;
- }
- $sql->finish();
- print '</SELECT>',"n";
- print '<INPUT NAME="VL_Auto" TYPE="HIDDEN" VALUE="No">',"n";
- print '<INPUT NAME="VL_Cur" TYPE="HIDDEN" VALUE="1">',"n";
- print '<INPUT NAME="VL_Act" TYPE="HIDDEN" VALUE="D閎ut">',"n";
- print '<P><CENTER><INPUT NAME="VL_Ok" TYPE="SUBMIT" VALUE="Visualiser">',"n";
- print "</FORM>","n";
-
- $db->disconnect();
- Fin_Document();
- }
-
- main();
- exit(0);