echo get_option('ml_datetype', 'prettydate') == 'datetime' ? 'checked' : '';
?>
/>
                    <label for="ml_date_type_date">Show full dates</label>
                    <input name="ml_dateformat" id="ml_dateformat" type="text" value="<?php 
echo get_option("ml_dateformat", 'F j, Y');
?>
" />
                </div>
            </div>


            <p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes"></p>
        </form>
	    <?php 
if (strlen(wp2android::get_option('ml_pb_app_id')) > 0 && wp2android::get_option('ml_pb_app_id') < "543e7b3f1d0ab16d148b4599") {
    ?>
        <div class='update-nag'>
            <p>Some of the functionality above applies only to new apps. Your app might require to be updated for these settings to take effect.</p>
			<p>Should you have any questions or to request an update, get in touch at <a href='mailto:support@wp2android.wps.edu.vn'>support@wp2android.wps.edu.vn</a>.</p>
        </div>
        <?php 
}
?>
    </div>
    <div class="get_started_preview">
        <div class="ml-form-row">
            <label>Quick preview of the app design</label>
            <div class="os-selection">
                <div class="radio-wrap">
                    <input type="radio" id='ml_preview_os_ios' name="ml_preview_os" value='ios' checked/>
<div id="ml_push_notifications" class="tabs-panel ml-compact">
    <?php 
