File: /www/wwwroot/www.scdc-marine.com/wp-content/plugins/Static-Html-Output/views/options-page.phtml
<?php
/**
* @package WP2Static
*
* Copyright (c) 2011 Leon Stafford
*/
$ajax_nonce = wp_create_nonce( 'wpstatichtmloutput' );
require_once(__DIR__ . '/../plugin/WP2Static/TemplateHelper.php');
$tpl = new TemplateHelper();
?>
<div class="heku-main-container">
<div class="heku-content-header">
<div class="heku-content-header-inner-wrapper">
<div class="heku-fixed-header-button-left">
<div class="heku-content-header-title">WordPress导出纯静态网站</div>
</div>
<!-- <h2 class="nav-tab-wrapper heku-fixed-header-button-right">
<a class="nav-tab nav-tab-active heku-btn heku-btn-primary ml-4" href="#">基础插件设置 </a>
<a class="nav-tab heku-btn heku-btn-primary ml-4 " href="#">生成静态页面 </a>
<a class="nav-tab nav-tab-active heku-btn heku-btn-primary ml-4" href="#">基础插件设置 </a>
<a class="nav-tab heku-btn heku-btn-primary ml-4 " href="#">生成静态页面 </a>
<a class="nav-tab nav-tab-active heku-btn heku-btn-primary ml-4" href="#">基础插件设置 </a>
<a class="nav-tab heku-btn heku-btn-primary ml-4 " href="#">生成静态页面 </a>
</h2> -->
<div class="nav-tab-wrapper heku-fixed-header-button-right">
<a href="#" class="nav-tab heku-btn heku-btn-primary ml-4 nav-tab-active">部署静态网站</a>
<a href="#" class="nav-tab heku-btn heku-btn-primary ml-4">爬站列表设置</a>
<a href="#" class="nav-tab heku-btn heku-btn-primary ml-4">处理中 Processing</a>
<a href="#" class="nav-tab heku-btn heku-btn-primary ml-4"><span class="dashicons dashicons-heart" style="color:red;margin-top:3px;"></span>高级设置</a>
<a href="#" class="nav-tab heku-btn heku-btn-primary ml-4"><span class="dashicons dashicons-book-alt" style="color:red;margin-top:3px;"></span>日志</a>
</div>
</div>
</div>
</div>
<style>
.nav-tab-wrapper{border-bottom:0px solid #ccc}
.nav-tab-wrapper .nav-tab-active ,.nav-tab-wrapper a.heku-btn.heku-btn-primary.nav-tab-active{
background-color: #30a0e7;
color: #fff;
text-decoration: none;
}
.excludable-url-row{
line-height: 30px;
padding: 5px 0px;
}
.nav-tab{
float: left;
border: 1px solid #ccc;
font-size: 15px;
line-height: 22px;
text-decoration: none;
white-space: nowrap;
border-bottom: 1px solid #f1f1f1;
background: #f1f1f1;
float: left;
padding: 6px 18px;
border-radius: 8px 8px 0 0;
margin: 0 12px -1px 0;
position: relative;
cursor: pointer;
font-weight: bold;
}
.nav-tab-active{
float: left;
/* border: 1px solid #ccc; */
font-size: 15px;
line-height: 22px;
text-decoration: none;
white-space: nowrap;
border-bottom: 2px solid #f1f1f1;
/* background: #f1f1f1; */
color: #f00;
float: left;
padding: 6px 18px;
border-radius: 8px 8px 0 0;
margin: 0px 12px -1px 0;
font-weight: bold;
}
.wp-admin {
background-color: #f2f3fa;
}
.wrap {margin:0}
.heku-main-container{
float: left;
width: 100%;
}
.heku-content-header{
margin-left: -20px;
position: fixed;
top: auto;
width: 100%;
z-index: 6;
}
.heku-content-header-inner-wrapper{
background: #f2f3fa;
box-shadow: 0 1px 4px 0 #c1c1c1;
float: left;
padding: 20px 0 20px 20px;
width: 100%;
}
.heku-fixed-header-button-left{
color: #666;
float: left;
}
.heku-content-header-title{
color: #666;
float: left;
font-size: 22px;
font-weight: 500;
height: auto;
line-height: 2.5rem;
padding: 0 0 0 30px;
width: auto;
}
.heku-fixed-header-button-right{
right: 30px;
width: auto;
position: fixed;
margin: -3px 0 0;
}
.heku-btn.heku-btn-primary:hover,
a.heku-btn.heku-btn-primary:hover {
background-color: #30a0e7;
color: #fff;
text-decoration: none
}
.heku-btn{
font-size: 14px;
padding: 8px 16px 7px;
line-height: 1.5em;
font-weight: 400;
border-radius: 0;
-webkit-transition: all .2s ease;
-moz-transition: all .2s ease;
-ms-transition: all .2s ease;
-o-transition: all .2s ease;
transition: all .2s ease;
border: none;
cursor: pointer;
text-align: center;
float: left;
width: auto;
}
.heku-btn.heku-btn-primary,
a.heku-btn.heku-btn-primary{
border: 1px solid #30a0e7;
color: #30a0e7;
font-weight: 500;
/* transition: background .3s linear 0s; */
border-radius: 5px !important;
-moz-border-radius: 5px !important;
-o-border-radius: 5px !important;
-webkit-border-radius: 5px !important;
text-decoration: none;
margin: 0 10px;
}
.heku-content-wrapper{
float: left;
width: 100%;
margin-top: 90px;
padding: 20px 30px 0 20px;
box-sizing: border-box;
-o-box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.heku-section-wrapper{
box-sizing: border-box;
-o-box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
background: #fff none repeat scroll 0 0;
box-shadow: 0 2px 4px rgba(0,0,0,.08);
float: left;
margin: 0 0 30px;
width: 100%;
border-radius: 6px;
}
.row {
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.col-1 {
width: -webkit-calc((100% - 30px) / 10);
width: -moz-calc((100% - 30px) / 10);
width: calc((100% - 30px) / 10);
}
.col-2 {
width: -webkit-calc(((100% - 30px) / 10)*2);
width: -moz-calc(((100% - 30px) / 10)*2);
width: calc(((100% - 30px) / 10)*2);
}
.col-3 {
width: -webkit-calc(((100% - 30px) / 10)*3);
width: -moz-calc(((100% - 30px) / 10)*3);
width: calc(((100% - 30px) / 10)*3);
}
.col-4 {
width: -webkit-calc(((100% - 30px) / 10)*4);
width: -moz-calc(((100% - 30px) / 10)*4);
width: calc(((100% - 30px) / 10)*4);
}
.col-5 {
width: -webkit-calc(((100% - 30px) / 10)*5);
width: -moz-calc(((100% - 30px) / 10)*5);
width: calc(((100% - 30px) / 10)*5);
}
.col-6 {
width: -webkit-calc(((100% - 30px) / 10)*6);
width: -moz-calc(((100% - 30px) / 10)*6);
width: calc(((100% - 30px) / 10)*6);
}
.col-7 {
width: -webkit-calc(((100% - 30px) / 10)*7);
width: -moz-calc(((100% - 30px) / 10)*7);
width: calc(((100% - 30px) / 10)*7);
}
.col-8 {
width: -webkit-calc(((100% - 30px) / 10)*8);
width: -moz-calc(((100% - 30px) / 10)*8);
width: calc(((100% - 30px) / 10)*8);
}
.col-9 {
width: -webkit-calc(((100% - 30px) / 10)*9);
width: -moz-calc(((100% - 30px) / 10)*9);
width: calc(((100% - 30px) / 10)*9);
}
.col-10 {
width: -webkit-calc(100% - 30px);
width: -moz-calc(100% - 30px);
width: calc(100% - 30px);
}
</style>
<div class="wrap wp2static">
<?php if ( PHP_VERSION < 5.4 ) : ?>
<div class="notice notice-error inline">
<h2 class="title">检测到过期的PHP版本</h2>
<p>当前官方支持的PHP版本可以在5.6版本</p>
<p>虽然该插件尝试在最常见的PHP环境下工作,但它目前需要php5.6或更高版本。</p>
<p>随着官方对PHP5.6的安全支持在2018年底停止,强烈建议将WordPress托管环境升级到PHP7,最好是PHP7.1或7.2,因为7.0也将在2018年12月停止支持。</p>
<p>您当前的PHP版本是: <?php echo PHP_VERSION; ?></p>
</div>
<?php endif; ?>
<?php if ( ! $this->wp_site->uploads_writable ) : ?>
<div class="notice notice-error inline is-dismissible">
<h2 class="title">上载目录不可写</h2>
<p>请确保 <code><?php echo $this->wp_site->wp_uploads_path; ?></code>
可由您的Web服务器写入。
</p>
</div>
<?php endif; ?>
<?php if ( ! $this->wp_site->curl_enabled ) : ?>
<div class="notice notice-error inline is-dismissible">
<h2 class="title">您需要在web服务器上启用cURL扩展</h2>
<p> 这是一个库,允许插件更好地导出您的静态站点到服务,如GitHub,S3,Dropbox,BunnyCDN等。这通常是一个简单的解决办法,让这个工作。你可以在google上搜索“How to enable cURL extension for PHP”,以及运行WordPress站点的环境名称。这可能是像DigitalOcean、GoDaddy或LAMP、MAMP、WAMP之类的东西,用于本地计算机上的Web服务器。如果你仍然有困难,这个插件的开发人员很容易帮助你启动和运行。请在我们的问题上寻求帮助 forum.</p>
</div>
<?php endif; ?>
<?php if ( ! $this->wp_site->permalinks_set ) : ?>
<div class="notice notice-error inline is-dismissible">
<h2 class="title">你需要设置你的WordPress Pemalinks</h2>
<p>由于静态站点工作的性质,您需要在您的应用程序中定义某种永久链接结构<a href="<?php echo admin_url( 'options-permalink.php' ); ?>">Permalink Settings</a> within WordPress. To learn more on how to do this, please see WordPress's official guide to the <a href="https://codex.wordpress.org/Settings_Permalinks_Screen">Settings Permalinks Screen</a>.</p>
</div>
<?php endif; ?>
<!-- <h2 class="nav-tab-wrapper">
<a href="#" class="nav-tab nav-tab-active">部署静态网站</a>
<a href="#" class="nav-tab">爬站列表设置</a>
<a href="#" class="nav-tab">处理中 Processing</a>
<a href="#" class="nav-tab"><span class="dashicons dashicons-heart" style="color:red;margin-top:3px;"></span>高级设置</a>
<a href="#" class="nav-tab"><span class="dashicons dashicons-book-alt" style="color:red;margin-top:3px;"></span>日志</a>
</h2> -->
<!-- main form containing options that get sent -->
<form id="general-options" class="options-form" method="post" action="">
<!-- placeholder input fields to allow select menu deployment options to use existing behaviour -->
<span class="hiddenExportOptions" style="display:none;">
<?php $tpl->displayCheckbox($this, 'createZip', '创建静态导出站点的ZIP文件,以便手动部署。下载链接将出现在下面的导出日志中'); ?>
</span>
<?php
function generateDeploymentMethodOptions() {
$options = array(
"folder" => array('当前服务器上的子目录', 'free'),
//"blank1" => array("--- 手动部署 ---", 'free'),
"zip" => array('导出到 ZIP 压缩文件'),
//"blank2" => array("--- 自动化部署 ---"),
"s3" => array("Amazon S3 云存储"),
//"bitbucket" => array("Bitbucket"),
//"bunnycdn" => array("BunnyCDN"),
//"github" => array("GitHub Pages"),
//"gitlab" => array("GitLab"),
//"netlify" => array("Netlify"),
// "blank3" => array("--- 其它自动化部署 ---"),
//"ftp" => array("FTP"),
);
foreach ($options as $key => $value) {
echo "<option value='$key'>$value[0]</option>";
}
}
?>
<div class="heku-content-wrapper">
<?php require_once(__DIR__ . '/tab_export.phtml'); ?>
<?php require_once(__DIR__ . '/tab_crawling.phtml'); ?>
<?php require_once(__DIR__ . '/tab_processing.phtml'); ?>
<?php require_once(__DIR__ . '/tab_advanced.phtml'); ?>
<?php // require_once(__DIR__ . '/tab_help.phtml'); ?>
<?php require_once(__DIR__ . '/tab_logs.phtml'); ?>
<?php // require_once(__DIR__ . '/tab_love.phtml'); ?>
</div>
<br>
<span class="submit" style="display:none;">
<?php wp_nonce_field($this->onceAction) ?>
<input id="formActionHiddenField" class="hiddenActionField" type="hidden" name="action" value="wp_static_html_output_ajax" />
<input id="basedir" type="hidden" name="basedir" value="" />
<input id="wp_site_url" type="hidden" name="wp_site_url" value="" />
<input id="wp_uploads_path" type="hidden" name="wp_uploads_path" value="" />
<input id="wp_uploads_url" type="hidden" name="wp_uploads_url" value="" />
<input id="subdirectory" type="hidden" name="subdirectory" value="<?php echo $this->wp_site->subdirectory; ?>" />
<input id="wp_site_path" type="hidden" name="wp_site_path" value="" />
<input id="wp_inc" type="hidden" name="wp_inc" value="" />
<input id="wp_active_theme" type="hidden" name="wp_active_theme" value="" />
<input id="wp_uploads" type="hidden" name="wp_uploads" value="" />
<input id="hiddenNonceField" type="hidden" name="nonce" value="<?php echo $ajax_nonce; ?>" />
<input id="hiddenAJAXAction" type="hidden" name="ajax_action" value="" />
<input name="staticExportSettings" class="hiddenSettingsField" type="hidden" name="action" value="" />
</span>
</form>
</div>
</div>
<div id="wp2static-footer">
<div class="inside">
<div class="submit">
<?php wp_nonce_field($this->onceAction) ?>
<button id="startExportButton" class="button-primary button-hero" disabled>启动导出静态站点</button>
<button class="saveSettingsButton button-secondary" disabled>保存当前设置</button>
<button class="button resetDefaultSettingsButton" disabled>重置为默认设置</button>
<button style="display:none;" class="button cancelExportButton">取消导出</button>
<a href="" id="downloadZIP"><button class="button button-secondary button-call-to-action" target="_blank">下载 ZIP文件</button></a>
<a href="#" class="button button-secondary button-call-to-action" target="_blank" id="goToMyStaticSite" style="display:none;">转到我的部署站点</a>
</div>
</div><!-- end inside -->
<div id="pbar-container">
<div id="pbar-fill">
</div>
<div id="progress-container">
<div id="progress">
<div class="pulsate-css"></div>
<div id="current_action">开始导出...</div>
</div>
<p id="exportDuration" style="display:block;"></p>
</div>
</div>
</div><!-- end wp2static-footer -->
</div>