Example #1
0
function account_page()
{
    $r = array('reason_web' => "Log in", 'reason_email' => "Log in to Journalisted", 'reason_email_subject' => 'Log in to Journalisted');
    $P = person_signon($r);
    $passwordbox = new PasswordBox();
    // linked to a journo for editing (or claim pending)?
    $sql = <<<EOT
SELECT j.*, perm.permission
    FROM journo j INNER JOIN person_permission perm
        ON perm.journo_id=j.id
    WHERE perm.permission in ('edit','claimed') AND perm.person_id=?
    LIMIT 1
EOT;
    $journo = db_getRow($sql, $P->id());
    // signed up for newsletters?
    $newsletter = db_getOne("SELECT person_id FROM person_receives_newsletter WHERE person_id=?", $P->id()) ? TRUE : FALSE;
    // how many alerts set up?
    $alert_cnt = db_getOne("SELECT count(*) FROM alert WHERE person_id=?", $P->id());
    // what bits of profile have been filled in?
    $photo_cnt = 0;
    $edu_cnt = 0;
    $emp_cnt = 0;
    $book_cnt = 0;
    $award_cnt = 0;
    $admired_cnt = 0;
    if (!is_null($journo)) {
        $photo_cnt = db_getOne("SELECT count(*) FROM journo_photo WHERE journo_id=?", $journo['id']);
        $edu_cnt = db_getOne("SELECT count(*) FROM journo_education WHERE journo_id=?", $journo['id']);
        $emp_cnt = db_getOne("SELECT count(*) FROM journo_employment WHERE journo_id=?", $journo['id']);
        $book_cnt = db_getOne("SELECT count(*) FROM journo_books WHERE journo_id=?", $journo['id']);
        $award_cnt = db_getOne("SELECT count(*) FROM journo_awards WHERE journo_id=?", $journo['id']);
        $admired_cnt = db_getOne("SELECT count(*) FROM journo_admired WHERE journo_id=?", $journo['id']);
        $weblink_cnt = db_getOne("SELECT count(*) FROM journo_weblink WHERE kind<>'pingback' AND journo_id=?", $journo['id']);
        // collect contact details from all around
        $sql = <<<EOT
SELECT
    ( SELECT count(*) FROM journo_address WHERE journo_id=? ) +
    ( SELECT count(*) FROM journo_phone WHERE journo_id=? ) +
    ( SELECT count(*) FROM journo_email WHERE approved=true AND journo_id=? ) +
    ( SELECT count(*) FROM journo_weblink WHERE kind='twitter' AND journo_id=? ) +
    ( SELECT count(*) FROM journo_address WHERE journo_id=? );
EOT;
        $contact_cnt = db_getOne($sql, $journo['id'], $journo['id'], $journo['id'], $journo['id'], $journo['id']);
        // combined article count (ugh)
        $sql = <<<EOT
SELECT (
    SELECT COUNT(*)
        FROM (article a INNER JOIN journo_attr attr ON attr.journo_id=a.id)
        WHERE a.status='a' AND attr.journo_id=?
    ) + (
    SELECT COUNT(*)
        FROM journo_other_articles
        WHERE status='a' AND journo_id=?
    )
EOT;
        $article_cnt = db_getOne($sql, $journo['id'], $journo['id']);
    }
    $name_or_email = $P->name_or_blank() ? $P->name : $P->email;
    $title = "Your account";
    page_header($title);
    if (!is_null($journo) && $journo['permission'] == 'edit' && $journo['status'] == 'i') {
        emit_inactive_note($journo);
    }
    ?>
<div class="main account">

<h2>Welcome to journa<i>listed</i>, <?php 
    echo $name_or_email;
    ?>
</h2>
<?php 
    /* show a bunch of things user could/should do now... */
    if (!is_null($journo) && $journo['permission'] == 'claimed') {
        emit_claim_pending($journo);
    }
    if (!is_null($journo) && $journo['permission'] == 'edit') {
        ?>
Your public profile is at:<br/>
<a class="public-profile-location" href="/<?php 
        echo $journo['ref'];
        ?>
"><?php 
        echo OPTION_BASE_URL . '/' . $journo['ref'];
        ?>
</a>
<br/>
<?php 
    }
    ?>
Things you can do now...
<br/>
<?php 
    $n = 0;
    // track the number of items we're displaying
    if (!is_null($journo) && $journo['permission'] == 'edit') {
        if ($article_cnt < OPTION_JL_JOURNO_ACTIVATION_THRESHOLD) {
            emit_add_articles($journo);
            ++$n;
        }
        if ($photo_cnt == 0) {
            emit_add_photo($journo);
            ++$n;
        }
        if ($emp_cnt == 0) {
            emit_add_experience($journo);
            ++$n;
        }
        if ($edu_cnt == 0) {
            emit_add_education($journo);
            ++$n;
        }
        if ($weblink_cnt == 0) {
            emit_add_links($journo);
            ++$n;
        }
        if ($admired_cnt == 0) {
            emit_add_admired($journo);
            ++$n;
        }
        if ($contact_cnt == 0) {
            emit_add_contact_details($journo);
            ++$n;
        }
    }
    if ($alert_cnt == 0 && $n < 6 || $n < 2) {
        emit_add_alerts($alert_cnt);
        ++$n;
    }
    if (!$newsletter && $n < 6 || $n < 2) {
        emit_subscribe_to_newsletter($newsletter);
        ++$n;
    }
    ?>

</div>  <!-- end main -->

<div class="sidebar">
<div class="box">
  <div class="head">
    <h3><?php 
    echo $passwordbox->title();
    ?>
</h3>
  </div>
  <div class="body">
  <?php 
    $passwordbox->emit();
    ?>
  <p>If you need to change your email address, please <?php 
    echo SafeMailto(OPTION_TEAM_EMAIL, "let us know");
    ?>
</p>
  </div>
  <div class="foot"></div>
</div>
</div> <!-- end sidebar -->
<?php 
    page_footer();
}
Example #2
0
</div>
<div class="foot"></div>
</div>  <!-- end main -->

