<th>{{Label}}</th>
		<th>{{Ticket name}}</th>
		<th>{{Ticket amount}}</th>
		<th>{{Tax}}</th>
		<th>{{Ticket total due}}</th>
		<th>{{Lastname}}</th>
		<th>{{Firstname}}</th>
		<th>{{Email}}</th>
	</tr>
<?php 
foreach ($g_display["participations"] as $participation) {
    list($item, $bill) = $participation;
    if ($item->class != '/item/ticket') {
        continue;
    }
    $user = User::get_from_id($bill->user_id);
    $rate_name = $item->event_rate_name;
    $lastname = $item->attendee_lastname;
    $firstname = $item->attendee_firstname;
    ?>
	<tr>
		<td><a href="<?php 
    echo $bill->url();
    ?>
" target="_blank"><?php 
    echo $bill->label;
    ?>
</a></td>
		<td><?php 
    echo $rate_name;
    ?>
Example #2
0
    public static function used_mail($email)
    {
        global $g_pdo;
        $request = "";
        if (isset($_SESSION['user_id'])) {
            $user = User::get_from_id();
            $request = <<<EOF
SELECT COUNT(*) FROM `user` WHERE `email`= :email AND `id`!= :id
EOF;
            $q = $g_pdo->prepare($request);
            $q->execute(array(":email" => $email, ":id" => $user->id));
        } else {
            $request = <<<EOF
SELECT COUNT(*) FROM `user` WHERE `email`= :email
EOF;
            $q = $g_pdo->prepare($request);
            $q->execute(array(":email" => $email));
        }
        $count = $q->fetch();
        return $count[0] > 0;
    }