Ignore:
Timestamp:
10/04/13 16:47:32 (11 years ago)
Author:
Kris Deugau
Message:

/branches/stable

File off the last few rough edges (make sure webpath is used everywhere

appropriate)

Update copyright dates
Bump the version for release

Location:
branches/stable/cgi-bin
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/IPDB.pm

    r600 r601  
    77# Last update by $Author$
    88###
    9 # Copyright (C) 2004-2010 - Kris Deugau
     9# Copyright (C) 2004-2013 Kris Deugau <kdeugau@deepnet.cx>
    1010
    1111package IPDB;
  • branches/stable/cgi-bin/MyIPDB.pm

    r600 r601  
    88# Last update by $Author$
    99###
    10 # Copyright (C) 2004-2011 - Kris Deugau
     10# Copyright (C) 2004-2013 Kris Deugau <kdeugau@deepnet.cx>
    1111
    1212# don't remove!  required for GNU/FHS-ish install from tarball
  • branches/stable/cgi-bin/admin.cgi

    r594 r601  
    1010# Last update by $Author$
    1111###
    12 # Copyright (C) 2004-2011 - Kris Deugau
     12# Copyright (C) 2004-2013 Kris Deugau <kdeugau@deepnet.cx>
    1313
    1414use strict;
     
    469469}
    470470
    471 ERRJUMP: print "Content-type: text/html\n\n".$header->output;
     471ERRJUMP:
     472
     473$header->param(version => $IPDB::VERSION);
     474#$header->param(addperm => $IPDBacl{$authuser} =~ /a/);
     475$header->param(webpath => $IPDB::webpath);
     476
     477print "Content-type: text/html\n\n".$header->output;
     478
    472479print $page->output;
    473480
  • branches/stable/cgi-bin/extras/db2rwhois.pl

    r506 r601  
    1010# Last update by $Author$
    1111###
    12 # Copyright (C) 2004-2010 - Kris Deugau
     12# Copyright (C) 2004-2013 Kris Deugau <kdeugau@deepnet.cx>
    1313
    1414use strict;
  • branches/stable/cgi-bin/main.cgi

    r598 r601  
    77# Last update by $Author$
    88###
    9 # Copyright (C) 2004-2011 - Kris Deugau
     9# Copyright (C) 2004-2013 Kris Deugau <kdeugau@deepnet.cx>
    1010
    1111use strict;             
  • branches/stable/cgi-bin/newcity.cgi

    r593 r601  
    88# Last update by $Author$
    99###
    10 # Copyright (C) 2004-2010 - Kris Deugau
     10# Copyright (C) 2004-2013 Kris Deugau <kdeugau@deepnet.cx>
    1111
    1212use strict;
     
    7474print "Content-type: text/html\n\n";
    7575
     76$page->param(webpath => $IPDB::webpath);
     77
    7678print $page->output;
    7779
  • branches/stable/cgi-bin/newnode.cgi

    r593 r601  
    88# Last update by $Author$
    99###
    10 # Copyright (C) 2010 - Kris Deugau
     10# Copyright (C) 2010-2013 Kris Deugau <kdeugau@deepnet.cx>
    1111
    1212use strict;
     
    6767print "Content-type: text/html\n\n";
    6868
     69$page->param(webpath => $IPDB::webpath);
     70
    6971print $page->output;
    7072
  • branches/stable/cgi-bin/search.cgi

    r594 r601  
    99# Last update by $Author$
    1010###
    11 # Copyright 2005-2011 - Kris Deugau
     11# Copyright (C) 2005-2013 Kris Deugau <kdeugau@deepnet.cx>
    1212
    1313use strict;             
     
    7676if (!defined($webvar{stype})) {
    7777  $webvar{stype} = "<NULL>";   #shuts up the warnings.
    78   $page = HTML::Template->new(filename => "search/compsearch.tmpl");
     78  $page = HTML::Template->new(filename => "search/compsearch.tmpl",
     79        global_vars => 1);
    7980} else {
    80   $page = HTML::Template->new(filename => "search/sresults.tmpl");
     81  $page = HTML::Template->new(filename => "search/sresults.tmpl",
     82        global_vars => 1);
    8183}
     84$page->param(webpath => $IPDB::webpath);
    8285
    8386my $header = HTML::Template->new(filename => "header.tmpl");
    8487$header->param(version => $IPDB::VERSION);
    8588$header->param(addperm => $IPDBacl{$authuser} =~ /a/);
     89$header->param(webpath => $IPDB::webpath);
    8690print "Content-type: text/html\n\n", $header->output;
    8791
     
    355359    queryResults($sql, $webvar{page}, $count);
    356360
    357   } elsif ($category eq 'cust') {
     361  } elsif ($category eq 'cust' || $category eq 'desc') {
    358362
    359363##fixme:  this and other quick-search areas;  fix up page heading title similar to first grouping above
    360     print qq(<div class="heading">Searching for Customer IDs containing '$query'</div><br>\n);
    361 
     364    print qq(<div class="heading">Searching for Customer IDs or Descriptions containing '$query'</div><br>\n);
     365
     366# head off the worst of SQL injection.  search really needs a big rewrite...
     367$query =~ s/'/''/g;
    362368    # Query for a customer ID.  Note that we can't restrict to "numeric-only"
    363369    # as we have non-numeric custIDs in the legacy data.  :/
    364     $sql = "select $cols from searchme where custid ilike '%$query%' or description like '%$query%'";
    365     my $count = countRows($sql);
    366     $sql .= " order by cidr limit $RESULTS_PER_PAGE offset $offset";
    367     queryResults($sql, $webvar{page}, $count);
    368 
    369   } elsif ($category eq 'desc') {
    370 
    371     print qq(<div class="heading">Searching for descriptions containing '$query'</div><br>\n);
    372     # Query based on description (includes "name" from old DB).
    373     $sql = "select $cols from searchme where description ilike '%$query%'".
    374         " or custid ilike '%$query%'";
     370    $sql = "select $cols from searchme where custid ilike '%$query%' or description ilike '%$query%'";
    375371    my $count = countRows($sql);
    376372    $sql .= " order by cidr limit $RESULTS_PER_PAGE offset $offset";
Note: See TracChangeset for help on using the changeset viewer.