示例#1
0
function journo_calcWrittenFor($journo_id)
{
    $orgs = get_org_names();
    $writtenfor = db_getAll("SELECT DISTINCT a.srcorg " . "FROM article a INNER JOIN journo_attr j ON (a.status='a' AND a.id=j.article_id) " . "WHERE j.journo_id=?", $journo_id);
    $orglist = array();
    foreach ($writtenfor as $row) {
        $srcorg = $row['srcorg'];
        // get jobtitles seen for this org:
        $titles = db_getAll("SELECT jobtitle FROM journo_jobtitle WHERE journo_id=? AND org_id=?", $journo_id, $srcorg);
        $titlelist = array();
        foreach ($titles as $t) {
            $titlelist[] = $t['jobtitle'];
        }
        $s = "<span class=\"publication\">" . $orgs[$srcorg] . "</span>";
        if (!empty($titlelist)) {
            $s .= ' (' . implode(', ', $titlelist) . ')';
        }
        $orglist[] = $s;
    }
    $writtenfor = pretty_implode($orglist);
    return $writtenfor;
}
示例#2
0
</abbr>,
      <span class="publication"><?php 
echo $srcorgname;
?>
</span>
      <h2 class="entry-title"><?php 
echo $title;
?>
</h2>
    </div>
    <div class="body">
<?php 
if ($journo_links) {
    ?>
      By <?php 
    echo pretty_implode($journo_links);
    ?>
<br/>
<?php 
}
?>
      <blockquote class="entry-summary">
        <?php 
echo $description;
?>
      </blockquote>
    </div>
  </div>


  <div class="art-info">