Exemplo n.º 1
0
require "./include/lib.inc";
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n";
echo "<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"\n";
echo "           \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n";
echo "<rss version=\"0.91\">\n";
echo "  <channel>\n";
echo "    <title>" . $sys_name . "</title>\n";
echo "    <link>" . $sys_url . "</link>\n";
echo "    <description>" . $sys_name . " - " . $sys_title . "</description>\n";
echo "    <language>en-us</language>\n";
echo "  <image>\n";
echo "    <title>" . $sys_name . "</title>\n";
echo "    <url>" . $sys_url . $sys_logo_image . "</url>\n";
echo "    <link>" . $sys_url . "</link>\n";
echo "    <description>" . $sys_name . " - " . $sys_title . "</description>\n";
echo "    <width>66</width>\n";
echo "    <height>73</height>\n";
echo "  </image>\n";
$db = new DB_SourceContact();
$db->query("SELECT * FROM contact WHERE contact.status='A' ORDER BY contact.modification DESC limit 10");
$i = 0;
while ($db->next_record()) {
    echo "  <item>\n";
    echo "    <title>" . $db->f("name") . "</title>\n";
    echo "    <link>" . $sys_url . "conbyconid.php?id=" . $db->f("conid") . "</link>\n";
    echo "    <description>" . wrap($db->f("category")) . "</description>\n";
    echo "  </item>\n";
    $i++;
}
echo "  </channel>\n";
echo "</rss>\n";
Exemplo n.º 2
0
# This is the text backend of the system
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or later of the GPL.
######################################################################
require "./include/prepend.php3";
page_open(array("sess" => "SourceContact_Session"));
if (isset($auth) && !empty($auth->auth["perm"])) {
    page_close();
    page_open(array("sess" => "SourceContact_Session", "auth" => "SourceContact_Auth", "perm" => "SourceContact_Perm"));
}
header("Content-Type: text/plain");
// Disabling cache
header("Cache-Control: no-cache, must-revalidate");
// HTTP/1.1
header("Pragma: no-cache");
// HTTP/1.0
require "./include/config.inc";
require "./include/lib.inc";
$db = new DB_SourceContact();
$db->query("SELECT * FROM contact WHERE contact.status='A' ORDER BY contact.modification DESC limit 10");
$i = 0;
while ($db->next_record()) {
    echo $db->f("name") . "\n";
    $timestamp = mktimestamp($db->f("modification"));
    echo timestr($timestamp) . "\n";
    echo $sys_url . "conbyconid.php?id=" . $db->f("conid") . "\n";
    $i++;
}
@page_close();
Exemplo n.º 3
0
echo $t->translate($sys_title);
?>
</title>
<link rel="stylesheet" type="text/css" href="style.php">
</head>
<body bgcolor="<?php 
echo $th_body_bgcolor;
?>
" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">

<!-- content -->
<p>&nbsp;
<?php 
$bx->box_begin();
$bx->box_body_begin();
echo "<a href=\"{$sys_url_title}\" target=\"_content\"><img src=\"{$sys_logo_small_image}\" border=\"0\" height=\"{$sys_logo_small_heigth}\" width=\"{$sys_logo_small_width}\" ALT=\"{$sys_logo_small_alt}\"></a>";
$bx->box_body_end();
$bx->box_end();
$bx->box_begin();
$bx->box_title("<font size=\"1\">" . $t->translate("Recent Contacts") . "</font>");
$db->query("SELECT * FROM contact WHERE contact.status='A' ORDER BY contact.modification DESC limit 20");
$i = 0;
$bx->box_body_begin();
while ($db->next_record()) {
    echo "<li><font size=\"1\"><a href=\"" . $sys_url . "conbyconid.php?id=" . $db->f("conid") . "\" target=\"_content\">" . $db->f("name") . "</a> (" . $db->f("category") . ")</font></li>\n";
    $i++;
}
echo "<p><b><font size=\"1\"><a href=\"" . $sys_url . "\" target=\"_content\">more...</a></font></b>\n";
$bx->box_body_end();
$bx->box_end();
@page_close();
Exemplo n.º 4
0
    $bx->box_title($t->translate("Users"));
    $bx->box_body_begin();
    ?>
