<?php
$url = '';
$configuration = array(
'applicationID' => 1,
'serverid' => 1,
'ul' => '',
'password' => '',
'adminuser' => '',
'hidelogin' => 1,
'AppMode' => '',
'username' => ''
);
if (isset($_SERVER['SYMFONY__ENVIRONMENT']) && ($_SERVER['SYMFONY__ENVIRONMENT'] == 'prod')) {
$overrides = array('password' => '',
'adminuser' => '');
$configuration = array_merge($configuration, $overrides);
}
renderView($url, $configuration);
function renderView($url, $configuration)
{
$view = '<html>
<head>
<title>k</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="wh.css" rel="stylesheet"/>
</head>
<body>
<header>
<h1 id="title">
<span class="icon"><img src="" alt=""/></span>
</h1>
</header>
<div id="sub-header">
<h1>
<span class="text"></span>
</h1>
</div>
<div id="login-form">';
$view .= sprintf('<form action="%s" method="get" id="playerCheck">%s', $url, "\n");
foreach ($configuration as $name => $value) {
$view .= sprintf('<input type="hidden" name="%s" id="%s" value="%s"/>%s', $name, $name, $value, "\n");
}
$view .= '<input type="text" id="incompleteUsername" placeholder="Username" />
<input type="button" value="Check Player" id="sendForm" class="who-blue"/>
</form>
</div>
</body>
<script src="jquery-1.10.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$(\'#sendForm\').click(function () {
$(\'#username\').val(
"aa_" + $(\'#incompleteUsername\').val()
);
$(\'#playerCheck\').submit();
});
});
</script>
</html>';
echo $view;
}
preferences:
34.66 ms | 402 KiB | 5 Q