} $where = "WHERE status='A'"; if (isset($id)) { $where .= " AND appid='{$id}'"; } // Check application $db->query("SELECT * FROM software {$where}"); // echo"<p>SELECT * FROM software $where\n"; $i = 0; while ($db->next_record()) { $db_appid = $db->f("appid"); $db2 = new DB_SourceWell(); $db2->query("SELECT * FROM history WHERE appid='{$db_appid}' ORDER BY creation_his DESC"); $db2_exists = $db2->next_record(); $db_modification = $db->f("modification"); $db2_creation_his = $db2->f("creation_his"); if ($db_modification != $db2_creation_his) { $timestamp = mktimestamp($db_modification); $title = "<b><a href=\"" . htmlentities($sess->url("appbyid.php") . $sess->add_query(array("id" => $db->f(appid)))) . "\">" . $db->f(name) . "</a> (" . $db->f(appid) . ")</b>"; $bx->box_begin(); $bx->box_title($title); $body = "Modification date: " . timestr($timestamp) . "\n"; $timestamp = mktimestamp($db2_creation_his); $body .= "<br>History date: " . timestr($timestamp) . "\n"; $bx->box_body($body); switch ($action) { case "check": if ($db2_exists) { $action2 = "update"; } else { $action2 = "insert";
require "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>" . $config_sys_name . "</title>\n"; echo " <link>" . $config_sys_url . "</link>\n"; echo " <description>" . $config_sys_name . " - " . $config_sys_title . "</description>\n"; echo " <language>en-us</language>\n"; echo " <image>\n"; echo " <title>" . $config_sys_name . "</title>\n"; echo " <url>" . $config_sys_url . $config_sys_logo_image . "</url>\n"; echo " <link>" . $config_sys_url . "</link>\n"; echo " <description>" . $config_sys_name . " - " . $config_sys_title . "</description>\n"; echo " <width>66</width>\n"; echo " <height>73</height>\n"; echo " </image>\n"; $db = new DB_SourceWell(); $db->query("SELECT * FROM software,counter,auth_user WHERE software.appid=counter.appid AND software.user=auth_user.username AND software.status='A' ORDER BY software.modification DESC limit 10"); $i = 0; while ($db->next_record()) { echo " <item>\n"; echo " <title>" . $db->f("name") . " " . $db->f("version") . "</title>\n"; echo " <link>" . $config_sys_url . "app.php?id=" . $db->f("id") . "</link>\n"; echo " <description>" . $db->f("description") . "</description>\n"; echo " </item>\n"; $i++; } echo " </channel>\n"; echo "</rss>\n";
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>http:" . $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>http:" . $sys_logo_small_image . "</url>\n"; echo " <link>http:" . $sys_url . "</link>\n"; echo " <description>" . $sys_name . " - " . $sys_title . "</description>\n"; echo " <width>124</width>\n"; echo " <height>32</height>\n"; echo " </image>\n"; $db = new DB_SourceWell(); $db->query("SELECT * FROM software,counter,auth_user WHERE software.appid=counter.appid AND software.user=auth_user.username AND software.status='A' ORDER BY software.modification DESC limit 10"); $i = 0; while ($db->next_record()) { echo " <item>\n"; echo " <title>" . htmlspecialchars($db->f("name")) . " " . $db->f("version") . "</title>\n"; echo " <link>http:" . $sys_url . "appbyid.php?id=" . $db->f("appid") . "</link>\n"; // echo " <description>".wrap($db->f("description"))."</description>\n"; echo " <guid>http:" . $sys_url . "appbyid.php?id=" . $db->f("appid") . "</guid>\n"; echo " </item>\n"; $i++; } echo " </channel>\n"; echo "</rss>\n";
$db->query("SELECT DISTINCT developer,email FROM software WHERE developer LIKE '{$by}' ORDER BY developer ASC LIMIT {$limit}"); $bx->box_begin(); $bx->box_title($t->translate("Authors")); $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># " . $t->translate("Apps") . "</b></td><td><b>" . $t->translate("Names") . "</b></td><td><b>" . $t->translate("E-Mail") . "</b></td></tr>\n"; $i = 1; while ($db->next_record()) { $developer = addslashes($db->f("developer")); $email = $db->f("email"); $db2 = new DB_SourceWell(); $db2->query("SELECT COUNT(*) FROM software WHERE developer='{$developer}' AND email='{$email}' AND status='A'"); $db2->next_record(); if ($db2->f("COUNT(*)")) { $num = "[" . sprintf("%03d", $db2->f("COUNT(*)")) . "]"; echo "<tr><td>" . sprintf("%d", $i) . "</td>\n"; if (empty($developer)) { echo "<td><a href=\"" . htmlentities($sess->url("appbydev.php") . $sess->add_query(array("developer" => "", "email" => "{$email}"))) . "\">{$num}</a></td>\n"; echo "<td>" . $t->translate("Unknown") . "</td>\n"; } else { echo "<td><a href=\"" . htmlentities($sess->url("appbydev.php") . $sess->add_query(array("developer" => $db->f("developer"), "email" => "{$email}"))) . "\">{$num}</a></td>\n"; echo "<td>" . $db->f("developer") . "</td>\n"; } if (!empty($email)) { echo "<td><<a href=\"mailto:" . mailtoencode($email) . "\">" . ereg_replace("\\.", " dot ", ereg_replace("@", " at ", htmlentities($email))) . "</a>></td>\n"; } else { echo "<td> </td>\n"; } echo "</tr>\n";
</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> <?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 Apps") . "</font>"); $db->query("SELECT * FROM software,counter,auth_user WHERE software.appid=counter.appid AND software.user=auth_user.username AND software.status='A' ORDER BY software.modification DESC limit 20"); $i = 0; $bx->box_body_begin(); while ($db->next_record()) { echo "<div class=newsind>• "; echo "<a href=\"" . $sys_url . "appbyid.php?id=" . $db->f("appid") . "\" target=\"_content\">" . $db->f("name") . "</a> " . $db->f("version") . "</div>\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();
# 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" => "SourceWell_Session")); if (isset($auth) && !empty($auth->auth["perm"])) { page_close(); page_open(array("sess" => "SourceWell_Session", "auth" => "SourceWell_Auth", "perm" => "SourceWell_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_SourceWell(); $db->query("SELECT * FROM software,counter,auth_user WHERE software.appid=counter.appid AND software.user=auth_user.username AND software.status='A' ORDER BY software.modification DESC limit 10"); $i = 0; while ($db->next_record()) { echo $db->f("name") . " " . $db->f("version") . "\n"; $timestamp = mktimestamp($db->f("modification")); echo timestr($timestamp) . "\n"; echo $sys_url . "appbyid.php?id=" . $db->f("appid") . "\n"; $i++; } @page_close();
// Licenses by Email from Developer case "email_license": stats_title($t->translate("Applications listed by Licenses and Developer's Email Domain")); $url = "0"; // No URL in function stats_display $urlquery = "0"; // No URL query in function stats_display $db->query("SELECT license FROM licenses"); while ($db->next_record()) { // We need a second database connection $db2 = new DB_SourceWell(); // Total number of apps with that License $license = $db->f("license"); $db2->query("SELECT COUNT(*) FROM software WHERE license='{$license}'"); $db2->next_record(); $total = $db2->f("COUNT(*)"); if ($total > $Minimum_apps_in_license) { stats_subtitle($db->f("license")); for ($i = 1; $i < sizeof($domain_country); $i++) { $like = "%." . $domain_country[$i][0]; $db2->query("SELECT COUNT(*) FROM software WHERE license='{$license}' AND email LIKE '{$like}'"); $db2->next_record(); $num = $db2->f("COUNT(*)"); if (100 * $num / $total > $MinimumLicByEmail) { stats_display($domain_country[$i][1], $num, $url, $urlquery, $total); } } } } stats_end(); break;
echo " <language>en-us</language>\n"; echo " <copyright>Copyright 2000-" . date("Y") . " {$org_name}</copyright>\n"; echo " <webMaster>" . $_SERVER['SERVER_ADMIN'] . "</webMaster>\n"; echo " <lastBuildDate>" . gmdate('r', time()) . "</lastBuildDate>\n"; echo " <docs>http://blogs.law.harvard.edu/tech/rss</docs>\n"; echo " <generator>BerliOS RSS generator</generator>\n"; echo " <image>\n"; echo " <title>" . $sys_name . "</title>\n"; echo " <url>http:" . $sys_logo_small_image . "</url>\n"; echo " <link>http:" . $sys_url . "</link>\n"; echo " <description>" . $sys_name . " - " . $sys_title . "</description>\n"; echo " <width>124</width>\n"; echo " <height>32</height>\n"; echo " </image>\n"; $db = new DB_SourceWell(); $db->query("SELECT * FROM software,counter,auth_user WHERE software.appid=counter.appid AND software.user=auth_user.username AND software.status='A' ORDER BY software.modification DESC limit 10"); $i = 0; while ($db->next_record()) { echo " <item>\n"; echo " <title>" . htmlspecialchars($db->f("name")) . " " . $db->f("version") . "</title>\n"; echo " <link>http:" . $sys_url . "appbyid.php?id=" . $db->f("appid") . "</link>\n"; echo " <description>" . wrap(htmlspecialchars($db->f("description"))) . "</description>\n"; // echo " <author>".$db->f('email_usr')." (".htmlspecialchars($db->f('username')).")</author>\n"; echo " <pubDate>" . gmdate('r', mktimestamp($db->f("modification"))) . "</pubDate>\n"; echo " <guid>http:" . $sys_url . "appbyid.php?id=" . $db->f("appid") . "</guid>\n"; // echo " <comments>http:".$sys_url."appbyid.php?id=".$db->f("appid")."</comments>\n"; echo " </item>\n"; $i++; } echo " </channel>\n"; echo "</rss>\n";