<table border=0 align=center cellspacing=1 cellpadding=1 width=100%>
<?php 
    echo "<tr><td><b>" . $t->translate("No") . ".</b></td><td><b>#&nbsp;" . $t->translate("Con") . "</b></td><td><b>" . $t->translate("Username") . "</b></td><td><b>" . $t->translate("Realname") . "</b></td><td><b>" . $t->translate("E-Mail") . "</b></td></tr>\n";
    $i = 1;
    while ($db->next_record()) {
        $columns = "COUNT(*)";
        $tables = "contact";
        $where = "user=\"" . $db->f("username") . "\" AND status=\"A\"";
        $num = "";
        $dbn = new DB_SourceContact();
        if ($dbn->query("SELECT {$columns} AS cnt FROM {$tables} WHERE {$where}")) {
            $dbn->next_record();
            $num = "[" . sprintf("%03d", $dbn->f("cnt")) . "]";
        }
        echo "<tr><td>" . sprintf("%d", $i) . "</td>\n";
        echo "<td><a href=\"" . $sess->url("index.php") . $sess->add_query(array("by" => "filter", "author" => $db->f("username"))) . "\">{$num}</a></td>\n";
        echo "<td>" . $db->f("username") . "</td>\n";
        echo "<td>" . $db->f("realname") . "</td>";
        echo "<td>&lt;<a href=\"mailto:" . $db->f("email_usr") . "\">" . ereg_replace("@", " at ", htmlentities($db->f("email_usr"))) . "</a>&gt;</td>";
        echo "</tr>\n";
        $i++;
    }
    echo "</table>\n";
}
$bx->box_body_end();
$bx->box_end();
?>
<!-- end content -->
Exemplo n.º 5
0
        // Classifications
        case "classifications":
            stats_title($t->translate("Contacts listed by Classifications"));
            $db->query("SELECT DISTINCT type, COUNT(*) AS cnt FROM categories GROUP BY type");
            while ($db->next_record()) {
                $type = $db->f("type");
                if ($db->f("cnt") > 0 && $type != "Contact") {
                    stats_subtitle($t->translate("Contact Category") . " " . $type);
                    $dbtot = new DB_SourceContact();
                    $dbtot->query("SELECT COUNT(*) FROM contact WHERE category='{$type}'");
                    $dbtot->next_record();
                    $total_number_cat = $dbtot->f("COUNT(*)");
                    $db2 = new DB_SourceContact();
                    $db2->query("SELECT class, COUNT(*) AS cnt2 FROM classifications WHERE type='{$type}' GROUP BY class");
                    while ($db2->next_record()) {
                        $cnt2 = $db2->f("cnt2");
                        if ($cnt2 > 0) {
                            $url = "index.php";
                            $urlquery = array("by" => "filter", "class" => $db2->f("class"));
                            stats_display($db2->f("class"), $cnt2, $url, $urlquery, $total_number_cat);
                        }
                    }
                }
            }
            stats_end();
            break;
    }
}
?>
<!-- end content -->
Exemplo n.º 6
0
        ?>
"></td>
  <td><input type="text" name="password" size=12 maxlength=32 value="<?php 
        $db->p("password");
        ?>
"></td>
  <td><input type="text" name="realname" size=12 maxlength=64 value="<?php 
        $db->p("realname");
        ?>
"></td>
  <td><input type="text" name="email_usr" size=12 maxlength=32 value="<?php 
        $db->p("email_usr");
        ?>
"></td>
<?php 
        $time = mktimestamp($db->f("modification_usr"));
        echo "  <td>" . timestr($time) . "</td>\n";
        $time = mktimestamp($db->f("creation_usr"));
        echo "  <td>" . timestr($time) . "</td>\n";
        ?>
  <td><?php 
        print $perm->perm_sel("perms", $db->f("perms"));
        ?>
</td>
  <td align=right>
   <input type="hidden" name="u_id" value="<?php 
        echo $db->p("user_id");
        ?>
">
<?php 
        echo "   <input type=\"submit\" name=\"u_kill\" value=\"" . $t->translate("Delete") . "\">\n";
Exemplo n.º 7
0
    ?>
:</td><td><input type="text" name="realname" size=20 maxlength=64 value="<?php 
    $db->p("realname");
    ?>
"></td></tr>
<tr>
<td align=right><?php 
    echo $t->translate("E-Mail");
    ?>
:</td><td><input type="text" name="email_usr" size=20 maxlength=128 value="<?php 
    $db->p("email_usr");
    ?>
"></td></tr>
<tr>
<?php 
    $time = mktimestamp($db->f("modification_usr"));
    ?>
<td align=right><?php 
    echo $t->translate("Modification");
    ?>
:</td><td><?php 
    echo timestr($time);
    ?>
</td></tr>
<tr>
<?php 
    $time = mktimestamp($db->f("creation_usr"));
    ?>
<td align=right><?php 
    echo $t->translate("Creation");
    ?>