|
楼主 |
发表于 2013-12-14 14:42:59
|
显示全部楼层
吉林省通化市
返回文本 = 到文本 (网页_访问 (“http://www.f2pool.com/user/worker?action=load”))
返回的文本不是你上面写的那些,而是:
* <!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>矿工管理 - F2Pool</title>
<link rel="stylesheet" href="/static/css/bootstrap.min.css?v=39e39c0a6ca35ceca9dd4c82ec878ad6" type ="text/css">
<link rel="stylesheet" href="/static/css/elusive-webfont.css?v=57bd934bc16edccc37a90c365016734f" type ="text/css">
<link rel="stylesheet" href="/static/css/docs.css?v=f8e4050e9072e143fcc28a5040b063db" type ="text/css">
<!--[if lt IE 9]><script src="/static/js/html5.js?v=69431f1ec831bacf31013dff2872cba0"></script><![endif]-->
<script type="text/javascript" src="/static/js/jquery-1.9.1.min.js?v=397754ba49e9e0cf4e7c190da78dda05"></script>
</head>
<body data-spy="scroll" data-target=".bs-docs-sidebar">
<header>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<button type="button" class="btn btn-navbar collapsed" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="/">F2Pool <sup>BETA</sup></a>
<div class="nav-collapse in collapse" style="height:auto;">
<ul class="nav nav-pills">
<li class="divider-vertical"></li>
<li>
<a id="action-home" href="/user/home">我的首页</a>
</li>
<li class="active">
<a id="action-worker" href="/user/worker">矿工管理</a>
</li>
<li>
<a id="action-history" href="/user/history">付款记录</a>
</li>
<li class="divider-vertical"></li>
<li>
<a id="action-help" href="/help">帮助</a>
</li>
<li class="divider-vertical"></li>
<li><a href="http://ptspool.com/" target="_blank">转至 PTS 矿池</a></li>
</ul>
<ul class="nav nav-pills pull-right">
<li class="dropdown">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i> zddx <strong class="caret"></strong></a>
<ul class="dropdown-menu">
<li><a id="action-account" href="/user/account">账户设置</a></li>
<li><a id="action-logout" href="/user/logout">登出</a></li>
</ul>
</li>
</ul>
</div><!--.nav-collapse -->
</div>
</div>
</div>
</header>
<section>
<div class="row-fluid" style="margin-top: 30px;">
<div class="span10 offset1">
<div class="row-fluid">
<span class="pull-left lead"><strong>矿工管理</strong></span>
<div id="actions" class="btn-group pull-right" data-toggle="buttons-radio">
<button id="action-load-all" type="button" class="btn btn-primary active">全部</button>
<button id="action-load-btc" type="button" class="btn btn-primary">BTC</button>
<button id="action-load-ltc" type="button" class="btn btn-primary">LTC</button>
</div>
</div>
<div class="row-fluid">
<table id="worker-list" class="table table-bordered table-striped">
<thead>
<tr>
<th style="text-align: center;">矿工</th>
<th class="span3" style="text-align: center;">币种</th>
<th style="text-align: center;">20分钟平均速度</th>
<th style="text-align: center;">接受数</th>
<th style="text-align: center;">拒绝数</th>
<th style="text-align: center;">拒绝率</th>
<th style="text-align: center;">最近提交时间</th>
<th class="span2" style="text-align: center;"><input type="checkbox"></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div class="row-fluid" style="text-color: #666666;">
使用采矿软件连接至 stratum+tcp://stratum.f2pool.com BTC 端口 3333 LTC 端口 8888 以“zddx”或“zddx.矿工名”并任意密码开始采矿即可自动创建矿工。矿工名须由数字或小写字母组成,最长15个字符。除非您连接了8888端口,否则新建的矿工默认为BTC矿工,如果您需要其它币种,请注意在本页更改。如果您收到大量“H-not-zero”或“high-hash”的错误信息,请检查币种是否匹配。如果您无法连接至3333或8888端口,也可以尝试25端口。
</div>
</div>
</div>
</section>
<footer class="footer">
<div class="container">
<p>?2013 F2Pool 版权所有</p>
<ul class="footer-links">
<li><a href="/help">帮助说明</a></li>
<li class="muted">·</li>
<li><a href="mailto:admin@f2pool.com">客服邮箱</a></li>
<li class="muted">·</li>
<li style="color: #777777;">QQ群:<!--195522655 105890190 309497457 280277743 264727715--> 316737698</li>
<li class="muted">·</li>
<li><a href="http://weibo.com/u/3353401212">新浪微博</a></li>
</ul>
<p>浙ICP备12045611号-1</p>
</div>
</footer>
</body>
<script src="/static/js/docs.js?v=38a9ace7f49a5103f5bf54ad71e6c3b8"></script>
<script src="/static/js/bootstrap.min.js?v=8497dc2e634e9d9d5ab44249b96c39fb"></script>
<script src="/static/js/jquery.dialog2.js?v=d3a2e326ac4be7ef939f37d1a6957116"></script>
<script src="/static/js/jquery.dialog2.helpers.js?v=466f7281ec63abd1f541fcc904be0cb0"></script>
<script src="/static/js/jquery.placeholder.js?v=aef73c3cd7cb8e182f674dd970831ab3"></script>
<script type="text/javascript">$(function() { $('input, textarea').placeholder(); })</script>
<script type="text/javascript">
<!--
var _$t, _$tb, _$th;
function _tr(worker) {
worker.last_share = worker.last_share > 0 ? formatTimestampUptoMinute(worker.last_share) : '';
return $('<tr>' +
' <td style="text-align: center;">' + worker.worker_name + '</td>' +
' <td class="currency" data-currency="' + worker.currency + '" style="text-align: center;">' +
worker.currency +
' <a id="action-change-currency" style="margin-left: 5px;" href="javascript: void(0);"><i class="icon-edit"></i></a>' +
' </td>' +
' <td style="text-align: center;">' + worker.hashrate + '</td>' +
' <td style="text-align: center;">' + worker.accepted + '</td>' +
' <td style="text-align: center;">' + worker.rejected + '</td>' +
' <td style="text-align: center;">' + worker.rejected_percent + '</td>' +
' <td style="text-align: center;">' + worker.last_share + '</td>' +
' <td style="text-align: center;"><input type="checkbox"></td>' +
'</tr>').data('worker', worker);
}
function _tr_operation() {
return $('<tr id="tr-operation">' +
' <td colspan="7" style="text-align: center;"></td>' +
' <td style="text-align: center; width: auto;">' +
' <select id="select-operation" style="width: 100px;">' +
' <option value="0">请选择...</option>' +
' <option disabled="disabled">----------</option>' +
' <option value="1">新建矿工</option>' +
' <option disabled="disabled">----------</option>' +
' <option value="2">修改币种</option>' +
' <option disabled="disabled">----------</option>' +
' <option value="3">移除矿工</option>' +
' </select>' +
' </td>' +
'</tr>');
}
function _tr_new() {
return $('<tr id="tr-insert">' +
' <td style="text-align: center;">' +
' zddx.<input id="input-worker-name" type="text">' +
' </td>' +
' <td style="text-align: center;">' +
' <select id="select-currency" style="width: 100px;">' +
' <option value="bitcoin">BTC</option>' +
' <option value="litecoin">LTC</option>' +
' </select>' +
' </td>' +
' <td></td>' +
' <td></td>' +
' <td></td>' +
' <td></td>' +
' <td></td>' +
' <td>' +
' <ul class="cell-links">' +
' <li><a id="action-submit-insert" href="javascript: void(0);"><i class="icon-ok-sign"></i></a></li>' +
' <li><a id="action-cancel-insert" href="javascript: void(0);"><i class="icon-minus-sign"></i></a></li>' +
' </ul>' +
' </td>' +
'</tr>');
}
function _f(workers) {
_$tb.empty();
if (workers.length == 0) {
_$tb.append(_tr_operation());
}
else {
for (var i=0; i < workers.length; ++i) {
_$tb.append(_tr(workers));
}
_$tb.append(_tr_operation());
}
}
function _l_all() {
$.ajax({
type: 'GET',
url: '/user/worker?action=load',
beforeSend: function(status, xhr) {
_$tb.empty().append('<tr><td colspan="8" style="text-align: center;">正在加载中...</td></tr>');
}
}).done(function(response, status, xhr) {
if (status == 'success' && response.status == 'ok') {
_f(response.data)
}
else {
_$tb.empty();
}
});
}
function _l(currency) {
$.ajax({
type: 'GET',
url: '/user/worker?action=load',
data: {currency: currency},
}).done(function(response, status, xhr) {
if (status == 'success' && response.status == 'ok') {
_f(response.data)
}
});
}
function _l_w($tr) {
var worker = $tr.data('worker');
$.ajax({
type: 'GET',
url: '/user/worker?action=get_user_worker',
data: {
worker_name: worker.worker_name
},
}).done(function(response, status, xhr) {
if (status == 'success' && response.status == 'ok') {
if (response.data.length == 1) {
worker = response.data[0];
$tr.replaceWith(_tr(worker));
}
}
});
}
$(function() {
_$t=$('#worker-list'); _$tb=_$t.find('tbody'); _$th=_$t.find('thead');
_$th.find(':checkbox').on('click', function() {
_$tb.find(':checkbox').prop('checked', $(this).prop('checked'));
});
_$t.on('click', '#action-change-currency', function() {
var $td = $(this).parent();
var worker = $td.parent().data('worker');
$td.html( '<ul class="cell-links">' +
' <li><select id="select-currency" style="width: 100px;"><option value="bitcoin">BTC</option><option value="litecoin">LTC</option></select></li>' +
' <li><a id="action-submit-update" href="javascript: void(0);"><i class="icon-ok-sign"></i></a></li>' +
' <li><a id="action-cancel-update" href="javascript: void(0);"><i class="icon-minus-sign"></i></a></li>' +
'</ul>'
);
$("#select-currency option").filter(function() {
return $(this).text() == worker.currency;
}).prop('selected', true);
});
_$t.on('change', '#select-operation', function() {
$('#select-operation > option:selected').each(function() {
var _v = $(this).val();
var $tr = $('#tr-operation');
if (_v == '1') {
$('#tr-operation').replaceWith(_tr_new());
} else if (_v == '2') {
$tr.replaceWith( '<tr id="tr-multi-update">' +
' <td colspan="8">' +
' <ul class="cell-links">' +
' <li><select id="select-currency" class="span4"><option value="bitcoin">BTC</option><option value="litecoin">LTC</option></select></li>' +
' <li><a id="action-submit-multi-update" href="javascript: void(0);"><i class="icon-ok-sign"></i></a></li>' +
' <li><a id="action-cancel-multi-update" href="javascript: void(0);"><i class="icon-minus-sign"></i></a></li>' +
' </ul>' +
' </td>' +
'</tr>');
} else if (_v == '3') {
$tr.replaceWith( '<tr id="tr-multi-delete">' +
' <td colspan="8">' +
' <ul class="cell-links">' +
' <li><a id="action-submit-multi-delete" href="javascript: void(0);"><i class="icon-ok-sign"></i></a></li>' +
' <li><a id="action-cancel-multi-delete" href="javascript: void(0);"><i class="icon-minus-sign"></i></a></li>' +
' </ul>' +
' </td>' +
'</tr>');
}
});
});
_$t.on('click', '#action-cancel-multi-update', function() {
$('#tr-multi-update').replaceWith(_tr_operation());
});
_$t.on('click', '#action-submit-multi-update', function() {
var worker_names = _$tb.find('input:checked').map(function(idx, value) {
return $(value).parent().parent().data('worker').worker_name;
});
$.ajax({
type: 'POST',
url: '/user/worker?action=change_workers_currency',
data: {
worker_names: worker_names.toArray(),
currency: $('#select-currency').val()
}
}).done(function(response, status, xhr) {
if (status == 'success' && response.status == 'ok') {
$('#actions > button.active').click();
}
});
});
_$t.on('click', '#action-cancel-multi-delete', function() {
$('#tr-multi-delete').replaceWith(_tr_operation());
});
_$t.on('click', '#action-submit-multi-delete', function() {
var worker_names = _$tb.find('input:checked').map(function(idx, value) {
return $(value).parent().parent().data('worker').worker_name;
});
$.ajax({
type: 'POST',
url: '/user/worker?action=delete_workers',
data: {
worker_names: worker_names.toArray(),
}
}).done(function(response, status, xhr) {
if (status == 'success' && response.status == 'ok') {
$('#actions > button.active').click();
}
});
})
_$t.on('click', '#action-cancel-insert', function() {
var $tr = $('#tr-insert');
$tr.replaceWith(_tr_operation());
});
_$t.on('click', '#action-submit-insert', function() {
$.ajax({
type: 'POST',
url: '/user/worker?action=insert_worker',
data: {
worker_name: $('#input-worker-name').val(),
currency: $('#select-currency').val()
}
}).done(function(response, status, xhr) {
if (status == 'success' && response.status == 'ok') {
$('#actions > button.active').click();
}
});
});
_$t.on('click', '#action-cancel-update', function() {
var $tr = $(this).parent().parent().parent();
$tr.html($tr.data('currency') + '<a id="action-change-currency" style="margin-left: 10px;" href="javascript: void(0);"><i class="icon-edit"></i></a>');
});
$('#worker-list').on('click', '#action-submit-update', function() {
var $tr = $(this).parent().parent().parent().parent();
$.ajax({
type: 'POST',
url: '/user/worker?action=change_worker_currency',
data: {
worker_name: $tr.data('worker').worker_name,
currency: $('#select-currency').val()
}
}).done(function(response, status, xhr) {
if (status == 'success' && response.status == 'ok') {
_l_w($tr);
}
});
});
$('#worker-list').on('click', '#action-delete', function() {
var $this = $(this);
var $tr = $this.parent().parent().parent().parent();
var $c = $('#worker-list > tbody');
var worker = $tr.data('worker');
$.ajax({
type: 'POST',
url: '/user/worker?action=delete_worker',
data: {worker_name: worker.worker_name}
}).done(function(response, status, xhr) {
if (status == 'success' && response.status == 'ok') {
$tr.remove();
}
});
});
$('#action-load-all').on('click', function(){
_l_all();
});
$('#action-load-btc').on('click', function(){
_l('BTC');
});
$('#action-load-ltc').on('click', function(){
_l('LTC');
});
_l_all();
})
//-->
</script>
</html>
被调试易程序运行完毕 |
|