<div class="sidebar">

  <a class="donate" href="http://www.justgiving.com/mediastandardstrust">Donate</a>


  <div class="box">
    <div class="head"><h3>Using journa<i>listed</i> for research</h3></div>
    <div class="body">
      <ul>
        <li>
        Judith Townend used journa<i>listed</i> to examine the media coverage of the phone hacking story. Read her blog post
        <a class="extlink" href="http://inforrm.wordpress.com/2011/04/29/how-the-media-told-the-phone-hacking-story-part-2-%E2%80%93-judith-townend/">here</a>.
        </li>
      </ul>
      <br/>
      <p>Have you used journalisted to do something interesting?
<?php 
echo SafeMailto(OPTION_TEAM_EMAIL . '?subject=Interesting use of journalisted', 'Let us know!');
?>
 </p>
    </div>
    <div class="foot">
  </div>

</div> <!-- end sidebar -->
<?php 
page_footer();
Example #3
0
        Matthew Buck and Michael Cross<br/>
        &copy; All rights reserved
    </p>
  </div>
</div>


<div class="">
  <div class="head">
    <h3>The patron of Tobias Grubbe</h3>
  </div>
  <div class="body">
      <p>
    journa<i>listed</i>.com<br/>
    For more information contact <?php 
echo SafeMailto("*****@*****.**", "the journa<i>listed</i> team");
?>
      <br/>
      +44 20 7727 5252
    </p>
  </div>
</div>


</div> <!-- end contact tab -->
</div> <?php 
/* end main body */
?>
<div class="foot"></div>
</div> <!-- end main -->
function tmpl_already_claimed($journo)
{
    page_header("");
    ?>
<div class="main">
<p>Sorry - someone has already claimed to be <?php 
    echo $journo['prettyname'];
    ?>
...</p>
<p>If you are the <em>real</em> <?php 
    echo $journo['prettyname'];
    ?>
, please <?php 
    echo SafeMailto(OPTION_TEAM_EMAIL, 'let us know');
    ?>
</p>
</div>
<?php 
    page_footer();
}
Example #5
0
</ul>

<p>It is independent, non-commercial and non-partisan, and is intended to make the news media more transparent and accountable on behalf of the public.</p>
<p>Journalisted works by automatically searching UK national newspaper websites, BBC News and Sky News, and picking out journalists' bylines (see full list of news outlets covered). Articles are then indexed by journalist - but you can also search by news outlet and key words.</p>
<p>Because of the way the information is gathered, the site is not comprehensive, and will never do full justice to the output of the journalists we cover, for which we apologise. There will be some mistakes and omissions – but we aim to rectify these as soon as we hear of them.</p>
<p>Journalisted was first launched as a trial in November 2007. The current, upgraded version – which includes new features, such as suggesting similar articles and similar journalists – went live in June 2009.</p>

<p>If you’ve got any suggestions, please 
<?php 
echo SafeMailto($contactemail . '?subject=' . $subject, 'email us');
?>
.</p>

<p>If you’d like to know more, take a look at our <a href="/faq">FAQs</a>, or
<?php 
echo SafeMailto($contactemail . '?subject=' . $subject, 'get in touch');
?>
. </p>



<h3>Credits</h3>

<p>
The site was built by <a class="extlink" href="http://www.scumways.com">Ben Campbell</a>.
<a class="extlink" href="http://mediastandardstrust.blogspot.com">Martin Moore</a> has led the initiative on behalf of the Media Standards Trust.
Gavin Freeguard and Ben Campbell administrate the site.
</p>
<p>The site design is by <a class="extlink" href="http://www.double-sided.com">Double Sided</a>.</p>
<p>Thanks to Gavin Buttimore, Tom Lynn, Ayesha Garrett, Gary Jones, Simon Roe and James Williamson, who have all contributed to development.</p>
<p>Many thanks to <a class="extlink" href="http://www.goatchurch.org.uk">Julian Todd</a> and <a class="extlink" href="http://www.flourish.org">Francis Irving</a>, who generously provided hosting and admin support for a long time.</p>
Example #6
0
<br clear="all" />

</div>  <!-- end content div -->


<div id="footer">
  <div class="nav">
<?php 
gatso_report_html();
$contactemail = OPTION_TEAM_EMAIL;
?>
<ul>
	<li><a href="/about">About</a></li>
	<li><a href="/development">Development</a></li>
	<li><?php 
echo SafeMailto($contactemail, 'Contact');
?>
</li>
	<li><a href="/faq">FAQs</a></li>
	<li><a href="/api">API</a></li>
	<li><a href="/faq/what-is-your-privacy-policy">Privacy</a></li>
</ul>
</div>
&copy; <a href="http://www.mediastandardstrust.org">Media Standards Trust</a> 2007&ndash;<script type="text/javascript">
<!--
var now = (new Date().getFullYear()).toString();
var theYear = now.substring(now.length, 2);
document.writeln(theYear,"");
// -->
</script> <br />