Example #1
0
/**
 * Show the Setup Box and some info for Flash Album Gallery
 * 
 * @return void
 */
function flag_overview_setup()
{
    global $flag;
    if (isset($_POST['resetdefault'])) {
        check_admin_referer('flag_uninstall');
        include_once dirname(__FILE__) . '/flag_install.php';
        include_once dirname(__FILE__) . '/tuning.php';
        flag_default_options();
        flag_tune(true, true);
        $flag->define_constant();
        $flag->load_options();
        flagGallery::show_message(__('Reset all settings to default parameter', 'flag'));
    }
    if (isset($_POST['uninstall'])) {
        check_admin_referer('flag_uninstall');
        include_once dirname(__FILE__) . '/flag_install.php';
        flag_uninstall();
        flagGallery::show_message(__('Uninstall sucessful ! Now delete the plugin and enjoy your life ! Good luck !', 'flag'));
    }
    ?>
		<div class="submitbox" id="submitpost">
			<div id="minor-publishing">
				<div id="misc-publishing-actions">
					<div class="misc-pub-section">
						<span id="plugin-home" class="icon">
							<strong><a href="http://codeasily.com/wordpress-plugins/flag/" style="text-decoration: none;"><?php 
    _e('Plugin Home', 'flag');
    ?>
</a></strong>
						</span>
					</div>
					<div class="misc-pub-section">
						<span id="plugin-comments" class="icon">
							<a href="http://codeasily.com/community/forum/flagallery-wordpress-plugin/" style="text-decoration: none;"><?php 
    _e('Plugin Forum', 'flag');
    ?>
</a>
						</span>
					</div>
					<div class="misc-pub-section">
						<span id="rate-plugin" class="icon">
							<a href="http://wordpress.org/extend/plugins/flash-album-gallery/" style="text-decoration: none;"><?php 
    _e('Rate Plugin', 'flag');
    ?>
</a>
						</span>
					</div>
					<div class="misc-pub-section curtime misc-pub-section-last">
						<span id="contact-me" class="icon">
							<a href="http://codeasily.com/support/contact/" style="text-decoration: none;"><?php 
    _e('Contact Me', 'flag');
    ?>
</a>
						</span>
					</div>
				</div>
			</div>
		</div>
	<?php 
    if (!IS_WPMU || flag_wpmu_site_admin()) {
        ?>
	<div id="major-publishing-actions">
	<form id="resetsettings" name="resetsettings" method="post">
		<?php 
        wp_nonce_field('flag_uninstall');
        ?>
			<div id="save-action" class="alignleft">
				<input class="button" id="save-post" type="submit" name="resetdefault" value="<?php 
        _e('Reset settings', 'flag');
        ?>
" onclick="javascript:check=confirm('<?php 
        _e('Reset all options to default settings ?\\n\\nChoose [Cancel] to Stop, [OK] to proceed.\\n', 'flag');
        ?>
');if(check==false) return false;" />
			</div>
			<div id="preview-action" class="alignright">
				<input type="submit" name="uninstall" class="button delete" value="<?php 
        _e('Uninstall plugin', 'flag');
        ?>
" onclick="javascript:check=confirm('<?php 
        _e('You are about to Uninstall this plugin from WordPress.\\nThis action is not reversible.\\n\\nChoose [Cancel] to Stop, [OK] to Uninstall.\\n', 'flag');
        ?>
');if(check==false) return false;" />
			</div>
			<br class="clear" />
	</form>
	</div>
	<?php 
    }
    ?>

<?php 
}
Example #2
0
 function uninstall()
 {
     include_once dirname(__FILE__) . '/admin/flag_install.php';
     flag_uninstall();
 }