* adjust for check one click package.
This commit is contained in:
@@ -89,52 +89,4 @@ if(empty($config->notMd5Pwd))js::import($jsRoot . 'md5.js');
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<?php
|
||||
if(strpos('|/zentao/|/pro/|/biz/|', "|{$this->config->webRoot}|") !== false)
|
||||
{
|
||||
$databases = array('zentao' => 'zentao', 'zentaopro' => 'zentaopro', 'zentaobiz' => 'zentaobiz', 'zentaoep' => 'zentaoep');
|
||||
if($this->config->webRoot == '/zentao/') unset($databases['zentao']);
|
||||
if($this->config->webRoot == '/pro/') unset($databases['zentaopro']);
|
||||
if($this->config->webRoot == '/biz/')
|
||||
{
|
||||
unset($databases['zentaobiz']);
|
||||
unset($databases['zentaoep']);
|
||||
}
|
||||
|
||||
$users = array();
|
||||
foreach($databases as $database)
|
||||
{
|
||||
try
|
||||
{
|
||||
$webRoot = "/{$database}/";
|
||||
if($database == 'zentao') $webRoot = '/zentao/';
|
||||
if($database == 'zentaopro') $webRoot = '/pro/';
|
||||
if($database == 'zentaobiz') $webRoot = '/biz/';
|
||||
if($database == 'zentaoep') $webRoot = '/biz/';
|
||||
|
||||
$user = $this->dbh->query("select * from {$database}.`zt_user` where account = 'admin' and password='" . md5('123456') . "'")->fetch();
|
||||
if($user) $users[$webRoot] = true;
|
||||
|
||||
}
|
||||
catch(Exception $e){}
|
||||
}
|
||||
|
||||
if($users)
|
||||
{
|
||||
$sysURL = common::getSysURL();
|
||||
$links = array();
|
||||
foreach($users as $webRoot => $user) $links[] = $sysURL . $webRoot;
|
||||
|
||||
$notice = sprintf($lang->user->notice4Safe, join('<br />', $links));
|
||||
echo <<<EOD
|
||||
<script>
|
||||
\$(function()
|
||||
{
|
||||
bootbox.alert('$notice');
|
||||
})
|
||||
</script>
|
||||
EOD;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user