Contact Form by BestWebSoft - Version 3.74

Version Description

  • 24.03.2014 =
  • NEW : Compatibility with plugin Contact Form Multi.
  • NEW : 'xlsx' mime-type is added.
  • NEW : Added transition to the contact form after submitting.
Download this release

Release Info

Developer bestwebsoft
Plugin Icon 128x128 Contact Form by BestWebSoft
Version 3.74
Comparing to
See all releases

Code changes from version 3.73 to 3.74

bws_menu/bws_menu.php CHANGED
@@ -1,41 +1,17 @@
1
  <?php
2
  /*
3
- Function for displaying BestWebSoft menu
 
4
  */
 
5
  if ( ! function_exists( 'bws_add_menu_render' ) ) {
6
  function bws_add_menu_render() {
7
  global $wpdb, $wpmu, $wp_version, $bws_plugin_info;
8
- $error = '';
9
- $message = '';
10
- $bwsmn_form_email = '';
11
  $bws_donate_link = 'https://www.2checkout.com/checkout/purchase?sid=1430388&quantity=10&product_id=13';
12
 
13
- // install the option defaults
14
- if ( 1 == $wpmu ) {
15
- if ( !get_site_option( 'bstwbsftwppdtplgns_options' ) )
16
- add_site_option( 'bstwbsftwppdtplgns_options', array(), '', 'yes' );
17
- $bstwbsftwppdtplgns_options = get_site_option( 'bstwbsftwppdtplgns_options' );
18
- } else {
19
- if ( !get_option( 'bstwbsftwppdtplgns_options' ) )
20
- add_option( 'bstwbsftwppdtplgns_options', array(), '', 'yes' );
21
- $bstwbsftwppdtplgns_options = get_option( 'bstwbsftwppdtplgns_options' );
22
- }
23
- if ( !isset( $bstwbsftwppdtplgns_options['bws_menu_version'] ) ) {
24
- $bstwbsftwppdtplgns_options['bws_menu_version'] = '1.1';
25
- update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options, '', 'yes' );
26
- }
27
-
28
- if ( isset( $_REQUEST['bwsmn_form_submit_switch'] ) && check_admin_referer( plugin_basename(__FILE__), 'bwsmn_nonce_submit_switch' ) ) {
29
- if ( $bstwbsftwppdtplgns_options['bws_menu_version'] == '1.1' )
30
- $bstwbsftwppdtplgns_options['bws_menu_version'] = 'old';
31
- else
32
- $bstwbsftwppdtplgns_options['bws_menu_version'] = '1.1';
33
- $bstwbsftwppdtplgns_options['bws_menu_time'] = strtotime('now');
34
- update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options, '', 'yes' );
35
- }
36
-
37
  if ( ! function_exists( 'is_plugin_active_for_network' ) )
38
- require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
39
 
40
  $bws_plugins = array(
41
  'captcha/captcha.php' => array(
@@ -223,6 +199,38 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
223
  'download' => 'http://bestwebsoft.com/plugin/sender/?k=89c297d14ba85a8417a0f2fc05e089c7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
224
  'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Sender+Bestwebsoft&plugin-search-input=Search+Plugins',
225
  'settings' => 'admin.php?page=sndr_settings'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  )
227
  );
