print "<h3>Transaction graph (latest 50 only)</h3>"; print "<p style='text-align:center;'>\n"; #print "<a href='graph/user-web?id={$user->name}' style='background:none;'>"; #print "<img src='graph/user-web?id={$user->name}' style='border: none; max-width: 100%;' />\n"; print <<<EOF <object data="graph/user-web?id={$user->name}" type="image/svgz+xml" style="max-width: 100%;" > <embed src="graph/user-web?id={$user->name}" type="image/svgz+xml" \t\tstyle="max-width: 100%;" /> </object> EOF; print "</a>\n"; print "</p>"; print "<h3>Transaction history (latest 50 only)</h3>"; $tpl = new Template('templates/transaction-user.php'); $tpl->bind("USERNAME", $user->name); $tpl->publish(); } else { if ($user->error) { print "<p class='error'>ERROR: {$user->error}</p>"; } $usercount = 0; $query = "SELECT count(*) as ct FROM tb_user "; $result = $dbh->query($query); if ($result) { $row = $result->fetch(); $usercount = $row['ct']; } print "<h3>{$usercount} participating users</h3>"; $query = "SELECT id, registered FROM tb_user ORDER BY id ASC "; $result = $dbh->query($query);
<?php //require_once("lib/Currency.class.php"); require_once "common/config.php"; require_once "common/db.php"; require_once 'common/Template.class.php'; $tpl = new Template('templates/header.php'); $tpl->bind('CURRENCY', $config['currency']); $tpl->publish(); require_once "common/Twitbank.class.php"; $tb = new Twitbank(); // get latest transaction id about currency $latest_twit_id = $tb->getCurrentTwitId(); $latest_twit_id_old = $latest_twit_id; if ($latest_twit_id > 0) { $api_url = sprintf("http://search.twitter.com/search.atom?since_id=%s&q=%s", $latest_twit_id, $config["currency"]); } else { $api_url = sprintf("http://search.twitter.com/search.atom?q=%s", $config["currency"]); } print "<p><b>Loading newer entries than {$latest_twit_id} from Twitter...</b></p>"; function getNextPage($xpath) { $nextpages = $xpath->query("/ns:feed/ns:link[@rel='next']"); if (!is_null($nextpages)) { $obj = $nextpages->item(0); if (!is_null($obj)) { return $obj->getAttribute("href"); } else { return null; } } else {
<?php require 'common/Template.class.php'; $tpl = new Template('templates/header.php'); $tpl->bind('CURRENCY', ''); $tpl->publish(); /* test directory / file permissions */ print "<p>"; print "Testing 'cache' directory permissions... "; if (is_writable("cache")) { print "<span class='msg_ok'>ok</span>"; } else { print "<span class='msg_error'>error: directory should be writable!</span>"; } print "<br />"; print "Testing '.' directory permissions... "; if (is_writable(".")) { print "<span class='msg_ok'>ok</span>"; } else { print "<span class='msg_error'>error: directory should be writable!</span>"; } print "<br/>"; $tpl = new Template('templates/footer.php'); $tpl->publish();