星期日, 1月 28, 2007

npl search-topmenu.inc

modify

ISBDdetail.pl

add detail.pl & modify ISDBdetail.tmpl
add

星期六, 1月 27, 2007

koha holidays

koha reviews

opac-review.pl
opac-showreviews.pl
opac-readingrecord.pl

Serials.pm
Letters.pm

menus.inc
menu-serials.inc

CREATE TABLE `reviews` (
`reviewid` int(11) NOT NULL auto_increment,
`borrowernumber` int(11) default NULL,
`biblionumber` int(11) default NULL,
`review` text,
`approved` tinyint(4) default NULL,
`datereviewed` datetime default NULL,
PRIMARY KEY (`reviewid`)
) ENGINE=MyISAM;

koha reviwes




星期四, 1月 25, 2007

google bookviews

http://books.google.com/books?vid=ISBN0596004788&printsec=frontcover&dq=isbn:0596004788

query stat

add cookie table

CREATE TABLE `cookie` (
`id` int(255) NOT NULL auto_increment,
`names` text NOT NULL,
`counts` int(255) NOT NULL default '1',
PRIMARY KEY (`id`),
KEY `blbnoidx` (`id`)
) ENGINE=MyISAM ;

opac-main.pl

my $dbh = C4::Context->dbh;
my $top="Select names,SUM(counts) \"co\" from cookie group by names order by co desc limit 0 , 10";
my $sth=$dbh->prepare($top);
$sth->execute;

my @top;
my $top;

while (my ($names,$counts) = $sth->fetchrow_array) {
my %rows = ( searchterm => $names,
counts => $counts,
);
push @top, \%rows;
}
$sth->finish;


$template->param(top => \@top)

----------------------------------------------
opac-main.tmpl


">

----------------------------------------------
opac-search.pl

# put into cookie
for my $count (@value) {
my $dbh=C4::Context->dbh;
$sth = $dbh->prepare("insert into cookie(names) values (?)");
$sth->execute($count) || die $sth->errstr;
}

星期六, 1月 06, 2007

ajax安全性

1.跨網域限制

2.跨網站指令碼


3.SQL/OS 命令植入攻擊
$sql = "SELECT * From table where number = ".$_GET['id'].";";
利用 mysql_wscape_string()、splite_escape_string()

4.密碼檔案管理

資料庫

MySQL
PHP $A = mysql_escape_string($_GET['A']);
Perl $A =~ s/'/"/g; or $A =~ s/\\/\\\/g;

PGSQL
PHP $A = psgl_escape_string($_GET['A']);
Perl $A =~ s/'/"/g; orf $A =~ /\\/\\\/g;

SQLite $A = splite_escape_string($_GET['A']);

系統

Linux
PHP $A = escapeshellarg($A); system($A);
Perl $A =~ s/'/\\'/; system("echo '$A'");

跨網站指令碼

PHP $A = htmlspecialchars($data);
Perl $A =~ s/

Library Technology

http://www.librarytechnology.org/automationhistory.pl

http://www.libraryjournal.com/article/CA6319048.html