-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCardGenerator.php
61 lines (43 loc) · 1.82 KB
/
CardGenerator.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
<?php
require_once("qrlib.php");
require_once("qrcodegenerator.php");
class BCard
{
$firstname=$_POST["firstname"];
$lastname=$_POST["lastname"];
$address=$_POST["address"];
$title=$_POST["title"];
$company=$_POST["company"];
$email=$_POST["email"];
$website=$_POST["website"];
$phonenumber=$_POST["phonenumber"];
public $template = 1 ;
QrCodeForCard();
$logopath = $this->qrCodePath;
if($this->template == 1){
$font = 'Starjout.ttf';
$firstname = imagecolorallocate($im, 100, 100, 100);
$lastname = imagecolorallocate($im, 220, 100, 200);
$company = imagecolorallocate($im, 220, 100, 200);
$phonenumber = imagecolorallocate($im, 250, 200, 200);
$email = imagecolorallocate($im, 100, 100, 100);
$website = imagecolorallocate($im, 220, 100, 200);
$title = imagecolorallocate($im, 220, 100, 200);
}
else{
$firstname = imagecolorallocate($im, 100, 100, 100);
$lastname = imagecolorallocate($im, 220, 100, 200);
$company = imagecolorallocate($im, 220, 100, 200);
$phonenumber = imagecolorallocate($im, 250, 200, 200);
$email = imagecolorallocate($im, 100, 100, 100);
$website = imagecolorallocate($im, 220, 100, 200);
$title = imagecolorallocate($im, 220, 100, 200);
}
$image = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($image, 233, 14, 91);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($image,5,5,1,'A Simple Text String',$text_color);
header("Content-Type: image/jpeg");
imagejpeg($image);
}
?>