Example #1
0
?>
</p>

<h2><?php 
echo __('Available entries');
?>
</h2>

<?php 
if (count($activities) == 0) {
    ?>
<p><?php 
    echo __('This user does not have any entry.');
    ?>
</p>
<?php 
} else {
    ?>
<ul class="blocklist">
	<?php 
    foreach ($activities as $activity) {
        ?>
		<?php 
        echo block_item($activity->getName(), array(color_square($activity->getColor()), link_to(__('Select'), 'home/overallIndex?activityId=' . $activity->getId())));
        ?>
	<?php 
    }
    ?>
</ul>
<?php 
}
Example #2
0
        ?>

    <tr class="<?php 
        echo $is_even ? 'even' : 'odd';
        ?>
">
      <td><a href="<?php 
        echo url_for('activity/edit?id=' . $activity->getId());
        ?>
"><?php 
        echo $activity->getName();
        ?>
</a></td>
      <td>
				<?php 
        echo color_square($activity->getColor());
        ?>
			</td>
      <td><?php 
        echo $activity->getMinimumOccupation();
        ?>
</td>
      <td><?php 
        echo $activity->getMaximumOccupation();
        ?>
</td>
      <td><?php 
        echo format_number_choice('[0]No delay|[1]1 minute|(1,+Inf]%delay% minutes', array('%delay%' => $activity->getMinimumDelay()), $activity->getMinimumDelay());
        ?>
</td>
			<td>
Example #3
0
	<?php 
    foreach ($zones as $zone) {
        ?>
		<?php 
        if ($zone->getDirectRoomsCount($activity->getId(), RoomPeer::getActiveCriteria()) > 0) {
            ?>
			<h3><?php 
            echo $zone->getName();
            ?>
</h3>
			<ul class="blocklist">
				<?php 
            foreach ($zone->getDirectRooms($activity->getId(), RoomPeer::getActiveCriteria()) as $room) {
                ?>
					<?php 
                $features_array = $room->getValuedFeaturesArray();
                ?>

					<?php 
                echo block_item($room->getName(), array(color_square($activity->getColor()), definition_list(array(__('Capacity') => $room->getCapacity(), __('Address') => $room->getAddress())), definition_list($features_array), link_to(__('Select'), 'reservation/index?roomId=' . $room->getId())));
                ?>
				<?php 
            }
            ?>
			</ul>
		<?php 
        }
        ?>
	<?php 
    }
}
Example #4
0
function create_random_square()
{
    $GLOBALS['crs_count'] = ($GLOBALS['crs_count'] + 1) % 4;
    if ($GLOBALS['crs_count'] == 0) {
        $GLOBALS['pixels'] = array_fill(0, 256 * 256 / 8, 0x0);
        $GLOBALS['pixels'][0] = 0x0;
        $GLOBALS['pixels'][PIXELS_RB] = 0x0;
        # draw some random boxes
        $num_boxes = rand(100, 2055);
        for ($i = 0; $i < $num_boxes; ++$i) {
            $size = 1 << rand(0, 2);
            $x = rand(0, 255);
            $y = rand(0, 255);
            $x -= $x % $size;
            $y -= $y % $size;
            color_square($x, $y, $size);
        }
        if ($GLOBALS['debug_tiles']) {
            print_full_table($GLOBALS['pixels'], 256, 256 / 8);
        }
    }
    $zooms = create_tile_from_quadrant($GLOBALS['crs_count']);
    return $zooms;
}