星期五, 12月 28, 2007
fix koha20071227
refs #50 修正 acqui.simple/addbiblio.tmpl
[討論] Perl6 好像出來了
http://www.perlfoundation.org/perl6/index.cgi?the_long_perl_6_super_feature_list
What Is Perl 6
http://www.perl.com/pub/a/2006/01/12/what_is_perl_6.html
http://dev.perl.org/perl6/
Perl 6 Users FAQ
http://perl.net.au/wiki/Perl_6_Users_FAQ
Cultured Perl: Perl 6 grammars and regular expressions
http://www-128.ibm.com/developerworks/linux/library/l-cpregex.html?ca=dgr-lnxw01Perl6Gram
[討論] Perl6 好像出來了
標題: [討論] Perl6 好像出來了
時間: Thu Dec 27 21:17:38 2007
剛估到這個網頁
http://www.perlfoundation.org/perl6/index.cgi
其中有download Perl6
http://www.perlfoundation.org/perl6/index.cgi?download_perl_6
然後是Pugs的網頁,有教你怎麼裝pugs
http://jnthn.net/perl6/
Perl6似乎有許多神奇的功能?hypothetical variables和lazy evaluation等
之前沒聽過的東西,有空來玩看看
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.168.133.77
星期二, 12月 25, 2007
20071226議程
a. Koha 2.2.9(20071214)繁體中文釋出
b. Koha 2.2.9(20071214)安裝手冊
c. koha 介面語言支援
2. 待完成:
Koha 系統管理手冊
星期一, 12月 24, 2007
星期五, 12月 21, 2007
Koha 2.2.9(20071214)繁體中文釋出公告
2. 下載 http://koha.wikispaces.com/kohadownload
3. koha 2.2.9 繁體中文版安裝手冊(ubuntu 6.10)http://koha.wikispaces.com/kohainstall610
星期二, 12月 18, 2007
20071219議程
2. koha 3.0 完成 #23, #25, #25, #27, #28,未完成 #27 // 可延後
3. Koha 3.0 開放權限問題
4. 接著陸續完成手冊 // 優先處理
5. case study 還需要處理哪些 // 可延後
參考未完成
http://lit145.lacc.fju.edu.tw:8000/trac/report/1
參考完成
http://lit145.lacc.fju.edu.tw:8000/trac/report/6
星期五, 12月 14, 2007
Re: [kohataiwan] Koha-2.2.9(20071214)
#
# 軟體名稱:Koha-2.2.9(20071214)
# 版本:Beta
# 授權:GNU GPL
# 發佈者:游龍山 <long_sam.tw At yahoo.com.tw>
#
# 下載區:http://groups.google.com.tw/group/kohataiwan/web/koha-2.2.9.tgz
# 程式修正對應 trac ticket:
# refs 10,12,13,14,15,16,17,18,19,20,21,22
#
http://lit145.lacc.fju.edu.tw:8000/trac/
#
# 修正:
# 1. 安裝程式
# 2. 新增自動安裝程式
# 3. 修正 koha.mysql
# 4. 修正 marc(整合 thomas)
# 5. 自動產生 apache.conf, my.cnf 並備
# 份舊有設定檔,以時間命名。
# 6. 修正 mysql UTF-8
# 7. 修正 opac 語系選擇 // 再傳布景設定
# 8. 自動安裝請參考 scripts/misc/auto_install
#
# 測試環境:
#
# Ubuntu 6.10 Server
#
# 後續:
# 1. 完成安裝文件
#
http://koha.wikispaces.com/kohainstall610
# 2. 釋出正式版
# 3. 更新使用相關手冊
# 4. 修正 Koha 2.2.9 使用上 bug
#
# 附註:
#
# 1. Business::ISBN 使用 1.84
# 2. 為何不用 CPANPLUS,因為預設系統沒有安裝
#
http://search.cpan.org/~kane/CPANPLUS-0.82/lib/CPANPLUS.pm
# 3. 為何 mysql root 不直接在安裝程式設定,安全考慮
# 4. 為何不處理 CGI.pm 問題。採用 kochin@gmail.com 的作法,不要修
# 改 CGI.pm,直接修改 koha 的程式,正如 kochin 所說檔案需要修改很
# 多,我之後再開張 ticket 處理。目前先採用 escapeHTML() 方式。
# 5. 目前會先以 Koha 2.2.9 為主,Koha 3.0 需處理 zebra Token
# 而且,還有很多事要處理,Koha 3.0 才能算是 ok,當然你也可以不使用
# zebra。
#
http://lists.indexdata.dk/pipermail/zebralist/2007-October/001760.html
#
###################################################################
koha3.0
2. 安裝Algorithm::CheckDigits
3. opac http://lit184.lacc.fju.edu.tw:12000
4. staff http://lit184.lacc.fju.edu.tw:15000
5. ajac jQuery, YUI
6. SMS, SIP,xslt ...
星期一, 12月 10, 2007
Changing the working directory
system("cd /home");
But it would have no effect. In fact, since the system call forksfrom the process used by the interpreter, it doesn't change the workingdirectory of your script. Instead, you can use a Perl function called"chdir":
chdir "/home";
http://www.linuxforums.org/programming/learn_perl_in_10_easy_lessons__lesson_5.html
星期五, 12月 07, 2007
星期三, 12月 05, 2007
圖書館標準
2. 國會圖書館 http://www.loc.gov/standards/
3. NISO Standards http://www.niso.org/standards/index.html
4. National Information Standards Organization http://en.wikipedia.org/wiki/National_Information_Standards_Organization
5. iso http://www.iso.org/iso/search.htm?qt=library&searchSubmit=Search&sort=rel&type=simple&published=true
星期二, 12月 04, 2007
20071205議程
2. 開發流程 // http://koha.wikispaces.com/researchnotes
3. 成功案例
4. trac + svn
5. koha 3.0
java developer note
2. CLDC, MIDP // mobile
3. Jxta // p2p
4. Swing // graphic
5. Java stream
6. Java EL & Regular expression
7. eclipse UML
8. JWSDP
9. JAX-RPC
10. Stubs, Ties
星期四, 11月 29, 2007
autotest
* mechanize (Python) http://wwwsearch.sourceforge.net/mechanize/
* WWW::mechanize (Perl) http://search.cpan.org/dist/WWW-Mechanize/
* webunit (Python) http://mechanicalcat.net/tech/webunit/
* MaxQ (written in Java, generates Jython scripts) http://maxq.tigris.org/
* HttpUnit(Java) http://www.httpunit.org/
* jWebUnit(Java) http://jwebunit.sourceforge.net/
* HtmlUnit(Java) http://htmlunit.sourceforge.net/
* HtmlFixture (Java) http://fitnesse.org/FitNesse.HtmlFixture
* WebUnit (Ruby) http://www.xpenguin.biz/download/webunit/index-en.html
sample IE automation via COM
* Pamie (Python) http://pamie.sourceforge.net/
* Samie (Perl) http://samie.sourceforge.net/
Watir (Ruby): IE automation via COM http://rubyforge.org/projects/wtr
JSSh (Mozilla C++ extension module): Mozilla automation via JavaScript shell connections http://www.croczilla.com/jssh
sqlite
http://www.sqlite.org/lang.html
document
http://www.sqlite.org/docs.html
pysqlite
http://initd.org/tracker/pysqlite
星期三, 11月 28, 2007
koha blogger
_____________________________________________________________________________________
馬上體驗全新Yahoo!奇摩電子信箱2.0。 http://tw.mg0.mail.yahoo.com/dc/landing
20071128 議程
# Koha 2.2.9 繁體中文版安裝手冊(ubuntu 6.10)
2. 管控進度 PMP, QC & QA // http://en.wikipedia.org/wiki/Project_Management_Professional
# 文件一樣也要進入 QC & QA
# trac , svn
3. 文章(http://freelins.wikispaces.com)
# 專欄 linuxpliot && 學術期刊
# 完成 (Koha 圖書館資訊系統) http://koha.wikispaces.com/librariansmanual
# 機構典藏是否加入
4. 管理 news 使用 blog or wiki
# 保留會議記錄
# 工作事項
星期六, 11月 24, 2007
星期五, 11月 23, 2007
星期四, 11月 22, 2007
星期四, 9月 27, 2007
星期四, 9月 13, 2007
Zebra Configuration
Sample Zebra Configurations
Below are some directives how to configure Zebra to comply with Emilda in an acceptable manner.
The first thing to be done is to decide where the Zebra folder is to be located. We recommend that you put it as a subfolder (zebra/) of the Emilda source folder. One reason not to have it there is when the Zebra database is bigger than the disk that the Emilda source folder is located on. In such cases, it might be a good idea to put it on a separate drive.
There are two ways to configure Zebra to comply with Emilda; either configuring it from the example files supplied with the Zebra source, or using the pre-configured setup supplied with Emilda.
When configuring from the examples supplied with Zebra, you need to put the USMARC example files into your zebra-root. They are normally located in test/ under the idzebra source folder. Additionally you need to put the tab/ folder from the idzebra source folder into your zebra-root. You can of course use a custom setup if you feel familiar with Zebra configuration.
Now we have a working environment where the "zebrasrv"-process can live and work, but this is not enough for Emilda as it uses attributes that are not defined in the default configuration supplied with Zebra. That is why we have supplied a tarball containing all the files that need to be replaced in your Zebra root folder and it can be downloaded from the same location you downloaded Emilda itself, named "emilda-zebra-folder-VERSION.tar.gz". Unpack the tarball in some arbitraty location, and copy the files to their appropriate locations (see below).
* zebra.cfg - The Zebra root folder (/path/to/emilda/zebra/zebra.cfg)
* bib1.att - The tab/ subfolder of the Zebra root folder (/path/to/emilda/zebra/tab/bib1.att)
* usmarc.abs - The tab/ subfolder of the Zebra root folder (/path/to/emilda/zebra/tab/usmarc.abs)
* usmarc.tag - The tab/ subfolder of the Zebra root folder (/path/to/emilda/zebra/tab/usmarc.tag)
If you want to use our pre-configured zebra environment, download the tarball and extract into the location where you want your zebra-root to exist. This tarball contains all necessary files for Zebra to work with Emilda, so no configuration should be needed.
Before starting Zebra, we need to create a folder where the MARC-records are to be stored. In our examples it is called records/ and it is located in the Zebra root folder (/path/to/emilda/zebra/records/). What is important with this folder is that both the Zebra process and Apache need to have write access to it. This can be achieved e.g. by running the "zebrasrv"-process as the Apache user and only giving the Apache user write access to records/, or by giving write access to records/ to both Apache and the user running the "zebrasrv"-process. There is no favourable way to do this, both work just as well.
After deciding on which method to use, we are ready to prepare Zebra for running; Zebra needs to init and index the records/ folder before we start the process. If you have any records that you wish to import into Emilda, you need to copy these into the records/ folder before running these commands. (If you afterwards want to import MARC-recods, you copy them into the recods/ folder and run these commands.) However, remember that the Items that the records in the records/ folder represent need to be added into the SQL database before Emilda can use them.
1. Go into the Zebra root folder: "cd /path/to/emilda/zebra/
2. Init Zebra: "zebraidx init"
3. Index the records/ folder: "zebraidx -g emilda update records"
4. Commit results into shadow: "zebraidx commit"
5. Start the zebrasrv-process: "zebrasrv -l /path/to/log @:9999"
This should give you a working environment with Emilda and Zebra.
NOTE!
If the records/ folder is empty, there will be an error of the type
Unsupported Use attribute: 7
which should not show up after the first record has been added. If it persists there is something odd going on - try to check if you have done everything according to the above instructions, or send a note to the Emilda mailing list.
星期日, 9月 02, 2007
Slides from conference presentations
http://jeremy.zawodny.com/mysql/scaling-mysql-and-php.html
Managing MySQL Replication by Jeremy Zawodny, presented at the 2002 O'Reilly Open Source Conference
http://jeremy.zawodny.com/mysql/managing-mysql-replication.html
MySQL Backup and Recovery by Jeremy Zawodny, presented at the 2002 O'Reilly Open Source Conference
http://jeremy.zawodny.com/mysql/mysql-backup-and-recovery.html
MySQL Optimization by Jeremy Zawodny, presented at the 2002 O'Reilly Open Source Conference
http://jeremy.zawodny.com/mysql/mysql-optimization.html
MySQL Cluster
http://dev.mysql.com/tech-resources/articles/mysql-cluster-for-two-servers.html
Advanced MySQL Replication Techniques
http://dev.mysql.com/tech-resources/articles/advanced-mysql-replication.html
Chapter 16. MySQL Cluster
http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html
Getting started with MySQL Proxy
http://dev.mysql.com/tech-resources/articles/proxy-gettingstarted.html
A.14.4. DRBD and MySQL Replication
http://dev.mysql.com/doc/refman/5.1/en/drbd-virtualization.html
星期五, 8月 31, 2007
星期四, 8月 30, 2007
package
apt-get install -y mysql-server-4.1 php4 libapache2-mod-auth-mysql php4-mysql phpmyadmin libxml2-dev libssl-dev libwrap0-dev libdate-manip-perl libhtml-template-perl libmail-sendmail-perl make gcc lynx wget ncftp unzip libssl0.9.7 libxslt1-dev libyaz3 yaz libyaz libyaz-dev yaz-doc libgcrypt11-dev
DBD
libmysqlclient14 libmysqlclient14-dev
星期日, 8月 26, 2007
koha 2.2.9 for ubuntu 6.10 中文版釋出公告
一共分成兩種版本
1.簡單 CMARC
http://groups.google.com.tw/group/kohataiwan/web/koha-2.2.9-simple.tar.gz
2.完整 CMARC(thomas 提供)
http://groups.google.com.tw/group/kohataiwan/web/koha-2.2.9-full.tar.gz
系統環境為 ubuntu 6.10
網頁伺服器 apache2.0.55-4ubuntu4
perl 5.8.8-6
mysql 4.1.15-1ubuntu5
關於 mysql-5.0 支援 foreign key,所以很多程式
需要重新改寫,才能正常使用。
修正 OPAC
1.左邊導覽列
2.查詢切截功能
3.css 功能
修正 Intranet
1.z3950 檢索功能
2.補齊 CMRAC 功能
3.指標功能中文化
4.系統參數中文化
5.權限參數中文化
6.修正 Encode::HanExtra(cccii.ucm)感謝唐鳳
其餘
1.修正 ubuntu package
2.修正 perl Modules
3.修正 install 相關程式
4.sources.lst
ps. 如果有 proxy,安裝前請先設定
export http_proxy="http://yourproxy:3128"
demo site:天主教輔仁大學圖書資訊學系系館
http://koha.lins.fju.edu.tw
若有任何 bug 請 e-mail kohataiwan@googlegroups.com
星期六, 8月 25, 2007
koha 2.2.9 for ubuntu package
installer.pl
Install.pm
sources.list
CGI.pm
1. modify z3950 search
2. modify leader editor & inc
3. config cmarc
4. export mysql
apt sources.lst
deb http://ftp.indexdata.dk/debian indexdata/sarge released
deb-src http://ftp.indexdata.dk/debian indexdata/sarge released
星期四, 8月 23, 2007
KinoSearch
http://www.rectangular.com/kinosearch
KinoSearch Documentation
http://www.rectangular.com/kinosearch/docs/devel/
Benchmarks
http://www.rectangular.com/kinosearch/benchmarks.html
KinoSearch Wiki
http://www.rectangular.com/kinosearch/wiki/
Presentations
http://www.rectangular.com/downloads/KinoSearch_OSCON2006.pdf
星期三, 8月 22, 2007
package koha229 for ubuntu 6.10 (cmarc)
2.import cmarc & setup config
3.modify perl script for chinese
4.test koha & modify install.pm
5.release chinese notes
6.package koha
星期二, 8月 21, 2007
Encode::HanExtra
split.pl
open(CCCII, "/home/laxendion/tools/UNI_CI_V3.txt");
open(NEW,"> /home/laxendion/tools/UNI.txt");
foreach (
($Uni,$Cii,$other) = split (/,/,$_);
$Uni =~ /(\d)(\w)(\w)(\w)(\w)/g;
if ($1 == 0){
$Uni = "";
$Cii =~ s/(\w\w)(\w\w)(\w\w)/\\x$1\\x$2\\x$3/g;
$other = "|0";
print NEW "$Uni $Cii $other\n";
}
elsif ($1 == 2){
$Uni = "";
$Cii =~ s/(\w\w)(\w\w)(\w\w)/\\x$1\\x$2\\x$3/g;
$other = "|0";
print NEW "$Uni $Cii $other\n";
}
}
close(CCCII);
close(NEW);
send to 唐鳳
cccii.ucm
http://kohataiwan.googlegroups.com/web/cccii.ucm
星期二, 8月 14, 2007
koha 2.2.9 modify
delete /scripts/z3950daemon/*
stop z3950-daemon-launch.sh
/intranet/cgi-bin/z3950/search.pl
2.修正
authorised_values.sql
marc_subfield_structure.sql
marc_tag_structure.sql
http://groups.google.com.tw/group/kohataiwan/files?hl=zh-TW
http://140.136.153.210/cgi-bin/koha/opac-main.pl
星期一, 8月 13, 2007
星期一, 7月 30, 2007
星期一, 7月 23, 2007
Z39.50 use ZOOM convert cccii to utf8
http://koha.wikispaces.com/zoom
星期日, 7月 22, 2007
koha228 modules
apt-get install libssl0.9.7 libxslt1-dev libyaz libyaz-dev libyaz3 yaz yaz-doc
libgcrypt11-dev
cpan -i Bundle::KohaSupport Unicode::String Encode::HanExtra XML::SAX Class::Accessor Business::ISBN Net::LDAP PDF::API2 MARC::Record MARC::File::XML XML::Simple Date::Calc
ZOOM GD::Barcode Data::Random PDF::Reuse::Barcode Net::LDAP
星期四, 7月 19, 2007
koha 2.2.9 for ubuntu 6.10
@import url();
change to
@import url(/includes/);
chanage z3950
npl/temp/z3950/searchresult.tmpl
to
default/temp/z3950/searchresult.tmpl
星期六, 7月 07, 2007
Koha Revision Control (git)
星期五, 6月 22, 2007
[Koha-devel] Announcing Koha Project Day 發佈Koha 計畫 2007/6/16
哈羅各位!
Liblime 的管理團隊,很高興宣佈一項提議促進社群發展以及koha計畫的成長。
截至本週,每個星期天在 Liblime 是Koha 計畫日(針對紐西蘭員工則是星期一)。
當然,在這一個星期裡,我們 Liblime 會花大部分時間針對我們的客戶:撰寫規格
、作一些研發工作、實作以及支援。Koha 計畫日給我們一個歸還社群的機會 -- 社群
可以讓所有變成可能!
禁止任何緊急支援請求,或是最後一刻提案,我們打算 koha 計畫日,集中精力完全
放在koha 計畫本身 -- 每一個星期。
We'd like to extend the invitation to you, dear community. Join us
any time on any Sunday and pitch in. Or, alternatively, pick a
regular day/time that you find convenient and announce it to the rest
of the community. It's strictly voluntary of course (for our staff
too), so if you're unable to participate, we won't hold a grudge :-).
But if you're able, join us and help out, there's plenty to do.
Speaking of which, what is there to do? Glad you asked. Here's just
a partial list:
* organize and write documentation
* write specifications for new proposed features
* write technical documentation for existing Koha features
* respond to questions/comments on the Koha lists
* test features and report bugs
* fix bugs :-)
* read through the code and make comments
* translate Koha into your native language
* write that new feature you thought of
* talk to the developers and tell them how to improve Koha
Where is all of this happening? Well, you can join us in real time
on the #koha channel on irc.katipo.co.nz. If you've not used IRC
before, and you're running Windows, give mIRC a shot:
http://www.mirc.com/
Well, that sums it up. Our first Koha Project Day starts tomorrow
morning at 9:00am here in Ohio and runs for 15 hours to 5:00pm
in New Zealand. If you're around, pop in and say hello :-)
[Koha-devel] Naming Conventions 命名常規 2007/6/17
哈羅!各位
前鎮子,我張貼一個問題到論壇,詢問在你的圖書館裡,命名的常規,指得像似讀者
(patrons)/瀏覽者(borrowers)/使用者(uesrs)/等等,謝謝各位的回應!
絕大部分你會使用讀者(patrons),於是,我建議要改變 koha 預設大部分佈景呈現
的命名常規。
在你們之中,命名常規已經有一些回應,例如:登出(check-out)和登入(check-in)被
使用超過借出(issue)和歸還(return)。我已經從一些北美展示的圖書館,得到相同的
回應,所以我想要修正預設的佈景,來回應這些。
當然,在我們靈活的翻譯架構,在你的 koha安裝,這是一個相當瑣碎程序改變用語,
如果你喜歡目前的常規。
有沒有人反對?
koha-devel Paul POULAIN 2007/6/15 法國進度
法國已經有兩個圖書館使用 Koha 3.0(cvs head),一個是由 koha 2.2
升級而來的,而且運作非常好(至少在 UNIMARC),Paul 已經把詳細
步驟寫在 wiki http://wiki.koha.org/doku.php?id=22_to_30&do=diff1182268250
,同時也寫好文件,描述 Koha 3.0 情況。
- http://www.koha-fr.org/IMG/pdf/nouveautes_koha3.pdf
- http://www.koha-fr.org/IMG/pdf/koha_3_copies_ecran_6_dec_06.pdf
假如有自願者想翻譯法文 -> 英文,可以跟 Paul 要求 Openoffice.org 版本,
大概有 33 頁。
星期五, 3月 09, 2007
zoom.pl nbinet.ncl.edu.tw marc
use ZOOM;
use MARC::Record;
use Encode;
use MARC::Batch;
$conn = new ZOOM::Connection("nbinet.ncl.edu.tw:210/innopac");
#$conn = new ZOOM::Connection("140.136.208.1:210/innopac");
print("主機:",$conn->option("serverImplementationName"),"\n");
$conn->option(preferredRecordSyntax => "usmarc");
#$rs = $conn->search_pqf('@attr 1=4 perl');
#$ss = $conn->scan('@attr 1=1003 a');
# if ($conn->errcode() != 0) {
# die("somthing went wrong: " . $conn->errmsg())
# }
# $conn->destroy();
# $rs = $conn->search_pqf('@attr 1=7 957493327X');
$rs = $conn->search_pqf('@attr 1=4 @attr 4=107 100');
my $n = $rs->size();
for my $i (1 .. $n) {
$rec = $rs->record($i-1);
# print $rec->render(); $rec->raw();
# print $rec->raw() . "\n";
# print "========================\n";
my $b = $rec->raw();
my $l =length ($b);
my $transl= '';
my $status = 0;
my $tmp ='';
for ($i=0; $i<$l; $i++) {
my $key = substr($b,$i,1);
if ($status == 0){
if (ord($key) != '27') {
$transl=$transl.$key;
}
else
{
$status = 1;
}
}
if ($status == 1){
if (ord($key)==36){ $status = 2; }
}
if ($status == 2) {
if (ord($key)==49){
$status = 3;
$count = -1 ;
}
}
if ($status == 3) {
if (ord($key) == '27' )
{ $status = 4;}
else {
if ($count == -1 ) {
$count = 0;
}
else {
$tmp=$tmp.$key;
}
}
}
if ($status == 4) {
if (ord($key) ==40) { $status = 5 ;}
}
if ($status == 5) {
if (ord($key) == 66) { $status = 6;}
}
if ($status == 6) {
$transl=$transl.decode('cccii',$tmp);
$status = 0;
$tmp='';
}
}
print $transl;
# $rec->render() => usmarc, $rec->raw() => iso2709
#print decode('cccii',$rec->raw()) , "\n";
}
星期四, 3月 08, 2007
星期三, 3月 07, 2007
cccii convert utf8
use ZOOM;
use MARC::Record;
use Encode;
use MARC::Batch;
$conn = new ZOOM::Connection("nbinet.ncl.edu.tw:210/innopac");
#$conn = new ZOOM::Connection("140.136.208.1:210/innopac");
print("主機:",$conn->option("serverImplementationName"),"\n");
$conn->option(preferredRecordSyntax => "usmarc");
#$rs = $conn->search_pqf('@attr 1=4 perl');
#$ss = $conn->scan('@attr 1=1003 a');
# if ($conn->errcode() != 0) {
# die("somthing went wrong: " . $conn->errmsg())
# }
# $conn->destroy();
$rs = $conn->search_pqf('@attr 1=7 957493327X');
my $n = $rs->size();
for my $i (1 .. $n) {
$rec = $rs->record($i-1);
# print $rec->render(); $rec->raw();
# print $rec->raw() . "\n";
# print "========================\n";
my $b = $rec->raw();
my $l =length ($b);
my $transl= '';
my $status = 0;
my $tmp ='';
for ($i=0; $i<$l; $i++) {
my $key = substr($b,$i,1);
if ($status == 0){
if (ord($key) != '27') {
$transl=$transl.$key;
}
else
{
$status = 1;
}
}
if ($status == 1){
if (ord($key)==36){ $status = 2; }
}
if ($status == 2) {
if (ord($key)==49){
$status = 3;
$count = -1 ;
}
}
if ($status == 3) {
if (ord($key) == '27' )
{ $status = 4;}
else {
if ($count == -1 ) {
$count = 0;
}
else {
$tmp=$tmp.$key;
}
}
}
if ($status == 4) {
if (ord($key) ==40) { $status = 5 ;}
}
if ($status == 5) {
if (ord($key) == 66) { $status = 6;}
}
if ($status == 6) {
$transl=$transl.decode('cccii',$tmp);
$status = 0;
$tmp='';
}
}
print $transl;
# $rec->render() => usmarc, $rec->raw() => iso2709
#print decode('cccii',$rec->raw()) , "\n";
}
星期二, 3月 06, 2007
catalog
http://140.119.115.1:1080/search/.b1799783/.b1799783/1,1,1,B/marc~b1799780?save=b1799780
http://140.119.115.1:1080/search/.a1/++export/1,-1,-1,B/export?ex_format=50&ex_device=45
http://140.136.208.1/search/.a1/++export/1,-1,-1,B/export?ex_format=50&ex_device=45
http://tulips.ntu.edu.tw/search/.a1/.a1/1,1,1,B/marc~b1799780?save=b1799780
http://tulips.ntu.edu.tw/search/.a1/++export/1,-1,-1,B/export?ex_format=50&ex_device=45
http://140.136.208.1/search/.b1002201/.b1002201/1,1,1,B/marc~b1001204?save=b1001204/++export/1,-1,-1,B/export?ex_format=50&ex_device=43
http://140.119.115.1:1080/search/.b1799783/.b1799783/1,1,1,B/marc~b1799780?save=b1799780
http://140.119.115.1:1080/search/.a1/++export/1,-1,-1,B/export?ex_format=50&ex_device=45
http://140.136.208.1/search/.a1/++export/1,-1,-1,B/export?ex_format=50&ex_device=45
http://140.119.115.1:1080/search/.a1/.a1/1,1,1,B/marc~b1799780?save=b1799780
fetch innopac
http://140.119.115.1:1080/search/.a1/.a1/1,1,1,B/marc~b1799780?save=b1799780
2.export
http://140.136.208.1/search/.a1/++export/1,-1,-1,B/export?ex_format=50&ex_device=45
save file
ex_format=50 => MARC
ex_format=47 => Full Display
ex_format=6 => Brief Display
ex_device=45 => local disk
ex_device=44 => e-mail
ex_device=43 => screen
ex_format=50&ex_device=44&email_addx=long_sam.tw%40yahoo.com.tw&email_subj=From+the+library+catalog
星期日, 3月 04, 2007
unimarc print
use MARC::Batch;
my $batch = MARC::Batch->new('USMARC','/home/laxendion/tools/iso/new1.dat');
while( my $record = $batch->next()) {
my @fields = $record->fields();
foreach my $field (@fields) {
$field->tag(), " ",
defined $field->indicator(1) ? $field->indicator(1) : "",
defined $field->indicator(2) ? $field->indicator(2) : "",
" ", $field->as_string, " \n";
}
}
unimarc 681 convert 805
use MARC::Record;
use MARC::Batch;
my $batch = MARC::Batch->new('USMARC','/home/laxendion/tools/iso/marc');
open(OUT,'> new1.dat') or die $!;
$batch->strict_off();
## read in each record.
while ( my $record = $batch->next() ) {
##fetch 852h
#my $good = $record->field('681');
#my $goodsub = $good->subfield('a');
#$record->subfield(681,"a");
## find the tag after 900.
my $class = $record->field('681')->subfield("a");
my $before;
foreach ($record->fields()) {
$before = $_;
last if $_->tag() > 800;
}
## create the 942 field.
my $new = MARC::Field->new('805','','','d' => $class);
## insert our 942 field after the $before.
$record->insert_fields_before($before,$new);
print $class . "\n";
## and print out the new record.
print OUT $record->as_usmarc();
}
An example perl script to move 852h >dewey< to 942k dewey default for Koha2.2
## Example U2 this is a modified script with thanks to the MARC::Record
## designers and documentation group
use MARC::Batch;
my $batch = MARC::Batch->new('USMARC','/home/mike1/lib4per/MICRO.new');
open(OUT,'>new1.dat') or die $!;
$batch->strict_off();
## read in each record.
while ( my $record = $batch->next() ) {
##fetch 852h
my $good = $record->field('852');
my $goodsub = $good->subfield('h');
## find the tag after 900.
my $before;
foreach ($record->fields()) {
$before = $_;
last if $_->tag() > 900;
}
## create the 942 field.
my $new = MARC::Field->new('942','','',k=>$goodsub);
## insert our 942 field after the $before.
$record->insert_fields_before($before,$new);
## and print out the new record.
print OUT $record->as_usmarc();
}
星期六, 3月 03, 2007
koha 3.0 opac for zebra
2.cp nkes Koha => your Koha
and run rel_3_0/koha/updater/updater/updatedatabase
3.setup zebra
http://wiki.koha.org/doku.php?id=installingzebraplugin226
http://wiki.koha.org/doku.php?id=faqzebra
zebra.cfg
http://kohaa.blogspot.com/2007/02/zebracfg.html
PS. cvs dev_week
cp dev_week/koha/zebraplugin/zebradb/biblios/tab/* to your zebra/etc/*
4.cvs koha rel_3_0
cp /opac/*.pl -> /opac/cgi-bin/
http://kohataiwan.googlegroups.com/web/prog_opac_zh_TW.po
http://koha.wikispaces.com/chinesenization
5.export nkes marc iso2709
6.Must have zebra.cfg config directory(zebra-XXX.cfg
use -c parameter)
copy zebrapl
zebra init
zebra create biblios(databaename see your koha.xml)
zebra -g iso2709 -d biblios(databaename see your koha.xml) update
iso2709.marc(marc data) -n
zebra -f /etc/koha.xml
koha.xml(see rel_3_0 /misc/koha.xml)
7.modify koha-httpd.conf
opac
chanage SetEnv KOHA_CONF /etc/koha.xml
and restart apache
--------------------------------------------------------------------
chanage systempreferences
opacthemes => prog
lang =>zh_TW
opacstylesheet => /opac-tmpl/prog/zh_TW/includes/opac.css
marcflavour => unimarc check your marc type
PS.MARCXML /misc/migration_tools/22_to_30/move_marc_to_biblioitems.pl
you use unimarc must modify scipt,marc21 don't modify
=> marcxml parser problem
see http://www.indexdata.com/zebra/doc/
星期三, 2月 28, 2007
星期一, 2月 26, 2007
發自博客來網路書店
告知您策略聯盟的審核已經通過!
【基本資料】
申請日期:2007-02-17 09:18:00
申請帳號:laxendion
網站名稱:南投縣國姓鄉南港國小圖書館
網 址:http://koha.nkes.ntct.edu.tw
網站描述:南投縣國姓鄉南港國小圖書館
【 合作內容】
合約日期:2007/02/26-2008/02/26
(合約到期15天前,系統會發信詢問您是否續約)
回饋分類:無仲介金行銷引薦
回饋金%:
==========================
如有任何問題,歡迎來信詢問
ap@books.com.tw
博客來網路書店 敬上
==========================
星期六, 2月 24, 2007
perl libxml
[Sat Feb 17 11:21:53 2007] [error] [client 127.0.0.1] at /usr/local/share/perl/5.8.7/XML/Simple.pm line 291
/etc/koha-httpd.conf
SetEnv KOHA_CONF "/etc/koha.xml"
星期五, 2月 23, 2007
星期五, 2月 16, 2007
zebra command
2. zebraidx create database
3. zebraidx -g iso2709 -d databae update /path/to/marc -n
4. zebraidx commit
5. zebrasrv @:2100
nkes
00691cam 2200229 4500
010 0 $a 957-754-154-2 $b 精裝
090 $9 1019 $a 1019
100 $a 20020412d1995 m y0chiy09 e.
101 0 $a chi
102 $a TW
105 $a y z 000fd.
200 1 $a 木魚石 $e 嘉慶皇帝傳奇 $f 林鐵均著.
205 $a 初版.
210 $a 臺北市 $c 國際村出版 $a 板橋市 $c 錦德發行 $d 1995[民84]
215 0 $a 217面 $d 22公分.
225 2 $a 清帝傳奇 $v 11.
606 $a 中國
700 1 $a 李
801 $a TW $b nges $g CCR $m 4
805 $a nges $d 627 $e 3024 $y v.7 $t CCL $v 增訂七版
990 $a BOOK
995 $b nges $c nges $e 中文書庫 $f A01139 $j A01139 $k 627 3024 v.7 $m 20060624 $o 0 $9 1313
--------------------------------------------------------------------------
GRS-1
(3,001) 101445213
(3,010)
(3,0 )
(3,b) 平裝
(3,d) 人民幣2.35元
(3,050)
(3, )
(3,a) 101445213
(3,100)
(3, )
(3,a) 20030718d1986 k y0chib09 e
(3,101)
(3,0 )
(3,a) chi
(3,102)
(3, )
(3,a) cn
(3,105)
(3, )
(3,a) a a 000yy
(3,200)
(3,1 )
(3,a) 系統辨識導論
(3,f) 徐南榮著
(3,205)
(3, )
(3,a) 第1版
(3,210)
(3, )
(3,a) 北京市
(3,c) 電子工業出版社
(3,d) 1986
(3,215)
(3,0 )
(3,a) 212面
(3,c) 圖
(3,d) 26公分
(3,300)
(3, )
(3,a) 簡體字本
(3,300)
(3, )
(3,a) 高等學校教材
(3,320)
(3, )
(3,a) 含參考書目
(3,517)
(3,1 )
(3,a) 系统辨识导论
(3,z) chi
(3,606)
(3, )
(3,2) csh
(3,a) 科學
(3,x) 哲學, 原理
(3,681)
(3, )
(3,a) 301
(3,b) 8556
(3,v) 增訂七版
(3,700)
(3, 1)
(3,a) 徐
(3,b) 南榮
(3,801)
(3, 0)
(3,a) cw
(3,b) 國圖
(3,c) 20060301
(3,g) CCR
(3,801)
(3, 1)
(3,a) cw
(3,b) 國圖
(3,c) 20060301
(3,g) CCR
zebra.cfg
# a database with MARCXML records.
# $Id: zebra-biblios.cfg,v 1.1.2.2 2006/10/05 20:50:52 kados Exp $
#
# Where are the config files located?
modulePath:/usr/local/lib/idzebra-2.0/modules/
#profilePath:/usr/share/idzebra-2.0/tab/
profilePath:${srcdir:-.}:/home/laxendion/tools/cvs/dev_week/koha/zebraplugin/zebradb/biblios/tab/
encoding: utf-8
# Files that describe the attribute sets supported.
attset: bib1.att
attset: explain.att
attset: gils.att
systag sysno rank
# Specify record type
iso2709.recordType:grs.marcxml.record
iso2709.recordType: grs.marc.unimarc
recordType:grs.xml
#recordId: (bib1,Identifier-standard)
#recordId: (bib1,Local-number)
elm 001 local-number !
storeKeys:1
storeData:1
# Lock File Area
lockDir: /home/zebra/zebradb/biblios/lock
perm.anonymous:rw
#perm.kohaadmin:rw
#passw.kohalis
register: /home/zebra/zebradb/biblios/register:1G
shadow: /home/zebra/zebradb/biblios/shadow:1G
# Temp File area for result sets
setTmpDir: /home/zebra/zebradb/biblios/tmp
# Temp File area for index program
keyTmpDir: /home/zebra/zebradb/biblios/key
# Approx. Memory usage during indexing
memMax: 40M
MARC::File::XML
Hi everyone,
Just providing an update on this issue. As you may recall, I've
been putting the MARC::Record suite, specifically MARC::File::XML
and MARC::Charset, through some fairly rigourous tests, including
a 'roundtrip' test, which converts the binary MARC-8 records to
MARCXML / UTF-8 and then back to binary MARC but encoded as UTF-8.
This test is available here:
http://liblime.com/public/roundtrip.pl
I discovered a number of bugs or issues, not in the MARC::* stuff, but in the
back-end SAX parsers. I'll just summarize my discoveries here for
posterity:
1. MARC::File::XML, if it encounteres unmapped encoding in a
MARC-8 encoded binary MARC file (in as_xml()) will drop the entire
subfield where the improper encoding exists. The simple solution is
to always use: MARC::Charset->ignore_errors(1); if you expect your
data will have improper encoding.
2. the XML::SAX::PurePerl parser cannot properly handle combining
characters. I've reported this bug here:
http://rt.cpan.org/Public/Bug/Display.html?id=19543
At the suggestion of several, I tried replacing my default system
parser with expat, which cause another problem:
3. handing valid UTF-8 encoded XML to new_from_xml() sometimes
causes the entire record to be destroyed when using XML::SAX::Expat
as the parser (with PurePerl these seem to work). It fails with
the error:
not well-formed (invalid token) at line 23, column 43, byte 937 at
/usr/lib/perl5/XML/Parser.pm line 187
I haven't been able to track the cause of this bug, I eventually
found a workaround that didn't result in the above error, but instead,
silently mangled the resulting binary MARC record on the way out:
4. Using incompatible version of XML::SAX::LibXML and libxml2 will
cause binary MARC records to be mangled when passed through new_from_xml()
in some cases. The solution here is to make sure you're running
compatible versions of XML::SAX::LibXML and libxml2. I run Debian
Sarge and when I just used the package maintainer's versions it
fixed the bug. It's unclear to me why the binary MARC would be
mangled, this may indicate a problem with MARC::* but I haven't
had time to track it down and since installing compatible versions
of the parser back-end solves the problem I can only assume it's
the fault of the incompatible parsers.
Issues #3 and #4 above can be replicated following batch of records
through the roundtrip.pl script above:
http://liblime.com/public/several.mrc
If you want to test #2, try running this record through roundtrip.pl:
http://liblime.com/public/combiningchar.mrc
BTW: you can change your default SAX parser by editing the .ini file ...
mine is located in /usr/local/share/perl/5.8.4/XML/SAX/ParserDetails.ini
So the bottom line is, if you want to use MARC::File::XML in any
serious application, you've got to use compatible versions of the
libxml2 parser and XML::SAX::LibXML. Check the README in the perl
package for documentation on which are compatible...
Maybe a note somewhere in the MARC::File::XML documentation to point
these issues out would be useful. Also, it wouldn't be too bad to have
a few tests to make sure that the system's default SAX parser is capable
of handling these cases. Just my two cents.
Cheers,
zebra unimarc
00765nam0 2200253 4500
001 89017875
010 0 $a 957-33-1758-3 $b 平裝
090 $9 13 $a 13
100 $a 20001123d2000 k y0chiy09 e.
101 1 $a chi
102 $a US
105 $a a z 000ay.
200 1 $a 哈利波特 $e 消失的密室 $f J. K. 羅琳(J. K. Rowling)著 $g 彭倩文譯.
205 $a 初版.
210 $a 臺北市 $c 皇冠文化 $d 2000[民89]
215 0 $a 396面 $d 21公分.
225 1 $a 皇冠叢書 $v 第3063種.
225 1 $a Choice $v 36.
700 1 $a 羅林
702 1 $a 彭
801 0 $b lins $c 20010223 $g AACR
805 $f c33 $f c26.
990 $a BOOK
995 $b 輔仁大學圖書資訊學系資訊組織 $c 輔仁大學圖書資訊學系資訊組織 $e 西文書庫 $f 2 $j 2 $k 2 $o 0 $9 10
--------------------------------------------------------------------
[biblios]Record type: USmarc
00631nam0 2200205 4500
010 0 $a 4335352514 $b 精裝
090 $9 23 $a 23
100 $a 20060526d2005 k y0chiy09 e
101 0 $a jpn
102 $a US
105 $a y z 000yy
200 1 $a 消費者契約の法理論 $f 後藤卷則著
205 $a 初版
210 $a 東京 $c 弘文堂 $d 2002[民91]
215 0 $a 370面 $d 22公分
606 $a 消費者保護
700 $a 後藤
801 0 $b lins $c 20060526 $g CCR
990 $a BOOK
995 $b 輔仁大學圖書資訊學系資訊組織 $c 輔仁大學圖書資訊學系資訊組織 $e 西文書庫 $f 18 $j 18 $k 222 22 $m 20050311 $o 0 $9 20
-------------------------------------------------------------------------
[biblios]Record type: USmarc
00699cam0 2200229 4500
001 100141393
010 0 $b 平裝
090 $9 35 $a 35
100 $a 19890421d1984 k a0chib09 e
101 0 $a chi
102 $a US
105 $a a z 000yy
200 1 $a 最新臺灣公路指南 $f [南華出版社編輯部編]
210 $a 臺北市 $c 南華 $d 民73
215 0 $a 60面 $d 9 x 18公分
606 $a 公路
712 02 $a 南華出版社
801 0 $b lins $c 19970417 $g CCR
801 0 $b lins $c 19970417 $g CCR
801 0 $b lins $c 20060315 $g AACR
990 $a ????
995 $b 輔仁大學圖書資訊學系資訊組織 $c 輔仁大學圖書資訊學系資訊組織 $e 中文書庫 $f 35 $j 35 $k 234 44 $m 20070125 $o 0 $9 32
------------------------------------------------------------------------
[biblios]Record type: USmarc
00680cem0 2200205 4500
001 101603678
010 0 $b 平裝
090 $9 60 $a 60
100 $a 20041105d1947 m y0chib09 e
101 0 $a chi $a eng
102 $a US
200 1 $a 最新省都觀光地圖 $d Sketch map of Taipei $f [臺灣旅行社編]
205 $a 第三版
210 $a [臺北市 $c 臺灣旅行社 $d 民36]
215 0 $a 1幅地圖 $d 印於79 x 53公分紙上
712 02 $a 臺灣旅行社
801 0 $b lins $c 20060411 $g CCR
801 0 $b lins $c 20060411 $g AACR
990 $a BOOK
995 $b 輔仁大學圖書資訊學系資訊組織 $c 輔仁大學圖書資訊學系資訊組織 $e 中文書庫 $f 60 $j 60 $k 222 $m 20041109 $o 0 $9 57
koha3.0
my opac operl script & opac_tmpl(prog) use rel_3_0.
database execute updatedatabase.
koha.xml
---------------------------------------------
-------------------------------------------
it means mysql database name or zebra databae name.
i can't sure which that?
--------------------------------------------
-----------------------------------------------------------------------
i import some biblios. i use yaz-client
root@laxendion:~# yaz-client @:9900/biblios
Connecting...OK.
Sent initrequest.
Connection accepted by v3 target.
ID : 81
Name : Zebra Information Server/GFS/YAZ
Version: Zebra 2.0.6/1.108/2.1.46
Options: search present delSet triggerResourceCtrl scan sort extendedServices namedResultSets
Elapsed: 0.052761
Z> find @attr 1=1016 perl
Sent searchRequest.
Received SearchResponse.
Search was a success.
Number of hits: 1, setno 1
SearchResult-1: term=perl cnt=1
records returned: 0
Elapsed: 0.208630
----------------------------------------------------
show 1
Z> show 1
Sent presentRequest (1+1).
Records: 1
[biblios]Record type: USmarc
01051 2200217 4500
010 $a 96007074 //r96
020 $a 1571690581
082 $a 005.13/3
090 $c 15 $d 15
100 1 $a Glover, Mike.
245 10 $a Perl 5 how-to / $c Mike Glover, Aidan Humphreys, Ed Weiss.
260 $a Corte Madera, Calif. : $b Waite Group Press, $c c1996.
300 $a xxiii, 860 p. : $b ill. ; $c 23 cm. + $e 1 computer laser optical disc (4 3/4 in.)
500 $a "The definitive perl programming problem-solver."--Cover.
538 $a System requirements for accompanying computer disc: IBM PC or UNIX workstation; DOS 3.3 or greater; Windows 3.1 or greater; Windows 95; UNIX-compatible operating system with Perl port; recommended: CD-ROM drive and Internet access.
650 0 $a Perl (Computer program language)
650 0 $a Object-oriented programming (Computer science)
700 1 $a Humphreys, Aidan.
700 1 $a Weiss, Ed.
942 $c BOOK
995 $b 輔仁大學圖書資訊學系資訊組織 $c 輔仁大學圖書資訊學系資訊組織 $e 西文書庫 $f 11 $j 11 $k 123.34 $o 0 $9 12
nextResultSetPosition = 2
Elapsed: 0.052356
--------------------------------------------------------------------------
and then my koha.conf
zebradb=localhost:9900/biblios
database=Koha
hostname=localhost
user=koha
pass=dion0104
intranetdir=/usr/local/koha/intranet
opacdir=/usr/local/koha/opac
kohalogdir=/usr/local/koha/log
kohaversion=3.0
httpduser=www-data
intrahtdocs=/usr/local/koha/intranet/htdocs/intranet-tmpl
opachtdocs=/usr/local/koha/opac/htdocs/opac-tmpl
-----------------------------------------------------
i run opac-search.pl but it can't work
error log
--------------------------------------------
error : Can't call method "_conn" on an undefined value at /usr/local/lib/perl/5.8.7/ZOOM.pm line 123.
[Fri Feb 16 09:43:10 2007] [error] [client 127.0.0.1] Start tag expected, '<' not found at /usr/local/lib/perl/5.8.7/XML/LibXML/SAX.pm line 64
[Fri Feb 16 09:43:10 2007] [error] [client 127.0.0.1] at /usr/local/share/perl/5.8.7/XML/Simple.pm line 291
星期四, 2月 15, 2007
星期一, 2月 12, 2007
星期四, 2月 08, 2007
星期二, 2月 06, 2007
opac-images
opac-basket.tmpl
opac-shelives.tmpl
opac-shelives.pl
$line{'isbn'}=$item->{'isbn'};
opac-readingrecord.tmpl
opac-readingrecord.pl
$line{isbn}=$issues->[$i]->{'isbn'};
星期一, 2月 05, 2007
rss XML::Simple
use strict;
use XML::Simple;
use LWP::Simple;
use Data::Dumper;
my $url = "http://newsrss.bbc.co.uk/rss/newsonline_world_edition/middle_east/rss.xml";
my $content = get($url);
warn "could not retrieve $url" unless $content;
my $simple = XML::Simple->new();
my $data = $simple->XMLin($content);
# DEBUG
#print Dumper($data) . "\n";
foreach my $result (@{$data->{channel}->{item}}){
join "\n",
$result->{title} . "\n",
$result->{description} . "\n\n";
}
phpMyAdmin 2.7.0(含)以上版本 中文顯示亂碼問題解決 + 基本設定
'big5' => 'big5', 更改 'big5' => 'latin1',
'utf-8' => 'utf-8', 更改 'utf-8' => ' latin1',
星期日, 2月 04, 2007
星期六, 2月 03, 2007
Search.pm ISBN
Search.pm
line 1545;
$data->{'isbn'} = DisplayISBN($data->{'isbn'});
$data->{'isbn'} =~ s/-//g;
SearchMarc.pm
NOT statements
222
$word =~ s/%//g unless length($word)>4;
$word = "\%" . $word . "\%";
247
NORMAL statements
$word =~ s/%//g unless length($word)>4;
$word = "\%" . $word . "\%";
星期五, 2月 02, 2007
星期日, 1月 28, 2007
星期六, 1月 27, 2007
koha reviews
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
query stat
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安全性
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://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
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://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/