<commit_before><html>
	<head>
		<title>Trade Center</title>
		<style type="text/css" title="currentStyle">
			@import "css/demo_page.css";
			@import "css/demo_table.css";
		</style>
		<link rel="stylesheet" href="css/themes/base/jquery.ui.all.css">
		<link rel="stylesheet" href="css/demos.css">
		<script type='text/javascript' src="js/jquery-2.1.0.min.js"></script>
		<script type='text/javascript' src="js/jquery.dataTables.min.js"></script>
		<script type='text/javascript' src="js/ui/jquery.ui.core.js"></script>
		<script type='text/javascript' src="js/ui/jquery.ui.widget.js"></script>
		<script type='text/javascript' src="js/ui/jquery.ui.button.js"></script>
		<script type='text/javascript' src="js/ui/jquery.ui.widget.js"></script>
		<script type='text/javascript' src="js/ui/jquery.ui.position.js"></script>
		<script type='text/javascript' src="js/ui/jquery.ui.tooltip.js"></script>
		<style>
			#toolbar {
				padding: 4px;
				display: inline-block;
			}
			/* support: IE7 */
			*+ html #toolbar {
				display: inline;
			}
		</style>
		<script type="text/javascript" charset="utf-8">
            $(document).ready(function() {
                /// jQuery UI
                $("#home").button({
                    icons : {
                        primary : "ui-icon-home"
                    }
                }).click(function() {
                    top.location.href = "/index.html";
                });
                $("#add").button({
                    icons : {
                        primary : "ui-icon-circle-plus"
                    }
                }).click(function() {
                    top.location.href = "/insert.html";
                });
                $("#shuffle").button();
				$("#type" ).buttonset();
                // **** datatable ****
                //$('#tbl').dataTable();
                $('#tbl').dataTable({
                    "bJQueryUI" : true,
                    "bProcessing" : true,
                    "bServerSide" : true,
					"sScrollY": 350,
                    // 数据源
                    "sAjaxSource" : "q1.php",
                    // 传递参数进入php
                    "fnServerParams" : function(aoData) {
                        aoData.push({
                            "name" : "my_arg",
                            "value" : "my_value"
                        });
                    },
                    "fnDrawCallback" : function(oSettings) {
                        $(".del").button({
                            text : false,
                            icons : {
                                primary : "ui-icon-trash"
                            }
                        }).click(function() {
							 delete_order(this);
                        });
                    },
                    // 格式化输出
                    "aoColumnDefs" : [{
                        "mData" : "idwtb",
                        "aTargets" : [0],
                        "mRender" : function(data, type, full) {
                            // 'full' is the row's data object, and 'data' is this column's data
                            // e.g. 'full[0]' is the comic id, and 'data' is the comic title
                            return "<button class=\"del\">" + "	del this bid" + "</button>" + data;
                        }
                    }, {
                        "mData" : "item_name",
                        "aTargets" : [1]
                    }, {
                        "mData" : "play_name",
                        "aTargets" : [2],
						"mRender" : function(data, type, full) {
                            return '<a href="http://forums.e-hentai.org/index.php?showuser=' + full.idplay + '">'+data+'</a>';
                        }
                    }, {
                        "mData" : "c",
                        "aTargets" : [3],
                        "mRender" : function(data, type, full) {
							if(data=="0" || data=="" || data==null ){
								return "-"
							}
                            return parseInt(data).toLocaleString();
                        }
                    }, {
                        "mData" : "hath",
                        "aTargets" : [4],
                        "mRender" : function(data, type, full) {
							if(data=="0" || data=="" || data==null ){
								return "-"
							}
                            return parseInt(data).toLocaleString();
                        }
                    }, {
                        "mData" : "num_want",
						"bSortable": false,
                        "aTargets" : [5],
                        "mRender" : function(data, type, full) {
							if(data=="0" || data=="" || data==null ){
								return "Unlimited"
							}
							return data
                        }
                    }, {
                        "mData" : "src",
						"bSortable": false,
                        "aTargets" : [6],
                        "mRender" : function(data, type, full) {
                            // 'full' is the row's data object, and 'data' is this column's data
                            // e.g. 'full[0]' is the comic id, and 'data' is the comic title
                            return '<a href="' + data + '">link</a>';
                        }
                    }, {
                        "mData" : "note",
						"bSortable": false,
                        "aTargets" : [7],
                        "mRender" : function(data, type, full) {
                            return data ;
                        }
                    }]
                });

            });
            function delete_order(btndel) {
				//o=$(btndel)
                $.ajax({
                    type : "post",
                    url : "delete.php",
                    contentType : "application/x-www-form-urlencoded; charset=utf-8",
                    dataType : "text",
                    data : "wtbid="+btndel.parentElement.lastChild.textContent,
                    beforeSend : function(XMLHttpRequest) {
                       // $("#wait")[0].textContent = "waitng";
						btndel.parentElement.lastChild.textContent="..."
                    },
                    //成功(先成功,后完成)
                    success : function(data, textStatus) {
                       // $("#wait")[0].textContent = "OK";
						alert("reset: "+data);
						$(btndel.parentElement.parentElement).hide("slow");
                    },
                    error : function(XMLHttpRequest, textStatus, errorThrown) {
                       // $("#wait")[0].textContent = "ERR";
                        alert("ERR:" + XMLHttpRequest.responseText);
                    }
                });
            }
		</script>
	</head>
	<body>
		<div>
			<div align="">
				<div id="toolbar" class="ui-widget-header ui-corner-all">
					<button id="home" value="Submit">Home</button>
					<button id="add" title="新增wtb">Insert</button>
					<input type="checkbox" id="shuffle"><label for="shuffle">Shuffle</label>
					<span id="type">
						<input type="checkbox" id="check1"><label for="check1">WTB</label>
						<input type="checkbox" id="check2"><label for="check2">WTS</label>
						<input type="checkbox" id="check3"><label for="check3">Rev.</label>
					</span>
				</div>
			</div>
			<p></p>
			<div>
				<table id="tbl" cellpadding="0" cellspacing="0" border="1" class="display" width="100%">
					<thead>
						<tr>
							<th width="6%"  title="wtb编号">ID</th>
							<th width="15%" title="物品名称">Item name</th>
							<th width="13%" title="玩家名称">Player name</th>
							<th width="10%" title="空表示不接受Credit">Credit</th>
							<th width="8%" title="空表示不接受Hath">Hath</th>
							<th width="8%" title="数量">Qty.</th>
							<th width="5%" title="bbs 连接">Ref.</th>
							<th>note</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td colspan="8" class="dataTables_empty">Loading data from server 正在从服务器加载数据 ...</td>
						</tr><commit_msg>管理按钮进行中<commit_after><html>
	<head>
		<title>Trade Center</title>
		<style type="text/css" title="currentStyle">
			@import "css/demo_page.css";
			@import "css/demo_table.css";
		</style>
		<link rel="stylesheet" href="css/themes/base/jquery.ui.all.css">
		<link rel="stylesheet" href="css/demos.css">
		<script type='text/javascript' src="js/jquery-2.1.0.min.js"></script>
		<script type='text/javascript' src="js/jquery.dataTables.min.js"></script>
		<script type='text/javascript' src="js/ui/jquery.ui.core.js"></script>
		<script type='text/javascript' src="js/ui/jquery.ui.widget.js"></script>
		<script type='text/javascript' src="js/ui/jquery.ui.button.js"></script>
		<script type='text/javascript' src="js/ui/jquery.ui.widget.js"></script>
		<script type='text/javascript' src="js/ui/jquery.ui.position.js"></script>
		<script type='text/javascript' src="js/ui/jquery.ui.tooltip.js"></script>
		<script type='text/javascript' src="js/ui/jquery.ui.menu.js"></script>
		<style>
			#toolbar {
				padding: 4px;
				display: inline-block;
			}
			/* support: IE7 */
			*+ html #toolbar {
				display: inline;
			}
		</style>
		<script type="text/javascript" charset="utf-8">
            $(document).ready(function() {
                /// jQuery UI
                $("#home").button({
                    icons : {
                        primary : "ui-icon-home"
                    }
                }).click(function() {
                    top.location.href = "/index.html";
                });
                $("#add").button({
                    icons : {
                        primary : "ui-icon-circle-plus"
                    }
                }).click(function() {
                    top.location.href = "/insert.html";
                });
                $("#shuffle").button();
				$("#type" ).buttonset();
                // **** datatable ****
                //$('#tbl').dataTable();
                $('#tbl').dataTable({
                    "bJQueryUI" : true,
                    "bProcessing" : true,
                    "bServerSide" : true,
					"sScrollY": 350,
                    // 数据源
                    "sAjaxSource" : "q1.php",
                    // 传递参数进入php
                    "fnServerParams" : function(aoData) {
                        aoData.push({
                            "name" : "my_arg",
                            "value" : "my_value"
                        });
                    },
                    "fnDrawCallback" : function(oSettings) {
						$("#menu" ).menu();
                        $(".del").button({
                            text : false,
                            icons : {
                                primary : "ui-icon-trash"
                            }
                        }).click(function() {
							 delete_order(this);
                        });
                        $( ".btnManage" )
							.button({
									text: false,
									icons: {
										primary: "ui-icon-trash"
									}
							})
							.click(function() {
								alert( "TODO:Delete This Record" );
							})
							.next()
								.button({
									text: false,
									icons: {
										primary: "ui-icon-triangle-1-s"
									}
								})
								.click(function() {
									var menu = $( this ).parent().next().show();
									//$(document).one( "click", function() {
									//	menu.hide();
									//});
									return false;
								})
								.parent()
									.buttonset()
									.next()
										.hide()
										.menu();
                    },
                    // 格式化输出
                    "aoColumnDefs" : [{
                        "mData" : "idwtb",
                        "aTargets" : [0],
                        "mRender" : function(data, type, full) {
                            // 'full' is the row's data object, and 'data' is this column's data
                            // e.g. 'full[0]' is the comic id, and 'data' is the comic title
                            return "<button class=\"del\">" + "	del this bid" + "</button>" + data;
                        }
                    }, {
                        "mData" : "item_name",
                        "aTargets" : [1]
                    }, {
                        "mData" : "play_name",
                        "aTargets" : [2],
						"mRender" : function(data, type, full) {
                            return '<a href="http://forums.e-hentai.org/index.php?showuser=' + full.idplay + '">'+data+'</a>';
                        }
                    }, {
                        "mData" : "c",
                        "aTargets" : [3],
                        "mRender" : function(data, type, full) {
							if(data=="0" || data=="" || data==null ){
								return "-"
							}
                            return parseInt(data).toLocaleString();
                        }
                    }, {
                        "mData" : "hath",
                        "aTargets" : [4],
                        "mRender" : function(data, type, full) {
							if(data=="0" || data=="" || data==null ){
								return "-"
							}
                            return parseInt(data).toLocaleString();
                        }
                    }, {
                        "mData" : "num_want",
						"bSortable": false,
                        "aTargets" : [5],
                        "mRender" : function(data, type, full) {
							if(data=="0" || data=="" || data==null ){
								return "Unlimited"
							}
							return data
                        }
                    }, {
                        "mData" : "src",
						"bSortable": false,
                        "aTargets" : [6],
                        "mRender" : function(data, type, full) {
                            // 'full' is the row's data object, and 'data' is this column's data
                            // e.g. 'full[0]' is the comic id, and 'data' is the comic title
                            return '<a href="' + data + '">link</a>';
                        }
                    }, {
                        "mData" : "note",
						"bSortable": false,
                        "aTargets" : [7],
                        "mRender" : function(data, type, full) {
                            return data ;
                        }
                    }, {
						"mData" : "note",
						"bSortable": false,
                        "aTargets" : [8],
                        "mRender" : function(data, type, full) {
                            return '<span>'
								+'	<button class="btnManage">Delete</button>'
								+'	<button class="select">Set</button>'
								+'</span>'
								+'<ul id="menu">'
								+'	<li><a href="#"><span class="ui-icon ui-icon-pencil"></span>Edit</a></li>'
								+'</ul>';
                        }
                    }]
                });

            });
            function delete_order(btndel) {
				//o=$(btndel)
                $.ajax({
                    type : "post",
                    url : "delete.php",
                    contentType : "application/x-www-form-urlencoded; charset=utf-8",
                    dataType : "text",
                    data : "wtbid="+btndel.parentElement.lastChild.textContent,
                    beforeSend : function(XMLHttpRequest) {
                       // $("#wait")[0].textContent = "waitng";
						btndel.parentElement.lastChild.textContent="..."
                    },
                    //成功(先成功,后完成)
                    success : function(data, textStatus) {
                       // $("#wait")[0].textContent = "OK";
						alert("reset: "+data);
						$(btndel.parentElement.parentElement).hide("slow");
                    },
                    error : function(XMLHttpRequest, textStatus, errorThrown) {
                       // $("#wait")[0].textContent = "ERR";
                        alert("ERR:" + XMLHttpRequest.responseText);
                    }
                });
            }
		</script>
	</head>
	<body>
		<div>
			<div align="">
				<div id="toolbar" class="ui-widget-header ui-corner-all">
					<button id="home" value="Submit">Home</button>
					<button id="add" title="新增wtb">Insert</button>
					<input type="checkbox" id="shuffle"><label for="shuffle">Shuffle</label>
					<span id="type">
						<input type="checkbox" id="check1"><label for="check1">WTB</label>
						<input type="checkbox" id="check2"><label for="check2">WTS</label>
						<input type="checkbox" id="check3"><label for="check3">Rev.</label>
					</span>
				</div>
			</div>
			<p></p>
			<div>
				<table id="tbl" cellpadding="0" cellspacing="0" border="1" class="display" width="100%">
					<thead>
						<tr>
							<th width="6%"  title="wtb编号">ID</th>
							<th width="15%" title="物品名称">Item name</th>
							<th width="13%" title="玩家名称">Player name</th>
							<th width="10%" title="空表示不接受Credit">Credit</th>
							<th width="8%" title="空表示不接受Hath">Hath</th>
							<th width="8%" title="数量">Qty.</th>
							<th width="5%" title="bbs 连接">Ref.</th>
							<th>note</th>
							<th width="5%" title="管理">Manage</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td colspan="9" class="dataTables_empty">Loading data from server 正在从服务器加载数据 ...</td>
						</tr>
{'fraction_non_alphanumeric': 0.16407619492812903, 'fraction_numerical': 0.00601846441509875, 'mean_word_length': 1.206109822119103, 'pattern_counts': {'":': 9, '<': 197, '<?xml version=': 0, '>': 197, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1483250', 'n_tokens_mistral': 5864, 'n_tokens_neox': 4786, 'n_words': 842}