%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/losik.varak.net/app/
Upload File :
Create Path :
Current File : /www/varak.net/losik.varak.net/app/session-presence.php

<?php
/**
 * Created by IntelliJ IDEA.
 * User: mvarak
 * Date: 2/22/19
 * Time: 3:11 PM
 */

function mysort($a, $b)
{
    if($a['squad'] > $b['squad']) return 1;
    if($a['squad'] == $b['squad'])
    {
        if(strcmp($a['lastName'], $b['lastName']) > 0) return 1;
        if($a['lastName'] == $b['lastName'])
        {
            return strcmp($a['firstName'], $b['firstName']);
        }
    }
    return -1;
}

$result = dibi::query("SELECT [data] FROM [registration] WHERE [guid]=%s", $id)->fetchSingle();
$match = json_decode($result, true);

$shooters = $match['shooters'];
uasort($shooters, 'mysort');

$match['shooters'] = $shooters;

$smarty->assign('match', $match);

Zerion Mini Shell 1.0