-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
41 lines (41 loc) · 1.02 KB
/
index.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
<?php
//this is example, to use the fancytext function
include('fancytext.php');
if(isset($_GET['t']) && !empty($_GET['t'])){
$text = $_GET['t'];
} else {
$text = 'type text here';
}
if(isset($_GET['k']) && !empty($_GET['t'])){
$type = $_GET['k'];
} else {
$type = 0;
}
$ft = fancytext($type, $text);
$fontname = $ft[2];
$result = nl2br($ft[1]);
$fontlist = '';
for($i=0;$i<count($fontname);$i++){
if($i != $type){
$fontlist .= "<option value='$i'>$fontname[$i]</option>";
} else {
$fontlist .= "<option selected value='$i'>$fontname[$i]</option>";
}
}
?>
<html>
<head>
<title>fancy text generator</title>
<meta name="viewport" content="width=device-width,height=device-height, initial-scale=1.0, maximum-scale=1.0">
</head>
<body>
<form>
<div style="user-select: all;"><?php print $result; ?></div>
<textarea name='t'><?php print $text; ?></textarea><br />
<select name='k'>
<?php echo $fontlist;?>
</select>
<input type='submit' />
</form>
</body>
</html>