mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include('config.inc.php');
|
||||
if(!($dbh = @mysql_connect($dbhost, $dbuser, $dbpasswd)))
|
||||
{
|
||||
die("Error: Cannot connect to database $dbhost");
|
||||
}
|
||||
mysql_select_db($dbname);
|
||||
$query = "delete from rt_antwort where 1";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query = "delete from rt_pruefling where 1";
|
||||
$result = mysql_query($query, $dbh);
|
||||
echo 'Daten wurden gelöscht!';
|
||||
mysql_close($dbh);
|
||||
?>
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Untitled Document</TITLE>
|
||||
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
</HEAD>
|
||||
|
||||
<BODY bgcolor="#FFFFFF" text="#000000">
|
||||
<P><A href="clear_user.php">User und Antworten Löschen</A> </P>
|
||||
<H3>Datenbank Initialisieren auf</H3>
|
||||
<UL>
|
||||
<LI><A href="init.php?stgid=1">BEL</A></LI>
|
||||
<LI><A href="init.php?stgid=2">BIF</A></LI>
|
||||
<LI><A href="init.php?stgid=3">BEW</A></LI>
|
||||
<LI><A href="init.php?stgid=4">BICSS</A></LI>
|
||||
<LI><A href="init.php?stgid=5">BSET</A></LI>
|
||||
<LI><A href="init.php?stgid=6">BWI</A></LI>
|
||||
<LI><A href="init.php?stgid=7">BITS</A></LI>
|
||||
<LI><A href="init.php?stgid=8">BBME</A></LI>
|
||||
<LI><A href="init.php?stgid=9">BMR</A></LI>
|
||||
<LI><A href="init.php?stgid=10">BIWI</A></LI>
|
||||
</UL>
|
||||
<H2><A href="init.php?stgid=10&susi=true">Susi</A></H2>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,159 @@
|
||||
<?php
|
||||
include('config.inc.php');
|
||||
if(!($dbh = @mysql_connect($dbhost, $dbuser, $dbpasswd)))
|
||||
{
|
||||
die("Error: Cannot connect to database $dbhost");
|
||||
}
|
||||
mysql_select_db($dbname);
|
||||
switch ($stgid)
|
||||
{
|
||||
//BEL
|
||||
case 1: $reihung[1]=1; //Algebra
|
||||
$reihung[2]=3; //Schaetzen
|
||||
$reihung[3]=2; //Funktionen
|
||||
$reihung[4]=4; //Schlussfolgerungen
|
||||
$reihung[6]=0; //Grundlagen der Elektrotechnik
|
||||
$reihung[7]=5; //Persönlichkeit
|
||||
$reihung[8]=6; //Englisch
|
||||
$reihung[10]=0; //Physik
|
||||
break;
|
||||
//BIF
|
||||
case 2: $reihung[1]=1; //Algebra
|
||||
$reihung[2]=3; //Schaetzen
|
||||
$reihung[3]=2; //Funktionen
|
||||
$reihung[4]=4; //Schlussfolgerungen
|
||||
$reihung[6]=0; //Grundlagen der Elektrotechnik
|
||||
$reihung[7]=5; //Persönlichkeit
|
||||
$reihung[8]=6; //Englisch
|
||||
$reihung[10]=0; //Physik
|
||||
break;
|
||||
//BEW
|
||||
case 3: $reihung[1]=1; //Algebra
|
||||
$reihung[2]=3; //Schaetzen
|
||||
$reihung[3]=2; //Funktionen
|
||||
$reihung[4]=4; //Schlussfolgerungen
|
||||
$reihung[6]=0; //Grundlagen der Elektrotechnik
|
||||
$reihung[7]=0; //Persönlichkeit
|
||||
$reihung[8]=5; //Englisch
|
||||
$reihung[10]=0; //Physik
|
||||
break;
|
||||
//BICSS
|
||||
case 4: $reihung[1]=1; //Algebra
|
||||
$reihung[2]=3; //Schaetzen
|
||||
$reihung[3]=2; //Funktionen
|
||||
$reihung[4]=4; //Schlussfolgerungen
|
||||
$reihung[6]=0; //Grundlagen der Elektrotechnik
|
||||
$reihung[7]=5; //Persönlichkeit
|
||||
$reihung[8]=6; //Englisch
|
||||
$reihung[10]=0; //Physik
|
||||
break;
|
||||
//BSET
|
||||
case 5: $reihung[1]=1; //Algebra
|
||||
$reihung[2]=3; //Schaetzen
|
||||
$reihung[3]=2; //Funktionen
|
||||
$reihung[4]=4; //Schlussfolgerungen
|
||||
$reihung[6]=0; //Grundlagen der Elektrotechnik
|
||||
$reihung[7]=6; //Persönlichkeit
|
||||
$reihung[8]=5; //Englisch
|
||||
$reihung[10]=7; //Physik
|
||||
break;
|
||||
//BWI
|
||||
case 6: $reihung[1]=1; //Algebra
|
||||
$reihung[2]=3; //Schaetzen
|
||||
$reihung[3]=2; //Funktionen
|
||||
$reihung[4]=4; //Schlussfolgerungen
|
||||
$reihung[6]=0; //Grundlagen der Elektrotechnik
|
||||
$reihung[7]=5; //Persönlichkeit
|
||||
$reihung[8]=6; //Englisch
|
||||
$reihung[10]=0; //Physik
|
||||
break;
|
||||
//BITS
|
||||
case 7: $reihung[1]=1; //Algebra
|
||||
$reihung[2]=3; //Schaetzen
|
||||
$reihung[3]=2; //Funktionen
|
||||
$reihung[4]=4; //Schlussfolgerungen
|
||||
$reihung[6]=0; //Grundlagen der Elektrotechnik
|
||||
$reihung[7]=5; //Persönlichkeit
|
||||
$reihung[8]=6; //Englisch
|
||||
$reihung[10]=0; //Physik
|
||||
break;
|
||||
//BBME
|
||||
case 8: $reihung[1]=1; //Algebra
|
||||
$reihung[2]=3; //Schaetzen
|
||||
$reihung[3]=2; //Funktionen
|
||||
$reihung[4]=4; //Schlussfolgerungen
|
||||
$reihung[6]=0; //Grundlagen der Elektrotechnik
|
||||
$reihung[7]=0; //Persönlichkeit
|
||||
$reihung[8]=5; //Englisch
|
||||
$reihung[10]=6; //Physik
|
||||
break;
|
||||
//BMR
|
||||
case 9: $reihung[1]=1; //Algebra
|
||||
$reihung[2]=3; //Schaetzen
|
||||
$reihung[3]=2; //Funktionen
|
||||
$reihung[4]=4; //Schlussfolgerungen
|
||||
$reihung[6]=0; //Grundlagen der Elektrotechnik
|
||||
$reihung[7]=5; //Persönlichkeit
|
||||
$reihung[8]=6; //Englisch
|
||||
$reihung[10]=7; //Physik
|
||||
break;
|
||||
//BIWI
|
||||
case 10:$reihung[1]=2; //Algebra
|
||||
$reihung[2]=0; //Schaetzen
|
||||
$reihung[3]=0; //Funktionen
|
||||
$reihung[4]=1; //Schlussfolgerungen
|
||||
$reihung[6]=0; //Grundlagen der Elektrotechnik
|
||||
$reihung[7]=0; //Persönlichkeit
|
||||
$reihung[8]=3; //Englisch
|
||||
$reihung[10]=4; //Physik
|
||||
break;
|
||||
}
|
||||
for ($i=1;$i<11;$i++)
|
||||
{
|
||||
if (($i==5)||($i==9))
|
||||
$i++;
|
||||
$query = "update rt_gruppen set reihung=$reihung[$i] where id=$i";
|
||||
//echo $query.'<br>';
|
||||
$result = mysql_query($query, $dbh);
|
||||
}
|
||||
if ($stgid==10 && $susi=='true')
|
||||
{
|
||||
$query="UPDATE rt_gruppen SET zeit=30, faktor='-0.50', bezeichnung='Algebra' WHERE id=1;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query="UPDATE rt_gruppen SET zeit=10, faktor='-0.25', bezeichnung='Schaetzen' WHERE id=2;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query="UPDATE rt_gruppen SET zeit=15, faktor='-0.50', bezeichnung='Funktionen' WHERE id=3;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query="UPDATE rt_gruppen SET zeit=20, faktor='-0.15', bezeichnung='Schlussfolgerungen' WHERE id=4;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query="UPDATE rt_gruppen SET zeit=25, faktor='-0.50', bezeichnung='Grundlagen' WHERE id=6;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query="UPDATE rt_gruppen SET zeit=45, faktor='-0.00', bezeichnung='Persoenlichkeit' WHERE id=7;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query="UPDATE rt_gruppen SET zeit=40, faktor='-0.25', bezeichnung='Englisch' WHERE id=8;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query="UPDATE rt_gruppen SET zeit=30, faktor='-0.25', bezeichnung='Physik-Technik' WHERE id=10;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query="UPDATE rt_gruppen SET zeit=13, faktor='-0.50', bezeichnung='Algebra' WHERE id=1;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query="UPDATE rt_gruppen SET zeit=10, faktor='-0.25', bezeichnung='Schaetzen' WHERE id=2;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query="UPDATE rt_gruppen SET zeit=15, faktor='-0.50', bezeichnung='Funktionen' WHERE id=3;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query="UPDATE rt_gruppen SET zeit=20, faktor='-0.15', bezeichnung='Schlussfolgerungen' WHERE id=4;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query="UPDATE rt_gruppen SET zeit=25, faktor='-0.50', bezeichnung='Grundlagen' WHERE id=6;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query="UPDATE rt_gruppen SET zeit=45, faktor='-0.00', bezeichnung='Persoenlichkeit' WHERE id=7;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query="UPDATE rt_gruppen SET zeit=20, faktor='-0.25', bezeichnung='Englisch' WHERE id=8;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
$query="UPDATE rt_gruppen SET zeit=20, faktor='-0.25', bezeichnung='Physik-Technik' WHERE id=10;";
|
||||
$result = mysql_query($query, $dbh);
|
||||
}
|
||||
echo 'Datenbank wurde initialisiert!';
|
||||
mysql_close($dbh);
|
||||
?>
|
||||
@@ -0,0 +1,21 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>VileSci-ServerTests</TITLE>
|
||||
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<LINK rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
|
||||
</HEAD>
|
||||
<BODY class="background_main">
|
||||
<H2>VileSci ServerTests</H2>
|
||||
<UL>
|
||||
<LI><A href="php-info.php" class="linkblue">PHP-Info</A></LI>
|
||||
<LI><A href="pdftest/test.php" class="linkblue">PDF-Test</A></LI>
|
||||
<LI>
|
||||
<FORM name="mail" method="post" action="sendmail.php">
|
||||
Mail Verschicken an:
|
||||
<INPUT type="text" name="sendto" value="pam@technikum-wien.at">
|
||||
<INPUT type="submit" name="Abschicken" value="Go">
|
||||
</FORM>
|
||||
</LI>
|
||||
</UL>
|
||||
</BODY>
|
||||
</HTML>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
$fp = fopen("./bestell.pdf", "r");
|
||||
header("Content-type: application/pdf");
|
||||
fpassthru($fp);
|
||||
fclose($fp);
|
||||
?>
|
||||
@@ -0,0 +1,30 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Bestellschein</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$fp = fopen("bestell.pdf", "w");
|
||||
$pdf = pdf_open($fp);
|
||||
pdf_set_info_author($pdf, "Dodik Thomas");
|
||||
PDF_set_info_title($pdf, "Bestellung");
|
||||
PDF_set_info_author($pdf, "Thomas Dodik");
|
||||
pdf_set_info_creator($pdf, "PHP");
|
||||
pdf_set_info_subject($pdf, "Subject");
|
||||
PDF_begin_page($pdf, 595, 842);
|
||||
PDF_add_outline($pdf, "Page 1");
|
||||
pdf_set_font($pdf, "Times-Roman", 30, 4);
|
||||
pdf_set_text_rendering($pdf, 1);
|
||||
PDF_show_xy($pdf, "Times-Roman", 50, 750);
|
||||
pdf_moveto($pdf, 50, 740);
|
||||
pdf_lineto($pdf, 330,740);
|
||||
pdf_stroke($pdf);
|
||||
PDF_end_page($pdf);
|
||||
PDF_close($pdf);
|
||||
fclose($fp);
|
||||
?>
|
||||
<A HREF=../bestell_pdf_get.php>finished</A>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
$pdffilename = "clock.pdf";
|
||||
$radius = 200;
|
||||
$margin = 20;
|
||||
$pagecount = 40;
|
||||
|
||||
|
||||
$fp = fopen($pdffilename, "w");
|
||||
$pdf = pdf_open($fp);
|
||||
pdf_set_info_creator($pdf, "pdf_clock.php3");
|
||||
pdf_set_info_author($pdf, "Uwe Steinmann");
|
||||
pdf_set_info_title($pdf, "Analog Clock");
|
||||
|
||||
while($pagecount-- > 0) {
|
||||
pdf_begin_page($pdf, 2 * ($radius + $margin), 2 * ($radius + $margin));
|
||||
|
||||
pdf_set_transition($pdf, 4); /* wipe */
|
||||
pdf_set_duration($pdf, 0.5);
|
||||
|
||||
pdf_translate($pdf, $radius + $margin, $radius + $margin);
|
||||
pdf_save($pdf);
|
||||
pdf_setrgbcolor($pdf, 0.0, 0.0, 1.0);
|
||||
|
||||
/* minute strokes */
|
||||
pdf_setlinewidth($pdf, 2.0);
|
||||
for ($alpha = 0; $alpha < 360; $alpha += 6) {
|
||||
pdf_rotate($pdf, 6.0);
|
||||
pdf_moveto($pdf, $radius, 0.0);
|
||||
pdf_lineto($pdf, $radius-$margin/3, 0.0);
|
||||
pdf_stroke($pdf);
|
||||
}
|
||||
|
||||
pdf_restore($pdf);
|
||||
pdf_save($pdf);
|
||||
|
||||
/* 5 minute strokes */
|
||||
pdf_setlinewidth($pdf, 3.0);
|
||||
for ($alpha = 0; $alpha < 360; $alpha += 30) {
|
||||
pdf_rotate($pdf, 30.0);
|
||||
pdf_moveto($pdf, $radius, 0.0);
|
||||
pdf_lineto($pdf, $radius-$margin, 0.0);
|
||||
pdf_stroke($pdf);
|
||||
}
|
||||
|
||||
$ltime = getdate();
|
||||
|
||||
/* draw hour hand */
|
||||
pdf_save($pdf);
|
||||
pdf_rotate($pdf,-(($ltime['minutes']/60.0)+$ltime['hours']-3.0)*30.0);
|
||||
pdf_moveto($pdf, -$radius/10, -$radius/20);
|
||||
pdf_lineto($pdf, $radius/2, 0.0);
|
||||
pdf_lineto($pdf, -$radius/10, $radius/20);
|
||||
pdf_closepath($pdf);
|
||||
pdf_fill($pdf);
|
||||
pdf_restore($pdf);
|
||||
|
||||
/* draw minute hand */
|
||||
pdf_save($pdf);
|
||||
pdf_rotate($pdf,-(($ltime['seconds']/60.0)+$ltime['minutes']-15.0)*6.0);
|
||||
pdf_moveto($pdf, -$radius/10, -$radius/20);
|
||||
pdf_lineto($pdf, $radius * 0.8, 0.0);
|
||||
pdf_lineto($pdf, -$radius/10, $radius/20);
|
||||
pdf_closepath($pdf);
|
||||
pdf_fill($pdf);
|
||||
pdf_restore($pdf);
|
||||
|
||||
/* draw second hand */
|
||||
pdf_setrgbcolor($pdf, 1.0, 0.0, 0.0);
|
||||
pdf_setlinewidth($pdf, 2);
|
||||
pdf_save($pdf);
|
||||
pdf_rotate($pdf, -(($ltime['seconds'] - 15.0) * 6.0));
|
||||
pdf_moveto($pdf, -$radius/5, 0.0);
|
||||
pdf_lineto($pdf, $radius, 0.0);
|
||||
pdf_stroke($pdf);
|
||||
pdf_restore($pdf);
|
||||
|
||||
/* draw little circle at center */
|
||||
pdf_circle($pdf, 0, 0, $radius/30);
|
||||
pdf_fill($pdf);
|
||||
|
||||
pdf_restore($pdf);
|
||||
|
||||
pdf_end_page($pdf);
|
||||
}
|
||||
|
||||
$pdf = pdf_close($pdf);
|
||||
fclose($fp);
|
||||
echo "<A HREF=getpdf.php?filename=".$pdffilename.">finished</A>";
|
||||
?>
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
header("Content-type: application/pdf");
|
||||
$fp = fopen($filename, "r");
|
||||
fpassthru($fp);
|
||||
fclose($fp);
|
||||
?>
|
||||
Binary file not shown.
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
# $Id: hello.php,v 1.3.2.2 2002/01/22 19:48:48 tm Exp $
|
||||
|
||||
$p = PDF_new();
|
||||
PDF_open_file($p, "");
|
||||
|
||||
PDF_set_info($p, "Creator", "hello.php");
|
||||
PDF_set_info($p, "Author", "Rainer Schaaf");
|
||||
PDF_set_info($p, "Title", "Hello world (PHP)");
|
||||
|
||||
PDF_begin_page($p, 595, 842);
|
||||
|
||||
# Change "host" encoding to "winansi" or whatever you need!
|
||||
$font = PDF_findfont($p, "Helvetica-Bold", "host", 0);
|
||||
PDF_setfont($p, $font, 18.0);
|
||||
|
||||
PDF_set_text_pos($p, 50, 700);
|
||||
PDF_show($p, "Hello world!");
|
||||
PDF_continue_text($p, "(says PHP)");
|
||||
|
||||
PDF_end_page($p);
|
||||
PDF_close($p);
|
||||
|
||||
$buf = PDF_get_buffer($p);
|
||||
$len = strlen($buf);
|
||||
|
||||
header("Content-type: application/pdf");
|
||||
header("Content-Length: $len");
|
||||
header("Content-Disposition: inline; filename=hello.pdf");
|
||||
print $buf;
|
||||
|
||||
PDF_delete($p);
|
||||
?>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
# $id$
|
||||
|
||||
$p = PDF_new();
|
||||
PDF_open_file($p, "");
|
||||
|
||||
PDF_set_info($p, "Creator", "image.php");
|
||||
PDF_set_info($p, "Author", "Rainer Schaaf");
|
||||
PDF_set_info($p, "Title", "image sample (PHP)");
|
||||
|
||||
$imagefile = "nesrin.jpg";
|
||||
|
||||
$image = PDF_open_image_file($p, "jpeg", $imagefile, "", 0);
|
||||
if (!$image) {
|
||||
die("Couldn't open image ".$imagefile);
|
||||
}
|
||||
|
||||
# See the PDFlib manual for more advanced image size calculations
|
||||
$width = PDF_get_value($p, "imagewidth", $image);
|
||||
$height = PDF_get_value($p, "imageheight", $image);
|
||||
|
||||
# We generate a page with the image's dimensions
|
||||
PDF_begin_page($p, $width, $height);
|
||||
PDF_place_image($p, $image, 0, 0, 1);
|
||||
PDF_close_image($p, $image);
|
||||
PDF_end_page($p);
|
||||
|
||||
PDF_close($p);
|
||||
|
||||
$buf = PDF_get_buffer($p);
|
||||
$len = strlen($buf);
|
||||
|
||||
header("Content-type: application/pdf");
|
||||
header("Content-Length: $len");
|
||||
header("Content-Disposition: inline; filename=image.pdf");
|
||||
print $buf;
|
||||
|
||||
PDF_delete($p);
|
||||
?>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
$fp = fopen("test.pdf", "w");
|
||||
$pdf = pdf_open($fp);
|
||||
pdf_set_info_author($pdf, "Uwe Steinmann");
|
||||
pdf_set_info_title($pdf, "Test for PHP wrapper of PDFlib 2.0");
|
||||
pdf_set_info_author($pdf, "Name of Author");
|
||||
pdf_set_info_creator($pdf, "See Author");
|
||||
pdf_set_info_subject($pdf, "Testing");
|
||||
pdf_begin_page($pdf, 595, 842);
|
||||
pdf_add_outline($pdf, "Page 1");
|
||||
pdf_set_font($pdf, "Times-Roman", 30, 4);
|
||||
pdf_set_text_rendering($pdf, 1);
|
||||
pdf_show_xy($pdf, "Times Roman outlined", 50, 750);
|
||||
pdf_moveto($pdf, 50, 740);
|
||||
pdf_lineto($pdf, 330, 740);
|
||||
pdf_stroke($pdf);
|
||||
pdf_end_page($pdf);
|
||||
pdf_close($pdf);
|
||||
fclose($fp);
|
||||
echo "<A HREF=getpdf.php>finished</A>";
|
||||
?>
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
# $id$
|
||||
|
||||
$RADIUS = 200.0;
|
||||
$MARGIN = 20.0;
|
||||
|
||||
$p = PDF_new();
|
||||
|
||||
PDF_open_file($p, "");
|
||||
|
||||
PDF_set_info($p, "Creator", "pdfclock.php");
|
||||
PDF_set_info($p, "Author", "Rainer Schaaf");
|
||||
PDF_set_info($p, "Title", "PDF clock (PHP)");
|
||||
|
||||
PDF_begin_page($p, 2 * ($RADIUS + $MARGIN), 2 * ($RADIUS + $MARGIN));
|
||||
|
||||
PDF_translate($p, $RADIUS + $MARGIN, $RADIUS + $MARGIN);
|
||||
PDF_setcolor($p, "both", "rgb", 0.0, 0.0, 1.0, 0.0);
|
||||
PDF_save($p);
|
||||
|
||||
# minute strokes
|
||||
PDF_setlinewidth($p, 2.0);
|
||||
for ($alpha = 0; $alpha < 360; $alpha += 6)
|
||||
{
|
||||
PDF_rotate($p, 6.0);
|
||||
PDF_moveto($p, $RADIUS, 0.0);
|
||||
PDF_lineto($p, $RADIUS-$MARGIN/3, 0.0);
|
||||
PDF_stroke($p);
|
||||
}
|
||||
|
||||
PDF_restore($p);
|
||||
PDF_save($p);
|
||||
|
||||
# 5 minute strokes
|
||||
PDF_setlinewidth($p, 3.0);
|
||||
for ($alpha = 0; $alpha < 360; $alpha += 30)
|
||||
{
|
||||
PDF_rotate($p, 30.0);
|
||||
PDF_moveto($p, $RADIUS, 0.0);
|
||||
PDF_lineto($p, $RADIUS-$MARGIN, 0.0);
|
||||
PDF_stroke($p);
|
||||
}
|
||||
|
||||
$ltime = getdate();
|
||||
|
||||
# draw hour hand
|
||||
PDF_save($p);
|
||||
PDF_rotate($p, -(($ltime['minutes']/60.0)+$ltime['hours']-3.0)*30.0);
|
||||
PDF_moveto($p, -$RADIUS/10, -$RADIUS/20);
|
||||
PDF_lineto($p, $RADIUS/2, 0.0);
|
||||
PDF_lineto($p, -$RADIUS/10, $RADIUS/20);
|
||||
PDF_closepath($p);
|
||||
PDF_fill($p);
|
||||
PDF_restore($p);
|
||||
|
||||
# draw minute hand
|
||||
PDF_save($p);
|
||||
PDF_rotate($p, -(($ltime['seconds']/60.0)+$ltime['minutes']-15.0)*6.0);
|
||||
PDF_moveto($p, -$RADIUS/10, -$RADIUS/20);
|
||||
PDF_lineto($p, $RADIUS * 0.8, 0.0);
|
||||
PDF_lineto($p, -$RADIUS/10, $RADIUS/20);
|
||||
PDF_closepath($p);
|
||||
PDF_fill($p);
|
||||
PDF_restore($p);
|
||||
|
||||
# draw second hand
|
||||
PDF_setcolor($p, "both", "rgb", 1.0, 0.0, 0.0, 0.0);
|
||||
PDF_setlinewidth($p, 2);
|
||||
PDF_save($p);
|
||||
PDF_rotate($p, -(($ltime['seconds'] - 15.0) * 6.0));
|
||||
PDF_moveto($p, -$RADIUS/5, 0.0);
|
||||
PDF_lineto($p, $RADIUS, 0.0);
|
||||
PDF_stroke($p);
|
||||
PDF_restore($p);
|
||||
|
||||
# draw little circle at center
|
||||
PDF_circle($p, 0, 0, $RADIUS/30);
|
||||
PDF_fill($p);
|
||||
|
||||
PDF_restore($p);
|
||||
PDF_end_page($p);
|
||||
|
||||
PDF_close($p);
|
||||
|
||||
$buf = PDF_get_buffer($p);
|
||||
$len = strlen($buf);
|
||||
|
||||
header("Content-type: application/pdf");
|
||||
header("Content-Length: $len");
|
||||
header("Content-Disposition: inline; filename=pdfclock.pdf");
|
||||
print $buf;
|
||||
|
||||
PDF_delete($p);
|
||||
?>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
# $Id: personalize.php,v 1.6.2.2 2002/01/28 17:17:11 rp Exp $
|
||||
$col1 = 70;
|
||||
$col2 = 335;
|
||||
$infile = "PDFlib-purchase-order.pdf";
|
||||
|
||||
$p = PDF_new();
|
||||
|
||||
PDF_open_file($p, "");
|
||||
|
||||
PDF_set_info($p, "Creator", "personalize.php");
|
||||
PDF_set_info($p, "Author", "Thomas Merz");
|
||||
PDF_set_info($p, "Title", "PDFlib personalization demo (php)");
|
||||
|
||||
$form = PDF_open_pdi($p, $infile, "", 0);
|
||||
if (!$form) {
|
||||
die( "Couldn't open input file".$infile);
|
||||
}
|
||||
|
||||
$page = PDF_open_pdi_page($p, $form, 1, "");
|
||||
if (!$page) {
|
||||
die("Couldn't open page 1 in ".$infile);
|
||||
}
|
||||
|
||||
$font = PDF_findfont($p, "Helvetica-Bold", "host", 0);
|
||||
|
||||
# get the dimensions of the imported form
|
||||
$width = PDF_get_pdi_value($p, "width", $form, $page, 0);
|
||||
$height = PDF_get_pdi_value($p, "height", $form, $page, 0);
|
||||
|
||||
PDF_begin_page($p, $width, $height);
|
||||
PDF_place_pdi_page($p, $page, 0, 0, 1, 1);
|
||||
PDF_close_pdi_page($p, $page);
|
||||
|
||||
PDF_setfont($p, $font, 18);
|
||||
PDF_set_value($p, "leading", 24);
|
||||
PDF_set_text_pos($p, $col1, 486);
|
||||
|
||||
PDF_show($p, "Doublecheck, Inc.");
|
||||
PDF_continue_text($p, "Petra Porst");
|
||||
PDF_continue_text($p, "500, Market St.");
|
||||
PDF_continue_text($p, "94110 San Francisco, CA");
|
||||
PDF_continue_text($p, "");
|
||||
PDF_continue_text($p, "USA");
|
||||
PDF_continue_text($p, "+1/950/123-4567");
|
||||
PDF_continue_text($p, "+1/950/123-4568");
|
||||
PDF_continue_text($p, "");
|
||||
PDF_continue_text($p, "petra\@doublecheck.com");
|
||||
|
||||
$datestr = date("j M Y");
|
||||
PDF_set_text_pos($p, $col2, 104);
|
||||
PDF_continue_text($p, $datestr);
|
||||
|
||||
PDF_end_page($p);
|
||||
PDF_close($p);
|
||||
PDF_close_pdi($p, $form);
|
||||
|
||||
$buf = PDF_get_buffer($p);
|
||||
$len = strlen($buf);
|
||||
|
||||
header("Content-type: application/pdf");
|
||||
header("Content-Length: $len");
|
||||
header("Content-Disposition: inline; filename=pdfclock_php.pdf");
|
||||
print $buf;
|
||||
|
||||
PDF_delete($p);
|
||||
?>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
# $Id: quickreference.php,v 1.6.2.3 2002/06/14 14:59:53 rp Exp $
|
||||
|
||||
$infile = "PDFlib-manual.pdf";
|
||||
$maxrow = 2;
|
||||
$maxcol = 2;
|
||||
$pagecount = 4;
|
||||
$width = 500.0;
|
||||
$height = 770.0;
|
||||
$startpage = 132;
|
||||
$endpage = 135;
|
||||
|
||||
$p = PDF_new();
|
||||
|
||||
PDF_open_file($p, "");
|
||||
|
||||
PDF_set_info($p, "Creator", "quickreference.php");
|
||||
PDF_set_info($p, "Author", "Thomas Merz");
|
||||
PDF_set_info($p, "Title", "mini imposition demo (php)");
|
||||
|
||||
$manual = PDF_open_pdi($p, $infile, "", 0);
|
||||
if (!$manual) {
|
||||
die("Couldn't open input file ".$infile);
|
||||
}
|
||||
|
||||
$row = 0;
|
||||
$col = 0;
|
||||
|
||||
for ($pageno = $startpage; $pageno <= $endpage; $pageno++) {
|
||||
if ($row == 0 && $col == 0) {
|
||||
PDF_begin_page($p, $width, $height);
|
||||
$font = PDF_findfont($p, "Helvetica-Bold", "host", 0);
|
||||
PDF_setfont($p, $font, 18);
|
||||
PDF_set_text_pos($p, 25, $height-24);
|
||||
PDF_show($p, "PDFlib 4.0 Quick Reference");
|
||||
}
|
||||
|
||||
$page = PDF_open_pdi_page($p, $manual, $pageno, "");
|
||||
|
||||
if (!$page) {
|
||||
die("Couldn't open page $pageno in $infile.\n");
|
||||
}
|
||||
|
||||
PDF_place_pdi_page($p, $manual, $width/$maxcol*$col, $height - ($row + 1)
|
||||
* $height/$maxrow, 1/$maxrow, 1/$maxrow);
|
||||
PDF_close_pdi_page($p, $page);
|
||||
|
||||
$col++;
|
||||
if ($col == $maxcol) {
|
||||
$col = 0;
|
||||
$row++;
|
||||
}
|
||||
if ($row == $maxrow) {
|
||||
$row = 0;
|
||||
PDF_end_page($p);
|
||||
}
|
||||
}
|
||||
|
||||
# finish the last partial page
|
||||
if ($row != 0 || $col != 0) {
|
||||
PDF_end_page($p);
|
||||
}
|
||||
|
||||
PDF_close($p);
|
||||
PDF_close_pdi($p, $manual);
|
||||
|
||||
$buf = PDF_get_buffer($p);
|
||||
$len = strlen($buf);
|
||||
|
||||
header("Content-type: application/pdf");
|
||||
header("Content-Length: $len");
|
||||
header("Content-Disposition: inline; filename=hello_php.pdf");
|
||||
print $buf;
|
||||
|
||||
PDF_delete($p);
|
||||
?>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
# $Id: hello.php,v 1.3.2.2 2002/01/22 19:48:48 tm Exp $
|
||||
|
||||
$p = PDF_new();
|
||||
PDF_open_file($p, "");
|
||||
|
||||
PDF_set_info($p, "Creator", "PDF-LIB");
|
||||
PDF_set_info($p, "Author", "Christian Paminger");
|
||||
PDF_set_info($p, "Title", "TEST (PHP)");
|
||||
|
||||
PDF_begin_page($p, 595, 842);
|
||||
|
||||
# Change "host" encoding to "winansi" or whatever you need!
|
||||
$font = PDF_findfont($p, "Courier", "host", 0);
|
||||
PDF_setfont($p, $font, 10.0);
|
||||
|
||||
PDF_set_text_pos($p, 50, 700);
|
||||
PDF_show($p, "Kalender");
|
||||
PDF_continue_text($p, "(says PHP)");
|
||||
|
||||
PDF_end_page($p);
|
||||
PDF_close($p);
|
||||
|
||||
$buf = PDF_get_buffer($p);
|
||||
$len = strlen($buf);
|
||||
|
||||
header("Content-type: application/pdf");
|
||||
header("Content-Length: $len");
|
||||
header("Content-Disposition: inline; filename=hello.pdf");
|
||||
print $buf;
|
||||
|
||||
PDF_delete($p);
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
//Header("WWW-Authenticate: Basic realm=\"My Realm\"");
|
||||
unset($PHP_AUTH_USER);
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
phpinfo();
|
||||
?>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
ini_set(sendmail_from, "pam@technikum-wien.at");
|
||||
if (!mail($sendto,"Test","Dies ist ein Test","From: pam@technikum-wien.at\r\n"."Reply-To: webmaster@technikum-wien.at\r\n"))
|
||||
die ("Mail konnte nicht verschickt werden!");
|
||||
else
|
||||
die ("Mail wurde an $sendto verschickt! [PHP]");
|
||||
?>
|
||||
Reference in New Issue
Block a user