Exemplo n.º 1
0
 $T->set_var('data', '<div align="center">' . $LANG_GUS00['referer'] . '&nbsp;<a href="' . $header_url . 'sort=refererDESC">' . $nav_down . '</a><a href="' . $header_url . 'sort=refererASC">' . $nav_up . '</a></div>');
 $T->parse('CBlock', 'COLUMN', TRUE);
 $T->set_var('rowclass', 'header');
 $T->parse('BBlock', 'ROW', TRUE);
 //process sql results
 for ($i = 0; $i < $nrows; $i++) {
     if (($i + 1) % 2) {
         $T->set_var('rowclass', 'row1');
     } else {
         $T->set_var('rowclass', 'row2');
     }
     $row = DB_fetchArray($rec);
     $T->set_var(array('colclass' => 'col_right', 'data' => '<a href="' . $_CONF['site_url'] . '/gus/page.php?year=' . $year . '&amp;month=' . $month . '&amp;day=' . $day . '&amp;ip=' . $row['ip'] . '&amp;uid=' . $row['uid'] . '">' . $row['views'] . '</a>'));
     $T->parse('CBlock', 'COLUMN', FALSE);
     $T->set_var('colclass', 'col_left');
     $the_data = GUS_template_get_user_data($row['uid'], $row['username']);
     $T->set_var('data', $the_data);
     $T->parse('CBlock', 'COLUMN', TRUE);
     $ip = '';
     //   if ( $row['ip'] != $row['host'] )
     //   	$ip = ' [' . $row['ip'] . ']';
     $T->set_var('data', '<a href="' . $_CONF['site_url'] . '/gus/ip.php?year=' . $year . '&amp;month=' . $month . '&amp;day=' . $day . '&amp;ip_addr=' . $row['ip'] . '&amp;uid=' . $row['uid'] . '">' . $row['host'] . '</a>' . $ip);
     $T->parse('CBlock', 'COLUMN', TRUE);
     $T->set_var('data', $row['date_formatted']);
     $T->parse('CBlock', 'COLUMN', TRUE);
     $the_data = GUS_template_get_referrer_data($row['referer'], TRUE);
     $T->set_var('data', $the_data);
     $T->parse('CBlock', 'COLUMN', TRUE);
     $T->parse('BBlock', 'ROW', TRUE);
 }
 $T->parse('ABlock', 'TABLE', TRUE);
Exemplo n.º 2
0
 $sql = "SELECT s1.title, c1.uid, c1.title, c1.sid, c1.date\n\t\tFROM {$_TABLES['stories']} AS s1, {$_TABLES['comments']} AS c1\n\t\tWHERE s1.sid = c1.sid AND {$date_compare}";
 $rec = DB_query($sql);
 $nrows = DB_numRows($rec);
 for ($i = 0; $i < $nrows; $i++) {
     if (($i + 1) % 2) {
         $T->set_var('rowclass', 'row1');
     } else {
         $T->set_var('rowclass', 'row2');
     }
     $A = DB_fetchArray($rec);
     $T->set_var('data', '<a href="' . $_CONF['site_url'] . '/article.php?story=' . $A[3] . '">' . $A[0] . "</a>");
     $T->parse('CBlock', 'COLUMN', FALSE);
     $T->set_var('data', $A[2]);
     $T->parse('CBlock', 'COLUMN', TRUE);
     $username = DB_getItem($_TABLES['users'], 'username', "uid='" . $A[1] . "'");
     $the_data = GUS_template_get_user_data($A[1], $username);
     $T->set_var('data', $the_data);
     $T->parse('CBlock', 'COLUMN', TRUE);
     $da = COM_getUserDateTimeFormat($A[4]);
     $T->set_var('data', $da[0]);
     $T->parse('CBlock', 'COLUMN', TRUE);
     $T->parse('BBlock', 'ROW', TRUE);
 }
 $T->parse('ABlock', 'TABLE', TRUE);
 if ($day != '') {
     $title = date('l, j F, Y - ', mktime(0, 0, 0, $month, $day, $year)) . $LANG_GUS00['new_comments'];
 } else {
     $title = date('F Y - ', mktime(0, 0, 0, $month, 1, $year)) . $LANG_GUS00['new_comments'];
 }
 $display = GUS_template_finish($T, $title);
 if ($_GUS_cache and $today !== $day . $month . $year) {