コード例 #1
0
ファイル: _list.php プロジェクト: bshaffer/Donate-Nashville
<?php 
    $i = 0;
    foreach ($results as $result) {
        ?>
  <li <?php 
        echo $i % 2 == 0 ? 'class="alt"' : '';
        ?>
>
    <div class="right">
			<?php 
        echo link_to('More Info', '@' . opposite_of($transaction_type) . '_stuff_show?id=' . $result['id'], array('class' => 'button'));
        ?>
		</div>
		<h3 class="no-margin"><?php 
        echo link_to($result['title'], '@' . opposite_of($transaction_type) . '_stuff_show?id=' . $result['id']);
        ?>
</h3>
		<strong>Quantity <?php 
        echo $transaction_type == 'have' ? 'Available' : 'Needed';
        ?>
:</strong> <?php 
        echo $result['quantity'];
        ?>
&nbsp;&bull;&nbsp;<span class=""><strong>Added:</strong> <?php 
        echo date('M j, Y', strtotime($result['created_at']));
        ?>
</span>&nbsp;&bull;&nbsp;<strong><?php 
        echo $result['neighborhood'];
        ?>
</strong>
コード例 #2
0
<?php

use_helper('dh');
?>
<form class="resourceFilter search-large" action="<?php 
echo url_for('@stuff_list?type=' . opposite_of($resource_action));
?>
" method="get" accept-charset="utf-8">
	<input type="text" class="resource" name="resource" value="" id="ResourceFilter">	
	<input type="hidden" name="resource_type" value="stuff" id="ResourceType">
</form>
コード例 #3
0
<?php

use_helper('dh');
?>

<h1>We have a match for "<?php 
echo $resource['title'];
?>
"!</h1>

<p>
  User <?php 
echo $contact['name'];
?>
 says they <?php 
echo opposite_of($type);
?>
 what you <?php 
echo $type;
?>
!
</p>

<p>You can contact them using the information below:</p>

<dl>
  <?php 
if ($contact['email']) {
    ?>
    <dt><strong>Email:</strong></dt>
    <dd><?php