PluginProbe
VdoCipher: Secure Video Player and Hosting / 1.25
VdoCipher: Secure Video Player and Hosting v1.25
trunk 1.10 1.11 1.12 1.13 1.14 1.15 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 1.29 1.3 1.30 1.4 1.5 1.6 All 28 releases
vdocipher / include / options.php

options.php in VdoCipher: Secure Video Player and Hosting 1.25, at include/options.php

209 lines 8.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) {
3 header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
4 exit("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n<html><head>\r\n<title>404 Not Found</title>\r\n".
5 "</head><body>\r\n<h1>Not Found</h1>\r\n<p>The requested URL " . $_SERVER['SCRIPT_NAME'] . " was not found on ".
6 "this server.</p>\r\n</body></html>");
7 }
8 ?>
9
10 <div class="wrap">
11 <h2>VdoCipher Options</h2>
12
13 <form name="vdoOptionForm" method="post" action="options.php">
14 <?php
15 settings_fields('vdo_option-group');
16 do_settings_sections('vdo_option-group');
17 ?>
18 <div class="updated">
19 <p><strong>Status : </strong> Ready to use. You can now embed your videos inside posts and pages.</p>
20 </div>
21 <table class="form-table">
22 <tr valign="top">
23 <th scope="row">API Secret Key</th>
24 <td>
25 <div style="display: inline-flex;">
26 <input type="password" name="vdo_client_key"
27 value="<?php echo esc_attr(get_option('vdo_client_key')); ?>"
28 max-length="64" style="width: 640px" id="vdo_client_key" />
29 <p style="margin-left:20px; position: relative">
30 <span id="toggle_span">
31 <button id="toggle_API_visibility" href="#" data-protected="On">Show API Secret Key</button>
32 </span>
33 </p>
34 </div>
35 </td>
36 </tr>
37
38 <tr valign="top">
39 <th scope="row">Default Width</th>
40 <td><input type="text" id="vdo_default_width" name="vdo_default_width"
41 value="<?php echo esc_attr(get_option('vdo_default_width')); ?>"
42 /></td>
43 </tr>
44
45 <tr valign="top">
46 <th scope="row">Default Height</th>
47 <td><input type="text" id="vdo_default_height" name="vdo_default_height"
48 value="<?php echo esc_attr(get_option('vdo_default_height')); ?>"
49 /></td>
50 </tr>
51
52 <!-- Version Number -->
53 <?php
54 if ((get_option('vdo_embed_version')) == false) {
55 update_option('vdo_embed_version', VDOCIPHER_PLAYER_VERSION);
56 }
57 ?>
58 <tr valign="top">
59 <th scope="row">Player Version</th>
60 <td>
61 <div style="display: inline-flex">
62 <select id="vdo_embed_version">
63 <?php
64 $vdo_embed_version_vars = array(
65 '0.5', '1.0.0', '1.1.0', '1.1.3', '1.2.7', '1.3.3', '1.4.5','1.5.0','1.6.4','1.6.10'
66 );
67 $vdo_embed_version_string = get_option('vdo_embed_version');
68 foreach ($vdo_embed_version_vars as $vdo_embed_version_var) {
69 if ($vdo_embed_version_string == $vdo_embed_version_var) {
70 $selected = 'selected';
71 } else {
72 $selected = '';
73 }
74 switch ($vdo_embed_version_var) {
75 case '0.5':
76 $version_old_new = ' (old player)';
77 break;
78 case VDOCIPHER_PLAYER_VERSION:
79 $version_old_new = ' (newest player)' ;
80 break;
81 default:
82 $version_old_new = ' (new player)';
83 break;
84 }
85 ?>
86 <option value="<?php echo $vdo_embed_version_var; ?>" <?php echo $selected; ?> >
87 <?php echo $vdo_embed_version_var . $version_old_new ; ?>
88 </option>
89 <?php } ?>
90 <option value="Custom Version">
91 <?php echo 'Custom Version' ?>
92 </option>
93 </select>
94 <input type="text" name="vdo_embed_version"
95 id="vdo_custom_version"
96 style="margin-left:20px; position: relative; width:120px;" />
97 </div>
98 <p class="description">It is recommended that you use the latest player version for best video playback.</p>
99 </td>
100 </tr>
101
102 <!-- Player Theme Options -->
103 <?php
104 if (!(get_option('vdo_player_theme'))) {
105 update_option('vdo_player_theme', '9ae8bbe8dd964ddc9bdb932cca1cb59a');
106 }
107 ?>
108 <tr valign="top">
109 <th scope="row">Player Theme</th>
110 <td>
111 <div style="display:inline-flex; margin-bottom:10px;">
112 <input
113 type="text"
114 name="vdo_player_theme"
115 value="<?php echo esc_attr(get_option('vdo_player_theme')); ?>"
116 max-length = "32"
117 style="width: 320px"
118 readonly
119 />
120 <p style="margin-left:20px; position: relative">
121 <span><a href="<?php menu_page_url('themesvdo', 1); ?> " >Select Custom Player Theme</a><br/>
122 </p>
123 </div>
124 <p class="description">
125 Player theme is not available for old player version(0.5). The default theme will be applied for old player.
126 </p>
127
128 </td>
129 </tr>
130 <!-- Player Theme Options end-->
131
132 <!-- Player Watermark option - Flash/ HTML5 starts -->
133 <tr id="vdo_watermark_html_flash" valign="top">
134 <th scope="row"> Choice of Watermark </th>
135 <td>
136 <?php
137 if ((get_option('vdo_watermark_flash_html') == 'html5')) {
138 $vdocheckedhtml5 = 'checked';
139 $vdocheckedflash = '';
140 } elseif ((get_option('vdo_watermark_flash_html') == 'flash')) {
141 $vdocheckedhtml5 = '';
142 $vdocheckedflash = 'checked';
143 }
144 ?>
145 <input type="radio" class="vdo-htmlflash"
146 value="html5" name="vdo_watermark_flash_html"
147 id="vdo_html5" <?php echo $vdocheckedhtml5; ?> >
148 <label for="vdo_html5">HTML5 (Overlay)</label>
149 &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
150 <input type="radio" class="vdo-htmlflash"
151 value="flash" name="vdo_watermark_flash_html"
152 id="vdo_flash" <?php echo $vdocheckedflash; ?> >
153 <label for="vdo_flash">Flash (Hard-Coded)</label>
154 </td>
155 </tr>
156 <!-- Player Watermark option - Flash/ HTML5 ends -->
157 <tr valign="top">
158 <th scope="row">Annotation Statement</th>
159 <td>
160 <div style="display: inline-flex;">
161 <textarea name="vdo_annotate_code" id="vdo_watermarkjson"
162 type="textarea" rows="6" cols="55" style="display: float-left"
163 ><?php
164 if (get_option('vdo_annotate_code') != "") {
165 echo get_option('vdo_annotate_code');
166 $vdo_annotation_code = get_option('vdo_annotate_code');
167 }
168 ?></textarea>
169 <p class="description" style="margin-left:20px; position: relative">
170 <span style="color:purple"><b>Sample Code for Dynamic Watermark</b></span><br/>
171 [{'type':'rtext', 'text':' {name}', 'alpha':'0.60', 'color':'0xFF0000','size':'15','interval':'5000'}] <br/>
172 <span style="color:purple"><b>Sample Code for Static Watermark</b></span><br/>
173 [{'type':'text', 'text':'{ip}', 'alpha':'0.5' , 'x':'10', 'y':'100', 'color':'0xFF0000', 'size':'12'}] <br/>
174 </p>
175 </div>
176 <p class="description" id="vdojsonvalidator"></p>
177 <p class="description">
178 Leave this text blank in case you do not need watermark over all
179 videos. For details on writing the annotation code
180 <a href="https://www.vdocipher.com/blog/2014/12/add-text-to-videos-with-watermark/" target="_blank">
181 check this out
182 </a>
183 </p>
184 </td>
185 </tr>
186 <tr style="display:none;">
187 <td>Plugin version no.: </td>
188 <td><input
189 id="vdo_plugin_version" name="vdo_plugin_version"
190 value="<?php echo esc_attr(get_option('vdo_plugin_version')); ?>" readonly>
191 </td>
192 </tr>
193 </table>
194 <?php
195 wp_enqueue_script('vdo_validate_watermark', plugin_dir_url(__FILE__).'js/validatewatermark.js');
196 wp_localize_script('vdo_validate_watermark', 'vdoValidateWatermark', array(
197 'vdoWatermark' => $vdo_annotation_code
198 ));
199 wp_enqueue_script('vdo_html_flash_choice', plugin_dir_url(__FILE__).'js/flashhtml5choice.js');
200 wp_enqueue_script('vdo_hide_key', plugin_dir_url(__FILE__).'js/showkey.js');
201 wp_localize_script('vdo_html_flash_choice', 'vdoVD', array(
202 'vdoAV' => $vdo_embed_version_vars,
203 'vdoSV' => $vdo_embed_version_string
204 ));
205 ?>
206 <?php submit_button(); ?>
207 </form>
208 </div>
209