星期日, 1月 28, 2007
星期六, 1月 27, 2007
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;
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;
星期四, 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
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月 24, 2007
星期日, 1月 21, 2007
星期六, 1月 20, 2007
星期六, 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/</g;
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/</g;
星期五, 1月 05, 2007
fall 2005 CS456/556 class at Ohio University
http://oucsace.cs.ohiou.edu/~changliu/05Spotlight/2005-Spotlight-liuc.swf
http://ieeexplore.ieee.org/iel5/9740/30724/01423064.pdf?arnumber=1423064
http://ieeexplore.ieee.org/iel5/10731/33854/01612058.pdf
http://portal.acm.org/ft_gateway.cfm?id=1121473&type=pdf
http://portal.acm.org/ft_gateway.cfm?id=1062566&type=pdf
http://ieeexplore.ieee.org/iel5/9740/30724/01423064.pdf?arnumber=1423064
http://ieeexplore.ieee.org/iel5/10731/33854/01612058.pdf
http://portal.acm.org/ft_gateway.cfm?id=1121473&type=pdf
http://portal.acm.org/ft_gateway.cfm?id=1062566&type=pdf
星期四, 1月 04, 2007
星期一, 1月 01, 2007
ajax module
prototype.js
kwiki
http://en.wikipedia.org/wiki/Ajax_framework
http://en.wikipedia.org/wiki/Reverse_Ajax
http://www.xul.fr/en-xml-ajax.html
http://vyk1.spaces.live.com/Blog/cns!EBE3A761F939F926!1051.entry
http://www.webreference.com/programming/javascript/ncz/index.html
http://www.webreference.com/programming/javascript/ncz/column2/index.html
http://www.webreference.com/programming/javascript/ncz/column3/index.html
kwiki
http://en.wikipedia.org/wiki/Ajax_framework
http://en.wikipedia.org/wiki/Reverse_Ajax
http://www.xul.fr/en-xml-ajax.html
http://vyk1.spaces.live.com/Blog/cns!EBE3A761F939F926!1051.entry
http://www.webreference.com/programming/javascript/ncz/index.html
http://www.webreference.com/programming/javascript/ncz/column2/index.html
http://www.webreference.com/programming/javascript/ncz/column3/index.html
opensearch
http://www.opensearch.org/Home
http://en.wikipedia.org/wiki/OpenSearch
http://en.wikipedia.org/wiki/A9.com
SOAP
SRW
http://en.wikipedia.org/wiki/SRW
perl module
http://search.cpan.org/~miyagawa/WWW-OpenSearch-0.04/lib/WWW/OpenSearch.pm
http://en.wikipedia.org/wiki/Alexa_Internet
hack amazon
demo site: A9 http://opensearch.a9.com/
http://en.wikipedia.org/wiki/OpenSearch
http://en.wikipedia.org/wiki/A9.com
SOAP
SRW
http://en.wikipedia.org/wiki/SRW
perl module
http://search.cpan.org/~miyagawa/WWW-OpenSearch-0.04/lib/WWW/OpenSearch.pm
http://en.wikipedia.org/wiki/Alexa_Internet
hack amazon
demo site: A9 http://opensearch.a9.com/
星期日, 12月 31, 2006
xml
XML::Simple
ok
my $outstring="";
$outstring.="
print $outstring;
amazon online reader
while(($row = $sth->fetchrow_arrayref)){
$outstring.="[3]/ref=sib_dp_pt/002-7879865-0184864#reader-link\">
[3].01.THUMBZZZ.jpg\" alt=\"館藏封面圖片\">[0]\">Title:$row->[1]" . "
Author:" . $row->[2] . " "; # $outstring.="\n\n$row->[0] results";
}
$outstring.="";
print $outstring;
ok
my $outstring="";
$outstring.="
- ";
[3].01.THUMBZZZ.jpg\" alt=\"館藏封面圖片\">[0]\">Title:$row->[1]\nAuthor:$row->[2]
";
while(($row = $sth->fetchrow_arrayref)){
$outstring.="
# $outstring.="\n\n$row->[0] results";
}
$outstring.="
print $outstring;
amazon online reader
while(($row = $sth->fetchrow_arrayref)){
$outstring.="
Author:" . $row->[2] . "
}
$outstring.="";
print $outstring;
星期六, 12月 30, 2006
星期五, 12月 29, 2006
訂閱:
文章 (Atom)