Merge branch 'next' of github.com:TheSerapher/php-mpos into next

This commit is contained in:
Sebastian Grewe 2013-10-22 20:29:40 +02:00
commit 3451f481f6
15 changed files with 51 additions and 6 deletions

View File

@ -1,3 +1,4 @@
ErrorDocument 404 /index.php?page=error&action=404
RedirectMatch 404 /templates(/|$)
RedirectMatch 404 /include(/|$)
RedirectMatch 404 /.git(/|$)

View File

@ -0,0 +1,9 @@
<?php
// Make sure we are called from index.php
if (!defined('SECURITY'))
die('Hacking attempt');
// Tempalte specifics
$smarty->assign("CONTENT", "default.tpl");
?>

View File

@ -0,0 +1,9 @@
<?php
// Make sure we are called from index.php
if (!defined('SECURITY'))
die('Hacking attempt');
// Tempalte specifics
$smarty->assign("CONTENT", "default.tpl");
?>

View File

@ -51,7 +51,13 @@ if (is_dir(INCLUDE_DIR . '/pages/')) {
}
// Set a default action here if no page has been requested
$page = isset($_REQUEST['page']) && isset($arrPages[$_REQUEST['page']]) ? $_REQUEST['page'] : 'home';
if (isset($_REQUEST['page']) && isset($arrPages[$_REQUEST['page']])) {
$page = $_REQUEST['page'];
} else if (isset($_REQUEST['page']) && ! isset($arrPages[$_REQUEST['page']])) {
$page = 'error';
} else {
$page = 'home';
}
// Create our pages array from existing files
if (is_dir(INCLUDE_DIR . '/pages/' . $page)) {

View File

@ -0,0 +1,3 @@
{include file="global/block_header.tpl" BLOCK_HEADER="{$GLOBAL.website.name}" BLOCK_STYLE="clear:none; margin-left:13px; margin-top:15px;"}
<p>The page you requested was not found.</p>
{include file="global/block_footer.tpl"}

View File

@ -0,0 +1,3 @@
{include file="global/block_header.tpl" BLOCK_HEADER="{$GLOBAL.website.name}" BLOCK_STYLE="clear:none; margin-left:13px; margin-top:15px;"}
<p>The page you requested was not found.</p>
{include file="global/block_footer.tpl"}

View File

@ -1,4 +1,4 @@
{include file="global/block_header.tpl" BLOCK_HEADER="Login" BLOCK_STYLE="clear:none; margin-left:13px; margin-top:15px;"}
{include file="global/block_header.tpl" BLOCK_HEADER="Login" BLOCK_STYLE="clear:none; margin-left:13px; margin-top:15px;"}
<form action="{$smarty.server.PHP_SELF}?page=login" method="post" id="loginForm">
<p><input type="text" name="username" value="" id="userForm" maxlength="20" required></p>
<p><input type="password" name="password" value="" id="passForm" maxlength="20" required></p>

View File

@ -15,7 +15,7 @@
{assign var=listed value=0}
{section contrib $CONTRIBHASHES}
{math assign="estday" equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24), 3)" diff=$DIFFICULTY reward=$REWARD hashrate=$CONTRIBHASHES[contrib].hashrate}
<tr{if $GLOBAL.userdata.username == $CONTRIBHASHES[contrib].account}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
<tr{if $GLOBAL.userdata.username|default:""|lower == $CONTRIBHASHES[contrib].account|lower}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
<td>{$rank++}</td>
<td>{if $CONTRIBHASHES[contrib].is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$CONTRIBHASHES[contrib].account|escape}{/if}</td>
<td class="right">{($CONTRIBHASHES[contrib].hashrate * $GLOBAL.hashmods.personal)|number_format:"2"}</td>

View File

@ -12,7 +12,7 @@
{assign var=rank value=1}
{assign var=listed value=0}
{section shares $CONTRIBSHARES}
<tr{if $GLOBAL.userdata.username == $CONTRIBSHARES[shares].account}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
<tr{if $GLOBAL.userdata.username|default:""|lower == $CONTRIBSHARES[shares].account|lower}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
<td>{$rank++}</td>
<td>{if $CONTRIBSHARES[shares].is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$CONTRIBSHARES[shares].account|escape}{/if}</td>
<td class="right">{$CONTRIBSHARES[shares].shares|number_format}</td>

View File

@ -0,0 +1 @@
<p>The page you requested was not found.</p>

View File

@ -0,0 +1 @@
<p>The page you requested was not found.</p>

View File

@ -0,0 +1,6 @@
<article class="module width_full">
<header><h3>{$GLOBAL.website.name}</h3></header>
<div class="module_content">
<p>The page you requested was not found.</p>
</div>
</article>

View File

@ -0,0 +1,6 @@
<article class="module width_full">
<header><h3>{$GLOBAL.website.name}</h3></header>
<div class="module_content">
<p>The page you requested was not found.</p>
</div>
</article>

View File

@ -17,7 +17,7 @@
{assign var=listed value=0}
{section contrib $CONTRIBHASHES}
{math assign="estday" equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24), 3)" diff=$DIFFICULTY reward=$REWARD hashrate=$CONTRIBHASHES[contrib].hashrate}
<tr{if $GLOBAL.userdata.username|default:"" == $CONTRIBHASHES[contrib].account}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
<tr{if $GLOBAL.userdata.username|default:""|lower == $CONTRIBHASHES[contrib].account|lower}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
<td align="center">{$rank++}</td>
<td align="right">{if $CONTRIBHASHES[contrib].donate_percent > 0}<i class="icon-star-empty"></i>{/if}</td>
<td>{if $CONTRIBHASHES[contrib].is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$CONTRIBHASHES[contrib].account|escape}{/if}</td>

View File

@ -13,7 +13,7 @@
{assign var=rank value=1}
{assign var=listed value=0}
{section shares $CONTRIBSHARES}
<tr{if $GLOBAL.userdata.username|default:"" == $CONTRIBSHARES[shares].account}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
<tr{if $GLOBAL.userdata.username|default:""|lower == $CONTRIBSHARES[shares].account|lower}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
<td align="center">{$rank++}</td>
<td align="right">{if $CONTRIBSHARES[shares].donate_percent > 0}<i class="icon-star-empty"></i>{/if}</td>
<td>{if $CONTRIBSHARES[shares].is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$CONTRIBSHARES[shares].account|escape}{/if}</td>