First commit
This commit is contained in:
1
uc_server/data/avatar/index.htm
Normal file
1
uc_server/data/avatar/index.htm
Normal file
@@ -0,0 +1 @@
|
||||
|
23
uc_server/data/avatar/noavatar.svg
Normal file
23
uc_server/data/avatar/noavatar.svg
Normal file
@@ -0,0 +1,23 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 500 500">
|
||||
<defs><filter id="a"><feGaussianBlur stdDeviation="15"/></filter></defs>
|
||||
<path fill="#bec1c9" d="M0 0h500v500H0z"/>
|
||||
<path d="M404.8 266.2C431.7 134.6 335.1 96.4 249 95.3c-96.5-1.2-150.4 45.1-155.8 170.9-3.8 87.2 37.6 151.8 131.9 161v10.9c-55.9 10.5-98 57.3-98 113.4 0 63.9 54.6 115.6 121.9 115.6s121.9-51.8 121.9-115.6c0-59-46.6-107.7-106.8-114.7v-9c105.7-7.7 127.3-96.3 140.7-161.6z" filter="url(#a)" fill="#666"/>
|
||||
<linearGradient id="b" gradientUnits="userSpaceOnUse" x1="249" y1="129.472" x2="249" y2="170.612" gradientTransform="matrix(1 0 0 -1 0 597.84)"><stop offset="0" stop-color="#fdd4b3"/><stop offset=".8" stop-color="#ea9a76"/><stop offset="1" stop-color="#eb8364"/></linearGradient>
|
||||
<path d="M264.1 436.8v-27.3h-39v28.6c-55.9 10.5-98 57.3-98 113.4 0 63.9 54.6 115.6 121.9 115.6s121.9-51.8 121.9-115.6c0-59-46.6-107.7-106.8-114.7z" fill="url(#b)"/>
|
||||
<path d="M296.1 444.9c-6.1 14.4-26.6 25-50.9 25-22.8 0-42.2-9.3-49.6-22.3-40.6 18.8-68.5 58.3-68.5 104 0 63.9 54.6 115.6 121.9 115.6s121.9-51.8 121.9-115.6c0-48.1-30.8-89.2-74.8-106.7z" fill="#7b100e"/>
|
||||
<linearGradient id="c" gradientUnits="userSpaceOnUse" x1="127.1" y1="40.21" x2="370.9" y2="40.21" gradientTransform="matrix(1 0 0 -1 0 597.84)"><stop offset="0" stop-color="#771515"/><stop offset=".5" stop-color="#bb2d2d"/><stop offset="1" stop-color="#771515"/></linearGradient>
|
||||
<path d="M303.7 448.2c-4 16.5-28.7 29.2-58.5 29.2-27.8 0-51.1-11-57.4-25.9-36.3 20-60.7 57.3-60.7 100 0 63.9 54.6 115.6 121.9 115.6s121.9-51.8 121.9-115.6c0-45.2-27.3-84.3-67.2-103.3z" fill="url(#c)"/>
|
||||
<path d="M381 340.4c-.9 25.1 20.1 17.6 20.1 17.6s-12.9 22.6-37.7 6.3C337.8 347.4 382 313 381 340.4zm-267.9 6.5c.9 25.3-19.9 17.7-19.9 17.7s12.7 22.7 37.3 6.3c25.3-16.9-18.4-51.5-17.4-24z"/>
|
||||
<radialGradient id="d" cx="246.185" cy="321.692" r="210.831" gradientTransform="matrix(1 0 0 -.866 0 562.403)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fdeddb"/><stop offset=".169" stop-color="#fce8d5"/><stop offset=".39" stop-color="#f9dbc5"/><stop offset=".64" stop-color="#f4c5aa"/><stop offset=".909" stop-color="#eda784"/><stop offset="1" stop-color="#ea9b76"/></radialGradient>
|
||||
<path d="M249 95.3c86.1 1.1 182.7 39.3 155.8 170.9-14 68.3-37 162.1-155.8 162.1-111.2 0-159.9-67.8-155.8-162.1C98.6 140.4 152.5 94.1 249 95.3z" fill="url(#d)"/>
|
||||
<radialGradient id="e" cx="157.3" cy="254.76" r="30.1" gradientTransform="matrix(1 0 0 -1 0 597.84)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ea9c8d"/><stop offset="1" stop-color="#ea9c8d" stop-opacity="0"/></radialGradient>
|
||||
<path d="M157.3 313c16.6 0 30.1 13.5 30.1 30.1s-13.5 30.1-30.1 30.1-30.1-13.5-30.1-30.1 13.5-30.1 30.1-30.1z" fill="url(#e)"/>
|
||||
<radialGradient id="f" cx="325.2" cy="254.76" r="30.1" gradientTransform="matrix(1 0 0 -1 0 597.84)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ea9c8d"/><stop offset="1" stop-color="#ea9c8d" stop-opacity="0"/></radialGradient>
|
||||
<path d="M325.2 313c16.6 0 30.1 13.5 30.1 30.1s-13.5 30.1-30.1 30.1-30.1-13.5-30.1-30.1 13.5-30.1 30.1-30.1z" fill="url(#f)"/>
|
||||
<path fill="#fff" d="M177.4 249.9c21.5 0 39 17.4 39 39 0 21.5-17.4 39-39 39s-39-17.4-39-39c0-21.5 17.5-39 39-39z"/>
|
||||
<path d="M177.4 268.8c11.1 0 20.1 9 20.1 20.1s-9 20.1-20.1 20.1c-11.1 0-20.1-9-20.1-20.1s9-20.1 20.1-20.1z"/>
|
||||
<path fill="#fff" d="M306.8 247.4c21.5 0 39 17.4 39 39 0 21.5-17.4 39-39 39s-39-17.4-39-39c.1-21.6 17.5-39 39-39z"/>
|
||||
<path d="M306.8 266.3c11.1 0 20.1 9 20.1 20.1s-9 20.1-20.1 20.1c-11.1 0-20.1-9-20.1-20.1s9-20.1 20.1-20.1z"/>
|
||||
<radialGradient id="g" cx="229.894" cy="419.876" r="159.062" gradientTransform="matrix(1 0 0 -1 0 597.84)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#666"/><stop offset="1"/></radialGradient>
|
||||
<path d="M387.9 151.5c-.9-1.2.8 1.2 0 0 2-30.3-10.7-33.6-10.7-33.6s1.5 9.2-.2 20.9c-31.5-31.4-81.3-42.9-127.9-43.5C152.6 94 98.7 140.4 93.3 266.2c-.7 16.4.2 32 2.7 46.6 2.7 1.9 5.6 3.3 8.6 3.6 11.3 1.3 25.1-7.8 20.1-25.1-2.9 13.3-13 13.3-15.1 7.5-4-11-.7-19.3 12.6-28.9 68.2-49.7 92.7-32.7 150.8-40.2 53.7-7 77.9-26.4 77.9-26.4s-24.7 50.2 22.7 71.8c12.3 5.6 13.1 25.2 5 27.4-12.8 3.5-17.3-2.5-15.1-11.3-7.7 2.7-16 18.4 6.3 22.6 9 1.7 22.6-2.5 27.3-13 3.1-11.9 5.6-23.7 7.9-34.8 8.8-43.2 4.4-76.3-8.7-101.3 11.2-6.7 23.4-4.7 20 17.1 21.3-12.1-.6-45.9-28.4-30.3z" fill="url(#g)"/>
|
||||
</svg>
|
After Width: | Height: | Size: 4.3 KiB |
1
uc_server/data/backup/index.htm
Normal file
1
uc_server/data/backup/index.htm
Normal file
@@ -0,0 +1 @@
|
||||
|
23
uc_server/data/cache/apps.php
vendored
Normal file
23
uc_server/data/cache/apps.php
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
$_CACHE['apps'] = array (
|
||||
1 =>
|
||||
array (
|
||||
'appid' => '1',
|
||||
'type' => 'DISCUZX',
|
||||
'name' => 'Discuz! Board',
|
||||
'url' => 'http://localhost:8080/discuz',
|
||||
'authkey' => 'ec685982r273EdT4RaReHar6q3C1877dE5tdKeObudH913iaC0V4V630m6X57bmb',
|
||||
'ip' => '',
|
||||
'viewprourl' => '',
|
||||
'apifilename' => 'uc.php',
|
||||
'charset' => 'utf-8',
|
||||
'dbcharset' => 'utf8mb4',
|
||||
'synlogin' => '1',
|
||||
'recvnote' => '1',
|
||||
'extra' => '',
|
||||
'tagtemplates' => '',
|
||||
'allowips' => '',
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
0
uc_server/data/cache/index.htm
vendored
Normal file
0
uc_server/data/cache/index.htm
vendored
Normal file
35
uc_server/data/cache/settings.php
vendored
Normal file
35
uc_server/data/cache/settings.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
$_CACHE['settings'] = array (
|
||||
'accessemail' => '',
|
||||
'addappbyurl' => '0',
|
||||
'censoremail' => '',
|
||||
'censorusername' => '',
|
||||
'chatpmmemberlimit' => '35',
|
||||
'chatpmthreadlimit' => '30',
|
||||
'dateformat' => 'y-n-j',
|
||||
'doublee' => '0',
|
||||
'insecureoperation' => '0',
|
||||
'login_failedtime' => '5',
|
||||
'mailauth' => '1',
|
||||
'mailauth_password' => 'password',
|
||||
'mailauth_username' => 'username@21cn.com',
|
||||
'maildefault' => 'username@21cn.com',
|
||||
'maildelimiter' => '0',
|
||||
'mailfrom' => 'UCenter <username@21cn.com>',
|
||||
'mailport' => '25',
|
||||
'mailsend' => '1',
|
||||
'mailserver' => 'smtp.21cn.com',
|
||||
'mailsilent' => '1',
|
||||
'mailtimeout' => '30',
|
||||
'mailusername' => '1',
|
||||
'nextnotetime' => '0',
|
||||
'pmcenter' => '1',
|
||||
'pmfloodctrl' => '15',
|
||||
'pmsendregdays' => '0',
|
||||
'privatepmthreadlimit' => '25',
|
||||
'sendpmseccode' => '1',
|
||||
'timeoffset' => '28800',
|
||||
'version' => '1.7.0',
|
||||
);
|
||||
|
||||
?>
|
21
uc_server/data/config.inc.php
Normal file
21
uc_server/data/config.inc.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
define('UC_DBHOST', 'localhost');
|
||||
define('UC_DBUSER', 'discuzuser');
|
||||
define('UC_DBPW', 'Zht20000418?');
|
||||
define('UC_DBNAME', 'discuz');
|
||||
define('UC_DBCHARSET', 'utf8mb4');
|
||||
define('UC_DBTABLEPRE', 'pre_ucenter_');
|
||||
define('UC_COOKIEPATH', '/');
|
||||
define('UC_COOKIEDOMAIN', '');
|
||||
define('UC_DBCONNECT', 0);
|
||||
define('UC_CHARSET', 'utf-8');
|
||||
define('UC_FOUNDERPW', '$2y$10$tfholKjA8hYPMZtOQi7GmOq0MHF6HG9gNOlSuqEl8l0OvhUs7XVky');
|
||||
define('UC_FOUNDERSALT', '');
|
||||
define('UC_KEY', 'je44c6F3S9Kf997e12t3z4O1h2m2Lcg7Q5wfN9qcVaeebfv4E4zbteh1Qcp7f6Pe');
|
||||
define('UC_SITEID', 'Xe64c6p3g9efX91e82J3z4q112P29ce7W5efS9RcBa1eCfT4J4EbIeh1lcM7T6fe');
|
||||
define('UC_MYKEY', 'IeZ4u6M3w9ufS9Fe12M3T4B1F212Tc47X5Pfv9Hc0aBeNfl4m48bneP1tcH7l6Me');
|
||||
define('UC_DEBUG', false);
|
||||
define('UC_PPP', 20);
|
||||
define('UC_ONLYREMOTEADDR', 1);
|
||||
define('UC_IPGETTER', 'header');
|
||||
// define('UC_IPGETTER_HEADER', serialize(array('header' => 'HTTP_X_FORWARDED_FOR')));
|
1
uc_server/data/index.htm
Normal file
1
uc_server/data/index.htm
Normal file
@@ -0,0 +1 @@
|
||||
|
0
uc_server/data/install.lock
Normal file
0
uc_server/data/install.lock
Normal file
0
uc_server/data/tmp/index.htm
Normal file
0
uc_server/data/tmp/index.htm
Normal file
0
uc_server/data/upgrade.lock
Normal file
0
uc_server/data/upgrade.lock
Normal file
67
uc_server/data/view/admin_login.php
Normal file
67
uc_server/data/view/admin_login.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php if(!defined('UC_ROOT')) exit('Access Denied');?>
|
||||
<?php include $this->gettpl('header');?>
|
||||
<script type="text/javascript">
|
||||
function $(id) {
|
||||
return document.getElementById(id);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
<form action="<?php echo UC_ADMINSCRIPT;?>?m=user&a=login" method="post" id="loginform" <?php if($iframe) { ?>target="_self"<?php } else { ?>target="_top"<?php } ?>>
|
||||
<input type="hidden" name="formhash" value="<?php echo FORMHASH;?>" />
|
||||
<input type="hidden" name="seccodehidden" value="<?php echo $seccodeinit;?>" />
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe;?>" />
|
||||
<table class="mainbox">
|
||||
<tr>
|
||||
<td class="loginbox">
|
||||
<h1>UCenter</h1>
|
||||
<p>UCenter 是一个能沟通多个应用的桥梁,使各应用共享一个用户数据库,实现统一登录,注册,用户管理。</p>
|
||||
</td>
|
||||
<td class="login">
|
||||
<?php if($errorcode == UC_LOGIN_ERROR_FOUNDER_PW) { ?><div class="errormsg loginmsg"><p>UCenter创始人密码错误</p></div>
|
||||
<?php } elseif($errorcode == UC_LOGIN_ERROR_ADMIN_PW) { ?><div class="errormsg loginmsg"><p><em>登录失败!</em><br />用户名无效,或密码错误。</p></div>
|
||||
<?php } elseif($errorcode == UC_LOGIN_ERROR_ADMIN_NOT_EXISTS) { ?><div class="errormsg loginmsg"><p>该管理员不存在</p></div>
|
||||
<?php } elseif($errorcode == UC_LOGIN_ERROR_SECCODE) { ?><div class="errormsg loginmsg"><p>验证码输入错误</p></div>
|
||||
<?php } elseif($errorcode == UC_LOGIN_ERROR_FAILEDLOGIN) { ?><div class="errormsg loginmsg"><p>密码重试次数过多,请稍后尝试</p></div>
|
||||
<?php } ?>
|
||||
<p>
|
||||
<input type="radio" name="isfounder" value="1" class="radio" <?php if((isset($_POST['isfounder']) && $isfounder) || !isset($_POST['isfounder'])) { ?>checked="checked"<?php } ?> onclick="changeuser('founder')" id="founder" /><label for="founder">UCenter创始人</label>
|
||||
<input type="radio" name="isfounder" value="0" class="radio" <?php if((isset($_POST['isfounder']) && !$isfounder)) { ?>checked="checked"<?php } ?> onclick="changeuser('manager')" id="admin" /><label for="admin">管理员</label>
|
||||
</p>
|
||||
<p id="usernamediv">用户名: <input type="text" name="username" class="txt" id="username" value="<?php echo $username;?>" /></p>
|
||||
<p>密 码: <input type="password" name="password" class="txt" id="password" value="<?php echo $password;?>" /></p>
|
||||
<p>验证码: <input type="text" name="seccode" class="txt seccode" id="seccode" value="" /><img width="70" height="21" src="<?php echo UC_ADMINSCRIPT;?>?m=seccode&seccodeauth=<?php echo $seccodeinit;?>&<?php echo rand();?>" class="checkcode" /></p>
|
||||
<p class="loginbtn"><input type="submit" name="submit" value="登 录" class="btn" /></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
<?php if((isset($_POST['isfounder']) && $isfounder) || !isset($_POST['isfounder'])) { ?>
|
||||
$('username').value='UCenter Administrator';
|
||||
$('username').disabled = true;
|
||||
$('username').readOnly = true;
|
||||
$('password').focus();
|
||||
<?php } else { ?>
|
||||
$('username').disabled = false;
|
||||
$('username').readOnly = false;
|
||||
$('username').focus();
|
||||
<?php } ?>
|
||||
|
||||
function changeuser(user) {
|
||||
if(user == 'founder') {
|
||||
$('username').value='UCenter Administrator';
|
||||
$('username').readOnly = true;
|
||||
$('username').disabled = true;
|
||||
$('password').focus();
|
||||
} else if(user == 'manager') {
|
||||
$('username').value='';
|
||||
$('username').readOnly = false;
|
||||
$('username').disabled = false;
|
||||
$('username').focus();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="footer">Powered by UCenter <?php echo UC_SERVER_VERSION;?> © 2001-2025 <a href="https://code.dismall.com/" target="_blank">Discuz! Team</a>.</div>
|
||||
<?php include $this->gettpl('footer');?>
|
35
uc_server/data/view/footer.php
Normal file
35
uc_server/data/view/footer.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php if(!defined('UC_ROOT')) exit('Access Denied');?>
|
||||
<?php if(UC_DEBUG) { ?>
|
||||
<style type="text/css">
|
||||
#debuginfo {width: 60%;margin-left: 2em;}
|
||||
fieldset {margin-top: 2em; display: block;}
|
||||
</style>
|
||||
<div style="text-align: left;" id="debuginfo">
|
||||
Processed in <span id="debug_time"></span> s
|
||||
<fieldset>
|
||||
<legend><b>GET:</b></legend>
|
||||
<?php echo '<pre>'.print_r($_GET, TRUE).'</pre>';?>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><b>POST:</b></legend>
|
||||
<?php echo '<pre>'.print_r($_POST, TRUE).'</pre>';?>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><b>COOKIE:</b></legend>
|
||||
<?php echo '<pre>'.print_r($_COOKIE, TRUE).'</pre>';?>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><b>SQL:</b> <?php echo $dbquerynum;?></legend>
|
||||
<?php foreach((array)$dbhistories as $dbhistory) {?>
|
||||
<li><?php echo $dbhistory;?></li>
|
||||
<?php } ?>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><b>Include:</b> <?php echo count(get_included_files());?></legend>
|
||||
<?php echo '<pre>'.print_r(get_included_files(), TRUE).'</pre>';?>
|
||||
</fieldset>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</body>
|
||||
</html>
|
56
uc_server/data/view/header.php
Normal file
56
uc_server/data/view/header.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php if(!defined('UC_ROOT')) exit('Access Denied');?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo UC_CHARSET;?>" />
|
||||
<title>UCenter Administrator's Control Panel</title>
|
||||
<link rel="stylesheet" href="images/admincp.css" type="text/css" media="all" />
|
||||
<meta content="Comsenz Inc." name="Copyright" />
|
||||
</head>
|
||||
<body><div id="append"></div>
|
||||
<?php if(!empty($iframe) && !empty($user)) { ?>
|
||||
<a class="othersoff" style="float:right;text-align:center" id="header_menu" onclick="headermenu(this)">菜单</a>
|
||||
<ul id="header_menu_menu" style="display: none">
|
||||
<li><a href="<?php echo UC_ADMINSCRIPT;?>?m=frame&a=main&iframe=1" target="main" class="tabon">首页</a></li>
|
||||
<?php if($user['allowadminsetting'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=setting&a=ls&iframe=1" target="main">基本设置</a></li><?php } ?>
|
||||
<?php if($user['allowadminsetting'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=setting&a=register&iframe=1" target="main">注册设置</a></li><?php } ?>
|
||||
<?php if($user['allowadminsetting'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=setting&a=mail&iframe=1" target="main">邮件设置</a></li><?php } ?>
|
||||
<?php if($user['allowadminapp'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=app&a=ls&iframe=1" target="main">应用管理</a></li><?php } ?>
|
||||
<?php if($user['allowadminuser'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=user&a=ls&iframe=1" target="main">用户管理</a></li><?php } ?>
|
||||
<?php if($user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=admin&a=ls&iframe=1" target="main">管理员</a></li><?php } ?>
|
||||
<?php if($user['allowadminpm'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=pm&a=ls&iframe=1" target="main">短消息</a></li><?php } ?>
|
||||
<?php if($user['allowadmincredits'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=credit&a=ls&iframe=1" target="main">积分兑换</a></li><?php } ?>
|
||||
<?php if($user['allowadminbadword'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=badword&a=ls&iframe=1" target="main">词语过滤</a></li><?php } ?>
|
||||
<?php if($user['allowadmindomain'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=domain&a=ls&iframe=1" target="main">域名解析</a></li><?php } ?>
|
||||
<?php if($user['allowadmindb'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=db&a=ls&iframe=1" target="main">数据备份</a></li><?php } ?>
|
||||
<?php if($user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=feed&a=ls&iframe=1" target="main">数据列表</a></li><?php } ?>
|
||||
<?php if($user['allowadmincache'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=cache&a=update&iframe=1" target="main">更新缓存</a></li><?php } ?>
|
||||
<?php if($user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=plugin&a=filecheck&iframe=1" target="main">插件中心</a></li><?php } ?>
|
||||
<a href="<?php echo UC_ADMINSCRIPT;?>?m=user&a=logout" target="main">退出</a>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<script type="text/javascript">
|
||||
function headermenu(ctrl) {
|
||||
ctrl.className = ctrl.className == 'otherson' ? 'othersoff' : 'otherson';
|
||||
var menu = document.getElementById('header_menu_body');
|
||||
if(!menu) {
|
||||
menu = document.createElement('div');
|
||||
menu.id = 'header_menu_body';
|
||||
menu.innerHTML = '<ul>' + document.getElementById('header_menu_menu').innerHTML + '</ul>';
|
||||
var obj = ctrl;
|
||||
var x = ctrl.offsetLeft;
|
||||
var y = ctrl.offsetTop;
|
||||
while((obj = obj.offsetParent) != null) {
|
||||
x += obj.offsetLeft;
|
||||
y += obj.offsetTop;
|
||||
}
|
||||
menu.style.left = x + 'px';
|
||||
menu.style.top = y + ctrl.offsetHeight + 'px';
|
||||
menu.className = 'togglemenu';
|
||||
menu.style.display = '';
|
||||
document.body.appendChild(menu);
|
||||
} else {
|
||||
menu.style.display = menu.style.display == 'none' ? '' : 'none';
|
||||
}
|
||||
}
|
||||
</script>
|
0
uc_server/data/view/index.htm
Normal file
0
uc_server/data/view/index.htm
Normal file
Reference in New Issue
Block a user