228
  $bws_plugins_pro = array(
@@ -301,112 +309,24 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
301
  $all_plugins = get_plugins();
302
  $active_plugins = get_option( 'active_plugins' );
303
 
304
- if ( '1.1' == $bstwbsftwppdtplgns_options['bws_menu_version'] ) {
305
-
306
- $recommend_plugins = array_diff_key( $bws_plugins, $all_plugins );
307
-
308
- foreach ( $bws_plugins as $key_plugin => $value_plugin ) {
309
- if ( ! isset( $all_plugins[ $key_plugin ] ) && isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $all_plugins[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) {
310
- unset( $recommend_plugins[ $key_plugin ] );
311
- }
312
- }
313
 
314
- foreach ( $all_plugins as $key_plugin => $value_plugin ) {
315
- if ( ! isset( $bws_plugins[ $key_plugin ] ) && ! isset( $bws_plugins_pro[ $key_plugin ] ) )
316
- unset( $all_plugins[ $key_plugin ] );
317
-
318
- if ( isset( $bws_plugins[ $key_plugin ] ) && isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $all_plugins[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) {
319
- unset( $all_plugins[ $key_plugin ] );
320
- }
321
  }
322
- } else {
323
 
324
- $array_activate = array();
325
- $array_install = array();
326
- $array_recomend = array();
327
- $count_activate = $count_install = $count_recomend = 0;
328
 
329
- foreach ( $bws_plugins as $key_plugin => $value_plugin ) {
330
- if ( in_array( $key_plugin, $active_plugins ) || is_plugin_active_for_network( $key_plugin ) ) {
331
- $array_activate[ $count_activate ]["title"] = $value_plugin['name'];
332
- $array_activate[ $count_activate ]["link"] = $value_plugin['link'];
333
- $array_activate[ $count_activate ]["href"] = $value_plugin['download'];
334
- $array_activate[ $count_activate ]["url"] = $value_plugin['settings'];
335
- $count_activate++;
336
- } else if ( array_key_exists( $key_plugin, $all_plugins ) ) {
337
- $array_install[ $count_install ]["title"] = $value_plugin['name'];
338
- $array_install[ $count_install ]["link"] = $value_plugin['link'];
339
- $array_install[ $count_install ]["href"] = $value_plugin['download'];
340
- $count_install++;
341
- } else {
342
- $array_recomend[ $count_recomend ]["title"] = $value_plugin['name'];
343
- $array_recomend[ $count_recomend ]["link"] = $value_plugin['link'];
344
- $array_recomend[ $count_recomend ]["href"] = $value_plugin['download'];
345
- $array_recomend[ $count_recomend ]["slug"] = $value_plugin['wp_install'];
346
- $count_recomend++;
347
- }
348
- }
349
-
350
- $array_activate_pro = array();
351
- $array_install_pro = array();
352
- $array_recomend_pro = array();
353
- $count_activate_pro = $count_install_pro = $count_recomend_pro = 0;
354
- foreach ( $bws_plugins_pro as $key_plugin => $value_plugin ) {
355
- if ( in_array( $key_plugin, $active_plugins ) || is_plugin_active_for_network( $key_plugin ) ) {
356
- $array_activate_pro[ $count_activate_pro ]["title"] = $value_plugin['name'];
357
- $array_activate_pro[ $count_activate_pro ]["link"] = $value_plugin['link'];
358
- $array_activate_pro[ $count_activate_pro ]["href"] = $value_plugin['purchase'];
359
- $array_activate_pro[ $count_activate_pro ]["url"] = $value_plugin['settings'];
360
- $count_activate_pro++;
361
- } else if ( array_key_exists( $key_plugin, $all_plugins ) ) {
362
- $array_install_pro[ $count_install_pro ]["title"] = $value_plugin['name'];
363
- $array_install_pro[ $count_install_pro ]["link"] = $value_plugin['link'];
364
- $array_install_pro[ $count_install_pro ]["href"] = $value_plugin['purchase'];
365
- $count_install_pro++;
366
- } else {
367
- $array_recomend_pro[ $count_recomend_pro ]["title"] = $value_plugin['name'];
368
- $array_recomend_pro[ $count_recomend_pro ]["link"] = $value_plugin['link'];
369
- $array_recomend_pro[ $count_recomend_pro ]["href"] = $value_plugin['purchase'];
370
- $count_recomend_pro++;
371
- }
372
- }
373
- if ( $wp_version >= '3.4' ) {
374
- $wp_list_table = _get_list_table( 'WP_Themes_List_Table' );
375
- $wp_list_table->prepare_items();
376
- $current_theme = wp_get_theme();
377
- $array_activate_theme = array();
378
- $array_install_theme = array();
379
- $array_recomend_theme = array();
380
- $count_activate_theme = $count_install_theme = $count_recomend_theme = 0;
381
- $array_theme = array(
382
- array( 'central', 'Central', 'http://bestwebsoft.com/theme/central/?k=77c0199aabdb1f601a0504e312bee220&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'http://bestwebsoft.com/theme/central/?k=77c0199aabdb1f601a0504e312bee220&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', '/wp-admin/theme-install.php?tab=search&s=Central&search=Search' ),
383
- array( 'simple-classic', 'Simple Classic', 'http://bestwebsoft.com/theme/simple-classic/?k=b3990bfc85125747f48ece9f011f4cde&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'http://bestwebsoft.com/theme/simple-classic/?k=b3990bfc85125747f48ece9f011f4cde&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', '/wp-admin/theme-install.php?tab=search&type=term&s=Simple+Classic&search=Search' ),
384
- array( 'reddish', 'Reddish', 'http://bestwebsoft.com/theme/reddish/?k=1ea187e3fd401fd278e23a333abaf4f6&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'http://bestwebsoft.com/theme/reddish/?k=1ea187e3fd401fd278e23a333abaf4f6&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', '/wp-admin/theme-install.php?tab=search&type=term&s=reddish&search=Search' ),
385
- array( 'wordpost', 'Wordpost', 'http://bestwebsoft.com/theme/wordpost/?k=f0fc8c98135c9657751224562aca7a55&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version, 'http://bestwebsoft.com/theme/wordpost/?k=f0fc8c98135c9657751224562aca7a55&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download', '/wp-admin/theme-install.php?tab=search&type=term&s=Wordpost&search=Search' )
386
- );
387
- foreach ( $array_theme as $theme ) {
388
- if ( $current_theme->get( 'Name' ) == $theme[1] ) {
389
- $array_activate_theme[ $count_activate_theme ]["title"] = $theme[1];
390
- $array_activate_theme[ $count_activate_theme ]["link"] = $theme[2];
391
- $array_activate_theme[ $count_activate_theme ]["href"] = $theme[3];
392
- $count_activate_theme++;
393
- } elseif ( array_key_exists( $theme[0], $wp_list_table->items ) ) {
394
- $array_install_theme[ $count_install_theme ]["title"] = $theme[1];
395
- $array_install_theme[ $count_install_theme ]["link"] = $theme[2];
396
- $array_install_theme[ $count_install_theme ]["href"] = $theme[3];
397
- $count_install_theme++;
398
- } else {
399
- $array_recomend_theme[ $count_recomend_theme ]["title"] = $theme[1];
400
- $array_recomend_theme[ $count_recomend_theme ]["link"] = $theme[2];
401
- $array_recomend_theme[ $count_recomend_theme ]["href"] = $theme[3];
402
- $array_recomend_theme[ $count_recomend_theme ]["slug"] = $theme[4];
403
- $count_recomend_theme++;
404
- }
405
- }
406
  }
407
  }
408
 
409
- if ( ( isset( $_GET['action'] ) && 'system_status' == $_GET['action'] ) || 'old' == $bstwbsftwppdtplgns_options['bws_menu_version'] ) {
410
  $all_plugins = get_plugins();
411
  $active_plugins = get_option( 'active_plugins' );
412
  $sql_version = $wpdb->get_var( "SELECT VERSION() AS version" );
@@ -556,520 +476,356 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
556
  $error = __( "Sorry, email message could not be delivered.", 'bestwebsoft' );
557
  }
558
  }
559
-
560
  ?>
561
  <div class="wrap">
562
  <div class="icon32 icon32-bws" id="icon-options-general"></div>
563
- <h2>
564
- <span class="bws_main title">BestWebSoft</span>
565
- <?php if ( 'old' == $bstwbsftwppdtplgns_options['bws_menu_version'] && isset( $bstwbsftwppdtplgns_options['bws_menu_time'] ) && strtotime("-14 day") < $bstwbsftwppdtplgns_options['bws_menu_time'] ) { ?>
566
- <form method="post" action="admin.php?page=bws_plugins">
567
- <input type="hidden" name="bwsmn_form_submit_switch" value="submit" />
568
- <input type="submit" class="bws_switch_link" value="<?php _e( 'Switch to new interface', 'bestwebsoft' ) ?>" />
569
- <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit_switch' ); ?>
570
- </form>
571
- </h2>
572
- <div class="clear"></div>
573
- <div class="updated fade" <?php if ( ! ( isset( $_REQUEST['bwsmn_form_submit'] ) || isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div>
574
- <div class="error" <?php if ( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
575
- <h3 style="color: blue;"><?php _e( 'Pro plugins', 'bestwebsoft' ); ?></h3>
576
- <?php if ( 0 < $count_activate_pro ) { ?>
577
- <div style="padding-left:15px;">
578
- <h4><?php _e( 'Activated plugins', 'bestwebsoft' ); ?></h4>
579
- <?php foreach ( $array_activate_pro as $activate_plugin ) { ?>
580
- <div style="float:left; width:200px;"><?php echo $activate_plugin["title"]; ?></div> <p><a href="<?php echo $activate_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo $activate_plugin["url"]; ?>"><?php echo __( "Settings", 'bestwebsoft' ); ?></a></p>
581
- <?php } ?>
582
- </div>
583
- <?php } ?>
584
- <?php if ( 0 < $count_install_pro ) { ?>
585
- <div style="padding-left:15px;">
586
- <h4><?php _e( 'Installed plugins', 'bestwebsoft' ); ?></h4>
587
- <?php foreach ( $array_install_pro as $install_plugin) { ?>
588
- <div style="float:left; width:200px;"><?php echo $install_plugin["title"]; ?></div> <p><a href="<?php echo $install_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a></p>
589
- <?php } ?>
590
- </div>
591
- <?php } ?>
592
- <?php if ( 0 < $count_recomend_pro ) { ?>
593
- <div style="padding-left:15px;">
594
- <h4><?php _e( 'Recommended plugins', 'bestwebsoft' ); ?></h4>
595
- <?php foreach ( $array_recomend_pro as $recomend_plugin ) { ?>
596
- <div style="float:left; width:200px;"><?php echo $recomend_plugin["title"]; ?></div> <p><a href="<?php echo $recomend_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo $recomend_plugin["href"]; ?>" target="_blank"><?php echo __( "Purchase", 'bestwebsoft' ); ?></a></p>
597
- <?php } ?>
598
- </div>
599
- <?php } ?>
600
- <br />
601
- <h3 style="color: green"><?php _e( 'Free plugins', 'bestwebsoft' ); ?></h3>
602
- <?php if ( 0 < $count_activate ) { ?>
603
- <div style="padding-left:15px;">
604
- <h4><?php _e( 'Activated plugins', 'bestwebsoft' ); ?></h4>
605
- <?php foreach ( $array_activate as $activate_plugin ) { ?>
606
- <div style="float:left; width:200px;"><?php echo $activate_plugin["title"]; ?></div> <p><a href="<?php echo $activate_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo $activate_plugin["url"]; ?>"><?php echo __( "Settings", 'bestwebsoft' ); ?></a></p>
607
- <?php } ?>
608
- </div>
609
- <?php } ?>
610
- <?php if ( 0 < $count_install ) { ?>
611
- <div style="padding-left:15px;">
612
- <h4><?php _e( 'Installed plugins', 'bestwebsoft' ); ?></h4>
613
- <?php foreach ( $array_install as $install_plugin ) { ?>
614
- <div style="float:left; width:200px;"><?php echo $install_plugin["title"]; ?></div> <p><a href="<?php echo $install_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a></p>
615
- <?php } ?>
616
- </div>
617
  <?php } ?>
618
- <?php if ( 0 < $count_recomend ) { ?>
619
- <div style="padding-left:15px;">
620
- <h4><?php _e( 'Recommended plugins', 'bestwebsoft' ); ?></h4>
621
- <?php foreach ( $array_recomend as $recomend_plugin ) { ?>
622
- <div style="float:left; width:200px;"><?php echo $recomend_plugin["title"]; ?></div> <p><a href="<?php echo $recomend_plugin["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo $recomend_plugin["href"]; ?>" target="_blank"><?php echo __( "Download", 'bestwebsoft' ); ?></a> <a class="install-now" href="<?php echo get_bloginfo( "url" ) . $recomend_plugin["slug"]; ?>" title="<?php esc_attr( sprintf( __( 'Install %s' ), $recomend_plugin["title"] ) ) ?>" target="_blank"><?php echo __( 'Install now from wordpress.org', 'bestwebsoft' ) ?></a></p>
623
- <?php } ?>
624
- </div>
625
- <?php } ?>
626
- <br />
627
- <?php if ( $wp_version >= '3.4' ) { ?>
628
- <h3 style="color: green"><?php _e( 'Free themes', 'bestwebsoft' ); ?></h3>
629
- <?php if ( 0 < $count_activate_theme ) { ?>
630
- <div style="padding-left:15px;">
631
- <h4><?php _e( 'Activated theme', 'bestwebsoft' ); ?></h4>
632
- <div style="float:left; width:200px;"><?php echo $array_activate_theme[0]["title"]; ?></div> <p><a href="<?php echo $array_activate_theme[0]["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo wp_customize_url(); ?>" title="<?php echo esc_attr( sprintf( __( 'Customize &#8220;%s&#8221;' ), $current_theme->display('Name') ) ); ?>"><?php _e( 'Customize' ); ?></a></p>
633
- </div>
634
- <?php } ?>
635
- <?php if ( 0 < $count_install_theme ) { ?>
636
- <div style="padding-left:15px;">
637
- <h4><?php _e( 'Installed themes', 'bestwebsoft' ); ?></h4>
638
- <?php foreach ( $array_install_theme as $install_theme ) { ?>
639
- <div style="float:left; width:200px;"><?php echo $install_theme["title"]; ?></div> <p><a href="<?php echo $install_theme["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a></p>
640
- <?php } ?>
641
- </div>
642
- <?php } ?>
643
- <?php if ( 0 < $count_recomend_theme ) { ?>
644
- <div style="padding-left:15px;">
645
- <h4><?php _e( 'Recommended themes', 'bestwebsoft' ); ?></h4>
646
- <?php foreach ( $array_recomend_theme as $recomend_theme ) { ?>
647
- <div style="float:left; width:200px;"><?php echo $recomend_theme["title"]; ?></div> <p><a href="<?php echo $recomend_theme["link"]; ?>" target="_blank"><?php echo __( "Read more", 'bestwebsoft' ); ?></a> <a href="<?php echo $recomend_theme["href"]; ?>" target="_blank"><?php echo __( "Download", 'bestwebsoft' ); ?></a> <a class="install-now" href="<?php echo get_bloginfo( "url" ) . $recomend_theme["slug"]; ?>" title="<?php esc_attr( sprintf( __( 'Install %s' ), $recomend_theme["title"] ) ) ?>" target="_blank"><?php echo __( 'Install now from wordpress.org', 'bestwebsoft' ) ?></a></p>
648
- <?php } ?>
649
- </div>
650
- <?php } ?>
651
- <br />
652
- <?php } ?>
653
- <span style="color: rgb(136, 136, 136); font-size: 10px;"><?php _e( 'If you have any questions, please contact us via', 'bestwebsoft' ); ?> <a href="http://support.bestwebsoft.com">http://support.bestwebsoft.com</a></span>
654
- <div id="poststuff" class="bws_system_info_meta_box">
655
- <div class="postbox">
656
- <div class="handlediv" title="Click to toggle">
657
- <br>
658
- </div>
659
- <h3 class="hndle">
660
- <span><?php _e( 'System status', 'bestwebsoft' ); ?></span>
661
- </h3>
662
- <div class="inside">
663
- <table class="bws_system_info">
664
- <thead><tr><th><?php _e( 'Environment', 'bestwebsoft' ); ?></th><td></td></tr></thead>
665
- <tbody>
666
- <?php foreach ( $system_info['system_info'] as $key => $value ) { ?>
667
- <tr>
668
- <td scope="row"><?php echo $key; ?></td>
669
- <td scope="row"><?php echo $value; ?></td>
670
- </tr>
671
- <?php } ?>
672
- </tbody>
673
- </table>
674
- <table class="bws_system_info">
675
- <thead><tr><th><?php _e( 'Active Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead>
676
- <tbody>
677
- <?php foreach ( $system_info['active_plugins'] as $key => $value ) { ?>
678
- <tr>
679
- <td scope="row"><?php echo $key; ?></td>
680
- <td scope="row"><?php echo $value; ?></td>
681
- </tr>
682
- <?php } ?>
683
- </tbody>
684
- </table>
685
- <table class="bws_system_info">
686
- <thead><tr><th><?php _e( 'Inactive Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead>
687
- <tbody>
688
- <?php
689
- if ( ! empty( $system_info['inactive_plugins'] ) ) {
690
- foreach ( $system_info['inactive_plugins'] as $key => $value ) { ?>
691
- <tr>
692
- <td scope="row"><?php echo $key; ?></td>
693
- <td scope="row"><?php echo $value; ?></td>
694
- </tr>
695
- <?php }
696
- } ?>
697
- </tbody>
698
- </table>
699
- <div class="clear"></div>
700
- <form method="post" action="admin.php?page=bws_plugins">
701
- <p>
702
- <input type="hidden" name="bwsmn_form_submit" value="submit" />
703
- <input type="submit" class="button-primary" value="<?php _e( 'Send to support', 'bestwebsoft' ) ?>" />
704
- <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit' ); ?>
705
- </p>
706
- </form>
707
- <form method="post" action="admin.php?page=bws_plugins">
708
- <p>
709
- <input type="hidden" name="bwsmn_form_submit_custom_email" value="submit" />
710
- <input type="submit" class="button" value="<?php _e( 'Send to custom email &#187;', 'bestwebsoft' ) ?>" />
711
- <input type="text" value="<?php echo $bwsmn_form_email; ?>" name="bwsmn_form_email" />
712
- <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email' ); ?>
713
- </p>
714
- </form>
715
- </div>
716
- </div>
717
- </div>
718
- <?php } else { ?>
719
- <form method="post" action="admin.php?page=bws_plugins">
720
- <input type="hidden" name="bwsmn_form_submit_switch" value="submit" />
721
- <input type="submit" class="bws_switch_link" value="<?php _e( 'Switch to old interface', 'bestwebsoft' ) ?>" />
722
- <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit_switch' ); ?>
723
- </form>
724
- </h2>
725
- <div class="clear"></div>
726
- <h2 class="nav-tab-wrapper">
727
- <a class="nav-tab<?php if ( !isset( $_GET['action'] ) ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins"><?php _e( 'Plugins', 'bestwebsoft' ); ?></a>
728
- <?php if ( $wp_version >= '3.4' ) { ?>
729
- <a class="nav-tab<?php if ( isset( $_GET['action'] ) && 'themes' == $_GET['action'] ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins&amp;action=themes"><?php _e( 'Themes', 'bestwebsoft' ); ?></a>
730
- <?php } ?>
731
- <a class="nav-tab<?php if ( isset( $_GET['action'] ) && 'system_status' == $_GET['action'] ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins&amp;action=system_status"><?php _e( 'System status', 'bestwebsoft' ); ?></a>
732
- </h2>
733
- <?php if ( !isset( $_GET['action'] ) ) { ?>
734
- <ul class="subsubsub">
735
- <li><a <?php if ( !isset( $_GET['sub'] ) ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins"><?php _e( 'All', 'bestwebsoft' ); ?></a></li> |
736
- <li><a <?php if ( isset( $_GET['sub'] ) && 'installed' == $_GET['sub'] ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins&amp;sub=installed"><?php _e( 'Installed', 'bestwebsoft' ); ?></a></li> |
737
- <li><a <?php if ( isset( $_GET['sub'] ) && 'recommended' == $_GET['sub'] ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins&amp;sub=recommended"><?php _e( 'Recommended', 'bestwebsoft' ); ?></a></li>
738
- </ul>
739
- <div class="clear"></div>
740
- <?php if ( ( isset( $_GET['sub'] ) && 'installed' == $_GET['sub'] ) || !isset( $_GET['sub'] ) ) { ?>
741
- <h4 class="bws_installed"><?php _e( 'Installed plugins', 'bestwebsoft' ); ?></h4>
742
- <?php foreach ( $all_plugins as $key_plugin => $value_plugin ) {
743
-
744
- if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) {
745
- $key_plugin_explode = explode( '-plugin-pro/', $key_plugin );
746
- if ( isset( $key_plugin_explode[1] ) )
747
- $icon = $key_plugin_explode[0];
748
- else {
749
- $key_plugin_explode = explode( '-pro/', $key_plugin );
750
- $icon = $key_plugin_explode[0];
751
- }
752
- } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) {
753
- $key_plugin_explode = explode( '-plugin/', $key_plugin );
754
- if ( isset( $key_plugin_explode[1] ) )
755
- $icon = $key_plugin_explode[0];
756
- else {
757
- $key_plugin_explode = explode( '/', $key_plugin );
758
- $icon = $key_plugin_explode[0];
759
- }
760
  }
 
 
 
 
 
 
 
 
 
761
 
762
- if ( in_array( $key_plugin, $active_plugins ) || is_plugin_active_for_network( $key_plugin ) ) { ?>
763
- <?php if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) { ?>
764
- <div class="bws_product_box bws_exist_overlay">
765
- <div class="bws_product">
766
- <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
767
- <div class="bws_product_content">
768
- <div class="bws_product_icon">
769
- <div class="bws_product_icon_pro"></div>
770
- <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
771
- </div>
772
- <div class="bws_product_description"><?php echo $value_plugin["Description"]; ?></div>
773
- </div>
774
- <div class="clear"></div>
775
- </div>
776
- <div class="bws_product_links">
777
- <a href="<?php echo $bws_plugins_pro[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
778
- <span> | </span>
779
- <a href="<?php echo $bws_plugins_pro[ $key_plugin ]["settings"]; ?>" target="_blank"><?php _e( "Settings", 'bestwebsoft' ); ?></a>
780
  </div>
 
781
  </div>
782
- <?php } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) { ?>
783
- <div class="bws_product_box bws_product_free">
784
- <div class="bws_product">
785
- <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
786
- <div class="bws_product_content">
787
- <div class="bws_product_icon">
788
- <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
789
- </div>
790
- <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div>
 
 
 
 
791
  </div>
792
- <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
793
- <a class="bws_product_button" href="<?php echo $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ]["purchase"]; ?>" target="_blank">
794
- <?php _e( 'Go', 'bestwebsoft' );?> <strong>PRO</strong>
795
- </a>
796
- <?php } else { ?>
797
- <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank">
798
- <strong><?php _e( 'DONATE', 'bestwebsoft' );?></strong>
799
- </a>
800
- <?php } ?>
801
- <div class="clear"></div>
802
- </div>
803
- <div class="bws_product_links">
804
- <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
805
- <span> | </span>
806
- <a href="<?php echo $bws_plugins[ $key_plugin ]["settings"]; ?>" target="_blank"><?php _e( "Settings", 'bestwebsoft' ); ?></a>
807
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
808
  </div>
809
- <?php }
810
- } else {
811
- if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) { ?>
812
- <div class="bws_product_box bws_product_deactivated">
813
- <div class="bws_product">
814
- <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
815
- <div class="bws_product_content">
816
- <div class="bws_product_icon">
817
- <div class="bws_product_icon_pro"></div>
818
- <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
819
- </div>
820
- <div class="bws_product_description"><?php echo $bws_plugins_pro[ $key_plugin ]["description"]; ?></div>
821
  </div>
822
- <div class="clear"></div>
823
- </div>
824
- <div class="bws_product_links">
825
- <a href="<?php echo $bws_plugins_pro[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
826
- <span> | </span>
827
- <a class="bws_activate" href="plugins.php" title="<?php _e( "Activate this plugin", 'bestwebsoft' ); ?>" target="_blank"><?php _e( "Activate", 'bestwebsoft' ); ?></a>
828
  </div>
 
829
  </div>
830
- <?php } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) { ?>
831
- <div class="bws_product_box bws_product_deactivated bws_product_free">
832
- <div class="bws_product">
833
- <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
834
- <div class="bws_product_content">
835
- <div class="bws_product_icon">
836
- <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
837
- </div>
838
- <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div>
 
 
 
 
839
  </div>
840
- <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
841
- <a class="bws_product_button" href="<?php echo $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ]["purchase"]; ?>" target="_blank">
842
- <?php _e( 'Go', 'bestwebsoft' );?> <strong>PRO</strong>
843
- </a>
844
- <?php } else { ?>
845
- <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank">
846
- <strong><?php _e( 'DONATE', 'bestwebsoft' );?></strong>
847
- </a>
848
- <?php } ?>
849
- <div class="clear"></div>
850
- </div>
851
- <div class="bws_product_links">
852
- <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
853
- <span> | </span>
854
- <a class="bws_activate" href="plugins.php" title="<?php _e( "Activate this plugin", 'bestwebsoft' ); ?>" target="_blank"><?php _e( "Activate", 'bestwebsoft' ); ?></a>
855
  </div>
 
 
 
 
 
 
 
 
 
 
856
  </div>
857
- <?php }
858
- }
 
 
 
 
 
859
  }
860
- } ?>
861
- <div class="clear"></div>
862
- <?php if ( ( isset( $_GET['sub'] ) && 'recommended' == $_GET['sub'] ) || !isset( $_GET['sub'] ) ) { ?>
863
- <h4 class="bws_recommended"><?php _e( 'Recommended plugins', 'bestwebsoft' ); ?></h4>
864
- <?php foreach ( $recommend_plugins as $key_plugin => $value_plugin ) {
865
-
866
- if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) {
867
- $key_plugin_explode = explode( '-plugin-pro/', $key_plugin );
868
- if ( isset( $key_plugin_explode[1] ) )
869
- $icon = $key_plugin_explode[0];
870
- else {
871
- $key_plugin_explode = explode( '-pro/', $key_plugin );
872
- $icon = $key_plugin_explode[0];
873
- }
874
- } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) {
875
- $key_plugin_explode = explode( '-plugin/', $key_plugin );
876
- if ( isset( $key_plugin_explode[1] ) )
877
- $icon = $key_plugin_explode[0];
878
- else {
879
- $key_plugin_explode = explode( '/', $key_plugin );
880
- $icon = $key_plugin_explode[0];
881
- }
882
  }
883
- ?>
884
- <div class="bws_product_box">
885
- <div class="bws_product">
886
- <div class="bws_product_title"><?php echo $value_plugin["name"]; ?></div>
887
- <div class="bws_product_content">
888
- <div class="bws_product_icon">
889
- <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
890
- <div class="bws_product_icon_pro"></div>
891
- <?php } ?>
892
- <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
893
- </div>
894
- <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div>
 
 
 
 
 
 
 
895
  </div>
896
- <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
897
- <a class="bws_product_button" href="<?php echo $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ]["link"]; ?>" target="_blank">
898
- <?php echo _e( 'Go', 'bestwebsoft' );?> <strong>PRO</strong>
899
- </a>
900
- <?php } else { ?>
901
- <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank">
902
- <strong><?php echo _e( 'DONATE', 'bestwebsoft' );?></strong>
903
- </a>
904
- <?php } ?>
905
- </div>
906
- <div class="clear"></div>
907
- <div class="bws_product_links">
908
- <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php echo __( "Learn more", 'bestwebsoft' ); ?></a>
909
- <span> | </span>
910
- <a href="<?php echo $bws_plugins[ $key_plugin ]["wp_install"]; ?>" target="_blank"><?php echo __( "Install now", 'bestwebsoft' ); ?></a>
911
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
912
  </div>
913
- <?php }
914
- } ?>
915
- <?php } elseif ( 'themes' == $_GET['action'] ) { ?>
916
- <div id="availablethemes">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
917
  <?php
918
- global $tabs, $tab, $paged, $type, $theme_field_defaults;
919
- include( ABSPATH . 'wp-admin/includes/theme-install.php' );
920
- include( ABSPATH . 'wp-admin/includes/class-wp-themes-list-table.php' );
921
- include( ABSPATH . 'wp-admin/includes/class-wp-theme-install-list-table.php' );
922
-
923
- $theme_class = new WP_Theme_Install_List_Table();
924
- $paged = $theme_class->get_pagenum();
925
- $per_page = 36;
926
- $args = array( 'page' => $paged, 'per_page' => $per_page, 'fields' => $theme_field_defaults );
927
- $args['author'] = 'bestwebsoft';
928
- $args = apply_filters( 'install_themes_table_api_args_search', $args );
929
- $api = themes_api( 'query_themes', $args );
930
-
931
- if ( is_wp_error( $api ) )
932
- wp_die( $api->get_error_message() . '</p> <p><a href="#" onclick="document.location.reload(); return false;">' . __( 'Try again' ) . '</a>' );
933
-
934
- $theme_class->items = $api->themes;
935
- $theme_class->set_pagination_args( array(
936
- 'total_items' => $api->info['results'],
937
- 'per_page' => $per_page,
938
- 'infinite_scroll' => true,
939
- ) );
940
- $themes = $theme_class->items;
941
- foreach ( $themes as $theme ) {
942
- ?><div class="available-theme installable-theme"><?php
943
- global $themes_allowedtags;
944
- if ( empty( $theme ) )
945
- return;
946
-
947
- $name = wp_kses( $theme->name, $themes_allowedtags );
948
- $author = wp_kses( $theme->author, $themes_allowedtags );
949
- $preview_title = sprintf( __('Preview &#8220;%s&#8221;'), $name );
950
- $preview_url = add_query_arg( array(
951
- 'tab' => 'theme-information',
952
- 'theme' => $theme->slug,
953
- ), self_admin_url( 'theme-install.php' ) );
954
-
955
- $actions = array();
956
-
957
- $install_url = add_query_arg( array(
958
- 'action' => 'install-theme',
959
- 'theme' => $theme->slug,
960
- ), self_admin_url( 'update.php' ) );
961
-
962
- $update_url = add_query_arg( array(
963
- 'action' => 'upgrade-theme',
964
- 'theme' => $theme->slug,
965
- ), self_admin_url( 'update.php' ) );
966
-
967
- $status = 'install';
968
- $installed_theme = wp_get_theme( $theme->slug );
969
- if ( $installed_theme->exists() ) {
970
- if ( version_compare( $installed_theme->get('Version'), $theme->version, '=' ) )
971
- $status = 'latest_installed';
972
- elseif ( version_compare( $installed_theme->get('Version'), $theme->version, '>' ) )
973
- $status = 'newer_installed';
974
- else
975
- $status = 'update_available';
976
- }
977
- switch ( $status ) {
978
- default:
979
- case 'install':
980
- $actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __( 'Install Now' ) . '</a>';
981
- break;
982
- case 'update_available':
983
- $actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>';
984
- break;
985
- case 'newer_installed':
986
- case 'latest_installed':
987
- $actions[] = '<span class="install-now" title="' . esc_attr__( 'This theme is already installed and is up to date' ) . '">' . _x( 'Installed', 'theme' ) . '</span>';
988
- break;
989
- }
990
- $actions[] = '<a class="install-theme-preview" href="' . esc_url( $preview_url ) . '" title="' . esc_attr( sprintf( __( 'Preview %s' ), $name ) ) . '">' . __( 'Preview' ) . '</a>';
991
- $actions = apply_filters( 'theme_install_actions', $actions, $theme );
992
- ?>
993
- <a class="screenshot install-theme-preview" href="<?php echo esc_url( $preview_url ); ?>" title="<?php echo esc_attr( $preview_title ); ?>">
994
- <img src='<?php echo esc_url( $theme->screenshot_url ); ?>' width='150' />
995
- </a>
996
- <h3><?php echo $name; ?></h3>
997
- <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div>
998
- <div class="action-links">
999
- <ul>
1000
- <?php foreach ( $actions as $action ): ?>
1001
- <li><?php echo $action; ?></li>
1002
- <?php endforeach; ?>
1003
- <li class="hide-if-no-js"><a href="#" class="theme-detail"><?php _e('Details') ?></a></li>
1004
- </ul>
1005
- </div>
1006
- <?php $theme_class->install_theme_info( $theme );
1007
- ?></div>
1008
- <?php }
1009
- // end foreach $theme_names
1010
- $theme_class->theme_installer();
1011
- ?>
1012
- </div>
1013
- <?php } elseif ( 'system_status' == $_GET['action'] ) { ?>
1014
- <div class="updated fade" <?php if ( ! ( isset( $_REQUEST['bwsmn_form_submit'] ) || isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div>
1015
- <div class="error" <?php if ( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
1016
- <h3><?php _e( 'System status', 'bestwebsoft' ); ?></h3>
1017
- <div class="inside">
1018
- <table class="bws_system_info">
1019
- <thead><tr><th><?php _e( 'Environment', 'bestwebsoft' ); ?></th><td></td></tr></thead>
1020
- <tbody>
1021
- <?php foreach ( $system_info['system_info'] as $key => $value ) { ?>
1022
  <tr>
1023
  <td scope="row"><?php echo $key; ?></td>
1024
  <td scope="row"><?php echo $value; ?></td>
1025
  </tr>
1026
- <?php } ?>
1027
- </tbody>
1028
- </table>
1029
- <table class="bws_system_info">
1030
- <thead><tr><th><?php _e( 'Active Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead>
1031
- <tbody>
1032
- <?php foreach ( $system_info['active_plugins'] as $key => $value ) { ?>
1033
- <tr>
1034
- <td scope="row"><?php echo $key; ?></td>
1035
- <td scope="row"><?php echo $value; ?></td>
1036
- </tr>
1037
- <?php } ?>
1038
- </tbody>
1039
- </table>
1040
- <table class="bws_system_info">
1041
- <thead><tr><th><?php _e( 'Inactive Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead>
1042
- <tbody>
1043
- <?php
1044
- if ( ! empty( $system_info['inactive_plugins'] ) ) {
1045
- foreach ( $system_info['inactive_plugins'] as $key => $value ) { ?>
1046
- <tr>
1047
- <td scope="row"><?php echo $key; ?></td>
1048
- <td scope="row"><?php echo $value; ?></td>
1049
- </tr>
1050
- <?php }
1051
- } ?>
1052
- </tbody>
1053
- </table>
1054
- <div class="clear"></div>
1055
- <form method="post" action="admin.php?page=bws_plugins&amp;action=system_status">
1056
- <p>
1057
- <input type="hidden" name="bwsmn_form_submit" value="submit" />
1058
- <input type="submit" class="button-primary" value="<?php _e( 'Send to support', 'bestwebsoft' ) ?>" />
1059
- <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit' ); ?>
1060
- </p>
1061
- </form>
1062
- <form method="post" action="admin.php?page=bws_plugins&amp;action=system_status">
1063
- <p>
1064
- <input type="hidden" name="bwsmn_form_submit_custom_email" value="submit" />
1065
- <input type="submit" class="button" value="<?php _e( 'Send to custom email &#187;', 'bestwebsoft' ) ?>" />
1066
- <input type="text" value="<?php echo $bwsmn_form_email; ?>" name="bwsmn_form_email" />
1067
- <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email' ); ?>
1068
- </p>
1069
- </form>
1070
- </div>
1071
- <?php }
1072
- } ?>
1073
  </div>
1074
  <?php }
1075
  }
@@ -1084,9 +840,14 @@ if ( ! function_exists ( 'bws_plugin_init' ) ) {
1084
  if ( ! function_exists ( 'bws_admin_head' ) ) {
1085
  function bws_admin_head() {
1086
  global $wp_version;
 
 
 
 
 
1087
  if ( isset( $_GET['page'] ) && $_GET['page'] == "bws_plugins" ) {
1088
  wp_enqueue_style( 'bws_menu_style', plugins_url( 'css/style.css', __FILE__ ) );
1089
- wp_enqueue_script( 'bws_menu_script', plugins_url( 'js/bws_menu.js' , __FILE__ ) );
1090
  if ( $wp_version >= '3.8' )
1091
  wp_enqueue_script( 'theme-install' );
1092
  elseif ( $wp_version >= '3.4' )
1
  <?php
2
  /*
3
+ * Function for displaying BestWebSoft menu
4
+ * Version: 1.2.3
5
  */
6
+
7
  if ( ! function_exists( 'bws_add_menu_render' ) ) {
8
  function bws_add_menu_render() {
9
  global $wpdb, $wpmu, $wp_version, $bws_plugin_info;
10
+ $error = $message = $bwsmn_form_email = '';
 
 
11
  $bws_donate_link = 'https://www.2checkout.com/checkout/purchase?sid=1430388&quantity=10&product_id=13';
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  if ( ! function_exists( 'is_plugin_active_for_network' ) )
14
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
15
 
16
  $bws_plugins = array(
17
  'captcha/captcha.php' => array(
199
  'download' => 'http://bestwebsoft.com/plugin/sender/?k=89c297d14ba85a8417a0f2fc05e089c7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
200
  'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Sender+Bestwebsoft&plugin-search-input=Search+Plugins',
201
  'settings' => 'admin.php?page=sndr_settings'
202
+ ),
203
+ 'subscriber/subscriber.php' => array(
204
+ 'name' => 'Subscriber',
205
+ 'description' => 'This plugin allows you to subscribe users for newsletters from your website.',
206
+ 'link' => 'http://bestwebsoft.com/plugin/subscriber/?k=a4ecc1b7800bae7329fbe8b4b04e9c88&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
207
+ 'download' => 'http://bestwebsoft.com/plugin/subscriber/?k=a4ecc1b7800bae7329fbe8b4b04e9c88&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
208
+ 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Subscriber+Bestwebsoft&plugin-search-input=Search+Plugins',
209
+ 'settings' => 'admin.php?page=sbscrbr_settings_page'
210
+ ),
211
+ 'contact-form-multi/contact-form-multi.php' => array(
212
+ 'name' => 'Contact Form Multi',
213
+ 'description' => 'This plugin allows you to subscribe users for newsletters from your website.',
214
+ 'link' => 'http://bestwebsoft.com/plugin/contact-form-multi/?k=83cdd9e72a9f4061122ad28a67293c72&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
215
+ 'download' => 'http://bestwebsoft.com/plugin/contact-form-multi/?k=83cdd9e72a9f4061122ad28a67293c72&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
216
+ 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=Contact+Form+Multi+Bestwebsoft&plugin-search-input=Search+Plugins',
217
+ 'settings' => ''
218
+ ),
219
+ 'bws-google-maps/bws-google-maps.php' => array(
220
+ 'name' => 'BestWebSoft Google Maps',
221
+ 'description' => 'Easy to set up and insert Google Maps to your website.',
222
+ 'link' => 'http://bestwebsoft.com/plugin/bws-google-maps/?k=d8fac412d7359ebaa4ff53b46572f9f7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
223
+ 'download' => 'http://bestwebsoft.com/plugin/bws-google-maps/?k=d8fac412d7359ebaa4ff53b46572f9f7&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
224
+ 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=BestWebSoft+Google+Maps&plugin-search-input=Search+Plugins',
225
+ 'settings' => 'admin.php?page=bws-google-maps.php'
226
+ ),
227
+ 'bws-google-analytics/bws-google-analytics.php' => array(
228
+ 'name' => 'BestWebSoft Google Analytics',
229
+ 'description' => 'Allows you to retrieve basic stats from Google Analytics account and add the tracking code to your blog.',
230
+ 'link' => 'http://bestwebsoft.com/plugin/bws-google-analytics/?k=261c74cad753fb279cdf5a5db63fbd43&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version,
231
+ 'download' => 'http://bestwebsoft.com/plugin/bws-google-analytics/?k=261c74cad753fb279cdf5a5db63fbd43&pn=' . $bws_plugin_info["id"] . '&v=' . $bws_plugin_info["version"] . '&wp_v=' . $wp_version . '#download',
232
+ 'wp_install' => '/wp-admin/plugin-install.php?tab=search&s=BestWebSoft+Google+Analytics&plugin-search-input=Search+Plugins',
233
+ 'settings' => 'admin.php?page=bws-google-analytics.php'
234
  )
235
  );
236
  $bws_plugins_pro = array(
309
  $all_plugins = get_plugins();
310
  $active_plugins = get_option( 'active_plugins' );
311
 
312
+ $recommend_plugins = array_diff_key( $bws_plugins, $all_plugins );
 
 
 
 
 
 
 
 
313
 
314
+ foreach ( $bws_plugins as $key_plugin => $value_plugin ) {
315
+ if ( ! isset( $all_plugins[ $key_plugin ] ) && isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $all_plugins[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) {
316
+ unset( $recommend_plugins[ $key_plugin ] );
 
 
 
 
317
  }
318
+ }
319
 
320
+ foreach ( $all_plugins as $key_plugin => $value_plugin ) {
321
+ if ( ! isset( $bws_plugins[ $key_plugin ] ) && ! isset( $bws_plugins_pro[ $key_plugin ] ) )
322
+ unset( $all_plugins[ $key_plugin ] );
 
323
 
324
+ if ( isset( $bws_plugins[ $key_plugin ] ) && isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $all_plugins[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) {
325
+ unset( $all_plugins[ $key_plugin ] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  }
327
  }
328
 
329
+ if ( isset( $_GET['action'] ) && 'system_status' == $_GET['action'] ) {
330
  $all_plugins = get_plugins();
331
  $active_plugins = get_option( 'active_plugins' );
332
  $sql_version = $wpdb->get_var( "SELECT VERSION() AS version" );
476
  $error = __( "Sorry, email message could not be delivered.", 'bestwebsoft' );
477
  }
478
  }
 
479
  ?>
480
  <div class="wrap">
481
  <div class="icon32 icon32-bws" id="icon-options-general"></div>
482
+ <h2>BestWebSoft</h2>
483
+ <h2 class="nav-tab-wrapper">
484
+ <a class="nav-tab<?php if ( !isset( $_GET['action'] ) ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins"><?php _e( 'Plugins', 'bestwebsoft' ); ?></a>
485
+ <?php if ( $wp_version >= '3.4' ) { ?>
486
+ <a class="nav-tab<?php if ( isset( $_GET['action'] ) && 'themes' == $_GET['action'] ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins&amp;action=themes"><?php _e( 'Themes', 'bestwebsoft' ); ?></a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
487
  <?php } ?>
488
+ <a class="nav-tab<?php if ( isset( $_GET['action'] ) && 'system_status' == $_GET['action'] ) echo ' nav-tab-active'; ?>" href="admin.php?page=bws_plugins&amp;action=system_status"><?php _e( 'System status', 'bestwebsoft' ); ?></a>
489
+ </h2>
490
+ <?php if ( !isset( $_GET['action'] ) ) { ?>
491
+ <ul class="subsubsub">
492
+ <li><a <?php if ( !isset( $_GET['sub'] ) ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins"><?php _e( 'All', 'bestwebsoft' ); ?></a></li> |
493
+ <li><a <?php if ( isset( $_GET['sub'] ) && 'installed' == $_GET['sub'] ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins&amp;sub=installed"><?php _e( 'Installed', 'bestwebsoft' ); ?></a></li> |
494
+ <li><a <?php if ( isset( $_GET['sub'] ) && 'recommended' == $_GET['sub'] ) echo 'class="current" '; ?>href="admin.php?page=bws_plugins&amp;sub=recommended"><?php _e( 'Recommended', 'bestwebsoft' ); ?></a></li>
495
+ </ul>
496
+ <div class="clear"></div>
497
+ <?php if ( ( isset( $_GET['sub'] ) && 'installed' == $_GET['sub'] ) || !isset( $_GET['sub'] ) ) { ?>
498
+ <h4 class="bws_installed"><?php _e( 'Installed plugins', 'bestwebsoft' ); ?></h4>
499
+ <?php foreach ( $all_plugins as $key_plugin => $value_plugin ) {
500
+
501
+ if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) {
502
+ $key_plugin_explode = explode( '-plugin-pro/', $key_plugin );
503
+ if ( isset( $key_plugin_explode[1] ) )
504
+ $icon = $key_plugin_explode[0];
505
+ else {
506
+ $key_plugin_explode = explode( '-pro/', $key_plugin );
507
+ $icon = $key_plugin_explode[0];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
508
  }
509
+ } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) {
510
+ $key_plugin_explode = explode( '-plugin/', $key_plugin );
511
+ if ( isset( $key_plugin_explode[1] ) )
512
+ $icon = $key_plugin_explode[0];
513
+ else {
514
+ $key_plugin_explode = explode( '/', $key_plugin );
515
+ $icon = $key_plugin_explode[0];
516
+ }
517
+ }
518
 
519
+ if ( in_array( $key_plugin, $active_plugins ) || is_plugin_active_for_network( $key_plugin ) ) { ?>
520
+ <?php if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) { ?>
521
+ <div class="bws_product_box bws_exist_overlay">
522
+ <div class="bws_product">
523
+ <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
524
+ <div class="bws_product_content">
525
+ <div class="bws_product_icon">
526
+ <div class="bws_product_icon_pro"></div>
527
+ <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
528
+ </div>
529
+ <div class="bws_product_description"><?php echo $value_plugin["Description"]; ?></div>
 
 
 
 
 
 
 
530
  </div>
531
+ <div class="clear"></div>
532
  </div>
533
+ <div class="bws_product_links">
534
+ <a href="<?php echo $bws_plugins_pro[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
535
+ <span> | </span>
536
+ <a href="<?php echo $bws_plugins_pro[ $key_plugin ]["settings"]; ?>" target="_blank"><?php _e( "Settings", 'bestwebsoft' ); ?></a>
537
+ </div>
538
+ </div>
539
+ <?php } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) { ?>
540
+ <div class="bws_product_box bws_product_free">
541
+ <div class="bws_product">
542
+ <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
543
+ <div class="bws_product_content">
544
+ <div class="bws_product_icon">
545
+ <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
546
  </div>
547
+ <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
548
  </div>
549
+ <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
550
+ <a class="bws_product_button" href="<?php echo $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ]["purchase"]; ?>" target="_blank">
551
+ <?php _e( 'Go', 'bestwebsoft' );?> <strong>PRO</strong>
552
+ </a>
553
+ <?php } else { ?>
554
+ <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank">
555
+ <strong><?php _e( 'DONATE', 'bestwebsoft' );?></strong>
556
+ </a>
557
+ <?php } ?>
558
+ <div class="clear"></div>
559
+ </div>
560
+ <div class="bws_product_links">
561
+ <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
562
+ <span> | </span>
563
+ <a href="<?php echo $bws_plugins[ $key_plugin ]["settings"]; ?>" target="_blank"><?php _e( "Settings", 'bestwebsoft' ); ?></a>
564
  </div>
565
+ </div>
566
+ <?php }
567
+ } else {
568
+ if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) { ?>
569
+ <div class="bws_product_box bws_product_deactivated">
570
+ <div class="bws_product">
571
+ <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
572
+ <div class="bws_product_content">
573
+ <div class="bws_product_icon">
574
+ <div class="bws_product_icon_pro"></div>
575
+ <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
 
576
  </div>
577
+ <div class="bws_product_description"><?php echo $bws_plugins_pro[ $key_plugin ]["description"]; ?></div>
 
 
 
 
 
578
  </div>
579
+ <div class="clear"></div>
580
  </div>
581
+ <div class="bws_product_links">
582
+ <a href="<?php echo $bws_plugins_pro[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
583
+ <span> | </span>
584
+ <a class="bws_activate" href="plugins.php" title="<?php _e( "Activate this plugin", 'bestwebsoft' ); ?>" target="_blank"><?php _e( "Activate", 'bestwebsoft' ); ?></a>
585
+ </div>
586
+ </div>
587
+ <?php } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) { ?>
588
+ <div class="bws_product_box bws_product_deactivated bws_product_free">
589
+ <div class="bws_product">
590
+ <div class="bws_product_title"><?php echo $value_plugin["Name"]; ?></div>
591
+ <div class="bws_product_content">
592
+ <div class="bws_product_icon">
593
+ <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
594
  </div>
595
+ <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
596
  </div>
597
+ <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
598
+ <a class="bws_product_button" href="<?php echo $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ]["purchase"]; ?>" target="_blank">
599
+ <?php _e( 'Go', 'bestwebsoft' );?> <strong>PRO</strong>
600
+ </a>
601
+ <?php } else { ?>
602
+ <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank">
603
+ <strong><?php _e( 'DONATE', 'bestwebsoft' );?></strong>
604
+ </a>
605
+ <?php } ?>
606
+ <div class="clear"></div>
607
  </div>
608
+ <div class="bws_product_links">
609
+ <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php _e( "Learn more", 'bestwebsoft' ); ?></a>
610
+ <span> | </span>
611
+ <a class="bws_activate" href="plugins.php" title="<?php _e( "Activate this plugin", 'bestwebsoft' ); ?>" target="_blank"><?php _e( "Activate", 'bestwebsoft' ); ?></a>
612
+ </div>
613
+ </div>
614
+ <?php }
615
  }
616
+ }
617
+ } ?>
618
+ <div class="clear"></div>
619
+ <?php if ( ( isset( $_GET['sub'] ) && 'recommended' == $_GET['sub'] ) || !isset( $_GET['sub'] ) ) { ?>
620
+ <h4 class="bws_recommended"><?php _e( 'Recommended plugins', 'bestwebsoft' ); ?></h4>
621
+ <?php foreach ( $recommend_plugins as $key_plugin => $value_plugin ) {
622
+
623
+ if ( isset( $bws_plugins_pro[ $key_plugin ] ) ) {
624
+ $key_plugin_explode = explode( '-plugin-pro/', $key_plugin );
625
+ if ( isset( $key_plugin_explode[1] ) )
626
+ $icon = $key_plugin_explode[0];
627
+ else {
628
+ $key_plugin_explode = explode( '-pro/', $key_plugin );
629
+ $icon = $key_plugin_explode[0];
 
 
 
 
 
 
 
 
630
  }
631
+ } elseif ( isset( $bws_plugins[ $key_plugin ] ) ) {
632
+ $key_plugin_explode = explode( '-plugin/', $key_plugin );
633
+ if ( isset( $key_plugin_explode[1] ) )
634
+ $icon = $key_plugin_explode[0];
635
+ else {
636
+ $key_plugin_explode = explode( '/', $key_plugin );
637
+ $icon = $key_plugin_explode[0];
638
+ }
639
+ }
640
+ ?>
641
+ <div class="bws_product_box">
642
+ <div class="bws_product">
643
+ <div class="bws_product_title"><?php echo $value_plugin["name"]; ?></div>
644
+ <div class="bws_product_content">
645
+ <div class="bws_product_icon">
646
+ <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
647
+ <div class="bws_product_icon_pro"></div>
648
+ <?php } ?>
649
+ <img src="<?php echo plugins_url( "icons/" , __FILE__ ) . $icon . '.png'; ?>"/>
650
  </div>
651
+ <div class="bws_product_description"><?php echo $bws_plugins[ $key_plugin ]["description"]; ?></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
652
  </div>
653
+ <?php if ( isset( $bws_plugins[ $key_plugin ]['pro_version'] ) && isset( $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ] ) ) { ?>
654
+ <a class="bws_product_button" href="<?php echo $bws_plugins_pro[ $bws_plugins[ $key_plugin ]['pro_version'] ]["link"]; ?>" target="_blank">
655
+ <?php echo _e( 'Go', 'bestwebsoft' );?> <strong>PRO</strong>
656
+ </a>
657
+ <?php } else { ?>
658
+ <a class="bws_product_button bws_donate_button" href="<?php echo $bws_donate_link; ?>" target="_blank">
659
+ <strong><?php echo _e( 'DONATE', 'bestwebsoft' );?></strong>
660
+ </a>
661
+ <?php } ?>
662
+ </div>
663
+ <div class="clear"></div>
664
+ <div class="bws_product_links">
665
+ <a href="<?php echo $bws_plugins[ $key_plugin ]["link"]; ?>" target="_blank"><?php echo __( "Learn more", 'bestwebsoft' ); ?></a>
666
+ <span> | </span>
667
+ <a href="<?php echo $bws_plugins[ $key_plugin ]["wp_install"]; ?>" target="_blank"><?php echo __( "Install now", 'bestwebsoft' ); ?></a>
668
  </div>
669
+ </div>
670
+ <?php }
671
+ } ?>
672
+ <?php } elseif ( 'themes' == $_GET['action'] ) { ?>
673
+ <div id="availablethemes">
674
+ <?php
675
+ global $tabs, $tab, $paged, $type, $theme_field_defaults;
676
+ include( ABSPATH . 'wp-admin/includes/theme-install.php' );
677
+ include( ABSPATH . 'wp-admin/includes/class-wp-themes-list-table.php' );
678
+ include( ABSPATH . 'wp-admin/includes/class-wp-theme-install-list-table.php' );
679
+
680
+ $theme_class = new WP_Theme_Install_List_Table();
681
+ $paged = $theme_class->get_pagenum();
682
+ $per_page = 36;
683
+ $args = array( 'page' => $paged, 'per_page' => $per_page, 'fields' => $theme_field_defaults );
684
+ $args['author'] = 'bestwebsoft';
685
+ $args = apply_filters( 'install_themes_table_api_args_search', $args );
686
+ $api = themes_api( 'query_themes', $args );
687
+
688
+ if ( is_wp_error( $api ) )
689
+ wp_die( $api->get_error_message() . '</p> <p><a href="#" onclick="document.location.reload(); return false;">' . __( 'Try again' ) . '</a>' );
690
+
691
+ $theme_class->items = $api->themes;
692
+ $theme_class->set_pagination_args( array(
693
+ 'total_items' => $api->info['results'],
694
+ 'per_page' => $per_page,
695
+ 'infinite_scroll' => true,
696
+ ) );
697
+ $themes = $theme_class->items;
698
+ foreach ( $themes as $theme ) {
699
+ ?><div class="available-theme installable-theme"><?php
700
+ global $themes_allowedtags;
701
+ if ( empty( $theme ) )
702
+ return;
703
+
704
+ $name = wp_kses( $theme->name, $themes_allowedtags );
705
+ $author = wp_kses( $theme->author, $themes_allowedtags );
706
+ $preview_title = sprintf( __('Preview &#8220;%s&#8221;'), $name );
707
+ $preview_url = add_query_arg( array(
708
+ 'tab' => 'theme-information',
709
+ 'theme' => $theme->slug,
710
+ ), self_admin_url( 'theme-install.php' ) );
711
+
712
+ $actions = array();
713
+
714
+ $install_url = add_query_arg( array(
715
+ 'action' => 'install-theme',
716
+ 'theme' => $theme->slug,
717
+ ), self_admin_url( 'update.php' ) );
718
+
719
+ $update_url = add_query_arg( array(
720
+ 'action' => 'upgrade-theme',
721
+ 'theme' => $theme->slug,
722
+ ), self_admin_url( 'update.php' ) );
723
+
724
+ $status = 'install';
725
+ $installed_theme = wp_get_theme( $theme->slug );
726
+ if ( $installed_theme->exists() ) {
727
+ if ( version_compare( $installed_theme->get('Version'), $theme->version, '=' ) )
728
+ $status = 'latest_installed';
729
+ elseif ( version_compare( $installed_theme->get('Version'), $theme->version, '>' ) )
730
+ $status = 'newer_installed';
731
+ else
732
+ $status = 'update_available';
733
+ }
734
+ switch ( $status ) {
735
+ default:
736
+ case 'install':
737
+ $actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __( 'Install Now' ) . '</a>';
738
+ break;
739
+ case 'update_available':
740
+ $actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>';
741
+ break;
742
+ case 'newer_installed':
743
+ case 'latest_installed':
744
+ $actions[] = '<span class="install-now" title="' . esc_attr__( 'This theme is already installed and is up to date' ) . '">' . _x( 'Installed', 'theme' ) . '</span>';
745
+ break;
746
+ }
747
+ $actions[] = '<a class="install-theme-preview" href="' . esc_url( $preview_url ) . '" title="' . esc_attr( sprintf( __( 'Preview %s' ), $name ) ) . '">' . __( 'Preview' ) . '</a>';
748
+ $actions = apply_filters( 'theme_install_actions', $actions, $theme );
749
+ ?>
750
+ <a class="screenshot install-theme-preview" href="<?php echo esc_url( $preview_url ); ?>" title="<?php echo esc_attr( $preview_title ); ?>">
751
+ <img src='<?php echo esc_url( $theme->screenshot_url ); ?>' width='150' />
752
+ </a>
753
+ <h3><?php echo $name; ?></h3>
754
+ <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div>
755
+ <div class="action-links">
756
+ <ul>
757
+ <?php foreach ( $actions as $action ): ?>
758
+ <li><?php echo $action; ?></li>
759
+ <?php endforeach; ?>
760
+ <li class="hide-if-no-js"><a href="#" class="theme-detail"><?php _e('Details') ?></a></li>
761
+ </ul>
762
+ </div>
763
+ <?php $theme_class->install_theme_info( $theme );
764
+ ?></div>
765
+ <?php }
766
+ // end foreach $theme_names
767
+ $theme_class->theme_installer();
768
+ ?>
769
+ </div>
770
+ <?php } elseif ( 'system_status' == $_GET['action'] ) { ?>
771
+ <div class="updated fade" <?php if ( ! ( isset( $_REQUEST['bwsmn_form_submit'] ) || isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div>
772
+ <div class="error" <?php if ( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
773
+ <h3><?php _e( 'System status', 'bestwebsoft' ); ?></h3>
774
+ <div class="inside">
775
+ <table class="bws_system_info">
776
+ <thead><tr><th><?php _e( 'Environment', 'bestwebsoft' ); ?></th><td></td></tr></thead>
777
+ <tbody>
778
+ <?php foreach ( $system_info['system_info'] as $key => $value ) { ?>
779
+ <tr>
780
+ <td scope="row"><?php echo $key; ?></td>
781
+ <td scope="row"><?php echo $value; ?></td>
782
+ </tr>
783
+ <?php } ?>
784
+ </tbody>
785
+ </table>
786
+ <table class="bws_system_info">
787
+ <thead><tr><th><?php _e( 'Active Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead>
788
+ <tbody>
789
+ <?php foreach ( $system_info['active_plugins'] as $key => $value ) { ?>
790
+ <tr>
791
+ <td scope="row"><?php echo $key; ?></td>
792
+ <td scope="row"><?php echo $value; ?></td>
793
+ </tr>
794
+ <?php } ?>
795
+ </tbody>
796
+ </table>
797
+ <table class="bws_system_info">
798
+ <thead><tr><th><?php _e( 'Inactive Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead>
799
+ <tbody>
800
  <?php
801
+ if ( ! empty( $system_info['inactive_plugins'] ) ) {
802
+ foreach ( $system_info['inactive_plugins'] as $key => $value ) { ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
803
  <tr>
804
  <td scope="row"><?php echo $key; ?></td>
805
  <td scope="row"><?php echo $value; ?></td>
806
  </tr>
807
+ <?php }
808
+ } ?>
809
+ </tbody>
810
+ </table>
811
+ <div class="clear"></div>
812
+ <form method="post" action="admin.php?page=bws_plugins&amp;action=system_status">
813
+ <p>
814
+ <input type="hidden" name="bwsmn_form_submit" value="submit" />
815
+ <input type="submit" class="button-primary" value="<?php _e( 'Send to support', 'bestwebsoft' ) ?>" />
816
+ <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit' ); ?>
817
+ </p>
818
+ </form>
819
+ <form method="post" action="admin.php?page=bws_plugins&amp;action=system_status">
820
+ <p>
821
+ <input type="hidden" name="bwsmn_form_submit_custom_email" value="submit" />
822
+ <input type="submit" class="button" value="<?php _e( 'Send to custom email &#187;', 'bestwebsoft' ) ?>" />
823
+ <input type="text" value="<?php echo $bwsmn_form_email; ?>" name="bwsmn_form_email" />
824
+ <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email' ); ?>
825
+ </p>
826
+ </form>
827
+ </div>
828
+ <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
829
  </div>
830
  <?php }
831
  }
840
  if ( ! function_exists ( 'bws_admin_head' ) ) {
841
  function bws_admin_head() {
842
  global $wp_version;
843
+ if ( $wp_version < 3.8 )
844
+ wp_enqueue_style( 'pdfprnt-stylesheet', plugins_url( 'css/general_style_wp_before_3.8.css', __FILE__ ) );
845
+ else
846
+ wp_enqueue_style( 'pdfprnt-stylesheet', plugins_url( 'css/general_style.css', __FILE__ ) );
847
+
848
  if ( isset( $_GET['page'] ) && $_GET['page'] == "bws_plugins" ) {
849
  wp_enqueue_style( 'bws_menu_style', plugins_url( 'css/style.css', __FILE__ ) );
850
+ wp_enqueue_script( 'bws_menu_script', plugins_url( 'js/bws_menu.js' , __FILE__ ) );
851
  if ( $wp_version >= '3.8' )
852
  wp_enqueue_script( 'theme-install' );
853
  elseif ( $wp_version >= '3.4' )
bws_menu/css/general_style.css ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #adminmenu #toplevel_page_bws_plugins div.wp-menu-image,
2
+ .admin-color-classic #adminmenu #toplevel_page_bws_plugins div.wp-menu-image,
3
+ #adminmenu #toplevel_page_bws_plugins:hover div.wp-menu-image,
4
+ #adminmenu #toplevel_page_bws_plugins.wp-has-current-submenu div.wp-menu-image {
5
+ background: url("../images/icon_16_single.png") no-repeat scroll center center transparent;
6
+ }
7
+ #adminmenu #toplevel_page_bws_plugins.wp-not-current-submenu div.wp-menu-image {
8
+ opacity: 0.7;
9
+ }
10
+ #toplevel_page_bws_plugins .wp-submenu .wp-first-item {
11
+ display: none;
12
+ }
13
+ /*
14
+ * styles for rate-support div on the settings page
15
+ */
16
+ .bws-plugin-reviews {
17
+ background: none repeat scroll 0 0 #BEE1F1;
18
+ border: 1px solid #70A8C2;
19
+ border-radius: 3px;
20
+ max-width: 700px;
21
+ }
22
+ .bws-plugin-reviews-rate {
23
+ padding: 10px;
24
+ border-bottom: 1px dashed #70A8C2;
25
+ }
26
+ .bws-plugin-reviews-support {
27
+ padding: 10px;
28
+ }
29
+ /*
30
+ * styles for Go PRO tab
31
+ */
32
+ .bws_go_pro_tab {
33
+ background-color: #2A95C5;
34
+ border-color: #11688F;
35
+ color: #FFFFFF;
36
+ font-weight: normal;
37
+ text-shadow: none;
38
+ }
39
+ .bws_go_pro_tab:hover {
40
+ background-color: #2080AB;
41
+ color: #FFFFFF;
42
+ border-color: #11688F;
43
+ }
44
+ .bws_go_pro_tab.nav-tab-active {
45
+ background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
46
+ border-color: #CCCCCC #CCCCCC #F1F1F1;
47
+ color: #000000;
48
+ }
49
+ /*
50
+ * styles for pro_version settings and tooltip
51
+ */
52
+ table.bws_pro_version {
53
+ background: #E0E0E0;
54
+ border: 1px solid #AAA;
55
+ margin-bottom: 5px;
56
+ width: auto !important;
57
+ float: left;
58
+ }
59
+ table.bws_pro_version th,
60
+ table.bws_pro_version td {
61
+ color: #555;
62
+ padding-left: 10px;
63
+ }
64
+ td.bws_pro_version {
65
+ background: #E0E0E0;
66
+ border: 1px solid #AAA;
67
+ }
68
+ .bws_pro_version_tooltip {
69
+ background: #FFF;
70
+ border: 1px solid #AAA;
71
+ }
72
+ .form-table.bws_pro_version .bws_pro_version_tooltip th {
73
+ font-weight: normal;
74
+ padding-bottom: 10px;
75
+ }
76
+ /*
77
+ * styles for banner
78
+ */
79
+ .bws_banner_on_plugin_page {
80
+ border: 1px solid #d4d4d4;
81
+ margin: 12px 0;
82
+ background: #FFF;
83
+ position: relative;
84
+ overflow: hidden
85
+ }
86
+ .bws_banner_on_plugin_page .text {
87
+ color: #000;
88
+ font-size: 15px;
89
+ line-height: 26px;
90
+ margin: 18px 18px 14px;
91
+ float: left;
92
+ width: auto;
93
+ max-width: 80%;
94
+ }
95
+ .bws_banner_on_plugin_page .text span {
96
+ font-size: 12px;
97
+ opacity: 0.7;
98
+ }
99
+ .bws_banner_on_plugin_page .button {
100
+ float: left;
101
+ border: none;
102
+ font-size: 14px;
103
+ margin: 18px 0 18px 16px;
104
+ padding: 12px 0;
105
+ color: #FFF;
106
+ text-shadow: none;
107
+ font-weight: bold;
108
+ background: #0074A2;
109
+ -moz-border-radius: 3px;
110
+ border-radius: 3px;
111
+ -webkit-border-radius: 3px;
112
+ text-decoration: none;
113
+ height: 50px;
114
+ text-align: center;
115
+ text-transform: uppercase;
116
+ width: 147px;
117
+ box-shadow: none;
118
+ line-height: 26px;
119
+ }
120
+ .bws_banner_on_plugin_page .button:hover,
121
+ .bws_banner_on_plugin_page .button:focus {
122
+ background: #222;
123
+ color: #FFF;
124
+ }
125
+ .bws_banner_on_plugin_page .icon {
126
+ float: right;
127
+ margin: 12px 8px 8px 0;
128
+ }
129
+ .bws_banner_on_plugin_page .close_icon {
130
+ float: right;
131
+ margin: 8px;
132
+ cursor: pointer;
133
+ }
134
+ /* #### Mobile Phones Portrait or Landscape #### */
135
+ @media screen and (max-device-width: 640px) {
136
+ .bws_banner_on_plugin_page .text,
137
+ .bws_banner_on_plugin_page .icon,
138
+ .bws_banner_on_plugin_page .button_div,
139
+ .bws_banner_on_plugin_page .button {
140
+ float: none;
141
+ text-align: center;
142
+ max-width: 100%;
143
+ }
144
+ }
bws_menu/css/general_style_wp_before_3.8.css ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #adminmenu #toplevel_page_bws_plugins div.wp-menu-image {
2
+ background: url("../images/icon_16.png") no-repeat scroll center center transparent;
3
+ }
4
+ #wpadminbar li#wp-admin-bar-pdfprnt-bar-menu a:hover span.admin-bar-menu-bws-icon {
5
+ background: url("../images/icon_16_c.png") no-repeat scroll center center transparent;
6
+ }
7
+ #adminmenu #toplevel_page_bws_plugins:hover div.wp-menu-image,
8
+ #adminmenu #toplevel_page_bws_plugins.wp-has-current-submenu div.wp-menu-image {
9
+ background: url("../images/icon_16_c.png") no-repeat scroll center center transparent;
10
+ }
11
+ .wrap #icon-options-general.icon32-bws {
12
+ background: url("../images/icon_36.png") no-repeat scroll left top transparent;
13
+ }
14
+ #toplevel_page_bws_plugins .wp-submenu .wp-first-item {
15
+ display: none;
16
+ }
17
+ /*
18
+ * styles for rate-support div on the settings page
19
+ */
20
+ .bws-plugin-reviews {
21
+ background: none repeat scroll 0 0 #BEE1F1;
22
+ border: 1px solid #70A8C2;
23
+ border-radius: 3px;
24
+ max-width: 700px;
25
+ }
26
+ .bws-plugin-reviews-rate {
27
+ padding: 10px;
28
+ border-bottom: 1px dashed #70A8C2;
29
+ }
30
+ .bws-plugin-reviews-support {
31
+ padding: 10px;
32
+ }
33
+ /*
34
+ * styles for Go PRO tab
35
+ */
36
+ .bws_go_pro_tab {
37
+ background-color: #2A95C5;
38
+ border-color: #11688F;
39
+ color: #FFFFFF;
40
+ font-weight: normal !important;
41
+ text-shadow: none;
42
+ }
43
+ .bws_go_pro_tab:hover {
44
+ background-color: #2080AB;
45
+ color: #FFFFFF;
46
+ border-color: #11688F;
47
+ }
48
+ /*
49
+ * styles for pro_version settings and tooltip
50
+ */
51
+ table.bws_pro_version {
52
+ background: #E0E0E0;
53
+ border: 1px solid #AAA;
54
+ margin-bottom: 5px;
55
+ width: auto !important;
56
+ float: left;
57
+ }
58
+ table.bws_pro_version th,
59
+ table.bws_pro_version td {
60
+ color: #555;
61
+ padding-left: 10px;
62
+ }
63
+ td.bws_pro_version {
64
+ background: #E0E0E0;
65
+ border: 1px solid #AAA;
66
+ }
67
+ .bws_pro_version_tooltip {
68
+ background: #FFF;
69
+ border: 1px solid #AAA;
70
+ }
71
+ .form-table.bws_pro_version .bws_pro_version_tooltip th {
72
+ font-weight: normal;
73
+ padding-bottom: 10px;
74
+ }
75
+ /*
76
+ * styles for banner
77
+ */
78
+ .bws_banner_on_plugin_page {
79
+ border: 1px solid #d4d4d4;
80
+ background: #FFF;
81
+ position: relative;
82
+ overflow: hidden;
83
+ margin: 12px 0;
84
+ background: #ECECEC;
85
+ -moz-border-radius: 3px;
86
+ -webkit-border-radius: 3px;
87
+ border-radius: 3px;
88
+ }
89
+ .bws_banner_on_plugin_page .text {
90
+ color: #000;
91
+ font-size: 15px;
92
+ line-height: 26px;
93
+ margin: 18px 18px 14px;
94
+ float: left;
95
+ width: auto;
96
+ max-width: 80%;
97
+ }
98
+ .bws_banner_on_plugin_page .text span {
99
+ font-size: 12px;
100
+ opacity: 0.7;
101
+ }
102
+ .bws_banner_on_plugin_page .button {
103
+ float: left;
104
+ border: none;
105
+ font-size: 14px;
106
+ margin: 18px 0 18px 16px;
107
+ padding: 14px 0;
108
+ color: #FFF;
109
+ text-shadow: none;
110
+ font-weight: bold;
111
+ background: #0074A2;
112
+ -moz-border-radius: 3px;
113
+ border-radius: 3px;
114
+ -webkit-border-radius: 3px;
115
+ text-decoration: none;
116
+ height: 50px;
117
+ text-align: center;
118
+ text-transform: uppercase;
119
+ width: 147px;
120
+ box-shadow: none;
121
+ -moz-box-sizing: border-box;
122
+ -webkit-box-sizing: border-box;
123
+ box-sizing: border-box;
124
+ }
125
+ .bws_banner_on_plugin_page .button:hover,
126
+ .bws_banner_on_plugin_page .button:focus {
127
+ background: #222;
128
+ color: #FFF;
129
+ }
130
+ .bws_banner_on_plugin_page .icon {
131
+ float: right;
132
+ margin: 12px 8px 8px 0;
133
+ }
134
+ .bws_banner_on_plugin_page .close_icon {
135
+ float: right;
136
+ margin: 8px;
137
+ cursor: pointer;
138
+ }
139
+ /* #### Mobile Phones Portrait or Landscape #### */
140
+ @media screen and (max-device-width: 640px) {
141
+ .bws_banner_on_plugin_page .text,
142
+ .bws_banner_on_plugin_page .icon,
143
+ .bws_banner_on_plugin_page .button_div,
144
+ .bws_banner_on_plugin_page .button {
145
+ float: none;
146
+ text-align: center;
147
+ }
148
+ }
bws_menu/css/style.css CHANGED
@@ -86,7 +86,7 @@ h4.bws_recommended {
86
  padding: 0 10px;
87
  color: #a7a7a7;
88
  display: none;
89
- font-size: 13px;
90
  }
91
  .bws_product_links {
92
  padding: 10px 6px 12px;
@@ -136,15 +136,4 @@ h4.bws_recommended {
136
  }
137
  .bws_product_button.bws_donate_button:hover {
138
  background: #D69108 !important;
139
- }
140
- .bws_switch_link {
141
- background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
142
- border: medium none;
143
- color: #0074A2;
144
- float: right;
145
- cursor: pointer;
146
- font-size: 13px;
147
- }
148
- .bws_switch_link:hover {
149
- color: #2ea2cc;
150
  }
86
  padding: 0 10px;
87
  color: #a7a7a7;
88
  display: none;
89
+ font-size: 12px;
90
  }
91
  .bws_product_links {
92
  padding: 10px 6px 12px;
136
  }
137
  .bws_product_button.bws_donate_button:hover {
138
  background: #D69108 !important;
 
 
 
 
 
 
 
 
 
 
 
139
  }
bws_menu/icons/bws-google-analytics.png ADDED
Binary file
bws_menu/icons/bws-google-maps.png ADDED
Binary file
bws_menu/icons/contact-form-multi.png ADDED
Binary file
bws_menu/icons/subscriber.png ADDED
Binary file
{images → bws_menu/images}/icon_16.png RENAMED
File without changes
{images → bws_menu/images}/icon_16_b.png RENAMED
File without changes
{images → bws_menu/images}/icon_16_c.png RENAMED
File without changes
{images → bws_menu/images}/icon_16_single.png RENAMED
File without changes
{images → bws_menu/images}/icon_36.png RENAMED
File without changes
{images → bws_menu/images}/icon_36_b.png RENAMED
File without changes
contact_form.php CHANGED
@@ -4,10 +4,11 @@ Plugin Name: Contact Form
4
  Plugin URI: http://bestwebsoft.com/plugin/
5
  Description: Plugin for Contact Form.
6
  Author: BestWebSoft
7
- Version: 3.73
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
 
11
  /* @ Copyright 2014 BestWebSoft ( http://support.bestwebsoft.com )
12
 
13
  This program is free software; you can redistribute it and/or modify
@@ -24,11 +25,50 @@ License: GPLv2 or later
24
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
  */
26
 
27
- require_once( dirname( __FILE__ ) . '/bws_menu/bws_menu.php' );
28
-
29
  /* Add option page in admin menu */
30
  if ( ! function_exists( 'cntctfrm_admin_menu' ) ) {
31
  function cntctfrm_admin_menu() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  add_menu_page( 'BWS Plugins', 'BWS Plugins', 'manage_options', 'bws_plugins', 'bws_add_menu_render', plugins_url( "images/px.png", __FILE__ ), 1001 );
33
  add_submenu_page('bws_plugins', __( 'Contact Form Settings', 'contact_form' ), __( 'Contact Form', 'contact_form' ), 'manage_options', "contact_form.php", 'cntctfrm_settings_page' );
34
 
@@ -45,7 +85,8 @@ if ( ! function_exists ( 'cntctfrm_init' ) ) {
45
 
46
  load_plugin_textdomain( 'contact_form', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
47
 
48
- cntctfrm_check_and_send();
 
49
  }
50
  }
51
 
@@ -58,11 +99,12 @@ if ( ! function_exists ( 'cntctfrm_admin_init' ) ) {
58
  if ( ! isset( $bws_plugin_info ) || empty( $bws_plugin_info ) )
59
  $bws_plugin_info = array( 'id' => '77', 'version' => $cntctfrm_plugin_info["Version"] );
60
 
61
- /* Call register settings function */
62
- cntctfrm_settings();
63
-
64
  /* Function check if plugin is compatible with current WP version */
65
  cntctfrm_version_check();
 
 
 
 
66
  }
67
  }
68
 
@@ -133,7 +175,7 @@ if ( ! function_exists( 'cntctfrm_settings' ) ) {
133
  'cntctfrm_html_email' => 1,
134
  'cntctfrm_site_name_parameter' => 'SERVER_NAME'
135
  );
136
-
137
  /* Install the option defaults */
138
  if ( 1 == $wpmu ) {
139
  if ( ! get_site_option( 'cntctfrm_options' ) )
@@ -143,11 +185,33 @@ if ( ! function_exists( 'cntctfrm_settings' ) ) {
143
  add_option( 'cntctfrm_options', $cntctfrm_option_defaults, '', 'yes' );
144
  }
145
 
146
- /* Get options from the database */
147
- if ( 1 == $wpmu )
148
- $cntctfrm_options = get_site_option( 'cntctfrm_options' );
149
- else
150
- $cntctfrm_options = get_option( 'cntctfrm_options' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
 
152
  if ( empty( $cntctfrm_options['cntctfrm_language'] ) && ! is_array( $cntctfrm_options['cntctfrm_name_label'] ) ) {
153
  $cntctfrm_options['cntctfrm_name_label'] = array( 'en' => $cntctfrm_options['cntctfrm_name_label'] );
@@ -231,7 +295,7 @@ if ( ! function_exists ( 'cntctfrm_version_check' ) ) {
231
  $require_wp = "3.0"; /* Wordpress at least requires version */
232
  $plugin = plugin_basename( __FILE__ );
233
  if ( version_compare( $wp_version, $require_wp, "<" ) ) {
234
- if( is_plugin_active( $plugin ) ) {
235
  deactivate_plugins( $plugin );
236
  wp_die( "<strong>" . $cntctfrm_plugin_info['Name'] . " </strong> " . __( 'requires', 'contact_form' ) . " <strong>WordPress " . $require_wp . "</strong> " . __( 'or higher, that is why it has been deactivated! Please upgrade WordPress and try again.', 'contact_form') . "<br /><br />" . __( 'Back to the WordPress', 'contact_form') . " <a href='" . get_admin_url( null, 'plugins.php' ) . "'>" . __( 'Plugins page', 'contact_form') . "</a>." );
237
  }
@@ -242,17 +306,18 @@ if ( ! function_exists ( 'cntctfrm_version_check' ) ) {
242
  /* Add settings page in admin area */
243
  if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
244
  function cntctfrm_settings_page() {
245
- global $cntctfrm_options, $wpdb, $cntctfrm_option_defaults, $wp_version, $cntctfrm_plugin_info;
246
 
247
- if ( !function_exists( 'get_plugins' ) )
248
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
249
 
250
- if ( ! function_exists( 'is_plugin_active_for_network' ) )
251
- require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
252
-
253
  $all_plugins = get_plugins();
254
  $active_plugins = get_option( 'active_plugins' );
255
 
 
 
 
 
256
  /* Get Captcha options */
257
  if ( get_option( 'cptch_options' ) )
258
  $cptch_options = get_option( 'cptch_options' );
@@ -426,8 +491,8 @@ if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
426
  $cntctfrm_options_submit['cntctfrm_required_message_field'] = isset( $_POST['cntctfrm_required_message_field']) ? 1 : 0;
427
 
428
  $cntctfrm_options_submit['cntctfrm_required_symbol'] = isset( $_POST['cntctfrm_required_symbol']) ? $_POST['cntctfrm_required_symbol'] : '*';
429
- $cntctfrm_options_submit['cntctfrm_html_email'] = isset( $_POST['cntctfrm_html_email']) ? 1 : 0;
430
- $cntctfrm_options_submit['cntctfrm_site_name_parameter'] = $_POST['cntctfrm_site_name_parameter'];
431
  $cntctfrm_options_submit['cntctfrm_display_add_info'] = isset( $_POST['cntctfrm_display_add_info']) ? 1 : 0;
432
 
433
  if ( 1 == $cntctfrm_options_submit['cntctfrm_display_add_info'] ) {
@@ -445,7 +510,7 @@ if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
445
  $cntctfrm_options_submit['cntctfrm_change_label'] = isset( $_POST['cntctfrm_change_label']) ? 1 : 0;
446
 
447
  if ( 1 == $cntctfrm_options_submit['cntctfrm_change_label'] ) {
448
- foreach ( $_POST['cntctfrm_name_label'] as $key => $val ){
449
  $cntctfrm_options_submit['cntctfrm_name_label'][ $key ] = stripcslashes( htmlspecialchars( $_POST['cntctfrm_name_label'][ $key ] ) );
450
  $cntctfrm_options_submit['cntctfrm_address_label'][ $key ] = stripcslashes( htmlspecialchars( $_POST['cntctfrm_address_label'][ $key ] ) );
451
  $cntctfrm_options_submit['cntctfrm_email_label'][ $key ] = stripcslashes( htmlspecialchars( $_POST['cntctfrm_email_label'][ $key ] ) );
@@ -531,6 +596,7 @@ if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
531
  $cntctfrm_options_submit['cntctfrm_redirect_url'] = $_POST['cntctfrm_redirect_url'];
532
  }
533
  $cntctfrm_options = array_merge( $cntctfrm_options, $cntctfrm_options_submit );
 
534
  if ( 0 == $cntctfrm_options_submit['cntctfrm_action_after_send']
535
  && ( "" == trim( $cntctfrm_options_submit['cntctfrm_redirect_url'] )
536
  || ! preg_match( '@^(?:http://)?([^/]+)@i', trim( $cntctfrm_options_submit['cntctfrm_redirect_url'] ) ) ) ) {
@@ -540,10 +606,10 @@ if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
540
  if ( 'user' == $cntctfrm_options_submit['cntctfrm_select_email'] ) {
541
  if ( '3.3' > $wp_version && function_exists( 'get_userdatabylogin' ) && false !== get_userdatabylogin( $cntctfrm_options_submit['cntctfrm_user_email'] ) ) {
542
  //
543
- } else if( false !== get_user_by( 'login', $cntctfrm_options_submit['cntctfrm_user_email'] ) ) {
544
  //
545
  } else {
546
- $error .=__( "Such user does not exist. Settings are not saved.", 'contact_form' );
547
  }
548
  } else {
549
  if ( "" == $cntctfrm_options_submit['cntctfrm_custom_email'] || ! preg_match( "/^((?:[a-z0-9_']+(?:[a-z0-9\-_\.']+)?@[a-z0-9]+(?:[a-z0-9\-\.]+)?\.[a-z]{2,5})[, ]*)+$/i", trim( $cntctfrm_options_submit['cntctfrm_custom_email'] ) ) ){
@@ -556,11 +622,23 @@ if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
556
  $error .= __( "Please enter a valid email address in the 'FROM' field. Settings are not saved.", 'contact_form' );
557
  }
558
  }
559
- if ( '' == $error ) {
560
- update_option( 'cntctfrm_options', $cntctfrm_options, '', 'yes' );
 
 
 
 
 
 
 
 
 
 
 
561
  $message = __( "Settings saved.", 'contact_form' );
562
  }
563
  }
 
564
  /* Display form on the setting page */
565
  $lang_codes = array(
566
  'aa' => 'Afar', 'ab' => 'Abkhazian', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'ba' => 'Bashkir', 'bm' => 'Bambara', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali',
@@ -577,19 +655,9 @@ if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
577
 
578
  /* GO PRO */
579
  if ( isset( $_GET['action'] ) && 'go_pro' == $_GET['action'] ) {
580
- global $wpmu;
581
 
582
  $bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? trim( $_POST['bws_license_key'] ) : "";
583
- $bstwbsftwppdtplgns_options_defaults = array();
584
- if ( 1 == $wpmu ) {
585
- if ( !get_site_option( 'bstwbsftwppdtplgns_options' ) )
586
- add_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options_defaults, '', 'yes' );
587
- $bstwbsftwppdtplgns_options = get_site_option( 'bstwbsftwppdtplgns_options' );
588
- } else {
589
- if ( !get_option( 'bstwbsftwppdtplgns_options' ) )
590
- add_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options_defaults, '', 'yes' );
591
- $bstwbsftwppdtplgns_options = get_option( 'bstwbsftwppdtplgns_options' );
592
- }
593
 
594
  if ( isset( $_POST['bws_license_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bws_license_nonce_name' ) ) {
595
  if ( '' != $bws_license_key ) {
@@ -633,8 +701,7 @@ if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
633
  $error = __( "Unfortunately, you have exceeded the number of available tries per day. Please, upload the plugin manually.", 'contact_form' );
634
  }
635
  }
636
- if ( '' == $error ) {
637
- global $wpmu;
638
  $bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key;
639
 
640
  $url = 'http://bestwebsoft.com/wp-content/plugins/paid-products/plugins/downloads/?bws_first_download=' . $bws_license_plugin . '&bws_license_key=' . $bws_license_key . '&download_from=5';
@@ -705,10 +772,17 @@ if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
705
  <?php if ( ! isset( $_GET['action'] ) ) { ?>
706
  <form id="cntctfrm_settings_form" method="post" action="admin.php?page=contact_form.php">
707
  <span style="margin-bottom:15px;">
708
- <p><?php _e( "If you would like to add the Contact Form to your website, just copy and paste this shortcode to your post or page or widget:", 'contact_form' ); ?> [contact_form] <?php _e( "or", 'contact_form' ); ?> [contact_form lang=en]<br />
709
- <?php _e( "If have any problems with the standard shortcode [contact_form], you should use the shortcode", 'contact_form' ); ?> [bws_contact_form] (<?php _e( "or", 'contact_form' ); ?> [bws_contact_form lang=en]) <?php _e( "or", 'contact_form' ); ?> [bestwebsoft_contact_form] (<?php _e( "or", 'contact_form' ); ?>
710
- [bestwebsoft_contact_form lang=en]). <?php _e( "They work the same way.", 'contact_form' ); ?></p>
711
- <?php _e( "If you leave the fields empty, the messages will be sent to the email address specified during registration.", 'contact_form' ); ?>
 
 
 
 
 
 
 
712
  </span>
713
  <table class="form-table" style="width:auto;">
714
  <tr valign="top">
@@ -1027,7 +1101,11 @@ if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
1027
  <input type="text" name="cntctfrm_captcha_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_captcha_error']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for the Captcha field", 'contact_form' ); ?></span><br />
1028
  <input type="text" name="cntctfrm_form_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_form_error']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for the whole form", 'contact_form' ); ?></span><br />
1029
  </div>
1030
- <span class="cntctfrm_info" style="margin-left: 5px;"><?php _e( "Use shortcode", 'contact_form' ); echo " [bestwebsoft_contact_form lang=en] " . __( "or", 'contact_form' ) . " [bestwebsoft_contact_form] "; _e( "for this language", 'contact_form' ); ?></span>
 
 
 
 
1031
  </div>
1032
  <?php if ( ! empty( $cntctfrm_options['cntctfrm_language'] ) ) {
1033
  foreach ( $cntctfrm_options['cntctfrm_language'] as $val ) { ?>
@@ -1057,7 +1135,11 @@ if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
1057
  <input type="text" name="cntctfrm_captcha_error[<?php echo $val; ?>]" value="<?php if ( isset( $cntctfrm_options['cntctfrm_captcha_error'][ $val ] ) ) echo $cntctfrm_options['cntctfrm_captcha_error'][ $val ]; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for the Captcha field", 'contact_form' ); ?></span><br />
1058
  <input type="text" name="cntctfrm_form_error[<?php echo $val; ?>]" value="<?php if ( isset( $cntctfrm_options['cntctfrm_form_error'][ $val ] ) ) echo $cntctfrm_options['cntctfrm_form_error'][ $val ]; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for the whole form", 'contact_form' ); ?></span><br />
1059
  </div>
1060
- <span class="cntctfrm_info" style="margin-left: 5px;"><?php _e( "Use shortcode", 'contact_form' ); echo " [bestwebsoft_contact_form lang=" . $val . "] "; _e( "for this language", 'contact_form' ); ?></span>
 
 
 
 
1061
  </div>
1062
  <?php }
1063
  } ?>
@@ -1076,13 +1158,21 @@ if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
1076
  <div class="clear"></div>
1077
  <div class="cntctfrm_language_tab cntctfrm_tab_en" style=" padding: 5px 10px 5px 5px;">
1078
  <input type="text" name="cntctfrm_thank_text[en]" value="<?php echo $cntctfrm_options['cntctfrm_thank_text']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Text", 'contact_form' ); ?></span><br />
1079
- <span class="cntctfrm_info"><?php _e( "Use shortcode", 'contact_form' ); echo " [bestwebsoft_contact_form lang=en] " . __( "or", 'contact_form' ) . " [bestwebsoft_contact_form] "; _e( "for this language", 'contact_form' ); ?></span>
 
 
 
 
1080
  </div>
1081
  <?php if ( ! empty( $cntctfrm_options['cntctfrm_language'] ) ) {
1082
  foreach ( $cntctfrm_options['cntctfrm_language'] as $val ) { ?>
1083
  <div class="cntctfrm_language_tab hidden cntctfrm_tab_<?php echo $val; ?>" style=" padding: 5px 10px 5px 5px;">
1084
  <input type="text" name="cntctfrm_thank_text[<?php echo $val; ?>]" value="<?php if ( isset( $cntctfrm_options['cntctfrm_thank_text'][ $val ] ) ) echo $cntctfrm_options['cntctfrm_thank_text'][ $val ]; ?>" /> <span class="cntctfrm_info"><?php _e( "Text", 'contact_form' ); ?></span><br />
1085
- <span class="cntctfrm_info"><?php _e( "Use shortcode", 'contact_form' ); echo " [bestwebsoft_contact_form lang=" . $val . "] "; _e( "for this language", 'contact_form' ); ?></span>
 
 
 
 
1086
  </div>
1087
  <?php }
1088
  } ?>
@@ -1108,12 +1198,12 @@ if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
1108
  <?php wp_nonce_field( plugin_basename(__FILE__), 'cntctfrm_nonce_name' ); ?>
1109
  <div class="bws-plugin-reviews">
1110
  <div class="bws-plugin-reviews-rate">
1111
- <?php _e( 'If you enjoy our plugin, please give it 5 stars on WordPress', 'contact_form' ); ?>:
1112
- <a href="http://wordpress.org/support/view/plugin-reviews/contact-form-plugin" target="_blank" title="Contact Form reviews"><?php _e( 'Rate the plugin', 'contact_form' ); ?></a><br/>
1113
  </div>
1114
  <div class="bws-plugin-reviews-support">
1115
- <?php _e( 'If there is something wrong about it, please contact us', 'contact_form' ); ?>:
1116
- <a href="http://support.bestwebsoft.com">http://support.bestwebsoft.com</a>
1117
  </div>
1118
  </div>
1119
  </form>
@@ -1438,17 +1528,35 @@ if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
1438
  }
1439
 
1440
  /* Display contact form in front end - page or post */
1441
- if( ! function_exists( 'cntctfrm_display_form' ) ) {
1442
  function cntctfrm_display_form( $atts = array( 'lang' => 'en' ) ) {
1443
- global $error_message, $cntctfrm_options, $cntctfrm_result;
1444
  extract( shortcode_atts( array( 'lang' => 'en' ), $atts ) );
1445
- $cntctfrm_options = get_option( 'cntctfrm_options' );
1446
  $content = "";
1447
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1448
  if ( '80' != $_SERVER["SERVER_PORT"] || ( isset( $_SERVER["HTTPS"] ) && '443' != $_SERVER["SERVER_PORT"] && strtolower( $_SERVER["HTTPS"] ) == "on" ) )
1449
- $page_url = $page_url = ( isset( $_SERVER["HTTPS"] ) && strtolower( $_SERVER["HTTPS"] ) == "on" ? "https://" : "http://" ) . $_SERVER[ $cntctfrm_options['cntctfrm_site_name_parameter'] ].':'. $_SERVER["SERVER_PORT"].strip_tags( $_SERVER["REQUEST_URI"] );
1450
  else
1451
- $page_url = ( isset( $_SERVER["HTTPS"] ) && strtolower( $_SERVER["HTTPS"] ) == "on" ? "https://" : "http://" ) . $_SERVER[ $cntctfrm_options['cntctfrm_site_name_parameter'] ] . strip_tags( $_SERVER["REQUEST_URI"] );
1452
 
1453
  /* If contact form submited */
1454
  $name = isset( $_POST['cntctfrm_contact_name'] ) ? htmlspecialchars( stripslashes( $_POST['cntctfrm_contact_name'] ) ) : "";
@@ -1469,14 +1577,17 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
1469
  /* If it is good */
1470
  if ( true === $cntctfrm_result ) {
1471
  $_SESSION['cntctfrm_send_mail'] = true;
 
1472
  if ( 1 == $cntctfrm_options['cntctfrm_action_after_send'] )
1473
  $content .= '<div id="cntctfrm_thanks">' . $cntctfrm_options['cntctfrm_thank_text'][ $lang ] . '</div>';
1474
  else
1475
- $content .= "<script type='text/javascript'>window.location.href = '" . $cntctfrm_options['cntctfrm_redirect_url']."';</script>";
1476
- } else if ( false === $cntctfrm_result ) {
 
1477
  /* If email not be delivered */
1478
  $error_message['error_form'] = __( "Sorry, email message could not be delivered.", 'contact_form' );
1479
  }
 
1480
  if ( true !== $cntctfrm_result ) {
1481
  $_SESSION['cntctfrm_send_mail'] = false;
1482
  /* Output form */
@@ -1501,7 +1612,7 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
1501
  $content .= '<div style="text-align: left;">
1502
  <label for="cntctfrm_contact_address">' . $cntctfrm_options['cntctfrm_address_label'][ $lang ] . ( $cntctfrm_options['cntctfrm_required_address_field'] == 1 ? ' <span class="required">' . $cntctfrm_options['cntctfrm_required_symbol'] . '</span></label>' : '</label>' ) . '
1503
  </div>';
1504
- if( isset( $error_message['error_address'] ) ) {
1505
  $content .= '<div style="text-align: left; color: red;">' . $error_message['error_address'] . '</div>';
1506
  }
1507
  $content .= '<div style="text-align: left;">
@@ -1578,8 +1689,10 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
1578
  $content .= apply_filters( 'cntctfrm_display_captcha' , $error_message );
1579
  }
1580
 
1581
- $content .= '<div style="text-align: left; padding-top: 8px;">
1582
- <input type="hidden" value="send" name="cntctfrm_contact_action"><input type="hidden" value="Version: 3.30" />
 
 
1583
  <input type="hidden" value="' . $lang . '" name="cntctfrm_language">
1584
  <input type="submit" value="'. $cntctfrm_options['cntctfrm_submit_label'][ $lang ] . '" style="cursor: pointer; margin: 0pt; text-align: center;margin-bottom:10px;" />
1585
  </div>
@@ -1591,18 +1704,31 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
1591
 
1592
  if ( ! function_exists( 'cntctfrm_check_and_send' ) ) {
1593
  function cntctfrm_check_and_send() {
1594
- global $cntctfrm_result;
1595
- $cntctfrm_options = get_option( 'cntctfrm_options' );
1596
- if ( isset( $_POST['cntctfrm_contact_action'] ) ) {
1597
- /* Check all input data */
1598
- $cntctfrm_result = cntctfrm_check_form();
1599
- }
1600
- /* If it is good */
1601
- if ( true === $cntctfrm_result ) {
1602
- $_SESSION['cntctfrm_send_mail'] = true;
1603
- if ( 0 == $cntctfrm_options['cntctfrm_action_after_send'] ) {
1604
- wp_redirect( $cntctfrm_options['cntctfrm_redirect_url'] );
1605
- exit;
 
 
 
 
 
 
 
 
 
 
 
 
 
1606
  }
1607
  }
1608
  }
@@ -1611,14 +1737,9 @@ if ( ! function_exists( 'cntctfrm_check_and_send' ) ) {
1611
  /* Check all input data */
1612
  if ( ! function_exists( 'cntctfrm_check_form' ) ) {
1613
  function cntctfrm_check_form() {
1614
- global $error_message;
1615
- global $cntctfrm_options;
1616
-
1617
  $language = isset( $_POST['cntctfrm_language'] ) ? $_POST['cntctfrm_language'] : 'en';
1618
- $path_of_uploaded_file = '';
1619
- if ( empty( $cntctfrm_options ) )
1620
- $cntctfrm_options = get_option( 'cntctfrm_options' );
1621
- $cntctfrm_result = "";
1622
  /* Error messages array */
1623
  $error_message = array();
1624
 
@@ -1637,18 +1758,18 @@ if ( ! function_exists( 'cntctfrm_check_form' ) ) {
1637
  $phone = strip_tags( preg_replace ( '/<[^>]*>/', '', preg_replace ( '/<script.*<\/[^>]*>/', '', $phone ) ) );
1638
 
1639
  if ( 1 == $cntctfrm_options['cntctfrm_required_name_field'] && 1 == $cntctfrm_options['cntctfrm_display_name_field'] )
1640
- $error_message['error_name'] = $cntctfrm_options['cntctfrm_name_error'][$language];
1641
  if ( 1 == $cntctfrm_options['cntctfrm_required_address_field'] && 1 == $cntctfrm_options['cntctfrm_display_address_field'] )
1642
- $error_message['error_address'] = $cntctfrm_options['cntctfrm_address_error'][$language];
1643
  if ( 1 == $cntctfrm_options['cntctfrm_required_email_field'] )
1644
- $error_message['error_email'] = $cntctfrm_options['cntctfrm_email_error'][$language];
1645
  if ( 1 == $cntctfrm_options['cntctfrm_required_subject_field'] )
1646
- $error_message['error_subject'] = $cntctfrm_options['cntctfrm_subject_error'][$language];
1647
  if ( 1 == $cntctfrm_options['cntctfrm_required_message_field'] )
1648
- $error_message['error_message'] = $cntctfrm_options['cntctfrm_message_error'][$language];
1649
  if ( 1 == $cntctfrm_options['cntctfrm_required_phone_field'] && 1 == $cntctfrm_options['cntctfrm_display_phone_field'] )
1650
- $error_message['error_phone'] = $cntctfrm_options['cntctfrm_phone_error'][$language];
1651
- $error_message['error_form'] = $cntctfrm_options['cntctfrm_form_error'][$language];
1652
  if ( 1 == $cntctfrm_options['cntctfrm_attachment'] ) {
1653
  global $path_of_uploaded_file, $mime_type;
1654
  $mime_type= array(
@@ -1676,6 +1797,7 @@ if ( ! function_exists( 'cntctfrm_check_form' ) ) {
1676
  'doc'=>'application/msword',
1677
  'docx'=>'application/msword',
1678
  'xls'=>'application/vnd.ms-excel',
 
1679
  'zip'=>'application/zip',
1680
  'rar'=>'application/rar',
1681
  'wav'=>'audio/wav',
@@ -1765,7 +1887,7 @@ if ( ! function_exists( 'cntctfrm_check_form' ) ) {
1765
  } else {
1766
  unset( $error_message['error_attachment'] );
1767
  }
1768
- if( 1 == count( $error_message ) ) {
1769
  unset( $error_message['error_form'] );
1770
  /* If all is good - send mail */
1771
  $cntctfrm_result = cntctfrm_send_mail();
@@ -1778,9 +1900,8 @@ if ( ! function_exists( 'cntctfrm_check_form' ) ) {
1778
  /* Send mail function */
1779
  if( ! function_exists( 'cntctfrm_send_mail' ) ) {
1780
  function cntctfrm_send_mail() {
1781
- global $cntctfrm_options, $path_of_uploaded_file, $wp_version;
1782
- $to = "";
1783
- $headers = "";
1784
 
1785
  $name = isset( $_POST['cntctfrm_contact_name'] ) ? $_POST['cntctfrm_contact_name'] : "";
1786
  $address = isset( $_POST['cntctfrm_contact_address'] ) ? $_POST['cntctfrm_contact_address'] : "";
@@ -1799,14 +1920,22 @@ if( ! function_exists( 'cntctfrm_send_mail' ) ) {
1799
 
1800
  if ( isset( $_SESSION['cntctfrm_send_mail'] ) && true == $_SESSION['cntctfrm_send_mail'] )
1801
  return true;
1802
- if ( 'user' == $cntctfrm_options['cntctfrm_select_email'] ) {
1803
- if ( '3.3' > $wp_version && function_exists('get_userdatabylogin') && false !== $user = get_userdatabylogin( $cntctfrm_options['cntctfrm_user_email'] ) ) {
1804
- $to = $user->user_email;
1805
- } elseif ( false !== $user = get_user_by( 'login', $cntctfrm_options['cntctfrm_user_email'] ) )
1806
- $to = $user->user_email;
1807
- } else {
1808
- $to = $cntctfrm_options['cntctfrm_custom_email'];
 
 
 
 
 
 
 
1809
  }
 
1810
  if ( "" == $to ) {
1811
  /* If email options are not certain choose admin email */
1812
  $to = get_option("admin_email");
@@ -2024,7 +2153,7 @@ if ( ! function_exists ( 'cntctfrm_plugin_action_links' ) ) {
2024
  if ( ! $this_plugin ) $this_plugin = plugin_basename(__FILE__);
2025
 
2026
  if ( $file == $this_plugin ){
2027
- $settings_link = '<a href="admin.php?page=contact_form.php">' . __('Settings', 'contact_form') . '</a>';
2028
  array_unshift( $links, $settings_link );
2029
  }
2030
  return $links;
@@ -2072,29 +2201,20 @@ if ( ! function_exists ( 'cntctfrm_sanitize_string' ) ) {
2072
  }
2073
  }
2074
 
2075
- /* Function '_plugin_init' are using to add language files. */
2076
- if ( ! function_exists ( 'cntctfrm_plugin_init' ) ) {
2077
- function cntctfrm_plugin_init() {
2078
- if ( ! session_id() )
2079
- @session_start();
2080
- load_plugin_textdomain( 'contact_form', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
2081
- }
2082
- } /* End function cntctfrm_plugin_init */
2083
-
2084
  if ( ! function_exists ( 'cntctfrm_admin_head' ) ) {
2085
  function cntctfrm_admin_head() {
2086
- global $wp_version;
2087
- if ( 3.8 > $wp_version )
2088
- wp_enqueue_style( 'cntctfrmStylesheet', plugins_url( 'css/style_wp_before_3.8.css', __FILE__ ) );
2089
- else
2090
- wp_enqueue_style( 'cntctfrmStylesheet', plugins_url( 'css/style.css', __FILE__ ) );
2091
-
2092
  if ( isset( $_REQUEST['page'] ) && ( 'contact_form.php' == $_REQUEST['page'] ) ) {
2093
- if ( 3.5 > $wp_version ) {
2094
- wp_enqueue_script( 'cntctfrmScript', plugins_url( 'js/script_wp_before_3.5.js', __FILE__ ) );
2095
- } else {
2096
- wp_enqueue_script( 'cntctfrmprScript', plugins_url( 'js/script.js', __FILE__ ) );
2097
- }
 
 
 
 
 
 
2098
  echo '<script type="text/javascript">var confirm_text = "' . __( 'Are you sure that you want to delete this language data?', 'contact_form' ) . '"</script>';
2099
  }
2100
  }
@@ -2102,12 +2222,12 @@ if ( ! function_exists ( 'cntctfrm_admin_head' ) ) {
2102
 
2103
  if ( ! function_exists ( 'cntctfrm_wp_head' ) ) {
2104
  function cntctfrm_wp_head() {
2105
- wp_enqueue_style( 'cntctfrmStylesheet', plugins_url( 'css/style.css', __FILE__ ) );
2106
  }
2107
  }
2108
 
2109
  if ( ! function_exists ( 'cntctfrm_email_name_filter' ) ) {
2110
- function cntctfrm_email_name_filter( $data ){
2111
  global $cntctfrm_options;
2112
  if ( isset( $_POST['cntctfrm_contact_name'] ) && 'custom' != $cntctfrm_options['cntctfrm_select_from_field'] ) {
2113
  $name = stripslashes( strip_tags( preg_replace ( '/<[^>]*>/', '', preg_replace ( '/<script.*<\/[^>]*>/', '', trim( $_POST['cntctfrm_contact_name'] ) ) ) ) );
@@ -2124,78 +2244,102 @@ if ( ! function_exists ( 'cntctfrm_email_name_filter' ) ) {
2124
  }
2125
 
2126
  if ( ! function_exists ( 'cntctfrm_add_language' ) ) {
2127
- function cntctfrm_add_language(){
2128
  $lang = strip_tags( preg_replace ( '/<[^>]*>/', '', preg_replace ( '/<script.*<\/[^>]*>/', '', htmlspecialchars( $_REQUEST['lang'] ) ) ) );
2129
- $cntctfrm_options = get_option( 'cntctfrm_options' );
 
 
 
 
 
 
 
 
 
 
2130
  $cntctfrm_options['cntctfrm_language'][] = $lang;
2131
- update_option( 'cntctfrm_options', $cntctfrm_options, '', 'yes' );
 
 
 
 
 
 
2132
  die();
2133
  }
2134
  }
2135
 
2136
  if ( ! function_exists ( 'cntctfrm_remove_language' ) ) {
2137
- function cntctfrm_remove_language(){
2138
- $cntctfrm_options = get_option( 'cntctfrm_options' );
2139
- if( $key = array_search( $_REQUEST['lang'], $cntctfrm_options['cntctfrm_language'] ) !== false )
 
 
 
 
 
 
 
 
 
2140
  $cntctfrm_options['cntctfrm_language'] = array_diff( $cntctfrm_options['cntctfrm_language'], array( $_REQUEST['lang'] ) );
2141
- if( isset( $cntctfrm_options['cntctfrm_name_label'][$_REQUEST['lang']] ) )
2142
- unset( $cntctfrm_options['cntctfrm_name_label'][$_REQUEST['lang']]);
2143
- if( isset( $cntctfrm_options['cntctfrm_address_label'][$_REQUEST['lang']] ) )
2144
- unset( $cntctfrm_options['cntctfrm_address_label'][$_REQUEST['lang']]);
2145
- if( isset( $cntctfrm_options['cntctfrm_email_label'][$_REQUEST['lang']] ) )
2146
- unset( $cntctfrm_options['cntctfrm_email_label'][$_REQUEST['lang']]);
2147
- if( isset( $cntctfrm_options['cntctfrm_phone_label'][$_REQUEST['lang']] ) )
2148
- unset( $cntctfrm_options['cntctfrm_phone_label'][$_REQUEST['lang']]);
2149
- if( isset( $cntctfrm_options['cntctfrm_subject_label'][$_REQUEST['lang']] ) )
2150
- unset( $cntctfrm_options['cntctfrm_subject_label'][$_REQUEST['lang']]);
2151
- if( isset( $cntctfrm_options['cntctfrm_message_label'][$_REQUEST['lang']] ) )
2152
- unset( $cntctfrm_options['cntctfrm_message_label'][$_REQUEST['lang']]);
2153
- if( isset( $cntctfrm_options['cntctfrm_attachment_label'][$_REQUEST['lang']] ) )
2154
- unset( $cntctfrm_options['cntctfrm_attachment_label'][$_REQUEST['lang']]);
2155
- if( isset( $cntctfrm_options['cntctfrm_attachment_tooltip'][$_REQUEST['lang']] ) )
2156
- unset( $cntctfrm_options['cntctfrm_attachment_tooltip'][$_REQUEST['lang']]);
2157
- if( isset( $cntctfrm_options['cntctfrm_send_copy_label'][$_REQUEST['lang']] ) )
2158
- unset( $cntctfrm_options['cntctfrm_send_copy_label'][$_REQUEST['lang']]);
2159
- if( isset( $cntctfrm_options['cntctfrm_thank_text'][$_REQUEST['lang']] ) )
2160
- unset( $cntctfrm_options['cntctfrm_thank_text'][$_REQUEST['lang']]);
2161
- if( isset( $cntctfrm_options['cntctfrm_submit_label'][$_REQUEST['lang']] ) )
2162
- unset( $cntctfrm_options['cntctfrm_submit_label'][$_REQUEST['lang']]);
2163
- if( isset( $cntctfrm_options['cntctfrm_name_error'][$_REQUEST['lang']] ) )
2164
- unset( $cntctfrm_options['cntctfrm_name_error'][$_REQUEST['lang']]);
2165
- if( isset( $cntctfrm_options['cntctfrm_address_error'][$_REQUEST['lang']] ) )
2166
- unset( $cntctfrm_options['cntctfrm_address_error'][$_REQUEST['lang']]);
2167
- if( isset( $cntctfrm_options['cntctfrm_email_error'][$_REQUEST['lang']] ) )
2168
- unset( $cntctfrm_options['cntctfrm_email_error'][$_REQUEST['lang']]);
2169
- if( isset( $cntctfrm_options['cntctfrm_phone_error'][$_REQUEST['lang']] ) )
2170
- unset( $cntctfrm_options['cntctfrm_phone_error'][$_REQUEST['lang']]);
2171
- if( isset( $cntctfrm_options['cntctfrm_subject_error'][$_REQUEST['lang']] ) )
2172
- unset( $cntctfrm_options['cntctfrm_subject_error'][$_REQUEST['lang']]);
2173
- if( isset( $cntctfrm_options['cntctfrm_message_error'][$_REQUEST['lang']] ) )
2174
- unset( $cntctfrm_options['cntctfrm_message_error'][$_REQUEST['lang']]);
2175
- if( isset( $cntctfrm_options['cntctfrm_attachment_error'][$_REQUEST['lang']] ) )
2176
- unset( $cntctfrm_options['cntctfrm_attachment_error'][$_REQUEST['lang']]);
2177
- if( isset( $cntctfrm_options['cntctfrm_attachment_upload_error'][$_REQUEST['lang']] ) )
2178
- unset( $cntctfrm_options['cntctfrm_attachment_upload_error'][$_REQUEST['lang']]);
2179
- if( isset( $cntctfrm_options['cntctfrm_attachment_move_error'][$_REQUEST['lang']] ) )
2180
- unset( $cntctfrm_options['cntctfrm_attachment_move_error'][$_REQUEST['lang']]);
2181
- if( isset( $cntctfrm_options['cntctfrm_attachment_size_error'][$_REQUEST['lang']] ) )
2182
- unset( $cntctfrm_options['cntctfrm_attachment_size_error'][$_REQUEST['lang']]);
2183
- if( isset( $cntctfrm_options['cntctfrm_captcha_error'][$_REQUEST['lang']] ) )
2184
- unset( $cntctfrm_options['cntctfrm_captcha_error'][$_REQUEST['lang']]);
2185
- if( isset( $cntctfrm_options['cntctfrm_form_error'][$_REQUEST['lang']] ) )
2186
- unset( $cntctfrm_options['cntctfrm_form_error'][$_REQUEST['lang']]);
2187
- update_option( 'cntctfrm_options', $cntctfrm_options );
 
 
 
 
 
 
2188
  die();
2189
  }
2190
  }
2191
 
2192
- /* Function for delete options */
2193
- if ( ! function_exists ( 'cntctfrm_delete_options' ) ) {
2194
- function cntctfrm_delete_options() {
2195
- delete_option( 'cntctfrm_options' );
2196
- delete_site_option( 'cntctfrm_options' );
2197
- }
2198
- }
2199
  if ( ! function_exists ( 'cntctfrm_plugin_banner' ) ) {
2200
  function cntctfrm_plugin_banner() {
2201
  global $hook_suffix;
@@ -2216,9 +2360,11 @@ if ( ! function_exists ( 'cntctfrm_plugin_banner' ) ) {
2216
  array( 'gllr_hide_banner_on_plugin_page', 'gallery-plugin/gallery-plugin.php', '3.9.1' )
2217
  );
2218
  if ( ! $cntctfrm_plugin_info )
2219
- $cntctfrm_plugin_info = get_plugin_data( __FILE__ );
 
2220
  if ( ! function_exists( 'is_plugin_active_for_network' ) )
2221
- require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
 
2222
  $active_plugins = get_option( 'active_plugins' );
2223
  $all_plugins = get_plugins();
2224
  $this_banner = 'cntctfrm_hide_banner_on_plugin_page';
@@ -2226,10 +2372,12 @@ if ( ! function_exists ( 'cntctfrm_plugin_banner' ) ) {
2226
 
2227
  foreach ( $banner_array as $key => $value ) {
2228
  if ( $this_banner == $value[0] || $this_banner_1 == $value[0] ) {
2229
- global $wp_version;
2230
- echo '<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
2231
- <script type="text/javascript" src="' . plugins_url( 'js/c_o_o_k_i_e.js', __FILE__ ) . '"></script>
2232
- <script type="text/javascript">
 
 
2233
  (function($) {
2234
  $(document).ready( function() {
2235
  var hide_message = $.cookie( "cntctfrm_hide_banner_on_plugin_page" );
@@ -2238,9 +2386,11 @@ if ( ! function_exists ( 'cntctfrm_plugin_banner' ) ) {
2238
  $( ".cntctfrm_message" ).css( "display", "none" );
2239
  if ( hide_message_for_ctfrmtdb == "true" ) {
2240
  $( ".cntctfrm_message_for_ctfrmtdb" ).css( "display", "none" );
2241
- };
 
 
2242
  } else {
2243
- $( ".cntctfrm_message_for_ctfrmtdb" ).css( "display", "none" );
2244
  }
2245
  $( ".cntctfrm_close_icon" ).click( function() {
2246
  $( ".cntctfrm_message" ).css( "display", "none" );
@@ -2253,27 +2403,38 @@ if ( ! function_exists ( 'cntctfrm_plugin_banner' ) ) {
2253
  });
2254
  })(jQuery);
2255
  </script>
2256
- <div class="cntctfrm_message bws_banner_on_plugin_page">
2257
- <img class="cntctfrm_close_icon close_icon" title="" src="' . plugins_url( 'images/close_banner.png', __FILE__ ) . '" alt=""/>
2258
- <a class="button" target="_blank" href="http://bestwebsoft.com/plugin/contact-form-pro/?k=f575dc39cba54a9de88df346eed52101&pn=77&v=' . $cntctfrm_plugin_info["Version"] . '&wp_v=' . $wp_version . '">Learn More</a>
2259
- <div class="text">
2260
- ' . __( "It’s time to upgrade your <strong>Contact Form plugin</strong> to <strong>PRO</strong> version", 'contact_form' ) . '!<br />
2261
- <span>' . __( "Extend standard plugin functionality with new great options.", 'contact_form' ) . '</span>
 
 
 
 
 
 
 
2262
  </div>
2263
- <img class="icon" title="" src="' . plugins_url( 'images/banner.png', __FILE__ ) . '" alt=""/>
2264
  </div>';
2265
  if ( ! array_key_exists( 'contact-form-to-db/contact_form_to_db.php', $all_plugins ) && ! array_key_exists( 'contact-form-to-db-pro/contact_form_to_db_pro.php', $all_plugins ) ) {
2266
- echo '<div class="cntctfrm_message_for_ctfrmtdb bws_banner_on_plugin_page">
2267
- <img class="cntctfrm_for_ctfrmtdb_close_icon close_icon" title="" src="' . plugins_url( 'images/close_banner.png', __FILE__ ) . '" alt=""/>
2268
- <a class="button" target="_blank" href="http://bestwebsoft.com/plugin/contact-form-to-db-pro/?k=6ebf0743736411607343ad391dc3b436&pn=77&v=' . $cntctfrm_plugin_info["Version"] . '&wp_v=' . $wp_version . '">Learn More</a>
2269
- <div class="text">
2270
- ' . __( "<strong>Contact Form to DB</strong> allows to store your messages to the database.", 'contact_form' ) . '<br />
2271
- <span>' . __( "Manage messages that have been sent from your website.", 'contact_form' ) . '</span>
2272
- </div>
2273
- <img class="icon" title="" src="' . plugins_url( 'images/banner_for_ctfrmtdb.png', __FILE__ ) . '" alt=""/>
 
 
 
 
 
 
2274
  </div>';
2275
  }
2276
- echo '</div>';
2277
  break;
2278
  }
2279
  if ( isset( $all_plugins[ $value[1] ] ) && $all_plugins[ $value[1] ]["Version"] >= $value[2] && ( 0 < count( preg_grep( '/' . str_replace( '/', '\/', $value[1] ) . '/', $active_plugins ) ) || is_plugin_active_for_network( $value[1] ) ) && ! isset( $_COOKIE[ $value[0] ] ) ) {
@@ -2284,6 +2445,14 @@ if ( ! function_exists ( 'cntctfrm_plugin_banner' ) ) {
2284
  }
2285
  }
2286
 
 
 
 
 
 
 
 
 
2287
  add_action( 'admin_menu', 'cntctfrm_admin_menu' );
2288
 
2289
  add_action( 'init', 'cntctfrm_init' );
4
  Plugin URI: http://bestwebsoft.com/plugin/
5
  Description: Plugin for Contact Form.
6
  Author: BestWebSoft
7
+ Version: 3.74
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
11
+
12
  /* @ Copyright 2014 BestWebSoft ( http://support.bestwebsoft.com )
13
 
14
  This program is free software; you can redistribute it and/or modify
25
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
  */
27
 
 
 
28
  /* Add option page in admin menu */
29
  if ( ! function_exists( 'cntctfrm_admin_menu' ) ) {
30
  function cntctfrm_admin_menu() {
31
+ global $bstwbsftwppdtplgns_options, $wpmu, $bstwbsftwppdtplgns_added_menu;
32
+ $bws_menu_version = '1.2.3';
33
+ $base = plugin_basename(__FILE__);
34
+
35
+ if ( ! isset( $bstwbsftwppdtplgns_options ) ) {
36
+ if ( 1 == $wpmu ) {
37
+ if ( ! get_site_option( 'bstwbsftwppdtplgns_options' ) )
38
+ add_site_option( 'bstwbsftwppdtplgns_options', array(), '', 'yes' );
39
+ $bstwbsftwppdtplgns_options = get_site_option( 'bstwbsftwppdtplgns_options' );
40
+ } else {
41
+ if ( ! get_option( 'bstwbsftwppdtplgns_options' ) )
42
+ add_option( 'bstwbsftwppdtplgns_options', array(), '', 'yes' );
43
+ $bstwbsftwppdtplgns_options = get_option( 'bstwbsftwppdtplgns_options' );
44
+ }
45
+ }
46
+
47
+ if ( isset( $bstwbsftwppdtplgns_options['bws_menu_version'] ) ) {
48
+ $bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] = $bws_menu_version;
49
+ unset( $bstwbsftwppdtplgns_options['bws_menu_version'] );
50
+ update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options, '', 'yes' );
51
+ require_once( dirname( __FILE__ ) . '/bws_menu/bws_menu.php' );
52
+ } else if ( ! isset( $bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] ) || $bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] < $bws_menu_version ) {
53
+ $bstwbsftwppdtplgns_options['bws_menu']['version'][ $base ] = $bws_menu_version;
54
+ update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options, '', 'yes' );
55
+ require_once( dirname( __FILE__ ) . '/bws_menu/bws_menu.php' );
56
+ } else if ( ! isset( $bstwbsftwppdtplgns_added_menu ) ) {
57
+ $plugin_with_newer_menu = $base;
58
+ foreach ( $bstwbsftwppdtplgns_options['bws_menu']['version'] as $key => $value ) {
59
+ if ( $bws_menu_version < $value && is_plugin_active( $base ) ) {
60
+ $plugin_with_newer_menu = $key;
61
+ }
62
+ }
63
+ $plugin_with_newer_menu = explode( '/', $plugin_with_newer_menu );
64
+ $wp_content_dir = defined( 'WP_CONTENT_DIR' ) ? basename( WP_CONTENT_DIR ) : 'wp-content';
65
+ if ( file_exists( ABSPATH . $wp_content_dir . '/plugins/' . $plugin_with_newer_menu[0] . '/bws_menu/bws_menu.php' ) )
66
+ require_once( ABSPATH . $wp_content_dir . '/plugins/' . $plugin_with_newer_menu[0] . '/bws_menu/bws_menu.php' );
67
+ else
68
+ require_once( dirname( __FILE__ ) . '/bws_menu/bws_menu.php' );
69
+ $bstwbsftwppdtplgns_added_menu = true;
70
+ }
71
+
72
  add_menu_page( 'BWS Plugins', 'BWS Plugins', 'manage_options', 'bws_plugins', 'bws_add_menu_render', plugins_url( "images/px.png", __FILE__ ), 1001 );
73
  add_submenu_page('bws_plugins', __( 'Contact Form Settings', 'contact_form' ), __( 'Contact Form', 'contact_form' ), 'manage_options', "contact_form.php", 'cntctfrm_settings_page' );
74
 
85
 
86
  load_plugin_textdomain( 'contact_form', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
87
 
88
+ if ( ! is_admin() )
89
+ cntctfrm_check_and_send();
90
  }
91
  }
92
 
99
  if ( ! isset( $bws_plugin_info ) || empty( $bws_plugin_info ) )
100
  $bws_plugin_info = array( 'id' => '77', 'version' => $cntctfrm_plugin_info["Version"] );
101
 
 
 
 
102
  /* Function check if plugin is compatible with current WP version */
103
  cntctfrm_version_check();
104
+
105
+ /* Call register settings function */
106
+ if ( isset( $_REQUEST['page'] ) && ( 'contact_form.php' == $_REQUEST['page'] ) )
107
+ cntctfrm_settings();
108
  }
109
  }
110
 
175
  'cntctfrm_html_email' => 1,
176
  'cntctfrm_site_name_parameter' => 'SERVER_NAME'
177
  );
178
+
179
  /* Install the option defaults */
180
  if ( 1 == $wpmu ) {
181
  if ( ! get_site_option( 'cntctfrm_options' ) )
185
  add_option( 'cntctfrm_options', $cntctfrm_option_defaults, '', 'yes' );
186
  }
187
 
188
+ if ( is_plugin_active( 'contact-form-multi/contact-form-multi.php' ) || is_plugin_active_for_network( 'contact-form-multi/contact-form-multi.php' ) ) {
189
+ if ( 1 == $wpmu ) {
190
+ if ( ! get_site_option( 'cntctfrmmlt_options' ) )
191
+ add_site_option( 'cntctfrmmlt_options', $cntctfrm_option_defaults, '', 'yes' );
192
+ } else {
193
+ if ( ! get_option( 'cntctfrmmlt_options' ) )
194
+ add_option( 'cntctfrmmlt_options', $cntctfrm_option_defaults, '', 'yes' );
195
+ }
196
+ /* Get options from the database */
197
+ if ( 1 == $wpmu ) {
198
+ if ( get_site_option( 'cntctfrmmlt_options_'. $_SESSION['cntctfrmmlt_id_form'] ) )
199
+ $cntctfrm_options = get_site_option( 'cntctfrmmlt_options_'. $_SESSION['cntctfrmmlt_id_form'] );
200
+ else
201
+ $cntctfrm_options = get_site_option( 'cntctfrmmlt_options' );
202
+ } else {
203
+ if ( get_option( 'cntctfrmmlt_options_' . $_SESSION['cntctfrmmlt_id_form'] ) )
204
+ $cntctfrm_options = get_option( 'cntctfrmmlt_options_'. $_SESSION['cntctfrmmlt_id_form'] );
205
+ else
206
+ $cntctfrm_options = get_option( 'cntctfrmmlt_options' );
207
+ }
208
+ } else {
209
+ /* Get options from the database */
210
+ if ( 1 == $wpmu )
211
+ $cntctfrm_options = get_site_option( 'cntctfrm_options' );
212
+ else
213
+ $cntctfrm_options = get_option( 'cntctfrm_options' );
214
+ }
215
 
216
  if ( empty( $cntctfrm_options['cntctfrm_language'] ) && ! is_array( $cntctfrm_options['cntctfrm_name_label'] ) ) {
217
  $cntctfrm_options['cntctfrm_name_label'] = array( 'en' => $cntctfrm_options['cntctfrm_name_label'] );
295
  $require_wp = "3.0"; /* Wordpress at least requires version */
296
  $plugin = plugin_basename( __FILE__ );
297
  if ( version_compare( $wp_version, $require_wp, "<" ) ) {
298
+ if ( is_plugin_active( $plugin ) ) {
299
  deactivate_plugins( $plugin );
300
  wp_die( "<strong>" . $cntctfrm_plugin_info['Name'] . " </strong> " . __( 'requires', 'contact_form' ) . " <strong>WordPress " . $require_wp . "</strong> " . __( 'or higher, that is why it has been deactivated! Please upgrade WordPress and try again.', 'contact_form') . "<br /><br />" . __( 'Back to the WordPress', 'contact_form') . " <a href='" . get_admin_url( null, 'plugins.php' ) . "'>" . __( 'Plugins page', 'contact_form') . "</a>." );
301
  }
306
  /* Add settings page in admin area */
307
  if ( ! function_exists( 'cntctfrm_settings_page' ) ) {
308
  function cntctfrm_settings_page() {
309
+ global $cntctfrm_options, $wpdb, $cntctfrm_option_defaults, $wp_version, $cntctfrm_plugin_info, $wpmu;
310
 
311
+ if ( ! function_exists( 'get_plugins' ) || ! function_exists( 'is_plugin_active_for_network' ) )
312
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
313
 
 
 
 
314
  $all_plugins = get_plugins();
315
  $active_plugins = get_option( 'active_plugins' );
316
 
317
+ /* Check contact-form-multi plugin */
318
+ if ( is_plugin_active( 'contact-form-multi/contact-form-multi.php' ) || is_plugin_active_for_network( 'contact-form-multi/contact-form-multi.php' ) )
319
+ $contact_form_multi_active = true;
320
+
321
  /* Get Captcha options */
322
  if ( get_option( 'cptch_options' ) )
323
  $cptch_options = get_option( 'cptch_options' );
491
  $cntctfrm_options_submit['cntctfrm_required_message_field'] = isset( $_POST['cntctfrm_required_message_field']) ? 1 : 0;
492
 
493
  $cntctfrm_options_submit['cntctfrm_required_symbol'] = isset( $_POST['cntctfrm_required_symbol']) ? $_POST['cntctfrm_required_symbol'] : '*';
494
+ $cntctfrm_options_submit['cntctfrm_html_email'] = isset( $_POST['cntctfrm_html_email']) ? 1 : 0;
495
+ $cntctfrm_options_submit['cntctfrm_site_name_parameter'] = $_POST['cntctfrm_site_name_parameter'];
496
  $cntctfrm_options_submit['cntctfrm_display_add_info'] = isset( $_POST['cntctfrm_display_add_info']) ? 1 : 0;
497
 
498
  if ( 1 == $cntctfrm_options_submit['cntctfrm_display_add_info'] ) {
510
  $cntctfrm_options_submit['cntctfrm_change_label'] = isset( $_POST['cntctfrm_change_label']) ? 1 : 0;
511
 
512
  if ( 1 == $cntctfrm_options_submit['cntctfrm_change_label'] ) {
513
+ foreach ( $_POST['cntctfrm_name_label'] as $key => $val ) {
514
  $cntctfrm_options_submit['cntctfrm_name_label'][ $key ] = stripcslashes( htmlspecialchars( $_POST['cntctfrm_name_label'][ $key ] ) );
515
  $cntctfrm_options_submit['cntctfrm_address_label'][ $key ] = stripcslashes( htmlspecialchars( $_POST['cntctfrm_address_label'][ $key ] ) );
516
  $cntctfrm_options_submit['cntctfrm_email_label'][ $key ] = stripcslashes( htmlspecialchars( $_POST['cntctfrm_email_label'][ $key ] ) );
596
  $cntctfrm_options_submit['cntctfrm_redirect_url'] = $_POST['cntctfrm_redirect_url'];
597
  }
598
  $cntctfrm_options = array_merge( $cntctfrm_options, $cntctfrm_options_submit );
599
+
600
  if ( 0 == $cntctfrm_options_submit['cntctfrm_action_after_send']
601
  && ( "" == trim( $cntctfrm_options_submit['cntctfrm_redirect_url'] )
602
  || ! preg_match( '@^(?:http://)?([^/]+)@i', trim( $cntctfrm_options_submit['cntctfrm_redirect_url'] ) ) ) ) {
606
  if ( 'user' == $cntctfrm_options_submit['cntctfrm_select_email'] ) {
607
  if ( '3.3' > $wp_version && function_exists( 'get_userdatabylogin' ) && false !== get_userdatabylogin( $cntctfrm_options_submit['cntctfrm_user_email'] ) ) {
608
  //
609
+ } else if ( false !== get_user_by( 'login', $cntctfrm_options_submit['cntctfrm_user_email'] ) ) {
610
  //
611
  } else {
612
+ $error .= __( "Such user does not exist. Settings are not saved.", 'contact_form' );
613
  }
614
  } else {
615
  if ( "" == $cntctfrm_options_submit['cntctfrm_custom_email'] || ! preg_match( "/^((?:[a-z0-9_']+(?:[a-z0-9\-_\.']+)?@[a-z0-9]+(?:[a-z0-9\-\.]+)?\.[a-z]{2,5})[, ]*)+$/i", trim( $cntctfrm_options_submit['cntctfrm_custom_email'] ) ) ){
622
  $error .= __( "Please enter a valid email address in the 'FROM' field. Settings are not saved.", 'contact_form' );
623
  }
624
  }
625
+
626
+ if ( '' == $error ) {
627
+ if ( isset( $contact_form_multi_active ) ) {
628
+
629
+ $cntctfrmmlt_options_main = get_option( 'cntctfrmmlt_options_main' );
630
+
631
+ if ( $cntctfrmmlt_options_main['id_form'] !== $_SESSION['cntctfrmmlt_id_form'] )
632
+ add_option( 'cntctfrmmlt_options_' . $cntctfrmmlt_options_main['id_form'] , $cntctfrm_options, '', 'yes' );
633
+ else if ( $cntctfrmmlt_options_main['id_form'] == $_SESSION['cntctfrmmlt_id_form'] )
634
+ update_option( 'cntctfrmmlt_options_' . $cntctfrmmlt_options_main['id_form'] , $cntctfrm_options, '', 'yes' );
635
+ } else {
636
+ update_option( 'cntctfrm_options', $cntctfrm_options, '', 'yes' );
637
+ }
638
  $message = __( "Settings saved.", 'contact_form' );
639
  }
640
  }
641
+
642
  /* Display form on the setting page */
643
  $lang_codes = array(
644
  'aa' => 'Afar', 'ab' => 'Abkhazian', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'ba' => 'Bashkir', 'bm' => 'Bambara', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali',
655
 
656
  /* GO PRO */
657
  if ( isset( $_GET['action'] ) && 'go_pro' == $_GET['action'] ) {
658
+ global $wpmu, $bstwbsftwppdtplgns_options;
659
 
660
  $bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? trim( $_POST['bws_license_key'] ) : "";
 
 
 
 
 
 
 
 
 
 
661
 
662
  if ( isset( $_POST['bws_license_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bws_license_nonce_name' ) ) {
663
  if ( '' != $bws_license_key ) {
701
  $error = __( "Unfortunately, you have exceeded the number of available tries per day. Please, upload the plugin manually.", 'contact_form' );
702
  }
703
  }
704
+ if ( '' == $error ) {
 
705
  $bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key;
706
 
707
  $url = 'http://bestwebsoft.com/wp-content/plugins/paid-products/plugins/downloads/?bws_first_download=' . $bws_license_plugin . '&bws_license_key=' . $bws_license_key . '&download_from=5';
772
  <?php if ( ! isset( $_GET['action'] ) ) { ?>
773
  <form id="cntctfrm_settings_form" method="post" action="admin.php?page=contact_form.php">
774
  <span style="margin-bottom:15px;">
775
+ <?php if ( ! isset( $contact_form_multi_active ) ) { ?>
776
+ <p><?php _e( "If you would like to add the Contact Form to your website, just copy and paste this shortcode to your post or page or widget:", 'contact_form' ); ?> [contact_form] <?php _e( "or", 'contact_form' ); ?> [contact_form lang=en]<br />
777
+ <?php _e( "If have any problems with the standard shortcode [contact_form], you should use the shortcode", 'contact_form' ); ?> [bws_contact_form] (<?php _e( "or", 'contact_form' ); ?> [bws_contact_form lang=en]) <?php _e( "or", 'contact_form' ); ?> [bestwebsoft_contact_form] (<?php _e( "or", 'contact_form' ); ?>
778
+ [bestwebsoft_contact_form lang=en]). <?php _e( "They work the same way.", 'contact_form' ); ?></p>
779
+ <?php _e( "If you leave the fields empty, the messages will be sent to the email address specified during registration.", 'contact_form' );
780
+ } else { ?>
781
+ <p><?php _e( "If you would like to add the Contact Form to your website, just copy and paste this shortcode to your post or page or widget:", 'contact_form' ); ?> [contact_form id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?>] <?php _e( "or", 'contact_form' ); ?> [contact_form lang=en id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?>]<br />
782
+ <?php _e( "If have any problems with the standard shortcode [contact_form], you should use the shortcode", 'contact_form' ); ?> [bws_contact_form id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?>] (<?php _e( "or", 'contact_form' ); ?> [bws_contact_form lang=en id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?>]) <?php _e( "or", 'contact_form' ); ?> [bestwebsoft_contact_form id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?>] (<?php _e( "or", 'contact_form' ); ?>
783
+ [bestwebsoft_contact_form lang=en id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?>]). <?php _e( "They work the same way.", 'contact_form' ); ?></p>
784
+ <?php _e( "If you leave the fields empty, the messages will be sent to the email address specified during registration.", 'contact_form' );
785
+ } ?>
786
  </span>
787
  <table class="form-table" style="width:auto;">
788
  <tr valign="top">
1101
  <input type="text" name="cntctfrm_captcha_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_captcha_error']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for the Captcha field", 'contact_form' ); ?></span><br />
1102
  <input type="text" name="cntctfrm_form_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_form_error']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for the whole form", 'contact_form' ); ?></span><br />
1103
  </div>
1104
+ <?php if ( ! isset( $contact_form_multi_active ) ) { ?>
1105
+ <span class="cntctfrm_info" style="margin-left: 5px;"><?php _e( "Use shortcode", 'contact_form' ); echo " [bestwebsoft_contact_form lang=en] " . __( "or", 'contact_form' ) . " [bestwebsoft_contact_form] "; _e( "for this language", 'contact_form' ); ?></span>
1106
+ <?php } else { ?>
1107
+ <span class="cntctfrm_info" style="margin-left: 5px;"><?php _e( "Use shortcode", 'contact_form' ); echo " [bestwebsoft_contact_form lang=en id=".$_SESSION['cntctfrmmlt_id_form']."] " . __( "or", 'contact_form' ) . " [bestwebsoft_contact_form id=".$_SESSION['cntctfrmmlt_id_form']."] "; _e( "for this language", 'contact_form' ); ?></span>
1108
+ <?php } ?>
1109
  </div>
1110
  <?php if ( ! empty( $cntctfrm_options['cntctfrm_language'] ) ) {
1111
  foreach ( $cntctfrm_options['cntctfrm_language'] as $val ) { ?>
1135
  <input type="text" name="cntctfrm_captcha_error[<?php echo $val; ?>]" value="<?php if ( isset( $cntctfrm_options['cntctfrm_captcha_error'][ $val ] ) ) echo $cntctfrm_options['cntctfrm_captcha_error'][ $val ]; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for the Captcha field", 'contact_form' ); ?></span><br />
1136
  <input type="text" name="cntctfrm_form_error[<?php echo $val; ?>]" value="<?php if ( isset( $cntctfrm_options['cntctfrm_form_error'][ $val ] ) ) echo $cntctfrm_options['cntctfrm_form_error'][ $val ]; ?>" /> <span class="cntctfrm_info"><?php _e( "Error message for the whole form", 'contact_form' ); ?></span><br />
1137
  </div>
1138
+ <?php if ( ! isset( $contact_form_multi_active ) ) { ?>
1139
+ <span class="cntctfrm_info" style="margin-left: 5px;"><?php _e( "Use shortcode", 'contact_form' ); echo " [bestwebsoft_contact_form lang=" . $val . "] "; _e( "for this language", 'contact_form' ); ?></span>
1140
+ <?php } else { ?>
1141
+ <span class="cntctfrm_info" style="margin-left: 5px;"><?php _e( "Use shortcode", 'contact_form' ); echo " [bestwebsoft_contact_form lang=" . $val . " id=" . $_SESSION['cntctfrmmlt_id_form'] . "] "; _e( "for this language", 'contact_form' ); ?></span>
1142
+ <?php } ?>
1143
  </div>
1144
  <?php }
1145
  } ?>
1158
  <div class="clear"></div>
1159
  <div class="cntctfrm_language_tab cntctfrm_tab_en" style=" padding: 5px 10px 5px 5px;">
1160
  <input type="text" name="cntctfrm_thank_text[en]" value="<?php echo $cntctfrm_options['cntctfrm_thank_text']['en']; ?>" /> <span class="cntctfrm_info"><?php _e( "Text", 'contact_form' ); ?></span><br />
1161
+ <?php if ( ! isset( $contact_form_multi_active ) ) { ?>
1162
+ <span class="cntctfrm_info"><?php _e( "Use shortcode", 'contact_form' ); echo " [bestwebsoft_contact_form lang=en] " . __( "or", 'contact_form' ) . " [bestwebsoft_contact_form] "; _e( "for this language", 'contact_form' ); ?></span>
1163
+ <?php } else { ?>
1164
+ <span class="cntctfrm_info"><?php _e( "Use shortcode", 'contact_form' ); echo " [bestwebsoft_contact_form=en id=".$_SESSION['cntctfrmmlt_id_form']."] " . __( "or", 'contact_form' ) . " [bestwebsoft_contact_form id=".$_SESSION['cntctfrmmlt_id_form']."] "; _e( "for this language", 'contact_form' ); ?></span>
1165
+ <?php } ?>
1166
  </div>
1167
  <?php if ( ! empty( $cntctfrm_options['cntctfrm_language'] ) ) {
1168
  foreach ( $cntctfrm_options['cntctfrm_language'] as $val ) { ?>
1169
  <div class="cntctfrm_language_tab hidden cntctfrm_tab_<?php echo $val; ?>" style=" padding: 5px 10px 5px 5px;">
1170
  <input type="text" name="cntctfrm_thank_text[<?php echo $val; ?>]" value="<?php if ( isset( $cntctfrm_options['cntctfrm_thank_text'][ $val ] ) ) echo $cntctfrm_options['cntctfrm_thank_text'][ $val ]; ?>" /> <span class="cntctfrm_info"><?php _e( "Text", 'contact_form' ); ?></span><br />
1171
+ <?php if ( ! isset( $contact_form_multi_active ) ) { ?>
1172
+ <span class="cntctfrm_info"><?php _e( "Use shortcode", 'contact_form' ); echo " [bestwebsoft_contact_form lang=" . $val . "] "; _e( "for this language", 'contact_form' ); ?></span>
1173
+ <?php } else { ?>
1174
+ <span class="cntctfrm_info"><?php _e( "Use shortcode", 'contact_form' ); echo " [bestwebsoft_contact_form lang=" . $val . " id=".$_SESSION['cntctfrmmlt_id_form']."] "; _e( "for this language", 'contact_form' ); ?></span>
1175
+ <?php } ?>
1176
  </div>
1177
  <?php }
1178
  } ?>
1198
  <?php wp_nonce_field( plugin_basename(__FILE__), 'cntctfrm_nonce_name' ); ?>
1199
  <div class="bws-plugin-reviews">
1200
  <div class="bws-plugin-reviews-rate">
1201
+ <?php _e( 'If you enjoy our plugin, please give it 5 stars on WordPress', 'contact_form' ); ?>:
1202
+ <a href="http://wordpress.org/support/view/plugin-reviews/contact-form-plugin" target="_blank" title="Contact Form reviews"><?php _e( 'Rate the plugin', 'contact_form' ); ?></a>
1203
  </div>
1204
  <div class="bws-plugin-reviews-support">
1205
+ <?php _e( 'If there is something wrong about it, please contact us', 'contact_form' ); ?>:
1206
+ <a href="http://support.bestwebsoft.com">http://support.bestwebsoft.com</a>
1207
  </div>
1208
  </div>
1209
  </form>
1528
  }
1529
 
1530
  /* Display contact form in front end - page or post */
1531
+ if ( ! function_exists( 'cntctfrm_display_form' ) ) {
1532
  function cntctfrm_display_form( $atts = array( 'lang' => 'en' ) ) {
1533
+ global $error_message, $cntctfrm_options, $cntctfrm_result, $cntctfrmmlt_ide, $cntctfrmmlt_active_plugin, $cntctfrmmlt_options_main, $wpmu;
1534
  extract( shortcode_atts( array( 'lang' => 'en' ), $atts ) );
 
1535
  $content = "";
1536
 
1537
+ /* Get options for the form with a definite identifier */
1538
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1539
+ if ( is_plugin_active( 'contact-form-multi/contact-form-multi.php' ) || is_plugin_active_for_network( 'contact-form-multi/contact-form-multi.php' ) ) {
1540
+ $_SESSION['cntctfrmmlt_mailto'] = '';
1541
+ extract( shortcode_atts( array( 'id' => $cntctfrmmlt_ide ), $atts ) );
1542
+
1543
+ if ( ! isset( $atts['id'] ) ) {
1544
+ $cntctfrm_options = get_option( 'cntctfrmmlt_options' );
1545
+ $_SESSION['cntctfrmmlt_mailto'] = $cntctfrm_options['cntctfrm_user_email'];
1546
+ } else {
1547
+ $cntctfrm_options = get_option( 'cntctfrmmlt_options_' . $atts['id'] );
1548
+ $_SESSION['cntctfrmmlt_mailto'] = $cntctfrm_options['cntctfrm_user_email'];
1549
+ }
1550
+ if ( ! $cntctfrm_options )
1551
+ $cntctfrm_options = get_option( 'cntctfrmmlt_options' );
1552
+ } else {
1553
+ $cntctfrm_options = get_option( 'cntctfrm_options' );
1554
+ }
1555
+
1556
  if ( '80' != $_SERVER["SERVER_PORT"] || ( isset( $_SERVER["HTTPS"] ) && '443' != $_SERVER["SERVER_PORT"] && strtolower( $_SERVER["HTTPS"] ) == "on" ) )
1557
+ $page_url = $page_url = ( isset( $_SERVER["HTTPS"] ) && strtolower( $_SERVER["HTTPS"] ) == "on" ? "https://" : "http://" ) . $_SERVER[ $cntctfrm_options['cntctfrm_site_name_parameter'] ] . ':' . $_SERVER["SERVER_PORT"] . strip_tags( $_SERVER["REQUEST_URI"] ) . '#cntctfrm_contact_form';
1558
  else
1559
+ $page_url = ( isset( $_SERVER["HTTPS"] ) && strtolower( $_SERVER["HTTPS"] ) == "on" ? "https://" : "http://" ) . $_SERVER[ $cntctfrm_options['cntctfrm_site_name_parameter'] ] . strip_tags( $_SERVER["REQUEST_URI"] ) . '#cntctfrm_contact_form';
1560
 
1561
  /* If contact form submited */
1562
  $name = isset( $_POST['cntctfrm_contact_name'] ) ? htmlspecialchars( stripslashes( $_POST['cntctfrm_contact_name'] ) ) : "";
1577
  /* If it is good */
1578
  if ( true === $cntctfrm_result ) {
1579
  $_SESSION['cntctfrm_send_mail'] = true;
1580
+
1581
  if ( 1 == $cntctfrm_options['cntctfrm_action_after_send'] )
1582
  $content .= '<div id="cntctfrm_thanks">' . $cntctfrm_options['cntctfrm_thank_text'][ $lang ] . '</div>';
1583
  else
1584
+ $content .= "<script type='text/javascript'>window.location.href = '" . $cntctfrm_options['cntctfrm_redirect_url'] . "';</script>";
1585
+
1586
+ } elseif ( false === $cntctfrm_result ) {
1587
  /* If email not be delivered */
1588
  $error_message['error_form'] = __( "Sorry, email message could not be delivered.", 'contact_form' );
1589
  }
1590
+
1591
  if ( true !== $cntctfrm_result ) {
1592
  $_SESSION['cntctfrm_send_mail'] = false;
1593
  /* Output form */
1612
  $content .= '<div style="text-align: left;">
1613
  <label for="cntctfrm_contact_address">' . $cntctfrm_options['cntctfrm_address_label'][ $lang ] . ( $cntctfrm_options['cntctfrm_required_address_field'] == 1 ? ' <span class="required">' . $cntctfrm_options['cntctfrm_required_symbol'] . '</span></label>' : '</label>' ) . '
1614
  </div>';
1615
+ if ( isset( $error_message['error_address'] ) ) {
1616
  $content .= '<div style="text-align: left; color: red;">' . $error_message['error_address'] . '</div>';
1617
  }
1618
  $content .= '<div style="text-align: left;">
1689
  $content .= apply_filters( 'cntctfrm_display_captcha' , $error_message );
1690
  }
1691
 
1692
+ $content .= '<div style="text-align: left; padding-top: 8px;">';
1693
+ if ( isset( $atts['id'] ) )
1694
+ $content .= '<input type="hidden" value="' . $atts['id'] . '" name="cntctfrmmlt_shortcode_id">';
1695
+ $content .= '<input type="hidden" value="send" name="cntctfrm_contact_action"><input type="hidden" value="Version: 3.30" />
1696
  <input type="hidden" value="' . $lang . '" name="cntctfrm_language">
1697
  <input type="submit" value="'. $cntctfrm_options['cntctfrm_submit_label'][ $lang ] . '" style="cursor: pointer; margin: 0pt; text-align: center;margin-bottom:10px;" />
1698
  </div>
1704
 
1705
  if ( ! function_exists( 'cntctfrm_check_and_send' ) ) {
1706
  function cntctfrm_check_and_send() {
1707
+ global $cntctfrm_result, $cntctfrm_options;
1708
+ if ( isset( $_POST['cntctfrm_contact_action'] ) || true === $cntctfrm_result ) {
1709
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1710
+ if ( is_plugin_active( 'contact-form-multi/contact-form-multi.php' ) || is_plugin_active_for_network( 'contact-form-multi/contact-form-multi.php' ) ){
1711
+
1712
+ if ( ! isset( $_POST['cntctfrmmlt_shortcode_id'] ) )
1713
+ $cntctfrm_options = get_option( 'cntctfrmmlt_options' );
1714
+ else
1715
+ $cntctfrm_options = get_option( 'cntctfrmmlt_options_' . $_POST['cntctfrmmlt_shortcode_id'] );
1716
+
1717
+ } else {
1718
+ $cntctfrm_options = get_option( 'cntctfrm_options' );
1719
+ }
1720
+
1721
+ if ( isset( $_POST['cntctfrm_contact_action'] ) ) {
1722
+ /* Check all input data */
1723
+ $cntctfrm_result = cntctfrm_check_form();
1724
+ }
1725
+ /* If it is good */
1726
+ if ( true === $cntctfrm_result ) {
1727
+ $_SESSION['cntctfrm_send_mail'] = true;
1728
+ if ( 0 == $cntctfrm_options['cntctfrm_action_after_send'] ) {
1729
+ wp_redirect( $cntctfrm_options['cntctfrm_redirect_url'] );
1730
+ exit;
1731
+ }
1732
  }
1733
  }
1734
  }
1737
  /* Check all input data */
1738
  if ( ! function_exists( 'cntctfrm_check_form' ) ) {
1739
  function cntctfrm_check_form() {
1740
+ global $error_message, $cntctfrm_options;
 
 
1741
  $language = isset( $_POST['cntctfrm_language'] ) ? $_POST['cntctfrm_language'] : 'en';
1742
+ $path_of_uploaded_file = $cntctfrm_result = "";
 
 
 
1743
  /* Error messages array */
1744
  $error_message = array();
1745
 
1758
  $phone = strip_tags( preg_replace ( '/<[^>]*>/', '', preg_replace ( '/<script.*<\/[^>]*>/', '', $phone ) ) );
1759
 
1760
  if ( 1 == $cntctfrm_options['cntctfrm_required_name_field'] && 1 == $cntctfrm_options['cntctfrm_display_name_field'] )
1761
+ $error_message['error_name'] = $cntctfrm_options['cntctfrm_name_error'][ $language ];
1762
  if ( 1 == $cntctfrm_options['cntctfrm_required_address_field'] && 1 == $cntctfrm_options['cntctfrm_display_address_field'] )
1763
+ $error_message['error_address'] = $cntctfrm_options['cntctfrm_address_error'][ $language ];
1764
  if ( 1 == $cntctfrm_options['cntctfrm_required_email_field'] )
1765
+ $error_message['error_email'] = $cntctfrm_options['cntctfrm_email_error'][ $language ];
1766
  if ( 1 == $cntctfrm_options['cntctfrm_required_subject_field'] )
1767
+ $error_message['error_subject'] = $cntctfrm_options['cntctfrm_subject_error'][ $language ];
1768
  if ( 1 == $cntctfrm_options['cntctfrm_required_message_field'] )
1769
+ $error_message['error_message'] = $cntctfrm_options['cntctfrm_message_error'][ $language ];
1770
  if ( 1 == $cntctfrm_options['cntctfrm_required_phone_field'] && 1 == $cntctfrm_options['cntctfrm_display_phone_field'] )
1771
+ $error_message['error_phone'] = $cntctfrm_options['cntctfrm_phone_error'][ $language ];
1772
+ $error_message['error_form'] = $cntctfrm_options['cntctfrm_form_error'][ $language ];
1773
  if ( 1 == $cntctfrm_options['cntctfrm_attachment'] ) {
1774
  global $path_of_uploaded_file, $mime_type;
1775
  $mime_type= array(
1797
  'doc'=>'application/msword',
1798
  'docx'=>'application/msword',
1799
  'xls'=>'application/vnd.ms-excel',
1800
+ 'xlsx'=>'application/vnd.ms-excel',
1801
  'zip'=>'application/zip',
1802
  'rar'=>'application/rar',
1803
  'wav'=>'audio/wav',
1887
  } else {
1888
  unset( $error_message['error_attachment'] );
1889
  }
1890
+ if ( 1 == count( $error_message ) ) {
1891
  unset( $error_message['error_form'] );
1892
  /* If all is good - send mail */
1893
  $cntctfrm_result = cntctfrm_send_mail();
1900
  /* Send mail function */
1901
  if( ! function_exists( 'cntctfrm_send_mail' ) ) {
1902
  function cntctfrm_send_mail() {
1903
+ global $cntctfrm_options, $path_of_uploaded_file, $wp_version, $wpdb, $cntctfrmmlt_maito, $wpdb;
1904
+ $to = $headers = "";
 
1905
 
1906
  $name = isset( $_POST['cntctfrm_contact_name'] ) ? $_POST['cntctfrm_contact_name'] : "";
1907
  $address = isset( $_POST['cntctfrm_contact_address'] ) ? $_POST['cntctfrm_contact_address'] : "";
1920
 
1921
  if ( isset( $_SESSION['cntctfrm_send_mail'] ) && true == $_SESSION['cntctfrm_send_mail'] )
1922
  return true;
1923
+
1924
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1925
+ if ( is_plugin_active( 'contact-form-multi/contact-form-multi.php' ) || is_plugin_active_for_network( 'contact-form-multi/contact-form-multi.php' ) ) {
1926
+ $cntctfrmmlt_maito = $_SESSION['cntctfrmmlt_mailto'];
1927
+ $to = $wpdb->get_col( "SELECT `user_email` FROM " . $wpdb->prefix . "users WHERE `user_login` = '$cntctfrmmlt_maito'" );
1928
+ } else {
1929
+ if ( 'user' == $cntctfrm_options['cntctfrm_select_email'] ) {
1930
+ if ( '3.3' > $wp_version && function_exists('get_userdatabylogin') && false !== $user = get_userdatabylogin( $cntctfrm_options['cntctfrm_user_email'] ) ) {
1931
+ $to = $user->user_email;
1932
+ } elseif ( false !== $user = get_user_by( 'login', $cntctfrm_options['cntctfrm_user_email'] ) )
1933
+ $to = $user->user_email;
1934
+ } else {
1935
+ $to = $cntctfrm_options['cntctfrm_custom_email'];
1936
+ }
1937
  }
1938
+
1939
  if ( "" == $to ) {
1940
  /* If email options are not certain choose admin email */
1941
  $to = get_option("admin_email");
2153
  if ( ! $this_plugin ) $this_plugin = plugin_basename(__FILE__);
2154
 
2155
  if ( $file == $this_plugin ){
2156
+ $settings_link = '<a href="admin.php?page=contact_form.php">' . __( 'Settings', 'contact_form' ) . '</a>';
2157
  array_unshift( $links, $settings_link );
2158
  }
2159
  return $links;
2201
  }
2202
  }
2203
 
 
 
 
 
 
 
 
 
 
2204
  if ( ! function_exists ( 'cntctfrm_admin_head' ) ) {
2205
  function cntctfrm_admin_head() {
 
 
 
 
 
 
2206
  if ( isset( $_REQUEST['page'] ) && ( 'contact_form.php' == $_REQUEST['page'] ) ) {
2207
+ global $wp_version;
2208
+ if ( 3.8 > $wp_version )
2209
+ wp_enqueue_style( 'cntctfrm_stylesheet', plugins_url( 'css/style_wp_before_3.8.css', __FILE__ ) );
2210
+ else
2211
+ wp_enqueue_style( 'cntctfrm_stylesheet', plugins_url( 'css/style.css', __FILE__ ) );
2212
+
2213
+ if ( 3.5 > $wp_version )
2214
+ wp_enqueue_script( 'cntctfrm_script', plugins_url( 'js/script_wp_before_3.5.js', __FILE__ ) );
2215
+ else
2216
+ wp_enqueue_script( 'cntctfrm_script', plugins_url( 'js/script.js', __FILE__ ) );
2217
+
2218
  echo '<script type="text/javascript">var confirm_text = "' . __( 'Are you sure that you want to delete this language data?', 'contact_form' ) . '"</script>';
2219
  }
2220
  }
2222
 
2223
  if ( ! function_exists ( 'cntctfrm_wp_head' ) ) {
2224
  function cntctfrm_wp_head() {
2225
+ wp_enqueue_style( 'cntctfrm_stylesheet', plugins_url( 'css/style.css', __FILE__ ) );
2226
  }
2227
  }
2228
 
2229
  if ( ! function_exists ( 'cntctfrm_email_name_filter' ) ) {
2230
+ function cntctfrm_email_name_filter( $data ) {
2231
  global $cntctfrm_options;
2232
  if ( isset( $_POST['cntctfrm_contact_name'] ) && 'custom' != $cntctfrm_options['cntctfrm_select_from_field'] ) {
2233
  $name = stripslashes( strip_tags( preg_replace ( '/<[^>]*>/', '', preg_replace ( '/<script.*<\/[^>]*>/', '', trim( $_POST['cntctfrm_contact_name'] ) ) ) ) );
2244
  }
2245
 
2246
  if ( ! function_exists ( 'cntctfrm_add_language' ) ) {
2247
+ function cntctfrm_add_language() {
2248
  $lang = strip_tags( preg_replace ( '/<[^>]*>/', '', preg_replace ( '/<script.*<\/[^>]*>/', '', htmlspecialchars( $_REQUEST['lang'] ) ) ) );
2249
+
2250
+ /* Check contact-form-multi plugin */
2251
+ if ( is_plugin_active( 'contact-form-multi/contact-form-multi.php' ) || is_plugin_active_for_network( 'contact-form-multi/contact-form-multi.php' ) )
2252
+ $contact_form_multi_active = true;
2253
+
2254
+ if ( isset( $contact_form_multi_active ) ) {
2255
+ $cntctfrm_options = get_option( 'cntctfrmmlt_options_' . $_SESSION['cntctfrmmlt_id_form'] );
2256
+ } else {
2257
+ $cntctfrm_options = get_option( 'cntctfrm_options' );
2258
+ }
2259
+
2260
  $cntctfrm_options['cntctfrm_language'][] = $lang;
2261
+
2262
+ if ( isset ( $contact_form_multi_active ) ) {
2263
+ $cntctfrmmlt_options_main = get_option( 'cntctfrmmlt_options_main' );
2264
+ update_option( 'cntctfrmmlt_options_' . $cntctfrmmlt_options_main['id_form'], $cntctfrm_options, '', 'yes' );
2265
+ } else {
2266
+ update_option( 'cntctfrm_options', $cntctfrm_options, '', 'yes' );
2267
+ }
2268
  die();
2269
  }
2270
  }
2271
 
2272
  if ( ! function_exists ( 'cntctfrm_remove_language' ) ) {
2273
+ function cntctfrm_remove_language() {
2274
+ /* Check contact-form-multi plugin */
2275
+ if ( is_plugin_active( 'contact-form-multi/contact-form-multi.php' ) || is_plugin_active_for_network( 'contact-form-multi/contact-form-multi.php' ) )
2276
+ $contact_form_multi_active = true;
2277
+
2278
+ if ( isset( $contact_form_multi_active ) ) {
2279
+ $cntctfrm_options = get_option( 'cntctfrmmlt_options_' . $_SESSION['cntctfrmmlt_id_form'] );
2280
+ } else {
2281
+ $cntctfrm_options = get_option( 'cntctfrm_options' );
2282
+ }
2283
+
2284
+ if ( $key = array_search( $_REQUEST['lang'], $cntctfrm_options['cntctfrm_language'] ) !== false )
2285
  $cntctfrm_options['cntctfrm_language'] = array_diff( $cntctfrm_options['cntctfrm_language'], array( $_REQUEST['lang'] ) );
2286
+ if ( isset( $cntctfrm_options['cntctfrm_name_label'][ $_REQUEST['lang'] ] ) )
2287
+ unset( $cntctfrm_options['cntctfrm_name_label'][ $_REQUEST['lang'] ] );
2288
+ if ( isset( $cntctfrm_options['cntctfrm_address_label'][ $_REQUEST['lang'] ] ) )
2289
+ unset( $cntctfrm_options['cntctfrm_address_label'][ $_REQUEST['lang'] ] );
2290
+ if ( isset( $cntctfrm_options['cntctfrm_email_label'][ $_REQUEST['lang'] ] ) )
2291
+ unset( $cntctfrm_options['cntctfrm_email_label'][ $_REQUEST['lang'] ] );
2292
+ if ( isset( $cntctfrm_options['cntctfrm_phone_label'][ $_REQUEST['lang'] ] ) )
2293
+ unset( $cntctfrm_options['cntctfrm_phone_label'][ $_REQUEST['lang'] ] );
2294
+ if ( isset( $cntctfrm_options['cntctfrm_subject_label'][ $_REQUEST['lang'] ] ) )
2295
+ unset( $cntctfrm_options['cntctfrm_subject_label'][ $_REQUEST['lang'] ] );
2296
+ if ( isset( $cntctfrm_options['cntctfrm_message_label'][ $_REQUEST['lang'] ] ) )
2297
+ unset( $cntctfrm_options['cntctfrm_message_label'][ $_REQUEST['lang'] ] );
2298
+ if ( isset( $cntctfrm_options['cntctfrm_attachment_label'][ $_REQUEST['lang'] ] ) )
2299
+ unset( $cntctfrm_options['cntctfrm_attachment_label'][ $_REQUEST['lang'] ] );
2300
+ if ( isset( $cntctfrm_options['cntctfrm_attachment_tooltip'][ $_REQUEST['lang'] ] ) )
2301
+ unset( $cntctfrm_options['cntctfrm_attachment_tooltip'][ $_REQUEST['lang'] ] );
2302
+ if ( isset( $cntctfrm_options['cntctfrm_send_copy_label'][ $_REQUEST['lang'] ] ) )
2303
+ unset( $cntctfrm_options['cntctfrm_send_copy_label'][ $_REQUEST['lang'] ] );
2304
+ if ( isset( $cntctfrm_options['cntctfrm_thank_text'][ $_REQUEST['lang'] ] ) )
2305
+ unset( $cntctfrm_options['cntctfrm_thank_text'][ $_REQUEST['lang'] ] );
2306
+ if ( isset( $cntctfrm_options['cntctfrm_submit_label'][ $_REQUEST['lang'] ] ) )
2307
+ unset( $cntctfrm_options['cntctfrm_submit_label'][ $_REQUEST['lang'] ]);
2308
+ if ( isset( $cntctfrm_options['cntctfrm_name_error'][ $_REQUEST['lang'] ] ) )
2309
+ unset( $cntctfrm_options['cntctfrm_name_error'][ $_REQUEST['lang'] ] );
2310
+ if ( isset( $cntctfrm_options['cntctfrm_address_error'][ $_REQUEST['lang'] ] ) )
2311
+ unset( $cntctfrm_options['cntctfrm_address_error'][ $_REQUEST['lang'] ] );
2312
+ if ( isset( $cntctfrm_options['cntctfrm_email_error'][ $_REQUEST['lang'] ] ) )
2313
+ unset( $cntctfrm_options['cntctfrm_email_error'][ $_REQUEST['lang'] ] );
2314
+ if ( isset( $cntctfrm_options['cntctfrm_phone_error'][ $_REQUEST['lang'] ] ) )
2315
+ unset( $cntctfrm_options['cntctfrm_phone_error'][ $_REQUEST['lang'] ] );
2316
+ if ( isset( $cntctfrm_options['cntctfrm_subject_error'][ $_REQUEST['lang'] ] ) )
2317
+ unset( $cntctfrm_options['cntctfrm_subject_error'][ $_REQUEST['lang'] ] );
2318
+ if ( isset( $cntctfrm_options['cntctfrm_message_error'][ $_REQUEST['lang'] ] ) )
2319
+ unset( $cntctfrm_options['cntctfrm_message_error'][ $_REQUEST['lang'] ] );
2320
+ if ( isset( $cntctfrm_options['cntctfrm_attachment_error'][ $_REQUEST['lang'] ] ) )
2321
+ unset( $cntctfrm_options['cntctfrm_attachment_error'][ $_REQUEST['lang'] ] );
2322
+ if ( isset( $cntctfrm_options['cntctfrm_attachment_upload_error'][ $_REQUEST['lang'] ] ) )
2323
+ unset( $cntctfrm_options['cntctfrm_attachment_upload_error'][ $_REQUEST['lang'] ] );
2324
+ if ( isset( $cntctfrm_options['cntctfrm_attachment_move_error'][ $_REQUEST['lang'] ] ) )
2325
+ unset( $cntctfrm_options['cntctfrm_attachment_move_error'][ $_REQUEST['lang'] ] );
2326
+ if ( isset( $cntctfrm_options['cntctfrm_attachment_size_error'][ $_REQUEST['lang'] ] ) )
2327
+ unset( $cntctfrm_options['cntctfrm_attachment_size_error'][ $_REQUEST['lang'] ] );
2328
+ if ( isset( $cntctfrm_options['cntctfrm_captcha_error'][ $_REQUEST['lang'] ] ) )
2329
+ unset( $cntctfrm_options['cntctfrm_captcha_error'][ $_REQUEST['lang'] ] );
2330
+ if ( isset( $cntctfrm_options['cntctfrm_form_error'][ $_REQUEST['lang'] ] ) )
2331
+ unset( $cntctfrm_options['cntctfrm_form_error'][ $_REQUEST['lang'] ] );
2332
+
2333
+ if ( isset( $contact_form_multi_active ) ) {
2334
+ $cntctfrmmlt_options_main = get_option( 'cntctfrmmlt_options_main' );
2335
+ update_option( 'cntctfrmmlt_options_' . $cntctfrmmlt_options_main['id_form'], $cntctfrm_options, '', 'yes' );
2336
+ } else {
2337
+ update_option( 'cntctfrm_options', $cntctfrm_options, '', 'yes' );
2338
+ }
2339
  die();
2340
  }
2341
  }
2342
 
 
 
 
 
 
 
 
2343
  if ( ! function_exists ( 'cntctfrm_plugin_banner' ) ) {
2344
  function cntctfrm_plugin_banner() {
2345
  global $hook_suffix;
2360
  array( 'gllr_hide_banner_on_plugin_page', 'gallery-plugin/gallery-plugin.php', '3.9.1' )
2361
  );
2362
  if ( ! $cntctfrm_plugin_info )
2363
+ $cntctfrm_plugin_info = get_plugin_data( __FILE__ );
2364
+
2365
  if ( ! function_exists( 'is_plugin_active_for_network' ) )
2366
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
2367
+
2368
  $active_plugins = get_option( 'active_plugins' );
2369
  $all_plugins = get_plugins();
2370
  $this_banner = 'cntctfrm_hide_banner_on_plugin_page';
2372
 
2373
  foreach ( $banner_array as $key => $value ) {
2374
  if ( $this_banner == $value[0] || $this_banner_1 == $value[0] ) {
2375
+ global $wp_version, $bstwbsftwppdtplgns_cookie_add;
2376
+ if ( ! isset( $bstwbsftwppdtplgns_cookie_add ) ) {
2377
+ echo '<script type="text/javascript" src="' . plugins_url( 'js/c_o_o_k_i_e.js', __FILE__ ) . '"></script>';
2378
+ $bstwbsftwppdtplgns_cookie_add = true;
2379
+ }
2380
+ echo '<script type="text/javascript">
2381
  (function($) {
2382
  $(document).ready( function() {
2383
  var hide_message = $.cookie( "cntctfrm_hide_banner_on_plugin_page" );
2386
  $( ".cntctfrm_message" ).css( "display", "none" );
2387
  if ( hide_message_for_ctfrmtdb == "true" ) {
2388
  $( ".cntctfrm_message_for_ctfrmtdb" ).css( "display", "none" );
2389
+ } else {
2390
+ $( ".cntctfrm_message_for_ctfrmtdb" ).css( "display", "block" );
2391
+ }
2392
  } else {
2393
+ $( ".cntctfrm_message" ).css( "display", "block" );
2394
  }
2395
  $( ".cntctfrm_close_icon" ).click( function() {
2396
  $( ".cntctfrm_message" ).css( "display", "none" );
2403
  });
2404
  })(jQuery);
2405
  </script>
2406
+ <div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
2407
+ <div class="cntctfrm_message bws_banner_on_plugin_page" style="display: none;">
2408
+ <img class="cntctfrm_close_icon close_icon" title="" src="' . plugins_url( 'images/close_banner.png', __FILE__ ) . '" alt=""/>
2409
+ <div class="button_div">
2410
+ <a class="button" target="_blank" href="http://bestwebsoft.com/plugin/contact-form-pro/?k=f575dc39cba54a9de88df346eed52101&pn=77&v=' . $cntctfrm_plugin_info["Version"] . '&wp_v=' . $wp_version . '">Learn More</a>
2411
+ </div>
2412
+ <div class="text">
2413
+ ' . __( "It’s time to upgrade your <strong>Contact Form plugin</strong> to <strong>PRO</strong> version", 'contact_form' ) . '!<br />
2414
+ <span>' . __( "Extend standard plugin functionality with new great options.", 'contact_form' ) . '</span>
2415
+ </div>
2416
+ <div class="icon">
2417
+ <img class="icon" title="" src="' . plugins_url( 'images/banner.png', __FILE__ ) . '" alt=""/>
2418
+ </div>
2419
  </div>
 
2420
  </div>';
2421
  if ( ! array_key_exists( 'contact-form-to-db/contact_form_to_db.php', $all_plugins ) && ! array_key_exists( 'contact-form-to-db-pro/contact_form_to_db_pro.php', $all_plugins ) ) {
2422
+ echo '<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
2423
+ <div class="cntctfrm_message_for_ctfrmtdb bws_banner_on_plugin_page" style="display: none;">
2424
+ <img class="cntctfrm_for_ctfrmtdb_close_icon close_icon" title="" src="' . plugins_url( 'images/close_banner.png', __FILE__ ) . '" alt=""/>
2425
+ <div class="button_div">
2426
+ <a class="button" target="_blank" href="http://bestwebsoft.com/plugin/contact-form-to-db-pro/?k=6ebf0743736411607343ad391dc3b436&pn=77&v=' . $cntctfrm_plugin_info["Version"] . '&wp_v=' . $wp_version . '">Learn More</a>
2427
+ </div>
2428
+ <div class="text">
2429
+ ' . __( "<strong>Contact Form to DB</strong> allows to store your messages to the database.", 'contact_form' ) . '<br />
2430
+ <span>' . __( "Manage messages that have been sent from your website.", 'contact_form' ) . '</span>
2431
+ </div>
2432
+ <div class="icon">
2433
+ <img title="" src="' . plugins_url( 'images/banner_for_ctfrmtdb.png', __FILE__ ) . '" alt=""/>
2434
+ </div>
2435
+ </div>
2436
  </div>';
2437
  }
 
2438
  break;
2439
  }
2440
  if ( isset( $all_plugins[ $value[1] ] ) && $all_plugins[ $value[1] ]["Version"] >= $value[2] && ( 0 < count( preg_grep( '/' . str_replace( '/', '\/', $value[1] ) . '/', $active_plugins ) ) || is_plugin_active_for_network( $value[1] ) ) && ! isset( $_COOKIE[ $value[0] ] ) ) {
2445
  }
2446
  }
2447
 
2448
+ /* Function for delete options */
2449
+ if ( ! function_exists ( 'cntctfrm_delete_options' ) ) {
2450
+ function cntctfrm_delete_options() {
2451
+ delete_option( 'cntctfrm_options' );
2452
+ delete_site_option( 'cntctfrm_options' );
2453
+ }
2454
+ }
2455
+
2456
  add_action( 'admin_menu', 'cntctfrm_admin_menu' );
2457
 
2458
  add_action( 'init', 'cntctfrm_init' );
css/style.css CHANGED
@@ -1,51 +1,9 @@
1
- #adminmenu #toplevel_page_bws_plugins div.wp-menu-image,
2
- .admin-color-classic #adminmenu #toplevel_page_bws_plugins div.wp-menu-image,
3
- #adminmenu #toplevel_page_bws_plugins:hover div.wp-menu-image,
4
- #adminmenu #toplevel_page_bws_plugins.wp-has-current-submenu div.wp-menu-image {
5
- background: url("../images/icon_16_single.png") no-repeat scroll center center transparent;
6
- }
7
- #adminmenu #toplevel_page_bws_plugins.wp-not-current-submenu div.wp-menu-image {
8
- opacity: 0.7;
9
- }
10
- #toplevel_page_bws_plugins .wp-submenu .wp-first-item, .cntctfrm_hidden {
11
- display: none;
12
- }
13
- .bws_go_pro_tab {
14
- background-color: #2A95C5;
15
- border-color: #11688F;
16
- color: #FFFFFF;
17
- font-weight: normal;
18
- text-shadow: none;
19
- }
20
- .bws_go_pro_tab:hover {
21
- background-color: #2080AB;
22
- color: #FFFFFF;
23
- border-color: #11688F;
24
- }
25
- .bws_go_pro_tab.nav-tab-active {
26
- background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
27
- border-color: #CCCCCC #CCCCCC #F1F1F1;
28
- color: #000000;
29
- }
30
- /*
31
- * styles for rate-support div on the settings page
32
- */
33
- .bws-plugin-reviews {
34
- background: none repeat scroll 0 0 #BEE1F1;
35
- border: 1px solid #70A8C2;
36
- border-radius: 3px;
37
- max-width: 700px;
38
- }
39
- .bws-plugin-reviews-rate {
40
- padding: 10px;
41
- border-bottom: 1px dashed #70A8C2;
42
- }
43
- .bws-plugin-reviews-support {
44
- padding: 10px;
45
- }
46
  /*
47
  * styles for settings page
48
  */
 
 
 
49
  .bws-plugins_page_contact_form input[type="checkbox"],
50
  .bws-plugins_page_contact_form input[type="radio"] {
51
  position: relative;
@@ -201,7 +159,6 @@
201
  background: #EAEAEA;
202
  }
203
  /* cntctfrm_settings_table */
204
-
205
  .cntctfrm_settings_table th, .cntctfrm_settings_table td {
206
  border-bottom: 1px solid #DFDFDF;
207
  border-right: 1px solid #DFDFDF;
@@ -210,89 +167,15 @@
210
  text-align: left;
211
  }
212
  /*
213
- * styles for pro_version settings, banner and tooltip
214
  */
215
- table.bws_pro_version {
216
- background: #E0E0E0;
217
- border: 1px solid #AAA;
218
- margin-bottom: 5px;
219
- width: auto !important;
220
- }
221
- table.bws_pro_version th,
222
- table.bws_pro_version td {
223
- color: #555;
224
- padding-left: 10px;
225
- }
226
- td.bws_pro_version {
227
- background: #E0E0E0;
228
- border: 1px solid #AAA;
229
- }
230
- .bws_pro_version_tooltip,
231
  .cntctfrm_settings_table .bws_pro_version_tooltip {
232
  background: #FFF;
233
  border: 1px solid #AAA;
234
  }
235
- .form-table.bws_pro_version .bws_pro_version_tooltip th {
236
- font-weight: normal;
237
- padding-bottom: 10px;
238
- }
239
  .cntctfrmpr_department_table > img {
240
  margin: -21px 17px 0;
241
  }
242
  #cntctfrmpr_pro_version > td {
243
  width: 900px;
244
  }
245
- /* banner */
246
- .bws_banner_on_plugin_page {
247
- border: 1px solid #d4d4d4;
248
- margin: 12px 0;
249
- background: #FFF;
250
- position: relative;
251
- overflow: hidden
252
- }
253
- .bws_banner_on_plugin_page .text {
254
- color: #000;
255
- font-size: 15px;
256
- line-height: 26px;
257
- margin: 18px 18px 14px;
258
- float: left;
259
- width: 80%;
260
- }
261
- .bws_banner_on_plugin_page .text span {
262
- font-size: 12px;
263
- opacity: 0.7;
264
- }
265
- .bws_banner_on_plugin_page .button {
266
- float: left;
267
- border: none;
268
- font-size: 14px;
269
- margin: 18px 0 18px 16px;
270
- padding: 12px 0;
271
- color: #FFF;
272
- text-shadow: none;
273
- font-weight: bold;
274
- background: #0074A2;
275
- -moz-border-radius: 3px;
276
- border-radius: 3px;
277
- -webkit-border-radius: 3px;
278
- text-decoration: none;
279
- height: 50px;
280
- text-align: center;
281
- text-transform: uppercase;
282
- width: 147px;
283
- box-shadow: none;
284
- }
285
- .bws_banner_on_plugin_page .button:hover,
286
- .bws_banner_on_plugin_page .button:focus {
287
- background: #222;
288
- color: #FFF;
289
- }
290
- .bws_banner_on_plugin_page .icon {
291
- float: right;
292
- margin: 18px 8px 8px 0;
293
- }
294
- .bws_banner_on_plugin_page .close_icon {
295
- float: right;
296
- margin: 8px;
297
- cursor: pointer;
298
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /*
2
  * styles for settings page
3
  */
4
+ .cntctfrm_hidden {
5
+ display: none;
6
+ }
7
  .bws-plugins_page_contact_form input[type="checkbox"],
8
  .bws-plugins_page_contact_form input[type="radio"] {
9
  position: relative;
159
  background: #EAEAEA;
160
  }
161
  /* cntctfrm_settings_table */
 
162
  .cntctfrm_settings_table th, .cntctfrm_settings_table td {
163
  border-bottom: 1px solid #DFDFDF;
164
  border-right: 1px solid #DFDFDF;
167
  text-align: left;
168
  }
169
  /*
170
+ * styles for pro_version settings
171
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  .cntctfrm_settings_table .bws_pro_version_tooltip {
173
  background: #FFF;
174
  border: 1px solid #AAA;
175
  }
 
 
 
 
176
  .cntctfrmpr_department_table > img {
177
  margin: -21px 17px 0;
178
  }
179
  #cntctfrmpr_pro_version > td {
180
  width: 900px;
181
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/style_wp_before_3.8.css CHANGED
@@ -1,53 +1,9 @@
1
- #adminmenu #toplevel_page_bws_plugins div.wp-menu-image {
2
- background: url("../images/icon_16.png") no-repeat scroll center center transparent;
3
- }
4
- .admin-color-classic #adminmenu #toplevel_page_bws_plugins div.wp-menu-image {
5
- background: url("../images/icon_16_b.png") no-repeat scroll center center transparent;
6
- }
7
- #adminmenu #toplevel_page_bws_plugins:hover div.wp-menu-image,
8
- #adminmenu #toplevel_page_bws_plugins.wp-has-current-submenu div.wp-menu-image {
9
- background: url("../images/icon_16_c.png") no-repeat scroll center center transparent;
10
- }
11
- .wrap #icon-options-general.icon32-bws {
12
- background: url("../images/icon_36.png") no-repeat scroll left top transparent;
13
- }
14
- .admin-color-classic .wrap #icon-options-general.icon32-bws {
15
- background: url("../images/icon_36_b.png") no-repeat scroll left top transparent;
16
- }
17
- #toplevel_page_bws_plugins .wp-submenu .wp-first-item, .cntctfrm_hidden {
18
- display: none;
19
- }
20
- .bws_go_pro_tab {
21
- background-color: #2A95C5;
22
- border-color: #11688F;
23
- color: #FFFFFF;
24
- font-weight: normal !important;
25
- text-shadow: none;
26
- }
27
- .bws_go_pro_tab:hover {
28
- background-color: #2080AB;
29
- color: #FFFFFF;
30
- border-color: #11688F;
31
- }
32
- /*
33
- * styles for rate-support div on the settings page
34
- */
35
- .bws-plugin-reviews {
36
- background: none repeat scroll 0 0 #BEE1F1;
37
- border: 1px solid #70A8C2;
38
- border-radius: 3px;
39
- max-width: 700px;
40
- }
41
- .bws-plugin-reviews-rate {
42
- padding: 10px;
43
- border-bottom: 1px dashed #70A8C2;
44
- }
45
- .bws-plugin-reviews-support {
46
- padding: 10px;
47
- }
48
  /*
49
  * styles for settings page
50
  */
 
 
 
51
  .bws-plugins_page_contact_form input[type="checkbox"],
52
  .bws-plugins_page_contact_form input[type="radio"] {
53
  position: relative;
@@ -197,7 +153,6 @@
197
  background: #EAEAEA;
198
  }
199
  /* cntctfrm_settings_table */
200
-
201
  .cntctfrm_settings_table th, .cntctfrm_settings_table td {
202
  border-bottom: 1px solid #DFDFDF;
203
  border-right: 1px solid #DFDFDF;
@@ -208,91 +163,13 @@
208
  /*
209
  * styles for pro_version settings, banner and tooltip
210
  */
211
- table.bws_pro_version {
212
- background: #E0E0E0;
213
- border: 1px solid #AAA;
214
- margin-bottom: 5px;
215
- width: auto !important;
216
- }
217
- table.bws_pro_version th,
218
- table.bws_pro_version td {
219
- color: #555;
220
- padding-left: 10px;
221
- }
222
- td.bws_pro_version {
223
- background: #E0E0E0;
224
- border: 1px solid #AAA;
225
- }
226
- .bws_pro_version_tooltip,
227
  .cntctfrm_settings_table .bws_pro_version_tooltip {
228
  background: #FFF;
229
  border: 1px solid #AAA;
230
  }
231
- .form-table.bws_pro_version .bws_pro_version_tooltip th {
232
- font-weight: normal;
233
- padding-bottom: 10px;
234
- }
235
  .cntctfrmpr_department_table > img {
236
  margin: -21px 17px 0;
237
  }
238
  #cntctfrmpr_pro_version > td {
239
  width: 900px;
240
- }
241
- /* banner */
242
- .bws_banner_on_plugin_page {
243
- border: 1px solid #d4d4d4;
244
- background: #FFF;
245
- position: relative;
246
- overflow: hidden;
247
- margin: 12px 0;
248
- background: #ECECEC;
249
- -moz-border-radius: 3px;
250
- -webkit-border-radius: 3px;
251
- border-radius: 3px;
252
- }
253
- .bws_banner_on_plugin_page .text {
254
- color: #000;
255
- font-size: 15px;
256
- line-height: 26px;
257
- margin: 18px 18px 14px;
258
- float: left;
259
- width: 80%;
260
- }
261
- .bws_banner_on_plugin_page .text span {
262
- font-size: 12px;
263
- opacity: 0.7;
264
- }
265
- .bws_banner_on_plugin_page .button {
266
- float: left;
267
- border: none;
268
- font-size: 14px;
269
- margin: 18px 0 18px 16px;
270
- padding: 14px 0;
271
- color: #FFF;
272
- text-shadow: none;
273
- font-weight: bold;
274
- background: #0074A2;
275
- -moz-border-radius: 3px;
276
- border-radius: 3px;
277
- -webkit-border-radius: 3px;
278
- text-decoration: none;
279
- height: 50px;
280
- text-align: center;
281
- text-transform: uppercase;
282
- width: 147px;
283
- box-shadow: none;
284
- }
285
- .bws_banner_on_plugin_page .button:hover,
286
- .bws_banner_on_plugin_page .button:focus {
287
- background: #222;
288
- color: #FFF;
289
- }
290
- .bws_banner_on_plugin_page .icon {
291
- float: right;
292
- margin: 18px 8px 8px 0;
293
- }
294
- .bws_banner_on_plugin_page .close_icon {
295
- float: right;
296
- margin: 8px;
297
- cursor: pointer;
298
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /*
2
  * styles for settings page
3
  */
4
+ .cntctfrm_hidden {
5
+ display: none;
6
+ }
7
  .bws-plugins_page_contact_form input[type="checkbox"],
8
  .bws-plugins_page_contact_form input[type="radio"] {
9
  position: relative;
153
  background: #EAEAEA;
154
  }
155
  /* cntctfrm_settings_table */
 
156
  .cntctfrm_settings_table th, .cntctfrm_settings_table td {
157
  border-bottom: 1px solid #DFDFDF;
158
  border-right: 1px solid #DFDFDF;
163
  /*
164
  * styles for pro_version settings, banner and tooltip
165
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  .cntctfrm_settings_table .bws_pro_version_tooltip {
167
  background: #FFF;
168
  border: 1px solid #AAA;
169
  }
 
 
 
 
170
  .cntctfrmpr_department_table > img {
171
  margin: -21px 17px 0;
172
  }
173
  #cntctfrmpr_pro_version > td {
174
  width: 900px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  }
languages/contact_form-fr_FR.mo CHANGED
File without changes
languages/contact_form-fr_FR.po CHANGED
File without changes
languages/contact_form-nl_NL.mo CHANGED
File without changes
languages/contact_form-nl_NL.po CHANGED
File without changes
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.2checkout.com/checkout/purchase?sid=1430388&quantity=10
4
  Tags: Contact Form, text, contact, form, contacts, contact form, request, contact me, feedback form, feedback, contact button, contact form plugin, contacts form plugin, attachment, send, copy, attachment, send copy
5
  Requires at least: 3.0
6
  Tested up to: 3.8.1
7
- Stable tag: 3.73
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -41,7 +41,7 @@ There is also a premium version of the plugin - <a href="http://bestwebsoft.com/
41
  * <a href="http://wordpress.org/plugins/updater/">Updater</a> - This plugin updates WordPress core and the plugins to the recent versions. You can also use the auto mode or manual mode for updating and set email notifications.
42
  There is also a premium version of the plugin <a href="http://bestwebsoft.com/plugin/updater-pro/?k=982fae837f4c6e3b152183537448dbca">Updater Pro</a> with more useful features available. It can make backup of all your files and database before updating. Also it can forbid some plugins or WordPress Core update.
43
  * <a href="http://wordpress.org/plugins/contact-form-to-db/">Contact Form To DB</a> - This plugin is an exclusive add-on for the Contact Form plugin by BestWebSoft. The plugin provides a unique opportunity to manage messages sent from your site via the contact form. Please pay attention, that this plugin is an add-on ONLY for Contact Form plugin by BestWebSoft, that's why it will not work with any other contact form plugins.
44
- There is also a premium version of the plugin <a href="http://bestwebsoft.com/plugin/updater-pro/?k=d7d962591b5be0ce6c27af778b1b36ee">Contact Form To DB Pro</a>, allowing to re-send and preiodically delete messages, manage attachments and get detailed support and answers to your questions.
45
 
46
  = Translation =
47
 
@@ -152,6 +152,11 @@ Please make sure that the problem hasn't been discussed yet on our forum (<a hre
152
 
153
  == Changelog ==
154
 
 
 
 
 
 
155
  = V3.73 - 06.03.2014 =
156
  * Budfix : Plugin optimization is done.
157
  * Update : The French language file is updated.
@@ -479,6 +484,9 @@ Please make sure that the problem hasn't been discussed yet on our forum (<a hre
479
 
480
  == Upgrade Notice ==
481
 
 
 
 
482
  = V3.73 =
483
  Plugin optimization is done. The French language file is updated. We fixed the bug of duplicate MIME-Version.
484
 
4
  Tags: Contact Form, text, contact, form, contacts, contact form, request, contact me, feedback form, feedback, contact button, contact form plugin, contacts form plugin, attachment, send, copy, attachment, send copy
5
  Requires at least: 3.0
6
  Tested up to: 3.8.1
7
+ Stable tag: 3.74
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
41
  * <a href="http://wordpress.org/plugins/updater/">Updater</a> - This plugin updates WordPress core and the plugins to the recent versions. You can also use the auto mode or manual mode for updating and set email notifications.
42
  There is also a premium version of the plugin <a href="http://bestwebsoft.com/plugin/updater-pro/?k=982fae837f4c6e3b152183537448dbca">Updater Pro</a> with more useful features available. It can make backup of all your files and database before updating. Also it can forbid some plugins or WordPress Core update.
43
  * <a href="http://wordpress.org/plugins/contact-form-to-db/">Contact Form To DB</a> - This plugin is an exclusive add-on for the Contact Form plugin by BestWebSoft. The plugin provides a unique opportunity to manage messages sent from your site via the contact form. Please pay attention, that this plugin is an add-on ONLY for Contact Form plugin by BestWebSoft, that's why it will not work with any other contact form plugins.
44
+ There is also a premium version of the plugin <a href="http://bestwebsoft.com/plugin/contact-form-to-db-pro/?k=d7d962591b5be0ce6c27af778b1b36ee">Contact Form To DB Pro</a>, allowing to re-send and preiodically delete messages, manage attachments and get detailed support and answers to your questions.
45
 
46
  = Translation =
47
 
152
 
153
  == Changelog ==
154
 
155
+ = V3.74 - 24.03.2014 =
156
+ * NEW : Compatibility with plugin Contact Form Multi.
157
+ * NEW : 'xlsx' mime-type is added.
158
+ * NEW : Added transition to the contact form after submitting.
159
+
160
  = V3.73 - 06.03.2014 =
161
  * Budfix : Plugin optimization is done.
162
  * Update : The French language file is updated.
484
 
485
  == Upgrade Notice ==
486
 
487
+ = V3.74 =
488
+ Compatibility with plugin Contact Form Multi. 'xlsx' mime-type is added. Added transition to the contact form after submitting.
489
+
490
  = V3.73 =
491
  Plugin optimization is done. The French language file is updated. We fixed the bug of duplicate MIME-Version.
492