diff options
author | Kandrashin Denis <mail@lintest.ru> | 2010-10-27 11:14:16 +0400 |
---|---|---|
committer | Kandrashin Denis <mail@lintest.ru> | 2010-10-27 11:14:16 +0400 |
commit | 101848634af390701a7a7843760ffe97e3d6308a (patch) | |
tree | 0264da3f50541cbea40cdf6b70f01f707ac5c4f6 /scripts | |
parent | 49f716ee803e30327110c69ad711e2c9bd3c8a34 (diff) |
fix online update && convert script
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Flibusta/conv_book.php | 17 | ||||
-rw-r--r-- | scripts/Flibusta/conv_info.php | 4 | ||||
-rw-r--r-- | scripts/Flibusta/conv_new.php | 355 | ||||
-rw-r--r-- | scripts/Flibusta/genres.php | 142 | ||||
-rw-r--r-- | scripts/LibRusEc/convert.php | 4 | ||||
-rw-r--r-- | scripts/LibRusEc/genres.php | 142 |
6 files changed, 14 insertions, 650 deletions
diff --git a/scripts/Flibusta/conv_book.php b/scripts/Flibusta/conv_book.php index 71fc86f0..9731a003 100644 --- a/scripts/Flibusta/conv_book.php +++ b/scripts/Flibusta/conv_book.php @@ -4,6 +4,8 @@ require_once '../Common/datafile.php'; require_once '../Common/genres.php'; require_once '../Common/strutils.php'; +require_once 'conv_info.php'; + function convert_authors($mysql_db, $sqlite_db, $min) { $sqlite_db->query("begin transaction;"); @@ -222,8 +224,6 @@ function setup_params($sqlite_db, $date, $type) $sqlite_db->query("commit;"); } -require_once 'conv_info.php'; - function FullImport($mysql_db, $file, $date) { $sqlite_db = new PDO('sqlite:./'.$file); @@ -239,13 +239,6 @@ function FullImport($mysql_db, $file, $date) convert_dates($mysql_db, $sqlite_db, 0); create_indexes($sqlite_db); - - system("zip flibusta.zip $file"); - -// author_info($mysql_db, $sqlite_db, 0); -// book_info($mysql_db, $sqlite_db, 0); - - system("zip flibusta.full.zip $file"); } function DeltaImport($mysql_db, $date) @@ -302,6 +295,12 @@ $date = date('Ymd'); echo "Today: ".$date."\n"; FullImport($mysql_db, $sqlitefile, $date); +system("zip flibusta.db.zip $file"); + +author_info($mysql_db, $sqlite_db, 0); +book_info($mysql_db, $sqlite_db, 0); +system("zip flibusta.full.zip $sqlitefile"); + DeltaImport($mysql_db, $date); ?> diff --git a/scripts/Flibusta/conv_info.php b/scripts/Flibusta/conv_info.php index 406a5054..7b9b3b8e 100644 --- a/scripts/Flibusta/conv_info.php +++ b/scripts/Flibusta/conv_info.php @@ -4,6 +4,8 @@ require_once 'bbcode/bbcode.lib.php'; function author_info($mysql_db, $sqlite_db, $min) { + $sqlite_db->query("begin transaction;"); + $bb = new bbcode; $bb->autolinks = false; $sqltest = "SELECT AvtorId FROM libaannotations WHERE AvtorId>$min"; @@ -30,6 +32,8 @@ function author_info($mysql_db, $sqlite_db, $min) function book_info($mysql_db, $sqlite_db, $min) { + $sqlite_db->query("begin transaction;"); + $bb = new bbcode; $bb->autolinks = false; $sqltest = "SELECT BookId FROM libbannotations WHERE BookId>$min"; diff --git a/scripts/Flibusta/conv_new.php b/scripts/Flibusta/conv_new.php deleted file mode 100644 index 44d2cb35..00000000 --- a/scripts/Flibusta/conv_new.php +++ /dev/null @@ -1,355 +0,0 @@ -<?php - -require_once 'genres.php'; - -function convert_Auth($mysql_db, $sqlite_db) -{ - $sqlite_db->query("begin transaction;"); - - $sqlite_db->query("DELETE FROM Auth"); - - $sqlite_db->query("INSERT INTO A(aid, Letter) VALUES(0,'#')"); - - $sqltest = " - SELECT libavtorname.AvtorId, libavtorname.FirstName, libavtorname.LastName, libavtorname.MiddleName, COUNT(DISTINCT libavtor.BookId) as Number - FROM libavtorname - INNER JOIN libavtor ON libavtorname.AvtorId=libavtor.AvtorId - INNER JOIN libbook ON libbook.BookId=libavtor.BookId AND libbook.Deleted<>1 - GROUP BY libavtorname.AvtorId, libavtorname.FirstName, libavtorname.LastName, libavtorname.MiddleName - "; - - $query = $mysql_db->query($sqltest); - while ($row = $query->fetch_array()) { - echo $row['AvtorId']." - ".$row['FirstName']." ".$row['MiddleName']." ".$row['LastName']."\n"; - $sql = "INSERT INTO a(aid, Numb, First, Middle, Last) VALUES(?,?,?,?,?)"; - $insert = $sqlite_db->prepare($sql); - $insert->execute(array($row['AvtorId'], $row['Number'], trim($row['FirstName']), trim($row['MiddleName']), trim($row['LastName']))); - $insert->closeCursor(); - } - $query->close(); - $sqlite_db->query("commit;"); -} - -function convert_Book($mysql_db, $sqlite_db) -{ - $sqlite_db->query("begin transaction;"); - - $sqlite_db->query("DELETE FROM Book"); - - $sqltest = " - SELECT - libbook.BookId, FileSize, Title, FileType, md5, DATE_FORMAT(libbook.Time,'%y%m%d') as Time, Lang, Year, - CASE WHEN libfilename.FileName IS NULL THEN - CASE WHEN oldfilename.FileName IS NULL THEN CONCAT(libbook.BookId, '.', libbook.FileType) ELSE oldfilename.FileName END - ELSE libfilename.FileName - END AS FileName - FROM libbook - LEFT JOIN libfilename ON libbook.BookId = libfilename.BookId - LEFT JOIN oldfilename ON libbook.BookId = oldfilename.BookId - WHERE libbook.Deleted<>1 - "; - - $query = $mysql_db->query($sqltest); - while ($row = $query->fetch_array()) { - - $book = $row['BookId']; - echo $row['Time']." - ".$book." - ".$row['FileType']." - ".$row['Title']."\n"; - - $genres = ""; - $subsql = "SELECT GenreCode FROM libgenre LEFT JOIN libgenrelist ON libgenre.GenreId = libgenrelist.GenreId WHERE BookId=".$row['BookId']; - $subquery = $mysql_db->query($subsql); - while ($subrow = $subquery->fetch_array()) { - $genr = genreCode($subrow['GenreCode']); - $genres = $genres.$genr; - $sql = "INSERT INTO bg(bid, gid) VALUES(?,?)"; - $insert = $sqlite_db->prepare($sql); - $insert->execute(array($book, $genres)); - $insert->closeCursor(); - } - $subquery->close(); - - $file_type = trim($row['FileType']); - $file_type = trim($file_type, "."); - $file_type = strtolower($file_type); - $file_type = strtolowerEx($file_type); - $lang = $row['Lang']; - $lang = strtolower($lang); - $lang = strtolowerEx($lang); - $sql = "INSERT INTO b(bid, Title, File, Size, Type, Genr, Date, Lang, Year, Md5s) VALUES(?,?,?,?,?,?,?,?,?,?)"; - $insert = $sqlite_db->prepare($sql); - $insert->execute(array($book, trim($row['Title']), $row['FileName'], $row['FileSize'], $file_type, $genres, $row['Time'], $lang, $row['Year'], $row['md5'])); - $insert->closeCursor(); - } - $query->close(); - - $sqlite_db->query("commit;"); -} - -function convert_Seqn($mysql_db, $sqlite_db) -{ - $sqlite_db->query("begin transaction;"); - - $sqlite_db->query("DELETE FROM Seqn"); - - $sqltest = " - SELECT libseqname.SeqId, libseqname.SeqName, COUNT(libseq.BookId) as Number - FROM libseqname INNER JOIN ( - SELECT DISTINCT libseq.SeqId, libseq.BookId - FROM libseq INNER JOIN libbook ON libbook.BookId=libseq.BookId AND libbook.Deleted<>1 - ) AS libseq ON libseqname.SeqId=libseq.SeqId AND libseq.SeqId<>0 - GROUP BY libseqname.SeqId, libseqname.SeqName - "; - - $query = $mysql_db->query($sqltest); - while ($row = $query->fetch_array()) { - echo $row['SeqId']." - ".$row['SeqName']."\n"; - $sql = "INSERT INTO s(sid, Numb, Seqn) VALUES(?,?,?)"; - $insert = $sqlite_db->prepare($sql); - $insert->execute(array($row['SeqId'], $row['Number'], trim($row['SeqName']))); - $insert->closeCursor(); - } - $query->close(); - - $sqlite_db->query("commit;"); -} - -function convert_BkAuth($mysql_db, $sqlite_db) -{ - $sqlite_db->query("begin transaction;"); - - $sqlite_db->query("DELETE FROM ba"); - - $sqltest = " - SELECT DISTINCT - libbook.BookId, - CASE WHEN libavtor.AvtorId IS NULL THEN 0 ELSE libavtor.AvtorId END AS AvtorId - FROM libbook - LEFT JOIN libavtor ON libbook.BookId = libavtor.BookId - WHERE libbook.Deleted<>1 - "; - - $query = $mysql_db->query($sqltest); - while ($row = $query->fetch_array()) { - echo $row['AvtorId']." - ".$row['BookId']."\n"; - $sql = "INSERT INTO ba(bid, aid) VALUES(?,?)"; - $insert = $sqlite_db->prepare($sql); - $insert->execute(array($row['BookId'], $row['AvtorId'])); - $insert->closeCursor(); - } - $query->close(); - - $sqlite_db->query("commit;"); -} - -function convert_BkSeqn($mysql_db, $sqlite_db) -{ - $sqlite_db->query("begin transaction;"); - - $sqlite_db->query("DELETE FROM bs"); - - $sqltest = " - SELECT DISTINCT - libbook.BookId, - CASE WHEN libseq.SeqId IS NULL THEN 0 ELSE libseq.SeqId END AS SeqId, - libseq.SeqNumb, libseq.Level - FROM libbook - LEFT JOIN libseq ON libbook.BookId = libseq.BookId - WHERE libbook.Deleted<>1 - "; - - $query = $mysql_db->query($sqltest); - while ($row = $query->fetch_array()) { - echo $row['SeqId']." - ".$row['BookId']."\n"; - $sql = "INSERT INTO bs(bid, sid, Num) VALUES(?,?,?)"; - $insert = $sqlite_db->prepare($sql); - $insert->execute(array($row['BookId'], $row['SeqId'], $row['SeqNumb'])); - $insert->closeCursor(); - } - $query->close(); - - $sqlite_db->query("commit;"); -} - -function create_tables($sqlite_db) -{ - $sqlite_db->query("begin transaction;"); - - $sqlite_db->query(" - CREATE TABLE a( - Aid integer primary key, - Letter char(1), - First varchar(128), - Middle varchar(128), - Last varchar(128), - Find varchar(255), - Full varchar(255), - Numb integer, - Dscr text); - "); - - $sqlite_db->query(" - CREATE TABLE b( - Bid integer primary key, - Zid integer, - Title varchar(255) not null, - File text, - Path text, - Size integer, - Type text, - Md5s text, - Genr text, - Lang text, - Date integer, - Year integer, - Dscr text); - "); - - $sqlite_db->query(" - CREATE TABLE d( - Date integer primary key, - Numb integer); - "); - - $sqlite_db->query(" - CREATE TABLE s( - Sid integer primary key, - Seqn text, - Numb integer); - "); - - $sqlite_db->query(" - CREATE TABLE z( - Zid integer primary key, - File text, - Path text, - Size integer, - Numb integer); - "); - - $sqlite_db->query(" - CREATE TABLE vz( - vid integer primary key, - File text); - "); - - $sqlite_db->query(" - CREATE TABLE ve( - vid integer, - Entry text); - "); - - $sqlite_db->query(" - CREATE TABLE ba( - Bid integer not null, - Aid integer); - "); - - $sqlite_db->query(" - CREATE TABLE bf( - Bid integer not null, - Zid integer, - File text, - Path text); - "); - - $sqlite_db->query(" - CREATE TABLE bg( - Bid integer not null, - Gid text); - "); - - $sqlite_db->query(" - CREATE TABLE bi( - Bid integer not null, - Isbn text); - "); - - $sqlite_db->query(" - CREATE TABLE bp( - Bid integer not null, - Pict text); - "); - - $sqlite_db->query(" - CREATE TABLE bs( - Bid integer not null, - Sid integer, - Num integer); - "); - - $sqlite_db->query("CREATE TABLE params(id integer primary key, value integer, text text);"); - $sqlite_db->query("DELETE FROM params;"); - $sqlite_db->query("INSERT INTO params(id,text) VALUES ( 1, 'Flibusta library');"); - $sqlite_db->query("INSERT INTO params(id,value) VALUES ( 2, 20);"); - $sqlite_db->query("INSERT INTO params(id,text) VALUES ( 3, 'FLIBUSTA');"); - $sqlite_db->query("INSERT INTO params(id,text) VALUES (11, 'flibusta.net');"); - - $sqlite_db->query("commit;"); -} - -function convert_count($sqlite_db) -{ - $sqlite_db->query("begin transaction;"); - - $sqlite_db->query("UPDATE a SET Numb=(SELECT COUNT(bid) FROM ba WHERE ba.aid=a.aid)"); - $sqlite_db->query("UPDATE s SET Numb=(SELECT COUNT(bid) FROM bs WHERE bs.sid=s.sid)"); - - $sqlite_db->query("commit;"); -} - -function create_indexes($sqlite_db) -{ - $sqlite_db->query("begin transaction;"); - - $sqlite_db->query("CREATE INDEX A_Letter ON a(Letter);"); - $sqlite_db->query("CREATE INDEX A_Find ON a(Find);"); - - $sqlite_db->query("CREATE INDEX B_Title ON b(Title);"); - $sqlite_db->query("CREATE INDEX B_Md5s ON b(Md5s);"); - $sqlite_db->query("CREATE INDEX B_Date ON b(Date);"); - - $sqlite_db->query("CREATE INDEX S_Seqn ON s(Seqn);"); - - $sqlite_db->query("CREATE INDEX BA_Bid ON ba(Bid);"); - $sqlite_db->query("CREATE INDEX BA_Aid ON ba(Aid);"); - - $sqlite_db->query("CREATE INDEX BF_Bid ON bf(Bid);"); - $sqlite_db->query("CREATE INDEX BF_Zid ON bf(Zid);"); - - $sqlite_db->query("CREATE INDEX BG_Bid ON bg(Bid);"); - $sqlite_db->query("CREATE INDEX BG_Gid ON bg(Gid);"); - - $sqlite_db->query("CREATE INDEX BI_Bid ON bi(Bid);"); - $sqlite_db->query("CREATE INDEX BI_Isbn ON bi(Isbn);"); - - $sqlite_db->query("CREATE INDEX BS_Bid ON bs(Bid);"); - $sqlite_db->query("CREATE INDEX BS_Sid ON bs(Sid);"); - - $sqlite_db->query("CREATE INDEX VE_Vid ON ve(Vid);"); - - $sqlite_db->query("commit;"); - - $sqlite_db->query("vacuum;"); -} - -$mysql_srvr = 'localhost'; -$mysql_user = 'root'; -$mysql_pass = ''; -$mysql_base = 'flibusta'; -$sqlitefile = './flibusta.db'; - -include('settings.php'); - -$sqlite_db = new PDO('sqlite:'.$sqlitefile); -$mysql_db = new mysqli($mysql_srvr, $mysql_user, $mysql_pass, $mysql_base); -$mysql_db->query("SET NAMES utf8"); - -create_tables($sqlite_db); - -convert_Auth($mysql_db, $sqlite_db); -convert_Book($mysql_db, $sqlite_db); -convert_Seqn($mysql_db, $sqlite_db); -convert_BkAuth($mysql_db, $sqlite_db); -convert_BkSeqn($mysql_db, $sqlite_db); - -?> diff --git a/scripts/Flibusta/genres.php b/scripts/Flibusta/genres.php deleted file mode 100644 index efa24cb1..00000000 --- a/scripts/Flibusta/genres.php +++ /dev/null @@ -1,142 +0,0 @@ -<?php - -function GenreCode($s) -{ - global $genreArray; - if(!isset($genreArray)){ - $genreArray = array( - "sf_history" => "11", - "sf_action" => "12", - "sf_epic" => "13", - "sf_heroic" => "14", - "sf_detective" => "15", - "sf_cyberpunk" => "16", - "sf_space" => "17", - "sf_social" => "18", - "sf_horror" => "19", - "sf_humor" => "1A", - "sf_fantasy" => "1B", - "sf" => "10", - "det_classic" => "21", - "det_police" => "22", - "det_action" => "23", - "det_irony" => "24", - "det_history" => "25", - "det_espionage" => "26", - "det_crime" => "27", - "det_political" => "28", - "det_maniac" => "29", - "det_hard" => "2A", - "thriller" => "2B", - "detective" => "20", - "prose_classic" => "31", - "prose_history" => "32", - "prose_contemporary" => "33", - "prose_counter" => "34", - "prose_rus_classic" => "35", - "prose_su_classics" => "36", - "prose_military" => "37", - "prose" => "30", - "love_contemporary" => "41", - "love_history" => "42", - "love_detective" => "43", - "love_short" => "44", - "love_erotica" => "45", - "love" => "40", - "adv_western" => "51", - "adv_history" => "52", - "adv_indian" => "53", - "adv_maritime" => "54", - "adv_geo" => "55", - "adv_animal" => "56", - "adventure" => "50", - "child_tale" => "61", - "child_verse" => "62", - "child_prose" => "63", - "child_sf" => "64", - "child_det" => "65", - "child_adv" => "66", - "child_education" => "67", - "children" => "60", - "poetry" => "71", - "dramaturgy" => "72", - "antique_ant" => "81", - "antique_european" => "82", - "antique_russian" => "83", - "antique_east" => "84", - "antique_myths" => "85", - "antique" => "80", - "sci_history" => "91", - "sci_psychology" => "92", - "sci_culture" => "93", - "sci_religion" => "94", - "sci_philosophy" => "95", - "sci_politics" => "96", - "sci_business" => "97", - "sci_juris" => "98", - "sci_linguistic" => "99", - "sci_medicine" => "9A", - "sci_phys" => "9B", - "sci_math" => "9C", - "sci_chem" => "9D", - "sci_biology" => "9E", - "sci_tech" => "9F", - "science" => "90", - "comp_www" => "A1", - "comp_programming" => "A2", - "comp_hard" => "A3", - "comp_soft" => "A4", - "comp_db" => "A5", - "comp_osnet" => "A6", - "computers" => "A0", - "ref_encyc" => "B1", - "ref_dict" => "B2", - "ref_ref" => "B3", - "ref_guide" => "B4", - "reference" => "B0", - "nonf_biography" => "C1", - "nonf_publicism" => "C2", - "nonf_criticism" => "C3", - "design" => "C4", - "nonfiction" => "C5", - "religion_rel" => "D1", - "religion_esoterics" => "D2", - "religion_self" => "D3", - "religion" => "D0", - "humor_anecdote" => "E1", - "humor_prose" => "E2", - "humor_verse" => "E3", - "humor" => "E0", - "home_cooking" => "F1", - "home_pets" => "F2", - "home_crafts" => "F3", - "home_entertain" => "F4", - "home_health" => "F5", - "home_garden" => "F6", - "home_diy" => "F7", - "home_sport" => "F8", - "home_sex" => "F9", - "home" => "F0", - "geo_guides" => "FA", - "job_hunting" => "01", - "management" => "02", - "marketing" => "03", - "banking" => "04", - "stock" => "05", - "accounting" => "06", - "global_economy" => "07", - "economics" => "00", - "industries" => "08", - "org_behavior" => "09", - "personal_finance" => "0A", - "real_estate" => "0B", - "popular_business" => "0C", - "small_business" => "0D", - "paper_work" => "0E", - "economics_ref" => "0F", - ); - } - return $genreArray[$s]; -} - -?> diff --git a/scripts/LibRusEc/convert.php b/scripts/LibRusEc/convert.php index 8540fd67..5959ff27 100644 --- a/scripts/LibRusEc/convert.php +++ b/scripts/LibRusEc/convert.php @@ -237,8 +237,6 @@ function FullImport($mysql_db, $file, $date) convert_dates($mysql_db, $sqlite_db, 0); create_indexes($sqlite_db); - - system("zip myrulib.zip $file"); } function DeltaImport($mysql_db, $date) @@ -292,6 +290,8 @@ $date = date('Ymd'); echo "Today: ".$date."\n"; FullImport($mysql_db, $sqlitefile, $date); +system("zip myrulib.db.zip $sqlitefile"); + DeltaImport($mysql_db, $date); ?> diff --git a/scripts/LibRusEc/genres.php b/scripts/LibRusEc/genres.php deleted file mode 100644 index efa24cb1..00000000 --- a/scripts/LibRusEc/genres.php +++ /dev/null @@ -1,142 +0,0 @@ -<?php - -function GenreCode($s) -{ - global $genreArray; - if(!isset($genreArray)){ - $genreArray = array( - "sf_history" => "11", - "sf_action" => "12", - "sf_epic" => "13", - "sf_heroic" => "14", - "sf_detective" => "15", - "sf_cyberpunk" => "16", - "sf_space" => "17", - "sf_social" => "18", - "sf_horror" => "19", - "sf_humor" => "1A", - "sf_fantasy" => "1B", - "sf" => "10", - "det_classic" => "21", - "det_police" => "22", - "det_action" => "23", - "det_irony" => "24", - "det_history" => "25", - "det_espionage" => "26", - "det_crime" => "27", - "det_political" => "28", - "det_maniac" => "29", - "det_hard" => "2A", - "thriller" => "2B", - "detective" => "20", - "prose_classic" => "31", - "prose_history" => "32", - "prose_contemporary" => "33", - "prose_counter" => "34", - "prose_rus_classic" => "35", - "prose_su_classics" => "36", - "prose_military" => "37", - "prose" => "30", - "love_contemporary" => "41", - "love_history" => "42", - "love_detective" => "43", - "love_short" => "44", - "love_erotica" => "45", - "love" => "40", - "adv_western" => "51", - "adv_history" => "52", - "adv_indian" => "53", - "adv_maritime" => "54", - "adv_geo" => "55", - "adv_animal" => "56", - "adventure" => "50", - "child_tale" => "61", - "child_verse" => "62", - "child_prose" => "63", - "child_sf" => "64", - "child_det" => "65", - "child_adv" => "66", - "child_education" => "67", - "children" => "60", - "poetry" => "71", - "dramaturgy" => "72", - "antique_ant" => "81", - "antique_european" => "82", - "antique_russian" => "83", - "antique_east" => "84", - "antique_myths" => "85", - "antique" => "80", - "sci_history" => "91", - "sci_psychology" => "92", - "sci_culture" => "93", - "sci_religion" => "94", - "sci_philosophy" => "95", - "sci_politics" => "96", - "sci_business" => "97", - "sci_juris" => "98", - "sci_linguistic" => "99", - "sci_medicine" => "9A", - "sci_phys" => "9B", - "sci_math" => "9C", - "sci_chem" => "9D", - "sci_biology" => "9E", - "sci_tech" => "9F", - "science" => "90", - "comp_www" => "A1", - "comp_programming" => "A2", - "comp_hard" => "A3", - "comp_soft" => "A4", - "comp_db" => "A5", - "comp_osnet" => "A6", - "computers" => "A0", - "ref_encyc" => "B1", - "ref_dict" => "B2", - "ref_ref" => "B3", - "ref_guide" => "B4", - "reference" => "B0", - "nonf_biography" => "C1", - "nonf_publicism" => "C2", - "nonf_criticism" => "C3", - "design" => "C4", - "nonfiction" => "C5", - "religion_rel" => "D1", - "religion_esoterics" => "D2", - "religion_self" => "D3", - "religion" => "D0", - "humor_anecdote" => "E1", - "humor_prose" => "E2", - "humor_verse" => "E3", - "humor" => "E0", - "home_cooking" => "F1", - "home_pets" => "F2", - "home_crafts" => "F3", - "home_entertain" => "F4", - "home_health" => "F5", - "home_garden" => "F6", - "home_diy" => "F7", - "home_sport" => "F8", - "home_sex" => "F9", - "home" => "F0", - "geo_guides" => "FA", - "job_hunting" => "01", - "management" => "02", - "marketing" => "03", - "banking" => "04", - "stock" => "05", - "accounting" => "06", - "global_economy" => "07", - "economics" => "00", - "industries" => "08", - "org_behavior" => "09", - "personal_finance" => "0A", - "real_estate" => "0B", - "popular_business" => "0C", - "small_business" => "0D", - "paper_work" => "0E", - "economics_ref" => "0F", - ); - } - return $genreArray[$s]; -} - -?> |