示例#1
0
            $back_link_message = $fav_back[$lang];
            $back_link = "favorites.php";
        }
        print '<tr>';
        print '<td colspan="2" class="message"><a href="' . $back_link . '">' . $back_link_message . '</a></td>';
        print '<td></td></tr>' . "\n";
    }
    if ($resource_id) {
        $res_display = get_resource_name($resource_id, $xmpp_host);
        print '<tr><td colspan="4"><div style="background-color: #fad163; text-align: center; font-weight: bold;">' . $resource_warn[$lang] . cut_nick(htmlspecialchars($res_display)) . '. ';
        print $resource_discard[$lang] . '<a class="export" href="?a=' . $e_string . '">' . $resource_discard2[$lang] . '</a>';
        print '</div></td></tr>';
    }
    print '<tr class="header">' . "\n";
    print '<td><b> ' . $time_t[$lang] . ' </b></td><td><b> ' . $user_t[$lang] . ' </b></td><td><b> ' . $thread[$lang] . '</b></td>' . "\n";
    $server_id = get_server_id($server_name, $xmpp_host);
    $loc_link = $e_string;
    $action_link = "{$tslice}@{$talker}@{$server_id}@0@null@{$loc_link}@del@";
    $action_link = encode_url($action_link, $token, $url_key);
    print '<td align="right" style="padding-right: 5px; font-weight: normal;">';
    print '
		<form style="margin-bottom: 0;" id="fav_form" action="req_process.php" method="post">
		<input type="hidden" name="a" value="' . $_GET[a] . '" />
		<input type="hidden" name="req" value="1">
		<input class="fav" type="submit" value="' . $fav_add[$lang] . '" />
		</form>';
    print '<a id="pretty" title="' . $tip_export[$lang] . '" class="menu_chat" href="export.php?a=' . $e_string . '">' . $export_link[$lang] . '</a>&nbsp; | &nbsp;';
    print $all_for_u[$lang];
    print '<a id="pretty" title="' . $all_for_u_m2_d[$lang] . '" class="menu_chat" href="chat_map.php?chat_map=' . $predefined . '"><u>' . $all_for_u_m2[$lang] . '</u></a>';
    print '&nbsp;<small>|</small>&nbsp;';
    print '<a id="pretty" title="' . $all_for_u_m_d[$lang] . '" class="menu_chat" href="search_v2.php?b=' . $predefined_s . '"><u>' . $all_for_u_m[$lang] . '</u></a>';
示例#2
0
    if ($con_map == $jid) {
        $selected = "selected";
    } else {
        $selected = "";
    }
    print '<option ' . $selected . ' value=\'' . encode_url($jid, $token, $url_key) . '\'>' . htmlspecialchars($name) . ' (' . htmlspecialchars($grp) . ')</option>' . "\n";
}
print '</select>';
print '</form>' . "\n";
if ($con_map and $_POST['chat_map'] != "null") {
    print "<h2>" . $cal_head[$lang] . ":</h2>";
    // split username and server name
    list($name_peer, $server_peer) = split("@", $con_map);
    // get the id's of user and server
    $name_peer = get_user_id(mysql_escape_string($name_peer), $xmpp_host);
    $server_peer = get_server_id(mysql_escape_string($server_peer), $xmpp_host);
    //validate, always should be integers
    if (!ctype_digit($name_peer) or !ctype_digit($server_peer)) {
        unset($con_map);
        unset($name_peer);
        unset($server_peer);
    }
    //begin
    //first get the months
    $get_months = "select substring(at,1,7) as at from `logdb_stats_{$xmpp_host}` where owner_id='{$user_id}' and peer_name_id='{$name_peer}' and peer_server_id='{$server_peer}' group by substring(at,1,7) order by str_to_date(at,'%Y-%m-%d') asc";
    $result_m = mysql_query($get_months);
    $cc_cmp = mysql_num_rows($result_m);
    while ($row_m = mysql_fetch_array($result_m)) {
        // hack for proper date parsing
        list($y, $m) = split("-", $row_m[at]);
        $mo = "{$y}-{$m}";