Countdown Timer – Widget Countdown - Version 1.0.0

Version Description

  • Initial version.

=

Download this release

Release Info

Developer wpdevart
Plugin Icon 128x128 Countdown Timer – Widget Countdown
Version 1.0.0
Comparing to
See all releases

Version 1.0.0

images/featured_plugins/coming_soon.jpg ADDED
Binary file
images/featured_plugins/countdown.jpg ADDED
Binary file
images/featured_plugins/facebook.jpg ADDED
Binary file
images/featured_plugins/lightbox.png ADDED
Binary file
images/featured_plugins/poll.png ADDED
Binary file
images/featured_plugins/twitter.png ADDED
Binary file
images/featured_plugins/youtube.png ADDED
Binary file
images/loading.gif ADDED
Binary file
images/post_button.jpg ADDED
Binary file
images/post_example.jpg ADDED
Binary file
images/remove_element.png ADDED
Binary file
images/success.png ADDED
Binary file
images/timer.png ADDED
Binary file
images/widget_example.jpg ADDED
Binary file
includes/admin_menu.php ADDED
@@ -0,0 +1,526 @@
1
+ <?php
2
+ class wpdevart_countdown_admin_menu{
3
+
4
+ private $menu_name;
5
+ private $databese_parametrs;
6
+ private $plugin_url;
7
+ private $text_parametrs;
8
+
9
+ function __construct($param){
10
+
11
+ $this->menu_name=$param['menu_name'];
12
+ $this->databese_parametrs=$param['databese_parametrs'];
13
+ if(isset($params['plugin_url']))
14
+ $this->plugin_url=$params['plugin_url'];
15
+ else
16
+ $this->plugin_url=trailingslashit(dirname(plugins_url('',__FILE__)));
17
+
18
+
19
+ // post page insert button
20
+ add_action('media_buttons_context', array($this,'wpdevart_countdown_button'));
21
+ add_action( 'wp_ajax_wpdevart_countdown_window_manager', array($this,'wpdevart_countdown_window_insert_content') );
22
+
23
+ add_action( 'wp_ajax_wpdevart_countdown_page_save', array($this,'save_in_databese') );
24
+ add_action( 'wp_ajax_wpdevart_countdown_send_mail', array($this,'sending_mail') );
25
+ }
26
+ /*############################### post page insert button ########################################*/
27
+ public function wpdevart_countdown_button($context) {
28
+
29
+ $img = $this->plugin_url. 'images/post_button.jpg';
30
+
31
+ $title = 'Add Countdown';
32
+ $context .= '<a class="button thickbox" title="Create countdown and insert in posts/pages" href="'.admin_url("admin-ajax.php").'?action=wpdevart_countdown_window_manager&height=750&width=640">
33
+ <span class="wp-media-buttons-icon" style="background: url('.$img.'); background-repeat: no-repeat; background-position: left bottom;"></span>
34
+ Add Countdown
35
+ </a>';
36
+ return $context;
37
+ }
38
+ public function wpdevart_countdown_window_insert_content(){
39
+ //wp_enqueue_script('jquery-ui-slider');
40
+ ?>
41
+ <style>
42
+ #miain_wpdevart_countdown_window_manager > tbody > tr:nth-child(odd) {
43
+ background-color: rgba(176, 176, 176, 0.07);
44
+ }
45
+ #miain_wpdevart_countdown_window_manager>tfoot>tr>td{
46
+ border-top:1px solid #ccc;
47
+ }
48
+ #TB_window{
49
+ overflow-y: auto;
50
+ }
51
+ #TB_ajaxContent{
52
+ width:95% !important;
53
+ }
54
+ .wp-picker-holder{
55
+ position: absolute;
56
+ z-index: 100000;
57
+ }
58
+ .desription_class{
59
+ float: right;
60
+ cursor: default;
61
+ color: #0074a2;
62
+ font-size: 18px;
63
+ font-weight: bold;
64
+ border: 1px solid #000000;
65
+ border-radius: 200px;
66
+ height: 20px;
67
+ padding-left: 6px;
68
+ padding-right: 6px;
69
+ margin-left: 15px;
70
+ }
71
+ .pro_feature {
72
+ font-size: 13px;
73
+ font-weight: bold;
74
+ color: rgba(10, 154, 62, 1);
75
+ }
76
+ </style>
77
+ <table id="miain_wpdevart_countdown_window_manager" class="wp-list-table widefat fixed posts section_parametrs_table">
78
+ <tbody>
79
+ <tr>
80
+ <td>
81
+ Day field text <span title="Type here Day field text." class="desription_class">?</span>
82
+ </td>
83
+ <td>
84
+ <input type="text" name="countdown_days_text" id="countdown_days_text" value="Days">
85
+ </td>
86
+ </tr>
87
+ <tr>
88
+ <td>
89
+ Hour field text <span title="Type here Hour field text." class="desription_class">?</span>
90
+ </td>
91
+ <td>
92
+ <input type="text" name="countdown_hourse_text" id="countdown_hourse_text" value="Hours">
93
+ </td>
94
+ </tr>
95
+ <tr>
96
+ <td>
97
+ Minute field text <span title="Type here Minute field text." class="desription_class">?</span>
98
+ </td>
99
+ <td>
100
+ <input type="text" name="countdown_minuts_text" id="countdown_minuts_text" value="Minutes">
101
+ </td>
102
+ </tr>
103
+ <tr>
104
+ <td>
105
+ Second field text <span title="Type here Second field text." class="desription_class">?</span>
106
+ </td>
107
+ <td>
108
+ <input type="text" name="countdown_seconds_text" id="countdown_seconds_text" value="Seconds">
109
+ </td>
110
+ </tr>
111
+ <tr>
112
+ <td>
113
+ Countdown expire time <span title="Type the Countdown expire time." class="desription_class">?</span>
114
+ </td>
115
+ <td style="vertical-align: top !important;">
116
+ <span style="display:inline-block; margin-right:3px; width:55px;">
117
+ <input type="text" placeholder="Day" id="countdownday" size="3" value="0"/>
118
+ <small style="display:block">Day</small>
119
+ </span>
120
+ <span style="display:inline-block; width:55px;">
121
+ <input type="text" placeholder="Hour" id="countdownhour" size="3" value="1"/>
122
+ <small>Hour</small>
123
+ </span>
124
+ <span style="display:inline-block; width:55px;">
125
+ <input type="text" placeholder="Minut" id="countdownminute" size="3" value="1"/>
126
+ <small>minute</small>
127
+ </span>
128
+ <input type="hidden" value='<?php echo mktime (date("H"), date("i"), date("s"),date("n"), date("j"),date("Y")); ?>' id="countdown_start_date" name="countdown_start_date" />
129
+ </td>
130
+ </tr>
131
+ <tr>
132
+ <td>
133
+ <span style="color:red">After Countdown expired</span> <span title="Select the action after Countdown time expired." class="desription_class">?</span>
134
+ </td>
135
+ <td>
136
+ <select id="countdownstart_on" >
137
+ <option selected="selected" value="hide">Hide countdown</option>
138
+ <option value="show_text">Show text</option>
139
+ </select>
140
+ </td>
141
+ </tr>
142
+ </tr>
143
+ <tr>
144
+ <td>
145
+ Message after countdown expired<span title="Type the message after countdown expired. " class="desription_class">?</span>
146
+ </td>
147
+ <td>
148
+ <textarea type="text" name="expeiret_text" id="expeiret_text"></textarea>
149
+ </td>
150
+ </tr>
151
+ <tr>
152
+ <td>
153
+ Countdown timer position <span title="Select the Countdown position." class="desription_class">?</span>
154
+ </td>
155
+ <td>
156
+ <select id="countdown_in_content_position">
157
+ <option value="left">Left</option>
158
+ <option selected="selected" value="center">Center</option>
159
+ <option value="right">Right</option>
160
+ </select>
161
+ </td>
162
+ </tr>
163
+ <tr>
164
+ <td>
165
+ Distance from top <span title="Type the Countdown distance from top." class="desription_class">?</span>
166
+ </td>
167
+ <td>
168
+ <input type="text" name="countdown_top_distance" id="countdown_top_distance" value="10">(Px)
169
+ </td>
170
+ </tr>
171
+ <tr>
172
+ <td>
173
+ Distance from bottom <span title="Type the Countdown distance from bottom." class="desription_class">?</span>
174
+ </td>
175
+ <td>
176
+ <input type="text" name="countdown_bottom_distance" id="countdown_bottom_distance" value="10">(Px)
177
+ </td>
178
+ </tr>
179
+ <tr>
180
+ <td>
181
+ Countdown timer Buttons type<span class="pro_feature"> (pro)</span> <span title="Select the Countdown buttons type." class="desription_class">?</span>
182
+ </td>
183
+ <td>
184
+ <select onChange="alert(countdown_pro_text)" id="countdown_type" class="coming_set_hiddens">
185
+ <option selected="selected" value="button">button</option>
186
+ <option value="circle">Circle</option>
187
+ <option value="vertical_slide">Vertical Slider</option>
188
+ </select>
189
+ </td>
190
+ </tr>
191
+
192
+ <tr class="tr_button tr_circle tr_vertical_slide">
193
+ <td>
194
+ Countdown timer text color<span class="pro_feature"> (pro)</span> <span title="Choose the Countdown text color." class="desription_class">?</span>
195
+ </td>
196
+ <td>
197
+ <div onClick="alert(countdown_pro_text)">
198
+ <div class="wp-picker-container"><a tabindex="0" class="wp-color-result" title="Select Color" data-current="Current Color" style="background-color: rgb(0, 0, 0);"></a></div>
199
+ </div>
200
+ </td>
201
+ </tr>
202
+ <tr class="tr_button tr_circle tr_vertical_slide">
203
+ <td>
204
+ Countdown timer background color<span class="pro_feature"> (pro)</span> <span title=" Choose the Countdown background color." class="desription_class">?</span>
205
+ </td>
206
+ <td>
207
+ <div onClick="alert(countdown_pro_text)">
208
+ <div class="wp-picker-container"><a tabindex="0" class="wp-color-result" title="Select Color" data-current="Current Color" style="background-color: rgb(62, 89, 165);"></a></div>
209
+ </div>
210
+ </td>
211
+ </tr>
212
+ <tr class="tr_circle">
213
+ <td>
214
+ Countdown timer Size<span class="pro_feature"> (pro)</span> <span title="Type the Countdown size." class="desription_class">?</span>
215
+ </td>
216
+ <td>
217
+ <input onClick="alert(countdown_pro_text)" type="text" name="countdown_circle_size" id="countdown_circle_size" value="130">(Px)
218
+ </td>
219
+ </tr>
220
+
221
+ <tr class="tr_circle">
222
+ <td>
223
+ Countdown timer border width<span class="pro_feature"> (pro)</span> <span title="Type the Countdown border width." class="desription_class">?</span>
224
+ </td>
225
+ <td>
226
+ <input onClick="alert(countdown_pro_text)" type="text" size="3" name="countdown_circle_border" value="5" id="countdown_circle_border" style="font-weight:bold; width:35px" >(0-100)%
227
+
228
+ </td>
229
+ </tr>
230
+ <tr class="tr_button">
231
+ <td>
232
+ Countdown timer border radius<span class="pro_feature"> (pro)</span> <span title="Type the Countdown border radius." class="desription_class">?</span>
233
+ </td>
234
+ <td>
235
+ <input onClick="alert(countdown_pro_text)" type="text" name="countdown_border_radius" id="countdown_border_radius" value="8">(Px)
236
+ </td>
237
+ </tr>
238
+ <tr class="tr_button tr_vertical_slide">
239
+ <td>
240
+ Countdown timer font-size<span class="pro_feature"> (pro)</span> <span title="Type the Countdown font-size." class="desription_class">?</span>
241
+ </td>
242
+ <td>
243
+ <input onClick="alert(countdown_pro_text)" type="text" name="countdown_font_size" id="countdown_font_size" value="30">(Px)
244
+ </td>
245
+ </tr>
246
+
247
+ <tr class="tr_button tr_circle tr_vertical_slide">
248
+ <td>
249
+ Countdown timer Font family<span class="pro_feature"> (pro)</span> <span title="Choose the Countdown Font family." class="desription_class">?</span>
250
+ </td>
251
+ <td>
252
+ <?php wpdevart_countdown_setting::generete_fonts('countdown_font_famaly',"monospace") ?>
253
+ </td>
254
+ </tr>
255
+ <tr>
256
+ <td>
257
+ Countdown animation type<span class="pro_feature"> (pro)</span> <span title="Choose the Countdown animation type." class="desription_class">?</span>
258
+ </td>
259
+ <td>
260
+ <?php wpdevart_countdown_setting::generete_animation_select('countdown_animation_type','none'); ?>
261
+ </td>
262
+ </tr>
263
+ </tbody>
264
+ <tfoot>
265
+ <tr>
266
+ <td colspan="2">
267
+ <div style="display:inline-block; float:left;" class="mceActionPanel"><input type="button" id="cancel" name="cancel" value="Insert Countdown" class="button button-primary" onClick="insert_countdown();"/></div>
268
+ <span style="float:right"><a href="http://wpdevart.com/wordpress-countdown-plugin/" target="_blank" style="color: rgba(10, 154, 62, 1);; font-weight: bold; font-size: 18px; text-decoration: none;">Upgrade to Pro Version</a><br></span>
269
+ </td>
270
+ </tr>
271
+ </tfoot>
272
+ </table>
273
+
274
+
275
+
276
+ <script type="text/javascript">
277
+
278
+ var countdown_pro_text="If you want to use this feature upgrade to Countdown Pro"
279
+ jQuery('#TB_window').css('max-height',(jQuery('#miain_wpdevart_countdown_window_manager').height()+66)+'px');
280
+ jQuery('#TB_ajaxContent').css('max-height',(jQuery('#miain_wpdevart_countdown_window_manager').height()+16)+'px');
281
+ jQuery('#miain_wpdevart_countdown_window_manager').ready(function(e) {
282
+ jQuery(".color_option").wpColorPicker();
283
+ });
284
+ jQuery('.coming_set_hiddens').change(function(){
285
+ jQuery(this).find('option').each(function(index, element) {
286
+ jQuery('.tr_'+jQuery(this).val()).hide();
287
+ });
288
+ jQuery('.tr_'+jQuery(this).val()).show();
289
+ })
290
+ jQuery('.coming_set_hiddens option').each(function(index, element) {
291
+ jQuery('.tr_'+jQuery(this).val()).hide();
292
+ });
293
+ jQuery('.coming_set_hiddens').each(function(index, element) {
294
+ jQuery('.tr_'+jQuery(this).val()).show();
295
+ });
296
+
297
+
298
+ jQuery( '.slider_div' ).slider({
299
+ orientation: "horizontal",
300
+ range: "min",
301
+ value: 5,
302
+ min: 0,
303
+ max: 100,
304
+ slide: function( event, ui ) {
305
+ jQuery( loc_this ).val( ui.value );
306
+ }
307
+ });
308
+ function insert_countdown() {
309
+
310
+ var tagtext;
311
+ var variables='';
312
+
313
+ if(jQuery('#countdown_days_text').length)
314
+ variables=variables+'text_for_day="'+jQuery('#countdown_days_text').val()+'" ';
315
+
316
+ if(jQuery('#countdown_hourse_text').length)
317
+ variables=variables+'text_for_hour="'+jQuery('#countdown_hourse_text').val()+'" ';
318
+
319
+ if(jQuery('#countdown_minuts_text').length)
320
+ variables=variables+'text_for_minut="'+jQuery('#countdown_minuts_text').val()+'" ';
321
+
322
+ if(jQuery('#countdown_seconds_text').length)
323
+ variables=variables+'text_for_second="'+jQuery('#countdown_seconds_text').val()+'" ';
324
+
325
+ if(jQuery('#countdown_start_date').length)
326
+ variables=variables+'start_time="'+jQuery('#countdown_start_date').val()+'" ';
327
+
328
+ variables=variables+'end_time="'+jQuery('#countdownday').val()+','+jQuery('#countdownhour').val()+','+jQuery('#countdownminute').val()+'" ';
329
+
330
+ if(jQuery('#countdownstart_on').length)
331
+ variables=variables+'action_end_time="'+jQuery('#countdownstart_on').val()+'" ';
332
+
333
+ if(jQuery('#countdown_in_content_position').length)
334
+ variables=variables+'content_position="'+jQuery('#countdown_in_content_position').val()+'" ';
335
+
336
+ if(jQuery('#countdown_top_distance').length)
337
+ variables=variables+'top_ditance="'+jQuery('#countdown_top_distance').val()+'" ';
338
+
339
+ if(jQuery('#countdown_bottom_distance').length)
340
+ variables=variables+'bottom_distance="'+jQuery('#countdown_bottom_distance').val()+'" ';
341
+ tagtext = '[wpdevart_countdown '+variables+']'+jQuery('#expeiret_text').val()+'[/wpdevart_countdown]';
342
+ window.send_to_editor(tagtext);
343
+ tb_remove()
344
+ }
345
+
346
+ </script>
347
+ </body>
348
+ </html>
349
+ <?php
350
+ die;
351
+ }
352
+
353
+ public function create_menu(){
354
+ $main_page = add_menu_page( $this->menu_name, $this->menu_name, 'manage_options', str_replace( ' ', '-', $this->menu_name), array($this, 'main_menu_function'),$this->plugin_url.'images/timer.png');
355
+ $page_countdown = add_submenu_page($this->menu_name, $this->menu_name, $this->menu_name, 'manage_options', str_replace( ' ', '-', $this->menu_name), array($this, 'main_menu_function'));
356
+ $page_countdown = add_submenu_page( str_replace( ' ', '-', $this->menu_name), 'Featured Plugins', 'Featured Plugins', 'manage_options', 'countdown-featured-plugins', array($this, 'featured_plugins'));
357
+ add_action('admin_print_styles-' .$main_page, array($this,'menu_requeried_scripts'));
358
+ add_action('admin_print_styles-' .$page_countdown, array($this,'menu_requeried_scripts'));
359
+ }
360
+
361
+ public function menu_requeried_scripts(){
362
+ wp_enqueue_style('wpdevart-countdown-admin-style');
363
+ }
364
+
365
+ public function main_menu_function(){
366
+ ?>
367
+ <h2 class="headin_countdown">WordPress Countdown General Page</h2>
368
+ <style>
369
+ .headin_countdown{
370
+ font-size: 23px;
371
+ font-weight: 400;
372
+ padding: 9px 15px 4px 0;
373
+ line-height: 29px;
374
+ }
375
+ .image_width_description{
376
+ display:inline-block;
377
+ margin-right:40px;
378
+ margin-top:30px;
379
+ max-width:510px;
380
+ }
381
+ .image{
382
+ border:3px solid #0073AA;
383
+ border-radius:20px;
384
+ }
385
+ .description{
386
+ display:block;
387
+ margin-bottom:15px;
388
+ font-style: normal !important;
389
+ font-weight: bold;
390
+ font-size: 14px;
391
+ }
392
+ </style>
393
+ <div class="image_width_description">
394
+ <span class="description">For adding countdown timer into your pages/posts go to your pages/posts and use Countdown shortcode. Click on shortcode and set Countdown timer options, then click on "Insert Countdown". Check the screenshot below</span>
395
+ <img class="image" src="<?php echo $this->plugin_url.'images/post_example.jpg' ?>">
396
+ </div>
397
+ <div class="image_width_description">
398
+ <span class="description">For adding countdown timer to your Sidebar go to your Widgets page, drop and down Countdown widget into your sidebar. Then set the Countdown timer options, then save changes. Look the screenshot below</span>
399
+ <img class="image" src="<?php echo $this->plugin_url.'images/widget_example.jpg' ?>">
400
+ </div>
401
+
402
+ <?php
403
+ }
404
+
405
+ public function featured_plugins(){
406
+ $plugins_array=array(
407
+ 'coming_soon'=>array(
408
+ 'image_url' => $this->plugin_url.'images/featured_plugins/coming_soon.jpg',
409
+ 'site_url' => 'http://wpdevart.com/wordpress-coming-soon-plugin/',
410
+ 'title' => 'Coming soon and Maintenance mode',
411
+ 'description' => 'Coming soon and Maintenance mode plugin is an awesome tool to show your visitors that you are working on your website to make it better.'
412
+ ),
413
+ 'lightbox'=>array(
414
+ 'image_url' => $this->plugin_url.'images/featured_plugins/lightbox.png',
415
+ 'site_url' => 'http://wpdevart.com/wordpress-lightbox-plugin/',
416
+ 'title' => 'WP Lightbox 2',
417
+ 'description' => 'WP Lightbox 2 is awesome tool for adding responsive lightbox effect for images and also create lightbox for photo album/gallery on your WordPress blog.'
418
+ ),
419
+ 'youtube'=>array(
420
+ 'image_url' => $this->plugin_url.'images/featured_plugins/youtube.png',
421
+ 'site_url' => 'http://wpdevart.com/wordpress-youtube-embed-plugin',
422
+ 'title' => 'WordPress YouTube Embed',
423
+ 'description' => 'YouTube Embed plugin is an convenient tool for adding video to your website. Use YouTube Embed plugin to add YouTube videos in posts/pages, widgets.'
424
+ ),
425
+ 'countdown'=>array(
426
+ 'image_url' => $this->plugin_url.'images/featured_plugins/countdown.jpg',
427
+ 'site_url' => 'http://wpdevart.com/wordpress-countdown-plugin/',
428
+ 'title' => 'WordPress Countdown plugin',
429
+ 'description' => 'WordPress Countdown plugin is an nice tool to create and insert countdown timers into your posts/pages and widgets.'
430
+ ),
431
+ 'facebook'=>array(
432
+ 'image_url' => $this->plugin_url.'images/featured_plugins/facebook.jpg',
433
+ 'site_url' => 'http://wpdevart.com/wordpress-facebook-like-box-plugin',
434
+ 'title' => 'Facebook Like Box',
435
+ 'description' => 'Our Facebook like box plugin will help you to display Facebook like box on your wesite, just add Facebook Like box widget to your sidebar and use it..'
436
+ ),
437
+ 'poll'=>array(
438
+ 'image_url' => $this->plugin_url.'images/featured_plugins/poll.png',
439
+ 'site_url' => 'http://wpdevart.com/wordpress-polls-plugin',
440
+ 'title' => 'Poll',
441
+ 'description' => 'WordPress Polls plugin is an wonderful tool for creating polls and survey forms for your visitors. You can use our polls on widgets, posts and pages.'
442
+ ),
443
+ 'twitter'=>array(
444
+ 'image_url' => $this->plugin_url.'images/featured_plugins/twitter.png',
445
+ 'site_url' => 'http://wpdevart.com/wordpress-twitter-plugin',
446
+ 'title' => 'Twitter button plus',
447
+ 'description' => 'Twitter button plus is nice and useful tool to show Twitter tweet button on your website.'
448
+ ),
449
+
450
+ );
451
+ ?>
452
+ <style>
453
+ .featured_plugin_main{
454
+ background-color: #ffffff;
455
+ border: 1px solid #dedede;
456
+ box-sizing: border-box;
457
+ float:left;
458
+ margin-right:20px;
459
+ margin-bottom:20px;
460
+
461
+ width:450px;
462
+ }
463
+ .featured_plugin_image{
464
+ padding: 15px;
465
+ display: inline-block;
466
+ float:left;
467
+ }
468
+ .featured_plugin_image a{
469
+ display: inline-block;
470
+ }
471
+ .featured_plugin_information{
472
+ float: left;
473
+ width: auto;
474
+ max-width: 282px;
475
+
476
+ }
477
+ .featured_plugin_title{
478
+ color: #0073aa;
479
+ font-size: 18px;
480
+ display: inline-block;
481
+ }
482
+ .featured_plugin_title a{
483
+ text-decoration:none;
484
+
485
+ }
486
+ .featured_plugin_title h4{
487
+ margin:0px;
488
+ margin-top: 20px;
489
+ margin-bottom:8px;
490
+ }
491
+ .featured_plugin_description{
492
+ display: inline-block;
493
+ }
494
+
495
+ </style>
496
+ <script>
497
+
498
+ jQuery(window).resize(wpdevart_countdown_feature_resize);
499
+ jQuery(document).ready(function(e) {
500
+ wpdevart_countdown_feature_resize();
501
+ });
502
+
503
+ function wpdevart_countdown_feature_resize(){
504
+ var wpdevart_countdown_width=jQuery('.featured_plugin_main').eq(0).parent().width();
505
+ var count_of_elements=Math.max(parseInt(wpdevart_countdown_width/450),1);
506
+ var width_of_plugin=((wpdevart_countdown_width-count_of_elements*24-2)/count_of_elements);
507
+ jQuery('.featured_plugin_main').width(width_of_plugin);
508
+ jQuery('.featured_plugin_information').css('max-width',(width_of_plugin-160)+'px');
509
+ }
510
+ </script>
511
+ <h2>Featured Plugins</h2>
512
+ <br>
513
+ <br>
514
+ <?php foreach($plugins_array as $key=>$plugin) { ?>
515
+ <div class="featured_plugin_main">
516
+ <span class="featured_plugin_image"><a target="_blank" href="<?php echo $plugin['site_url'] ?>"><img src="<?php echo $plugin['image_url'] ?>"></a></span>
517
+ <span class="featured_plugin_information">
518
+ <span class="featured_plugin_title"><h4><a target="_blank" href="<?php echo $plugin['site_url'] ?>"><?php echo $plugin['title'] ?></a></h4></span>
519
+ <span class="featured_plugin_description"><?php echo $plugin['description'] ?></span>
520
+ </span>
521
+ <div style="clear:both"></div>
522
+ </div>
523
+ <?php }
524
+ }
525
+
526
+ }
includes/front_end.php ADDED
@@ -0,0 +1,136 @@
1
+ <?php
2
+
3
+ class wpdevart_countdown_front_end{
4
+ private $menu_name;
5
+
6
+ private $plugin_url;
7
+
8
+ private $databese_parametrs;
9
+
10
+ private $params;
11
+
12
+ public static $id_for_content=0;
13
+
14
+ function __construct($params){
15
+
16
+ $this->databese_parametrs=$params['databese_parametrs'];
17
+ //if plugin url not come in parent class
18
+ if(isset($params['plugin_url']))
19
+ $this->plugin_url=$params['plugin_url'];
20
+ else
21
+ $this->plugin_url=trailingslashit(dirname(plugins_url('',__FILE__)));
22
+
23
+ //hooks for popup iframe
24
+ add_action('wp_head',array($this,'generete_front_javascript'));
25
+ // add shortcode
26
+ add_shortcode( 'wpdevart_countdown', array($this,'wpdevart_wpdevart_countdown_shortcode') );
27
+ //for updated parametrs
28
+
29
+ }
30
+ /*###################### scripts and styles ##################*/
31
+ public function generete_front_javascript(){
32
+
33
+ wp_enqueue_script('countdown-front-end');
34
+ wp_enqueue_script('thickbox');
35
+ wp_enqueue_style('countdown_css');
36
+ wp_enqueue_style('thickbox');
37
+
38
+ }
39
+ public function wpdevart_wpdevart_countdown_shortcode( $atts,$content){
40
+ self::$id_for_content++;
41
+ $output_html='';
42
+ $curent_value= shortcode_atts( array(
43
+ "text_for_day" => "days",
44
+ "text_for_hour" => "hours",
45
+ "text_for_minut" => "minutes",
46
+ "text_for_second" => "seconds",
47
+ "start_time" => mktime (date("H"), date("i"), date("s"),date("n"), date("j"),date("Y")),
48
+ "end_time" => "0,1,0",
49
+ "action_end_time" => "hide",
50
+ "content_position" => "center",
51
+ "top_ditance" => "10",
52
+ "bottom_distance" => "10",
53
+ "content" =>$content
54
+ ), $atts);
55
+
56
+
57
+
58
+ $time_experit=explode(',',$curent_value['end_time']);
59
+ $time_diferent=(int)$time_experit[0]*24*3600+(int)+$time_experit[1]*3600+(int)$time_experit[2]*60+$curent_value['start_time']-mktime (date("H"), date("i"), date("s"),date("n"), date("j"),date("Y"));
60
+
61
+ $day_left=(int)($time_diferent/(3600*24));
62
+ $hourse_left=(int)(($time_diferent-$day_left*24*3600)/(3600));
63
+ $minuts_left=(int)(($time_diferent-$day_left*24*3600-$hourse_left*3600)/(60));
64
+ $seconds_left=(int)(($time_diferent-$day_left*24*3600-$hourse_left*3600 - $minuts_left*60));
65
+ if(strlen("".$day_left)>0 && strlen("".$day_left)<2)
66
+ $day_left='0'.$day_left;
67
+ if(strlen("".$hourse_left)>0 && strlen("".$hourse_left)<2)
68
+ $hourse_left='0'.$hourse_left;
69
+ if(strlen("".$minuts_left)>0 && strlen("".$minuts_left)<2)
70
+ $minuts_left='0'.$minuts_left;
71
+ if(strlen("".$seconds_left)>0 && strlen("".$seconds_left)<2)
72
+ $seconds_left='0'.$seconds_left;
73
+
74
+ $output_html.='<div class="content_countdown" id="main_countedown_'.self::$id_for_content.'">';
75
+
76
+
77
+ $output_html.='<div class="countdown">
78
+ <span class="element_conteiner"><span class="days time_left">'.$day_left.'</span><span class="time_description">'.$curent_value['text_for_day'].'</span></span>
79
+ <span class="element_conteiner"><span class="hourse time_left">'.$hourse_left.'</span><span class="time_description">'.$curent_value['text_for_hour'].'</span></span>
80
+ <span class="element_conteiner"><span class="minutes time_left">'.$minuts_left.'</span><span class="time_description">'.$curent_value['text_for_minut'].'</span></span>
81
+ <span class="element_conteiner"><span class="secondes time_left">'.$seconds_left.'</span><span class="time_description">'.$curent_value['text_for_second'].'</span></span>
82
+ </div>';
83
+ $output_html.='</div>';
84
+ $output_html.='<script>'.$this->wpdevart_countdown_javascript($curent_value).'</script><style>'.$this->wpdevart_countdown_css($curent_value).'</style>';
85
+ return $output_html;
86
+ }
87
+ public function wpdevart_countdown_javascript($parametrs_for_countedown){
88
+ $output_js='';
89
+
90
+ $time_experit=explode(',',$parametrs_for_countedown['end_time']);
91
+ $time_diferent=(int)$time_experit[0]*24*3600+(int)+$time_experit[1]*3600+(int)$time_experit[2]*60+$parametrs_for_countedown['start_time']-mktime (date("H"), date("i"), date("s"),date("n"), date("j"),date("Y"));
92
+ $day_left=(int)($time_diferent/(3600*24));
93
+ $hourse_left=(int)(($time_diferent-$day_left*24*3600)/(3600));
94
+ $minuts_left=(int)(($time_diferent-$day_left*24*3600-$hourse_left*3600)/(60));
95
+ $seconds_left=(int)(($time_diferent-$day_left*24*3600-$hourse_left*3600 - $minuts_left*60));
96
+ if(strlen("".$day_left)>0 && strlen("".$day_left)<2)
97
+ $day_left='0'.$day_left;
98
+ if(strlen("".$hourse_left)>0 && strlen("".$hourse_left)<2)
99
+ $hourse_left='0'.$hourse_left;
100
+ if(strlen("".$minuts_left)>0 && strlen("".$minuts_left)<2)
101
+ $minuts_left='0'.$minuts_left;
102
+ if(strlen("".$seconds_left)>0 && strlen("".$seconds_left)<2)
103
+ $seconds_left='0'.$seconds_left;
104
+
105
+ if($parametrs_for_countedown['action_end_time']=='hide'){
106
+ $parametrs_for_countedown['content']='';
107
+ }
108
+ $output_js.="
109
+ jQuery(document).ready(function(){
110
+ ".((($day_left<=0 && $hourse_left<=0 && $minuts_left<=0 && $seconds_left<=0))?"jQuery('#main_countedown_".self::$id_for_content." .countdown').html('".htmlspecialchars($parametrs_for_countedown['content'])."')":"setInterval(function(){countdown_wpdevart_timer('main_countedown_".self::$id_for_content."');},1000)")."
111
+ });
112
+ ";
113
+ return $output_js;
114
+ }
115
+ public function wpdevart_countdown_css($parametrs_for_countedown){
116
+ $output_css='';
117
+ $output_css.='#main_countedown_'.self::$id_for_content.' .countdown{text-align:'.$parametrs_for_countedown['content_position'].';}';
118
+ $output_css.= '#main_countedown_'.self::$id_for_content.' .countdown{margin-top:'.$parametrs_for_countedown['top_ditance'].'px;margin-bottom:'.$parametrs_for_countedown['bottom_distance'].'px}';
119
+ $output_css.= "#main_countedown_".self::$id_for_content." .time_left{\r\n";
120
+ $output_css.= "border-radius:8px;\r\n";
121
+ $output_css.= "background-color:#3DA8CC;\r\n";
122
+ $output_css.= "font-size:23px;\r\n";
123
+ $output_css.= "font-family:monospace;\r\n";
124
+ $output_css.= "color:#000000;\r\n";
125
+ $output_css.= "}\r\n";
126
+ $output_css.= "#main_countedown_".self::$id_for_content." .time_description{\r\n";
127
+ $output_css.= "font-size:23px;\r\n";
128
+ $output_css.= "font-family:monospace;\r\n";
129
+ $output_css.= "color:#000000;\r\n";
130
+ $output_css.= "}\r\n";
131
+ $output_css.= "#main_countedown_".self::$id_for_content." .element_conteiner{min-width:90px}";
132
+
133
+ return $output_css;
134
+ }
135
+ }
136
+ ?>
includes/javascript/background.js ADDED
@@ -0,0 +1 @@
1
+ (function(a,d,p){a.fn.backstretch=function(c,b){(c===p||0===c.length)&&a.error("No images were supplied for Backstretch");0===a(d).scrollTop()&&d.scrollTo(0,0);return this.each(function(){var d=a(this),g=d.data("backstretch");if(g){if("string"==typeof c&&"function"==typeof g[c]){g[c](b);return}b=a.extend(g.options,b);g.destroy(!0)}g=new q(this,c,b);d.data("backstretch",g)})};a.backstretch=function(c,b){return a("body").backstretch(c,b).data("backstretch")};a.expr[":"].backstretch=function(c){return a(c).data("backstretch")!==p};a.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5E3,fade:0};var r={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},s={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},q=function(c,b,e){this.options=a.extend({},a.fn.backstretch.defaults,e||{});this.images=a.isArray(b)?b:[b];a.each(this.images,function(){a("<img />")[0].src=this});this.isBody=c===document.body;this.$container=a(c);this.$root=this.isBody?l?a(d):a(document):this.$container;c=this.$container.children(".backstretch").first();this.$wrap=c.length?c:a('<div class="backstretch"></div>').css(r).appendTo(this.$container);this.isBody||(c=this.$container.css("position"),b=this.$container.css("zIndex"),this.$container.css({position:"static"===c?"relative":c,zIndex:"auto"===b?0:b,background:"none"}),this.$wrap.css({zIndex:-999998}));this.$wrap.css({position:this.isBody&&l?"fixed":"absolute"});this.index=0;this.show(this.index);a(d).on("resize.backstretch",a.proxy(this.resize,this)).on("orientationchange.backstretch",a.proxy(function(){this.isBody&&0===d.pageYOffset&&(d.scrollTo(0,1),this.resize())},this))};q.prototype={resize:function(){try{var a={left:0,top:0},b=this.isBody?this.$root.width():this.$root.innerWidth(),e=b,g=this.isBody?d.innerHeight?d.innerHeight:this.$root.height():this.$root.innerHeight(),j=e/this.$img.data("ratio"),f;j>=g?(f=(j-g)/2,this.options.centeredY&&(a.top="-"+f+"px")):(j=g,e=j*this.$img.data("ratio"),f=(e-b)/2,this.options.centeredX&&(a.left="-"+f+"px"));this.$wrap.css({width:b,height:g}).find("img:not(.deleteable)").css({width:e,height:j}).css(a)}catch(h){}return this},show:function(c){if(!(Math.abs(c)>this.images.length-1)){var b=this,e=b.$wrap.find("img").addClass("deleteable"),d={relatedTarget:b.$container[0]};b.$container.trigger(a.Event("backstretch.before",d),[b,c]);this.index=c;clearInterval(b.interval);b.$img=a("<img />").css(s).bind("load",function(f){var h=this.width||a(f.target).width();f=this.height||a(f.target).height();a(this).data("ratio",h/f);a(this).fadeIn(b.options.speed||b.options.fade,function(){e.remove();b.paused||b.cycle();a(["after","show"]).each(function(){b.$container.trigger(a.Event("backstretch."+this,d),[b,c])})});b.resize()}).appendTo(b.$wrap);b.$img.attr("src",b.images[c]);return b}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1)},pause:function(){this.paused=!0;return this},resume:function(){this.paused=!1;this.next();return this},cycle:function(){1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(a.proxy(function(){this.paused||this.next()},this),this.options.duration));return this},destroy:function(c){a(d).off("resize.backstretch orientationchange.backstretch");clearInterval(this.interval);c||this.$wrap.remove();this.$container.removeData("backstretch")}};var l,f=navigator.userAgent,m=navigator.platform,e=f.match(/AppleWebKit\/([0-9]+)/),e=!!e&&e[1],h=f.match(/Fennec\/([0-9]+)/),h=!!h&&h[1],n=f.match(/Opera Mobi\/([0-9]+)/),t=!!n&&n[1],k=f.match(/MSIE ([0-9]+)/),k=!!k&&k[1];l=!((-1<m.indexOf("iPhone")||-1<m.indexOf("iPad")||-1<m.indexOf("iPod"))&&e&&534>e||d.operamini&&"[object OperaMini]"==={}.toString.call(d.operamini)||n&&7458>t||-1<f.indexOf("Android")&&e&&533>e||h&&6>h||"palmGetResource"in d&&e&&534>e||-1<f.indexOf("MeeGo")&&-1<f.indexOf("NokiaBrowser/8.5.0")||k&&6>=k)})(jQuery,window);
includes/javascript/front_end_js.js ADDED
@@ -0,0 +1,52 @@
1
+ function countdown_wpdevart_timer(main_div_id){
2
+ var days_left=parseInt(jQuery('#'+main_div_id+' .days').text());
3
+ var hours_left=parseInt(jQuery('#'+main_div_id+' .hourse').text());;
4
+ var minutes_left=parseInt(jQuery('#'+main_div_id+' .minutes').text());;
5
+ var secondes_left=parseInt(jQuery('#'+main_div_id+' .secondes').text());
6
+ var all_time=days_left*24*3600+hours_left*3600+minutes_left*60+secondes_left;
7
+ all_time--;
8
+ days_left=parseInt(all_time/(3600*24));
9
+ hours_left=parseInt((all_time-days_left*3600*24)/(3600));
10
+ minutes_left=parseInt((all_time-days_left*3600*24-hours_left*3600)/(60));
11
+ secondes_left=parseInt((all_time-days_left*3600*24-hours_left*3600-minutes_left*60));
12
+ if((""+days_left+"").length>1)
13
+ jQuery('#'+main_div_id+' .days').html(days_left);
14
+ else
15
+ jQuery('#'+main_div_id+' .days').html('0'+days_left);
16
+ if((""+hours_left+"").length>1)
17
+ jQuery('#'+main_div_id+' .hourse').html(hours_left);
18
+ else
19
+ jQuery('#'+main_div_id+' .hourse').html('0'+hours_left);
20
+ if((""+minutes_left+"").length>1)
21
+ jQuery('#'+main_div_id+' .minutes').html(minutes_left);
22
+ else
23
+ jQuery('#'+main_div_id+' .minutes').html('0'+minutes_left);
24
+ if((""+secondes_left+"").length>1)
25
+ jQuery('#'+main_div_id+' .secondes').html(secondes_left);
26
+ else
27
+ jQuery('#'+main_div_id+' .secondes').html('0'+secondes_left);
28
+ if(days_left<=0 && hours_left<=0 && minutes_left<=0 && secondes_left<=0){
29
+ window.location=document.URL;
30
+ }
31
+ }
32
+ function wpdevart_countdown_animated_element(animation,element_id){
33
+ jQuery('#'+element_id).ready(function(e) {
34
+ if(!jQuery(jQuery('#'+element_id)).hasClass('animated') && wpdevart_countdown_isScrolledIntoView(jQuery('#'+element_id))) {
35
+ jQuery(jQuery('#'+element_id)).css('visibility','visible');
36
+ jQuery(jQuery('#'+element_id)).addClass('animated');
37
+ jQuery(jQuery('#'+element_id)).addClass(animation);
38
+ }
39
+ });
40
+ }
41
+ function wpdevart_countdown_isScrolledIntoView(elem)
42
+ {
43
+ var $elem = jQuery(elem);
44
+ if($elem.length=0)
45
+ return true;
46
+ var $window = jQuery(window);
47
+ var docViewTop = $window.scrollTop();
48
+ var docViewBottom = docViewTop + $window.height();
49
+ var elemTop = jQuery(elem).offset().top;
50
+ var elemBottom = elemTop + parseInt(jQuery(elem).css('height'));
51
+ return ( ( (docViewTop<=elemTop) && (elemTop<=docViewBottom) ) || ( (docViewTop<=elemBottom) && (elemBottom<=docViewBottom) ));
52
+ }
includes/library.php ADDED
@@ -0,0 +1,154 @@
1
+ <?php
2
+
3
+ class wpdevart_countdown_setting{
4
+ public static $list_of_animations=array('bounce','flash','pulse','rubberBand','shake','swing','tada','wobble','bounceIn','bounceInDown','bounceInLeft','bounceInRight','bounceInUp','fadeIn','fadeInDown','fadeInDownBig','fadeInLeft','fadeInLeftBig','fadeInRight','fadeInRightBig','fadeInUp','fadeInUpBig','flip','flipInX','flipInY','lightSpeedIn','rotateIn','rotateInDownLeft','rotateInDownRight','rotateInUpLeft','rotateInUpRight','rollIn','zoomIn','zoomInDown','zoomInLeft','zoomInRight','zoomInUp');
5
+ public static function get_animations_type_array($animation=''){
6
+ if($animation=='' || $animation=='none')
7
+ return '';
8
+ if($animation=='random'){
9
+
10
+ return self::$list_of_animations[array_rand(self::$list_of_animations,1)];
11
+ }
12
+ return $animation;
13
+ }
14
+ public static function generete_animation_select($select_id='',$curent_effect='none'){
15
+ ?>
16
+ <select onClick="alert(countdown_pro_text)" id="<?php echo $select_id; ?>" name="<?php echo $select_id; ?>">
17
+ <option <?php selected('none',$curent_effect); ?> value="none">none</option>
18
+ <option <?php selected('random',$curent_effect); ?> value="random">random</option>
19
+ <optgroup label="Attention Seekers">
20
+ <option <?php selected('bounce',$curent_effect); ?> value="bounce">bounce</option>
21
+ <option <?php selected('flash',$curent_effect); ?> value="flash">flash</option>
22
+ <option <?php selected('pulse',$curent_effect); ?> value="pulse">pulse</option>
23
+ <option <?php selected('rubberBand',$curent_effect); ?> value="rubberBand">rubberBand</option>
24
+ <option <?php selected('shake',$curent_effect); ?> value="shake">shake</option>
25
+ <option <?php selected('swing',$curent_effect); ?> value="swing">swing</option>
26
+ <option <?php selected('tada',$curent_effect); ?> value="tada">tada</option>
27
+ <option <?php selected('wobble',$curent_effect); ?> value="wobble">wobble</option>
28
+ </optgroup>
29
+
30
+ <optgroup label="Bouncing Entrances">
31
+ <option <?php selected('bounceIn',$curent_effect); ?> value="bounceIn">bounceIn</option>
32
+ <option <?php selected('bounceInDown',$curent_effect); ?> value="bounceInDown">bounceInDown</option>
33
+ <option <?php selected('bounceInLeft',$curent_effect); ?> value="bounceInLeft">bounceInLeft</option>
34
+ <option <?php selected('bounceInRight',$curent_effect); ?> value="bounceInRight">bounceInRight</option>
35
+ <option <?php selected('bounceInUp',$curent_effect); ?> value="bounceInUp">bounceInUp</option>
36
+ </optgroup>
37
+
38
+ <optgroup label="Fading Entrances">
39
+ <option <?php selected('fadeIn',$curent_effect); ?> value="fadeIn">fadeIn</option>
40
+ <option <?php selected('fadeInDown',$curent_effect); ?> value="fadeInDown">fadeInDown</option>
41
+ <option <?php selected('fadeInDownBig',$curent_effect); ?> value="fadeInDownBig">fadeInDownBig</option>
42
+ <option <?php selected('fadeInLeft',$curent_effect); ?> value="fadeInLeft">fadeInLeft</option>
43
+ <option <?php selected('fadeInLeftBig',$curent_effect); ?> value="fadeInLeftBig">fadeInLeftBig</option>
44
+ <option <?php selected('fadeInRight',$curent_effect); ?> value="fadeInRight">fadeInRight</option>
45
+ <option <?php selected('fadeInRightBig',$curent_effect); ?> value="fadeInRightBig">fadeInRightBig</option>
46
+ <option <?php selected('fadeInUp',$curent_effect); ?> value="fadeInUp">fadeInUp</option>
47
+ <option <?php selected('fadeInUpBig',$curent_effect); ?> value="fadeInUpBig">fadeInUpBig</option>
48
+ </optgroup>
49
+
50
+ <optgroup label="Flippers">
51
+ <option <?php selected('flip',$curent_effect); ?> value="flip">flip</option>
52
+ <option <?php selected('flipInX',$curent_effect); ?> value="flipInX">flipInX</option>
53
+ <option <?php selected('flipInY',$curent_effect); ?> value="flipInY">flipInY</option>
54
+ </optgroup>
55
+
56
+ <optgroup label="Lightspeed">
57
+ <option <?php selected('lightSpeedIn',$curent_effect); ?> value="lightSpeedIn">lightSpeedIn</option>
58
+ </optgroup>
59
+
60
+ <optgroup label="Rotating Entrances">
61
+ <option <?php selected('rotateIn',$curent_effect); ?> value="rotateIn">rotateIn</option>
62
+ <option <?php selected('rotateInDownLeft',$curent_effect); ?> value="rotateInDownLeft">rotateInDownLeft</option>
63
+ <option <?php selected('rotateInDownRight',$curent_effect); ?> value="rotateInDownRight">rotateInDownRight</option>
64
+ <option <?php selected('rotateInUpLeft',$curent_effect); ?> value="rotateInUpLeft">rotateInUpLeft</option>
65
+ <option <?php selected('rotateInUpRight',$curent_effect); ?> value="rotateInUpRight">rotateInUpRight</option>
66
+ </optgroup>
67
+
68
+ <optgroup label="Specials">
69
+
70
+ <option <?php selected('rollIn',$curent_effect); ?> value="rollIn">rollIn</option>
71
+ </optgroup>
72
+
73
+ <optgroup label="Zoom Entrances">
74
+ <option <?php selected('zoomIn',$curent_effect); ?> value="zoomIn">zoomIn</option>
75
+ <option <?php selected('zoomInDown',$curent_effect); ?> value="zoomInDown">zoomInDown</option>
76
+ <option <?php selected('zoomInLeft',$curent_effect); ?> value="zoomInLeft">zoomInLeft</option>
77
+ <option <?php selected('zoomInRight',$curent_effect); ?> value="zoomInRight">zoomInRight</option>
78
+ <option <?php selected('zoomInUp',$curent_effect); ?> value="zoomInUp">zoomInUp</option>
79
+ </optgroup>
80
+ </select>
81
+ <?php
82
+ }
83
+ public static function generete_fonts($select_id='',$curent_font='none'){
84
+ ?>
85
+ <select onClick="alert(countdown_pro_text)" id="<?php echo $select_id; ?>" name="<?php echo $select_id; ?>">
86
+
87
+ <option <?php selected('Arial,Helvetica Neue,Helvetica,sans-serif',$curent_font); ?> value="Arial,Helvetica Neue,Helvetica,sans-serif">Arial *</option>
88
+ <option <?php selected('Arial Black,Arial Bold,Arial,sans-serif',$curent_font); ?> value="Arial Black,Arial Bold,Arial,sans-serif">Arial Black *</option>
89
+ <option <?php selected('Arial Narrow,Arial,Helvetica Neue,Helvetica,sans-serif',$curent_font); ?> value="Arial Narrow,Arial,Helvetica Neue,Helvetica,sans-serif">Arial Narrow *</option>
90
+ <option <?php selected('Courier,Verdana,sans-serif',$curent_font); ?> value="Courier,Verdana,sans-serif">Courier *</option>
91
+ <option <?php selected('Georgia,Times New Roman,Times,serif',$curent_font); ?> value="Georgia,Times New Roman,Times,serif">Georgia *</option>
92
+ <option <?php selected('Times New Roman,Times,Georgia,serif',$curent_font); ?> value="Times New Roman,Times,Georgia,serif">Times New Roman *</option>
93
+ <option <?php selected('Trebuchet MS,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Arial,sans-serif',$curent_font); ?> value="Trebuchet MS,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Arial,sans-serif">Trebuchet MS *</option>
94
+ <option <?php selected('Verdana,sans-serif',$curent_font); ?> value="Verdana,sans-serif">Verdana *</option>
95
+ <option <?php selected('American Typewriter,Georgia,serif',$curent_font); ?> value="American Typewriter,Georgia,serif">American Typewriter</option>
96
+ <option <?php selected('Andale Mono,Consolas,Monaco,Courier,Courier New,Verdana,sans-serif',$curent_font); ?> value="Andale Mono,Consolas,Monaco,Courier,Courier New,Verdana,sans-serif">Andale Mono</option>
97
+ <option <?php selected('Baskerville,Times New Roman,Times,serif',$curent_font); ?> value="Baskerville,Times New Roman,Times,serif">Baskerville</option>
98
+ <option <?php selected('Bookman Old Style,Georgia,Times New Roman,Times,serif',$curent_font); ?> value="Bookman Old Style,Georgia,Times New Roman,Times,serif">Bookman Old Style</option>
99
+ <option <?php selected('Calibri,Helvetica Neue,Helvetica,Arial,Verdana,sans-serif',$curent_font); ?> value="Calibri,Helvetica Neue,Helvetica,Arial,Verdana,sans-serif">Calibri</option>
100
+ <option <?php selected('Cambria,Georgia,Times New Roman,Times,serif',$curent_font); ?> value="Cambria,Georgia,Times New Roman,Times,serif">Cambria</option>
101
+ <option <?php selected('Candara,Verdana,sans-serif',$curent_font); ?> value="Candara,Verdana,sans-serif">Candara</option>
102
+ <option <?php selected('Century Gothic,Apple Gothic,Verdana,sans-serif',$curent_font); ?> value="Century Gothic,Apple Gothic,Verdana,sans-serif">Century Gothic</option>
103
+ <option <?php selected('Century Schoolbook,Georgia,Times New Roman,Times,serif',$curent_font); ?> value="Century Schoolbook,Georgia,Times New Roman,Times,serif">Century Schoolbook</option>
104
+ <option <?php selected('Consolas,Andale Mono,Monaco,Courier,Courier New,Verdana,sans-serif',$curent_font); ?> value="Consolas,Andale Mono,Monaco,Courier,Courier New,Verdana,sans-serif">Consolas</option>
105
+ <option <?php selected('Constantia,Georgia,Times New Roman,Times,serif',$curent_font); ?> value="Constantia,Georgia,Times New Roman,Times,serif">Constantia</option>
106
+ <option <?php selected('Corbel,Lucida Grande,Lucida Sans Unicode,Arial,sans-serif',$curent_font); ?> value="Corbel,Lucida Grande,Lucida Sans Unicode,Arial,sans-serif">Corbel</option>
107
+ <option <?php selected('Franklin Gothic Medium,Arial,sans-serif',$curent_font); ?> value="Franklin Gothic Medium,Arial,sans-serif">Franklin Gothic Medium</option>
108
+ <option <?php selected('Garamond,Hoefler Text,Times New Roman,Times,serif',$curent_font); ?> value="Garamond,Hoefler Text,Times New Roman,Times,serif">Garamond</option>
109
+ <option <?php selected('Gill Sans MT,Gill Sans,Calibri,Trebuchet MS,sans-serif',$curent_font); ?> value="Gill Sans MT,Gill Sans,Calibri,Trebuchet MS,sans-serif">Gill Sans MT</option>
110
+ <option <?php selected('Helvetica Neue,Helvetica,Arial,sans-serif',$curent_font); ?> value="Helvetica Neue,Helvetica,Arial,sans-serif">Helvetica Neue</option>
111
+ <option <?php selected('Hoefler Text,Garamond,Times New Roman,Times,sans-serif',$curent_font); ?> value="Hoefler Text,Garamond,Times New Roman,Times,sans-serif">Hoefler Text</option>
112
+ <option <?php selected('Lucida Bright,Cambria,Georgia,Times New Roman,Times,serif',$curent_font); ?> value="Lucida Bright,Cambria,Georgia,Times New Roman,Times,serif">Lucida Bright</option>
113
+ <option <?php selected('Lucida Grande,Lucida Sans,Lucida Sans Unicode,sans-serif',$curent_font); ?> value="Lucida Grande,Lucida Sans,Lucida Sans Unicode,sans-serif">Lucida Grande</option>
114
+ <option <?php selected('monospace',$curent_font); ?> value="monospace">monospace</option>
115
+ <option <?php selected('Palatino Linotype,Palatino,Georgia,Times New Roman,Times,serif',$curent_font); ?> value="Palatino Linotype,Palatino,Georgia,Times New Roman,Times,serif">Palatino Linotype</option>
116
+ <option <?php selected('Tahoma,Geneva,Verdana,sans-serif',$curent_font); ?> value="Tahoma,Geneva,Verdana,sans-serif">Tahoma</option>
117
+ <option <?php selected('Rockwell, Arial Black, Arial Bold, Arial, sans-serif',$curent_font); ?> value="Rockwell, Arial Black, Arial Bold, Arial, sans-serif">Rockwell</option>
118
+ </select>
119
+ <?php
120
+
121
+ }
122
+ public static function darkest_brigths($color,$pracent){
123
+ $new_color=$color;
124
+ if(!(strlen($new_color==6) || strlen($new_color)==7))
125
+ {
126
+ return $color;
127
+ }
128
+ $color_vandakanishov=strpos($new_color,'#');
129
+ if($color_vandakanishov == false) {
130
+ $new_color= str_replace('#','',$new_color);
131
+ }
132
+ $color_part_1=substr($new_color, 0, 2);
133
+ $color_part_2=substr($new_color, 2, 2);
134
+ $color_part_3=substr($new_color, 4, 2);
135
+ $color_part_1=dechex( (int) (hexdec( $color_part_1 ) - (hexdec( $color_part_1 )* $pracent / 100 )));
136
+ $color_part_2=dechex( (int) (hexdec( $color_part_2) - (( ( hexdec( $color_part_2 ) ) ) * $pracent / 100 )));
137
+ $color_part_3=dechex( (int) (hexdec( $color_part_3 ) - (( ( hexdec( $color_part_3 ) ) ) * $pracent / 100 )));
138
+ if(strlen($color_part_1)<2) $color_part_1="0".$color_part_1;
139
+ if(strlen($color_part_2)<2) $color_part_2="0".$color_part_2;
140
+ if(strlen($color_part_3)<2) $color_part_3="0".$color_part_3;
141
+
142
+ $new_color=$color_part_1.$color_part_2.$color_part_3;
143
+ if($color_vandakanishov == false){
144
+ return $new_color;
145
+ }
146
+ else{
147
+ return '#'.$new_color;
148
+ }
149
+ }
150
+
151
+ }
152
+
153
+
154
+ ?>
includes/style/effects.css ADDED
@@ -0,0 +1,2078 @@
1
+ .animated {
2
+ -webkit-animation-duration: 1s;
3
+ animation-duration: 1s;
4
+ -webkit-animation-fill-mode: both;
5
+ animation-fill-mode: both;
6
+ }
7
+
8
+ .animated.infinite {
9
+ -webkit-animation-iteration-count: infinite;
10
+ animation-iteration-count: infinite;
11
+ }
12
+
13
+ .animated.hinge {
14
+ -webkit-animation-duration: 2s;
15
+ animation-duration: 2s;
16
+ }
17
+
18
+ @-webkit-keyframes bounce {
19
+ 0%, 20%, 53%, 80%, 100% {
20
+ -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
21
+ transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
22
+ -webkit-transform: translate3d(0,0,0);
23
+ transform: translate3d(0,0,0);
24
+ }
25
+
26
+ 40%, 43% {
27
+ -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
28
+ transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
29
+ -webkit-transform: translate3d(0, -30px, 0);
30
+ transform: translate3d(0, -30px, 0);
31
+ }
32
+
33
+ 70% {
34
+ -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
35
+ transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
36
+ -webkit-transform: translate3d(0, -15px, 0);
37
+ transform: translate3d(0, -15px, 0);
38
+ }
39
+
40
+ 90% {
41
+ -webkit-transform: translate3d(0,-4px,0);
42
+ transform: translate3d(0,-4px,0);
43
+ }
44
+ }
45
+
46
+ @keyframes bounce {
47
+ 0%, 20%, 53%, 80%, 100% {
48
+ -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
49
+ transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
50
+ -webkit-transform: translate3d(0,0,0);
51
+ -ms-transform: translate3d(0,0,0);
52
+ transform: translate3d(0,0,0);
53
+ }
54
+
55
+ 40%, 43% {
56
+ -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
57
+ transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
58
+ -webkit-transform: translate3d(0, -30px, 0);
59
+ -ms-transform: translate3d(0, -30px, 0);
60
+ transform: translate3d(0, -30px, 0);
61
+ }
62
+
63
+ 70% {
64
+ -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
65
+ transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
66
+ -webkit-transform: translate3d(0, -15px, 0);
67
+ -ms-transform: translate3d(0, -15px, 0);
68
+ transform: translate3d(0, -15px, 0);
69
+ }
70
+
71
+ 90% {
72
+ -webkit-transform: translate3d(0,-4px,0);
73
+ -ms-transform: translate3d(0,-4px,0);
74
+ transform: translate3d(0,-4px,0);
75
+ }
76
+ }
77
+
78
+ .bounce {
79
+ -webkit-animation-name: bounce;
80
+ animation-name: bounce;
81
+ -webkit-transform-origin: center bottom;
82
+ -ms-transform-origin: center bottom;
83
+ transform-origin: center bottom;
84
+ }
85
+
86
+ @-webkit-keyframes flash {
87
+ 0%, 50%, 100% {
88
+ opacity: 1;
89
+ }
90
+
91
+ 25%, 75% {
92
+ opacity: 0;
93
+ }
94
+ }
95
+
96
+ @keyframes flash {
97
+ 0%, 50%, 100% {
98
+ opacity: 1;
99
+ }
100
+
101
+ 25%, 75% {
102
+ opacity: 0;
103
+ }
104
+ }
105
+
106
+ .flash {
107
+ -webkit-animation-name: flash;
108
+ animation-name: flash;
109
+ }
110
+
111
+ /* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
112
+
113
+ @-webkit-keyframes pulse {
114
+ 0% {
115
+ -webkit-transform: scale3d(1, 1, 1);
116
+ transform: scale3d(1, 1, 1);
117
+ }
118
+
119
+ 50% {
120
+ -webkit-transform: scale3d(1.05, 1.05, 1.05);
121
+ transform: scale3d(1.05, 1.05, 1.05);
122
+ }
123
+
124
+ 100% {
125
+ -webkit-transform: scale3d(1, 1, 1);
126
+ transform: scale3d(1, 1, 1);
127
+ }
128
+ }
129
+
130
+ @keyframes pulse {
131
+ 0% {
132
+ -webkit-transform: scale3d(1, 1, 1);
133
+ -ms-transform: scale3d(1, 1, 1);
134
+ transform: scale3d(1, 1, 1);
135
+ }
136
+
137
+ 50% {
138
+ -webkit-transform: scale3d(1.05, 1.05, 1.05);
139
+ -ms-transform: scale3d(1.05, 1.05, 1.05);
140
+ transform: scale3d(1.05, 1.05, 1.05);
141
+ }
142
+
143
+ 100% {
144
+ -webkit-transform: scale3d(1, 1, 1);
145
+ -ms-transform: scale3d(1, 1, 1);
146
+ transform: scale3d(1, 1, 1);
147
+ }
148
+ }
149
+
150
+ .pulse {
151
+ -webkit-animation-name: pulse;
152
+ animation-name: pulse;
153
+ }
154
+
155
+ @-webkit-keyframes rubberBand {
156
+ 0% {
157
+ -webkit-transform: scale3d(1, 1, 1);
158
+ transform: scale3d(1, 1, 1);
159
+ }
160
+
161
+ 30% {
162
+ -webkit-transform: scale3d(1.25, 0.75, 1);
163
+ transform: scale3d(1.25, 0.75, 1);
164
+ }
165
+
166
+ 40% {
167
+ -webkit-transform: scale3d(0.75, 1.25, 1);
168
+ transform: scale3d(0.75, 1.25, 1);
169
+ }
170
+
171
+ 50% {
172
+ -webkit-transform: scale3d(1.15, 0.85, 1);
173
+ transform: scale3d(1.15, 0.85, 1);
174
+ }
175
+
176
+ 65% {
177
+ -webkit-transform: scale3d(.95, 1.05, 1);
178
+ transform: scale3d(.95, 1.05, 1);
179
+ }
180
+
181
+ 75% {
182
+ -webkit-transform: scale3d(1.05, .95, 1);
183
+ transform: scale3d(1.05, .95, 1);
184
+ }
185
+
186
+ 100% {
187
+ -webkit-transform: scale3d(1, 1, 1);
188
+ transform: scale3d(1, 1, 1);
189
+ }
190
+ }
191
+
192
+ @keyframes rubberBand {
193
+ 0% {
194
+ -webkit-transform: scale3d(1, 1, 1);
195
+ -ms-transform: scale3d(1, 1, 1);
196
+ transform: scale3d(1, 1, 1);
197
+ }
198
+
199
+ 30% {
200
+ -webkit-transform: scale3d(1.25, 0.75, 1);
201
+ -ms-transform: scale3d(1.25, 0.75, 1);
202
+ transform: scale3d(1.25, 0.75, 1);
203
+ }
204
+
205
+ 40% {
206
+ -webkit-transform: scale3d(0.75, 1.25, 1);
207
+ -ms-transform: scale3d(0.75, 1.25, 1);
208
+ transform: scale3d(0.75, 1.25, 1);
209
+ }
210
+
211
+ 50% {
212
+ -webkit-transform: scale3d(1.15, 0.85, 1);
213
+ -ms-transform: scale3d(1.15, 0.85, 1);
214
+ transform: scale3d(1.15, 0.85, 1);
215
+ }
216
+
217
+ 65% {
218
+ -webkit-transform: scale3d(.95, 1.05, 1);
219
+ -ms-transform: scale3d(.95, 1.05, 1);
220
+ transform: scale3d(.95, 1.05, 1);
221
+ }
222
+
223
+ 75% {
224
+ -webkit-transform: scale3d(1.05, .95, 1);
225
+ -ms-transform: scale3d(1.05, .95, 1);
226
+ transform: scale3d(1.05, .95, 1);
227
+ }
228
+
229
+ 100% {
230
+ -webkit-transform: scale3d(1, 1, 1);
231
+ -ms-transform: scale3d(1, 1, 1);
232
+ transform: scale3d(1, 1, 1);
233
+ }
234
+ }
235
+
236
+ .rubberBand {
237
+ -webkit-animation-name: rubberBand;
238
+ animation-name: rubberBand;
239
+ }
240
+
241
+ @-webkit-keyframes shake {
242
+ 0%, 100% {
243
+ -webkit-transform: translate3d(0, 0, 0);
244
+ transform: translate3d(0, 0, 0);
245
+ }
246
+
247
+ 10%, 30%, 50%, 70%, 90% {
248
+ -webkit-transform: translate3d(-10px, 0, 0);
249
+ transform: translate3d(-10px, 0, 0);
250
+ }
251
+
252
+ 20%, 40%, 60%, 80% {
253
+ -webkit-transform: translate3d(10px, 0, 0);
254
+ transform: translate3d(10px, 0, 0);
255
+ }
256
+ }
257
+
258
+ @keyframes shake {
259
+ 0%, 100% {
260
+ -webkit-transform: translate3d(0, 0, 0);
261
+ -ms-transform: translate3d(0, 0, 0);
262
+ transform: translate3d(0, 0, 0);
263
+ }
264
+
265
+ 10%, 30%, 50%, 70%, 90% {
266
+ -webkit-transform: translate3d(-10px, 0, 0);
267
+ -ms-transform: translate3d(-10px, 0, 0);
268
+ transform: translate3d(-10px, 0, 0);
269
+ }
270
+
271
+ 20%, 40%, 60%, 80% {
272
+ -webkit-transform: translate3d(10px, 0, 0);
273
+ -ms-transform: translate3d(10px, 0, 0);
274
+ transform: translate3d(10px, 0, 0);
275
+ }
276
+ }
277
+
278
+ .shake {
279
+ -webkit-animation-name: shake;
280
+ animation-name: shake;
281
+ }
282
+
283
+ @-webkit-keyframes swing {
284
+ 20% {
285
+ -webkit-transform: rotate3d(0, 0, 1, 15deg);
286
+ transform: rotate3d(0, 0, 1, 15deg);
287
+ }
288
+
289
+ 40% {
290
+ -webkit-transform: rotate3d(0, 0, 1, -10deg);
291
+ transform: rotate3d(0, 0, 1, -10deg);
292
+ }
293
+
294
+ 60% {
295
+ -webkit-transform: rotate3d(0, 0, 1, 5deg);
296
+ transform: rotate3d(0, 0, 1, 5deg);
297
+ }
298
+
299
+ 80% {
300
+ -webkit-transform: rotate3d(0, 0, 1, -5deg);
301
+ transform: rotate3d(0, 0, 1, -5deg);
302
+ }
303
+
304
+ 100% {
305
+ -webkit-transform: rotate3d(0, 0, 1, 0deg);
306
+ transform: rotate3d(0, 0, 1, 0deg);
307
+ }
308
+ }
309
+
310
+ @keyframes swing {
311
+ 20% {
312
+ -webkit-transform: rotate3d(0, 0, 1, 15deg);
313
+ -ms-transform: rotate3d(0, 0, 1, 15deg);
314
+ transform: rotate3d(0, 0, 1, 15deg);
315
+ }
316
+
317
+ 40% {
318
+ -webkit-transform: rotate3d(0, 0, 1, -10deg);
319
+ -ms-transform: rotate3d(0, 0, 1, -10deg);
320
+ transform: rotate3d(0, 0, 1, -10deg);
321
+ }
322
+
323
+ 60% {
324
+ -webkit-transform: rotate3d(0, 0, 1, 5deg);
325
+ -ms-transform: rotate3d(0, 0, 1, 5deg);
326
+ transform: rotate3d(0, 0, 1, 5deg);
327
+ }
328
+
329
+ 80% {
330
+ -webkit-transform: rotate3d(0, 0, 1, -5deg);
331
+ -ms-transform: rotate3d(0, 0, 1, -5deg);
332
+ transform: rotate3d(0, 0, 1, -5deg);
333
+ }
334
+
335
+ 100% {
336
+ -webkit-transform: rotate3d(0, 0, 1, 0deg);
337
+ -ms-transform: rotate3d(0, 0, 1, 0deg);
338
+ transform: rotate3d(0, 0, 1, 0deg);
339
+ }
340
+ }
341
+
342
+ .swing {
343
+ -webkit-transform-origin: top center;
344
+ -ms-transform-origin: top center;
345
+ transform-origin: top center;
346
+ -webkit-animation-name: swing;
347
+ animation-name: swing;
348
+ }
349
+
350
+ @-webkit-keyframes tada {
351
+ 0% {
352
+ -webkit-transform: scale3d(1, 1, 1);
353
+ transform: scale3d(1, 1, 1);
354
+ }
355
+
356
+ 10%, 20% {
357
+ -webkit-transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
358
+ transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
359
+ }
360
+
361
+ 30%, 50%, 70%, 90% {
362
+ -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
363
+ transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
364
+ }
365
+
366
+ 40%, 60%, 80% {
367
+ -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
368
+ transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
369
+ }
370
+
371
+ 100% {
372
+ -webkit-transform: scale3d(1, 1, 1);
373
+ transform: scale3d(1, 1, 1);
374
+ }
375
+ }
376
+
377
+ @keyframes tada {
378
+ 0% {
379
+ -webkit-transform: scale3d(1, 1, 1);
380
+ -ms-transform: scale3d(1, 1, 1);
381
+ transform: scale3d(1, 1, 1);
382
+ }
383