if (strlen(wp2android::get_option('ml_pb_app_id')) <= 0 && strlen(wp2android::get_option('ml_pb_secret_key')) <= 0) {
    ?>
    <div id="ml_admin_push" style="padding-top:30px">

		<p>This page will be accessible once you have <a target='_blank' href="http://www.wp2android.wps.edu.vn/publish/?utm_source=wp-plugin-admin&utm_medium=web&utm_campaign=plugin-admin-push">purchased your app</a> and <a href="./admin.php?page=wp2android_settings&tab=license">entered a valid license key</a>. Note notifications cannot be tested using the preview app, as they will only be available once your app is published.
			
		<br/><br/>
		
		 You'll be able to send manual push notification messages to your users, attaching posts and pages to every message. You'll also find here a convenient log of all messages previously sent.</p>
 		
		<p>Any questions on push notifications? <a class="ml-intercom" href="mailto:h89uu5zu@incoming.intercom.io">Ask us anything</a>.</p>
		 
			
    </div>
    <?php 
} else {
    ?>
    <form method="post" action="<?php 
    echo admin_url('admin.php?page=wp2android_push&tab=notifications');
    ?>
">
        <?php 
    wp_nonce_field('form-push_notifications');
    ?>
        <h3>Send manual message</h3>
        <div id="success-message" class="updated" style="display: none;">Your message has been sent!</div>
        <?php 
    ml_push_notification_manual_send();
    ?>
function ml_init_getvero()
{
    if (is_admin() && current_user_can('administrator') && wp2android::get_option('ml_initial_details_saved') && ml_using_wp2android()) {
        $user_email = wp2android::get_option('ml_user_email');
        $user_name = wp2android::get_option('ml_user_name');
        $user_site = wp2android::get_option('ml_user_site');
        ?>
        <script type="text/javascript">
            var _veroq = _veroq || [];

            _veroq.push(['init', {
              api_key: '36bd54bf9afde30628102337cf6dc4306a6a212a',
              development_mode: false 
              // Turn this off when you decide to 'go live'.
            } ]);

            _veroq.push(['user', {
                id: "<?php 
        echo esc_js($user_email);
        ?>
", 
                email: "<?php 
        echo esc_js($user_email);
        ?>
", 
                name: "<?php 
        echo esc_js($user_name);
        ?>
",
                website: "<?php 
        echo esc_js($user_site);
        ?>
",
				installurl: "<?php 
        echo get_site_url();
        ?>
",              
                website_name: "<?php 
        echo get_bloginfo('name');
        ?>
",
				post_count: "<?php 
        echo wp_count_posts()->publish;
        ?>
",
				homepage_type: "<?php 
        echo get_option('show_on_front ');
        ?>
",
                sitename: "<?php 
        echo get_bloginfo('name');
        ?>
",
                version: "<?php 
        echo wp2android_PLUGIN_VERSION;
        ?>
",
                user_lever: 'administrator',
                version: "<?php 
        echo wp2android_PLUGIN_VERSION;
        ?>
",
              }]);

            (function() {var ve = document.createElement('script'); ve.type = 'text/javascript'; ve.async = true; ve.src = '//getvero.com/assets/m.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ve, s);})();

        </script>
        <?php 
    }
}
                    <input type="text" placeholder="Image ID" id="ml_custom_featured_image" name="ml_custom_featured_image" value="<?php 
echo esc_attr(wp2android::get_option('ml_custom_featured_image'));
?>
"/>
                </div>
            </div>            
        </div>

        <h4>Override Article/Page URL with a custom field</h4>
        <div class='ml-col-row'>
            <div class='ml-col-half'>
                <p>When sharing your content, users will normally share the article's URL. For curation-based publications,
                    though, you might want users to share the source for that story.</p>
                <p>Enter a custom field name to the right which you can fill for every post with the URL you want users to share.</p>
            </div>
            <div class='ml-col-half'>
                <div class="ml-form-row ml-left-align clearfix">
                    <label class='ml-width-120' for="ml_custom_field_url">URL Field Name</label>
                    <input type="text" placeholder="Custom Field Name" id="ml_custom_field_url" name="ml_custom_field_url" value="<?php 
echo esc_attr(wp2android::get_option('ml_custom_field_url'));
?>
"/>
                </div>
            </div>
        </div>
		

        
        <p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes"></p>
    </form>
</div>
/>
                            <label for="postypes_<?php 
        echo esc_attr($v);
        ?>
"><?php 
        echo esc_html($v);
        ?>
</label>
                        </div>
                        <?php 
    }
}
?>
            </div>
        </div>
        <h4>Security settings (advanced)</h4>
        <div class='ml-col-row'>
            <div class='ml-col-half'>
                <p>Choose whether to use SSL to communicate with our push service.</p>            
            </div>
            <div class="ml-form-row ml-checkbox-wrap no-margin">
                <input type="checkbox" id="ml_pb_use_ssl" name="ml_pb_use_ssl" value="true" <?php 
echo wp2android::get_option('ml_pb_use_ssl') ? 'checked' : '';
?>
/>
                <label for="ml_pb_use_ssl">Enable SSL for push notifications</label>
            </div>
        </div>
        <p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes"></p>
    </form>
</div>
">signed up</a> for one of our plans and your app has been published, enter here the License keys we have sent you.</p>
			
             <table class="form-table">
                <tbody>
                    <tr valign="top">
                        <th scope="row">License Key</th>
                        <td>
                            <input size="36" type="text" id="ml_pb_app_id" name="ml_pb_app_id" placeholder="Enter License Key" value='<?php 
echo wp2android::get_option('ml_pb_app_id');
?>
'>
                        </td>
                    </tr>
                    <tr valign="top">
                        <th scope="row">Secret Key</th>
                        <td>
                            <input size="36" type="text" id="ml_pb_secret_key" name="ml_pb_secret_key" placeholder="Enter Secret Key" value='<?php 
echo wp2android::get_option('ml_pb_secret_key');
?>
'>
                        </td>
                    </tr>
                </tbody>
             </table>
			 
			<p>Can't find your license keys? <a class="ml-intercom" href="mailto:h89uu5zu@incoming.intercom.io">Request your keys</a> from our support team.</p>

        </div>       
        <p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes"></p>
    </form>
</div>
    echo esc_attr($editor_key);
    ?>
'><?php 
    echo stripslashes(htmlspecialchars(wp2android::get_option($editor_key, '')));
    ?>
</textarea>
            <?php 
}
?>
            
            <h4>Preview the results</h4>
            <p>Select a post or page to preview the results of your edits.</p>
            <select id="preview_popup_post_select">
                <?php 
