コード例 #1
0
ファイル: trans.php プロジェクト: pacew/accts
usort($elts, "elt_cmp");
$score_limit = $elts[0]->score - 1;
$similar_tids = array();
$n = count($elts);
$rownum = 0;
$rows = "";
for ($i = 0; $i < $n; $i++) {
    $elt = $elts[$i];
    if ($elt->score < $score_limit) {
        break;
    }
    if ($elt->tid != $arg_tid) {
        $similar_tids[] = $elt->tid;
    }
    $rownum++;
    $o = odd_even($rownum);
    $rows .= "<tr {$o}>";
    $rows .= sprintf("<td>%s</td>", h($elt->posted));
    $t = sprintf("trans.php?tid=%d", $elt->tid);
    $rows .= sprintf("<td>%s</td>\n", mklink($elt->name2, $t));
    $t = sprintf("trans.php?tid=%d", $elt->tid);
    $rows .= sprintf("<td>%s</td>\n", mklink($elt->name, $t));
    $text = sprintf("%.2f", $elt->amount);
    $rows .= sprintf("<td class='num'>%s</td>\n", mklink($text, $t));
    $tag_name = @$tag_id_to_name[$elt->tag_id];
    $t = sprintf("tag.php?tag_id=%d", $elt->tag_id);
    $rows .= sprintf("<td>%s</td>", mklink($tag_name, $t));
    $rows .= "</tr>\n";
}
$body .= "<h2>Similar transactions</h2>\n";
if (count($splits) == 1 && count($similar_tids) > 0) {
コード例 #2
0
ファイル: index.php プロジェクト: sindotnet/hotelyan
?>
</th>
      <th class="modify" width=50><?php 
echo __('Action');
?>
</th>
    </tr>
  </thead>
  <tbody>

<?php 
while ($offer = $offers->fetchObject()) {
    ?>

    <tr style="height:35px;" class="<?php 
    echo odd_even();
    ?>
">
      <td align=left>
      	<a href="<?php 
    echo get_url('offer/view/' . $offer->id);
    ?>
">
      		<?php 
    echo $offer->title;
    ?>

      	</a>
      </td>
      <td>
      	<input type=hidden name="offer_id[]" value="<?php 
コード例 #3
0
">
                        <tbody>
                            <?php 
$i = 0;
?>
                            <?php 
if (isset($key_headers)) {
    ?>
                                <?php 
    foreach ($key_headers as $key => $val) {
        ?>
                                    <tr id="<?php 
        __e($key);
        ?>
" class="<?php 
        odd_even(++$i);
        ?>
">
                                        <th><?php 
        __e($val);
        ?>
</th>
                                        <td class="center" id="<?php 
        __e($object . '-' . $i . '-' . $key);
        ?>
"><?php 
        __ed($key, $object_data);
        ?>
</td>
                                    </tr>
                                <?php 
コード例 #4
0
ファイル: index.php プロジェクト: blr21560/dashboard
 <img src="<?php 
echo PLUGINS_URI;
?>
dashboard/img/sort.png" /></th>
            </tr>
        </thead>
        <tbody>
            <?php 
$entrynum = 0;
?>
            <?php 
foreach ($log_entries as $entry) {
    ?>
 
                <tr class="<?php 
    print odd_even();
    ?>
">
                    <td class="hidden"><?php 
    echo $entrynum;
    ?>
</td>
                    <td class="priority"><img src="<?php 
    echo PLUGINS_URI;
    ?>
dashboard/img/<?php 
    print $entry->priority('string');
    ?>
.png" title="<?php 
    print $entry->priority('string');
    ?>
コード例 #5
0
ファイル: task02.php プロジェクト: s4ylerr/test2
<?php

function odd_even($param)
{
    $count = count($param);
    $sum = 0;
    for ($i = 0; $i < $count; $i++) {
        $sum += $param[$i];
    }
    if ($sum % 2 === 0) {
        echo "Even";
    } else {
        echo "ODD";
    }
}
//function arr_gen($el){
//	for ($j=0; $j < $el ; $j++) {
//		$arr[$j] =rand(1,20);
//	}
//	return $arr;
//		var_dump($arr)
//}
$arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
odd_even($arr);
コード例 #6
0
ファイル: Framework.php プロジェクト: chaobj001/tt
function even_odd()
{
    return odd_even();
}
コード例 #7
0
  <thead>
    <tr>
      <th class="name"><a href="<?php echo $baseURL;?>&order=name"><?php echo __('Name'); ?></a></th>
      <th class="id"><a href="<?php echo $baseURL;?>&order=id"><?php echo __('ID');?></a></th>
      <th class="dcount"><a href="<?php echo $baseURL;?>&order=downloads"><?php echo __('Downloads'); ?></a></th>
      <th class="created"><a href="<?php echo $baseURL;?>&order=created"><?php echo __('Created'); ?></a></th>
      <th class="expires"><a href="<?php echo $baseURL;?>&order=expires"><?php echo __('Expires'); ?></a></th>
      <th class="action" style="width:56px;"><?php echo __('Action');?></th>
    </tr>
  </thead>
  <tbody>
<?php
foreach ($downloads as $download) {
	$name = htmlspecialchars($download->name);
?>
	<tr class="<?php echo odd_even(); ?>">
		<td><a href="<?php echo get_url('plugin/downloads/edit/'.$download->id); ?>"><?php echo $name;?></a></td>
		<td><code><?php echo $download->id;?></code></td>
		<td><code><?php echo $download->downloads; ?></code></td>
		<td><code><?php echo date('m/d/Y',strtotime($download->created)); ?></code></td>
		<td><code><?php echo !empty($download->expires) ? date('m/d/Y',strtotime($download->expires)) : 'never'; ?></code></td>
		<td>
			<?php echo "<a href=\"/download-file/{$download->id}/{$download->filename}\" target=\"_blank\" title=\"{$download->filename}\"><img src=\"".PLUGINS_URI."/downloads/images/icon-open.png\" alt=\"view icon\" title=\"View\"></a>"; ?>
			<a class="edit-link" name="<?php echo $name;?>" href="<?php echo get_url('plugin/downloads/edit/'.$download->id); ?>"><img src="<?php echo PLUGINS_URI;?>/downloads/images/icon-edit.png" alt="edit icon" title="Edit <?php echo $name;?>" /></a>
			<a class="delete-link" name="<?php echo $name;?>" href="<?php echo get_url('plugin/downloads/delete/'.$download->id); ?>"><img src="<?php echo PLUGINS_URI;?>/downloads/images/icon-trash.png" alt="delete file icon" title="Delete <?php echo $name;?>" /></a>
		</td>
	</tr>
<?php
}
?>
</tbody>
コード例 #8
0
ファイル: index.php プロジェクト: realslacker/Banner-Plugin
      <th class="name"><?=__('Name'); ?></th>
      <th class="dimensions"><?=__('Dimensions'); ?></th>
      <th class="dcount"><?=__('Displays'); ?></th>
      <th class="dcount"><?=__('Clicks'); ?></th>
      <th class="ctr"><?=__('CTR');?></th>
      <th class="created"><?=__('Created'); ?></th>
      <th class="expires"><?=__('Expires'); ?></th>
      <th class="action" style="width:50px;"><?=__('Action');?></th>
    </tr>
  </thead>
  <tbody>
<?php
foreach ($banners as $banner):
	$name = htmlspecialchars($banner->name);
?>
	<tr class="<?=odd_even(); ?>">
		<td><a href="<?=get_url('plugin/banner/banner_edit/'.$banner->id); ?>"><?=$banner->name; ?></a></td>
		<td><code><?="{$banner->width}x{$banner->height}"; ?></code></td>
		<td><code><?=$banner->dcount; ?></code></td>
		<td><code><?=$banner->ccount; ?></code></td>
		<td><code><?=round(($banner->ccount/$banner->dcount)*100,1);?>%</code></td>
		<td><code><?=$banner->created; ?></code></td>
		<td><code><?=$banner->expires; ?></code></td>
		<td>
			<a class="edit-link" name="<?=$name;?>" href="<?=get_url('plugin/banner/banner_edit/'.$banner->id); ?>"><img src="/wolf/admin/images/icon-rename.gif" alt="edit icon" title="Edit Banner"></a>
			<a class="delete-link" name="<?=$name;?>" href="<?=get_url('plugin/banner/banner_delete/'.$banner->id); ?>"><img src="/wolf/admin/images/icon-remove.gif" alt="delete file icon" title="Delete Banner"></a>
		</td>
	</tr>
<?php endforeach; ?>
</tbody>
</table>
コード例 #9
0
?>
                </tr>
            </thead>   
            <tbody>
                <?php 
if (isset($list) && !empty($list)) {
    ?>
                    <?php 
    foreach ($list as $k => $list_item) {
        $id = isset($list_item['id']) ? $list_item['id'] : $k;
        ?>
                        <tr id="<?php 
        __e("list-{$object}-{$id}");
        ?>
" class="<?php 
        odd_even($k + 1);
        ?>
 ">
                            <?php 
        foreach ($list_headers as $key => $val) {
            ?>
                                <td class="center" id="<?php 
            __e($object . '-' . $id . '-' . $key);
            ?>
"><?php 
            __ed($key, $list_item);
            ?>
</td>
                            <?php 
        }
        ?>
コード例 #10
0
ファイル: index.php プロジェクト: pawedWolf/wolfcms-dashboard
function dashboard_events_widget_render()
{
    global $dashboardEvents;
    if (get_request_method() == "POST") {
        if (isset($_POST["dashboard_events"]) && $_POST["dashboard_events"] == "clear_all") {
            $dashboardEvents->clear();
            redirect(get_url("plugin/dashboard/"));
            die;
        }
    }
    $log_entries = Record::findAllFrom("DashboardLogEntry", "created_on=created_on ORDER BY created_on DESC");
    $path = WOLF_PATH_WIDGETS . "events/";
    ?>
			<form method="post" action="">
				<table class="dashboardTable" cellpadding="0" cellspacing="0" border="0">
					<thead>
						<tr>
							<th colspan="2"></th>
							<th><?php 
    echo __("Event");
    ?>
</th>
							<th class="moment"><?php 
    echo __("Time");
    ?>
 <img src="<?php 
    echo $path;
    ?>
img/sort.png" /></th>
						</tr>
					</thead>
					
					<tbody>
						<?php 
    $entrynum = 0;
    foreach ($log_entries as $entry) {
        ?>
									<tr class="<?php 
        echo odd_even();
        ?>
">
										<td class="hidden"><?php 
        echo $entrynum;
        ?>
</td>
										<td class="priority">
											<img src="<?php 
        echo $path;
        ?>
img/<?php 
        echo $entry->priority("string");
        ?>
.png" title="<?php 
        echo $entry->priority("string");
        ?>
" />
										</td>
										<td class="dashboardMessage"><?php 
        echo $entry->message;
        ?>
</td>
										<td class="date">
											<a title="<?php 
        echo $entry->created_on;
        ?>
"><?php 
        echo DateDifference::getString(new DateTime($entry->created_on));
        ?>
</a>
										</td>
									</tr>
								<?php 
        $entrynum++;
    }
    ?>
          
					</tbody>
				</table>

				<p class="buttons">
					<input type="hidden" name="dashboard_events" value="clear_all" />
					<input type="submit" name="dashboard_action" value="<?php 
    echo __("Clear all");
    ?>
" class="button" />
				</p>
			</form>
		<?php 
}
コード例 #11
0
ファイル: content-search.php プロジェクト: rymaga/manpaper
<?php

/**
 * The template part for displaying results in search pages.
 *
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package brosco
 */
?>
<div class="<?php 
odd_even();
?>
">
<div class="container">
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
	<?php 
if (has_post_thumbnail()) {
    ?>
   <a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    the_title_attribute();
    ?>