|
1 <?php |
|
2 /***************************************************************************** |
|
3 * Copyright (C) 2019 |
|
4 * |
|
5 * Michiel Broek <mbroek at mbse dot eu> |
|
6 * |
|
7 * This file is part of ThermFerm |
|
8 * |
|
9 * This is free software; you can redistribute it and/or modify it |
|
10 * under the terms of the GNU General Public License as published by the |
|
11 * Free Software Foundation; either version 2, or (at your option) any |
|
12 * later version. |
|
13 * |
|
14 * ThermFerm is distributed in the hope that it will be useful, but |
|
15 * WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
17 * General Public License for more details. |
|
18 * |
|
19 * You should have received a copy of the GNU General Public License |
|
20 * along with ThermFerm; see the file COPYING. If not, write to the Free |
|
21 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
|
22 *****************************************************************************/ |
|
23 |
|
24 /* |
|
25 * Look for the style names in the jqwidgets/styles directory. |
|
26 */ |
|
27 $my_style = 'ui-darkness'; |
|
28 if (file_exists('/srv/http/streamer')) { |
|
29 shell_exec('/srv/http/streamer start'); |
|
30 } else if (file_exists('/var/www/streamer')) { |
|
31 shell_exec('/var/www/streamer start'); |
|
32 } else { |
|
33 exit; |
|
34 } |
|
35 sleep(1); |
|
36 ?> |
|
37 |
|
38 <!DOCTYPE html> |
|
39 <html> |
|
40 <head> |
|
41 <meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
|
42 <title>ThermFerm - Web Camera</title> |
|
43 <link type="text/css" href="css/webcam.css" rel="stylesheet" media="all" /> |
|
44 <link type="text/css" href="jqwidgets/styles/jqx.base.css" rel="stylesheet" /> |
|
45 <link type="text/css" href="jqwidgets/styles/jqx.<?php echo $my_style; ?>.css" rel="stylesheet" /> |
|
46 <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" /> |
|
47 <script> |
|
48 var theme = "<?php echo $my_style; ?>"; |
|
49 </script> |
|
50 <script src="js/jquery-2.1.1.min.js"></script> |
|
51 <script src="jqwidgets/jqxcore.js"></script> |
|
52 <script src="jqwidgets/jqxwindow.js"></script> |
|
53 <script src="jqwidgets/jqxbuttons.js"></script> |
|
54 <script src="js/webcam.js"></script> |
|
55 </head> |
|
56 <body class="default"> |
|
57 <div id="jqxWidget"> |
|
58 <div id="content"> |
|
59 |
|
60 <div id="camera_display"> |
|
61 <div id="streamwrap" class="xform-p"> |
|
62 <img id="streamimage" class="xform" src="<?php echo "http://".$_SERVER['SERVER_NAME'].":8090/?action=stream"; ?>" /> |
|
63 </div> |
|
64 </div> |
|
65 |
|
66 <div id="camera_controls"> |
|
67 <table style="width: 100%; padding: 10px;"> |
|
68 <tr> |
|
69 <td> |
|
70 <input style="float: left; margin-left: 144px;" type="button" id="rotate" /> |
|
71 <input style="float: left; margin-left: 5px;" type="button" id="mirror" /> |
|
72 <input style="float: left; margin-left: 5px;" type="button" id="flip" /> |
|
73 </td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td> |
|
77 <div id="camera_panel_buttons"> |
|
78 <input style="margin-top: 50px; margin-left: 160px;" type="button" id="Close" value="Sluiten" /> |
|
79 </div> |
|
80 </td> |
|
81 </tr> |
|
82 </table> |
|
83 </div> |
|
84 </div> |
|
85 </div> <!-- jqxWidget --> |
|
86 </body> |
|
87 </html> |