$posts_query = array('posts_per_page' => 10, 'orderby' => 'post_date', 'order' => 'DESC', 'post_type');
$included_post_types = explode(",", wp2android::get_option('ml_article_list_include_post_types', array()));
foreach ($included_post_types as $post_type) {
    $posts_query['post_type'] = $post_type;
    $posts = get_posts($posts_query);
    if (count($posts) > 0) {
        ?>
                    
                        <optgroup label="<?php 
        echo ucfirst($post_type);
        ?>
">
                        <?php 
        foreach ($posts as $post) {
            ?>

                        <option value="<?php 
<div id="get_started_menu_config" class="tabs-panel">
    <h3>Test your app in the simulator</h3>
    <p>
	   Test-drive your app in the simulator before signing up and publishing it.
    </p>
	
    <?php 
$user_email = wp2android::get_option('ml_user_email');
$user_name = wp2android::get_option('ml_user_name');
$user_site = wp2android::get_option('ml_user_site');
$plugin_url = wp2android::get_plugin_url();
$plugin_version = wp2android_PLUGIN_VERSION;
$http_prefix = 'http';
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
    $http_prefix = 'https';
}
?>
    <?php 
add_thickbox();
?>
    <a href="<?php 
echo $http_prefix;
?>
://www.wp2android.wps.edu.vn/simulator/?name=<?php 
echo urlencode(esc_attr($user_name));
?>
&email=<?php 
echo urlencode(esc_attr($user_email));
?>
&site=<?php 
echo urlencode(esc_url($user_site));
                        <?php 
}
?>
                </ul>
            </div>
        </div>
        <h3 class="ml-push-top">Menu Settings</h3>
        <div class='ml-col-row'>
            <div class="ml-col-half">
                <p>Customise your app menu by adjusting what it should display.</p>
            </div>
            <div class="ml-col-half">
                <div class="ml-form-row ml-checkbox-wrap">
                    <input type="checkbox" id="ml_menu_show_favorites" name="ml_menu_show_favorites" value="true" <?php 
echo wp2android::get_option('ml_menu_show_favorites') ? 'checked' : '';
?>
/>
                    <label for="ml_menu_show_favorites">Show Favourites in the app menu</label>
                </div>
                <div class="ml-form-row ml-checkbox-wrap no-margin">
                    <input type="checkbox" id="ml_show_android_cat_tabs" name="ml_show_android_cat_tabs" value="true" <?php 
echo wp2android::get_option('ml_show_android_cat_tabs') ? 'checked' : '';
?>
/>
                    <label for="ml_show_android_cat_tabs">Show categories tab menu at the top of the screen on Android</label>
                </div>
            </div>
        </div>
        <p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes"></p>
    </form>
</div>
                </td>
            </tr>
            <tr valign="top">
                <th scope="row">Your email</th>
                <td>
                    <input size="36" type="email" id="ml-user-email" name="email" placeholder="Enter your email" value='<?php 
echo wp2android::get_option('ml_user_email', $current_user->user_email);
?>
' required>
                </td>
            </tr>
            <tr valign="top">
                <th scope="row">Your website</th>
                <td>
                    <input size="36" type="text" id="ml-user-site" name="website" placeholder="Enter your website" value='<?php 
echo wp2android::get_option('ml_site_url', get_site_url());
?>
'>
                </td>
            </tr>
            <tr>
                <td colspan='2'>
                    <small>By using wp2android you agree to wp2android's <a target="_blank" href="http://www.wp2android.wps.edu.vn/terms/<?php 
echo get_option('affiliate_link', null);
?>
">Terms of service</a> and <a target="_blank" href="http://www.wp2android.wps.edu.vn/privacy/<?php 
echo get_option('affiliate_link', null);
?>
">Privacy policy</a> </small>
                </td>
            </tr>
<div id="ml_settings_membership" class="tabs-panel ml-compact">
    <form method="post" action="<?php 
echo admin_url('admin.php?page=wp2android_settings&tab=membership');
?>
">
        <?php 
wp_nonce_field('form-settings_membership');
?>
        <h3>Membership</h3>
        <div class='ml-col-twothirds'>
            <p>wp2android can integrate with a number of WordPress membership plugins and require your users to authenticate to access the contents of your app.</p>
			<p>Don't see your membership plugin here? <a class="ml-intercom" href="mailto:h89uu5zu@incoming.intercom.io">Contact our developers</a> for help.</p>
            <div class="ml-form-row ml-checkbox-wrap">
                <input type="checkbox" id="ml_subscriptions_enable" name="ml_subscriptions_enable" value="true" <?php 
echo wp2android::get_option('ml_subscriptions_enable') ? 'checked' : '';
?>
/>
                <label for="ml_subscriptions_enable">Enable <a target="_blank" href="https://wordpress.org/plugins/groups/">WP-Groups</a> subscriptions</label>
            </div>
        </div>        
        <p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes"></p>
    </form>
</div>