echo $journos->total;
        ?>
 matching journalists
          <?php 
    }
    ?>
      </h4>
  </div>

  <div class="body">
    <ul>
<?php 
    foreach ($journos->data as $j) {
        ?>
      <li><?php 
        echo journo_link($j);
        ?>
</li>
<?php 
    }
    ?>
    </ul>

    <?php 
    if ($journos->multi_page()) {
        ?>
    <div class="paginator">page <?php 
        echo $journos->paginator()->render();
        ?>
</div>
    <?php 
<div class="box recommended-journos">
 <div class="head"><h3>Journalists more popular than <?php 
echo $prettyname;
?>
</h3></div>
 <div class="body">
<?php 
if ($admired) {
    ?>
  <ul>
<?php 
    foreach ($admired as $a) {
        ?>
   <li><?php 
        echo journo_link($a);
        ?>
</li>
<?php 
    }
    ?>
  </ul>
<?php 
} else {
    ?>
  <span class="not-known"><?php 
    echo $prettyname;
    ?>
 has not added any journalists</span>
<?php 
}
Exemple #3
0
function spew_404($ref)
{
    header("HTTP/1.0 404 Not Found");
    $query = preg_replace('/[^a-z]+/', ' ', trim($ref));
    $title = "Couldn't find \"" . h(ucwords($query)) . "\"";
    page_header($title);
    $journos = journo_FuzzyFind($query);
    ?>
<h2><?php 
    echo $title;
    ?>
</h2>
<?php 
    if ($query) {
        ?>
<p>Did you perhaps mean one of these?</p>

<ul>
<?php 
        foreach ($journos as $j) {
            ?>
  <li><?php 
            echo journo_link($j);
            ?>
</li>
<?php 
        }
        ?>
</ul>
<?php 
    }
    ?>

<form method="get" action="/search">
 <input type="hidden" name="type" value="journo" />
 <input type="text" size="40" name="q" value="<?php 
    echo h($query);
    ?>
" />
 <input type="submit" name="action" value="Search for Journalist" />
</form>

<?php 
    page_footer();
}
Exemple #4
0
function do_DenyClaim()
{
    $person_id = get_http_var('person_id');
    $journo_id = get_http_var('journo_id');
    $person = db_getRow("SELECT * FROM person WHERE id=?", $person_id);
    $journo = db_getRow("SELECT * FROM journo WHERE id=?", $journo_id);
    db_do("UPDATE person_permission SET permission='claim_denied' WHERE person_id=? AND journo_id=? AND permission='claimed'", $person_id, $journo_id);
    db_commit();
    ?>
<div class="action_summary">
<p>Denied claim on <?php 
    echo journo_link($journo);
    ?>
 by <?php 
    echo $person['email'];
    ?>
</p>
</div>
<?php 
}