public static function index() {

		$model = new Ai1wmge_Settings;

		// Google Drive update
		if ( isset( $_POST['ai1wmge-gdrive-update'] ) ) {

			// Cron update
			if ( ! empty( $_POST['ai1wmge-gdrive-cron'] ) ) {
				$model->cron( (array) $_POST['ai1wmge-gdrive-cron'] );
			} else {
				$model->cron( array() );
			}

			// Set SSL mode
			if ( ! empty( $_POST['ai1wmge-gdrive-ssl'] ) ) {
				$model->ssl( 0 );
			} else {
				$model->ssl( 1 );
			}

			// Set number of backups
			if ( ! empty( $_POST['ai1wmge-gdrive-backups'] ) ) {
				$model->backups( (int) $_POST['ai1wmge-gdrive-backups'] );
			} else {
				$model->backups( 0 );
			}

			// Set size of backups
			if ( ! empty( $_POST['ai1wmge-gdrive-total'] ) && ! empty( $_POST['ai1wmge-gdrive-total-unit'] ) ) {
				$model->total( (int) $_POST['ai1wmge-gdrive-total'] . trim( $_POST['ai1wmge-gdrive-total-unit'] ) );
			} else {
				$model->total( 0 );
			}

			$model->email( $_POST['ai1wmge-notification-email'] );

			$model->toggle( isset( $_POST['ai1wmge-notification-toggle'] ) );
		}

		// Google Drive logout
		if ( isset( $_POST['ai1wmge-gdrive-logout'] ) ) {
			$model->revoke();
		}

		Ai1wm_Template::render(
			'settings/index',
			array(
				'backups'   => get_option( 'ai1wmge_gdrive_backups', false ),
				'cron'      => get_option( 'ai1wmge_gdrive_cron', array() ),
				'email'     => get_option( 'ai1wmge_gdrive_notify_email', get_option( 'admin_email', '' ) ),
				'notify'    => get_option( 'ai1wmge_gdrive_notify_toggle', false ),
				'ssl'       => get_option( 'ai1wmge_gdrive_ssl', true ),
				'timestamp' => get_option( 'ai1wmge_gdrive_timestamp', false ),
				'token'     => get_option( 'ai1wmge_gdrive_token', false ),
				'total'     => get_option( 'ai1wmge_gdrive_total', false ),
			),
			AI1WMGE_TEMPLATES_PATH
		);
	}
	public static function picker() {
		Ai1wm_Template::render(
			'import/picker',
			array(),
			AI1WMGE_TEMPLATES_PATH
		);
	}
 public static function index()
 {
     try {
         $is_accessible = StorageArea::getInstance()->getRootPath();
     } catch (Exception $e) {
         $is_accessible = false;
     }
     Ai1wm_Template::render('import/index', array('is_accessible' => $is_accessible, 'max_file_size' => apply_filters('ai1wm_max_file_size', AI1WM_MAX_FILE_SIZE)));
 }
 public static function index()
 {
     try {
         $storage = new StorageArea();
         $is_accessible = $storage->makeFile();
         $storage->flush();
     } catch (Exception $e) {
         $is_accessible = false;
     }
     Ai1wm_Template::render('import/index', array('is_accessible' => $is_accessible));
 }
 public static function index()
 {
     try {
         $is_accessible = StorageArea::getInstance()->getRootPath();
     } catch (Exception $e) {
         $is_accessible = false;
     }
     // Messages
     $model = new Ai1wm_Message();
     $messages = $model->get_messages();
     Ai1wm_Template::render('export/index', array('messages' => $messages, 'is_accessible' => $is_accessible));
 }
 public static function index()
 {
     $model = new Ai1wm_Backup();
     // Username
     if (isset($_POST['ai1wm-username'])) {
         update_site_option(AI1WM_AUTH_USER, $_POST['ai1wm-username']);
     }
     // Password
     if (isset($_POST['ai1wm-password'])) {
         update_site_option(AI1WM_AUTH_PASSWORD, $_POST['ai1wm-password']);
     }
     Ai1wm_Template::render('backup/index', array('backups' => $model->get_files(), 'free_space' => $model->get_free_space(), 'total_space' => $model->get_total_space(), 'username' => get_site_option(AI1WM_AUTH_USER, false), 'password' => get_site_option(AI1WM_AUTH_PASSWORD, false)));
 }
 public static function index()
 {
     try {
         $storage = new StorageArea();
         $is_accessible = $storage->makeFile();
         $storage->flush();
     } catch (Exception $e) {
         $is_accessible = false;
     }
     // Message
     $message = new Ai1wm_Message();
     $is_closed = $message->is_closed(Ai1wm_Message::MESSAGE_INFO);
     Ai1wm_Template::render('export/index', array('list_plugins' => get_plugins(), 'is_accessible' => $is_accessible, 'is_closed' => $is_closed));
 }
 public static function index()
 {
     Ai1wm_Template::render('import/index');
 }
	/**
	 * Outputs menu icon between head tags
	 *
	 * @return void
	 */
	public function admin_head() {
		global $wp_version;

		// Admin header
		Ai1wm_Template::render( 'main/admin-head', array( 'version' => $wp_version ) );
	}
 public static function index()
 {
     // Get message model
     $model = new Ai1wm_Message();
     Ai1wm_Template::render('export/index', array('messages' => $model->get_messages()));
 }