<commit_before><?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
require_once('class.TicketAdminPage.php');
require_once('class.FlipsideTicketDB.php');
$page = new TicketAdminPage('Burning Flipside - Tickets');

$page->add_js_from_src('js/index.js');

    $db = new FlipsideTicketDB();
    $request_count = $db->getRequestCount();
    $tickets = $db->getRequestedTickets();
    $requested_ticket_count = 0;
    for($i = 0; $i < count($tickets); $i++)
    {
        $requested_ticket_count += $tickets[$i]['count'];
    }

    $page->body .= '
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">Dashboard</h1>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-3 col-md-6">
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-xs-3">
                                <span class="glyphicon glyphicon-file" style="font-size: 5em;"></span>                                
                            </div>
                            <div class="col-xs-9 text-right">
                                <div style="font-size: 40px;">'.$request_count.'</div>
                                <div>Ticket Requests</div>
                            </div>
                        </div>
                    </div>
                    <a href="requests.php">
                        <div class="panel-footer">
                            <span class="pull-left">View Details</span>
                            <span class="pull-right glyphicon glyphicon-circle-arrow-right"></span>
                            <div class="clearfix"></div>
                        </div>
                    </a>
                </div>
            </div>
            <div class="col-lg-3 col-md-6">
                <div class="panel panel-green">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-xs-3">
                                <span class="glyphicon glyphicon-tag" style="font-size: 5em;"></span>
                            </div>
                            <div class="col-xs-9 text-right">
                                <div style="font-size: 40px;">'.$requested_ticket_count.'</div>
                                <div>Requested Tickets</div>
                            </div>
                        </div>
                    </div>
                    <a href="request_tickets.php">
                        <div class="panel-footer">
                            <span class="pull-left">View Details</span>
                            <span class="pull-right glyphicon glyphicon-circle-arrow-right"></span>
                            <div class="clearfix"></div>
                        </div>
                    </a>
                </div>
            </div>
            <div class="col-lg-3 col-md-6">
                <div class="panel panel-red">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-xs-3">
                                <span class="glyphicon glyphicon-fire" style="font-size: 5em;"></span>
                            </div>
                            <div class="col-xs-9 text-right">
                                <div style="font-size: 40px;">'.$db->getProblemRequestCount().'</div>
                                <div>Problem Requests</div>
                            </div>
                        </div>
                    </div>
                    <a href="problems.php">
                        <div class="panel-footer">
                            <span class="pull-left">View Details</span>
                            <span class="pull-right glyphicon glyphicon-circle-arrow-right"></span>
                            <div class="clearfix"></div>
                        </div>
                    </a>
                </div>
            </div>
            <div class="col-lg-3 col-md-6">
                <div class="panel panel-yellow">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-xs-3">
                                <span class="glyphicon glyphicon-usd" style="font-size: 5em;"></span>
                            </div>
                            <div class="col-xs-9 text-right">
                                <div style="font-size: 40px;">'.$db->getTicketSoldCount().'</div>
                                <div>Sold Tickets</div>
                            </div>
                        </div>
                    </div>
                    <a href="sold_tickets.php">
                        <div class="panel-footer">
                            <span class="pull-left">View Details</span>
                            <span class="pull-right glyphicon glyphicon-circle-arrow-right"></span>
                            <div class="clearfix"></div>
                        </div>
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>
';

$page->print_page();
// vim: set tabstop=4 shiftwidth=4 expandtab:
?>
<commit_msg>Move ticket admin index.php to new card interface<commit_after><?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
require_once('class.TicketAdminPage.php');
require_once('class.FlipsideTicketDB.php');
$page = new TicketAdminPage('Burning Flipside - Tickets');

$page->add_js_from_src('js/index.js');

$db = new FlipsideTicketDB();
$request_count = $db->getRequestCount();
$tickets = $db->getRequestedTickets();
$requested_ticket_count = 0;
for($i = 0; $i < count($tickets); $i++)
{
    $requested_ticket_count += $tickets[$i]['count'];
}

$page->body .= '
<div class="row">
    <div class="col-lg-12">
        <h1 class="page-header">Dashboard</h1>
    </div>
</div>
<div class="row">';

$page->add_card('fa-file', $request_count, 'Ticket Requests', 'requests.php');
$page->add_card('fa-tag',  $requested_ticket_count, 'Requested Tickets', 'request_tickets.php', $page::CARD_GREEN);
$page->add_card('fa-fire', $db->getProblemRequestCount(), 'Problem Requests', 'problems.php', $page::CARD_RED);
$page->add_card('fa-usd',  $db->getTicketSoldCount(), 'Sold Tickets', 'sold_tickets.php', $page::CARD_YELLOW);
$page->body.='</div>';

$page->print_page();
// vim: set tabstop=4 shiftwidth=4 expandtab:
?>

{'fraction_non_alphanumeric': 0.1525111350023038, 'fraction_numerical': 0.007064966978958686, 'mean_word_length': 1.3026874115983027, 'pattern_counts': {'":': 0, '<': 137, '<?xml version=': 0, '>': 154, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '715542', 'n_tokens_mistral': 1892, 'n_tokens_neox': 1778, 'n_words': 308}