<%
include_once( "../modules/utils.inc.php" );
include_once( "../modules/header.insecure.inc.php" );
session_register("cache");
$tok = $_COOKIE["c_pass_token"];
$u = $_COOKIE["c_uid"];
$user = $user ? $user : "pheezy";
if( $tok && $tok == md5( getPasswdForUser( $u ))) {
%>
<link rel="stylesheet" type="text/css" href="/new-portal.css" title="default stylings">
<pre>
<%
if( ! $cache )
$cache = rebuild_cache( $u, $cache, 1 );
echo "mailtos: ";
print_r( get_previous_mailtos( $cache ));
echo "contacts: ";
print_r( get_contacts( $cache ));
echo "\n";
#echo "\ncache: ";
#print_r( $cache );
%>
TODO: <!--
DONE: get_contacts() and get_previous_mailtos() should check for their data in the session cache
DONE: work on get_old_thing( $u, $cache ), which will be the model for these two, is begun but not done.
(these <s>will</s> NOW read only from the session cache.)
need dirty flag management between
inList( $item, $type, $cache ) <i>and</i>
<s>get_cachelist( $argType, $argCacheFile, $cache )</s>
-->
one thing to do is, never rebuild cache unless the dirty flag is true
another is: rebuild the disk cachefile whenever we add or remove a peep, or add a mailto
</pre>
<%
$users = get_contacts( $cache );
%>
<%= get_contactlist_html( $users, "your peeps", $cache ) %>
<%
} # end auth
%>