print "<script> window.location = 'index.php'; </script>"; exit; } require_once $basepath . "/plugins/blogger/includes/blogger.class.php"; $blogger_license_key = $settings->getSetting("blogger_license_key"); if (empty($blogger_license_key)) { $blogger_license_key = ''; } $blogger = new Blogger($blogger_license_key); if (!$blogger->valid) { print "<script> window.location = 'index.php?menu=plugin&plugin=blogger&plugin_menu=blogger_config'; </script>"; exit; } if (isset($_POST['add_post'])) { $params = $_POST; $errors = $blogger->validatePost($params); if (!count($errors)) { $post_id = $blogger->addPost($params); $add_success = true; } } if (isset($_POST['update_post']) && isset($_POST['post_id'])) { $params = $_POST; $errors = $blogger->validatePost($params); if (!count($errors)) { $blogger->updatePost($_POST['post_id'], $params); $upd_success = true; } } if (isset($_REQUEST['post_id'])) { $post_id = $_REQUEST['post_id'];