From d97e38d2943932b45be095299852f073de2f707e Mon Sep 17 00:00:00 2001 From: Simone Rota Date: Fri, 1 Dec 2006 13:14:13 +0100 Subject: portdb: update email address, cleaned up unused cruft --- portdb/portdb/index.php | 69 +------------------------------------------------ 1 file changed, 1 insertion(+), 68 deletions(-) diff --git a/portdb/portdb/index.php b/portdb/portdb/index.php index 1d7a30d..6cee69e 100755 --- a/portdb/portdb/index.php +++ b/portdb/portdb/index.php @@ -4,11 +4,9 @@ require('DB.php'); # Written by Simone Rota $dsn = 'sqlite:////home/crux/public_html/local/portdb.db'; -$admin = 'viper@hometux.de'; function sanitize($str) { return $str; - //return ereg_replace("[^[:alnum:]]","",$str); } function nospam($mail) { @@ -45,7 +43,6 @@ function printFooter() { } function printNav() { -# echo '
Sections: Repositories :: Search :: Register :: Duplicates :: DupMeister'; echo '
Sections: Repositories :: Search :: Register :: Duplicates'; } @@ -135,7 +132,7 @@ function showSearch($singlerepo) { function showRegister() { $query = sanitize($_GET['q']); echo "

Register your ports repository

"; - echo "

You can register your personal HttpUp repository sending an email with the following information to viper at hometux dot de:

"; + echo "

You can register your personal HttpUp repository sending an email with the following information to contrib-admin at crux dot nu:

"; echo '
  • Repository Name (e.g. myports)
  • Root URL (e.g. http://mypage.se/ports/)
  • Your name
  • @@ -143,20 +140,6 @@ function showRegister() { echo "

    A CRUX team member will put your repository into our database. Please give us some time to do this. Once it is active it is synced once a day. Please do not submit .httpup files, only the URL for the repository. This means the URL to the repository itself, not portspage or other indexes."; } -#function showSendMail() { -# $name = $_POST['name']; -# $url = $_POST['url']; -# $mail = $_POST['mail']; -# $maint = $_POST['maint']; -# echo "

    Registration results

    "; -# if (sendMail($name, $url, $mail, $maint)) { -# echo "

    Your data was sent to the responsible CRUX member. Thanks for your contribution!

    "; -# } else { -# echo "

    Your mail could not be sent. Please contact a CRUX Team member.

    "; -# } -# -#} - function showDuplicates() { global $db; $sql = "select portname, count(*) as dup from ports @@ -179,50 +162,6 @@ function showDuplicates() { echo ""; } -function showDupMeister() { - global $db; - $sql = "select p1.collection as coll, p1.portname, count(*) as dups from ports as p1 - join ports as p2 on (p1.portname=p2.portname and p1.collection!=p2.collection) - where (p1.collection<>'contrib' and p1.collection<>'opt' and p1.collection<>'core') - group by coll - order by dups desc"; - $res =& $db->Query($sql); - if (DB::isError($res)) die("Query error"); - echo "

    Duplicates by repository

    \n"; - echo ''; - echo ''; - $i=0; - while ($port =& $res->fetchRow()) { - $cl = "row".$i%2; - echo ' - \n" - .'\n"; - $i++; - } - echo "
    Collection# of duplicates
    '.$port['coll']."'.$port['dups']."
    "; -} - -function sendMail($name, $url, $mail, $maint) { - require_once('Mail.php'); - global $admin; - if ($maint == "" || $name == "" || $url == "" || $mail == "") - return false; - $headers = array(); - $headers["From"] = "CRUX Team "; - $headers["Subject"] = "[crux-portdb] New httpup repository $name"; - $msg = "New httpup repository:\n\n"; - $msg .= "Repo Name : $name\n"; - $msg .= "Root URL : $url\n"; - $msg .= "Maintainer : $maint\n"; - $msg .= "Email : $mail\n"; - $msg .= "\nConfig line: \"$name|$maint <$mail>|httpup|$url\",\n\n"; - $msg .= "REMOTE_ADDR: " . $_SERVER["REMOTE_ADDR"] . "\n"; - $msg .= "USER_AGENT : " . $_SERVER["HTTP_USER_AGENT"] . "\n"; - $params["host"] = "localhost"; - $mail_obj = &Mail::factory("smtp", $params); - return $mail_obj->send($admin, $headers, $msg); -} - function getUp() { global $db; $query = sanitize($_GET['q']); @@ -274,15 +213,9 @@ switch ($action) { case "register": showRegister(); break; -# case "send": -# showSendMail(); -# break; case "dups": showDuplicates(); break; -# case "dupm": -# showDupMeister(); -# break; default: showCollections(); } -- cgit v1.2.3