require "./include/config.inc";
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>" . htmlspecialchars($sys_name) . " - News</title>\n";
echo "    <link>http:" . $sys_url . "</link>\n";
echo "    <description>" . htmlspecialchars($sys_name . " - " . $sys_title) . "</description>\n";
echo "    <language>en-us</language>\n";
echo "  <image>\n";
echo "    <title>" . htmlspecialchars($sys_name) . "</title>\n";
echo "    <url>http:" . $sys_url . $sys_logo_small_image . "</url>\n";
echo "    <link>http:" . $sys_url . "</link>\n";
echo "    <description>" . htmlspecialchars($sys_name . " - " . $sys_title) . "</description>\n";
echo "    <width>66</width>\n";
echo "    <height>73</height>\n";
echo "  </image>\n";
$db = new DB_SourceBiz();
$db->query("SELECT * FROM news WHERE news.status_new='A' ORDER BY news.modification_new DESC limit 5");
$i = 0;
while ($db->next_record()) {
    echo "  <item>\n";
    echo "    <title>" . htmlspecialchars($db->f("subject_new")) . "</title>\n";
    echo "    <link>http:" . $sys_url . "newbynewid.php?id=" . $db->f("newid") . "</link>\n";
    echo "  </item>\n";
    $i++;
}
echo "  </channel>\n";
echo "</rss>\n";
Esempio n. 2
0
echo "    <url>http:" . $sys_url . $sys_logo_small_image . "</url>\n";
echo "    <link>http:" . $sys_url . "</link>\n";
echo "    <description>" . htmlspecialchars($sys_name . " - " . $sys_title) . "</description>\n";
echo "    <width>66</width>\n";
echo "    <height>73</height>\n";
echo "  </image>\n";
echo "  <item>\n";
echo "    <title><b>News:</b></title>\n";
echo "    <link>http:" . $sys_url . "news.php</link>\n";
echo "  </item>\n";
$db = new DB_SourceBiz();
$db->query("SELECT * FROM news WHERE news.status_new='A' ORDER BY news.modification_new DESC limit 5");
$i = 0;
while ($db->next_record()) {
    echo "  <item>\n";
    echo "    <title>" . htmlspecialchars($db->f("subject_new")) . "</title>\n";
    echo "    <link>http:" . $sys_url . "newbynewid.php?id=" . $db->f("newid") . "</link>\n";
    echo "  </item>\n";
    $i++;
}
$blklen = 5;
$time = floor(time() / 5);
$db->query("SELECT COUNT(*) as cnt FROM enterprise WHERE enterprise.status='A'");
$db->next_record();
$entcnt = $db->f("cnt");
$blkcnt = floor($entcnt / $blklen);
if ($entcnt % $blklen > 0) {
    $blkcnt += 1;
}
$offset = $time % $blkcnt;
if ($offset == 0) {
Esempio n. 3
0
# 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.
#
# $Id: recentnews.php,v 1.2 2003/02/25 11:45:44 helix Exp $
#
######################################################################
require "./include/prepend.php3";
page_open(array("sess" => "SourceBiz_Session"));
if (isset($auth) && !empty($auth->auth["perm"])) {
    page_close();
    page_open(array("sess" => "SourceBiz_Session", "auth" => "SourceBiz_Auth", "perm" => "SourceBiz_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_SourceBiz();
$db->query("SELECT * FROM news WHERE news.status_new='A' ORDER BY news.modification_new DESC limit 10");
$i = 0;
while ($db->next_record()) {
    echo $db->f("subject_new") . "\n";
    $timestamp = mktimestamp($db->f("modification_new"));
    echo timestr($timestamp) . "\n";
    echo $sys_url . "newbynewid.php?id=" . $db->f("newid") . "\n";
    $i++;
}
@page_close();
Esempio n. 4
0
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_SourceBiz();
$db->query("SELECT * FROM news WHERE news.status_new='A' ORDER BY news.modification_new DESC limit 5");
$i = 0;
while ($db->next_record()) {
    echo "  <item>\n";
    echo "    <title>" . $db->f("subject_new") . " (News)</title>\n";
    echo "    <link>" . $sys_url . "newbynewid.php?id=" . $db->f("newid") . "</link>\n";
    echo "  </item>\n";
    $i++;
}
$blklen = 5;
$time = floor(time() / 3600);
$db->query("SELECT COUNT(*) as cnt FROM enterprise WHERE enterprise.status='A'");
$db->next_record();
$entcnt = $db->f("cnt");
$blkcnt = floor($entcnt / $blklen);
if ($entcnt % $blklen > 0) {
    $blkcnt += 1;
}
$offset = $time % $blkcnt;
if ($offset == 0) {
Esempio n. 5
0
    $bx->box_title($t->translate("Users") . ": " . $bystr);
    $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("Ent") . "</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 = "enterprise";
        $where = "user=\"" . $db->f("username") . "\" AND status=\"A\"";
        $num = "";
        $dbn = new DB_SourceBiz();
        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("enterprises.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:" . mailtoencode($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 -->
echo "    <description>" . htmlspecialchars($sys_name . " - " . $sys_title) . "</description>\n";
echo "    <language>en-us</language>\n";
echo "  <image>\n";
echo "    <title>" . htmlspecialchars($sys_name) . "</title>\n";
echo "    <url>http:" . $sys_url . $sys_logo_small_image . "</url>\n";
echo "    <link>http:" . $sys_url . "</link>\n";
echo "    <description>" . htmlspecialchars($sys_name . " - " . $sys_title) . "</description>\n";
echo "    <width>66</width>\n";
echo "    <height>73</height>\n";
echo "  </image>\n";
$db = new DB_SourceBiz();
$blklen = 5;
$time = floor(time() / 5);
$db->query("SELECT COUNT(*) as cnt FROM enterprise WHERE enterprise.status='A'");
$db->next_record();
$entcnt = $db->f("cnt");
$blkcnt = floor($entcnt / $blklen);
if ($entcnt % $blklen > 0) {
    $blkcnt += 1;
}
$offset = $time % $blkcnt;
if ($offset == 0) {
    $offset = $blkcnt;
}
$offset = $offset * $blklen - $blklen;
if ($offset + $blklen >= $entcnt) {
    $offset = $entcnt - $blklen;
}
$db->query("SELECT * FROM enterprise WHERE enterprise.status='A' LIMIT {$offset},{$blklen}");
$i = 0;
while ($db->next_record()) {
Esempio n. 7
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";
Esempio n. 8
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");
    ?>
Esempio n. 9
0
<p>&nbsp;
<?php 
// Recent news
$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("News") . "</font>");
$db->query("SELECT * FROM news WHERE news.status_new='A' ORDER BY news.modification_new DESC limit 10");
$bx->box_body_begin();
while ($db->next_record()) {
    echo "<div class=newsind>&#149;&nbsp;";
    echo "<a href=\"" . $sys_url . "newbynewid.php?id=" . $db->f("newid") . "\" target=\"_content\">" . $db->f("subject_new") . "</a></div>\n";
}
$bx->box_body_end();
$bx->box_end();
// Enterprises
$bx->box_begin();
$bx->box_title("<font size=\"1\">" . $t->translate("Enterprises") . "</font>");
$num = 10;
$time = floor(time() / 60);
$db->query("SELECT COUNT(*) as cnt FROM enterprise WHERE enterprise.status='A'");
$db->next_record();
$entcnt = $db->f("cnt");
$blkcnt = floor($entcnt / $num);
if ($entcnt % $num > 0) {
    $blkcnt += 1;
}