summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dibb <beandog@gentoo.org>2010-02-11 20:17:46 -0700
committerSteve Dibb <beandog@gentoo.org>2010-02-11 20:17:46 -0700
commit32a7a5f8d8b36ae6acb6e566ff3d371b7a145c4b (patch)
treef9b8efa8def14998bc8f7a4fed123cc34c98f8db
parentZero (diff)
downloadznurt-org-frontend-32a7a5f8d8b36ae6acb6e566ff3d371b7a145c4b.tar.gz
znurt-org-frontend-32a7a5f8d8b36ae6acb6e566ff3d371b7a145c4b.tar.bz2
znurt-org-frontend-32a7a5f8d8b36ae6acb6e566ff3d371b7a145c4b.zip
initial commit
-rw-r--r--about.php29
-rw-r--r--architectures.php104
-rw-r--r--base.php302
-rw-r--r--bugs.php18
-rw-r--r--cache.start.php35
-rw-r--r--categories.php39
-rw-r--r--category.php61
-rw-r--r--class.db.category.php51
-rw-r--r--class.db.ebuild.php150
-rw-r--r--class.db.mtime.php60
-rw-r--r--class.db.package.changelog.php49
-rw-r--r--class.db.package.manifest.php49
-rw-r--r--class.db.package.php112
-rw-r--r--class.db.package_use.php71
-rw-r--r--class.db.use.php81
-rw-r--r--css/cs.css9
-rw-r--r--css/de.css9
-rw-r--r--css/es.css9
-rw-r--r--css/gr.css9
-rw-r--r--css/master.css634
-rw-r--r--css/tr.css9
-rw-r--r--ebuild.php16
-rw-r--r--favicon.icobin0 -> 19493 bytes
-rw-r--r--feeds.php66
-rw-r--r--images/cat_minions.jpgbin0 -> 36466 bytes
-rw-r--r--images/dune-cat.jpgbin0 -> 40198 bytes
-rw-r--r--images/fail_cat.jpgbin0 -> 65493 bytes
-rw-r--r--images/failboat.jpgbin0 -> 16907 bytes
-rw-r--r--images/funny-pictures-cat-activates-secret-door.jpgbin0 -> 36970 bytes
-rw-r--r--images/funny-pictures-cat-loves-coffee.jpgbin0 -> 41307 bytes
-rw-r--r--images/funny-pictures-cat-will-destroy-your-work.jpgbin0 -> 49536 bytes
-rw-r--r--images/funny-pictures-darth-vader-cat.jpgbin0 -> 23954 bytes
-rw-r--r--images/funny-pictures-kitten-kills-with-his-eye.jpgbin0 -> 34299 bytes
-rw-r--r--images/funny-pictures-pirate-cat-grimaces.jpgbin0 -> 48112 bytes
-rw-r--r--images/gbot-s.gifbin0 -> 2223 bytes
-rw-r--r--images/gridtest.gifbin0 -> 3199 bytes
-rw-r--r--images/gtop-s.jpgbin0 -> 3157 bytes
-rw-r--r--images/gtop-www.jpgbin0 -> 6117 bytes
-rw-r--r--images/line.gifbin0 -> 46 bytes
-rw-r--r--images/o-hai-googlz-i-can-has-privacy.jpgbin0 -> 29875 bytes
-rw-r--r--images/packages_gentoo_logo.jpgbin0 -> 3638 bytes
-rw-r--r--images/ubeantoo.jpgbin0 -> 21833 bytes
-rw-r--r--images/xml.gifbin0 -> 373 bytes
-rw-r--r--img/bullet.pngbin0 -> 139 bytes
-rw-r--r--img/czech_gentoo_ebuilds.pngbin0 -> 22987 bytes
-rw-r--r--img/flags/ad.pngbin0 -> 643 bytes
-rw-r--r--img/flags/ae.pngbin0 -> 408 bytes
-rw-r--r--img/flags/af.pngbin0 -> 604 bytes
-rw-r--r--img/flags/ag.pngbin0 -> 591 bytes
-rw-r--r--img/flags/ai.pngbin0 -> 643 bytes
-rw-r--r--img/flags/al.pngbin0 -> 600 bytes
-rw-r--r--img/flags/am.pngbin0 -> 497 bytes
-rw-r--r--img/flags/an.pngbin0 -> 488 bytes
-rw-r--r--img/flags/ao.pngbin0 -> 428 bytes
-rw-r--r--img/flags/ar.pngbin0 -> 506 bytes
-rw-r--r--img/flags/as.pngbin0 -> 647 bytes
-rw-r--r--img/flags/at.pngbin0 -> 403 bytes
-rw-r--r--img/flags/au.pngbin0 -> 673 bytes
-rw-r--r--img/flags/aw.pngbin0 -> 524 bytes
-rw-r--r--img/flags/ax.pngbin0 -> 663 bytes
-rw-r--r--img/flags/az.pngbin0 -> 589 bytes
-rw-r--r--img/flags/ba.pngbin0 -> 593 bytes
-rw-r--r--img/flags/bb.pngbin0 -> 585 bytes
-rw-r--r--img/flags/bd.pngbin0 -> 504 bytes
-rw-r--r--img/flags/be.pngbin0 -> 449 bytes
-rw-r--r--img/flags/bf.pngbin0 -> 497 bytes
-rw-r--r--img/flags/bg.pngbin0 -> 462 bytes
-rw-r--r--img/flags/bh.pngbin0 -> 457 bytes
-rw-r--r--img/flags/bi.pngbin0 -> 675 bytes
-rw-r--r--img/flags/bj.pngbin0 -> 486 bytes
-rw-r--r--img/flags/bm.pngbin0 -> 611 bytes
-rw-r--r--img/flags/bn.pngbin0 -> 639 bytes
-rw-r--r--img/flags/bo.pngbin0 -> 500 bytes
-rw-r--r--img/flags/br.pngbin0 -> 593 bytes
-rw-r--r--img/flags/bs.pngbin0 -> 526 bytes
-rw-r--r--img/flags/bt.pngbin0 -> 631 bytes
-rw-r--r--img/flags/bv.pngbin0 -> 512 bytes
-rw-r--r--img/flags/bw.pngbin0 -> 443 bytes
-rw-r--r--img/flags/by.pngbin0 -> 514 bytes
-rw-r--r--img/flags/bz.pngbin0 -> 600 bytes
-rw-r--r--img/flags/ca.pngbin0 -> 628 bytes
-rw-r--r--img/flags/catalonia.pngbin0 -> 398 bytes
-rw-r--r--img/flags/cc.pngbin0 -> 625 bytes
-rw-r--r--img/flags/cd.pngbin0 -> 528 bytes
-rw-r--r--img/flags/cf.pngbin0 -> 614 bytes
-rw-r--r--img/flags/cg.pngbin0 -> 521 bytes
-rw-r--r--img/flags/ch.pngbin0 -> 367 bytes
-rw-r--r--img/flags/ci.pngbin0 -> 453 bytes
-rw-r--r--img/flags/ck.pngbin0 -> 586 bytes
-rw-r--r--img/flags/cl.pngbin0 -> 450 bytes
-rw-r--r--img/flags/cm.pngbin0 -> 525 bytes
-rw-r--r--img/flags/cn.pngbin0 -> 472 bytes
-rw-r--r--img/flags/co.pngbin0 -> 483 bytes
-rw-r--r--img/flags/cr.pngbin0 -> 477 bytes
-rw-r--r--img/flags/cs.pngbin0 -> 439 bytes
-rw-r--r--img/flags/cu.pngbin0 -> 563 bytes
-rw-r--r--img/flags/cv.pngbin0 -> 529 bytes
-rw-r--r--img/flags/cx.pngbin0 -> 608 bytes
-rw-r--r--img/flags/cy.pngbin0 -> 428 bytes
-rw-r--r--img/flags/cz.pngbin0 -> 476 bytes
-rw-r--r--img/flags/de.pngbin0 -> 545 bytes
-rw-r--r--img/flags/dj.pngbin0 -> 572 bytes
-rw-r--r--img/flags/dk.pngbin0 -> 495 bytes
-rw-r--r--img/flags/dm.pngbin0 -> 620 bytes
-rw-r--r--img/flags/do.pngbin0 -> 508 bytes
-rw-r--r--img/flags/dz.pngbin0 -> 582 bytes
-rw-r--r--img/flags/ec.pngbin0 -> 500 bytes
-rw-r--r--img/flags/ee.pngbin0 -> 429 bytes
-rw-r--r--img/flags/eg.pngbin0 -> 465 bytes
-rw-r--r--img/flags/eh.pngbin0 -> 508 bytes
-rw-r--r--img/flags/england.pngbin0 -> 496 bytes
-rw-r--r--img/flags/er.pngbin0 -> 653 bytes
-rw-r--r--img/flags/es.pngbin0 -> 469 bytes
-rw-r--r--img/flags/et.pngbin0 -> 592 bytes
-rw-r--r--img/flags/europeanunion.pngbin0 -> 479 bytes
-rw-r--r--img/flags/fam.pngbin0 -> 532 bytes
-rw-r--r--img/flags/fi.pngbin0 -> 489 bytes
-rw-r--r--img/flags/fj.pngbin0 -> 610 bytes
-rw-r--r--img/flags/fk.pngbin0 -> 648 bytes
-rw-r--r--img/flags/fm.pngbin0 -> 552 bytes
-rw-r--r--img/flags/fo.pngbin0 -> 474 bytes
-rw-r--r--img/flags/fr.pngbin0 -> 545 bytes
-rw-r--r--img/flags/ga.pngbin0 -> 489 bytes
-rw-r--r--img/flags/gb.pngbin0 -> 599 bytes
-rw-r--r--img/flags/gd.pngbin0 -> 637 bytes
-rw-r--r--img/flags/ge.pngbin0 -> 594 bytes
-rw-r--r--img/flags/gf.pngbin0 -> 545 bytes
-rw-r--r--img/flags/gh.pngbin0 -> 490 bytes
-rw-r--r--img/flags/gi.pngbin0 -> 463 bytes
-rw-r--r--img/flags/gl.pngbin0 -> 470 bytes
-rw-r--r--img/flags/gm.pngbin0 -> 493 bytes
-rw-r--r--img/flags/gn.pngbin0 -> 480 bytes
-rw-r--r--img/flags/gp.pngbin0 -> 488 bytes
-rw-r--r--img/flags/gq.pngbin0 -> 537 bytes
-rw-r--r--img/flags/gr.pngbin0 -> 487 bytes
-rw-r--r--img/flags/gs.pngbin0 -> 630 bytes
-rw-r--r--img/flags/gt.pngbin0 -> 493 bytes
-rw-r--r--img/flags/gu.pngbin0 -> 509 bytes
-rw-r--r--img/flags/gw.pngbin0 -> 516 bytes
-rw-r--r--img/flags/gy.pngbin0 -> 645 bytes
-rw-r--r--img/flags/hk.pngbin0 -> 527 bytes
-rw-r--r--img/flags/hm.pngbin0 -> 673 bytes
-rw-r--r--img/flags/hn.pngbin0 -> 537 bytes
-rw-r--r--img/flags/hr.pngbin0 -> 524 bytes
-rw-r--r--img/flags/ht.pngbin0 -> 487 bytes
-rw-r--r--img/flags/hu.pngbin0 -> 432 bytes
-rw-r--r--img/flags/id.pngbin0 -> 430 bytes
-rw-r--r--img/flags/ie.pngbin0 -> 481 bytes
-rw-r--r--img/flags/il.pngbin0 -> 431 bytes
-rw-r--r--img/flags/in.pngbin0 -> 503 bytes
-rw-r--r--img/flags/io.pngbin0 -> 658 bytes
-rw-r--r--img/flags/iq.pngbin0 -> 515 bytes
-rw-r--r--img/flags/ir.pngbin0 -> 512 bytes
-rw-r--r--img/flags/is.pngbin0 -> 532 bytes
-rw-r--r--img/flags/it.pngbin0 -> 420 bytes
-rw-r--r--img/flags/jm.pngbin0 -> 637 bytes
-rw-r--r--img/flags/jo.pngbin0 -> 473 bytes
-rw-r--r--img/flags/jp.pngbin0 -> 420 bytes
-rw-r--r--img/flags/ke.pngbin0 -> 569 bytes
-rw-r--r--img/flags/kg.pngbin0 -> 510 bytes
-rw-r--r--img/flags/kh.pngbin0 -> 549 bytes
-rw-r--r--img/flags/ki.pngbin0 -> 656 bytes
-rw-r--r--img/flags/km.pngbin0 -> 577 bytes
-rw-r--r--img/flags/kn.pngbin0 -> 604 bytes
-rw-r--r--img/flags/kp.pngbin0 -> 561 bytes
-rw-r--r--img/flags/kr.pngbin0 -> 592 bytes
-rw-r--r--img/flags/kw.pngbin0 -> 486 bytes
-rw-r--r--img/flags/ky.pngbin0 -> 643 bytes
-rw-r--r--img/flags/kz.pngbin0 -> 616 bytes
-rw-r--r--img/flags/la.pngbin0 -> 563 bytes
-rw-r--r--img/flags/lb.pngbin0 -> 517 bytes
-rw-r--r--img/flags/lc.pngbin0 -> 520 bytes
-rw-r--r--img/flags/li.pngbin0 -> 537 bytes
-rw-r--r--img/flags/lk.pngbin0 -> 627 bytes
-rw-r--r--img/flags/lr.pngbin0 -> 466 bytes
-rw-r--r--img/flags/ls.pngbin0 -> 628 bytes
-rw-r--r--img/flags/lt.pngbin0 -> 508 bytes
-rw-r--r--img/flags/lu.pngbin0 -> 481 bytes
-rw-r--r--img/flags/lv.pngbin0 -> 465 bytes
-rw-r--r--img/flags/ly.pngbin0 -> 419 bytes
-rw-r--r--img/flags/ma.pngbin0 -> 432 bytes
-rw-r--r--img/flags/mc.pngbin0 -> 380 bytes
-rw-r--r--img/flags/md.pngbin0 -> 566 bytes
-rw-r--r--img/flags/me.pngbin0 -> 448 bytes
-rw-r--r--img/flags/mg.pngbin0 -> 453 bytes
-rw-r--r--img/flags/mh.pngbin0 -> 628 bytes
-rw-r--r--img/flags/mk.pngbin0 -> 664 bytes
-rw-r--r--img/flags/ml.pngbin0 -> 474 bytes
-rw-r--r--img/flags/mm.pngbin0 -> 483 bytes
-rw-r--r--img/flags/mn.pngbin0 -> 492 bytes
-rw-r--r--img/flags/mo.pngbin0 -> 588 bytes
-rw-r--r--img/flags/mp.pngbin0 -> 597 bytes
-rw-r--r--img/flags/mq.pngbin0 -> 655 bytes
-rw-r--r--img/flags/mr.pngbin0 -> 569 bytes
-rw-r--r--img/flags/ms.pngbin0 -> 614 bytes
-rw-r--r--img/flags/mt.pngbin0 -> 420 bytes
-rw-r--r--img/flags/mu.pngbin0 -> 496 bytes
-rw-r--r--img/flags/mv.pngbin0 -> 542 bytes
-rw-r--r--img/flags/mw.pngbin0 -> 529 bytes
-rw-r--r--img/flags/mx.pngbin0 -> 574 bytes
-rw-r--r--img/flags/my.pngbin0 -> 571 bytes
-rw-r--r--img/flags/mz.pngbin0 -> 584 bytes
-rw-r--r--img/flags/na.pngbin0 -> 647 bytes
-rw-r--r--img/flags/nc.pngbin0 -> 591 bytes
-rw-r--r--img/flags/ne.pngbin0 -> 537 bytes
-rw-r--r--img/flags/nf.pngbin0 -> 602 bytes
-rw-r--r--img/flags/ng.pngbin0 -> 482 bytes
-rw-r--r--img/flags/ni.pngbin0 -> 508 bytes
-rw-r--r--img/flags/nl.pngbin0 -> 453 bytes
-rw-r--r--img/flags/no.pngbin0 -> 512 bytes
-rw-r--r--img/flags/np.pngbin0 -> 443 bytes
-rw-r--r--img/flags/nr.pngbin0 -> 527 bytes
-rw-r--r--img/flags/nu.pngbin0 -> 572 bytes
-rw-r--r--img/flags/nz.pngbin0 -> 639 bytes
-rw-r--r--img/flags/om.pngbin0 -> 478 bytes
-rw-r--r--img/flags/pa.pngbin0 -> 519 bytes
-rw-r--r--img/flags/pe.pngbin0 -> 397 bytes
-rw-r--r--img/flags/pf.pngbin0 -> 498 bytes
-rw-r--r--img/flags/pg.pngbin0 -> 593 bytes
-rw-r--r--img/flags/ph.pngbin0 -> 538 bytes
-rw-r--r--img/flags/pk.pngbin0 -> 569 bytes
-rw-r--r--img/flags/pl.pngbin0 -> 374 bytes
-rw-r--r--img/flags/pm.pngbin0 -> 689 bytes
-rw-r--r--img/flags/pn.pngbin0 -> 657 bytes
-rw-r--r--img/flags/pr.pngbin0 -> 556 bytes
-rw-r--r--img/flags/ps.pngbin0 -> 472 bytes
-rw-r--r--img/flags/pt.pngbin0 -> 554 bytes
-rw-r--r--img/flags/pw.pngbin0 -> 550 bytes
-rw-r--r--img/flags/py.pngbin0 -> 473 bytes
-rw-r--r--img/flags/qa.pngbin0 -> 450 bytes
-rw-r--r--img/flags/re.pngbin0 -> 545 bytes
-rw-r--r--img/flags/ro.pngbin0 -> 495 bytes
-rw-r--r--img/flags/rs.pngbin0 -> 423 bytes
-rw-r--r--img/flags/ru.pngbin0 -> 420 bytes
-rw-r--r--img/flags/rw.pngbin0 -> 533 bytes
-rw-r--r--img/flags/sa.pngbin0 -> 551 bytes
-rw-r--r--img/flags/sb.pngbin0 -> 624 bytes
-rw-r--r--img/flags/sc.pngbin0 -> 608 bytes
-rw-r--r--img/flags/scotland.pngbin0 -> 649 bytes
-rw-r--r--img/flags/sd.pngbin0 -> 492 bytes
-rw-r--r--img/flags/se.pngbin0 -> 542 bytes
-rw-r--r--img/flags/sg.pngbin0 -> 468 bytes
-rw-r--r--img/flags/sh.pngbin0 -> 645 bytes
-rw-r--r--img/flags/si.pngbin0 -> 510 bytes
-rw-r--r--img/flags/sj.pngbin0 -> 512 bytes
-rw-r--r--img/flags/sk.pngbin0 -> 562 bytes
-rw-r--r--img/flags/sl.pngbin0 -> 436 bytes
-rw-r--r--img/flags/sm.pngbin0 -> 502 bytes
-rw-r--r--img/flags/sn.pngbin0 -> 532 bytes
-rw-r--r--img/flags/so.pngbin0 -> 527 bytes
-rw-r--r--img/flags/sr.pngbin0 -> 513 bytes
-rw-r--r--img/flags/st.pngbin0 -> 584 bytes
-rw-r--r--img/flags/sv.pngbin0 -> 501 bytes
-rw-r--r--img/flags/sy.pngbin0 -> 422 bytes
-rw-r--r--img/flags/sz.pngbin0 -> 643 bytes
-rw-r--r--img/flags/tc.pngbin0 -> 624 bytes
-rw-r--r--img/flags/td.pngbin0 -> 570 bytes
-rw-r--r--img/flags/tf.pngbin0 -> 527 bytes
-rw-r--r--img/flags/tg.pngbin0 -> 562 bytes
-rw-r--r--img/flags/th.pngbin0 -> 452 bytes
-rw-r--r--img/flags/tj.pngbin0 -> 496 bytes
-rw-r--r--img/flags/tk.pngbin0 -> 638 bytes
-rw-r--r--img/flags/tl.pngbin0 -> 514 bytes
-rw-r--r--img/flags/tm.pngbin0 -> 593 bytes
-rw-r--r--img/flags/tn.pngbin0 -> 495 bytes
-rw-r--r--img/flags/to.pngbin0 -> 426 bytes
-rw-r--r--img/flags/tr.pngbin0 -> 492 bytes
-rw-r--r--img/flags/tt.pngbin0 -> 617 bytes
-rw-r--r--img/flags/tv.pngbin0 -> 536 bytes
-rw-r--r--img/flags/tw.pngbin0 -> 465 bytes
-rw-r--r--img/flags/tz.pngbin0 -> 642 bytes
-rw-r--r--img/flags/ua.pngbin0 -> 446 bytes
-rw-r--r--img/flags/ug.pngbin0 -> 531 bytes
-rw-r--r--img/flags/um.pngbin0 -> 571 bytes
-rw-r--r--img/flags/us.pngbin0 -> 609 bytes
-rw-r--r--img/flags/uy.pngbin0 -> 532 bytes
-rw-r--r--img/flags/uz.pngbin0 -> 515 bytes
-rw-r--r--img/flags/va.pngbin0 -> 553 bytes
-rw-r--r--img/flags/vc.pngbin0 -> 577 bytes
-rw-r--r--img/flags/ve.pngbin0 -> 528 bytes
-rw-r--r--img/flags/vg.pngbin0 -> 630 bytes
-rw-r--r--img/flags/vi.pngbin0 -> 616 bytes
-rw-r--r--img/flags/vn.pngbin0 -> 474 bytes
-rw-r--r--img/flags/vu.pngbin0 -> 604 bytes
-rw-r--r--img/flags/wales.pngbin0 -> 652 bytes
-rw-r--r--img/flags/wf.pngbin0 -> 554 bytes
-rw-r--r--img/flags/ws.pngbin0 -> 476 bytes
-rw-r--r--img/flags/ye.pngbin0 -> 413 bytes
-rw-r--r--img/flags/yt.pngbin0 -> 593 bytes
-rw-r--r--img/flags/za.pngbin0 -> 642 bytes
-rw-r--r--img/flags/zm.pngbin0 -> 500 bytes
-rw-r--r--img/flags/zw.pngbin0 -> 574 bytes
-rw-r--r--img/fresh_ebuilds_logo.pngbin0 -> 22928 bytes
-rw-r--r--img/german_ebuilds_logo.pngbin0 -> 23053 bytes
-rw-r--r--img/greek_gentoo_ebuilds.pngbin0 -> 23319 bytes
-rw-r--r--img/header_background.jpgbin0 -> 27280 bytes
-rw-r--r--img/hr.pngbin0 -> 129 bytes
-rw-r--r--img/hr_dotted.pngbin0 -> 146 bytes
-rw-r--r--img/icon_asterisk_orange.pngbin0 -> 760 bytes
-rw-r--r--img/icon_attach.pngbin0 -> 391 bytes
-rw-r--r--img/icon_bricks.pngbin0 -> 825 bytes
-rw-r--r--img/icon_bugs.pngbin0 -> 774 bytes
-rw-r--r--img/icon_changelog.pngbin0 -> 703 bytes
-rw-r--r--img/icon_database_table.pngbin0 -> 726 bytes
-rw-r--r--img/icon_disk.pngbin0 -> 620 bytes
-rw-r--r--img/icon_drive_network.pngbin0 -> 585 bytes
-rw-r--r--img/icon_email.pngbin0 -> 641 bytes
-rw-r--r--img/icon_flag_purple.pngbin0 -> 656 bytes
-rw-r--r--img/icon_folder.pngbin0 -> 537 bytes
-rw-r--r--img/icon_forums.pngbin0 -> 557 bytes
-rw-r--r--img/icon_gpnl.pngbin0 -> 786 bytes
-rw-r--r--img/icon_group.pngbin0 -> 753 bytes
-rw-r--r--img/icon_homepage.pngbin0 -> 806 bytes
-rw-r--r--img/icon_image.pngbin0 -> 516 bytes
-rw-r--r--img/icon_images.pngbin0 -> 661 bytes
-rw-r--r--img/icon_layout.pngbin0 -> 480 bytes
-rw-r--r--img/icon_layout_sidebar.pngbin0 -> 479 bytes
-rw-r--r--img/icon_package.pngbin0 -> 853 bytes
-rw-r--r--img/icon_rss.pngbin0 -> 1149 bytes
-rw-r--r--img/icon_similar.pngbin0 -> 309 bytes
-rw-r--r--img/icon_source.pngbin0 -> 507 bytes
-rw-r--r--img/icon_tag_purple.pngbin0 -> 599 bytes
-rw-r--r--img/icon_timeline_marker.pngbin0 -> 327 bytes
-rw-r--r--img/icon_tux.pngbin0 -> 696 bytes
-rw-r--r--img/icon_twitter.pngbin0 -> 593 bytes
-rw-r--r--img/icon_wiki.pngbin0 -> 480 bytes
-rw-r--r--img/icon_world.pngbin0 -> 923 bytes
-rw-r--r--img/icon_znurt.pngbin0 -> 9108 bytes
-rw-r--r--img/nav_bg.pngbin0 -> 199 bytes
-rw-r--r--img/nav_bg_center.jpgbin0 -> 371 bytes
-rw-r--r--img/nav_bg_left.pngbin0 -> 858 bytes
-rw-r--r--img/nav_bg_right.pngbin0 -> 869 bytes
-rw-r--r--img/nav_divider.pngbin0 -> 121 bytes
-rw-r--r--img/next_page.pngbin0 -> 385 bytes
-rw-r--r--img/nuevos_ebuilds_logo.pngbin0 -> 23346 bytes
-rw-r--r--img/package_background.pngbin0 -> 735 bytes
-rw-r--r--img/package_background_old.pngbin0 -> 604 bytes
-rw-r--r--img/prev_page.pngbin0 -> 443 bytes
-rw-r--r--img/search.pngbin0 -> 262 bytes
-rw-r--r--img/sevenl.pngbin0 -> 3213 bytes
-rw-r--r--img/sidebar_background.pngbin0 -> 196 bytes
-rw-r--r--img/subscribe.pngbin0 -> 1474 bytes
-rw-r--r--img/tanBox_bottom.jpgbin0 -> 381 bytes
-rw-r--r--img/tanBox_top.jpgbin0 -> 376 bytes
-rw-r--r--img/turkish_gentoo_ebuilds.pngbin0 -> 22907 bytes
-rw-r--r--img/vr_dotted.gifbin0 -> 73 bytes
-rw-r--r--img/znurt_icon_64x64.pngbin0 -> 4589 bytes
-rw-r--r--inc.content1.php12
-rw-r--r--inc.content2.php22
-rw-r--r--inc.footer.php9
-rw-r--r--inc.gentoo.php75
-rw-r--r--inc.header1.php433
-rw-r--r--inc.header2.php62
-rw-r--r--inc.header3.php2
-rw-r--r--inc.i18n.php65
-rw-r--r--inc.package.php294
-rw-r--r--index.php14
-rw-r--r--license.php43
-rw-r--r--licenses.php36
-rw-r--r--linguas.php39
-rw-r--r--locale/cs_CZ/LC_MESSAGES/messages.mobin0 -> 6086 bytes
-rw-r--r--locale/cs_CZ/LC_MESSAGES/messages.po438
-rw-r--r--locale/de_DE/LC_MESSAGES/messages.mobin0 -> 4640 bytes
-rw-r--r--locale/de_DE/LC_MESSAGES/messages.po437
-rw-r--r--locale/es_US/LC_MESSAGES/messages.mobin0 -> 3862 bytes
-rw-r--r--locale/es_US/LC_MESSAGES/messages.po394
-rw-r--r--locale/fr_FR/LC_MESSAGES/messages.mobin0 -> 6116 bytes
-rw-r--r--locale/fr_FR/LC_MESSAGES/messages.po454
-rw-r--r--locale/it_IT/LC_MESSAGES/messages.mobin0 -> 6062 bytes
-rw-r--r--locale/it_IT/LC_MESSAGES/messages.po438
-rw-r--r--locale/tr_TR/LC_MESSAGES/messages.mobin0 -> 5764 bytes
-rw-r--r--locale/tr_TR/LC_MESSAGES/messages.po437
-rw-r--r--nav.legend.php12
-rw-r--r--nav.meta.php26
-rw-r--r--nav.primary.php13
-rw-r--r--nav.recent_changes.php35
-rw-r--r--nav.search.php9
-rw-r--r--nav.social_media.php8
-rw-r--r--new.php79
-rw-r--r--new_packages.php49
-rw-r--r--package.php18
-rw-r--r--preferences.php87
-rw-r--r--prototype.js4874
-rw-r--r--requests.php41
-rw-r--r--search.php124
-rw-r--r--useflag.php48
-rw-r--r--useflags.php40
-rw-r--r--xml.package.php58
-rw-r--r--xml.php242
389 files changed, 11439 insertions, 0 deletions
diff --git a/about.php b/about.php
new file mode 100644
index 0000000..a950a39
--- /dev/null
+++ b/about.php
@@ -0,0 +1,29 @@
+<?
+
+ require_once 'inc.header1.php';
+
+ $str = gettext("ABOUT");
+ echo "<h4>$str</h4>";
+
+ echo "<hr class='pkg_rule' style='margin-bottom: 15px; margin-top: 15px;'/>\n";
+
+ echo "<div class='about'>\n";
+
+ $str = gettext("You must be really bored if you're looking at this page.");
+
+ echo "<p>$str</p>\n";
+ echo "<p>".gettext("\"the fresh ebuilds\" is a site to track information about packages, ebuilds and their relative metadata supplied by <a href='http://www.gentoo.org/'>Gentoo Linux</a>.")."</p>\n";
+ echo "<p>".gettext("This site is not an official Gentoo website.")."</p>\n";
+ echo "<p>".gettext("Original Gentoo artwork and logos copyright &copy; Gentoo Foundation.")."</p>\n";
+ echo "<p>".sprintf(gettext("\"the fresh ebuilds\" original design and artwork by %s."), '"the fresh ebuilds"', "<a href='http://www.molanphydesign.com/'>Molanphy Design</a>")."</p>\n";
+ echo "<p>".sprintf(gettext("Icon set copyright &copy; %s."), "<a href='http://www.famfamfam.com/'>Mark James</a>")."</p>\n";
+ echo "<p>".sprintf(gettext("Original code and site maintenance by %s."), "<a href='http://wonkabar.org/'>Steve Dibb</a>")."</p>\n";
+ echo "<p>".sprintf(gettext("Powered by %s and lots of chocolate-chip cookies."), "<a href='http://www.gentoo.org/'>Gentoo Linux</a>, <a href='http://httpd.apache.org/'>Apache 2</a>, <a href='http://www.php.net/'>PHP 5</a>, <a href='http://www.postgresql.org/'>PostgreSQL 8</a>")."</p>\n";
+
+ if($locale == "de_DE") {
+ echo "<p>Übersetzung durch <a href='http://dev.gentoo.org/~patrick/'>Patrick Lauer</a> und <a href='http://gentoo.faulhammer.org/'>Christian Faulhammer</a>.\n";
+ }
+
+ echo "</div>\n";
+
+?> \ No newline at end of file
diff --git a/architectures.php b/architectures.php
new file mode 100644
index 0000000..9175af6
--- /dev/null
+++ b/architectures.php
@@ -0,0 +1,104 @@
+<script type='text/javascript'>
+</script>
+<?
+
+ $arr_chunk = array_chunk($arr_arch, round(count($arr_arch) / 4));
+
+ $str = gettext("ARCHITECTURES");
+ echo "<h4>$str</h4>\n";
+
+// Common::pre($_COOKIE['arch']);
+
+ echo "<hr class='pkg_rule' style='margin-bottom: 15px; margin-top: 15px;'/>\n";
+
+ echo "<div class='about'>\n";
+
+ $str = gettext("Pick the architectures to display:");
+
+ if($lingua == 'en') {
+ echo "<p>Gentoo supports a lot of architectures, which makes things interesting (especially for coding this site). By default, Znurt only shows the \"main\" Linux arches, but there are a lot more available.</p>\n";
+
+ echo "<p>If you want to display other ones, you can select your preferences here, which will be stored in a cookie.</p>\n";
+ } elseif($lingua == 'es') {
+ echo "<p>Elige las arquitecturas que quieres ver:</p>\n";
+ } elseif($lingua == "de") {
+ echo "<p>Anzuzeigende Architekturen auswählen:</p>\n";
+ }
+
+ $x = 0;
+
+ echo "<form method='get' action='preferences.php' id='architectures' autocomplete='off'>\n";
+ echo "<input type='hidden' name='section' value='architectures'>\n";
+ $str = gettext("Submit");
+ echo "<div><input type='submit' value='Yay, cookies!' name='submit'>";
+ $str = gettext("Reset Architectures");
+ if(count($_COOKIE['arch']))
+ echo " &nbsp; <input type='submit' value='Reset Arches' name='submit'>";
+ echo "</div>\n";
+
+ echo "<p><table cellpadding='0' cellspacing='0' style='width: 100%;'>\n";
+ echo "<tr>\n";
+
+ foreach($arr_chunk as $arr) {
+
+ echo "<td valign='top'>\n";
+ echo "<table cellpadding='4' cellspacing='0' style='width: 100%;'>\n";
+
+ $x = 0;
+
+ foreach($arr as $name) {
+
+ $class = getRowClass($x++);
+
+ $str = "";
+ if(in_array($name, $arr_display_arch))
+ $str = "checked";
+
+ echo "<tr class='$class'><td><input type='checkbox' name='arch[$name]' value='1' $str></td><td>$name</td></tr>\n";
+
+ }
+
+ echo "</table>\n";
+ echo "</td>\n";
+
+ }
+
+ echo "</tr>\n";
+ echo "</table></p>\n";
+
+ echo "</form>\n";
+
+ echo "<div id='js_options' style='display: none;'>\n";
+ $str = gettext("Select All");
+ echo "<input type='button' id='select_all' value='Select All'> &nbsp; ";
+ $str = gettext("Select None");
+ echo "<input type='button' id='select_none' value='Select None'> &nbsp; ";
+ $str = gettext("Reset");
+ echo "<input type='button' value='Reset' onclick=\"Form.reset('architectures');\">";
+ echo "</div>\n";
+
+ echo "</div>\n";
+
+
+?>
+<script type='text/javascript'>
+
+ var checkboxes = $$('#architectures input[type=checkbox]');
+ var check_all = $('select_all');
+ var check_none = $('select_none');
+
+ check_all.observe('click', function() {
+ checkboxes.each(function(box) {
+ box.checked = true;
+ });
+ });
+
+ check_none.observe('click', function() {
+ checkboxes.each(function(box) {
+ box.checked = false;
+ });
+ });
+
+ $('js_options').show();
+
+</script> \ No newline at end of file
diff --git a/base.php b/base.php
new file mode 100644
index 0000000..5071e97
--- /dev/null
+++ b/base.php
@@ -0,0 +1,302 @@
+<?
+
+ require_once 'inc.header1.php';
+
+ $arr_package_sections = array('changelog', 'bugs', 'dependencies', 'downloads', 'license', 'useflags');
+ $arr_ebuild_sections = array('dependencies', 'downloads', 'license', 'source', 'useflags');
+
+ $str = rawurldecode($_SERVER['REQUEST_URI']);
+
+ if($base_uri != "/")
+ $str = str_replace($base_uri, "", $str);
+
+ // FIXME should rely on this function
+ $arr_url = parse_url($_SERVER['REQUEST_URI']);
+
+ if($arr_url['query'])
+ $str = str_replace("?".$arr_url['query'], "", $str);
+
+ $arr = explode("/", $str);
+
+ foreach($arr as $value) {
+ $value = trim($value);
+ if(!empty($value))
+ $uri[] = $value;
+ }
+
+ if(count($uri) == 1) {
+
+ if(is_numeric($uri[0])) {
+
+ $body = 'home';
+ $page = $uri[0];
+ $view = 'new';
+ $file = "new.php";
+
+ } else {
+
+ switch($uri[0]) {
+
+ case 'about':
+ case $url_about:
+ $file = 'about.php';
+ $html_title = gettext('the fresh ebuilds').' ~ '.gettext('about');
+ break;
+
+ case 'arch':
+ case $url_arch:
+ $nocache = true;
+ $body = "arch";
+ $file = "architectures.php";
+ $html_title = gettext("architectures");
+ break;
+
+ case 'categories':
+ case $url_categories:
+ $body = 'categories';
+ $view = 'category';
+ $file = 'categories.php';
+ $html_title = gettext("categories");
+ break;
+
+ case 'bugs':
+ $file = 'bugs.php';
+ $html_title = gettext('the fresh ebuilds').' ~ '.gettext('bugs');
+ break;
+
+ case 'es':
+ $lingua = 'es';
+ $locale = "es_US";
+ $body = 'home';
+ $view = 'new';
+ $file = "new.php";
+ break;
+
+ case 'feeds':
+ case $url_feeds:
+ $file = "feeds.php";
+ $html_title = gettext("xml feeds");
+ break;
+
+ case 'licenses':
+ $body = 'licenses';
+ $file = "licenses.php";
+ $html_title = gettext("licenses");
+ break;
+
+ case 'linguas':
+ case $url_linguas;
+ $body = 'linguas';
+ $file = "linguas.php";
+ $html_title = gettext("linguas");
+ break;
+
+ case 'new_ebuilds':
+ $body = 'new_ebuilds';
+ $file = 'new_ebuilds.php';
+ $html_title = 'new ebuilds';
+ break;
+
+ case 'new_packages':
+ case $url_new_packages:
+ $body = 'new_packages';
+ $file = 'new_packages.php';
+ $html_title = gettext('new packages');
+ break;
+
+ case 'requests':
+ $file = 'requests.php';
+ $html_title = gettext('the fresh ebuilds').' ~ '.gettext('feature requests');
+ break;
+
+ case 'search':
+ $file = "search.php";
+ $html_title = gettext("advanced search");
+ break;
+
+ case 'useflags':
+ case $url_useflags:
+ $body = 'useflags';
+ $file = "useflags.php";
+ $html_title = gettext("use flags");
+ break;
+ }
+ }
+
+ if(!$file) {
+ $sql = "SELECT name, id FROM category;";
+ $categories = $db->getAssoc($sql);
+
+ if(count($categories) && in_array($uri[0], array_keys($categories))) {
+ $category_id = $categories[$uri[0]];
+ $view = 'category';
+ $file = "category.php";
+ $html_title = $uri[0];
+ }
+ }
+
+ } elseif((count($uri) == 2 && !$file) || (count($uri) == 3 && $uri[2] == "xml")) {
+
+ switch($uri[0]) {
+
+ case 'arch':
+ $body = 'home';
+ $arch = $uri[1];
+ $view = 'new';
+ $file = "new.php";
+ $html_title = $uri[1]." ".gettext("architecture");
+ break;
+
+ case 'licenses':
+ $file = "license.php";
+ $html_title = gettext("licenses");
+ $license_name = $uri[1];
+ break;
+
+ case 'new_ebuilds':
+ $body = 'new_ebuilds';
+ $file = 'new_ebuilds.php';
+ $html_title = gettext('new ebuilds');
+ $page = $uri[1];
+ break;
+
+ case 'new_packages':
+ $body = 'new_packages';
+ $file = 'new_packages.php';
+ $html_title = gettext('new packages');
+ $page = $uri[1];
+ break;
+
+ case 'search':
+ $file = "search.php";
+ $html_title = gettext("search");
+ break;
+
+ case 'useflags':
+ $sql = "SELECT COUNT(1) FROM use WHERE name = ".$db->quote($uri[1]).";";
+ $count = $db->getOne($sql);
+ if($count) {
+ $useflag_name = $uri[1];
+ $file = "useflag.php";
+ $html_title = gettext("use flags")." ~ ".$uri[1];
+ } else {
+ $file = "useflags.php";
+ $html_title = gettext("use flags");
+ }
+ break;
+ }
+
+ if(!$file) {
+ // Check to see if its a package
+ $sql = "SELECT package FROM ebuilds WHERE category_name = ".$db->quote($uri[0])." AND package_name = ".$db->quote($uri[1])." LIMIT 1;";
+ $package_id = $db->getOne($sql);
+
+ if($package_id) {
+ $view = 'package';
+ $file = 'package.php';
+
+ $html_title = $uri[0]." ~ ".$uri[1];
+ }
+
+// if($uri[2] == 'xml') {
+// $xml = true;
+// $file = 'xml.package.php';
+// }
+ }
+
+ } elseif(count($uri) == 3 && !$file) {
+
+ if(in_array($uri[2], $arr_package_sections)) {
+
+ // Check to see if its a package
+ $sql = "SELECT package FROM ebuilds WHERE category_name = ".$db->quote($uri[0])." AND package_name = ".$db->quote($uri[1])." LIMIT 1;";
+ $package_id = $db->getOne($sql);
+
+ if($package_id) {
+ $view = 'package';
+ $file = 'package.php';
+ $section = $uri[2];
+ $html_title = $uri[0]." ~ ".$uri[1];
+ }
+
+ }
+
+ if($uri[0] == "arch" && is_numeric($uri[2])) {
+ $arch = $uri[1];
+ $page = $uri[2];
+ $view = 'new';
+ $file = "new.php";
+
+ $html_title = $uri[1]." ".gettext("architecture");
+
+ }
+
+ if(!$file) {
+ // Check to see if its a package
+ $sql = "SELECT id AS ebuild_id, package AS package_id FROM ebuilds WHERE category_name = ".$db->quote($uri[0])." AND package_name = ".$db->quote($uri[1])." AND pf = ".$db->quote($uri[2]).";";
+ $row = $db->getRow($sql);
+
+ if(is_array($row)) {
+ $view = 'ebuild';
+ extract($row);
+ $file = 'ebuild.php';
+ $html_title = $uri[0]." ~ ".$uri[2];
+ }
+ }
+
+ } elseif(count($uri) == 4 && !$file) {
+
+ if(in_array($uri[3], $arr_ebuild_sections)) {
+ // Check to see if its a package
+ $sql = "SELECT id AS ebuild_id, package AS package_id FROM ebuilds WHERE category_name = ".$db->quote($uri[0])." AND package_name = ".$db->quote($uri[1])." AND pf = ".$db->quote($uri[2]).";";
+ $row = $db->getRow($sql);
+
+ if(is_array($row)) {
+ $view = 'ebuild';
+ extract($row);
+ $file = 'ebuild.php';
+ $html_title = $uri[0]." ~ ".$uri[2];
+ $section = $uri[3];
+ }
+ }
+
+ }
+
+ if($file) {
+
+ if(substr(php_sapi_name(), 0, 3) == 'cgi') {
+ header('Status: 200', TRUE);
+ } else {
+ header("HTTP/1.1 200 OK", true, 200);
+ }
+
+// if(!$xml) {
+
+ if($lingua != "en")
+ require 'inc.i18n.php';
+
+ require_once 'inc.header2.php';
+ require_once 'inc.header3.php';
+ require_once 'inc.content1.php';
+ require_once($file);
+// }
+
+
+ } else {
+
+ // Will return 404
+ require_once 'inc.header2.php';
+ require_once 'inc.header3.php';
+ require_once 'inc.content1.php';
+
+ echo "<h4>Um, whut?</h4>";
+
+ echo "<div align='center'><img src='".$base_uri."images/failboat.jpg' /></div>\n";
+
+// print_r($uri);
+ }
+
+ if(!$xml)
+ require_once 'inc.content2.php';
+
+?> \ No newline at end of file
diff --git a/bugs.php b/bugs.php
new file mode 100644
index 0000000..618f4c0
--- /dev/null
+++ b/bugs.php
@@ -0,0 +1,18 @@
+<?
+ $str = gettext("BUGS");
+ echo "<h4>$str</h4>";
+
+ echo "<hr class='pkg_rule' style='margin-bottom: 15px; margin-top: 15px;'/>\n";
+
+ echo "<div class='about'>\n";
+ echo "<p>First bug is, set up a decent bug tracker.</p>\n";
+ echo "<p>In the meantime, here's some known bugs:</p>\n";
+ echo "<ul>\n";
+ echo "<li> package mask check is too aggressive, overlaps on entries with same package</li>\n";
+ echo "<li> import &lt;pkg&gt; reference from metadata for use flag descriptions</li>\n";
+ echo "</ul>\n";
+
+ echo "</div>\n";
+
+
+?> \ No newline at end of file
diff --git a/cache.start.php b/cache.start.php
new file mode 100644
index 0000000..c3b8270
--- /dev/null
+++ b/cache.start.php
@@ -0,0 +1,35 @@
+<?
+
+ if(!$nocache) {
+ require_once 'Cache/Lite.php';
+
+ $cache_id = md5($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
+
+ if($_COOKIE)
+ $cache_id = md5($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] . md5(implode(" ", array_keys($_COOKIE))));
+
+ // Use /tmp/znurt if we can hack it
+ if((!is_dir("/tmp/znurt") && mkdir("/tmp/znurt")) || (is_dir("/tmp/znurt") && is_writable("/tmp/znurt")))
+ $cache_tmp_dir = "/tmp/znurt/";
+ else
+ $cache_tmp_dir = "/tmp/";
+
+ $cache_options = array(
+ 'cacheDir' => $cache_tmp_dir,
+ 'lifeTime' => 3600,
+ );
+
+ $cache = new Cache_Lite($cache_options);
+ if($znurt && $data = $cache->get($cache_id)) {
+ echo $data;
+ die;
+ }
+
+ // Start caching if on live site
+ if($znurt && !$nocache) {
+ // Start caching
+ ob_start();
+ }
+ }
+
+?> \ No newline at end of file
diff --git a/categories.php b/categories.php
new file mode 100644
index 0000000..bb08275
--- /dev/null
+++ b/categories.php
@@ -0,0 +1,39 @@
+<?
+ require_once 'inc.header1.php';
+ require_once 'inc.header2.php';
+ require_once 'inc.header3.php';
+ require_once 'inc.content1.php';
+
+ require_once 'class.db.category.php';
+
+ $sql = "SELECT name, description FROM category ORDER BY name;";
+ $arr = $db->getAssoc($sql);
+
+ $str = gettext('CATEGORIES');
+ echo "<h4>$str</h4>\n";
+
+ echo "<div class='about'>\n";
+
+ echo "<hr class='pkg_rule' style='margin-bottom: 15px; margin-top: 15px;'/>\n";
+
+ echo "<table style='padding-bottom: 25px;' cellpadding='4' cellspacing='0'>\n";
+
+ $x = 0;
+
+ foreach($arr as $category_name => $description) {
+
+ $class = getRowClass($x++);
+
+ echo "\t<tr class='$class'>\n";
+ echo "\t\t<td valign='top'><a href='$base_uri$category_name'>$category_name</a></td>\n";
+ echo "\t\t<td>$description</td>\n";
+ echo "\t</tr>\n";
+
+ }
+
+ echo "</table>\n";
+
+ echo "</div>\n";
+
+ require_once 'inc.content2.php';
+?> \ No newline at end of file
diff --git a/category.php b/category.php
new file mode 100644
index 0000000..ddc7c6a
--- /dev/null
+++ b/category.php
@@ -0,0 +1,61 @@
+<?
+
+ require_once 'class.db.category.php';
+
+ if($category_id) {
+
+ $obj = new DBCategory($category_id);
+
+ $name = $obj->name;
+ $description = $obj->description;
+
+ $url = $base_uri."categories";
+
+ echo "<h4>$name</h4>";
+
+ echo "<div class='description'>$description</div>";
+
+ $sql = "SELECT package_name, package, id AS ebuild FROM ebuilds WHERE category = ".$db->quote($category_id).";";
+ $arr = $db->getAll($sql);
+
+ foreach($arr as $row) {
+ extract($row);
+ $arr_packages[$package][] = $ebuild;
+ $arr_name[$package] = $package_name;
+ }
+
+ foreach($arr_packages as $package => $arr) {
+ if(count($arr)) {
+
+ $e = new DBEbuild(current($arr));
+ $arr_desc[$package] = $e->description;
+
+ $div_versions .= keywordsRow($arr, 'category');
+ }
+ }
+
+ foreach(array_keys($arr_packages) as $package) {
+
+ $name = $arr_name[$package];
+ $desc = $arr_desc[$package];
+
+ $div_names .= "<tr>\n";
+ $div_names .= "<td class='use' valign='top' style='white-space: nowrap;'><a href='$name/' style='color: black;'>$name</a></td>\n";
+ $div_names .= "<td class='use' valign='top'>$desc</td>\n";
+ $div_names .= "</tr>\n";
+
+ }
+
+ echo "<div id='names' style='display: none;'>\n";
+ echo "<table class='content centerpage'>\n";
+ echo $div_names;
+ echo "</table>\n";
+ echo "</div>\n";
+
+ echo "<div id='versions'>\n";
+ echo $div_versions;
+ echo "</div>\n";
+
+ }
+
+?> \ No newline at end of file
diff --git a/class.db.category.php b/class.db.category.php
new file mode 100644
index 0000000..8ad8456
--- /dev/null
+++ b/class.db.category.php
@@ -0,0 +1,51 @@
+<?
+
+ class DBCategory {
+
+ private $id;
+ private $name;
+ private $arr_keys;
+ private $table;
+ private $arr_db;
+ private $description;
+
+ function __construct($id) {
+
+ if(!is_numeric($id))
+ $id = 0;
+ $this->id = $id;
+
+ $db =& MDB2::singleton();
+ $this->table = 'category';
+
+ // Go ahead and query as much as we can
+ $sql = "SELECT * FROM ".$this->table." WHERE id = ".$db->quote($this->id).";";
+ $this->arr_db = $db->getRow($sql);
+
+ $this->arr_keys = array_keys($this->arr_db);
+ unset($this->arr_keys['id']);
+
+ }
+
+ public function __get($var) {
+ if(in_array($var, $this->arr_keys)) {
+ return $this->arr_db[$var];
+ } else {
+ return $this->$var;
+ }
+ }
+
+ public function __set($var, $value) {
+
+ $db =& MDB2::singleton();
+
+ if(in_array($var, $this->arr_keys)) {
+ $arr_update = array($var => $value);
+ $db->autoExecute($this->table, $arr_update, MDB2_AUTOQUERY_UPDATE, "id = ".$db->quote($this->id));
+ $this->$var = $value;
+ }
+ }
+
+ }
+
+?> \ No newline at end of file
diff --git a/class.db.ebuild.php b/class.db.ebuild.php
new file mode 100644
index 0000000..1ff654e
--- /dev/null
+++ b/class.db.ebuild.php
@@ -0,0 +1,150 @@
+<?
+
+ class DBEbuild {
+
+ private $package;
+ private $arr_db;
+ private $arr_cols;
+ private $arr_keys;
+ private $table;
+ private $id;
+ private $description;
+ private $homepage;
+ private $keywords;
+
+ function __construct($id) {
+
+ if(!is_numeric($id))
+ $id = 0;
+ $this->id = $id;
+
+ $db =& MDB2::singleton();
+
+ $this->table = 'ebuild';
+
+ // Go ahead and query as much as we can
+ $sql = "SELECT * FROM view_ebuild WHERE id = $id;";
+ $this->arr_db = $db->getRow($sql);
+
+ $this->arr_keys = array_keys($this->arr_db);
+ unset($this->arr_keys['id']);
+
+ $this->arr_cols = array('package', 'pf', 'pv', 'pr', 'pvr', 'alpha', 'beta', 'pre', 'rc', 'p', 'version', 'slot', 'portage_mtime', 'cache_mtime', 'status', 'ev', 'lvl');
+
+ }
+
+ public function __get($var) {
+
+ if($var == 'masked') {
+ return ( $this->arr_db['masked'] == 't' ? true : false );
+ }
+
+ if(is_null($this->$var)) {
+
+ if(in_array($var, $this->arr_keys))
+ return $this->arr_db[$var];
+
+ switch($var) {
+
+ case 'description':
+ return $this->getDescription();
+ break;
+
+ case 'homepage':
+ return $this->getHomepage();
+ break;
+
+ case 'licenses':
+ return $this->getLicenses();
+ break;
+
+ case 'keywords':
+ return $this->getKeywords();
+ break;
+
+ }
+
+ }
+
+ return $this->$var;
+ }
+
+ public function __set($var, $value) {
+
+ $db =& MDB2::singleton();
+
+ if(in_array($var, $this->arr_cols)) {
+ $arr_update = array($var => $value);
+ $db->autoExecute($this->table, $arr_update, MDB2_AUTOQUERY_UPDATE, "id = ".$db->quote($this->id));
+ $this->arr_db[$var] = $value;
+ }
+ }
+
+ // Strings
+ public function getDescription() {
+
+ $db =& MDB2::singleton();
+
+ $var = 'description';
+
+ if(!is_null($this->$var))
+ return $this->$var;
+
+ $sql = "SELECT TRIM(em.value) FROM ebuild_metadata em INNER JOIN ebuild e ON em.ebuild = e.id AND e.id = ".$db->quote($this->id)." WHERE em.keyword = 'description'ORDER BY e.cache_mtime DESC LIMIT 1;";
+ $value = $db->getOne($sql);
+
+ return $this->$var = $value;
+
+ }
+
+ public function getHomepage() {
+
+ $db =& MDB2::singleton();
+
+ $var = 'homepage';
+
+ if(!is_null($this->$var))
+ return $this->$var;
+
+ $sql = "SELECT TRIM(eh.homepage) FROM ebuild_homepage eh INNER JOIN ebuild e ON eh.ebuild = e.id AND e.id = ".$db->quote($this->id)." ORDER BY e.cache_mtime DESC LIMIT 1;";
+ $value = $db->getOne($sql);
+
+ return $this->$var = $value;
+
+ }
+
+ public function getLicenses() {
+
+ $db =& MDB2::singleton();
+
+ $var = 'licenses';
+
+ if(!is_null($this->$var))
+ return $this->$var;
+
+ $sql = "SELECT license, name FROM view_licenses WHERE ebuild = ".$db->quote($this->id)." ORDER BY name;";
+ $value = $db->getAssoc($sql);
+
+ return $this->$var = $value;
+
+ }
+
+ public function getKeywords() {
+
+ $db =& MDB2::singleton();
+
+ $var = 'keywords';
+
+ if(!is_null($this->$var))
+ return $this->$var;
+
+ $sql = "SELECT name, status FROM view_arches WHERE ebuild = ".$db->quote($this->id)." ORDER BY name;";
+ $value = $db->getAssoc($sql);
+
+ return $this->$var = $value;
+
+ }
+
+ }
+
+?> \ No newline at end of file
diff --git a/class.db.mtime.php b/class.db.mtime.php
new file mode 100644
index 0000000..e1773fd
--- /dev/null
+++ b/class.db.mtime.php
@@ -0,0 +1,60 @@
+<?
+
+ class DBMtime {
+
+ private $filename;
+ private $filemtime;
+ private $mtime;
+
+ function __construct($filename) {
+
+ $db =& MDB2::singleton();
+
+ $this->filename = $filename;
+
+ if(file_exists($filename))
+ $this->filemtime = filemtime($filename);
+
+ $sql = "SELECT mtime FROM mtime WHERE filename = ".$db->quote($this->filename).";";
+
+ $this->mtime = $db->getOne($sql);
+
+ }
+
+ public function __get($var) {
+ return $this->$var;
+ }
+
+ public function __set($var, $value) {
+
+ $db =& MDB2::singleton();
+
+ if($var == 'mtime') {
+
+ $udate = $db->getOne("SELECT NOW();");
+
+ if(is_null($this->mtime)) {
+
+ $arr_insert = array(
+ 'filename' => $this->filename,
+ 'mtime' => $value,
+ );
+
+ $db->autoExecute('mtime', $arr_insert, MDB2_AUTOQUERY_INSERT);
+ } else {
+
+ $arr_update = array(
+ 'mtime' => $value,
+ 'udate' => $udate,
+ );
+
+ $db->autoExecute('mtime', $arr_update, MDB2_AUTOQUERY_UPDATE, "filename = ".$db->quote($this->filename));
+ }
+
+ }
+
+ }
+
+ }
+
+?> \ No newline at end of file
diff --git a/class.db.package.changelog.php b/class.db.package.changelog.php
new file mode 100644
index 0000000..dccca30
--- /dev/null
+++ b/class.db.package.changelog.php
@@ -0,0 +1,49 @@
+<?
+
+ class DBPackageChangelog {
+
+ private $package;
+ private $name;
+ private $table;
+ private $arr_keys;
+ private $arr_db;
+
+ function __construct($package) {
+
+ if(!is_numeric($package))
+ $package = 0;
+
+ $db =& MDB2::singleton();
+ $this->table = 'package_changelog';
+
+ // Go ahead and query as much as we can
+ $sql = "SELECT * FROM ".$this->table." WHERE package = ".$db->quote($package).";";
+ $this->arr_db = $db->getRow($sql);
+
+ $this->arr_keys = array_keys($this->arr_db);
+ unset($this->arr_keys['package']);
+
+ }
+
+ public function __get($var) {
+ if(in_array($var, $this->arr_keys)) {
+ return $this->arr_db[$var];
+ } else {
+ return $this->$var;
+ }
+ }
+
+ public function __set($var, $value) {
+
+ $db =& MDB2::singleton();
+
+ if(in_array($var, $this->arr_keys)) {
+ $arr_update = array($var => $value);
+ $db->autoExecute($this->table, $arr_update, MDB2_AUTOQUERY_UPDATE, "package = ".$db->quote($this->package));
+ $this->arr_db[$var] = $value;
+ }
+ }
+
+ }
+
+?> \ No newline at end of file
diff --git a/class.db.package.manifest.php b/class.db.package.manifest.php
new file mode 100644
index 0000000..daf9f93
--- /dev/null
+++ b/class.db.package.manifest.php
@@ -0,0 +1,49 @@
+<?
+
+ class DBPackageManifest {
+
+ private $package;
+ private $name;
+ private $table;
+ private $arr_keys;
+ private $arr_db;
+
+ function __construct($package) {
+
+ if(!is_numeric($package))
+ $package = 0;
+
+ $db =& MDB2::singleton();
+ $this->table = 'package_manifest';
+
+ // Go ahead and query as much as we can
+ $sql = "SELECT * FROM ".$this->table." WHERE package = ".$db->quote($package).";";
+ $this->arr_db = $db->getRow($sql);
+
+ $this->arr_keys = array_keys($this->arr_db);
+ unset($this->arr_keys['package']);
+
+ }
+
+ public function __get($var) {
+ if(in_array($var, $this->arr_keys)) {
+ return $this->arr_db[$var];
+ } else {
+ return $this->$var;
+ }
+ }
+
+ public function __set($var, $value) {
+
+ $db =& MDB2::singleton();
+
+ if(in_array($var, $this->arr_keys)) {
+ $arr_update = array($var => $value);
+ $db->autoExecute($this->table, $arr_update, MDB2_AUTOQUERY_UPDATE, "package = ".$db->quote($this->package));
+ $this->arr_db[$var] = $value;
+ }
+ }
+
+ }
+
+?> \ No newline at end of file
diff --git a/class.db.package.php b/class.db.package.php
new file mode 100644
index 0000000..dd7ecbd
--- /dev/null
+++ b/class.db.package.php
@@ -0,0 +1,112 @@
+<?
+
+ class DBPackage {
+
+ private $id;
+ private $name;
+ private $table;
+ private $arr_keys;
+ private $arr_db;
+ private $changelog;
+ private $recent_changes;
+
+ function __construct($id) {
+
+ if(!is_numeric($id))
+ $id = 0;
+
+ $db =& MDB2::singleton();
+ $this->table = 'package';
+
+ // Go ahead and query as much as we can
+ $sql = "SELECT * FROM ".$this->table." WHERE id = ".$db->quote($id).";";
+ $this->arr_db = $db->getRow($sql);
+
+ $this->arr_keys = array_keys($this->arr_db);
+ unset($this->arr_keys['id']);
+
+ $this->id = $id;
+
+ }
+
+ public function __get($var) {
+ if(in_array($var, $this->arr_keys)) {
+ return $this->arr_db[$var];
+ } else {
+
+ switch($var) {
+ case 'changelog':
+ return $this->getChangelog();
+ break;
+
+ case 'recent_changes':
+ return $this->getRecentChanges();
+ break;
+ }
+
+ return $this->$var;
+ }
+ }
+
+ public function __set($var, $value) {
+
+ $db =& MDB2::singleton();
+
+ if(in_array($var, $this->arr_keys)) {
+ $arr_update = array($var => $value);
+ $db->autoExecute($this->table, $arr_update, MDB2_AUTOQUERY_UPDATE, "id = ".$db->quote($this->id));
+ $this->arr_db[$var] = $value;
+ }
+ }
+
+ public function getLicenses() {
+
+ $db =& MDB2::singleton();
+
+ $var = 'licenses';
+
+ if(!is_null($this->$var))
+ return $this->$var;
+
+ $sql = "SELECT DISTINCT license, name FROM view_licenses WHERE package = ".$db->quote($this->id)." ORDER BY name;";
+ $value = $db->getAssoc($sql);
+
+ return $this->$var = $value;
+
+ }
+
+ public function getChangelog() {
+
+ $db =& MDB2::singleton();
+
+ $var = 'changelog';
+
+ if(!is_null($this->$var))
+ return $this->$var;
+
+ $sql = "SELECT $var FROM package_changelog WHERE package = ".$db->quote($this->id).";";
+ $value = $db->getOne($sql);
+
+ return $this->$var = $value;
+
+ }
+
+ public function getRecentChanges() {
+
+ $db =& MDB2::singleton();
+
+ $var = 'recent_changes';
+
+ if(!is_null($this->$var))
+ return $this->$var;
+
+ $sql = "SELECT $var FROM package_changelog WHERE package = ".$db->quote($this->id).";";
+ $value = $db->getOne($sql);
+
+ return $this->$var = $value;
+
+ }
+
+ }
+
+?> \ No newline at end of file
diff --git a/class.db.package_use.php b/class.db.package_use.php
new file mode 100644
index 0000000..4aef84e
--- /dev/null
+++ b/class.db.package_use.php
@@ -0,0 +1,71 @@
+<?
+
+ class DBPackageUse {
+
+ private $id;
+ private $package;
+ private $use;
+ private $description;
+
+ function __construct($package, $use) {
+
+ $db =& MDB2::singleton();
+
+ $this->name = $name;
+
+ // Find out as much as we can
+// $sql = "SELECT pu.* FROM package_use pu INNER JOIN use u ON pu.use = u.id WHERE u.name = ".$db->quote($name).";";
+ $sql = "SELECT * FROM package_use WHERE package = ".$db->quote($package)." AND use = ".$db->quote($use).";";
+ $row = $db->getRow($sql);
+
+ if(is_array($row) && count($row)) {
+ foreach($row as $key => $value)
+ $this->$key = $value;
+ } else {
+ $this->package = $package;
+ $this->use = $use;
+ $this->createNew();
+ }
+
+ }
+
+ public function __get($var) {
+ return $this->$var;
+ }
+
+ public function __set($var, $value) {
+
+ $db =& MDB2::singleton();
+
+ if(in_array($var, array('package', 'use', 'description'))) {
+
+ $arr_update = array(
+ $var => $value,
+ );
+
+ $db->autoExecute('package_use', $arr_update, MDB2_AUTOQUERY_UPDATE, "id = ".$db->quote($this->id));
+
+ $this->$var = $value;
+
+ }
+
+ }
+
+ private function createNew() {
+
+ $db =& MDB2::singleton();
+
+ $arr_insert = array(
+ 'package' => $this->package,
+ 'use' => $this->use,
+ );
+
+ $db->autoExecute('package_use', $arr_insert, MDB2_AUTOQUERY_INSERT);
+
+ $this->id = $db->lastInsertID();
+
+ }
+
+ }
+
+?> \ No newline at end of file
diff --git a/class.db.use.php b/class.db.use.php
new file mode 100644
index 0000000..4458eb4
--- /dev/null
+++ b/class.db.use.php
@@ -0,0 +1,81 @@
+<?
+
+ class DBUse {
+
+ private $id;
+ private $name;
+ private $description;
+ private $prefix;
+ private $cp;
+ private $type;
+
+ function __construct($name, $type = 'global', $key = '') {
+
+ $db =& MDB2::singleton();
+
+ $this->name = $name;
+ $this->type = $type;
+
+ // Find out as much as we can
+ $sql = "SELECT * FROM use WHERE name = ".$db->quote($name)." $where;";
+ $row = $db->getRow($sql);
+
+ if(is_array($row) && count($row)) {
+ foreach($row as $key => $value)
+ $this->$key = $value;
+ } else {
+
+ if($this->type == 'local') {
+ $this->cp = $key;
+// $sql = "SELECT package FROM view_package WHERE cp = ".$db->quote($this->cp).";";
+// $this->package = $db->getOne($sql);
+ } elseif($this->type == 'expand') {
+ $this->prefix = $key;
+ }
+
+ $this->createNew();
+
+ }
+
+ }
+
+ public function __get($var) {
+ return $this->$var;
+ }
+
+ public function __set($var, $value) {
+
+ $db =& MDB2::singleton();
+
+ if(in_array($var, array('name', 'description', 'prefix'))) {
+
+ $arr_update = array(
+ $var => $value,
+ );
+
+ $db->autoExecute('use', $arr_update, MDB2_AUTOQUERY_UPDATE, "id = ".$db->quote($this->id));
+
+ $this->$var = $value;
+
+ }
+
+ }
+
+ private function createNew() {
+
+ $db =& MDB2::singleton();
+
+ $arr_insert = array('name' => $this->name);
+
+ if($this->type == 'expand' && $this->prefix)
+ $arr_insert['prefix'] = $this->prefix;
+
+ $db->autoExecute('use', $arr_insert, MDB2_AUTOQUERY_INSERT);
+
+ $this->id = $db->lastInsertID();
+
+ }
+
+ }
+
+?> \ No newline at end of file
diff --git a/css/cs.css b/css/cs.css
new file mode 100644
index 0000000..20f3012
--- /dev/null
+++ b/css/cs.css
@@ -0,0 +1,9 @@
+ #header #logo {
+ background: url('../img/czech_gentoo_ebuilds.png') no-repeat;
+ position: absolute;
+ width: 307px;
+ height: 123px;
+ display: block;
+ top: 30px;
+ left: 50px;
+ } \ No newline at end of file
diff --git a/css/de.css b/css/de.css
new file mode 100644
index 0000000..e2691ca
--- /dev/null
+++ b/css/de.css
@@ -0,0 +1,9 @@
+ #header #logo {
+ background: url('../img/german_ebuilds_logo.png') no-repeat;
+ position: absolute;
+ width: 307px;
+ height: 123px;
+ display: block;
+ top: 30px;
+ left: 50px;
+ } \ No newline at end of file
diff --git a/css/es.css b/css/es.css
new file mode 100644
index 0000000..a27fa3f
--- /dev/null
+++ b/css/es.css
@@ -0,0 +1,9 @@
+ #header #logo {
+ background: url('../img/nuevos_ebuilds_logo.png') no-repeat;
+ position: absolute;
+ width: 307px;
+ height: 123px;
+ display: block;
+ top: 30px;
+ left: 50px;
+ } \ No newline at end of file
diff --git a/css/gr.css b/css/gr.css
new file mode 100644
index 0000000..ff0a6a6
--- /dev/null
+++ b/css/gr.css
@@ -0,0 +1,9 @@
+ #header #logo {
+ background: url('../img/greek_gentoo_ebuilds.png') no-repeat;
+ position: absolute;
+ width: 307px;
+ height: 123px;
+ display: block;
+ top: 30px;
+ left: 50px;
+ } \ No newline at end of file
diff --git a/css/master.css b/css/master.css
new file mode 100644
index 0000000..220b15d
--- /dev/null
+++ b/css/master.css
@@ -0,0 +1,634 @@
+html, body {
+ height: 100%;
+}
+
+body {
+ margin: 0;
+ padding: 0;
+ background: #333;
+ font-family: Arial, Helvetica, Verdana, Sans-serif;
+ font-size: 12px;
+ line-height: 18px;
+ color: #333;
+}
+
+#wrapper {
+ width: 960px;
+ margin: 0 auto;
+ padding:0;
+/* background: #fff; */
+ background: #fff url('../img/sidebar_background.png') repeat-y right top;
+}
+
+/* -------------------------------------------------------- */
+/* HEADER */
+/* -------------------------------------------------------- */
+#header {
+ height: 198px;
+ background: url(../img/header_background.jpg) no-repeat;
+ position: relative;
+}
+
+ #header #logo {
+ background: url('../img/fresh_ebuilds_logo.png') no-repeat;
+ position: absolute;
+ width: 307px;
+ height: 123px;
+ display: block;
+ top: 30px;
+ left: 50px;
+ }
+
+ #header #logo h1 a {
+ width: 307px;
+ height: 123px;
+ display: block;
+ text-indent: -99999px;
+ }
+
+
+/* -------------------------------------------------------- */
+/* MAIN CONTENT AREA */
+/* -------------------------------------------------------- */
+#main {
+ width: 750px;
+ float: left;
+}
+
+ #sortBy {
+ margin-left: 30px;
+ margin-right: 15px;
+ }
+
+ #sortBy ul {
+ list-style: none;
+ margin: 0;
+ margin-top: 5px;
+ }
+
+ #sortBy ul li {
+ margin: 0;
+ padding: 0;
+ line-height: 40px;
+ height: 40px;
+ float: left;
+ }
+
+ #sortBy ul li a{
+ background: url('../img/nav_bg_center.jpg') repeat-x;
+ padding: 0 7px;
+ overflow: hidden;
+ display: block;
+ border-right: 1px solid #ccc;
+ text-decoration: none;
+ font-size: 11px;
+ }
+
+ #sortBy ul li.first a {
+ background: url('../img/nav_bg_left.png') no-repeat left top;
+ }
+
+ #sortBy ul li.last a{
+ background: url('../img/nav_bg_right.png') no-repeat right top;
+ border:none;
+ }
+
+ #sortBy ul li.first a:hover {
+ background-position: left bottom;
+ }
+
+ #sortBy ul li.last a:hover {
+ background-position: right bottom;
+ }
+
+ #sortBy ul li a:hover, #sortBy ul li a.active {
+ color: #fff;
+ text-decoration: none;
+ background-position: left bottom;
+ }
+
+ .package {
+ margin-bottom: 20px;
+ margin-top: 15px;
+ }
+
+ .pkg_container {
+ background: #e8e8e8;
+ width: 710px;
+ margin-left: 30px;
+ }
+
+ .pkg_name {
+ width: 400px;
+ height: 33px;
+ background: url('../img/package_background.png') no-repeat right top;
+ margin-left: -30px;
+ margin-top: -16px;
+ float:left;
+ }
+
+ .pkg_date {
+ padding: 10px 17px 15px 0;
+ font-size: 10px;
+ color: #666;
+ float: right;
+ }
+
+ .recent_changes, .description {
+ font-size: 11px;
+ color: #666;
+ margin: 0 0 0 25px;
+ }
+
+ /* Releases Table */
+ .releases {
+ border: 2px solid #999;
+ border-bottom: 1px solid #999;
+ margin: 0 0 10px 25px;
+ font-size: 10px;
+ line-height: 11px;
+ clear: both;
+ }
+ .releases tr {
+ background: #fff;
+ }
+
+ .releases td, .releases th {
+ font-family: Verdana;
+ width: 25px;
+ height: 20px;
+ padding: 3px 4px;
+ text-align: center;
+ border-right: 1px solid #999;
+ border-bottom: 1px solid #999;
+ }
+
+ .releases th {
+ font-family: Arial;
+ background-color: #efefef;
+ }
+
+ .releases td.first_cell {
+ width: 125px;
+ }
+
+ .releases td.first_cell a:link {
+ color: #bc3510;
+ }
+
+ .releases td.last_cell, .releases th.last_cell {
+ border-right: none;
+ }
+
+ .stable { background-color: #8ec743; }
+ .testing { background-color: #ffd800; }
+ .not_keyword { background-color: #ffffff; }
+ .not_avail { background-color: #e2ded2; }
+ .m_stable { background-color: #f28d90; }
+
+ /* End Releases Table */
+
+ .pkg_meta {
+ width: 710px;
+ margin: 10px 0 0 30px;
+ }
+ .pkg_desc {
+ width: 220px;
+ margin-right: 10px;
+ float: left;
+ }
+
+ .pkg_col {
+ width: 100px;
+ margin: 0 8px;
+ float: left;
+ }
+
+ .pkg_row {
+ padding-top: 12px;
+ margin-left: 50px;
+ }
+
+ .pkg_row li {
+ display: inline;
+ padding-right: 12px;
+ }
+
+ .pkg_col h4, .pkg_desc h4, .pkg_row h4 {
+ margin: 0;
+ padding: 0;
+ font-weight: normal;
+ font-size: 10px;
+ color: #999;
+ }
+
+ .vr_dotted {
+ width: 3px;
+ height: 100px;
+ background: url('../img/vr_dotted.gif') repeat-y;
+ float: left;
+ }
+
+ .pkg_col ul, .pkg_row ul {
+ list-style: none !important;
+ margin: 0;
+ }
+
+ .pkg_col li a, .pkg_row li a {
+ color: #bc3510 !important;
+ }
+
+
+ .pkg_col li.meta_cvs, .pkg_row li.meta_cvs { background: url('../img/icon_drive_network.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+
+ .pkg_col li.meta_useflags, .pkg_row li.meta_useflags { background: url('../img/icon_flag_purple.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+ .pkg_col li.meta_changelog, .pkg_row li.meta_changelog { background: url('../img/icon_changelog.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+ .pkg_col li.meta_dependencies, .pkg_row li.meta_dependencies { background: url('../img/icon_bricks.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+ .pkg_col li.meta_bugs, .pkg_row li.meta_bugs { background: url('../img/icon_bugs.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+ .pkg_col li.meta_forums, .pkg_row li.meta_forums { background: url('../img/icon_forums.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+ .pkg_col li.meta_source, .pkg_row li.meta_source { background: url('../img/icon_source.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+ .pkg_col li.meta_mailing_list, .pkg_row li.meta_mailing_list { background: url('../img/icon_email.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+ .pkg_col li.meta_downloads, .pkg_row li.meta_downloads { background: url('../img/icon_disk.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+ .pkg_col li.meta_license, .pkg_row li.meta_license { background: url('../img/icon_asterisk_orange.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+ .pkg_col li.meta_timeline_marker, .pkg_row li.meta_timeline_marker { background: url('../img/icon_timeline_marker.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+
+ .pkg_col li.meta_homepage, .pkg_row li.meta_homepage { background: url('../img/icon_homepage.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+ .pkg_col li.meta_wiki, .pkg_row li.meta_wiki { background: url('../img/icon_layout.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+ .pkg_col li.meta_package, .pkg_row li.meta_package { background: url('../img/icon_package.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+ .pkg_col li.meta_database_table, .pkg_row li.meta_database_table { background: url('../img/icon_database_table.png') no-repeat left top; padding-left: 23px; line-height: 25px; }
+
+ .pkg_row li.meta_homepage, .pkg_row li.meta_wiki, .pkg_row li.meta_package, .pkg_row li.meta_useflags, .pkg_row li.meta_bugs, .pkg_row li.meta_forums, .pkg_row li.meta_mailing_list, .pkg_row li.meta_changelog, .pkg_row li.meta_database_table {
+ padding-bottom: 2px;
+ }
+
+ #pagination {
+ width: 710px;
+ margin: 0 10px 0 0;
+ padding: 0;
+ float: right;
+ }
+ #pagination img {
+ margin: 7px 0 0 10px;
+ float: right;
+ }
+
+
+/* -------------------------------------------------------- */
+/* SIDEBAR */
+/* -------------------------------------------------------- */
+#sidebar {
+ width: 204px;
+ float: right;
+ background: #f4f1e9 url('../img/sidebar_background.png') repeat-y;
+}
+
+ #search {
+ margin-top: 10px;
+ padding-bottom: 10px;
+ }
+
+ .searchForm {
+ padding-left: 15px;
+ padding-top: 5px;
+ padding-bottom: 0;
+ margin: 0;
+ }
+
+ #search .search {
+ display: none;
+ }
+
+ #search .q {
+ }
+
+ #legend {
+ width: 177px;
+ background: #e2ded2;
+ margin: 20px 0 20px 15px;
+ }
+
+ #legend ul {
+ list-style: none;
+ margin: 10px 0 10px 6px;
+ }
+
+ #legend li {
+ width: 155px;
+ height: 20px;
+ line-height: 21px;
+ padding-left: 10px;
+ margin-bottom: 1px;
+ }
+
+ #legend .legend_top {
+ background: #e2ded2 url('../img/tanBox_top.jpg') no-repeat;
+ width: 177px;
+ height: 5px;
+ }
+
+ #legend .legend_bottom {
+ background: #e2ded2 url('../img/tanBox_bottom.jpg') no-repeat;
+ width: 177px;
+ height: 5px;
+ }
+
+ #social_media {
+
+ }
+
+ #social_media ul {
+ list-style: none;
+ margin: 0;
+ margin-left: 25px;
+ margin-top: 15px;
+ }
+
+ #social_media ul li {
+ height: 30px;
+ line-height: 23px;
+ padding-left: 30px;
+ }
+
+ #social_media ul li.feed {
+ background: url('../img/icon_rss.png') no-repeat top left;
+ }
+
+ #social_media li.twitter {
+ background: url('../img/icon_twitter.png') no-repeat top left;
+ }
+
+
+ .meta {
+ margin: 0;
+ padding: 10px 0;
+ padding-left: 20px;
+ }
+
+
+#footer {
+ clear: both;
+}
+
+
+/* -------------------------------------------------------- */
+/* Links and Navigation */
+/* -------------------------------------------------------- */
+.mainNav {
+ list-style-type: none;
+ margin: 0;
+ padding: 10px 0;
+ padding-left: 15px;
+}
+
+ ul.mainNav a {
+ display: block;
+ height: 25px;
+ width: 170px;
+ line-height: 25px;
+ color: #333;
+ text-decoration: none;
+ text-indent: 20px;
+ background: url(../img/nav_bg.png) no-repeat left top;
+ border:none;
+ }
+
+ ul.mainNav a:hover {
+ background: url(../img/nav_bg.png) no-repeat right top;
+ border:none;
+ }
+
+ ul.mainNav li {
+ /* fixes IE */
+ display: inline;
+ }
+
+
+/* Set active nav */
+/* These correspond to whatever you set as body id */
+#home ul.mainNav .home a,
+#new_packages ul.mainNav .new_packages a,
+#new_ebuilds ul.mainNav .new_ebuilds a,
+#categories ul.mainNav .categories a,
+#useflags ul.mainNav .useflags a,
+#licenses ul.mainNav .licenses a,
+#linguas ul.mainNav .linguas a,
+#about ul.mainNav .about a,
+#arch ul.mainNav .arch a,
+#bugs ul.mainNav .bugs a {
+ background: url('../img/nav_bg.png') no-repeat right top;
+}
+
+
+/* -------------------------------------------------------- */
+/* Typography */
+/* -------------------------------------------------------- */
+h2 {
+ margin: 10px 0 0 50px;
+ padding: 0;
+ font-weight: normal;
+ font-size: 26px;
+ line-height: 28px;
+ padding-bottom: 10px;
+ color: #44337a;
+ text-transform: capitalize;
+}
+
+h3 {
+ font-size: 16px;
+ line-height: 18px;
+ margin: 0;
+ padding: 0;
+ font-weight: normal;
+}
+
+h4 {
+ font-weight: bold;
+ color: #44337a;
+ font-size: 11px;
+ letter-spacing: 1px;
+ text-transform: uppercase;
+ margin: 0;
+ padding: 0;
+ margin-left: 14px;
+}
+
+p {
+ margin: 0;
+ padding: 0;
+ padding-bottom: 9px;
+ font-size: 12px;
+ line-height: 18px;
+ color: #333;
+}
+
+a {
+ outline: none;
+}
+
+code {
+ font-family:Courier;
+ margin: 0;
+ color: #666;
+ display: block;
+ font-size: 12px;
+ line-height: 14px;
+ padding: 0 20px 12px 20px;
+}
+
+.copyright {
+ font-size: 9px;
+ line-height: 11px;
+ color: #666;
+}
+
+/* -------------------------------------------------------- */
+/* Utilities */
+/* -------------------------------------------------------- */
+.clear {
+ clear: both;
+}
+
+input, form {
+ margin: 0;
+ padding: 0;
+ vertical-align: top;
+}
+
+hr {
+ border: none;
+ height: 1px;
+ background: #fff url(../img/hr.png) repeat-x;
+ width: 85%;
+}
+
+hr.pkg_rule {
+ border: none;
+ height: 3px;
+ background: url(../img/hr_dotted.png) no-repeat;
+ width: 95%;
+ margin-left: 30px;
+ margin-bottom: 50px;
+ color: #fff;
+}
+
+a:link, a:visited {
+ color: #bc3510;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #bc3510;
+ text-decoration: underline;
+}
+
+li a:link, li a:visited {
+ color: #333;
+ text-decoration: none;
+}
+
+li a:hover {
+ color: #bc3510;
+ text-decoration: underline;
+}
+
+h3 a:link, h3 a:visited {
+ color: #bc3510;
+ text-decoration: none;
+ border:0;
+}
+
+h3 a:hover {
+ text-decoration: underline;
+}
+
+h2 a:link, h2 a:visited {
+ color: #44347a;
+ text-decoration: none;
+ border: 0;
+}
+
+h2 a:hover {
+ text-decoration: underline;
+}
+
+a.pkg_link:link, a.pkg_link:visited {
+ font-size: 16px;
+ font-weight: bold;
+/* text-decoration: underline; */
+ color: #fff;
+ margin-left: 30px;
+ line-height: 32px;
+}
+
+ul {
+ margin-left: 32px;
+ padding: 0;
+}
+
+ul.recent_packages {
+ list-style-image: url(../img/bullet.png);
+}
+
+img, a {
+ text-decoration: none;
+ border: 0;
+}
+
+form, input {
+ margin: 0;
+ padding: 0;
+}
+
+table.categories {
+ margin: 0 25px 25px 30px;
+}
+
+table.useflags, table.dependencies, table.feeds, table.licenses {
+ margin: 0 5px 25px 15px;
+}
+
+table.bugs {
+ margin: 0 5px 10px 15px;
+}
+
+table tr.even {
+ background-color: #e8e8e8;
+}
+
+table tr.even a:visited, table tr.even a:link, table tr.odd a:visited, table tr.odd a:link {
+ color: black;
+ white-space: nowrap;
+ text-decoration: underline;
+}
+
+.changelog .date {
+ font-weight: bold;
+ color: #702570;
+}
+
+p.recent_changes, p.description {
+ color: black;
+}
+
+p.recent_changes a, p.description a {
+ color: black;
+
+}
+
+p.recent_changes a:hover, p.description a:hover {
+ text-decoration: none;
+ border-bottom: 1px dotted black;
+}
+
+p.recent_changes b, p.description b {
+ color: #941304;
+/* color: #666; */
+}
+
+div.description {
+ margin-left: 14px;
+}
+
+div.about {
+ margin: 0 5px 0 14px;
+} \ No newline at end of file
diff --git a/css/tr.css b/css/tr.css
new file mode 100644
index 0000000..62a7906
--- /dev/null
+++ b/css/tr.css
@@ -0,0 +1,9 @@
+ #header #logo {
+ background: url('../img/turkish_gentoo_ebuilds.png') no-repeat;
+ position: absolute;
+ width: 307px;
+ height: 123px;
+ display: block;
+ top: 30px;
+ left: 50px;
+ } \ No newline at end of file
diff --git a/ebuild.php b/ebuild.php
new file mode 100644
index 0000000..e367c40
--- /dev/null
+++ b/ebuild.php
@@ -0,0 +1,16 @@
+<?
+
+ if($ebuild_id) {
+
+ echo "<h4>Ebuild</h4>";
+
+ echo keywordsRow(array($ebuild_id), 'ebuild');
+
+ require_once 'class.db.ebuild.php';
+ require_once 'inc.package.php';
+
+
+ }
+
+
+?> \ No newline at end of file
diff --git a/favicon.ico b/favicon.ico
new file mode 100644
index 0000000..d1c55d5
--- /dev/null
+++ b/favicon.ico
Binary files differ
diff --git a/feeds.php b/feeds.php
new file mode 100644
index 0000000..e0ec3f7
--- /dev/null
+++ b/feeds.php
@@ -0,0 +1,66 @@
+<?
+
+ $arr_chunk = array_chunk($arr_arch, round(count($arr_arch) / 2));
+
+ $url = $base_uri."xml.php";
+
+ echo "<h4>".gettext("Subscription Feeds")."</h4>";
+
+ echo "<hr class='pkg_rule' style='margin-bottom: 15px; margin-top: 15px;'/>\n";
+
+ echo "<h4>".gettext("fresh ebuilds")."</h4>";
+
+ echo "<div class='about'>\n";
+
+ $dir = $base_uri."xml/fresh_ebuilds/";
+ $atom = $dir."atom.xml";
+ $rss = $dir."rss.xml";
+
+ echo "<p><table cellpadding='4' cellspacing='0' style='width: 50%;'>\n";
+
+ $x = 1;
+
+ $atom = $base_url."xml/feeds/fresh_ebuilds/atom.xml";
+ $rss = $base_url."xml/feeds/fresh_ebuilds/rss.xml";
+
+ echo "<tr class='odd'><td>".gettext("All Architectures")."</td><td><a href='$atom'>Atom</a></td><td><a href='$rss'>RSS</a></td></tr>\n";
+
+ foreach($arr_arch as $name) {
+
+ $url_name = urlencode($name);
+
+ $class = getRowClass($x++);
+
+ $atom = $base_url."xml/feeds/fresh_ebuilds/atom.$url_name.xml";
+ $rss = $base_url."xml/feeds/fresh_ebuilds/rss.$url_name.xml";
+
+ echo "<tr class='$class'><td style='width: 50%;'>$name</td><td style='width: 25%;'><a href='$atom'>Atom</a></td><td style='width: 25%;'><a href='$rss'>RSS</a></td></tr>\n";
+
+ }
+
+ echo "</table>\n";
+
+ echo "</div>\n";
+
+ echo "<hr class='pkg_rule' style='margin-bottom: 15px; margin-top: 15px;'/>\n";
+
+ echo "<h4>".gettext("new packages")."</h4>";
+
+ echo "<div class='about'>\n";
+
+ $atom = $base_url."xml/feeds/new_packages/atom.xml";
+ $rss = $base_url."xml/feeds/new_packages/rss.xml";
+
+ echo "<table cellpadding='4' cellspacing='0' style='width: 50%; padding-bottom: 25px;'>\n";
+ echo "\t<tr class='odd'>\n";
+ echo "<td style='width: 50%;'>".gettext("All Architectures")."</td><td style='width: 25%;'><a href='$atom'>Atom</a></td><td style='width: 25%;'><a href='$rss'>RSS</a></td>\n";
+ echo "\t</tr>\n";
+
+ $x = 1;
+
+ echo "</table>\n";
+
+ echo "</div>\n";
+
+
+?> \ No newline at end of file
diff --git a/images/cat_minions.jpg b/images/cat_minions.jpg
new file mode 100644
index 0000000..f4ce1b8
--- /dev/null
+++ b/images/cat_minions.jpg
Binary files differ
diff --git a/images/dune-cat.jpg b/images/dune-cat.jpg
new file mode 100644
index 0000000..4340412
--- /dev/null
+++ b/images/dune-cat.jpg
Binary files differ
diff --git a/images/fail_cat.jpg b/images/fail_cat.jpg
new file mode 100644
index 0000000..391bb4a
--- /dev/null
+++ b/images/fail_cat.jpg
Binary files differ
diff --git a/images/failboat.jpg b/images/failboat.jpg
new file mode 100644
index 0000000..1e1d06f
--- /dev/null
+++ b/images/failboat.jpg
Binary files differ
diff --git a/images/funny-pictures-cat-activates-secret-door.jpg b/images/funny-pictures-cat-activates-secret-door.jpg
new file mode 100644
index 0000000..223c6a7
--- /dev/null
+++ b/images/funny-pictures-cat-activates-secret-door.jpg
Binary files differ
diff --git a/images/funny-pictures-cat-loves-coffee.jpg b/images/funny-pictures-cat-loves-coffee.jpg
new file mode 100644
index 0000000..83e080e
--- /dev/null
+++ b/images/funny-pictures-cat-loves-coffee.jpg
Binary files differ
diff --git a/images/funny-pictures-cat-will-destroy-your-work.jpg b/images/funny-pictures-cat-will-destroy-your-work.jpg
new file mode 100644
index 0000000..3b4ad67
--- /dev/null
+++ b/images/funny-pictures-cat-will-destroy-your-work.jpg
Binary files differ
diff --git a/images/funny-pictures-darth-vader-cat.jpg b/images/funny-pictures-darth-vader-cat.jpg
new file mode 100644
index 0000000..7ede01d
--- /dev/null
+++ b/images/funny-pictures-darth-vader-cat.jpg
Binary files differ
diff --git a/images/funny-pictures-kitten-kills-with-his-eye.jpg b/images/funny-pictures-kitten-kills-with-his-eye.jpg
new file mode 100644
index 0000000..99062cb
--- /dev/null
+++ b/images/funny-pictures-kitten-kills-with-his-eye.jpg
Binary files differ
diff --git a/images/funny-pictures-pirate-cat-grimaces.jpg b/images/funny-pictures-pirate-cat-grimaces.jpg
new file mode 100644
index 0000000..8bcaa76
--- /dev/null
+++ b/images/funny-pictures-pirate-cat-grimaces.jpg
Binary files differ
diff --git a/images/gbot-s.gif b/images/gbot-s.gif
new file mode 100644
index 0000000..9dc9ed3
--- /dev/null
+++ b/images/gbot-s.gif
Binary files differ
diff --git a/images/gridtest.gif b/images/gridtest.gif
new file mode 100644
index 0000000..6dd05dc
--- /dev/null
+++ b/images/gridtest.gif
Binary files differ
diff --git a/images/gtop-s.jpg b/images/gtop-s.jpg
new file mode 100644
index 0000000..191c375
--- /dev/null
+++ b/images/gtop-s.jpg
Binary files differ
diff --git a/images/gtop-www.jpg b/images/gtop-www.jpg
new file mode 100644
index 0000000..9174b98
--- /dev/null
+++ b/images/gtop-www.jpg
Binary files differ
diff --git a/images/line.gif b/images/line.gif
new file mode 100644
index 0000000..50a4497
--- /dev/null
+++ b/images/line.gif
Binary files differ
diff --git a/images/o-hai-googlz-i-can-has-privacy.jpg b/images/o-hai-googlz-i-can-has-privacy.jpg
new file mode 100644
index 0000000..535d7c4
--- /dev/null
+++ b/images/o-hai-googlz-i-can-has-privacy.jpg
Binary files differ
diff --git a/images/packages_gentoo_logo.jpg b/images/packages_gentoo_logo.jpg
new file mode 100644
index 0000000..b4fb69f
--- /dev/null
+++ b/images/packages_gentoo_logo.jpg
Binary files differ
diff --git a/images/ubeantoo.jpg b/images/ubeantoo.jpg
new file mode 100644
index 0000000..6d4f9c3
--- /dev/null
+++ b/images/ubeantoo.jpg
Binary files differ
diff --git a/images/xml.gif b/images/xml.gif
new file mode 100644
index 0000000..acd06f8
--- /dev/null
+++ b/images/xml.gif
Binary files differ
diff --git a/img/bullet.png b/img/bullet.png
new file mode 100644
index 0000000..27069bf
--- /dev/null
+++ b/img/bullet.png
Binary files differ
diff --git a/img/czech_gentoo_ebuilds.png b/img/czech_gentoo_ebuilds.png
new file mode 100644
index 0000000..f70c7a0
--- /dev/null
+++ b/img/czech_gentoo_ebuilds.png
Binary files differ
diff --git a/img/flags/ad.png b/img/flags/ad.png
new file mode 100644
index 0000000..625ca84
--- /dev/null
+++ b/img/flags/ad.png
Binary files differ
diff --git a/img/flags/ae.png b/img/flags/ae.png
new file mode 100644
index 0000000..ef3a1ec
--- /dev/null
+++ b/img/flags/ae.png
Binary files differ
diff --git a/img/flags/af.png b/img/flags/af.png
new file mode 100644
index 0000000..a4742e2
--- /dev/null
+++ b/img/flags/af.png
Binary files differ
diff --git a/img/flags/ag.png b/img/flags/ag.png
new file mode 100644
index 0000000..556d550
--- /dev/null
+++ b/img/flags/ag.png
Binary files differ
diff --git a/img/flags/ai.png b/img/flags/ai.png
new file mode 100644
index 0000000..74ed29d
--- /dev/null
+++ b/img/flags/ai.png
Binary files differ
diff --git a/img/flags/al.png b/img/flags/al.png
new file mode 100644
index 0000000..92354cb
--- /dev/null
+++ b/img/flags/al.png
Binary files differ
diff --git a/img/flags/am.png b/img/flags/am.png
new file mode 100644
index 0000000..344a2a8
--- /dev/null
+++ b/img/flags/am.png
Binary files differ
diff --git a/img/flags/an.png b/img/flags/an.png
new file mode 100644
index 0000000..633e4b8
--- /dev/null
+++ b/img/flags/an.png
Binary files differ
diff --git a/img/flags/ao.png b/img/flags/ao.png
new file mode 100644
index 0000000..bcbd1d6
--- /dev/null
+++ b/img/flags/ao.png
Binary files differ
diff --git a/img/flags/ar.png b/img/flags/ar.png
new file mode 100644
index 0000000..e5ef8f1
--- /dev/null
+++ b/img/flags/ar.png
Binary files differ
diff --git a/img/flags/as.png b/img/flags/as.png
new file mode 100644
index 0000000..32f30e4
--- /dev/null
+++ b/img/flags/as.png
Binary files differ
diff --git a/img/flags/at.png b/img/flags/at.png
new file mode 100644
index 0000000..0f15f34
--- /dev/null
+++ b/img/flags/at.png
Binary files differ
diff --git a/img/flags/au.png b/img/flags/au.png
new file mode 100644
index 0000000..a01389a
--- /dev/null
+++ b/img/flags/au.png
Binary files differ
diff --git a/img/flags/aw.png b/img/flags/aw.png
new file mode 100644
index 0000000..a3579c2
--- /dev/null
+++ b/img/flags/aw.png
Binary files differ
diff --git a/img/flags/ax.png b/img/flags/ax.png
new file mode 100644
index 0000000..1eea80a
--- /dev/null
+++ b/img/flags/ax.png
Binary files differ
diff --git a/img/flags/az.png b/img/flags/az.png
new file mode 100644
index 0000000..4ee9fe5
--- /dev/null
+++ b/img/flags/az.png
Binary files differ
diff --git a/img/flags/ba.png b/img/flags/ba.png
new file mode 100644
index 0000000..c774992
--- /dev/null
+++ b/img/flags/ba.png
Binary files differ
diff --git a/img/flags/bb.png b/img/flags/bb.png
new file mode 100644
index 0000000..0df19c7
--- /dev/null
+++ b/img/flags/bb.png
Binary files differ
diff --git a/img/flags/bd.png b/img/flags/bd.png
new file mode 100644
index 0000000..076a8bf
--- /dev/null
+++ b/img/flags/bd.png
Binary files differ
diff --git a/img/flags/be.png b/img/flags/be.png
new file mode 100644
index 0000000..d86ebc8
--- /dev/null
+++ b/img/flags/be.png
Binary files differ
diff --git a/img/flags/bf.png b/img/flags/bf.png
new file mode 100644
index 0000000..ab5ce8f
--- /dev/null
+++ b/img/flags/bf.png
Binary files differ
diff --git a/img/flags/bg.png b/img/flags/bg.png
new file mode 100644
index 0000000..0469f06
--- /dev/null
+++ b/img/flags/bg.png
Binary files differ
diff --git a/img/flags/bh.png b/img/flags/bh.png
new file mode 100644
index 0000000..ea8ce68
--- /dev/null
+++ b/img/flags/bh.png
Binary files differ
diff --git a/img/flags/bi.png b/img/flags/bi.png
new file mode 100644
index 0000000..5cc2e30
--- /dev/null
+++ b/img/flags/bi.png
Binary files differ
diff --git a/img/flags/bj.png b/img/flags/bj.png
new file mode 100644
index 0000000..1cc8b45
--- /dev/null
+++ b/img/flags/bj.png
Binary files differ
diff --git a/img/flags/bm.png b/img/flags/bm.png
new file mode 100644
index 0000000..c0c7aea
--- /dev/null
+++ b/img/flags/bm.png
Binary files differ
diff --git a/img/flags/bn.png b/img/flags/bn.png
new file mode 100644
index 0000000..8fb0984
--- /dev/null
+++ b/img/flags/bn.png
Binary files differ
diff --git a/img/flags/bo.png b/img/flags/bo.png
new file mode 100644
index 0000000..ce7ba52
--- /dev/null
+++ b/img/flags/bo.png
Binary files differ
diff --git a/img/flags/br.png b/img/flags/br.png
new file mode 100644
index 0000000..9b1a553
--- /dev/null
+++ b/img/flags/br.png
Binary files differ
diff --git a/img/flags/bs.png b/img/flags/bs.png
new file mode 100644
index 0000000..639fa6c
--- /dev/null
+++ b/img/flags/bs.png
Binary files differ
diff --git a/img/flags/bt.png b/img/flags/bt.png
new file mode 100644
index 0000000..1d512df
--- /dev/null
+++ b/img/flags/bt.png
Binary files differ
diff --git a/img/flags/bv.png b/img/flags/bv.png
new file mode 100644
index 0000000..160b6b5
--- /dev/null
+++ b/img/flags/bv.png
Binary files differ
diff --git a/img/flags/bw.png b/img/flags/bw.png
new file mode 100644
index 0000000..fcb1039
--- /dev/null
+++ b/img/flags/bw.png
Binary files differ
diff --git a/img/flags/by.png b/img/flags/by.png
new file mode 100644
index 0000000..504774e
--- /dev/null
+++ b/img/flags/by.png
Binary files differ
diff --git a/img/flags/bz.png b/img/flags/bz.png
new file mode 100644
index 0000000..be63ee1
--- /dev/null
+++ b/img/flags/bz.png
Binary files differ
diff --git a/img/flags/ca.png b/img/flags/ca.png
new file mode 100644
index 0000000..1f20419
--- /dev/null
+++ b/img/flags/ca.png
Binary files differ
diff --git a/img/flags/catalonia.png b/img/flags/catalonia.png
new file mode 100644
index 0000000..5041e30
--- /dev/null
+++ b/img/flags/catalonia.png
Binary files differ
diff --git a/img/flags/cc.png b/img/flags/cc.png
new file mode 100644
index 0000000..aed3d3b
--- /dev/null
+++ b/img/flags/cc.png
Binary files differ
diff --git a/img/flags/cd.png b/img/flags/cd.png
new file mode 100644
index 0000000..5e48942
--- /dev/null
+++ b/img/flags/cd.png
Binary files differ
diff --git a/img/flags/cf.png b/img/flags/cf.png
new file mode 100644
index 0000000..da687bd
--- /dev/null
+++ b/img/flags/cf.png
Binary files differ
diff --git a/img/flags/cg.png b/img/flags/cg.png
new file mode 100644
index 0000000..a859792
--- /dev/null
+++ b/img/flags/cg.png
Binary files differ
diff --git a/img/flags/ch.png b/img/flags/ch.png
new file mode 100644
index 0000000..242ec01
--- /dev/null
+++ b/img/flags/ch.png
Binary files differ
diff --git a/img/flags/ci.png b/img/flags/ci.png
new file mode 100644
index 0000000..3f2c62e
--- /dev/null
+++ b/img/flags/ci.png
Binary files differ
diff --git a/img/flags/ck.png b/img/flags/ck.png
new file mode 100644
index 0000000..746d3d6
--- /dev/null
+++ b/img/flags/ck.png
Binary files differ
diff --git a/img/flags/cl.png b/img/flags/cl.png
new file mode 100644
index 0000000..29c6d61
--- /dev/null
+++ b/img/flags/cl.png
Binary files differ
diff --git a/img/flags/cm.png b/img/flags/cm.png
new file mode 100644
index 0000000..f65c5bd
--- /dev/null
+++ b/img/flags/cm.png
Binary files differ
diff --git a/img/flags/cn.png b/img/flags/cn.png
new file mode 100644
index 0000000..8914414
--- /dev/null
+++ b/img/flags/cn.png
Binary files differ
diff --git a/img/flags/co.png b/img/flags/co.png
new file mode 100644
index 0000000..a118ff4
--- /dev/null
+++ b/img/flags/co.png
Binary files differ
diff --git a/img/flags/cr.png b/img/flags/cr.png
new file mode 100644
index 0000000..c7a3731
--- /dev/null
+++ b/img/flags/cr.png
Binary files differ
diff --git a/img/flags/cs.png b/img/flags/cs.png
new file mode 100644
index 0000000..8254790
--- /dev/null
+++ b/img/flags/cs.png
Binary files differ
diff --git a/img/flags/cu.png b/img/flags/cu.png
new file mode 100644
index 0000000..083f1d6
--- /dev/null
+++ b/img/flags/cu.png
Binary files differ
diff --git a/img/flags/cv.png b/img/flags/cv.png
new file mode 100644
index 0000000..a63f7ea
--- /dev/null
+++ b/img/flags/cv.png
Binary files differ
diff --git a/img/flags/cx.png b/img/flags/cx.png
new file mode 100644
index 0000000..48e31ad
--- /dev/null
+++ b/img/flags/cx.png
Binary files differ
diff --git a/img/flags/cy.png b/img/flags/cy.png
new file mode 100644
index 0000000..5b1ad6c
--- /dev/null
+++ b/img/flags/cy.png
Binary files differ
diff --git a/img/flags/cz.png b/img/flags/cz.png
new file mode 100644
index 0000000..c8403dd
--- /dev/null
+++ b/img/flags/cz.png
Binary files differ
diff --git a/img/flags/de.png b/img/flags/de.png
new file mode 100644
index 0000000..ac4a977
--- /dev/null
+++ b/img/flags/de.png
Binary files differ
diff --git a/img/flags/dj.png b/img/flags/dj.png
new file mode 100644
index 0000000..582af36
--- /dev/null
+++ b/img/flags/dj.png
Binary files differ
diff --git a/img/flags/dk.png b/img/flags/dk.png
new file mode 100644
index 0000000..e2993d3
--- /dev/null
+++ b/img/flags/dk.png
Binary files differ
diff --git a/img/flags/dm.png b/img/flags/dm.png
new file mode 100644
index 0000000..5fbffcb
--- /dev/null
+++ b/img/flags/dm.png
Binary files differ
diff --git a/img/flags/do.png b/img/flags/do.png
new file mode 100644
index 0000000..5a04932
--- /dev/null
+++ b/img/flags/do.png
Binary files differ
diff --git a/img/flags/dz.png b/img/flags/dz.png
new file mode 100644
index 0000000..335c239
--- /dev/null
+++ b/img/flags/dz.png
Binary files differ
diff --git a/img/flags/ec.png b/img/flags/ec.png
new file mode 100644
index 0000000..0caa0b1
--- /dev/null
+++ b/img/flags/ec.png
Binary files differ
diff --git a/img/flags/ee.png b/img/flags/ee.png
new file mode 100644
index 0000000..0c82efb
--- /dev/null
+++ b/img/flags/ee.png
Binary files differ
diff --git a/img/flags/eg.png b/img/flags/eg.png
new file mode 100644
index 0000000..8a3f7a1
--- /dev/null
+++ b/img/flags/eg.png
Binary files differ
diff --git a/img/flags/eh.png b/img/flags/eh.png
new file mode 100644
index 0000000..90a1195
--- /dev/null
+++ b/img/flags/eh.png
Binary files differ
diff --git a/img/flags/england.png b/img/flags/england.png
new file mode 100644
index 0000000..3a7311d
--- /dev/null
+++ b/img/flags/england.png
Binary files differ
diff --git a/img/flags/er.png b/img/flags/er.png
new file mode 100644
index 0000000..13065ae
--- /dev/null
+++ b/img/flags/er.png
Binary files differ
diff --git a/img/flags/es.png b/img/flags/es.png
new file mode 100644
index 0000000..c2de2d7
--- /dev/null
+++ b/img/flags/es.png
Binary files differ
diff --git a/img/flags/et.png b/img/flags/et.png
new file mode 100644
index 0000000..2e893fa
--- /dev/null
+++ b/img/flags/et.png
Binary files differ
diff --git a/img/flags/europeanunion.png b/img/flags/europeanunion.png
new file mode 100644
index 0000000..d6d8711
--- /dev/null
+++ b/img/flags/europeanunion.png
Binary files differ
diff --git a/img/flags/fam.png b/img/flags/fam.png
new file mode 100644
index 0000000..cf50c75
--- /dev/null
+++ b/img/flags/fam.png
Binary files differ
diff --git a/img/flags/fi.png b/img/flags/fi.png
new file mode 100644
index 0000000..14ec091
--- /dev/null
+++ b/img/flags/fi.png
Binary files differ
diff --git a/img/flags/fj.png b/img/flags/fj.png
new file mode 100644
index 0000000..cee9988
--- /dev/null
+++ b/img/flags/fj.png
Binary files differ
diff --git a/img/flags/fk.png b/img/flags/fk.png
new file mode 100644
index 0000000..ceaeb27
--- /dev/null
+++ b/img/flags/fk.png
Binary files differ
diff --git a/img/flags/fm.png b/img/flags/fm.png
new file mode 100644
index 0000000..066bb24
--- /dev/null
+++ b/img/flags/fm.png
Binary files differ
diff --git a/img/flags/fo.png b/img/flags/fo.png
new file mode 100644
index 0000000..cbceb80
--- /dev/null
+++ b/img/flags/fo.png
Binary files differ
diff --git a/img/flags/fr.png b/img/flags/fr.png
new file mode 100644
index 0000000..8332c4e
--- /dev/null
+++ b/img/flags/fr.png
Binary files differ
diff --git a/img/flags/ga.png b/img/flags/ga.png
new file mode 100644
index 0000000..0e0d434
--- /dev/null
+++ b/img/flags/ga.png
Binary files differ
diff --git a/img/flags/gb.png b/img/flags/gb.png
new file mode 100644
index 0000000..ff701e1
--- /dev/null
+++ b/img/flags/gb.png
Binary files differ
diff --git a/img/flags/gd.png b/img/flags/gd.png
new file mode 100644
index 0000000..9ab57f5
--- /dev/null
+++ b/img/flags/gd.png
Binary files differ
diff --git a/img/flags/ge.png b/img/flags/ge.png
new file mode 100644
index 0000000..728d970
--- /dev/null
+++ b/img/flags/ge.png
Binary files differ
diff --git a/img/flags/gf.png b/img/flags/gf.png
new file mode 100644
index 0000000..8332c4e
--- /dev/null
+++ b/img/flags/gf.png
Binary files differ
diff --git a/img/flags/gh.png b/img/flags/gh.png
new file mode 100644
index 0000000..4e2f896
--- /dev/null
+++ b/img/flags/gh.png
Binary files differ
diff --git a/img/flags/gi.png b/img/flags/gi.png
new file mode 100644
index 0000000..e76797f
--- /dev/null
+++ b/img/flags/gi.png
Binary files differ
diff --git a/img/flags/gl.png b/img/flags/gl.png
new file mode 100644
index 0000000..ef12a73
--- /dev/null
+++ b/img/flags/gl.png
Binary files differ
diff --git a/img/flags/gm.png b/img/flags/gm.png
new file mode 100644
index 0000000..0720b66
--- /dev/null
+++ b/img/flags/gm.png
Binary files differ
diff --git a/img/flags/gn.png b/img/flags/gn.png
new file mode 100644
index 0000000..ea660b0
--- /dev/null
+++ b/img/flags/gn.png
Binary files differ
diff --git a/img/flags/gp.png b/img/flags/gp.png
new file mode 100644
index 0000000..dbb086d
--- /dev/null
+++ b/img/flags/gp.png
Binary files differ
diff --git a/img/flags/gq.png b/img/flags/gq.png
new file mode 100644
index 0000000..ebe20a2
--- /dev/null
+++ b/img/flags/gq.png
Binary files differ
diff --git a/img/flags/gr.png b/img/flags/gr.png
new file mode 100644
index 0000000..8651ade
--- /dev/null
+++ b/img/flags/gr.png
Binary files differ
diff --git a/img/flags/gs.png b/img/flags/gs.png
new file mode 100644
index 0000000..7ef0bf5
--- /dev/null
+++ b/img/flags/gs.png
Binary files differ
diff --git a/img/flags/gt.png b/img/flags/gt.png
new file mode 100644
index 0000000..c43a70d
--- /dev/null
+++ b/img/flags/gt.png
Binary files differ
diff --git a/img/flags/gu.png b/img/flags/gu.png
new file mode 100644
index 0000000..92f37c0
--- /dev/null
+++ b/img/flags/gu.png
Binary files differ
diff --git a/img/flags/gw.png b/img/flags/gw.png
new file mode 100644
index 0000000..b37bcf0
--- /dev/null
+++ b/img/flags/gw.png
Binary files differ
diff --git a/img/flags/gy.png b/img/flags/gy.png
new file mode 100644
index 0000000..22cbe2f
--- /dev/null
+++ b/img/flags/gy.png
Binary files differ
diff --git a/img/flags/hk.png b/img/flags/hk.png
new file mode 100644
index 0000000..d5c380c
--- /dev/null
+++ b/img/flags/hk.png
Binary files differ
diff --git a/img/flags/hm.png b/img/flags/hm.png
new file mode 100644
index 0000000..a01389a
--- /dev/null
+++ b/img/flags/hm.png
Binary files differ
diff --git a/img/flags/hn.png b/img/flags/hn.png
new file mode 100644
index 0000000..96f8388
--- /dev/null
+++ b/img/flags/hn.png
Binary files differ
diff --git a/img/flags/hr.png b/img/flags/hr.png
new file mode 100644
index 0000000..696b515
--- /dev/null
+++ b/img/flags/hr.png
Binary files differ
diff --git a/img/flags/ht.png b/img/flags/ht.png
new file mode 100644
index 0000000..416052a
--- /dev/null
+++ b/img/flags/ht.png
Binary files differ
diff --git a/img/flags/hu.png b/img/flags/hu.png
new file mode 100644
index 0000000..7baafe4
--- /dev/null
+++ b/img/flags/hu.png
Binary files differ
diff --git a/img/flags/id.png b/img/flags/id.png
new file mode 100644
index 0000000..c6bc0fa
--- /dev/null
+++ b/img/flags/id.png
Binary files differ
diff --git a/img/flags/ie.png b/img/flags/ie.png
new file mode 100644
index 0000000..26baa31
--- /dev/null
+++ b/img/flags/ie.png
Binary files differ
diff --git a/img/flags/il.png b/img/flags/il.png
new file mode 100644
index 0000000..2ca772d
--- /dev/null
+++ b/img/flags/il.png
Binary files differ
diff --git a/img/flags/in.png b/img/flags/in.png
new file mode 100644
index 0000000..e4d7e81
--- /dev/null
+++ b/img/flags/in.png
Binary files differ
diff --git a/img/flags/io.png b/img/flags/io.png
new file mode 100644
index 0000000..3e74b6a
--- /dev/null
+++ b/img/flags/io.png
Binary files differ
diff --git a/img/flags/iq.png b/img/flags/iq.png
new file mode 100644
index 0000000..878a351
--- /dev/null
+++ b/img/flags/iq.png
Binary files differ
diff --git a/img/flags/ir.png b/img/flags/ir.png
new file mode 100644
index 0000000..c5fd136
--- /dev/null
+++ b/img/flags/ir.png
Binary files differ
diff --git a/img/flags/is.png b/img/flags/is.png
new file mode 100644
index 0000000..b8f6d0f
--- /dev/null
+++ b/img/flags/is.png
Binary files differ
diff --git a/img/flags/it.png b/img/flags/it.png
new file mode 100644
index 0000000..89692f7
--- /dev/null
+++ b/img/flags/it.png
Binary files differ
diff --git a/img/flags/jm.png b/img/flags/jm.png
new file mode 100644
index 0000000..7be119e
--- /dev/null
+++ b/img/flags/jm.png
Binary files differ
diff --git a/img/flags/jo.png b/img/flags/jo.png
new file mode 100644
index 0000000..11bd497
--- /dev/null
+++ b/img/flags/jo.png
Binary files differ
diff --git a/img/flags/jp.png b/img/flags/jp.png
new file mode 100644
index 0000000..325fbad
--- /dev/null
+++ b/img/flags/jp.png
Binary files differ
diff --git a/img/flags/ke.png b/img/flags/ke.png
new file mode 100644
index 0000000..51879ad
--- /dev/null
+++ b/img/flags/ke.png
Binary files differ
diff --git a/img/flags/kg.png b/img/flags/kg.png
new file mode 100644
index 0000000..0a818f6
--- /dev/null
+++ b/img/flags/kg.png
Binary files differ
diff --git a/img/flags/kh.png b/img/flags/kh.png
new file mode 100644
index 0000000..30f6bb1
--- /dev/null
+++ b/img/flags/kh.png
Binary files differ
diff --git a/img/flags/ki.png b/img/flags/ki.png
new file mode 100644
index 0000000..2dcce4b
--- /dev/null
+++ b/img/flags/ki.png
Binary files differ
diff --git a/img/flags/km.png b/img/flags/km.png
new file mode 100644
index 0000000..812b2f5
--- /dev/null
+++ b/img/flags/km.png
Binary files differ
diff --git a/img/flags/kn.png b/img/flags/kn.png
new file mode 100644
index 0000000..febd5b4
--- /dev/null
+++ b/img/flags/kn.png
Binary files differ
diff --git a/img/flags/kp.png b/img/flags/kp.png
new file mode 100644
index 0000000..d3d509a
--- /dev/null
+++ b/img/flags/kp.png
Binary files differ
diff --git a/img/flags/kr.png b/img/flags/kr.png
new file mode 100644
index 0000000..9c0a78e
--- /dev/null
+++ b/img/flags/kr.png
Binary files differ
diff --git a/img/flags/kw.png b/img/flags/kw.png
new file mode 100644
index 0000000..96546da
--- /dev/null
+++ b/img/flags/kw.png
Binary files differ
diff --git a/img/flags/ky.png b/img/flags/ky.png
new file mode 100644
index 0000000..15c5f8e
--- /dev/null
+++ b/img/flags/ky.png
Binary files differ
diff --git a/img/flags/kz.png b/img/flags/kz.png
new file mode 100644
index 0000000..45a8c88
--- /dev/null
+++ b/img/flags/kz.png
Binary files differ
diff --git a/img/flags/la.png b/img/flags/la.png
new file mode 100644
index 0000000..e28acd0
--- /dev/null
+++ b/img/flags/la.png
Binary files differ
diff --git a/img/flags/lb.png b/img/flags/lb.png
new file mode 100644
index 0000000..d0d452b
--- /dev/null
+++ b/img/flags/lb.png
Binary files differ
diff --git a/img/flags/lc.png b/img/flags/lc.png
new file mode 100644
index 0000000..a47d065
--- /dev/null
+++ b/img/flags/lc.png
Binary files differ
diff --git a/img/flags/li.png b/img/flags/li.png
new file mode 100644
index 0000000..6469909
--- /dev/null
+++ b/img/flags/li.png
Binary files differ
diff --git a/img/flags/lk.png b/img/flags/lk.png
new file mode 100644
index 0000000..088aad6
--- /dev/null
+++ b/img/flags/lk.png
Binary files differ
diff --git a/img/flags/lr.png b/img/flags/lr.png
new file mode 100644
index 0000000..89a5bc7
--- /dev/null
+++ b/img/flags/lr.png
Binary files differ
diff --git a/img/flags/ls.png b/img/flags/ls.png
new file mode 100644
index 0000000..33fdef1
--- /dev/null
+++ b/img/flags/ls.png
Binary files differ
diff --git a/img/flags/lt.png b/img/flags/lt.png
new file mode 100644
index 0000000..c8ef0da
--- /dev/null
+++ b/img/flags/lt.png
Binary files differ
diff --git a/img/flags/lu.png b/img/flags/lu.png
new file mode 100644
index 0000000..4cabba9
--- /dev/null
+++ b/img/flags/lu.png
Binary files differ
diff --git a/img/flags/lv.png b/img/flags/lv.png
new file mode 100644
index 0000000..49b6998
--- /dev/null
+++ b/img/flags/lv.png
Binary files differ
diff --git a/img/flags/ly.png b/img/flags/ly.png
new file mode 100644
index 0000000..b163a9f
--- /dev/null
+++ b/img/flags/ly.png
Binary files differ
diff --git a/img/flags/ma.png b/img/flags/ma.png
new file mode 100644
index 0000000..f386770
--- /dev/null
+++ b/img/flags/ma.png
Binary files differ
diff --git a/img/flags/mc.png b/img/flags/mc.png
new file mode 100644
index 0000000..1aa830f
--- /dev/null
+++ b/img/flags/mc.png
Binary files differ
diff --git a/img/flags/md.png b/img/flags/md.png
new file mode 100644
index 0000000..4e92c18
--- /dev/null
+++ b/img/flags/md.png
Binary files differ
diff --git a/img/flags/me.png b/img/flags/me.png
new file mode 100644
index 0000000..ac72535
--- /dev/null
+++ b/img/flags/me.png
Binary files differ
diff --git a/img/flags/mg.png b/img/flags/mg.png
new file mode 100644
index 0000000..d2715b3
--- /dev/null
+++ b/img/flags/mg.png
Binary files differ
diff --git a/img/flags/mh.png b/img/flags/mh.png
new file mode 100644
index 0000000..fb523a8
--- /dev/null
+++ b/img/flags/mh.png
Binary files differ
diff --git a/img/flags/mk.png b/img/flags/mk.png
new file mode 100644
index 0000000..db173aa
--- /dev/null
+++ b/img/flags/mk.png
Binary files differ
diff --git a/img/flags/ml.png b/img/flags/ml.png
new file mode 100644
index 0000000..2cec8ba
--- /dev/null
+++ b/img/flags/ml.png
Binary files differ
diff --git a/img/flags/mm.png b/img/flags/mm.png
new file mode 100644
index 0000000..f464f67
--- /dev/null
+++ b/img/flags/mm.png
Binary files differ
diff --git a/img/flags/mn.png b/img/flags/mn.png
new file mode 100644
index 0000000..9396355
--- /dev/null
+++ b/img/flags/mn.png
Binary files differ
diff --git a/img/flags/mo.png b/img/flags/mo.png
new file mode 100644
index 0000000..deb801d
--- /dev/null
+++ b/img/flags/mo.png
Binary files differ
diff --git a/img/flags/mp.png b/img/flags/mp.png
new file mode 100644
index 0000000..298d588
--- /dev/null
+++ b/img/flags/mp.png
Binary files differ
diff --git a/img/flags/mq.png b/img/flags/mq.png
new file mode 100644
index 0000000..010143b
--- /dev/null
+++ b/img/flags/mq.png
Binary files differ
diff --git a/img/flags/mr.png b/img/flags/mr.png
new file mode 100644
index 0000000..319546b
--- /dev/null
+++ b/img/flags/mr.png
Binary files differ
diff --git a/img/flags/ms.png b/img/flags/ms.png
new file mode 100644
index 0000000..d4cbb43
--- /dev/null
+++ b/img/flags/ms.png
Binary files differ
diff --git a/img/flags/mt.png b/img/flags/mt.png
new file mode 100644
index 0000000..00af948
--- /dev/null
+++ b/img/flags/mt.png
Binary files differ
diff --git a/img/flags/mu.png b/img/flags/mu.png
new file mode 100644
index 0000000..b7fdce1
--- /dev/null
+++ b/img/flags/mu.png
Binary files differ
diff --git a/img/flags/mv.png b/img/flags/mv.png
new file mode 100644
index 0000000..5073d9e
--- /dev/null
+++ b/img/flags/mv.png
Binary files differ
diff --git a/img/flags/mw.png b/img/flags/mw.png
new file mode 100644
index 0000000..13886e9
--- /dev/null
+++ b/img/flags/mw.png
Binary files differ
diff --git a/img/flags/mx.png b/img/flags/mx.png
new file mode 100644
index 0000000..5bc58ab
--- /dev/null
+++ b/img/flags/mx.png
Binary files differ
diff --git a/img/flags/my.png b/img/flags/my.png
new file mode 100644
index 0000000..9034cba
--- /dev/null
+++ b/img/flags/my.png
Binary files differ
diff --git a/img/flags/mz.png b/img/flags/mz.png
new file mode 100644
index 0000000..76405e0
--- /dev/null
+++ b/img/flags/mz.png
Binary files differ
diff --git a/img/flags/na.png b/img/flags/na.png
new file mode 100644
index 0000000..63358c6
--- /dev/null
+++ b/img/flags/na.png
Binary files differ
diff --git a/img/flags/nc.png b/img/flags/nc.png
new file mode 100644
index 0000000..2cad283
--- /dev/null
+++ b/img/flags/nc.png
Binary files differ
diff --git a/img/flags/ne.png b/img/flags/ne.png
new file mode 100644
index 0000000..d85f424
--- /dev/null
+++ b/img/flags/ne.png
Binary files differ
diff --git a/img/flags/nf.png b/img/flags/nf.png
new file mode 100644
index 0000000..f9bcdda
--- /dev/null
+++ b/img/flags/nf.png
Binary files differ
diff --git a/img/flags/ng.png b/img/flags/ng.png
new file mode 100644
index 0000000..3eea2e0
--- /dev/null
+++ b/img/flags/ng.png
Binary files differ
diff --git a/img/flags/ni.png b/img/flags/ni.png
new file mode 100644
index 0000000..3969aaa
--- /dev/null
+++ b/img/flags/ni.png
Binary files differ
diff --git a/img/flags/nl.png b/img/flags/nl.png
new file mode 100644
index 0000000..fe44791
--- /dev/null
+++ b/img/flags/nl.png
Binary files differ
diff --git a/img/flags/no.png b/img/flags/no.png
new file mode 100644
index 0000000..160b6b5
--- /dev/null
+++ b/img/flags/no.png
Binary files differ
diff --git a/img/flags/np.png b/img/flags/np.png
new file mode 100644
index 0000000..aeb058b
--- /dev/null
+++ b/img/flags/np.png
Binary files differ
diff --git a/img/flags/nr.png b/img/flags/nr.png
new file mode 100644
index 0000000..705fc33
--- /dev/null
+++ b/img/flags/nr.png
Binary files differ
diff --git a/img/flags/nu.png b/img/flags/nu.png
new file mode 100644
index 0000000..c3ce4ae
--- /dev/null
+++ b/img/flags/nu.png
Binary files differ
diff --git a/img/flags/nz.png b/img/flags/nz.png
new file mode 100644
index 0000000..10d6306
--- /dev/null
+++ b/img/flags/nz.png
Binary files differ
diff --git a/img/flags/om.png b/img/flags/om.png
new file mode 100644
index 0000000..2ffba7e
--- /dev/null
+++ b/img/flags/om.png
Binary files differ
diff --git a/img/flags/pa.png b/img/flags/pa.png
new file mode 100644
index 0000000..9b2ee9a
--- /dev/null
+++ b/img/flags/pa.png
Binary files differ
diff --git a/img/flags/pe.png b/img/flags/pe.png
new file mode 100644
index 0000000..62a0497
--- /dev/null
+++ b/img/flags/pe.png
Binary files differ
diff --git a/img/flags/pf.png b/img/flags/pf.png
new file mode 100644
index 0000000..771a0f6
--- /dev/null
+++ b/img/flags/pf.png
Binary files differ
diff --git a/img/flags/pg.png b/img/flags/pg.png
new file mode 100644
index 0000000..10d6233
--- /dev/null
+++ b/img/flags/pg.png
Binary files differ
diff --git a/img/flags/ph.png b/img/flags/ph.png
new file mode 100644
index 0000000..b89e159
--- /dev/null
+++ b/img/flags/ph.png
Binary files differ
diff --git a/img/flags/pk.png b/img/flags/pk.png
new file mode 100644
index 0000000..e9df70c
--- /dev/null
+++ b/img/flags/pk.png
Binary files differ
diff --git a/img/flags/pl.png b/img/flags/pl.png
new file mode 100644
index 0000000..d413d01
--- /dev/null
+++ b/img/flags/pl.png
Binary files differ
diff --git a/img/flags/pm.png b/img/flags/pm.png
new file mode 100644
index 0000000..ba91d2c
--- /dev/null
+++ b/img/flags/pm.png
Binary files differ
diff --git a/img/flags/pn.png b/img/flags/pn.png
new file mode 100644
index 0000000..aa9344f
--- /dev/null
+++ b/img/flags/pn.png
Binary files differ
diff --git a/img/flags/pr.png b/img/flags/pr.png
new file mode 100644
index 0000000..82d9130
--- /dev/null
+++ b/img/flags/pr.png
Binary files differ
diff --git a/img/flags/ps.png b/img/flags/ps.png
new file mode 100644
index 0000000..f5f5477
--- /dev/null
+++ b/img/flags/ps.png
Binary files differ
diff --git a/img/flags/pt.png b/img/flags/pt.png
new file mode 100644
index 0000000..ece7980
--- /dev/null
+++ b/img/flags/pt.png
Binary files differ
diff --git a/img/flags/pw.png b/img/flags/pw.png
new file mode 100644
index 0000000..6178b25
--- /dev/null
+++ b/img/flags/pw.png
Binary files differ
diff --git a/img/flags/py.png b/img/flags/py.png
new file mode 100644
index 0000000..cb8723c
--- /dev/null
+++ b/img/flags/py.png
Binary files differ
diff --git a/img/flags/qa.png b/img/flags/qa.png
new file mode 100644
index 0000000..ed4c621
--- /dev/null
+++ b/img/flags/qa.png
Binary files differ
diff --git a/img/flags/re.png b/img/flags/re.png
new file mode 100644
index 0000000..8332c4e
--- /dev/null
+++ b/img/flags/re.png
Binary files differ
diff --git a/img/flags/ro.png b/img/flags/ro.png
new file mode 100644
index 0000000..57e74a6
--- /dev/null
+++ b/img/flags/ro.png
Binary files differ
diff --git a/img/flags/rs.png b/img/flags/rs.png
new file mode 100644
index 0000000..9439a5b
--- /dev/null
+++ b/img/flags/rs.png
Binary files differ
diff --git a/img/flags/ru.png b/img/flags/ru.png
new file mode 100644
index 0000000..47da421
--- /dev/null
+++ b/img/flags/ru.png
Binary files differ
diff --git a/img/flags/rw.png b/img/flags/rw.png
new file mode 100644
index 0000000..5356491
--- /dev/null
+++ b/img/flags/rw.png
Binary files differ
diff --git a/img/flags/sa.png b/img/flags/sa.png
new file mode 100644
index 0000000..b4641c7
--- /dev/null
+++ b/img/flags/sa.png
Binary files differ
diff --git a/img/flags/sb.png b/img/flags/sb.png
new file mode 100644
index 0000000..a9937cc
--- /dev/null
+++ b/img/flags/sb.png
Binary files differ
diff --git a/img/flags/sc.png b/img/flags/sc.png
new file mode 100644
index 0000000..39ee371
--- /dev/null
+++ b/img/flags/sc.png
Binary files differ
diff --git a/img/flags/scotland.png b/img/flags/scotland.png
new file mode 100644
index 0000000..a0e57b4
--- /dev/null
+++ b/img/flags/scotland.png
Binary files differ
diff --git a/img/flags/sd.png b/img/flags/sd.png
new file mode 100644
index 0000000..eaab69e
--- /dev/null
+++ b/img/flags/sd.png
Binary files differ
diff --git a/img/flags/se.png b/img/flags/se.png
new file mode 100644
index 0000000..1994653
--- /dev/null
+++ b/img/flags/se.png
Binary files differ
diff --git a/img/flags/sg.png b/img/flags/sg.png
new file mode 100644
index 0000000..dd34d61
--- /dev/null
+++ b/img/flags/sg.png
Binary files differ
diff --git a/img/flags/sh.png b/img/flags/sh.png
new file mode 100644
index 0000000..4b1d2a2
--- /dev/null
+++ b/img/flags/sh.png
Binary files differ
diff --git a/img/flags/si.png b/img/flags/si.png
new file mode 100644
index 0000000..bb1476f
--- /dev/null
+++ b/img/flags/si.png
Binary files differ
diff --git a/img/flags/sj.png b/img/flags/sj.png
new file mode 100644
index 0000000..160b6b5
--- /dev/null
+++ b/img/flags/sj.png
Binary files differ
diff --git a/img/flags/sk.png b/img/flags/sk.png
new file mode 100644
index 0000000..7ccbc82
--- /dev/null
+++ b/img/flags/sk.png
Binary files differ
diff --git a/img/flags/sl.png b/img/flags/sl.png
new file mode 100644
index 0000000..12d812d
--- /dev/null
+++ b/img/flags/sl.png
Binary files differ
diff --git a/img/flags/sm.png b/img/flags/sm.png
new file mode 100644
index 0000000..3df2fdc
--- /dev/null
+++ b/img/flags/sm.png
Binary files differ
diff --git a/img/flags/sn.png b/img/flags/sn.png
new file mode 100644
index 0000000..eabb71d
--- /dev/null
+++ b/img/flags/sn.png
Binary files differ
diff --git a/img/flags/so.png b/img/flags/so.png
new file mode 100644
index 0000000..4a1ea4b
--- /dev/null
+++ b/img/flags/so.png
Binary files differ
diff --git a/img/flags/sr.png b/img/flags/sr.png
new file mode 100644
index 0000000..5eff927
--- /dev/null
+++ b/img/flags/sr.png
Binary files differ
diff --git a/img/flags/st.png b/img/flags/st.png
new file mode 100644
index 0000000..2978557
--- /dev/null
+++ b/img/flags/st.png
Binary files differ
diff --git a/img/flags/sv.png b/img/flags/sv.png
new file mode 100644
index 0000000..2498799
--- /dev/null
+++ b/img/flags/sv.png
Binary files differ
diff --git a/img/flags/sy.png b/img/flags/sy.png
new file mode 100644
index 0000000..f5ce30d
--- /dev/null
+++ b/img/flags/sy.png
Binary files differ
diff --git a/img/flags/sz.png b/img/flags/sz.png
new file mode 100644
index 0000000..914ee86
--- /dev/null
+++ b/img/flags/sz.png
Binary files differ
diff --git a/img/flags/tc.png b/img/flags/tc.png
new file mode 100644
index 0000000..8fc1156
--- /dev/null
+++ b/img/flags/tc.png
Binary files differ
diff --git a/img/flags/td.png b/img/flags/td.png
new file mode 100644
index 0000000..667f21f
--- /dev/null
+++ b/img/flags/td.png
Binary files differ
diff --git a/img/flags/tf.png b/img/flags/tf.png
new file mode 100644
index 0000000..80529a4
--- /dev/null
+++ b/img/flags/tf.png
Binary files differ
diff --git a/img/flags/tg.png b/img/flags/tg.png
new file mode 100644
index 0000000..3aa00ad
--- /dev/null
+++ b/img/flags/tg.png
Binary files differ
diff --git a/img/flags/th.png b/img/flags/th.png
new file mode 100644
index 0000000..dd8ba91
--- /dev/null
+++ b/img/flags/th.png
Binary files differ
diff --git a/img/flags/tj.png b/img/flags/tj.png
new file mode 100644
index 0000000..617bf64
--- /dev/null
+++ b/img/flags/tj.png
Binary files differ
diff --git a/img/flags/tk.png b/img/flags/tk.png
new file mode 100644
index 0000000..67b8c8c
--- /dev/null
+++ b/img/flags/tk.png
Binary files differ
diff --git a/img/flags/tl.png b/img/flags/tl.png
new file mode 100644
index 0000000..77da181
--- /dev/null
+++ b/img/flags/tl.png
Binary files differ
diff --git a/img/flags/tm.png b/img/flags/tm.png
new file mode 100644
index 0000000..828020e
--- /dev/null
+++ b/img/flags/tm.png
Binary files differ
diff --git a/img/flags/tn.png b/img/flags/tn.png
new file mode 100644
index 0000000..183cdd3
--- /dev/null
+++ b/img/flags/tn.png
Binary files differ
diff --git a/img/flags/to.png b/img/flags/to.png
new file mode 100644
index 0000000..f89b8ba
--- /dev/null
+++ b/img/flags/to.png
Binary files differ
diff --git a/img/flags/tr.png b/img/flags/tr.png
new file mode 100644
index 0000000..be32f77
--- /dev/null
+++ b/img/flags/tr.png
Binary files differ
diff --git a/img/flags/tt.png b/img/flags/tt.png
new file mode 100644
index 0000000..2a11c1e
--- /dev/null
+++ b/img/flags/tt.png
Binary files differ
diff --git a/img/flags/tv.png b/img/flags/tv.png
new file mode 100644
index 0000000..28274c5
--- /dev/null
+++ b/img/flags/tv.png
Binary files differ
diff --git a/img/flags/tw.png b/img/flags/tw.png
new file mode 100644
index 0000000..f31c654
--- /dev/null
+++ b/img/flags/tw.png
Binary files differ
diff --git a/img/flags/tz.png b/img/flags/tz.png
new file mode 100644
index 0000000..c00ff79
--- /dev/null
+++ b/img/flags/tz.png
Binary files differ
diff --git a/img/flags/ua.png b/img/flags/ua.png
new file mode 100644
index 0000000..09563a2
--- /dev/null
+++ b/img/flags/ua.png
Binary files differ
diff --git a/img/flags/ug.png b/img/flags/ug.png
new file mode 100644
index 0000000..33f4aff
--- /dev/null
+++ b/img/flags/ug.png
Binary files differ
diff --git a/img/flags/um.png b/img/flags/um.png
new file mode 100644
index 0000000..c1dd965
--- /dev/null
+++ b/img/flags/um.png
Binary files differ
diff --git a/img/flags/us.png b/img/flags/us.png
new file mode 100644
index 0000000..10f451f
--- /dev/null
+++ b/img/flags/us.png
Binary files differ
diff --git a/img/flags/uy.png b/img/flags/uy.png
new file mode 100644
index 0000000..31d948a
--- /dev/null
+++ b/img/flags/uy.png
Binary files differ
diff --git a/img/flags/uz.png b/img/flags/uz.png
new file mode 100644
index 0000000..fef5dc1
--- /dev/null
+++ b/img/flags/uz.png
Binary files differ
diff --git a/img/flags/va.png b/img/flags/va.png
new file mode 100644
index 0000000..b31eaf2
--- /dev/null
+++ b/img/flags/va.png
Binary files differ
diff --git a/img/flags/vc.png b/img/flags/vc.png
new file mode 100644
index 0000000..8fa17b0
--- /dev/null
+++ b/img/flags/vc.png
Binary files differ
diff --git a/img/flags/ve.png b/img/flags/ve.png
new file mode 100644
index 0000000..00c90f9
--- /dev/null
+++ b/img/flags/ve.png
Binary files differ
diff --git a/img/flags/vg.png b/img/flags/vg.png
new file mode 100644
index 0000000..4156907
--- /dev/null
+++ b/img/flags/vg.png
Binary files differ
diff --git a/img/flags/vi.png b/img/flags/vi.png
new file mode 100644
index 0000000..ed26915
--- /dev/null
+++ b/img/flags/vi.png
Binary files differ
diff --git a/img/flags/vn.png b/img/flags/vn.png
new file mode 100644
index 0000000..ec7cd48
--- /dev/null
+++ b/img/flags/vn.png
Binary files differ
diff --git a/img/flags/vu.png b/img/flags/vu.png
new file mode 100644
index 0000000..b3397bc
--- /dev/null
+++ b/img/flags/vu.png
Binary files differ
diff --git a/img/flags/wales.png b/img/flags/wales.png
new file mode 100644
index 0000000..e0d7cee
--- /dev/null
+++ b/img/flags/wales.png
Binary files differ
diff --git a/img/flags/wf.png b/img/flags/wf.png
new file mode 100644
index 0000000..9f95587
--- /dev/null
+++ b/img/flags/wf.png
Binary files differ
diff --git a/img/flags/ws.png b/img/flags/ws.png
new file mode 100644
index 0000000..c169508
--- /dev/null
+++ b/img/flags/ws.png
Binary files differ
diff --git a/img/flags/ye.png b/img/flags/ye.png
new file mode 100644
index 0000000..468dfad
--- /dev/null
+++ b/img/flags/ye.png
Binary files differ
diff --git a/img/flags/yt.png b/img/flags/yt.png
new file mode 100644
index 0000000..c298f37
--- /dev/null
+++ b/img/flags/yt.png
Binary files differ
diff --git a/img/flags/za.png b/img/flags/za.png
new file mode 100644
index 0000000..57c58e2
--- /dev/null
+++ b/img/flags/za.png
Binary files differ
diff --git a/img/flags/zm.png b/img/flags/zm.png
new file mode 100644
index 0000000..c25b07b
--- /dev/null
+++ b/img/flags/zm.png
Binary files differ
diff --git a/img/flags/zw.png b/img/flags/zw.png
new file mode 100644
index 0000000..53c9725
--- /dev/null
+++ b/img/flags/zw.png
Binary files differ
diff --git a/img/fresh_ebuilds_logo.png b/img/fresh_ebuilds_logo.png
new file mode 100644
index 0000000..96f4aca
--- /dev/null
+++ b/img/fresh_ebuilds_logo.png
Binary files differ
diff --git a/img/german_ebuilds_logo.png b/img/german_ebuilds_logo.png
new file mode 100644
index 0000000..0debfa0
--- /dev/null
+++ b/img/german_ebuilds_logo.png
Binary files differ
diff --git a/img/greek_gentoo_ebuilds.png b/img/greek_gentoo_ebuilds.png
new file mode 100644
index 0000000..9d41bcd
--- /dev/null
+++ b/img/greek_gentoo_ebuilds.png
Binary files differ
diff --git a/img/header_background.jpg b/img/header_background.jpg
new file mode 100644
index 0000000..73536c4
--- /dev/null
+++ b/img/header_background.jpg
Binary files differ
diff --git a/img/hr.png b/img/hr.png
new file mode 100644
index 0000000..4dc7a77
--- /dev/null
+++ b/img/hr.png
Binary files differ
diff --git a/img/hr_dotted.png b/img/hr_dotted.png
new file mode 100644
index 0000000..62aa2ed
--- /dev/null
+++ b/img/hr_dotted.png
Binary files differ
diff --git a/img/icon_asterisk_orange.png b/img/icon_asterisk_orange.png
new file mode 100644
index 0000000..1ebebde
--- /dev/null
+++ b/img/icon_asterisk_orange.png
Binary files differ
diff --git a/img/icon_attach.png b/img/icon_attach.png
new file mode 100644
index 0000000..ea897cc
--- /dev/null
+++ b/img/icon_attach.png
Binary files differ
diff --git a/img/icon_bricks.png b/img/icon_bricks.png
new file mode 100644
index 0000000..0905f93
--- /dev/null
+++ b/img/icon_bricks.png
Binary files differ
diff --git a/img/icon_bugs.png b/img/icon_bugs.png
new file mode 100644
index 0000000..2d5fb90
--- /dev/null
+++ b/img/icon_bugs.png
Binary files differ
diff --git a/img/icon_changelog.png b/img/icon_changelog.png
new file mode 100644
index 0000000..fb2efb8
--- /dev/null
+++ b/img/icon_changelog.png
Binary files differ
diff --git a/img/icon_database_table.png b/img/icon_database_table.png
new file mode 100644
index 0000000..693709c
--- /dev/null
+++ b/img/icon_database_table.png
Binary files differ
diff --git a/img/icon_disk.png b/img/icon_disk.png
new file mode 100644
index 0000000..99d532e
--- /dev/null
+++ b/img/icon_disk.png
Binary files differ
diff --git a/img/icon_drive_network.png b/img/icon_drive_network.png
new file mode 100644
index 0000000..63d2d5d
--- /dev/null
+++ b/img/icon_drive_network.png
Binary files differ
diff --git a/img/icon_email.png b/img/icon_email.png
new file mode 100644
index 0000000..7348aed
--- /dev/null
+++ b/img/icon_email.png
Binary files differ
diff --git a/img/icon_flag_purple.png b/img/icon_flag_purple.png
new file mode 100644
index 0000000..d069866
--- /dev/null
+++ b/img/icon_flag_purple.png
Binary files differ
diff --git a/img/icon_folder.png b/img/icon_folder.png
new file mode 100644
index 0000000..784e8fa
--- /dev/null
+++ b/img/icon_folder.png
Binary files differ
diff --git a/img/icon_forums.png b/img/icon_forums.png
new file mode 100644
index 0000000..39433cf
--- /dev/null
+++ b/img/icon_forums.png
Binary files differ
diff --git a/img/icon_gpnl.png b/img/icon_gpnl.png
new file mode 100644
index 0000000..5c87017
--- /dev/null
+++ b/img/icon_gpnl.png
Binary files differ
diff --git a/img/icon_group.png b/img/icon_group.png
new file mode 100644
index 0000000..7fb4e1f
--- /dev/null
+++ b/img/icon_group.png
Binary files differ
diff --git a/img/icon_homepage.png b/img/icon_homepage.png
new file mode 100644
index 0000000..fed6221
--- /dev/null
+++ b/img/icon_homepage.png
Binary files differ
diff --git a/img/icon_image.png b/img/icon_image.png
new file mode 100644
index 0000000..fc3c393
--- /dev/null
+++ b/img/icon_image.png
Binary files differ
diff --git a/img/icon_images.png b/img/icon_images.png
new file mode 100644
index 0000000..184860d
--- /dev/null
+++ b/img/icon_images.png
Binary files differ
diff --git a/img/icon_layout.png b/img/icon_layout.png
new file mode 100644
index 0000000..ea086b0
--- /dev/null
+++ b/img/icon_layout.png
Binary files differ
diff --git a/img/icon_layout_sidebar.png b/img/icon_layout_sidebar.png
new file mode 100644
index 0000000..3be27bb
--- /dev/null
+++ b/img/icon_layout_sidebar.png
Binary files differ
diff --git a/img/icon_package.png b/img/icon_package.png
new file mode 100644
index 0000000..da3c2a2
--- /dev/null
+++ b/img/icon_package.png
Binary files differ
diff --git a/img/icon_rss.png b/img/icon_rss.png
new file mode 100644
index 0000000..97c5c5f
--- /dev/null
+++ b/img/icon_rss.png
Binary files differ
diff --git a/img/icon_similar.png b/img/icon_similar.png
new file mode 100644
index 0000000..a9f31a2
--- /dev/null
+++ b/img/icon_similar.png
Binary files differ
diff --git a/img/icon_source.png b/img/icon_source.png
new file mode 100644
index 0000000..c28dd63
--- /dev/null
+++ b/img/icon_source.png
Binary files differ
diff --git a/img/icon_tag_purple.png b/img/icon_tag_purple.png
new file mode 100644
index 0000000..ebaf0e8
--- /dev/null
+++ b/img/icon_tag_purple.png
Binary files differ
diff --git a/img/icon_timeline_marker.png b/img/icon_timeline_marker.png
new file mode 100644
index 0000000..a3fbddf
--- /dev/null
+++ b/img/icon_timeline_marker.png
Binary files differ
diff --git a/img/icon_tux.png b/img/icon_tux.png
new file mode 100644
index 0000000..bbefe2e
--- /dev/null
+++ b/img/icon_tux.png
Binary files differ
diff --git a/img/icon_twitter.png b/img/icon_twitter.png
new file mode 100644
index 0000000..4c08074
--- /dev/null
+++ b/img/icon_twitter.png
Binary files differ
diff --git a/img/icon_wiki.png b/img/icon_wiki.png
new file mode 100644
index 0000000..ea086b0
--- /dev/null
+++ b/img/icon_wiki.png
Binary files differ
diff --git a/img/icon_world.png b/img/icon_world.png
new file mode 100644
index 0000000..68f21d3
--- /dev/null
+++ b/img/icon_world.png
Binary files differ
diff --git a/img/icon_znurt.png b/img/icon_znurt.png
new file mode 100644
index 0000000..0fe143a
--- /dev/null
+++ b/img/icon_znurt.png
Binary files differ
diff --git a/img/nav_bg.png b/img/nav_bg.png
new file mode 100644
index 0000000..a2d39e0
--- /dev/null
+++ b/img/nav_bg.png
Binary files differ
diff --git a/img/nav_bg_center.jpg b/img/nav_bg_center.jpg
new file mode 100644
index 0000000..b25d119
--- /dev/null
+++ b/img/nav_bg_center.jpg
Binary files differ
diff --git a/img/nav_bg_left.png b/img/nav_bg_left.png
new file mode 100644
index 0000000..e86e4f3
--- /dev/null
+++ b/img/nav_bg_left.png
Binary files differ
diff --git a/img/nav_bg_right.png b/img/nav_bg_right.png
new file mode 100644
index 0000000..5978a82
--- /dev/null
+++ b/img/nav_bg_right.png
Binary files differ
diff --git a/img/nav_divider.png b/img/nav_divider.png
new file mode 100644
index 0000000..25975ec
--- /dev/null
+++ b/img/nav_divider.png
Binary files differ
diff --git a/img/next_page.png b/img/next_page.png
new file mode 100644
index 0000000..67810f1
--- /dev/null
+++ b/img/next_page.png
Binary files differ
diff --git a/img/nuevos_ebuilds_logo.png b/img/nuevos_ebuilds_logo.png
new file mode 100644
index 0000000..b0fd2e2
--- /dev/null
+++ b/img/nuevos_ebuilds_logo.png
Binary files differ
diff --git a/img/package_background.png b/img/package_background.png
new file mode 100644
index 0000000..622c5c7
--- /dev/null
+++ b/img/package_background.png
Binary files differ
diff --git a/img/package_background_old.png b/img/package_background_old.png
new file mode 100644
index 0000000..a194b96
--- /dev/null
+++ b/img/package_background_old.png
Binary files differ
diff --git a/img/prev_page.png b/img/prev_page.png
new file mode 100644
index 0000000..617a9c8
--- /dev/null
+++ b/img/prev_page.png
Binary files differ
diff --git a/img/search.png b/img/search.png
new file mode 100644
index 0000000..9410b00
--- /dev/null
+++ b/img/search.png
Binary files differ
diff --git a/img/sevenl.png b/img/sevenl.png
new file mode 100644
index 0000000..f67c987
--- /dev/null
+++ b/img/sevenl.png
Binary files differ
diff --git a/img/sidebar_background.png b/img/sidebar_background.png
new file mode 100644
index 0000000..a691008
--- /dev/null
+++ b/img/sidebar_background.png
Binary files differ
diff --git a/img/subscribe.png b/img/subscribe.png
new file mode 100644
index 0000000..e4b948e
--- /dev/null
+++ b/img/subscribe.png
Binary files differ
diff --git a/img/tanBox_bottom.jpg b/img/tanBox_bottom.jpg
new file mode 100644
index 0000000..17d78fd
--- /dev/null
+++ b/img/tanBox_bottom.jpg
Binary files differ
diff --git a/img/tanBox_top.jpg b/img/tanBox_top.jpg
new file mode 100644
index 0000000..8d50927
--- /dev/null
+++ b/img/tanBox_top.jpg
Binary files differ
diff --git a/img/turkish_gentoo_ebuilds.png b/img/turkish_gentoo_ebuilds.png
new file mode 100644
index 0000000..33a108d
--- /dev/null
+++ b/img/turkish_gentoo_ebuilds.png
Binary files differ
diff --git a/img/vr_dotted.gif b/img/vr_dotted.gif
new file mode 100644
index 0000000..62cd00a
--- /dev/null
+++ b/img/vr_dotted.gif
Binary files differ
diff --git a/img/znurt_icon_64x64.png b/img/znurt_icon_64x64.png
new file mode 100644
index 0000000..abeba82
--- /dev/null
+++ b/img/znurt_icon_64x64.png
Binary files differ
diff --git a/inc.content1.php b/inc.content1.php
new file mode 100644
index 0000000..3e6f7c7
--- /dev/null
+++ b/inc.content1.php
@@ -0,0 +1,12 @@
+<div id="wrapper">
+
+<!-- Begin Header -->
+ <div id="header">
+ <div id="logo">
+ <h1><a href="<?=$base_uri;?>">Gentoo Linux: The Fresh Ebuilds</a></h1>
+ </div>
+ </div>
+<!-- End Header -->
+
+<!-- Begin Main Content Block -->
+ <div id="main"> \ No newline at end of file
diff --git a/inc.content2.php b/inc.content2.php
new file mode 100644
index 0000000..326e87b
--- /dev/null
+++ b/inc.content2.php
@@ -0,0 +1,22 @@
+ </div>
+ <div id="sidebar">
+
+ <?
+ require_once 'nav.search.php';
+ require_once 'nav.primary.php';
+ require_once 'nav.legend.php';
+ require_once 'nav.social_media.php';
+ require_once 'nav.recent_changes.php';
+ require_once 'nav.meta.php';
+ ?>
+
+ </div>
+
+ <div id="footer"></div>
+
+ </div>
+</body>
+</html>
+<?
+ require_once 'inc.footer.php';
+?> \ No newline at end of file
diff --git a/inc.footer.php b/inc.footer.php
new file mode 100644
index 0000000..607f0ff
--- /dev/null
+++ b/inc.footer.php
@@ -0,0 +1,9 @@
+<?
+ if(!$nocache) {
+
+ $data .= ob_get_contents();
+
+ $cache->save($data);
+ ob_end_flush();
+ }
+?> \ No newline at end of file
diff --git a/inc.gentoo.php b/inc.gentoo.php
new file mode 100644
index 0000000..2252ddf
--- /dev/null
+++ b/inc.gentoo.php
@@ -0,0 +1,75 @@
+<?
+
+ $hostname = php_uname('n');
+
+ switch($hostname) {
+
+ case 'charlie':
+
+ $znurt = false;
+ $include_path = ":/home/steve/php/inc:/home/steve/svn/portage";
+ $mdb2 = "mdb2/charlie.portage.php";
+
+ $base_uri = "/~steve/sp/gentoo/znurt/";
+ $base_url = "http://localhost".$base_uri;
+
+ break;
+
+ case 'rom':
+
+ $znurt = false;
+ $include_path = ":/home/steve/php/inc:/home/steve/svn/portage";
+ $mdb2 = "mdb2/rom.portage.php";
+
+ $base_uri = "/";
+ $base_url = "http://znurt.org".$base_uri;
+
+ break;
+
+ case 'tenforward':
+
+ $znurt = true;
+ $include_path = ":/var/www/znurt.org/inc:/var/www/znurt.org/portage";
+ $mdb2 = "mdb2/tenforward.portage.php";
+
+ $base_uri = "/";
+ $base_url = "http://znurt.org".$base_uri;
+
+ break;
+
+ case 'alan-one':
+
+ $znurt = true;
+ $include_path = ":/var/www/znurt.org/inc:/var/www/znurt.org/portage";
+ $mdb2 = "mdb2/alan-one.portage.php";
+
+ $base_uri = "/";
+ $base_url = "http://znurt.org".$base_uri;
+
+ break;
+
+ case 'dumont':
+
+ $znurt = true;
+ $include_path = ":/home/znurt/php/inc:/var/znurt";
+ $mdb2 = "mdb2/dumont.portage.php";
+
+ $base_uri = "/";
+ $base_url = "http://znurt.org".$base_uri;
+
+ break;
+
+ }
+
+
+ if($include_path) {
+ ini_set('include_path', ini_get('include_path').$include_path);
+
+ require_once $mdb2;
+ require_once 'class.common.php';
+ require_once 'class.shell.php';
+ }
+
+ ini_set('include_path', ini_get('include_path').":/home/steve/php/inc:/home/steve/svn/portage");
+
+?> \ No newline at end of file
diff --git a/inc.header1.php b/inc.header1.php
new file mode 100644
index 0000000..16c8a26
--- /dev/null
+++ b/inc.header1.php
@@ -0,0 +1,433 @@
+<?
+
+ require_once 'inc.gentoo.php';
+ require_once 'cache.start.php';
+ require_once 'inc.i18n.php';
+ require_once 'class.db.ebuild.php';
+ require_once 'class.db.package.php';
+ require_once 'class.portage.package.changelog.php';
+
+ $html_title = gettext("the fresh ebuilds");
+
+ $sql = "SELECT name FROM arch WHERE active IS TRUE ORDER BY name;";
+ $arr_arch = $db->getCol($sql);
+
+ $arr_default_arch = $arr_display_arch = array('alpha', 'amd64', 'arm', 'hppa', 'ia64', 'm68k', 'mips', 'ppc', 'ppc64', 's390', 'sh', 'sparc', 'x86');
+
+ $arr = array();
+ if($_COOKIE['arch']) {
+ foreach($_COOKIE['arch'] as $name => $value) {
+ if($name && in_array($name, $arr_arch, true) && $value)
+ $arr[] = $name;
+ }
+ }
+
+ if(count($arr)) {
+ sort($arr);
+ $arr_display_arch = $arr;
+ }
+
+ $offset = 0;
+ $amount = 10;
+
+ $request_uri = $_SERVER['REQUEST_URI'];
+
+ function headerMessage($str) {
+ $str = "<table class='centerpage'><tr><th class='category'>$str</th></tr></table>\n";
+ return $str;
+ }
+
+ function recentPackages($amount, $offset = 0, $arch = "") {
+
+ $db =& MDB2::singleton();
+
+ if($arch) {
+// $sql ="SELECT DISTINCT pr.package FROM package_recent pr INNER JOIN ebuild e ON e.package = pr.package INNER JOIN ebuild_arch ea ON ea.ebuild = e.id AND ea.arch != 2 INNER JOIN arch a ON ea.arch = a.id AND a.name = ".$db->quote($arch)." ORDER BY max_ebuild_mtime DESC, package LIMIT $amount OFFSET $offset";
+ $sql = "SELECT package FROM package_recent_arch pra INNER JOIN arch a ON pra.arch = a.id AND a.name = ".$db->quote($arch)." WHERE pra.status = 0 ORDER BY pra.max_ebuild_mtime DESC, pra.package LIMIT $amount OFFSET $offset";
+ } else {
+ $sql = "SELECT package FROM package_recent WHERE status = 0 ORDER BY max_ebuild_mtime DESC, package LIMIT $amount OFFSET $offset";
+ }
+
+ // Note to sanity: I already found one instance (readline version bump to 6.1 ebuild) where the recent changes
+ // said "version bump" but the most recent ebuild was 5.2_p14. Everything was working fine, because the 5.2 ebuild's
+ // mtime really was *newer*. So, just because the recent changes doesn't match up to the display, don't panic.
+
+ // This tracks what was the *last modified* ebuild *PLUS* an hour before that, to get (ostensibly) all the changes
+ // since the last run.
+ $sql = "SELECT e.package, e.id AS ebuild FROM ebuild e INNER JOIN package_recent pr ON e.package = pr.package AND e.cache_mtime > (pr.max_ebuild_mtime - 3600) WHERE pr.status = 0 AND e.status = 0 AND e.package IN ($sql) ORDER BY pr.max_ebuild_mtime DESC, e.package, e.ev DESC, e.lvl DESC, e.p IS NULL, e.p DESC, e.rc IS NULL, e.rc DESC, e.pre IS NULL, e.pre DESC, e.beta IS NULL, e.beta DESC, e.alpha IS NULL, e.alpha DESC, e.pr IS NULL, e.pr DESC;";
+
+// echo $sql;
+
+ $arr = $db->getAll($sql);
+
+ return $arr;
+
+ }
+
+ function keywordsRow($arr, $view = 'category') {
+
+ global $arr_arch;
+
+ global $arr_display_arch;
+
+ global $base_uri;
+
+ global $base_url;
+
+ global $lingua;
+
+ $request_uri = $_SERVER['REQUEST_URI'];
+ if(substr($request_uri, -1) == '/')
+ $request_uri = substr($request_uri, 0, strlen($request_uri) - 1);
+
+ $e = new DBEbuild(current($arr));
+ $p = new DBPackage($e->package);
+ $c = new PackageChangelog($p->changelog);
+
+ $recent_changes = htmlspecialchars($p->recent_changes);
+ $recent_changes = preg_replace('/((bug\n?)( {1,2}\D?)|#)(\d{5,})/i', "<a href='https://bugs.gentoo.org/$4'>$1$4</a>", $recent_changes);
+ $recent_date = $c->recent_date;
+
+ $category_name = $e->category_name;
+ $package_name = $e->package_name;
+ $cp = "$category_name/$package_name";
+
+ $description = htmlspecialchars($p->description);
+
+ $iarr_months = array(
+ 'January' => gettext('January'),
+ 'February' => gettext('February'),
+ 'March' => gettext('March'),
+ 'April' => gettext('April'),
+ 'May' => gettext('May'),
+ 'June' => gettext('June'),
+ 'July' => gettext('July'),
+ 'August' => gettext('August'),
+ 'September' => gettext('September'),
+ 'October' => gettext('October'),
+ 'November' => gettext('November'),
+ 'December' => gettext('December'),
+ );
+
+ // Portage mtimes on directories are generally unreliable
+ // directories get their mtime updated for no reasons that I can see.
+ $max = max($e->cache_mtime, $e->changelog_mtime, $e->metadata_mtime, $e->portage_mtime);
+ if($lingua == "es")
+ $mdate = date('d', $max)." de ".gettext(strtolower(date('F', $max)))." ".date(', Y, H:i', $max);
+ elseif($lingua == "de" || $lingua == "cs")
+ $mdate = date('d.')." ".gettext(date('F', $max))." ".date('Y, H:i', $max);
+ else
+ $mdate = date('F d, Y, H:i', $max);
+
+ $homepage = ( $e->homepage ? $e->homepage : "http://www.gentoo.org/" );
+
+ $url_category = urlencode($category_name);
+ $url_package = urlencode($package_name);
+ $url_pf = urlencode($e->pf);
+
+ $gentoo_changelog = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/$url_category/$url_package/ChangeLog";
+ $gentoo_cvs = "http://sources.gentoo.org/viewcvs.py/gentoo-x86/$url_category/$url_package/?hideattic=0";
+ $gentoo_bugs = "https://bugs.gentoo.org/buglist.cgi?query_format=&amp;short_desc_type=allwords&amp;short_desc=$url_package&amp;bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED";
+ $gentoo_wiki = "http://en.gentoo-wiki.com/w/index.php?title=Special%3ASearch&search=".urlencode(str_replace("-", " ", $package_name));
+ $gentoo_forums = "http://forums.gentoo.org/search.php?search_terms=all&amp;show_results=topics&amp;search_keywords=$url_package&amp;mode=results";
+
+ $bugs = $base_uri."$url_category/$url_package/bugs";
+ $changelog = $base_uri."$url_category/$url_package/changelog";
+ $ml = "http://www.mail-archive.com/search?q=$url_package&l=gentoo-user%40lists.gentoo.org";
+
+ if($lingua == "cs")
+ $ml = "http://search.gmane.org/?query=$url_package&group=gmane.linux.gentoo.user.czech-slovak";
+ elseif($lingua == "de")
+ $ml = "http://search.gmane.org/?query=$url_package&group=gmane.linux.gentoo.user.german";
+ elseif($lingua == "fr")
+ $ml = "http://search.gmane.org/?query=$url_package&group=gmane.linux.gentoo.user.french";
+ elseif($lingua == "hu")
+ $ml = "http://search.gmane.org/?query=$url_package&group=gmane.linux.gentoo.user.hungarian";
+ elseif($lingua == "id")
+ $ml = "http://search.gmane.org/?query=$url_package&group=gmane.linux.gentoo.user.indonesia";
+ elseif($lingua == "ru")
+ $ml = "http://search.gmane.org/?query=$url_package&group=gmane.linux.gentoo.user.russian";
+
+ if($view == 'ebuild') {
+ $dependencies = $base_uri."$url_category/$url_pf/dependencies";
+ $downloads = $base_uri."$url_category/$url_pf/downloads";
+ $license = $base_uri."$url_category/$url_pf/license";
+ $source = $base_uri."$url_category/$url_pf/source";
+ $useflags = $base_uri."$url_category/$url_pf/useflags";
+ } else {
+ $dependencies = $base_uri."$url_category/$url_package/dependencies";
+ $downloads = $base_uri."$url_category/$url_package/downloads";
+ $license = $base_uri."$url_category/$url_package/license";
+ $useflags = $base_uri."$url_category/$url_package/useflags";
+ }
+
+ // License
+// $arr_licenses = $e->licenses;
+//
+// $url_licenses = array();
+//
+// if(count($arr_licenses)) {
+// foreach($arr_licenses as $name) {
+// $str = nl2br(wordwrap(str_replace('-', ' ', $name), 25));
+// $url_licenses[$str] = $base_uri."licenses/".urlencode($name);
+// }
+// }
+
+ $x = 0;
+
+ /** New **/
+// $html .= "<!-- start package -->\n";
+ $html .= "<div class='package'>\n";
+ $html .= "\t<hr class='pkg_rule' />\n";
+ $html .= "\t\t<div class='pkg_container'>\n";
+
+ $html .= "\t\t\t<div class='pkg_name'><a class='pkg_link' href='$base_uri$url_category/$url_package' title='$cp'>$package_name</a></div>\n";
+
+ // FIXME CSS bug
+// if($view == 'category')
+// $str = "&nbsp;";
+// else
+ $str = $mdate;
+
+ $html .= "\t\t\t\t<div class='pkg_date'>$str</div>\n";
+
+ if($view == 'ebuild' || $view == 'new' || $view == 'category' || $view == 'search')
+ $html .= "\t\t\t\t<p class='description' style='padding-top: 25px;'>$description</p>\n";
+
+ $html .= "\t\t\t\t\t<table class='releases' cellspacing='0' cellpadding='0'>\n";
+ $html .= "\t\t\t\t\t\t<tr>\n";
+ $html .= "\t\t\t\t\t\t\t<td><b></b></td>\n";
+
+ foreach($arr_display_arch as $name) {
+ $class = "";
+ if($name == end($arr_display_arch))
+ $class = "last_cell";
+
+ // FIXME CSS in style tag
+ $html .= "\t\t\t<th class='$class' style='white-space: nowrap;'>$name</li>\n";
+ }
+
+ $html .= "\t\t\t\t\t\t</tr>\n";
+
+ $istr_bugs = gettext("Bugs");
+ $istr_category = gettext("Category");
+ $istr_changelog = gettext("ChangeLog");
+ $istr_cvs = gettext("CVS");
+ $istr_dependencies = gettext("Dependencies");
+ $istr_forums = gettext("Forums");
+ $istr_homepage = gettext("Homepage");
+ $istr_license = gettext("License");
+ $istr_mailing_lists = gettext("Mailing Lists");
+ $istr_metadata = gettext("Metadata");
+ $istr_package_description = gettext("PACKAGE DESCRIPTION");
+ $istr_planet = gettext("Planet");
+ $istr_recent_changes = gettext("Recent Changes");
+ $istr_source = gettext("Source");
+ $istr_use_flags = gettext("Use Flags");
+ $istr_wiki = gettext("Wiki");
+
+ foreach($arr as $ebuild) {
+
+ if($x > 0)
+ $e = new DBEbuild($ebuild);
+
+ $x++;
+
+ $arr_keywords = $e->keywords;
+
+ $pf =& $e->pf;
+ $pv =& $e->pv;
+ $pvr =& $e->pvr;
+
+ $url_pf = urlencode($pf);
+
+ $url = $base_uri.$url_category."/".$url_package."/$pf";
+
+ if($view == 'ebuild')
+ $gentoo_cvs = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/$url_category/$url_package/$url_pf.ebuild";
+
+ $html .= "\t\t\t\t\t\t<tr>\n";
+ $html .= "\t\t\t\t\t\t\t<td class='first_cell'><a href='$url' title='$pf'>$pvr</a></td>\n";
+
+ foreach($arr_display_arch as $arch) {
+
+
+ $case = $arr_keywords[$arch];
+
+ if($arch == 'sparc fbsd')
+ $arch = 'sparc-fbsd';
+ elseif($arch == 'x86 fbsd')
+ $arch = 'x86-fbsd';
+
+ switch($case) {
+
+ case null:
+ $class = 'not_keyword';
+ $keyword = '&ndash;';
+ break;
+
+ case 0:
+ $class = 'stable';
+ $keyword = '+';
+ break;
+
+ case 1:
+ $class = 'testing';
+ $keyword = '~';
+ break;
+
+ // FIXME
+ case 2:
+ case 3:
+ $class = 'not_avail';
+ $keyword = 'x';
+ break;
+
+ default:
+ $class = 'not_keyword';
+ $keyword = '-';
+ break;
+
+ }
+
+ if($e->masked && ($case == 0 || $case == 1)) {
+ $class = 'm_stable';
+ $keyword = 'm';
+ }
+
+
+ if($arch == end($arr_display_arch))
+ $class .= " last_cell";
+
+ $html .= "<td class='$class'>$keyword</td>\n";
+
+ }
+
+
+ $html .= "\t\t\t\t\t\t</tr>\n";
+
+ }
+
+ $html .= "\t\t\t\t\t</table>\n";
+
+// if($view == 'ebuild' || $view == 'new' || $view == 'category')
+// $html .= "\t\t\t\t<p class='recent_changes'><b>Description:</b> $description</p>\n";
+
+ if($recent_changes && ($view == 'new' || $view == 'package'))
+ $html .= "\t\t\t\t<p class='recent_changes'><b>$istr_recent_changes:</b> &nbsp; $recent_changes</p>\n";
+
+ $html .= "\t\t\t</div>\n";
+
+ if($view == 'new' || $view == 'category' || $view == 'search') {
+
+ $html .= "\t\t\t\t<div class='pkg_row'>\n";
+
+ $html .= "\t\t\t\t\t<ul>\n";
+
+ $html .= "\t\t\t\t\t\t<li class='meta_homepage'><a href='$homepage' rel='nofollow'>$istr_homepage</a></li>\n";
+ $html .= "\t\t\t\t\t\t<li class='meta_forums'><a href='$gentoo_forums'>$istr_forums</a></li>\n";
+ $html .= "\t\t\t\t\t\t<li class='meta_mailing_list'><a href='$ml'>$istr_mailing_lists</a></li>\n";
+ if($lingua != "cs")
+ $html .= "\t\t\t\t\t\t<li class='meta_wiki'><a href='$gentoo_wiki'>$istr_wiki</a></li>\n";
+ $html .= "\t\t\t\t\t\t<li class='meta_changelog'><a href='$changelog' onclick=\"$('data').update($('changelog').innerHTML); return false;\">$istr_changelog</a></li>\n";
+ $html .= "\t\t\t\t\t\t<li class='meta_useflags'><a href='$useflags'>$istr_use_flags</a></li>\n";
+ if($view == 'new' || $view == 'search') {
+ $html .= "\t\t\t\t\t\t<li class='meta_package'><a href='$base_uri$url_category'>$category_name</a></li>\n";
+ } else {
+ $html .= "\t\t\t\t\t\t<li class='meta_bugs'><a href='$bugs' onclick=\"$('data').update($('bugs').innerHTML); return false;\">$istr_bugs</a></li>\n";
+ $html .= "\t\t\t\t\t\t<li class='meta_database_table'><a href='$gentoo_cvs'>$istr_cvs</a></li>\n";
+ }
+
+ $html .= "\t\t\t\t\t</ul>\n";
+ $html .= "\t\t\t\t</div>\n";
+
+ }
+
+ if($view == 'package' || $view == 'ebuild') {
+
+ $html .= "\t\t\t<div class='pkg_meta'>\n";
+
+ $html .= "\t\t\t\t<div class='pkg_desc'>\n";
+ $html .= "\t\t\t\t\t<h4>$istr_package_description:</h4>\n";
+ $html .= "\t\t\t\t\t<p>$description</p>\n";
+ $html .= "\t\t\t\t</div>\n";
+
+ $html .= "\t\t\t\t<div class='vr_dotted'></div>\n";
+
+ $html .= "\t\t\t\t<div class='pkg_col'>\n";
+ $html .= "\t\t\t\t\t<h4>$istr_category:</h4>\n";
+ $html .= "\t\t\t\t\t<p><a href='".$base_uri.$url_category."'>$category_name</a></p>\n";
+ $html .= "\t\t\t\t</div>\n";
+
+// $html .= "\t\t\t\t<div class='vr_dotted'></div>\n";
+
+// $html .= "\t\t\t\t<div class='pkg_col'>\n";
+// $html .= "\t\t\t\t\t<ul>\n";
+// $html .= "\t\t\t\t\t<h4>$istr_license:</h4>\n";
+// foreach($url_licenses as $name => $url)
+// $html .= "\t\t\t\t\t\t<li><a href='$url'>$name</a></li>\n";
+// $html .= "\t\t\t\t\t</ul>\n";
+// $html .= "\t\t\t\t</div>\n";
+
+ $html .= "\t\t\t\t<div class='vr_dotted'></div>\n";
+
+ $html .= "\t\t\t\t<div class='pkg_col'>\n";
+ $html .= "\t\t\t\t\t<ul>\n";
+
+ $html .= "\t\t\t\t\t\t<li class='meta_homepage'><a href='$homepage' rel='nofollow'>$istr_homepage</a></li>\n";
+ $html .= "\t\t\t\t\t\t<li class='meta_forums'><a href='$gentoo_forums'>$istr_forums</a></li>\n";
+ $html .= "\t\t\t\t\t\t<li class='meta_mailing_list'><a href='$ml'>$istr_mailing_lists</a></li>\n";
+ $html .= "\t\t\t\t\t\t<li class='meta_wiki'><a href='$gentoo_wiki'>$istr_wiki</a></li>\n";
+
+ $html .= "\t\t\t\t\t</ul>\n";
+ $html .= "\t\t\t\t</div>\n";
+
+ $html .= "\t\t\t\t<div class='vr_dotted'></div>\n";
+
+ $html .= "\t\t\t\t<div class='pkg_col'>\n";
+ $html .= "\t\t\t\t\t<ul>\n";
+
+ $html .= "\t\t\t\t\t\t<li class='meta_changelog'><a href='$changelog' onclick=\"$('data').update($('changelog').innerHTML); return false;\">$istr_changelog</a></li>\n";
+ $html .= "\t\t\t\t\t\t<li class='meta_bugs'><a href='$bugs' onclick=\"$('data').update($('bugs').innerHTML); return false;\">$istr_bugs</a></li>\n";
+ $html .= "\t\t\t\t\t\t<li class='meta_useflags'><a href='$useflags' onclick=\"$('data').update($('useflags').innerHTML); return false;\">$istr_use_flags</a></li>\n";
+ $html .= "\t\t\t\t\t\t<li class='meta_dependencies'><a href='$dependencies' onclick=\"$('data').update($('dependencies').innerHTML); return false;\">$istr_dependencies</a></li>\n";
+
+ $html .= "\t\t\t\t\t</ul>\n";
+ $html .= "\t\t\t\t</div>\n";
+
+ $html .= "\t\t\t\t<div class='vr_dotted'></div>\n";
+
+ $html .= "\t\t\t\t<div class='pkg_col'>\n";
+ $html .= "\t\t\t\t\t<ul>\n";
+
+// $html .= "\t\t\t\t\t\t<li class='meta_downloads'><a href='$downloads' onclick=\"$('data').update($('downloads').innerHTML); return false;\">Downloads</a></li>\n";
+ $html .= "\t\t\t\t\t\t<li class='meta_license'><a href='$license' onclick=\"$('data').update($('license').innerHTML); return false;\">License</a></li>\n";
+ $html .= "\t\t\t\t\t\t<li class='meta_cvs'><a href='$gentoo_cvs'>View CVS</a></li>\n";
+ if($view == 'ebuild')
+ $html .= "\t\t\t\t\t\t<li class='meta_source'><a href='$source' onclick=\"$('data').update($('source').innerHTML); return false;\">Source Code</a></li>\n";
+
+
+ $html .= "\t\t\t\t\t</ul>\n";
+ $html .= "\t\t\t\t</div>\n";
+
+ $html .= "\t\t\t\t<div class='clear'></div>\n";
+
+ $html .= "\t\t\t</div>\n";
+ }
+
+ $html .= "\t\t</div>\n";
+
+ return $html;
+
+ }
+
+ function getRowClass($i = 0) {
+ $i = intval($i);
+
+ if(($i % 2) == 0)
+ return 'odd';
+ else
+ return 'even';
+ }
+
+?> \ No newline at end of file
diff --git a/inc.header2.php b/inc.header2.php
new file mode 100644
index 0000000..f9fe8c0
--- /dev/null
+++ b/inc.header2.php
@@ -0,0 +1,62 @@
+<?
+
+ // Get the recent packages for rightnav
+ // FIXME use package_recent
+ $recent_amount = $amount * 10;
+ $sql = "SELECT c.name AS category_name, p.name AS package_name, e.pvr FROM ebuild e INNER JOIN package_recent pr ON e.package = pr.package AND e.cache_mtime = pr.max_ebuild_mtime INNER JOIN package p ON e.package = p.id INNER JOIN category c ON c.id = p.category WHERE e.status = 0 ORDER BY pr.max_ebuild_mtime DESC, e.package, e.ev DESC, e.lvl DESC, e.p IS NULL, e.p DESC, e.rc IS NULL, e.rc DESC, e.pre IS NULL, e.pre DESC, e.beta IS NULL, e.beta DESC, e.alpha IS NULL, e.alpha DESC, e.pr IS NULL, e.pr DESC LIMIT $recent_amount;";
+ $arr_recent_packages = $db->getAll($sql);
+
+?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="description" content="" />
+ <meta name="keywords" content="" />
+
+ <link rel="stylesheet" href="<?=$base_uri;?>css/master.css" type="text/css" media="screen" title="no title" charset="utf-8">
+ <? if($lingua == 'es') { ?>
+ <link rel="stylesheet" href="<?=$base_uri;?>css/es.css" type="text/css" media="screen" title="no title" charset="utf-8">
+ <? } ?>
+ <? if($lingua == 'de') { ?>
+ <link rel="stylesheet" href="<?=$base_uri;?>css/de.css" type="text/css" media="screen" title="no title" charset="utf-8">
+ <? } ?>
+ <? if($lingua == 'tr') { ?>
+ <link rel="stylesheet" href="<?=$base_uri;?>css/tr.css" type="text/css" media="screen" title="no title" charset="utf-8">
+ <? } ?>
+ <? if($lingua == 'cs') { ?>
+ <link rel="stylesheet" href="<?=$base_uri;?>css/cs.css" type="text/css" media="screen" title="no title" charset="utf-8">
+ <? } ?>
+ <link rel="icon" type="image/vnd.microsoft.icon" href="<?=$base_uri;?>favicon.ico" />
+
+ <title>gentoo linux ~ <?=$html_title;?></title>
+<?
+
+ $title = "recent packages";
+ $atom = $base_url."xml/feeds/fresh_ebuilds/atom.xml";
+ $rss = $base_url."xml/feeds/fresh_ebuilds/rss.xml";
+
+ echo "<link rel='alternate' type='application/atom+xml' title='the fresh ebuilds (atom)' href='$atom'>\n";
+ echo "<link rel='alternate' type='application/rss+xml' title='the fresh ebuilds (rss)' href='$rss'>\n";
+
+ if($arch) {
+ $atom = $base_url."xml/feeds/fresh_ebuilds/atom.$arch.xml";
+ $rss = $base_url."xml/feeds/fresh_ebuilds/rss.$arch.xml";
+ echo "<link rel='alternate' type='application/atom+xml' title='the fresh ebuilds ~ $arch (atom)' href='$atom'>\n";
+ echo "<link rel='alternate' type='application/rss+xml' title='the fresh ebuilds ~ $arch (rss)' href='$rss'>\n";
+ }
+
+ $atom = $base_url."xml/feeds/new_packages/atom.xml";
+ $rss = $base_url."xml/feeds/new_packages/rss.xml";
+
+ echo "<link rel='alternate' type='application/atom+xml' title='new packges (atom)' href='$atom'>\n";
+ echo "<link rel='alternate' type='application/rss+xml' title='new packges (rss)' href='$rss'>\n";
+
+// if($arch) {
+// $arch_title = "$title ~ $arch";
+// $arch_url = "$url?arch=$arch";
+// // echo "<link rel='alternate' type='application/atom+xml' title='$arch_title' href='$arch_url'>\n";
+// }
+
+?>
+
+ <script type='text/javascript' src='<?=$base_uri;?>prototype.js'></script> \ No newline at end of file
diff --git a/inc.header3.php b/inc.header3.php
new file mode 100644
index 0000000..cbdabcb
--- /dev/null
+++ b/inc.header3.php
@@ -0,0 +1,2 @@
+</head>
+<body id='<?=$body;?>'> \ No newline at end of file
diff --git a/inc.i18n.php b/inc.i18n.php
new file mode 100644
index 0000000..8372616
--- /dev/null
+++ b/inc.i18n.php
@@ -0,0 +1,65 @@
+<?
+
+ $arr_locales = array(
+ 'cs_CZ' => 'Czech',
+ 'de_DE' => 'German',
+ 'el_GR' => 'Greek',
+ 'en_US' => 'English',
+ 'es_US' => 'Spanish',
+ 'fr_FR' => 'French',
+ 'tr_TR' => 'Turkish',
+ 'it_IT' => 'Italian',
+ );
+
+ if($_SERVER['HTTP_HOST'] == "cs.znurt.org") {
+ $lingua = "cs";
+ $locale = "cs_CZ";
+ } elseif($_SERVER['HTTP_HOST'] == "de.znurt.org" || $lingua == "de") {
+ $i18n = true;
+ $lingua = "de";
+ $locale = "de_DE";
+ } elseif($_SERVER['HTTP_HOST'] == "es.znurt.org" || $lingua == "es") {
+ $i18n = true;
+ $lingua = "es";
+ $locale = "es_US";
+ } elseif($_SERVER['HTTP_HOST'] == "fr.znurt.org" || $lingua == "fr") {
+ $lingua = "fr";
+ $locale = "fr_FR";
+ } elseif($_SERVER['HTTP_HOST'] == "it.znurt.org" || $lingua == "it") {
+ $lingua = "it";
+ $locale = "it_IT";
+ } elseif($_SERVER['HTTP_HOST'] == "tr.znurt.org") {
+ $lingua = "tr";
+ $locale = "tr_TR";
+ } else
+ $lingua = "en";
+
+ if($locale && in_array($locale, array_keys($arr_locales))) {
+
+ setlocale(LC_MESSAGES, $locale);
+ bindtextdomain("messages", "./locale");
+ bind_textdomain_codeset("messages", 'UTF-8');
+ textdomain("messages");
+
+ }
+
+ if($i18n) {
+ $url_new_packages = str_replace(" ", "_", gettext("new packages"));
+ $url_categories = gettext("categories");
+ $url_useflags = str_replace(" ", "_", gettext("use flags"));
+ $url_arch = gettext("architectures");
+ $url_linguas = gettext("linguas");
+ $url_about = gettext("about");
+ $url_feeds = strtolower(gettext("Subscription Feeds"));
+ } else {
+ $url_new_packages = "new_packages";
+ $url_categories = "categories";
+ $url_useflags = "useflags";
+ $url_arch = "arch";
+ $url_linguas = "linguas";
+ $url_about = "about";
+ $url_feeds = "feeds";
+ }
+
+ date_default_timezone_set('UTC');
+?> \ No newline at end of file
diff --git a/inc.package.php b/inc.package.php
new file mode 100644
index 0000000..a63966b
--- /dev/null
+++ b/inc.package.php
@@ -0,0 +1,294 @@
+<?
+
+ $p = new DBPackage($package_id);
+
+ $str_changelog = $p->changelog;
+
+ echo "<div id='data'></div>";
+
+ /** Changelog **/
+ echo "<div id='changelog' style='display: none;'>\n";
+
+ $arr_patterns = array(
+ '/((bug\n?)( {1,2}\D?)|#)(\d+)/i',
+ '/([0123]?[0-9] (Jan|Feb|Mar|Apr|May|Ju[nl]|Aug|Sep|Oct|Nov|Dec) (19|20)\d{2});/',
+ '/&lt;(.+)@gentoo.org&gt;/'
+ );
+ $arr_replacements = array(
+ "<a href='https://bugs.gentoo.org/$4'>$1$4</a>",
+ "<span class='date'>$1</span>;",
+ "(<a href='http://cia.vc/stats/author/$1'>$1</a>)",
+ );
+
+ $str_changelog = wordwrap($str_changelog, 80);
+ $str_changelog = htmlspecialchars($str_changelog);
+ $str_changelog = preg_replace($arr_patterns, $arr_replacements, $str_changelog);
+
+ if(!empty($str_changelog)) {
+
+ $str = gettext("CHANGELOG");
+
+ echo "<h4>$str</h4>";
+
+ echo "<div style='margin-left: 25px; margin-bottom: 25px;'>\n";
+ echo "<div class='changelog'>";
+ echo "<pre>";
+ echo $str_changelog;
+ echo "</pre>";
+ echo "</div>";
+
+ echo "</div>\n";
+
+ }
+
+ echo "</div>\n";
+
+ /** Bugs **/
+ echo "<div id='bugs' style='display: none;'>\n";
+
+ $gentoo_bugs = "https://bugs.gentoo.org/buglist.cgi?query_format=&amp;short_desc_type=allwords&amp;short_desc=".urlencode($p->name)."&amp;bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED";
+
+ $str = gettext("BUGS");
+
+ echo "<h4>$str</h4>\n";
+
+ $sql = "SELECT bug, description FROM package_bugs WHERE package = ".$db->quote($package_id)." AND status = 0 ORDER BY bug;";
+ $arr = $db->getAssoc($sql);
+
+ if(count($arr)) {
+
+ echo "<table class='bugs' cellpadding='4' cellspacing='0'>\n";
+// echo "\t<tr>\n";
+// echo "\t\t<th>Bug</th><th>Description</th>\n";
+// echo "\t</tr>\n";
+
+ $x = 0;
+
+ foreach($arr as $bug => $description) {
+
+ $class = getRowClass($x++);
+
+ echo "\t<tr class='$class'>\n";
+ echo "\t\t<td><a href='https://bugs.gentoo.org/$bug'>$bug</a></td>\n";
+ echo "\t\t<td>".htmlentities($description)."</td>\n";
+ echo "\t</tr>\n";
+
+ }
+
+ echo "</table>\n";
+
+ } else {
+ $str = gettext("No bugs found");
+ echo "<p><b>$str</b></p>\n";
+ }
+
+
+ if($lingua == "en")
+ echo "<p style='margin: 0 20px;'><b>Notes:</b> This list is taken from a snapshot, and is not a reliable reference. Search <a href='$gentoo_bugs'>bugzilla</a> for accurate results.</p>\n";
+
+ echo "</div>\n";
+
+
+ /** Use Flags **/
+ echo "<div id='useflags' style='display: none;'>\n";
+
+ $str = gettext("USE FLAGS");
+ echo "<h4>$str</h4>\n";
+
+ if($view == 'ebuild')
+ $sql = "SELECT name, description FROM view_ebuild_use WHERE ebuild = ".$db->quote($ebuild_id)." ORDER BY name;";
+ else
+ $sql = "SELECT name, description FROM view_package_use WHERE package = ".$db->quote($package_id)." ORDER BY name;";
+
+ $arr = $db->getAssoc($sql);
+
+ if(count($arr)) {
+ echo "<table class='useflags' cellpadding='4' cellspacing='0'>\n";
+
+ $x = 0;
+
+ foreach($arr as $name => $description) {
+
+ $class = getRowClass($x++);
+
+ $url = $base_uri.'useflags/'.urlencode($name);
+
+ echo "\t<tr class='$class'>\n";
+ echo "\t\t<td valign='top'><a href='$url'>$name</a></td>\n";
+ echo "\t\t<td>".htmlentities($description)."</td>\n";
+ echo "\t</tr>\n";
+
+ }
+
+ echo "</table>\n";
+ } else {
+
+ $str = gettext("No Use Flags");
+ echo "<div class='about'>$str</div>";
+ }
+
+ echo "</div>\n";
+
+ /** Dependencies **/
+ echo "<div id='dependencies' style='display: none;'>\n";
+
+ if($view == 'ebuild')
+ $sql = "SELECT type, cp, description FROM view_ebuild_depend WHERE ebuild = ".$db->quote($ebuild_id)." ORDER BY cp;";
+ else
+ $sql = "SELECT type, cp, description FROM view_package_depend WHERE package = ".$db->quote($package_id)." ORDER BY cp;";
+
+ $arr = $db->getAll($sql);
+
+ foreach($arr as $row) {
+ $arr_depends[$row['type']][$row['cp']] = $row['description'];
+ }
+
+ if(count($arr_depends)) {
+
+ ksort($arr_depends);
+
+ foreach($arr_depends as $type => $arr) {
+
+ if($type == 'depend')
+ $str = gettext('BUILD DEPENDENCIES');
+ else
+ $str = gettext('RUNTIME DEPENDENCIES');
+
+ if(count($arr)) {
+
+ echo "<h4>$str</h4>\n";
+
+ echo "<table class='dependencies' cellpadding='4' cellspacing='0'>\n";
+
+ $x = 0;
+
+ foreach($arr as $cp => $description) {
+
+ $class = getRowClass($x++);
+ $url = $base_uri.$cp;
+
+ echo "\t<tr class='$class'>\n";
+ echo "\t\t<td valign='top'><a href='$url'>$cp</a></td>\n";
+ echo "\t\t<td>$description</td>\n";
+ echo "\t</tr>\n";
+ }
+ echo "</table>\n";
+ }
+ }
+ }
+
+ if($view == 'package') {
+ $sql = "SELECT DISTINCT cp, description FROM view_reverse_depend WHERE package = ".$db->quote($package_id)." ORDER BY cp;";
+ $arr = $db->getAssoc($sql);
+
+ if(count($arr)) {
+
+ $str = gettext("REVERSE DEPENDENCIES");
+
+ echo "<h4>$str</h4>\n";
+
+ echo "<table class='dependencies' cellpadding='4' cellspacing='0'>\n";
+
+ $x = 0;
+
+ foreach($arr as $cp => $description) {
+
+ $class = getRowClass($x++);
+ $url = $base_uri.$cp;
+
+ echo "\t<tr class='$class'>\n";
+ echo "\t\t<td valign='top'><a href='$url'>$cp</a></td>\n";
+ echo "\t\t<td>$description</td>\n";
+ echo "\t</tr>\n";
+ }
+ echo "</table>\n";
+
+ }
+
+ $arr_licenses = $p->getLicenses();
+
+ $url_licenses = array();
+
+ /** License **/
+ echo "<div id='license' style='display: none;'>\n";
+ $str = gettext("LICENSE");
+ echo "<h4>$str</h4>\n";
+
+ if(count($arr_licenses)) {
+ foreach($arr_licenses as $name) {
+ $str = nl2br(wordwrap(str_replace('-', ' ', $name), 25));
+ $url_licenses[$str] = $base_uri."licenses/".urlencode($name);
+ }
+ }
+
+ $str = "\t\t\t\t\t<ul>\n";
+ foreach($url_licenses as $name => $url)
+ $str .= "\t\t\t\t\t\t<li><a href='$url'>$name</a></li>\n";
+ $str .= "\t\t\t\t\t</ul>\n";
+
+ echo $str;
+
+ echo "</div>\n";
+
+ }
+
+ echo "</div>\n";
+
+ /** Ebuild Source **/
+ if($view == 'ebuild') {
+
+ $e = new DBEbuild($ebuild_id);
+
+ $sql = "SELECT source FROM ebuild WHERE id = ".$db->quote($ebuild_id).";";
+ $source = $db->getOne($sql);
+
+ echo "<div id='source' style='display: none;'>\n";
+ $str = gettext("SOURCE CODE");
+ echo "<h4>$str</h4>\n";
+ echo "<div style='margin: 0 25px;'>\n";
+ $str = wordwrap($source, 80);
+ echo "<pre>$str</pre>";
+ echo "</div>\n";
+ echo "</div>\n";
+
+ $arr_licenses = $e->licenses;
+
+ $url_licenses = array();
+
+ /** License **/
+ echo "<div id='license' style='display: none;'>\n";
+ $str = gettext("LICENSE");
+ echo "<h4>$str</h4>\n";
+
+ if(count($arr_licenses)) {
+ foreach($arr_licenses as $name) {
+ $str = nl2br(wordwrap(str_replace('-', ' ', $name), 25));
+ $url_licenses[$str] = $base_uri."licenses/".urlencode($name);
+ }
+ }
+
+ $str = "\t\t\t\t\t<ul>\n";
+ foreach($url_licenses as $name => $url)
+ $str .= "\t\t\t\t\t\t<li><a href='$url'>$name</a></li>\n";
+ $str .= "\t\t\t\t\t</ul>\n";
+
+ echo $str;
+
+ echo "</div>\n";
+
+ }
+
+
+
+ /** Downloads **/
+ echo "<div id='downloads' style='display: none;'>\n";
+ $str = gettext("DOWNLOADS");
+ echo "<h4>$str</h4>\n";
+ echo "</div>\n";
+
+ if(($view == 'package' && in_array($section, $arr_package_sections)) || ($view == 'ebuild' && in_array($section, $arr_ebuild_sections))) {
+ echo "<script type='text/javascript'>\n";
+ echo "$('data').update($('$section').innerHTML);";
+ echo "</script>\n";
+ }
+?> \ No newline at end of file
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..1741f7d
--- /dev/null
+++ b/index.php
@@ -0,0 +1,14 @@
+<?
+
+ require_once 'inc.header1.php';
+ require_once 'inc.header2.php';
+
+ $body = 'home';
+
+ require_once 'inc.header3.php';
+ require_once 'inc.content1.php';
+
+ require_once 'new.php';
+
+ require_once 'inc.content2.php';
+?> \ No newline at end of file
diff --git a/license.php b/license.php
new file mode 100644
index 0000000..fba5a16
--- /dev/null
+++ b/license.php
@@ -0,0 +1,43 @@
+<?
+
+ if($license_name) {
+
+ $str = gettext("LICENSE:");
+
+ if($lingua == "de")
+ echo "<h4>Nutzungsbedingung: $license_name</h4>";
+ else
+ echo "<h4>$license_name license</h4>";
+
+ echo "<div class='description'>$description</div>";
+
+ $sql = "SELECT category_name, package_name, description FROM view_package_licenses WHERE license_name = ".$db->quote($license_name)." ORDER BY category_name, package_name;";
+ $arr = $db->getAll($sql);
+
+ echo "<hr class='pkg_rule' style='margin-bottom: 15px; margin-top: 15px;'/>\n";
+
+ echo "<table class='licenses' cellpadding='4' cellspacing='0'>\n";
+
+ $x = 0;
+
+ foreach($arr as $row) {
+
+ extract($row);
+
+ $class = getRowClass($x++);
+
+ $cp = "$category_name/$package_name";
+ $url = $base_uri.$cp;
+
+ echo "\t<tr class='$class'>\n";
+ echo "\t\t<td valign='top'><a href='$url'>$cp</a></td>\n";
+ echo "\t\t<td>$description</td>\n";
+ echo "\t</tr>\n";
+
+ }
+
+ echo "</table>\n";
+
+ }
+
+?> \ No newline at end of file
diff --git a/licenses.php b/licenses.php
new file mode 100644
index 0000000..84edcab
--- /dev/null
+++ b/licenses.php
@@ -0,0 +1,36 @@
+<?
+ require_once 'inc.header1.php';
+ require_once 'inc.header2.php';
+ require_once 'inc.header3.php';
+ require_once 'inc.content1.php';
+
+ require_once 'class.db.category.php';
+
+
+ $sql = "SELECT name FROM license ORDER BY name;";
+ $arr = $db->getCol($sql);
+
+ echo "<h4>".gettext("SOFTWARE LICENSES")."</h4>\n";
+
+ echo "<hr class='pkg_rule' style='margin-bottom: 15px; margin-top: 15px;'/>\n";
+
+ echo "<table class='licenses' cellpadding='4' cellspacing='0'>\n";
+
+ $x = 0;
+
+ foreach($arr as $name) {
+
+ $class = getRowClass($x++);
+
+ $url = $base_uri."licenses/$name";
+
+ echo "\t<tr class='$class'>\n";
+ echo "\t\t<td><a href='$url'>$name</a></td>\n";
+ echo "\t</tr>\n";
+
+ }
+
+ echo "</table>\n";
+
+ require_once 'inc.content2.php';
+?> \ No newline at end of file
diff --git a/linguas.php b/linguas.php
new file mode 100644
index 0000000..03eeb8e
--- /dev/null
+++ b/linguas.php
@@ -0,0 +1,39 @@
+<?
+ require_once 'inc.header1.php';
+ require_once 'inc.header2.php';
+ require_once 'inc.header3.php';
+ require_once 'inc.content1.php';
+
+ $str = gettext("LINGUAS");
+ echo "<h4>$str</h4>\n";
+
+ echo "<hr class='pkg_rule' style='margin-bottom: 15px; margin-top: 15px;'/>\n";
+
+ echo "<div class='about'>\n";
+
+ echo "<p>Znurt is available to view in a few languages with localized links where available. Translations are provided by volunteers. We use <a href='http://www.gnu.org/software/gettext/gettext.html'>gettext</a> to translate the strings on the site from the original, and it works rather well.</p>\n";
+
+ echo "<p>If you're interested in creating a version of the site in your native tounge, translations are welcome, as long as you can maintain the file when there are updates needed. You can request a copy of the latest messages template by contacting beandog at gentoo.org.</p>\n";
+
+ $arr = array(
+ 'Czech' => array('http://cs.znurt.org/', 'cs'),
+ 'English' => array('http://en.znurt.org/', 'us'),
+ 'French' => array('http://fr.znurt.org/', 'fr'),
+ 'German' => array('http://de.znurt.org/', 'de'),
+ 'Italian' => array('http://it.znurt.org/', 'it'),
+ 'Spanish' => array('http://es.znurt.org/', 'es'),
+ 'Turkish' => array('http://tr.znurt.org/', 'tr',),
+ );
+
+ echo "<ul>\n";
+
+ foreach($arr as $lingua => $arr) {
+ echo "<li> <a href='".$arr[0]."'><img src='".$base_uri.'img/flags/'.$arr[1].".png'></a> &nbsp; <a href='".$arr[0]."'>$lingua</a></li>\n";
+ }
+
+ echo "</ul>\n";
+
+ echo "</div>\n";
+
+ require_once 'inc.content2.php';
+?> \ No newline at end of file
diff --git a/locale/cs_CZ/LC_MESSAGES/messages.mo b/locale/cs_CZ/LC_MESSAGES/messages.mo
new file mode 100644
index 0000000..6114598
--- /dev/null
+++ b/locale/cs_CZ/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/locale/cs_CZ/LC_MESSAGES/messages.po b/locale/cs_CZ/LC_MESSAGES/messages.po
new file mode 100644
index 0000000..1353eea
--- /dev/null
+++ b/locale/cs_CZ/LC_MESSAGES/messages.po
@@ -0,0 +1,438 @@
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Tomáš Chvátal <scarabeus@gentoo.org>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-01-11 13:11-0700\n"
+"PO-Revision-Date: 2010-01-11 21:46+0100\n"
+"Last-Translator: Tomáš Chvátal <scarabeus@gentoo.org>\n"
+"Language-Team: Czech <kde-i18n-doc@kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.0\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+
+#: /home/steve/svn/znurt/about.php:5
+msgid "ABOUT"
+msgstr "O APLIKACI"
+
+#: /home/steve/svn/znurt/about.php:12 /home/steve/svn/znurt/gettext.php:29
+msgid "You must be really bored if you're looking at this page."
+msgstr "Opravdu se musíš nudit jestli si tuhle stránku vyhledal."
+
+#: /home/steve/svn/znurt/about.php:15
+msgid ""
+"\"the fresh ebuilds\" is a site to track information about packages, ebuilds "
+"and their relative metadata supplied by <a href='http://www.gentoo."
+"org/'>Gentoo Linux</a>."
+msgstr ""
+"\"žhavé ebuildy\" je stránka sledující informace o balíčcích ebuildech a "
+"jejich meta informacích dostupných v <a href='http://www.gentoo."
+"org/'>Gentoo Linuxu</a>."
+
+#: /home/steve/svn/znurt/about.php:16
+msgid "This site is not an official Gentoo website."
+msgstr "Tato stránka není oficiální Gentoo webová stránka."
+
+#: /home/steve/svn/znurt/about.php:17
+msgid "Original Gentoo artwork and logos copyright &copy; Gentoo Foundation."
+msgstr "Původní Gentoo artwork a logo copyright &copy; Gentoo Foundation."
+
+#: /home/steve/svn/znurt/about.php:18
+#, php-format
+msgid "\"the fresh ebuilds\" original design and artwork by %s."
+msgstr "\"žhavé ebuildy\" původní design a artwork od %s."
+
+#: /home/steve/svn/znurt/about.php:19
+#, php-format
+msgid "Icon set copyright &copy; %s."
+msgstr "Copyright ikon: &copy; %s."
+
+#: /home/steve/svn/znurt/about.php:20
+#, php-format
+msgid "Original code and site maintenance by %s."
+msgstr "Původní kód a správcem stránky je %s."
+
+#: /home/steve/svn/znurt/about.php:21
+#, php-format
+msgid "Powered by %s and lots of chocolate-chip cookies."
+msgstr "Powered by %s a hromadou čokoládovjech sušenek."
+
+#: /home/steve/svn/znurt/architectures.php:7
+msgid "ARCHITECTURES"
+msgstr "ARCHITEKTURY"
+
+#: /home/steve/svn/znurt/architectures.php:16
+msgid "Pick the architectures to display:"
+msgstr "Vyber architektury k zobrazení:"
+
+#: /home/steve/svn/znurt/architectures.php:32
+msgid "Submit"
+msgstr "Odeslat"
+
+#: /home/steve/svn/znurt/architectures.php:34
+msgid "Reset Architectures"
+msgstr "Resetovat architektury"
+
+#: /home/steve/svn/znurt/architectures.php:72
+msgid "Select All"
+msgstr "Vybrat vše"
+
+#: /home/steve/svn/znurt/architectures.php:74
+msgid "Select None"
+msgstr "Vybrat nic"
+
+#: /home/steve/svn/znurt/architectures.php:76
+msgid "Reset"
+msgstr "Původní"
+
+#: /home/steve/svn/znurt/base.php:42 /home/steve/svn/znurt/base.php:65
+#: /home/steve/svn/znurt/base.php:100 /home/steve/svn/znurt/inc.header1.php:10
+msgid "the fresh ebuilds"
+msgstr "žhavé ebuildy"
+
+#: /home/steve/svn/znurt/base.php:42
+msgid "about"
+msgstr "O aplikaci"
+
+#: /home/steve/svn/znurt/base.php:48
+msgid "architectures"
+msgstr "architektury"
+
+#: /home/steve/svn/znurt/base.php:60
+msgid "categories"
+msgstr "kategorie"
+
+#: /home/steve/svn/znurt/base.php:65
+msgid "bugs"
+msgstr "chyby"
+
+#: /home/steve/svn/znurt/base.php:77
+msgid "xml feeds"
+msgstr "xml kanály"
+
+#: /home/steve/svn/znurt/base.php:83 /home/steve/svn/znurt/base.php:147
+msgid "licenses"
+msgstr "licence"
+
+#: /home/steve/svn/znurt/base.php:95 /home/steve/svn/znurt/base.php:161
+#: /home/steve/svn/znurt/feeds.php:47
+msgid "new packages"
+msgstr "nové balíčky"
+
+#: /home/steve/svn/znurt/base.php:100
+msgid "feature requests"
+msgstr "požadavky na vlastnosti"
+
+#: /home/steve/svn/znurt/base.php:110
+msgid "advanced search"
+msgstr "pokročilé vyhledávání"
+
+#: /home/steve/svn/znurt/base.php:116 /home/steve/svn/znurt/base.php:176
+#: /home/steve/svn/znurt/base.php:179 /home/steve/svn/znurt/useflags.php:12
+msgid "use flags"
+msgstr "use flagy"
+
+#: /home/steve/svn/znurt/base.php:142 /home/steve/svn/znurt/base.php:225
+msgid "architecture"
+msgstr "architektura"
+
+#: /home/steve/svn/znurt/base.php:154
+msgid "new ebuilds"
+msgstr "nové ebuildy"
+
+#: /home/steve/svn/znurt/base.php:167
+msgid "search"
+msgstr "Hledat"
+
+#: /home/steve/svn/znurt/bugs.php:2 /home/steve/svn/znurt/inc.package.php:51
+msgid "BUGS"
+msgstr "CHYBY"
+
+#: /home/steve/svn/znurt/categories.php:12
+msgid "CATEGORIES"
+msgstr "KATEGORIE"
+
+#: /home/steve/svn/znurt/feeds.php:7
+#: /home/steve/svn/znurt/nav.social_media.php:4
+msgid "Subscription Feeds"
+msgstr "Přihlášení k odběru kanálů"
+
+#: /home/steve/svn/znurt/feeds.php:11
+msgid "fresh ebuilds"
+msgstr "žhavé ebuildy"
+
+#: /home/steve/svn/znurt/feeds.php:26 /home/steve/svn/znurt/feeds.php:56
+msgid "All Architectures"
+msgstr "Všechny architektury"
+
+#: /home/steve/svn/znurt/inc.header1.php:98
+msgid "January"
+msgstr "Leden"
+
+#: /home/steve/svn/znurt/inc.header1.php:99
+msgid "February"
+msgstr "Únor"
+
+#: /home/steve/svn/znurt/inc.header1.php:100
+msgid "March"
+msgstr "Březen"
+
+#: /home/steve/svn/znurt/inc.header1.php:101
+msgid "April"
+msgstr "Duben"
+
+#: /home/steve/svn/znurt/inc.header1.php:102
+msgid "May"
+msgstr "Květen"
+
+#: /home/steve/svn/znurt/inc.header1.php:103
+msgid "June"
+msgstr "Červen"
+
+#: /home/steve/svn/znurt/inc.header1.php:104
+msgid "July"
+msgstr "Červenec"
+
+#: /home/steve/svn/znurt/inc.header1.php:105
+msgid "August"
+msgstr "Srpen"
+
+#: /home/steve/svn/znurt/inc.header1.php:106
+msgid "September"
+msgstr "Září"
+
+#: /home/steve/svn/znurt/inc.header1.php:107
+msgid "October"
+msgstr "Říjen"
+
+#: /home/steve/svn/znurt/inc.header1.php:108
+msgid "November"
+msgstr "Listopad"
+
+#: /home/steve/svn/znurt/inc.header1.php:109
+msgid "December"
+msgstr "Prosinec"
+
+#: /home/steve/svn/znurt/inc.header1.php:211
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "Bugs"
+msgstr "Chyby"
+
+#: /home/steve/svn/znurt/inc.header1.php:212
+msgid "Category"
+msgstr "Kategorie"
+
+#: /home/steve/svn/znurt/inc.header1.php:213
+msgid "ChangeLog"
+msgstr "Seznam změn"
+
+#: /home/steve/svn/znurt/inc.header1.php:214
+msgid "CVS"
+msgstr "CVS"
+
+#: /home/steve/svn/znurt/inc.header1.php:215
+msgid "Dependencies"
+msgstr "Závislosti"
+
+#: /home/steve/svn/znurt/inc.header1.php:216
+msgid "Forums"
+msgstr "Fóra"
+
+#: /home/steve/svn/znurt/inc.header1.php:217
+msgid "Homepage"
+msgstr "Domovská stránka"
+
+#: /home/steve/svn/znurt/inc.header1.php:218
+msgid "License"
+msgstr "Licence"
+
+#: /home/steve/svn/znurt/inc.header1.php:219
+msgid "Mailing Lists"
+msgstr "E-mailová konference"
+
+#: /home/steve/svn/znurt/inc.header1.php:220
+msgid "Metadata"
+msgstr "Meta údaje"
+
+#: /home/steve/svn/znurt/inc.header1.php:221
+msgid "PACKAGE DESCRIPTION"
+msgstr "POPIS BALÍČKU"
+
+#: /home/steve/svn/znurt/inc.header1.php:222
+msgid "Planet"
+msgstr "Planeta"
+
+#: /home/steve/svn/znurt/inc.header1.php:223
+#: /home/steve/svn/znurt/nav.primary.php:4
+msgid "Recent Changes"
+msgstr "Poslední změny"
+
+#: /home/steve/svn/znurt/inc.header1.php:224
+msgid "Source"
+msgstr "Zdroj"
+
+#: /home/steve/svn/znurt/inc.header1.php:225
+#: /home/steve/svn/znurt/nav.primary.php:8
+msgid "Use Flags"
+msgstr "Use Flagy"
+
+#: /home/steve/svn/znurt/inc.header1.php:226
+msgid "Wiki"
+msgstr "Wiki"
+
+#: /home/steve/svn/znurt/inc.package.php:29
+msgid "CHANGELOG"
+msgstr "SEZNAM ZMĚN"
+
+#: /home/steve/svn/znurt/inc.package.php:81
+msgid "No bugs found"
+msgstr "Nenalezeny žádné chyby"
+
+#: /home/steve/svn/znurt/inc.package.php:95
+msgid "USE FLAGS"
+msgstr "USE FLAGY"
+
+#: /home/steve/svn/znurt/inc.package.php:126
+msgid "No Use Flags"
+msgstr "Žádné use flagy"
+
+#: /home/steve/svn/znurt/inc.package.php:153
+msgid "BUILD DEPENDENCIES"
+msgstr "ZÁVISLOSTI PRO SESTAVENÍ"
+
+#: /home/steve/svn/znurt/inc.package.php:155
+msgid "RUNTIME DEPENDENCIES"
+msgstr "ZÁVISLOSTI PRO BĚH"
+
+#: /home/steve/svn/znurt/inc.package.php:186
+msgid "REVERSE DEPENDENCIES"
+msgstr "REVERZNÍ ZÁVISLOSTI"
+
+#: /home/steve/svn/znurt/inc.package.php:218
+msgid "SOURCE CODE"
+msgstr "ZDROJOVÝ KÓD"
+
+#: /home/steve/svn/znurt/inc.package.php:230
+msgid "LICENSE"
+msgstr "LICENCE"
+
+#: /home/steve/svn/znurt/inc.package.php:236
+msgid "DOWNLOADS"
+msgstr "STAŽENÍ"
+
+#: /home/steve/svn/znurt/license.php:5
+msgid "LICENSE:"
+msgstr "LICENCE:"
+
+#: /home/steve/svn/znurt/licenses.php:13
+msgid "SOFTWARE LICENSES"
+msgstr "SOFTWAROVÉ LICENCE"
+
+#: /home/steve/svn/znurt/nav.legend.php:3
+msgid "LEGEND"
+msgstr "LEGENDA"
+
+#: /home/steve/svn/znurt/nav.legend.php:5
+msgid "stable"
+msgstr "stabilní"
+
+#: /home/steve/svn/znurt/nav.legend.php:6
+msgid "testing"
+msgstr "testovací"
+
+#: /home/steve/svn/znurt/nav.legend.php:7
+msgid "not keyworded"
+msgstr "bez keywords"
+
+#: /home/steve/svn/znurt/nav.legend.php:8
+msgid "not available"
+msgstr "nedostupné"
+
+#: /home/steve/svn/znurt/nav.legend.php:9
+msgid "hard masked"
+msgstr "zamaskované"
+
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "About"
+msgstr "O aplikaci"
+
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "Requests"
+msgstr "Požadavky"
+
+#: /home/steve/svn/znurt/nav.primary.php:5
+#: /home/steve/svn/znurt/new_packages.php:5
+msgid "New Packages"
+msgstr "Nové balíčky"
+
+#: /home/steve/svn/znurt/nav.primary.php:6
+msgid "New Ebuilds"
+msgstr "Nové ebuildy"
+
+#: /home/steve/svn/znurt/nav.primary.php:7
+msgid "Categories"
+msgstr "Kategorie"
+
+#: /home/steve/svn/znurt/nav.primary.php:9
+msgid "Architectures"
+msgstr "Architektury"
+
+#: /home/steve/svn/znurt/nav.recent_changes.php:2
+msgid "RECENT CHANGES"
+msgstr "POSLEDNÍ ZMĚNY"
+
+#: /home/steve/svn/znurt/nav.recent_changes.php:18
+msgid "View More"
+msgstr "Zobrazit více"
+
+#: /home/steve/svn/znurt/nav.search.php:2
+msgid "SEARCH"
+msgstr "HLEDAT"
+
+#: /home/steve/svn/znurt/nav.search.php:6
+msgid "Search"
+msgstr "Hledat"
+
+#: /home/steve/svn/znurt/nav.social_media.php:5
+msgid "Follow us on Twitter"
+msgstr "Následuj nás na Twitteru"
+
+#: /home/steve/svn/znurt/new.php:15
+msgid "SORT BY PLATFORM"
+msgstr "SEŘADIT DLE PLATFORMY"
+
+#: /home/steve/svn/znurt/new.php:18
+msgid "all platforms"
+msgstr "všechny platformy"
+
+#: /home/steve/svn/znurt/new.php:70
+msgid "Next Page"
+msgstr "Následující strana"
+
+#: /home/steve/svn/znurt/new.php:74
+msgid "Previous Page"
+msgstr "Předchozí strana"
+
+#: /home/steve/svn/znurt/search.php:30
+msgid "ADVANCED SEARCH"
+msgstr "POKROČILÉ VYHLEDÁVÁNÍ"
+
+#: /home/steve/svn/znurt/search.php:79 /home/steve/svn/znurt/search.php:109
+#, php-format
+msgid "SEARCH RESULTS FOR %1$s &nbsp; (%2$u)"
+msgstr "VÝSLEDKY HLEDÁNÍ PRO %1$s &nbsp; (%2$u)"
+
+#: /home/steve/svn/znurt/search.php:95
+#, php-format
+msgid "TOP (%1$u) SEARCH RESULTS FOR %2$s &nbsp; (%3$u)"
+msgstr "NEJVYŠŠÍCH (%1$u) VÝSLEDKŮ PRO %2$s &nbsp; (%3$u)"
+
+#: /home/steve/svn/znurt/search.php:112
+msgid "Hmm, that query didn't work."
+msgstr "Hmm, tak tenhle query mi nevyšel."
+
diff --git a/locale/de_DE/LC_MESSAGES/messages.mo b/locale/de_DE/LC_MESSAGES/messages.mo
new file mode 100644
index 0000000..e81c6db
--- /dev/null
+++ b/locale/de_DE/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/locale/de_DE/LC_MESSAGES/messages.po b/locale/de_DE/LC_MESSAGES/messages.po
new file mode 100644
index 0000000..c2d2cf2
--- /dev/null
+++ b/locale/de_DE/LC_MESSAGES/messages.po
@@ -0,0 +1,437 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-01-11 12:36-0700\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: /home/steve/svn/znurt/about.php:3
+msgid "ABOUT"
+msgstr "ÜBER"
+
+#: /home/steve/svn/znurt/about.php:23
+msgid "You must be really bored if you're looking at this page."
+msgstr "Du musst wirklich gelangweilt sein, wenn du dir diese Seite anschaust."
+
+#: /home/steve/svn/znurt/about.php:24
+#, php-format
+msgid ""
+"\"the fresh ebuilds\" is a site to track information about packages, ebuilds and their relative "
+"metadata supplied by <a href='http://www.gentoo.org/'>Gentoo Linux</a>."
+msgstr ""
+"&raquo;die frischen ebuilds&laquo; ist eine Seite, die Informationen über Pakete, Ebuilds und "
+"die entsprechenden Metadaten aus <a href='http://www.gentoo.org/'>Gentoo Linux</a> aufbereitet."
+
+#: /home/steve/svn/znurt/about.php:25
+msgid "This site is not an official Gentoo website."
+msgstr "Diese Seite ist nicht offiziell mit Gentoo verbunden."
+
+#: /home/steve/svn/znurt/about.php:26
+#, php-format
+msgid "Original Gentoo artwork and logos copyright &copy; Gentoo Foundation."
+msgstr "Alle Markenzeichen und Logos unterstehen dem Urheberrecht der Gentoo Stiftung."
+
+#: /home/steve/svn/znurt/about.php:27
+#, php-format
+msgid "\"the fresh ebuilds\" original design and artwork by %s."
+msgstr "Design und Gestaltung von &raquo;die frischen ebuilds&laquo; stammt von %s."
+
+#: /home/steve/svn/znurt/about.php:28
+#, php-format
+msgid "Icon set copyright &copy; %s."
+msgstr "Urheberrecht an den Icons &copy; %s."
+
+#: /home/steve/svn/znurt/about.php:29
+#, php-format
+msgid "Original code and site maintenance by %s."
+msgstr "Ursprünglicher Code und Seitenbetreuung durch %s."
+
+#: /home/steve/svn/znurt/about.php:30
+#, php-format
+msgid "Powered by %s and lots of chocolate-chip cookies."
+msgstr "Ermöglicht durch %s und viele Schokoladenkekse."
+
+#: /home/steve/svn/znurt/architectures.php:7
+msgid "ARCHITECTURES"
+msgstr "ARCHITEKTUREN"
+
+#: /home/steve/svn/znurt/architectures.php:16
+msgid "Pick the architectures to display:"
+msgstr ""
+
+#: /home/steve/svn/znurt/architectures.php:32
+msgid "Submit"
+msgstr ""
+
+#: /home/steve/svn/znurt/architectures.php:34
+msgid "Reset Architectures"
+msgstr ""
+
+#: /home/steve/svn/znurt/architectures.php:72
+msgid "Select All"
+msgstr ""
+
+#: /home/steve/svn/znurt/architectures.php:74
+msgid "Select None"
+msgstr ""
+
+#: /home/steve/svn/znurt/architectures.php:76
+msgid "Reset"
+msgstr ""
+
+#: /home/steve/svn/znurt/base.php:42 /home/steve/svn/znurt/base.php:65
+#: /home/steve/svn/znurt/base.php:100 /home/steve/svn/znurt/inc.header1.php:12
+msgid "the fresh ebuilds"
+msgstr "die frischen ebuilds"
+
+#: /home/steve/svn/znurt/base.php:42
+msgid "about"
+msgstr "über"
+
+#: /home/steve/svn/znurt/base.php:48
+msgid "architectures"
+msgstr "architekturen"
+
+#: /home/steve/svn/znurt/base.php:60
+msgid "categories"
+msgstr "kategorien"
+
+#: /home/steve/svn/znurt/base.php:65
+msgid "bugs"
+msgstr "fehler"
+
+#: /home/steve/svn/znurt/base.php:77
+msgid "xml feeds"
+msgstr "xml-feeds"
+
+#: /home/steve/svn/znurt/base.php:83 /home/steve/svn/znurt/base.php:147
+msgid "licenses"
+msgstr "nutzungsbedingungen für software"
+
+#: /home/steve/svn/znurt/base.php:95 /home/steve/svn/znurt/base.php:161
+#: /home/steve/svn/znurt/feeds.php:47
+msgid "new packages"
+msgstr "neue pakete"
+
+#: /home/steve/svn/znurt/base.php:100
+msgid "feature requests"
+msgstr ""
+
+#: /home/steve/svn/znurt/base.php:110
+msgid "advanced search"
+msgstr ""
+
+#: /home/steve/svn/znurt/base.php:116 /home/steve/svn/znurt/base.php:176
+#: /home/steve/svn/znurt/base.php:179 /home/steve/svn/znurt/useflags.php:12
+msgid "use flags"
+msgstr "use-flags"
+
+#: /home/steve/svn/znurt/base.php:142 /home/steve/svn/znurt/base.php:225
+msgid "architecture"
+msgstr ""
+
+#: /home/steve/svn/znurt/base.php:154
+msgid "new ebuilds"
+msgstr ""
+
+#: /home/steve/svn/znurt/base.php:167
+msgid "search"
+msgstr "suche"
+
+#: /home/steve/svn/znurt/bugs.php:2 /home/steve/svn/znurt/inc.package.php:51
+msgid "BUGS"
+msgstr "FEHLER"
+
+#: /home/steve/svn/znurt/categories.php:12
+msgid "CATEGORIES"
+msgstr "KATEGORIEN"
+
+#: /home/steve/svn/znurt/feeds.php:7
+#: /home/steve/svn/znurt/nav.social_media.php:4
+msgid "Subscription Feeds"
+msgstr "Feed-Abo"
+
+#: /home/steve/svn/znurt/feeds.php:11
+msgid "fresh ebuilds"
+msgstr "frische ebuilds"
+
+#: /home/steve/svn/znurt/feeds.php:26 /home/steve/svn/znurt/feeds.php:56
+msgid "All Architectures"
+msgstr "Alle Architekturen"
+
+#: /home/steve/svn/znurt/search.php:109
+#, php-format
+msgid "SEARCH RESULTS FOR %1$s &nbsp; (%2$u)"
+msgstr ""
+
+#: /home/steve/svn/znurt/inc.header1.php:287
+msgid "January"
+msgstr "Januar"
+
+#: /home/steve/svn/znurt/inc.header1.php:288
+msgid "February"
+msgstr "Februar"
+
+#: /home/steve/svn/znurt/inc.header1.php:289
+msgid "March"
+msgstr "Maerz"
+
+#: /home/steve/svn/znurt/inc.header1.php:290
+msgid "April"
+msgstr "April"
+
+#: /home/steve/svn/znurt/inc.header1.php:291
+msgid "May"
+msgstr "Mai"
+
+#: /home/steve/svn/znurt/inc.header1.php:292
+msgid "June"
+msgstr "Juni"
+
+#: /home/steve/svn/znurt/inc.header1.php:293
+msgid "July"
+msgstr "Juli"
+
+#: /home/steve/svn/znurt/inc.header1.php:294
+msgid "August"
+msgstr "August"
+
+#: /home/steve/svn/znurt/inc.header1.php:295
+msgid "September"
+msgstr "September"
+
+#: /home/steve/svn/znurt/inc.header1.php:296
+msgid "October"
+msgstr "October"
+
+#: /home/steve/svn/znurt/inc.header1.php:297
+msgid "November"
+msgstr "November"
+
+#: /home/steve/svn/znurt/inc.header1.php:298
+msgid "December"
+msgstr "Dezember"
+
+#: /home/steve/svn/znurt/inc.header1.php:400
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "Bugs"
+msgstr "Fehler"
+
+#: /home/steve/svn/znurt/inc.header1.php:401
+msgid "Category"
+msgstr "Kategorie"
+
+#: /home/steve/svn/znurt/inc.header1.php:402
+msgid "ChangeLog"
+msgstr "Änderungsprotokoll"
+
+#: /home/steve/svn/znurt/inc.header1.php:403
+msgid "CVS"
+msgstr "CVS"
+
+#: /home/steve/svn/znurt/inc.header1.php:404
+msgid "Dependencies"
+msgstr "Abhängigkeiten"
+
+#: /home/steve/svn/znurt/inc.header1.php:405
+msgid "Forums"
+msgstr "Foren"
+
+#: /home/steve/svn/znurt/inc.header1.php:406
+msgid "Homepage"
+msgstr "Homepage"
+
+#: /home/steve/svn/znurt/inc.header1.php:407
+msgid "License"
+msgstr "Lizenz"
+
+#: /home/steve/svn/znurt/inc.header1.php:408
+msgid "Mailing Lists"
+msgstr "Mailinglisten"
+
+#: /home/steve/svn/znurt/inc.header1.php:409
+msgid "Metadata"
+msgstr ""
+
+#: /home/steve/svn/znurt/inc.header1.php:410
+msgid "PACKAGE DESCRIPTION"
+msgstr "Paketbeschreibung"
+
+#: /home/steve/svn/znurt/inc.header1.php:411
+msgid "Planet"
+msgstr ""
+
+#: /home/steve/svn/znurt/inc.header1.php:412
+#: /home/steve/svn/znurt/nav.primary.php:4
+msgid "Recent Changes"
+msgstr "Letzte Änderung"
+
+#: /home/steve/svn/znurt/inc.header1.php:413
+msgid "Source"
+msgstr ""
+
+#: /home/steve/svn/znurt/inc.header1.php:414
+#: /home/steve/svn/znurt/nav.primary.php:8
+msgid "Use Flags"
+msgstr "USE-Flags"
+
+#: /home/steve/svn/znurt/inc.header1.php:415
+msgid "Wiki"
+msgstr "Wiki"
+
+#: /home/steve/svn/znurt/inc.package.php:29
+msgid "CHANGELOG"
+msgstr "ÄNDERUNGSPROTOKOLL"
+
+#: /home/steve/svn/znurt/inc.package.php:81
+msgid "No bugs found"
+msgstr ""
+
+#: /home/steve/svn/znurt/inc.package.php:95
+msgid "USE FLAGS"
+msgstr "USE-FLAGS"
+
+#: /home/steve/svn/znurt/inc.package.php:126
+msgid "No Use Flags"
+msgstr ""
+
+#: /home/steve/svn/znurt/inc.package.php:153
+msgid "BUILD DEPENDENCIES"
+msgstr "KOMPILIER-ABHÄNGIGKEITEN"
+
+#: /home/steve/svn/znurt/inc.package.php:155
+msgid "RUNTIME DEPENDENCIES"
+msgstr "LAUFZEITABHÄNGIGKEITEN"
+
+#: /home/steve/svn/znurt/inc.package.php:186
+msgid "REVERSE DEPENDENCIES"
+msgstr "INVERSE ABHÄNGIGKEITEN"
+
+#: /home/steve/svn/znurt/inc.package.php:218
+msgid "SOURCE CODE"
+msgstr ""
+
+#: /home/steve/svn/znurt/inc.package.php:230
+msgid "LICENSE"
+msgstr "LIZENZ"
+
+#: /home/steve/svn/znurt/inc.package.php:236
+msgid "DOWNLOADS"
+msgstr ""
+
+#: /home/steve/svn/znurt/license.php:5
+msgid "LICENSE:"
+msgstr "LIZENZ:"
+
+#: /home/steve/svn/znurt/licenses.php:13
+msgid "SOFTWARE LICENSES"
+msgstr "NUTZUNGSBEDINGUNGEN FÜR SOFTWARE"
+
+#: /home/steve/svn/znurt/nav.legend.php:3
+msgid "LEGEND"
+msgstr "Legende"
+
+#: /home/steve/svn/znurt/nav.legend.php:5
+msgid "stable"
+msgstr "stable"
+
+#: /home/steve/svn/znurt/nav.legend.php:6
+msgid "testing"
+msgstr "testing"
+
+#: /home/steve/svn/znurt/nav.legend.php:7
+msgid "not keyworded"
+msgstr "keine Keywords"
+
+#: /home/steve/svn/znurt/nav.legend.php:8
+msgid "not available"
+msgstr "nicht verfügbar"
+
+#: /home/steve/svn/znurt/nav.legend.php:9
+msgid "hard masked"
+msgstr "maskiert"
+
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "About"
+msgstr "Über"
+
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "Requests"
+msgstr "Anfragen"
+
+#: /home/steve/svn/znurt/nav.primary.php:5
+#: /home/steve/svn/znurt/new_packages.php:5
+msgid "New Packages"
+msgstr "Neue Pakete"
+
+#: /home/steve/svn/znurt/nav.primary.php:6
+msgid "New Ebuilds"
+msgstr ""
+
+#: /home/steve/svn/znurt/nav.primary.php:7
+msgid "Categories"
+msgstr "Kategorien"
+
+#: /home/steve/svn/znurt/nav.primary.php:9
+msgid "Architectures"
+msgstr "Architekturen"
+
+#: /home/steve/svn/znurt/nav.recent_changes.php:2
+msgid "RECENT CHANGES"
+msgstr "LETZTE ÄNDERUNG"
+
+#: /home/steve/svn/znurt/nav.recent_changes.php:18
+msgid "View More"
+msgstr "Mehr"
+
+#: /home/steve/svn/znurt/nav.search.php:2
+msgid "SEARCH"
+msgstr "SUCHE"
+
+#: /home/steve/svn/znurt/nav.search.php:6
+msgid "Search"
+msgstr "Suche"
+
+#: /home/steve/svn/znurt/nav.social_media.php:5
+msgid "Follow us on Twitter"
+msgstr "Folge uns auf Twitter"
+
+#: /home/steve/svn/znurt/new.php:15
+msgid "SORT BY PLATFORM"
+msgstr "sortieren nach Plattform"
+
+#: /home/steve/svn/znurt/new.php:18
+msgid "all platforms"
+msgstr "alle Plattformen"
+
+#: /home/steve/svn/znurt/new.php:70
+msgid "Next Page"
+msgstr ""
+
+#: /home/steve/svn/znurt/new.php:74
+msgid "Previous Page"
+msgstr ""
+
+#: /home/steve/svn/znurt/search.php:30
+msgid "ADVANCED SEARCH"
+msgstr ""
+
+#: /home/steve/svn/znurt/search.php:95
+#, php-format
+msgid "TOP (%1$u) SEARCH RESULTS FOR %2$s &nbsp; (%3$u)"
+msgstr ""
+
+#: /home/steve/svn/znurt/search.php:112
+msgid "Hmm, that query didn't work."
+msgstr ""
diff --git a/locale/es_US/LC_MESSAGES/messages.mo b/locale/es_US/LC_MESSAGES/messages.mo
new file mode 100644
index 0000000..25d572f
--- /dev/null
+++ b/locale/es_US/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/locale/es_US/LC_MESSAGES/messages.po b/locale/es_US/LC_MESSAGES/messages.po
new file mode 100644
index 0000000..c8295a7
--- /dev/null
+++ b/locale/es_US/LC_MESSAGES/messages.po
@@ -0,0 +1,394 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-01-11 10:48-0700\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: /home/steve/svn/znurt/about.php:3
+msgid "ABOUT"
+msgstr "ACERCA"
+
+#: /home/steve/svn/znurt/architectures.php:7
+msgid "ARCHITECTURES"
+msgstr "ARQUITECTURAS"
+
+#: /home/steve/svn/znurt/architectures.php:16
+msgid "Pick the architectures to display:"
+msgstr "Elige las arquitecturas para usar:"
+
+#: /home/steve/svn/znurt/architectures.php:32
+msgid "Submit"
+msgstr ""
+
+#: /home/steve/svn/znurt/architectures.php:34
+msgid "Reset Architectures"
+msgstr ""
+
+#: /home/steve/svn/znurt/architectures.php:72
+msgid "Select All"
+msgstr ""
+
+#: /home/steve/svn/znurt/architectures.php:74
+msgid "Select None"
+msgstr ""
+
+#: /home/steve/svn/znurt/architectures.php:76
+msgid "Reset"
+msgstr ""
+
+#: /home/steve/svn/znurt/base.php:42 /home/steve/svn/znurt/base.php:65
+#: /home/steve/svn/znurt/base.php:100 /home/steve/svn/znurt/gettext.php:11
+#: /home/steve/svn/znurt/inc.header1.php:12
+msgid "the fresh ebuilds"
+msgstr "los nuevos ebuilds"
+
+#: /home/steve/svn/znurt/base.php:42
+msgid "about"
+msgstr "acerca"
+
+#: /home/steve/svn/znurt/base.php:48
+msgid "architectures"
+msgstr "arquitecturas"
+
+#: /home/steve/svn/znurt/base.php:60
+msgid "categories"
+msgstr "categorias"
+
+#: /home/steve/svn/znurt/base.php:65
+msgid "bugs"
+msgstr "problemas"
+
+#: /home/steve/svn/znurt/base.php:77
+msgid "xml feeds"
+msgstr "suscripciones xml"
+
+#: /home/steve/svn/znurt/base.php:83 /home/steve/svn/znurt/base.php:147
+msgid "licenses"
+msgstr "las licensias"
+
+#: /home/steve/svn/znurt/base.php:95 /home/steve/svn/znurt/base.php:161
+#: /home/steve/svn/znurt/feeds.php:47
+msgid "new packages"
+msgstr "nuevos paquetes"
+
+#: /home/steve/svn/znurt/base.php:100
+msgid "feature requests"
+msgstr "peticiones"
+
+#: /home/steve/svn/znurt/base.php:110
+msgid "advanced search"
+msgstr ""
+
+#: /home/steve/svn/znurt/base.php:116 /home/steve/svn/znurt/base.php:176
+#: /home/steve/svn/znurt/base.php:179 /home/steve/svn/znurt/useflags.php:12
+msgid "use flags"
+msgstr "opciones use"
+
+#: /home/steve/svn/znurt/base.php:142 /home/steve/svn/znurt/base.php:225
+msgid "architecture"
+msgstr "arquitectura"
+
+#: /home/steve/svn/znurt/base.php:154
+msgid "new ebuilds"
+msgstr "nuevos ebuilds"
+
+#: /home/steve/svn/znurt/base.php:167
+msgid "search"
+msgstr ""
+
+#: /home/steve/svn/znurt/bugs.php:2 /home/steve/svn/znurt/inc.package.php:51
+msgid "BUGS"
+msgstr "PROBLEMAS"
+
+#: /home/steve/svn/znurt/categories.php:12
+msgid "CATEGORIES"
+msgstr "CATEGORIAS"
+
+#: /home/steve/svn/znurt/nav.social_media.php:4
+msgid "Subscription Feeds"
+msgstr "Suscripciones XML"
+
+#: /home/steve/svn/znurt/feeds.php:11
+msgid "fresh ebuilds"
+msgstr "nuevos ebuilds"
+
+#: /home/steve/svn/znurt/feeds.php:26 /home/steve/svn/znurt/feeds.php:56
+msgid "All Architectures"
+msgstr "Todas Arquitecturas"
+
+#: /home/steve/svn/znurt/nav.search.php:2
+msgid "SEARCH"
+msgstr "BUSCAR"
+
+#: /home/steve/svn/znurt/nav.search.php:6
+msgid "Search"
+msgstr "Buscar"
+
+#: /home/steve/svn/znurt/inc.header1.php:412
+#: /home/steve/svn/znurt/nav.primary.php:4
+msgid "Recent Changes"
+msgstr "Cambios Recientes"
+
+#: /home/steve/svn/znurt/new_packages.php:5
+#: /home/steve/svn/znurt/nav.primary.php:5
+msgid "New Packages"
+msgstr "Nuevos Paquetes"
+
+#: /home/steve/svn/znurt/nav.primary.php:7
+msgid "Categories"
+msgstr "Categorias"
+
+#: /home/steve/svn/znurt/inc.header1.php:414
+#: /home/steve/svn/znurt/nav.primary.php:8
+msgid "Use Flags"
+msgstr "Opciones Use"
+
+#: /home/steve/svn/znurt/nav.primary.php:9
+msgid "Architectures"
+msgstr "Arquitecturas"
+
+#: /home/steve/svn/znurt/nav.legend.php:3
+msgid "LEGEND"
+msgstr "LEGENDA"
+
+#: /home/steve/svn/znurt/nav.legend.php:5
+msgid "stable"
+msgstr "estable"
+
+#: /home/steve/svn/znurt/nav.legend.php:6
+msgid "testing"
+msgstr "prueba"
+
+#: /home/steve/svn/znurt/nav.legend.php:7
+msgid "not keyworded"
+msgstr "no marcadas"
+
+#: /home/steve/svn/znurt/nav.legend.php:8
+msgid "not available"
+msgstr "no agregado"
+
+#: /home/steve/svn/znurt/nav.legend.php:9
+msgid "hard masked"
+msgstr "enmascaradas"
+
+#: /home/steve/svn/znurt/nav.social_media.php:5
+msgid "Follow us on Twitter"
+msgstr "Síguenos en Twitter"
+
+#: /home/steve/svn/znurt/nav.recent_changes.php:2
+msgid "RECENT CHANGES"
+msgstr "CAMBIOS RECIENTES"
+
+#: /home/steve/svn/znurt/nav.recent_changes.php:18
+msgid "View More"
+msgstr "Ver Más"
+
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "About"
+msgstr "Acerca"
+
+#: /home/steve/svn/znurt/inc.header1.php:400
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "Bugs"
+msgstr "Problemas"
+
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "Requests"
+msgstr "Peticiones"
+
+#: /home/steve/svn/znurt/inc.header1.php:287
+msgid "January"
+msgstr "Enero"
+
+#: /home/steve/svn/znurt/inc.header1.php:288
+msgid "February"
+msgstr "Febrero"
+
+#: /home/steve/svn/znurt/inc.header1.php:289
+msgid "March"
+msgstr "Marzo"
+
+#: /home/steve/svn/znurt/inc.header1.php:290
+msgid "April"
+msgstr "Abril"
+
+#: /home/steve/svn/znurt/inc.header1.php:291
+msgid "May"
+msgstr "Mayo"
+
+#: /home/steve/svn/znurt/inc.header1.php:292
+msgid "June"
+msgstr "Junio"
+
+#: /home/steve/svn/znurt/inc.header1.php:293
+msgid "July"
+msgstr "Julio"
+
+#: /home/steve/svn/znurt/inc.header1.php:294
+msgid "August"
+msgstr "Agosto"
+
+#: /home/steve/svn/znurt/inc.header1.php:295
+msgid "September"
+msgstr "Septiembre"
+
+#: /home/steve/svn/znurt/inc.header1.php:296
+msgid "October"
+msgstr "Octubre"
+
+#: /home/steve/svn/znurt/inc.header1.php:297
+msgid "November"
+msgstr "Noviembre"
+
+#: /home/steve/svn/znurt/inc.header1.php:298
+msgid "December"
+msgstr "Diciembre"
+
+#: /home/steve/svn/znurt/inc.header1.php:401
+msgid "Category"
+msgstr "Categoría"
+
+#: /home/steve/svn/znurt/inc.header1.php:402
+msgid "ChangeLog"
+msgstr "Cambios"
+
+#: /home/steve/svn/znurt/inc.header1.php:403
+msgid "CVS"
+msgstr ""
+
+#: /home/steve/svn/znurt/inc.header1.php:404
+msgid "Dependencies"
+msgstr "Dependencias"
+
+#: /home/steve/svn/znurt/inc.header1.php:405
+msgid "Forums"
+msgstr "Forums"
+
+#: /home/steve/svn/znurt/inc.header1.php:406
+msgid "Homepage"
+msgstr "Sitio Web"
+
+#: /home/steve/svn/znurt/inc.header1.php:407
+msgid "License"
+msgstr "Licensia"
+
+#: /home/steve/svn/znurt/inc.header1.php:408
+msgid "Mailing Lists"
+msgstr "Lista de Correo"
+
+#: /home/steve/svn/znurt/inc.header1.php:409
+msgid "Metadata"
+msgstr ""
+
+#: /home/steve/svn/znurt/inc.header1.php:410
+msgid "PACKAGE DESCRIPTION"
+msgstr "DESCRIPCIÓN DE PAQUETE"
+
+#: /home/steve/svn/znurt/inc.header1.php:411
+msgid "Planet"
+msgstr "Planeta"
+
+#: /home/steve/svn/znurt/inc.header1.php:413
+msgid "Source"
+msgstr ""
+
+#: /home/steve/svn/znurt/inc.header1.php:415
+msgid "Wiki"
+msgstr "Wiki"
+
+#: /home/steve/svn/znurt/inc.package.php:29
+msgid "CHANGELOG"
+msgstr "CAMBIOS"
+
+#: /home/steve/svn/znurt/inc.package.php:81
+msgid "No bugs found"
+msgstr ""
+
+#: /home/steve/svn/znurt/inc.package.php:95
+msgid "USE FLAGS"
+msgstr "OPCIONES USE"
+
+#: /home/steve/svn/znurt/inc.package.php:126
+msgid "No Use Flags"
+msgstr "No hay opciones use"
+
+#: /home/steve/svn/znurt/inc.package.php:153
+msgid "BUILD DEPENDENCIES"
+msgstr "DEPENDENCIAS DE CONSTRUCCIÓN"
+
+#: /home/steve/svn/znurt/inc.package.php:155
+msgid "RUNTIME DEPENDENCIES"
+msgstr "DEPENDENCIAS DE EJECUCIÓN"
+
+#: /home/steve/svn/znurt/inc.package.php:186
+msgid "REVERSE DEPENDENCIES"
+msgstr "DEPENDENCIAS EN REVERSO"
+
+#: /home/steve/svn/znurt/inc.package.php:218
+msgid "SOURCE CODE"
+msgstr ""
+
+#: /home/steve/svn/znurt/inc.package.php:230
+msgid "LICENSE"
+msgstr "LICENZA"
+
+#: /home/steve/svn/znurt/inc.package.php:236
+msgid "DOWNLOADS"
+msgstr ""
+
+#: /home/steve/svn/znurt/license.php:5
+msgid "LICENSE:"
+msgstr "LICENZA:"
+
+#: /home/steve/svn/znurt/licenses.php:13
+msgid "SOFTWARE LICENSES"
+msgstr ""
+
+#: /home/steve/svn/znurt/new.php:15
+msgid "SORT BY PLATFORM"
+msgstr "ORDENA POR PLATAFORMA"
+
+#: /home/steve/svn/znurt/new.php:18
+msgid "all platforms"
+msgstr "todas"
+
+#: /home/steve/svn/znurt/new.php:70
+msgid "Next Page"
+msgstr "Proxima Página"
+
+#: /home/steve/svn/znurt/new.php:74
+msgid "Previous Page"
+msgstr "Página Previa"
+
+#: /home/steve/svn/znurt/search.php:30
+msgid "ADVANCED SEARCH"
+msgstr ""
+
+#: /home/steve/svn/znurt/search.php:78 /home/steve/svn/znurt/search.php:107
+msgid "SEARCH RESULTS FOR %1$s &nbsp; (%2$u)"
+msgstr "%2$u RESULTAS DE BUSCAR PARA %1$s"
+
+#: /home/steve/svn/znurt/search.php:93
+msgid "TOP (%1$u) SEARCH RESULTS FOR %2$s &nbsp; (%3$u)"
+msgstr "LOS PRIMEROS %1$u DE %3$u RESULTAS PARA BUSCAR %2$s"
+
+#: /home/steve/svn/znurt/search.php:110
+msgid "Hmm, that query didn't work."
+msgstr ""
+
+#: /home/steve/svn/znurt/nav.primary.php:6
+msgid "New Ebuilds"
+msgstr "Nuevos Ebuilds"
+
diff --git a/locale/fr_FR/LC_MESSAGES/messages.mo b/locale/fr_FR/LC_MESSAGES/messages.mo
new file mode 100644
index 0000000..f4a6c32
--- /dev/null
+++ b/locale/fr_FR/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/locale/fr_FR/LC_MESSAGES/messages.po b/locale/fr_FR/LC_MESSAGES/messages.po
new file mode 100644
index 0000000..36261d5
--- /dev/null
+++ b/locale/fr_FR/LC_MESSAGES/messages.po
@@ -0,0 +1,454 @@
+# znurt.org : a gentoo packages website
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: znurt.org\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-01-11 13:11-0700\n"
+"PO-Revision-Date: 2010-01-13 16:57+0100\n"
+"Last-Translator: Emmanuel Trillaud <etrillaud@gmail.com>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+# Glossaire
+# hard-masked masqué
+# plateform plate-forme
+# the fresh ebuild les nouveaux ebuilds
+# powered by propulsé par
+# keyword mot-clé
+# use flags paramètres use (cf gentoo french doc)
+
+#: /home/steve/svn/znurt/about.php:5
+msgid "ABOUT"
+msgstr "À PROPOS"
+
+#: /home/steve/svn/znurt/about.php:12 /home/steve/svn/znurt/gettext.php:29
+msgid "You must be really bored if you're looking at this page."
+msgstr "Vous devez vraiment vous ennuyer si vous lisez cette page."
+
+#: /home/steve/svn/znurt/about.php:15
+msgid ""
+"\"the fresh ebuilds\" is a site to track information about packages, ebuilds "
+"and their relative metadata supplied by <a href='http://www.gentoo."
+"org/'>Gentoo Linux</a>."
+msgstr "\"Les nouveaux ebuilds\" est un site qui rassemble l'information sur les "
+"paquets, les ebuilds et toutes les metadonnées fourni par <a "
+"href='http://www.gentoo.org/'>Gentoo Linux</a>."
+
+#: /home/steve/svn/znurt/about.php:16
+msgid "This site is not an official Gentoo website."
+msgstr "Ce site n'est pas un site officiel de Gentoo."
+
+#: /home/steve/svn/znurt/about.php:17
+msgid "Original Gentoo artwork and logos copyright &copy; Gentoo Foundation."
+msgstr "Graphisme et logo original par Gentoo copyright &copy; Gentoo Foundation."
+
+#: /home/steve/svn/znurt/about.php:18
+#, php-format
+msgid "\"the fresh ebuilds\" original design and artwork by %s."
+msgstr "\"les nouveaux ebuilds\" design et graphisme orginal par %s."
+
+#: /home/steve/svn/znurt/about.php:19
+#, php-format
+msgid "Icon set copyright &copy; %s."
+msgstr "Copyright de l'ensemble d'icônes &copy; %s."
+
+#: /home/steve/svn/znurt/about.php:20
+#, php-format
+msgid "Original code and site maintenance by %s."
+msgstr "Code original et maintenance du site par %s."
+
+#: /home/steve/svn/znurt/about.php:21
+#, php-format
+msgid "Powered by %s and lots of chocolate-chip cookies."
+msgstr "Propulsé par %s ainsi que beaucoup de cookies au chocolat."
+
+#: /home/steve/svn/znurt/architectures.php:7
+msgid "ARCHITECTURES"
+msgstr "ARCHITECTURES"
+
+#: /home/steve/svn/znurt/architectures.php:16
+msgid "Pick the architectures to display:"
+msgstr "Choisissez les architectures à afficher :"
+
+#: /home/steve/svn/znurt/architectures.php:32
+msgid "Submit"
+msgstr "Soumettre"
+
+#: /home/steve/svn/znurt/architectures.php:34
+msgid "Reset Architectures"
+msgstr "Réinitialisation des architectures"
+
+#: /home/steve/svn/znurt/architectures.php:72
+msgid "Select All"
+msgstr "Tout séléctionner"
+
+# XXX : not sure about translating or not "Select"
+# but it is understandable in the context
+#: /home/steve/svn/znurt/architectures.php:74
+msgid "Select None"
+msgstr "Aucune"
+
+#: /home/steve/svn/znurt/architectures.php:76
+msgid "Reset"
+msgstr "Réinitialisation"
+
+#: /home/steve/svn/znurt/base.php:42 /home/steve/svn/znurt/base.php:65
+#: /home/steve/svn/znurt/base.php:100 /home/steve/svn/znurt/inc.header1.php:10
+msgid "the fresh ebuilds"
+msgstr "les nouveaux ebuilds"
+
+#: /home/steve/svn/znurt/base.php:42
+msgid "about"
+msgstr "à propos"
+
+#: /home/steve/svn/znurt/base.php:48
+msgid "architectures"
+msgstr "architectures"
+
+#: /home/steve/svn/znurt/base.php:60
+msgid "categories"
+msgstr "catégories"
+
+#: /home/steve/svn/znurt/base.php:65
+msgid "bugs"
+msgstr "bugs"
+
+#: /home/steve/svn/znurt/base.php:77
+msgid "xml feeds"
+msgstr "flux xml"
+
+#: /home/steve/svn/znurt/base.php:83 /home/steve/svn/znurt/base.php:147
+msgid "licenses"
+msgstr "licences"
+
+#: /home/steve/svn/znurt/base.php:95 /home/steve/svn/znurt/base.php:161
+#: /home/steve/svn/znurt/feeds.php:47
+msgid "new packages"
+msgstr "nouveaux paquets"
+
+#: /home/steve/svn/znurt/base.php:100
+msgid "feature requests"
+msgstr "demandes d'améliorations"
+
+#: /home/steve/svn/znurt/base.php:110
+msgid "advanced search"
+msgstr "recherche avancée"
+
+#: /home/steve/svn/znurt/base.php:116 /home/steve/svn/znurt/base.php:176
+#: /home/steve/svn/znurt/base.php:179 /home/steve/svn/znurt/useflags.php:12
+msgid "use flags"
+msgstr "paramètres use"
+
+#: /home/steve/svn/znurt/base.php:142 /home/steve/svn/znurt/base.php:225
+msgid "architecture"
+msgstr "architecture"
+
+#: /home/steve/svn/znurt/base.php:154
+msgid "new ebuilds"
+msgstr "nouveaux ebuilds"
+
+#: /home/steve/svn/znurt/base.php:167
+msgid "search"
+msgstr "Rechercher"
+
+#: /home/steve/svn/znurt/bugs.php:2 /home/steve/svn/znurt/inc.package.php:51
+msgid "BUGS"
+msgstr "BUGS"
+
+#: /home/steve/svn/znurt/categories.php:12
+msgid "CATEGORIES"
+msgstr "CATÉGORIES"
+
+#: /home/steve/svn/znurt/feeds.php:7
+#: /home/steve/svn/znurt/nav.social_media.php:4
+msgid "Subscription Feeds"
+msgstr "Abonements aux flux"
+
+#: /home/steve/svn/znurt/feeds.php:11
+msgid "fresh ebuilds"
+msgstr "nouveaux ebuilds"
+
+#: /home/steve/svn/znurt/feeds.php:26 /home/steve/svn/znurt/feeds.php:56
+msgid "All Architectures"
+msgstr "Toutes les Architectures"
+
+#: /home/steve/svn/znurt/inc.header1.php:98
+msgid "January"
+msgstr "Janvier"
+
+#: /home/steve/svn/znurt/inc.header1.php:99
+msgid "February"
+msgstr "Février"
+
+#: /home/steve/svn/znurt/inc.header1.php:100
+msgid "March"
+msgstr "Mars"
+
+#: /home/steve/svn/znurt/inc.header1.php:101
+msgid "April"
+msgstr "Avril"
+
+#: /home/steve/svn/znurt/inc.header1.php:102
+msgid "May"
+msgstr "Mai"
+
+#: /home/steve/svn/znurt/inc.header1.php:103
+msgid "June"
+msgstr "Juin"
+
+#: /home/steve/svn/znurt/inc.header1.php:104
+msgid "July"
+msgstr "Juillet"
+
+#: /home/steve/svn/znurt/inc.header1.php:105
+msgid "August"
+msgstr "Août"
+
+#: /home/steve/svn/znurt/inc.header1.php:106
+msgid "September"
+msgstr "Septembre"
+
+#: /home/steve/svn/znurt/inc.header1.php:107
+msgid "October"
+msgstr "Octobre"
+
+#: /home/steve/svn/znurt/inc.header1.php:108
+msgid "November"
+msgstr "Novembre"
+
+#: /home/steve/svn/znurt/inc.header1.php:109
+msgid "December"
+msgstr "Décembre"
+
+#: /home/steve/svn/znurt/inc.header1.php:211
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "Bugs"
+msgstr "Bugs"
+
+#: /home/steve/svn/znurt/inc.header1.php:212
+msgid "Category"
+msgstr "Catégories"
+
+# XXX: Modifications
+#: /home/steve/svn/znurt/inc.header1.php:213
+msgid "ChangeLog"
+msgstr "Journal des modifications"
+
+#: /home/steve/svn/znurt/inc.header1.php:214
+msgid "CVS"
+msgstr "CVS"
+
+#: /home/steve/svn/znurt/inc.header1.php:215
+msgid "Dependencies"
+msgstr "Dépendances"
+
+#: /home/steve/svn/znurt/inc.header1.php:216
+msgid "Forums"
+msgstr "Forums"
+
+#: /home/steve/svn/znurt/inc.header1.php:217
+msgid "Homepage"
+msgstr "Site Web"
+
+#: /home/steve/svn/znurt/inc.header1.php:218
+msgid "License"
+msgstr "Licence"
+
+#: /home/steve/svn/znurt/inc.header1.php:219
+msgid "Mailing Lists"
+msgstr "Listes de diffusion"
+
+#: /home/steve/svn/znurt/inc.header1.php:220
+msgid "Metadata"
+msgstr "Métadonnée"
+
+#: /home/steve/svn/znurt/inc.header1.php:221
+msgid "PACKAGE DESCRIPTION"
+msgstr "DESCRIPTION DU PAQUET"
+
+#: /home/steve/svn/znurt/inc.header1.php:222
+msgid "Planet"
+msgstr "Planète"
+
+#: /home/steve/svn/znurt/inc.header1.php:223
+#: /home/steve/svn/znurt/nav.primary.php:4
+msgid "Recent Changes"
+msgstr "Modifications Récentes"
+
+#: /home/steve/svn/znurt/inc.header1.php:224
+msgid "Source"
+msgstr "Source"
+
+#: /home/steve/svn/znurt/inc.header1.php:225
+#: /home/steve/svn/znurt/nav.primary.php:8
+msgid "Use Flags"
+msgstr "Paramètres Use"
+
+#: /home/steve/svn/znurt/inc.header1.php:226
+msgid "Wiki"
+msgstr "Wiki"
+
+# XXX: Pourquoi pas 'MODIFICATIONS' cf es.znurt.org
+#: /home/steve/svn/znurt/inc.package.php:29
+msgid "CHANGELOG"
+msgstr "JOURNAL DES MODIFICATIONS"
+
+#: /home/steve/svn/znurt/inc.package.php:81
+msgid "No bugs found"
+msgstr "Aucuns bug trouvé"
+
+#: /home/steve/svn/znurt/inc.package.php:95
+msgid "USE FLAGS"
+msgstr "PARAMÈTRES USE"
+
+#: /home/steve/svn/znurt/inc.package.php:126
+msgid "No Use Flags"
+msgstr "Aucune option use"
+
+#: /home/steve/svn/znurt/inc.package.php:153
+msgid "BUILD DEPENDENCIES"
+msgstr "DÉPENDANCES À LA CONSTRUCTION"
+
+#: /home/steve/svn/znurt/inc.package.php:155
+msgid "RUNTIME DEPENDENCIES"
+msgstr "DÉPENDANCES À L'EXÉCUTION"
+
+#: /home/steve/svn/znurt/inc.package.php:186
+msgid "REVERSE DEPENDENCIES"
+msgstr "DÉPENDANCES INVERSES"
+
+#: /home/steve/svn/znurt/inc.package.php:218
+msgid "SOURCE CODE"
+msgstr "CODE SOURCE"
+
+#: /home/steve/svn/znurt/inc.package.php:230
+msgid "LICENSE"
+msgstr "LICENCE"
+
+#: /home/steve/svn/znurt/inc.package.php:236
+msgid "DOWNLOADS"
+msgstr "TÉLÉCHARGEMENTS"
+
+#: /home/steve/svn/znurt/license.php:5
+msgid "LICENSE:"
+msgstr "LICENCE :"
+
+#: /home/steve/svn/znurt/licenses.php:13
+msgid "SOFTWARE LICENSES"
+msgstr "LICENCES LOGICIEL"
+
+#: /home/steve/svn/znurt/nav.legend.php:3
+msgid "LEGEND"
+msgstr "LÉGENDE"
+
+#: /home/steve/svn/znurt/nav.legend.php:5
+msgid "stable"
+msgstr "stable"
+
+#XXX:not dure of this one, but I think we sould not traslate this
+#: /home/steve/svn/znurt/nav.legend.php:6
+msgid "testing"
+msgstr "testing"
+
+# XXX: not sure of "keyword" translation
+# in de.znurt.org it's not translated
+# in es.znurt.org it's translated "marcadas"
+#: /home/steve/svn/znurt/nav.legend.php:7
+msgid "not keyworded"
+msgstr "aucun mot clé"
+
+#: /home/steve/svn/znurt/nav.legend.php:8
+msgid "not available"
+msgstr "non disponible"
+
+#XXX: a better translation, someone?
+#: /home/steve/svn/znurt/nav.legend.php:9
+msgid "hard masked"
+msgstr "masqué"
+
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "About"
+msgstr "À propos"
+
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "Requests"
+msgstr "Demandes"
+
+#: /home/steve/svn/znurt/nav.primary.php:5
+#: /home/steve/svn/znurt/new_packages.php:5
+msgid "New Packages"
+msgstr "Nouveaux paquets"
+
+#: /home/steve/svn/znurt/nav.primary.php:6
+msgid "New Ebuilds"
+msgstr "Nouveaux Ebuilds"
+
+#: /home/steve/svn/znurt/nav.primary.php:7
+msgid "Categories"
+msgstr "Catégories"
+
+#: /home/steve/svn/znurt/nav.primary.php:9
+msgid "Architectures"
+msgstr "Architectures"
+
+#: /home/steve/svn/znurt/nav.recent_changes.php:2
+msgid "RECENT CHANGES"
+msgstr "MODIFICATIONS RÉCENTES"
+
+#: /home/steve/svn/znurt/nav.recent_changes.php:18
+msgid "View More"
+msgstr "Voir plus"
+
+#: /home/steve/svn/znurt/nav.search.php:2
+msgid "SEARCH"
+msgstr "RECHERCHE"
+
+#: /home/steve/svn/znurt/nav.search.php:6
+msgid "Search"
+msgstr "Recherche"
+
+#: /home/steve/svn/znurt/nav.social_media.php:5
+msgid "Follow us on Twitter"
+msgstr "Suivez-nous sur Twitter"
+
+# XXX: plate-forme? yes according to
+# http://www.termium.com/tpv2alpha/alpha-fra.html?lang=fra
+#: /home/steve/svn/znurt/new.php:15
+msgid "SORT BY PLATFORM"
+msgstr "TRIER PAR PLATE-FORME"
+
+#: /home/steve/svn/znurt/new.php:18
+msgid "all platforms"
+msgstr "Toutes les plate-formes"
+
+#: /home/steve/svn/znurt/new.php:70
+msgid "Next Page"
+msgstr "Page suivante"
+
+#: /home/steve/svn/znurt/new.php:74
+msgid "Previous Page"
+msgstr "Page précédente"
+
+#: /home/steve/svn/znurt/search.php:30
+msgid "ADVANCED SEARCH"
+msgstr "RECHERCHE AVANCÉE"
+
+#: /home/steve/svn/znurt/search.php:79 /home/steve/svn/znurt/search.php:109
+#, php-format
+msgid "SEARCH RESULTS FOR %1$s &nbsp; (%2$u)"
+msgstr "RÉSULTATS DE LA RECHERCHE POUR %1$s &nbsp; (%2$u)"
+
+#: /home/steve/svn/znurt/search.php:95
+#, php-format
+msgid "TOP (%1$u) SEARCH RESULTS FOR %2$s &nbsp; (%3$u)"
+msgstr " (%1$u) PREMIERS RÉSULTATS DE LA RECHERCHE POUR %2$s &nbsp; (%3$u)"
+
+#: /home/steve/svn/znurt/search.php:112
+msgid "Hmm, that query didn't work."
+msgstr "Hmm, cette requête n'a pas marchée." \ No newline at end of file
diff --git a/locale/it_IT/LC_MESSAGES/messages.mo b/locale/it_IT/LC_MESSAGES/messages.mo
new file mode 100644
index 0000000..904c0c1
--- /dev/null
+++ b/locale/it_IT/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/locale/it_IT/LC_MESSAGES/messages.po b/locale/it_IT/LC_MESSAGES/messages.po
new file mode 100644
index 0000000..a58ec18
--- /dev/null
+++ b/locale/it_IT/LC_MESSAGES/messages.po
@@ -0,0 +1,438 @@
+# znurt.org's Italian translation.
+
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: 1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-01-11 13:11-0700\n"
+"PO-Revision-Date: 2010-02-03 16:06+0100\n"
+"Last-Translator: Luca Zorzo\n"
+"Language-Team: Italian - Italiano\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: /home/steve/svn/znurt/about.php:5
+msgid "ABOUT"
+msgstr "INFORMAZIONI SU DI NOI"
+
+#: /home/steve/svn/znurt/about.php:12 /home/steve/svn/znurt/gettext.php:29
+msgid "You must be really bored if you're looking at this page."
+msgstr "Se stai leggendo questa pagina devi essere veramente annoiato."
+
+#: /home/steve/svn/znurt/about.php:15
+msgid ""
+"\"the fresh ebuilds\" is a site to track information about packages, ebuilds "
+"and their relative metadata supplied by <a href='http://www.gentoo."
+"org/'>Gentoo Linux</a>."
+msgstr ""
+"\"I nuovi ebuild\" è un sito internet che ha come scopo quello di raccogliere"
+"tutte le informazioni fornite da <a href='http://www.gentoo.org/'>Gentoo Linux</a>"
+"per quanto riguarda i pacchetti, gli ebuild e i metadata di Gentoo Linux."
+
+#: /home/steve/svn/znurt/about.php:16
+msgid "This site is not an official Gentoo website."
+msgstr "Questo non è un sito internet ufficiale di Gentoo Linux."
+
+#: /home/steve/svn/znurt/about.php:17
+msgid "Original Gentoo artwork and logos copyright &copy; Gentoo Foundation."
+msgstr "La grafica e i loghi di Gentoo sono copyright &copy; della Gentoo Foundation."
+
+#: /home/steve/svn/znurt/about.php:18
+#, php-format
+msgid "\"the fresh ebuilds\" original design and artwork by %s."
+msgstr "Il disegno e la realizzazione grafica di \"I nuovi ebuild\" sono di %s."
+
+#: /home/steve/svn/znurt/about.php:19
+#, php-format
+msgid "Icon set copyright &copy; %s."
+msgstr "Il set di icone è copyright &copy; di %s."
+
+#: /home/steve/svn/znurt/about.php:20
+#, php-format
+msgid "Original code and site maintenance by %s."
+msgstr "Sito internet scritto e mantenuto da %s."
+
+#: /home/steve/svn/znurt/about.php:21
+#, php-format
+msgid "Powered by %s and lots of chocolate-chip cookies."
+msgstr "Creato da %s, grazie all'aiuto di parecchi biscotti con goccie di cioccolato."
+
+#: /home/steve/svn/znurt/architectures.php:7
+msgid "ARCHITECTURES"
+msgstr "ARCHITETTURE"
+
+#: /home/steve/svn/znurt/architectures.php:16
+msgid "Pick the architectures to display:"
+msgstr "Seleziona l'architettura da visualizzare:"
+
+#: /home/steve/svn/znurt/architectures.php:32
+msgid "Submit"
+msgstr "Invia"
+
+#: /home/steve/svn/znurt/architectures.php:34
+msgid "Reset Architectures"
+msgstr "Resetta le Architetture"
+
+#: /home/steve/svn/znurt/architectures.php:72
+msgid "Select All"
+msgstr "Seleziona Tutto"
+
+#: /home/steve/svn/znurt/architectures.php:74
+msgid "Select None"
+msgstr "Deseleziona Tutto"
+
+#: /home/steve/svn/znurt/architectures.php:76
+msgid "Reset"
+msgstr "Resetta"
+
+#: /home/steve/svn/znurt/base.php:42 /home/steve/svn/znurt/base.php:65
+#: /home/steve/svn/znurt/base.php:100 /home/steve/svn/znurt/inc.header1.php:10
+msgid "the fresh ebuilds"
+msgstr "i nuovi ebuild"
+
+#: /home/steve/svn/znurt/base.php:42
+msgid "about"
+msgstr "informazioni"
+
+#: /home/steve/svn/znurt/base.php:48
+msgid "architectures"
+msgstr "architetture"
+
+#: /home/steve/svn/znurt/base.php:60
+msgid "categories"
+msgstr "categorie"
+
+#: /home/steve/svn/znurt/base.php:65
+msgid "bugs"
+msgstr "bugs"
+
+#: /home/steve/svn/znurt/base.php:77
+msgid "xml feeds"
+msgstr "feed xml"
+
+#: /home/steve/svn/znurt/base.php:83 /home/steve/svn/znurt/base.php:147
+msgid "licenses"
+msgstr "licenze"
+
+#: /home/steve/svn/znurt/base.php:95 /home/steve/svn/znurt/base.php:161
+#: /home/steve/svn/znurt/feeds.php:47
+msgid "new packages"
+msgstr "nuovi pacchetti"
+
+#: /home/steve/svn/znurt/base.php:100
+msgid "feature requests"
+msgstr "richiedi nuove funzioni"
+
+#: /home/steve/svn/znurt/base.php:110
+msgid "advanced search"
+msgstr "ricerca avanzata"
+
+#: /home/steve/svn/znurt/base.php:116 /home/steve/svn/znurt/base.php:176
+#: /home/steve/svn/znurt/base.php:179 /home/steve/svn/znurt/useflags.php:12
+msgid "use flags"
+msgstr "use flags"
+
+#: /home/steve/svn/znurt/base.php:142 /home/steve/svn/znurt/base.php:225
+msgid "architecture"
+msgstr "architettura"
+
+#: /home/steve/svn/znurt/base.php:154
+msgid "new ebuilds"
+msgstr "nuovi ebuild"
+
+#: /home/steve/svn/znurt/base.php:167
+msgid "search"
+msgstr "cerca"
+
+#: /home/steve/svn/znurt/bugs.php:2 /home/steve/svn/znurt/inc.package.php:51
+msgid "BUGS"
+msgstr "BUGS"
+
+#: /home/steve/svn/znurt/categories.php:12
+msgid "CATEGORIES"
+msgstr "CATEGORIE"
+
+#: /home/steve/svn/znurt/feeds.php:7
+#: /home/steve/svn/znurt/nav.social_media.php:4
+msgid "Subscription Feeds"
+msgstr "Iscriviti ai nostri Feed"
+
+#: /home/steve/svn/znurt/feeds.php:11
+msgid "fresh ebuilds"
+msgstr "ebuild recenti"
+
+#: /home/steve/svn/znurt/feeds.php:26 /home/steve/svn/znurt/feeds.php:56
+msgid "All Architectures"
+msgstr "Tutte le Architetture"
+
+#: /home/steve/svn/znurt/inc.header1.php:98
+msgid "January"
+msgstr "Gennaio"
+
+#: /home/steve/svn/znurt/inc.header1.php:99
+msgid "February"
+msgstr "Febbraio"
+
+#: /home/steve/svn/znurt/inc.header1.php:100
+msgid "March"
+msgstr "Marzo"
+
+#: /home/steve/svn/znurt/inc.header1.php:101
+msgid "April"
+msgstr "Aprile"
+
+#: /home/steve/svn/znurt/inc.header1.php:102
+msgid "May"
+msgstr "Maggio"
+
+#: /home/steve/svn/znurt/inc.header1.php:103
+msgid "June"
+msgstr "Giugno"
+
+#: /home/steve/svn/znurt/inc.header1.php:104
+msgid "July"
+msgstr "Luglio"
+
+#: /home/steve/svn/znurt/inc.header1.php:105
+msgid "August"
+msgstr "Agosto"
+
+#: /home/steve/svn/znurt/inc.header1.php:106
+msgid "September"
+msgstr "Settembre"
+
+#: /home/steve/svn/znurt/inc.header1.php:107
+msgid "October"
+msgstr "Ottobre"
+
+#: /home/steve/svn/znurt/inc.header1.php:108
+msgid "November"
+msgstr "Novembre"
+
+#: /home/steve/svn/znurt/inc.header1.php:109
+msgid "December"
+msgstr "Dicembre"
+
+#: /home/steve/svn/znurt/inc.header1.php:211
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "Bugs"
+msgstr "Bugs"
+
+#: /home/steve/svn/znurt/inc.header1.php:212
+msgid "Category"
+msgstr "Categoria"
+
+#: /home/steve/svn/znurt/inc.header1.php:213
+msgid "ChangeLog"
+msgstr "ChangeLog"
+
+#: /home/steve/svn/znurt/inc.header1.php:214
+msgid "CVS"
+msgstr "CVS"
+
+#: /home/steve/svn/znurt/inc.header1.php:215
+msgid "Dependencies"
+msgstr "Dipendenze"
+
+#: /home/steve/svn/znurt/inc.header1.php:216
+msgid "Forums"
+msgstr "Forum"
+
+#: /home/steve/svn/znurt/inc.header1.php:217
+msgid "Homepage"
+msgstr "Homepage"
+
+#: /home/steve/svn/znurt/inc.header1.php:218
+msgid "License"
+msgstr "Licenza"
+
+#: /home/steve/svn/znurt/inc.header1.php:219
+msgid "Mailing Lists"
+msgstr "Mailing List"
+
+#: /home/steve/svn/znurt/inc.header1.php:220
+msgid "Metadata"
+msgstr "Metadata"
+
+#: /home/steve/svn/znurt/inc.header1.php:221
+msgid "PACKAGE DESCRIPTION"
+msgstr "DESCRIZIONE DEL PACCHETTO"
+
+#: /home/steve/svn/znurt/inc.header1.php:222
+msgid "Planet"
+msgstr "Pianeta"
+
+#: /home/steve/svn/znurt/inc.header1.php:223
+#: /home/steve/svn/znurt/nav.primary.php:4
+msgid "Recent Changes"
+msgstr "Modifiche Recenti"
+
+#: /home/steve/svn/znurt/inc.header1.php:224
+msgid "Source"
+msgstr "Sorgente"
+
+#: /home/steve/svn/znurt/inc.header1.php:225
+#: /home/steve/svn/znurt/nav.primary.php:8
+msgid "Use Flags"
+msgstr "Use Flags"
+
+#: /home/steve/svn/znurt/inc.header1.php:226
+msgid "Wiki"
+msgstr "Wiki"
+
+#: /home/steve/svn/znurt/inc.package.php:29
+msgid "CHANGELOG"
+msgstr "CHANGELOG"
+
+#: /home/steve/svn/znurt/inc.package.php:81
+msgid "No bugs found"
+msgstr "Nessun bug trovato"
+
+#: /home/steve/svn/znurt/inc.package.php:95
+msgid "USE FLAGS"
+msgstr "USE FLAGS"
+
+#: /home/steve/svn/znurt/inc.package.php:126
+msgid "No Use Flags"
+msgstr "Nessuna Use Flag"
+
+#: /home/steve/svn/znurt/inc.package.php:153
+msgid "BUILD DEPENDENCIES"
+msgstr "DIPENDENZE PER LA COMPILAZIONE"
+
+#: /home/steve/svn/znurt/inc.package.php:155
+msgid "RUNTIME DEPENDENCIES"
+msgstr "DIPENDENZE PER L'ESECUZIONE"
+
+#: /home/steve/svn/znurt/inc.package.php:186
+msgid "REVERSE DEPENDENCIES"
+msgstr "DIPENDENZE INVERSE"
+
+#: /home/steve/svn/znurt/inc.package.php:218
+msgid "SOURCE CODE"
+msgstr "CODICE SORGENTE"
+
+#: /home/steve/svn/znurt/inc.package.php:230
+msgid "LICENSE"
+msgstr "LICENZA"
+
+#: /home/steve/svn/znurt/inc.package.php:236
+msgid "DOWNLOADS"
+msgstr "DOWNLOADS"
+
+#: /home/steve/svn/znurt/license.php:5
+msgid "LICENSE:"
+msgstr "LICENZA:"
+
+#: /home/steve/svn/znurt/licenses.php:13
+msgid "SOFTWARE LICENSES"
+msgstr "LICENZE SOFTWARE"
+
+#: /home/steve/svn/znurt/nav.legend.php:3
+msgid "LEGEND"
+msgstr "LEGENDA"
+
+#: /home/steve/svn/znurt/nav.legend.php:5
+msgid "stable"
+msgstr "stabile"
+
+#: /home/steve/svn/znurt/nav.legend.php:6
+msgid "testing"
+msgstr "testing"
+
+#: /home/steve/svn/znurt/nav.legend.php:7
+msgid "not keyworded"
+msgstr "non keyworded"
+
+#: /home/steve/svn/znurt/nav.legend.php:8
+msgid "not available"
+msgstr "non disponibile"
+
+#: /home/steve/svn/znurt/nav.legend.php:9
+msgid "hard masked"
+msgstr "hard masked"
+
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "About"
+msgstr "Informazioni"
+
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "Requests"
+msgstr "Richieste"
+
+#: /home/steve/svn/znurt/nav.primary.php:5
+#: /home/steve/svn/znurt/new_packages.php:5
+msgid "New Packages"
+msgstr "Nuovi Pacchetti"
+
+#: /home/steve/svn/znurt/nav.primary.php:6
+msgid "New Ebuilds"
+msgstr "Nuovi Ebuild"
+
+#: /home/steve/svn/znurt/nav.primary.php:7
+msgid "Categories"
+msgstr "Categorie"
+
+#: /home/steve/svn/znurt/nav.primary.php:9
+msgid "Architectures"
+msgstr "Architetture"
+
+#: /home/steve/svn/znurt/nav.recent_changes.php:2
+msgid "RECENT CHANGES"
+msgstr "CAMBIAMENTI RECENTI"
+
+#: /home/steve/svn/znurt/nav.recent_changes.php:18
+msgid "View More"
+msgstr "Vedi i Segenti"
+
+#: /home/steve/svn/znurt/nav.search.php:2
+msgid "SEARCH"
+msgstr "CERCA"
+
+#: /home/steve/svn/znurt/nav.search.php:6
+msgid "Search"
+msgstr "Cerca"
+
+#: /home/steve/svn/znurt/nav.social_media.php:5
+msgid "Follow us on Twitter"
+msgstr "Seguici su Twitter"
+
+#: /home/steve/svn/znurt/new.php:15
+msgid "SORT BY PLATFORM"
+msgstr "ORDINA PER PIATTAFORMA"
+
+#: /home/steve/svn/znurt/new.php:18
+msgid "all platforms"
+msgstr "tutte le piattaforme"
+
+#: /home/steve/svn/znurt/new.php:70
+msgid "Next Page"
+msgstr "Pagina Seguente"
+
+#: /home/steve/svn/znurt/new.php:74
+msgid "Previous Page"
+msgstr "Pagina Precedente"
+
+#: /home/steve/svn/znurt/search.php:30
+msgid "ADVANCED SEARCH"
+msgstr "RICERCA AVANZATA"
+
+#: /home/steve/svn/znurt/search.php:79 /home/steve/svn/znurt/search.php:109
+#, php-format
+msgid "SEARCH RESULTS FOR %1$s &nbsp; (%2$u)"
+msgstr "RISULTATI PER LA RICERCA DI %1$s &nbsp; (%2$u)"
+
+#: /home/steve/svn/znurt/search.php:95
+#, php-format
+msgid "TOP (%1$u) SEARCH RESULTS FOR %2$s &nbsp; (%3$u)"
+msgstr "I PRIMI (%1$u) RISULTATI PER LA RICERCA DI %2$s &nbsp; (%3$u)"
+
+#: /home/steve/svn/znurt/search.php:112
+msgid "Hmm, that query didn't work."
+msgstr "Hmm, la ricerca non ha funzionato."
diff --git a/locale/tr_TR/LC_MESSAGES/messages.mo b/locale/tr_TR/LC_MESSAGES/messages.mo
new file mode 100644
index 0000000..22ffdab
--- /dev/null
+++ b/locale/tr_TR/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/locale/tr_TR/LC_MESSAGES/messages.po b/locale/tr_TR/LC_MESSAGES/messages.po
new file mode 100644
index 0000000..99c0951
--- /dev/null
+++ b/locale/tr_TR/LC_MESSAGES/messages.po
@@ -0,0 +1,437 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: znurt\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-01-11 13:11-0700\n"
+"PO-Revision-Date: 2010-01-12 20:20+0200\n"
+"Last-Translator: Gürkan Gür <seqizz@gmail.com>\n"
+"Language-Team: tr <seqizz@gmail.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: /home/steve/svn/znurt/about.php:5
+msgid "ABOUT"
+msgstr "HAKKINDA"
+
+#: /home/steve/svn/znurt/about.php:12
+#: /home/steve/svn/znurt/gettext.php:29
+msgid "You must be really bored if you're looking at this page."
+msgstr "Bu sayfayı okuduğunuza göre bayağı sıkılmış olmalısınız."
+
+#: /home/steve/svn/znurt/about.php:15
+msgid "\"the fresh ebuilds\" is a site to track information about packages, ebuilds and their relative metadata supplied by <a href='http://www.gentoo.org/'>Gentoo Linux</a>."
+msgstr "\"yeni ebuild'ler\", <a href='http://www.gentoo.org/'>Gentoo Linux</a> tarafından sunulan paketler, ebuild'ler ve ilgili bilgilerin takip edilebileceği bir sitedir."
+
+#: /home/steve/svn/znurt/about.php:16
+msgid "This site is not an official Gentoo website."
+msgstr "Bu site resmi bir Gentoo sitesi değildir."
+
+#: /home/steve/svn/znurt/about.php:17
+msgid "Original Gentoo artwork and logos copyright &copy; Gentoo Foundation."
+msgstr "Orijinal Gentoo logoları telif hakkı &copy; Gentoo Vakfı."
+
+#: /home/steve/svn/znurt/about.php:18
+#, php-format
+msgid "\"the fresh ebuilds\" original design and artwork by %s."
+msgstr "\"yeni ebuild'ler\" orijinal dizayn ve sanat: %s."
+
+#: /home/steve/svn/znurt/about.php:19
+#, php-format
+msgid "Icon set copyright &copy; %s."
+msgstr "Simge seti telif hakkı &copy; %s."
+
+#: /home/steve/svn/znurt/about.php:20
+#, php-format
+msgid "Original code and site maintenance by %s."
+msgstr "Orijinal kod ve site bakımı: %s."
+
+#: /home/steve/svn/znurt/about.php:21
+#, php-format
+msgid "Powered by %s and lots of chocolate-chip cookies."
+msgstr "%s ve birçok çikolata-çerez yardımı ile oluşturulmuştur."
+
+#: /home/steve/svn/znurt/architectures.php:7
+msgid "ARCHITECTURES"
+msgstr "MİMARİLER"
+
+#: /home/steve/svn/znurt/architectures.php:16
+msgid "Pick the architectures to display:"
+msgstr "Gösterilecek mimarileri seçin:"
+
+#: /home/steve/svn/znurt/architectures.php:32
+msgid "Submit"
+msgstr "Gönder"
+
+#: /home/steve/svn/znurt/architectures.php:34
+msgid "Reset Architectures"
+msgstr "Mimarileri Sıfırla"
+
+#: /home/steve/svn/znurt/architectures.php:72
+msgid "Select All"
+msgstr "Tümünü Seç"
+
+#: /home/steve/svn/znurt/architectures.php:74
+msgid "Select None"
+msgstr "Hiçbirini Seçme"
+
+#: /home/steve/svn/znurt/architectures.php:76
+msgid "Reset"
+msgstr "Sıfırla"
+
+#: /home/steve/svn/znurt/base.php:42
+#: /home/steve/svn/znurt/base.php:65
+#: /home/steve/svn/znurt/base.php:100
+#: /home/steve/svn/znurt/inc.header1.php:10
+msgid "the fresh ebuilds"
+msgstr "yeni ebuild'ler"
+
+#: /home/steve/svn/znurt/base.php:42
+msgid "about"
+msgstr "hakkında"
+
+#: /home/steve/svn/znurt/base.php:48
+msgid "architectures"
+msgstr "mimariler"
+
+#: /home/steve/svn/znurt/base.php:60
+msgid "categories"
+msgstr "kategoriler"
+
+#: /home/steve/svn/znurt/base.php:65
+msgid "bugs"
+msgstr "hata kayıtları"
+
+#: /home/steve/svn/znurt/base.php:77
+msgid "xml feeds"
+msgstr "xml beslemeleri"
+
+#: /home/steve/svn/znurt/base.php:83
+#: /home/steve/svn/znurt/base.php:147
+msgid "licenses"
+msgstr "lisanslar"
+
+#: /home/steve/svn/znurt/base.php:95
+#: /home/steve/svn/znurt/base.php:161
+#: /home/steve/svn/znurt/feeds.php:47
+msgid "new packages"
+msgstr "yeni paketler"
+
+#: /home/steve/svn/znurt/base.php:100
+msgid "feature requests"
+msgstr "özellik istekleri"
+
+#: /home/steve/svn/znurt/base.php:110
+msgid "advanced search"
+msgstr "gelişmiş arama"
+
+#: /home/steve/svn/znurt/base.php:116
+#: /home/steve/svn/znurt/base.php:176
+#: /home/steve/svn/znurt/base.php:179
+#: /home/steve/svn/znurt/useflags.php:12
+msgid "use flags"
+msgstr "use bayrakları"
+
+#: /home/steve/svn/znurt/base.php:142
+#: /home/steve/svn/znurt/base.php:225
+msgid "architecture"
+msgstr "mimari"
+
+#: /home/steve/svn/znurt/base.php:154
+msgid "new ebuilds"
+msgstr "yeni ebuild'ler"
+
+#: /home/steve/svn/znurt/base.php:167
+msgid "search"
+msgstr "arama"
+
+#: /home/steve/svn/znurt/bugs.php:2
+#: /home/steve/svn/znurt/inc.package.php:51
+msgid "BUGS"
+msgstr "HATALAR"
+
+#: /home/steve/svn/znurt/categories.php:12
+msgid "CATEGORIES"
+msgstr "KATEGORİLER"
+
+#: /home/steve/svn/znurt/feeds.php:7
+#: /home/steve/svn/znurt/nav.social_media.php:4
+msgid "Subscription Feeds"
+msgstr "Besleme Abonelikleri"
+
+#: /home/steve/svn/znurt/feeds.php:11
+msgid "fresh ebuilds"
+msgstr "yeni ebuild'ler"
+
+#: /home/steve/svn/znurt/feeds.php:26
+#: /home/steve/svn/znurt/feeds.php:56
+msgid "All Architectures"
+msgstr "Tüm Mimariler"
+
+#: /home/steve/svn/znurt/inc.header1.php:98
+msgid "January"
+msgstr "Ocak"
+
+#: /home/steve/svn/znurt/inc.header1.php:99
+msgid "February"
+msgstr "Şubat"
+
+#: /home/steve/svn/znurt/inc.header1.php:100
+msgid "March"
+msgstr "Mart"
+
+#: /home/steve/svn/znurt/inc.header1.php:101
+msgid "April"
+msgstr "Nisan"
+
+#: /home/steve/svn/znurt/inc.header1.php:102
+msgid "May"
+msgstr "Mayıs"
+
+#: /home/steve/svn/znurt/inc.header1.php:103
+msgid "June"
+msgstr "Haziran"
+
+#: /home/steve/svn/znurt/inc.header1.php:104
+msgid "July"
+msgstr "Temmuz"
+
+#: /home/steve/svn/znurt/inc.header1.php:105
+msgid "August"
+msgstr "Ağustos"
+
+#: /home/steve/svn/znurt/inc.header1.php:106
+msgid "September"
+msgstr "Eylül"
+
+#: /home/steve/svn/znurt/inc.header1.php:107
+msgid "October"
+msgstr "Ekim"
+
+#: /home/steve/svn/znurt/inc.header1.php:108
+msgid "November"
+msgstr "Kasım"
+
+#: /home/steve/svn/znurt/inc.header1.php:109
+msgid "December"
+msgstr "Aralık"
+
+#: /home/steve/svn/znurt/inc.header1.php:211
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "Bugs"
+msgstr "Hatalar"
+
+#: /home/steve/svn/znurt/inc.header1.php:212
+msgid "Category"
+msgstr "Kategori"
+
+#: /home/steve/svn/znurt/inc.header1.php:213
+msgid "ChangeLog"
+msgstr "Değişim Kaydı"
+
+#: /home/steve/svn/znurt/inc.header1.php:214
+msgid "CVS"
+msgstr "CVS"
+
+#: /home/steve/svn/znurt/inc.header1.php:215
+msgid "Dependencies"
+msgstr "Bağımlılıklar"
+
+#: /home/steve/svn/znurt/inc.header1.php:216
+msgid "Forums"
+msgstr "Forumlar"
+
+#: /home/steve/svn/znurt/inc.header1.php:217
+msgid "Homepage"
+msgstr "Anasayfa"
+
+#: /home/steve/svn/znurt/inc.header1.php:218
+msgid "License"
+msgstr "Lisans"
+
+#: /home/steve/svn/znurt/inc.header1.php:219
+msgid "Mailing Lists"
+msgstr "Mail Listeleri"
+
+#: /home/steve/svn/znurt/inc.header1.php:220
+msgid "Metadata"
+msgstr "Metabilgi"
+
+#: /home/steve/svn/znurt/inc.header1.php:221
+msgid "PACKAGE DESCRIPTION"
+msgstr "PAKET TANIMI"
+
+#: /home/steve/svn/znurt/inc.header1.php:222
+msgid "Planet"
+msgstr "Gezegen"
+
+#: /home/steve/svn/znurt/inc.header1.php:223
+#: /home/steve/svn/znurt/nav.primary.php:4
+msgid "Recent Changes"
+msgstr "Son Değişiklikler"
+
+#: /home/steve/svn/znurt/inc.header1.php:224
+msgid "Source"
+msgstr "Kaynak"
+
+#: /home/steve/svn/znurt/inc.header1.php:225
+#: /home/steve/svn/znurt/nav.primary.php:8
+msgid "Use Flags"
+msgstr "Use Bayrakları"
+
+#: /home/steve/svn/znurt/inc.header1.php:226
+msgid "Wiki"
+msgstr "Wiki"
+
+#: /home/steve/svn/znurt/inc.package.php:29
+msgid "CHANGELOG"
+msgstr "DEĞIŞIKLIKLER"
+
+#: /home/steve/svn/znurt/inc.package.php:81
+msgid "No bugs found"
+msgstr "Hata kaydı yok"
+
+#: /home/steve/svn/znurt/inc.package.php:95
+msgid "USE FLAGS"
+msgstr "USE BAYRAKLARI"
+
+#: /home/steve/svn/znurt/inc.package.php:126
+msgid "No Use Flags"
+msgstr "Use Bayrağı Yok"
+
+#: /home/steve/svn/znurt/inc.package.php:153
+msgid "BUILD DEPENDENCIES"
+msgstr "DERLEME BAĞIMLILIKLARI"
+
+#: /home/steve/svn/znurt/inc.package.php:155
+msgid "RUNTIME DEPENDENCIES"
+msgstr "ÇALIŞTIRMA BAĞIMLILIKLARI"
+
+#: /home/steve/svn/znurt/inc.package.php:186
+msgid "REVERSE DEPENDENCIES"
+msgstr "TERS BAĞIMLILIKLAR"
+
+#: /home/steve/svn/znurt/inc.package.php:218
+msgid "SOURCE CODE"
+msgstr "KAYNAK KODU"
+
+#: /home/steve/svn/znurt/inc.package.php:230
+msgid "LICENSE"
+msgstr "LİSANS"
+
+#: /home/steve/svn/znurt/inc.package.php:236
+msgid "DOWNLOADS"
+msgstr "İNDİRMELER"
+
+#: /home/steve/svn/znurt/license.php:5
+msgid "LICENSE:"
+msgstr "LİSANS:"
+
+#: /home/steve/svn/znurt/licenses.php:13
+msgid "SOFTWARE LICENSES"
+msgstr "YAZILIM LİSANSLARI"
+
+#: /home/steve/svn/znurt/nav.legend.php:3
+msgid "LEGEND"
+msgstr ""
+
+#: /home/steve/svn/znurt/nav.legend.php:5
+msgid "stable"
+msgstr "kararlı"
+
+#: /home/steve/svn/znurt/nav.legend.php:6
+msgid "testing"
+msgstr "test"
+
+#: /home/steve/svn/znurt/nav.legend.php:7
+msgid "not keyworded"
+msgstr "keyword'lenmemiş"
+
+#: /home/steve/svn/znurt/nav.legend.php:8
+msgid "not available"
+msgstr "uygun değil"
+
+#: /home/steve/svn/znurt/nav.legend.php:9
+msgid "hard masked"
+msgstr "maskelenmiş"
+
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "About"
+msgstr "Hakkında"
+
+#: /home/steve/svn/znurt/nav.meta.php:3
+msgid "Requests"
+msgstr "İstekler"
+
+#: /home/steve/svn/znurt/nav.primary.php:5
+#: /home/steve/svn/znurt/new_packages.php:5
+msgid "New Packages"
+msgstr "Yeni Paketler"
+
+#: /home/steve/svn/znurt/nav.primary.php:6
+msgid "New Ebuilds"
+msgstr "Yeni Ebuild'ler"
+
+#: /home/steve/svn/znurt/nav.primary.php:7
+msgid "Categories"
+msgstr "Kategoriler"
+
+#: /home/steve/svn/znurt/nav.primary.php:9
+msgid "Architectures"
+msgstr "Mimariler"
+
+#: /home/steve/svn/znurt/nav.recent_changes.php:2
+msgid "RECENT CHANGES"
+msgstr "SON DEĞİŞİKLİKLER"
+
+#: /home/steve/svn/znurt/nav.recent_changes.php:18
+msgid "View More"
+msgstr "Daha Fazla"
+
+#: /home/steve/svn/znurt/nav.search.php:2
+msgid "SEARCH"
+msgstr "ARA"
+
+#: /home/steve/svn/znurt/nav.search.php:6
+msgid "Search"
+msgstr "Ara"
+
+#: /home/steve/svn/znurt/nav.social_media.php:5
+msgid "Follow us on Twitter"
+msgstr "Bizi Twitter'dan İzleyin"
+
+#: /home/steve/svn/znurt/new.php:15
+msgid "SORT BY PLATFORM"
+msgstr "MİMARİYE GÖRE LİSTELE"
+
+#: /home/steve/svn/znurt/new.php:18
+msgid "all platforms"
+msgstr "tüm mimariler"
+
+#: /home/steve/svn/znurt/new.php:70
+msgid "Next Page"
+msgstr "Sonraki Sayfa"
+
+#: /home/steve/svn/znurt/new.php:74
+msgid "Previous Page"
+msgstr "Önceki Sayfa"
+
+#: /home/steve/svn/znurt/search.php:30
+msgid "ADVANCED SEARCH"
+msgstr "GELİŞMİŞ ARAMA"
+
+#: /home/steve/svn/znurt/search.php:79
+#: /home/steve/svn/znurt/search.php:109
+#, php-format
+msgid "SEARCH RESULTS FOR %1$s &nbsp; (%2$u)"
+msgstr "%1$s &nbsp; (%2$u) İÇİN ARAMA SONUÇLARI"
+
+#: /home/steve/svn/znurt/search.php:95
+#, php-format
+msgid "TOP (%1$u) SEARCH RESULTS FOR %2$s &nbsp; (%3$u)"
+msgstr ""
+
+#: /home/steve/svn/znurt/search.php:112
+msgid "Hmm, that query didn't work."
+msgstr "Hmm, bu işlem çalışmadı."
+
diff --git a/nav.legend.php b/nav.legend.php
new file mode 100644
index 0000000..93c1c1c
--- /dev/null
+++ b/nav.legend.php
@@ -0,0 +1,12 @@
+ <div id="legend">
+ <div class="legend_top"></div>
+ <h4><?=gettext('LEGEND');?></h4>
+ <ul>
+ <li class="stable"><span style="padding-right:17px;">+</span> <?=gettext('stable');?></li>
+ <li class="testing"><span style="padding-right:17px;">~</span> <?=gettext('testing');?></li>
+ <li class="not_keyword"><span style="padding-right:17px;">&ndash;</span> <?=gettext('not keyworded');?></li>
+ <li class="not_avail"><span style="padding-right:17px;">x</span> <?=gettext('not available');?></li>
+ <li class="m_stable"><span style="padding-right:17px;">m</span> <?=gettext('hard masked');?></li>
+ </ul>
+ <div class="legend_bottom"></div>
+ </div> \ No newline at end of file
diff --git a/nav.meta.php b/nav.meta.php
new file mode 100644
index 0000000..b06bd8b
--- /dev/null
+++ b/nav.meta.php
@@ -0,0 +1,26 @@
+ <div class="meta">
+
+ <span class="copyright">
+ <a href="<?=$base_uri.$url_about;?>"><?=gettext('About');?></a> &nbsp; | &nbsp; <a href="<?=$base_uri;?>bugs"><?=gettext('Bugs');?></a> &nbsp; | &nbsp; <a href="<?=$base_uri;?>requests"><?=gettext('Requests');?></a>
+ <br/><br/>
+
+ <?
+ if($lingua == "de") {
+ echo "Fragen, Kommentare, Korrekturen, Jobangebote?<br/>E-Mail an <a href='mailto:beandog@gentoo.org'>beandog@gentoo.org</a>\n";
+ } else {
+ echo "Questions, Comments, Corrections, Job Offers?<br/>Email <a href='mailto:beandog@gentoo.org'>beandog@gentoo.org</a>\n";
+ }
+ ?>
+
+
+
+ </span>
+
+ <p><a href="https://www.sevenl.net/"><img src="<?=$base_uri;?>img/sevenl.png" alt="Managed Dedicated Server Hosting By SevenL" width="125" height="35" style='border: 1px solid #999999; margin-top: 15px;' /></a></p>
+
+ </div>
+
+
+
+
+ \ No newline at end of file
diff --git a/nav.primary.php b/nav.primary.php
new file mode 100644
index 0000000..554485b
--- /dev/null
+++ b/nav.primary.php
@@ -0,0 +1,13 @@
+ <div id="primaryNav">
+ <hr />
+ <ul class="mainNav">
+ <li class="home"><a href="<?=$base_uri;?>"><?=gettext('Recent Changes');?></a></li>
+ <li class="new_packages"><a href="<?=$base_uri.$url_new_packages;?>"><?=gettext('New Packages');?></a></li>
+<!-- <li class="new_ebuilds"><a href="<?=$base_uri;?>new_ebuilds"><?=gettext('New Ebuilds');?></a></li> -->
+ <li class="categories"><a href="<?=$base_uri.$url_categories;?>"><?=gettext('Categories');?></a></li>
+ <li class="useflags"><a href="<?=$base_uri.$url_useflags;?>"><?=gettext('Use Flags');?></a></li>
+ <li class="arch"><a href="<?=$base_uri.$url_arch;?>"><?=gettext('Architectures');?></a></li>
+ <li class="linguas"><a href="<?=$base_uri.$url_linguas;?>"><?=gettext('Linguas');?></a></li>
+ </ul>
+ <hr />
+ </div> \ No newline at end of file
diff --git a/nav.recent_changes.php b/nav.recent_changes.php
new file mode 100644
index 0000000..c62303c
--- /dev/null
+++ b/nav.recent_changes.php
@@ -0,0 +1,35 @@
+ <div id="recentPackages">
+ <h4><?=gettext('RECENT CHANGES');?></h4>
+ <ul class="recent_packages" id='recent1'>
+ <?
+
+ for($x = 0; $x < $amount; $x++) {
+ $row = $arr_recent_packages[$x];
+
+ $url = $base_uri.$row['category_name'].'/'.$row['package_name'];
+ $name = $row['package_name'].' '.$row['pvr'];
+
+ echo "<li><a href='$url'>$name</a></li>\n";
+
+ }
+
+ ?>
+ </ul>
+ <a style="margin-left:20px;" href="<?=$base_uri;?>" onclick="$(this).hide(); $('recent1').hide(); $('recent2').show(); return false;"><?=gettext('View More');?> ...</a>
+ <ul class="recent_packages" id='recent2' style='display: none;'>
+ <?
+
+ for($x = 0; $x < count($arr_recent_packages); $x++) {
+ $row = $arr_recent_packages[$x];
+
+ $url = $base_uri.$row['category_name'].'/'.$row['package_name'];
+ $name = $row['package_name'].' '.$row['pvr'];
+
+ echo "<li><a href='$url'>$name</a></li>\n";
+
+ }
+
+ ?>
+ </ul>
+ <hr />
+ </div> \ No newline at end of file
diff --git a/nav.search.php b/nav.search.php
new file mode 100644
index 0000000..a23b8e3
--- /dev/null
+++ b/nav.search.php
@@ -0,0 +1,9 @@
+ <div id="search">
+ <h4><?=gettext('SEARCH');?></h4>
+ <form class="searchForm" action="<?=$base_uri;?>search.php" method="get" autocomplete='off'>
+ <input type="text" name="search" class='search' size="17" />
+ <input type="text" name="q" class='q' size="17" />
+ <input type="image" src="<?=$base_uri;?>img/search.png" value="<?=gettext('Search');?>" alt="<?=gettext('Search');?>" />
+<!-- <a class="copyright" href="">Advanced Search</a> -->
+ </form>
+ </div> \ No newline at end of file
diff --git a/nav.social_media.php b/nav.social_media.php
new file mode 100644
index 0000000..524be0a
--- /dev/null
+++ b/nav.social_media.php
@@ -0,0 +1,8 @@
+ <div id="social_media">
+ <hr/>
+ <ul>
+ <li class="feed"><a href="<?=$base_uri.$url_feeds;?>"><?=gettext('Subscription Feeds');?></a></li>
+ <li class="twitter"><a href="http://twitter.com/znurt/"><?=gettext('Follow us on Twitter');?></a></li>
+ </ul>
+ <hr />
+ </div> \ No newline at end of file
diff --git a/new.php b/new.php
new file mode 100644
index 0000000..83ff11c
--- /dev/null
+++ b/new.php
@@ -0,0 +1,79 @@
+<?
+
+ if(!$page)
+ $page = 1;
+
+ if($arch && !in_array($arch, $arr_arch))
+ $arch = null;
+
+ // Select arch
+ $class = "";
+ if(!$arch)
+ $class = "active";
+
+ echo "<div id='sortBy'>\n";
+ $str = gettext('SORT BY PLATFORM');
+ echo "\t<h4 style='margin-left: 0;'>$str</h4>\n";
+ echo "\t\t<ul>\n";
+ $str = gettext('all platforms');
+ echo "\t\t\t<li class='first'><a href='$base_uri' class='$class'>$str</a></li>\n";
+
+ foreach($arr_display_arch as $name) {
+ $class = "";
+ if($name == $arch)
+ $class = 'active';
+
+ if($name == end($arr_display_arch))
+ $li = "last";
+ else
+ $li = "";
+
+ $url = $base_uri.'arch/'.$name;
+
+ echo "\t\t\t<li class='$li'><a href='$url' class='$class'>$name</a></li>\n";
+ }
+ echo "\t\t</ul>\n";
+ echo "\t<div class='clear'></div>\n";
+ echo "</div>\n";
+
+ if($page)
+ $offset = $amount * ($page - 1);
+
+ $arr = recentPackages($amount, $offset, $arch);
+
+// Common::pre($arr);
+
+ if(count($arr))
+ foreach($arr as $row)
+ $arr_packages[$row['package']][] = $row['ebuild'];
+
+// Common::pre($arr_packages);
+
+ if(count($arr_packages)) {
+ foreach($arr_packages as $arr) {
+ echo keywordsRow($arr, 'new');
+ }
+ }
+
+ // $page is the current page we are on, so default is 1.
+
+ $base = $base_uri;
+ if($arch)
+ $base .= "arch/$arch/";
+
+ $next_page = $base.($page + 1);
+ $prev_page = $base.($page - 1);
+
+ echo "<div id='pagination' style='padding-bottom: 25px;'>\n";
+ echo "<img src='".$base_uri."img/hr_dotted.png' width='709' height='3' alt='' />\n";
+ if($page) {
+ $str = gettext('Next Page');
+ echo "<a href='$next_page'><img src='".$base_uri."img/next_page.png' width='125' height='25' alt='$str' /></a>\n";
+ }
+ if($page > 1) {
+ $str = gettext('Previous Page');
+ echo "<a href='$prev_page'><img src='".$base_uri."img/prev_page.png' width='125' height='25' alt='$str' /></a>\n";
+ }
+ echo "</div>\n";
+
+?> \ No newline at end of file
diff --git a/new_packages.php b/new_packages.php
new file mode 100644
index 0000000..ba9741a
--- /dev/null
+++ b/new_packages.php
@@ -0,0 +1,49 @@
+<?
+ if(!$page)
+ $page = 1;
+
+ echo "<h4>".gettext("New Packages")."</h4>";
+
+ if($page)
+ $offset = $amount * ($page - 1);
+
+ // FIXME is this even right?
+ $sql = "SELECT p.id AS package, e.id AS ebuild FROM package p LEFT OUTER JOIN ebuilds e ON e.package = p.id WHERE p.idate > '2010-01-04 12:00:00.0-07' AND p.portage_mtime IS NOT NULL AND e.id IS NOT NULL ORDER BY p.idate DESC, e.cache_mtime DESC, e.category_name, e.package_name, e.ev DESC, e.lvl DESC, e.p IS NULL, e.p DESC, e.rc IS NULL, e.rc DESC, e.pre IS NULL, e.pre DESC, e.beta IS NULL, e.beta DESC, e.alpha IS NULL, e.alpha DESC, e.pr IS NULL, e.pr DESC LIMIT $amount OFFSET $offset;";
+
+ // FIXME allow arch
+// $sql = "SELECT e.package, e.id AS ebuild FROM ebuild e INNER JOIN package_recent pr ON e.package = pr.package AND e.cache_mtime = pr.max_ebuild_mtime INNER JOIN package p ON e.package = p.id WHERE e.status = 0 AND e.package IN (SELECT package FROM package_recent ORDER BY max_ebuild_mtime DESC, package LIMIT $amount OFFSET $offset) ORDER BY p.idate DESC, pr.max_ebuild_mtime DESC, e.package, e.ev DESC, e.lvl DESC, e.p IS NULL, e.p DESC, e.rc IS NULL, e.rc DESC, e.pre IS NULL, e.pre DESC, e.beta IS NULL, e.beta DESC, e.alpha IS NULL, e.alpha DESC, e.pr IS NULL, e.pr DESC;";
+
+ $arr = $db->getAll($sql);
+
+ foreach($arr as $row) {
+ $arr_new_packages[$row['package']][] = $row['ebuild'];
+ }
+
+ if(count($arr_new_packages) < 100 && $lingua == 'en') {
+ echo "<div class='description'><b>Note:</b> The new packages data will be a bit sparse while the database is still populating new data after the site launch.</div>";
+ }
+
+ if(count($arr_new_packages)) {
+ foreach($arr_new_packages as $arr) {
+ echo keywordsRow($arr, 'new');
+ }
+ }
+
+ // $page is the current page we are on, so default is 1.
+
+ $base = $base_uri."new_packages/";
+ if($arch)
+ $base .= "arch/$arch/";
+
+ $next_page = $base.($page + 1);
+ $prev_page = $base.($page - 1);
+
+ echo "<div id='pagination' style='padding-bottom: 25px;'>\n";
+ echo "<img src='".$base_uri."img/hr_dotted.png' width='709' height='3' alt='' />\n";
+ if($page)
+ echo "<a href='$next_page'><img src='".$base_uri."img/next_page.png' width='125' height='25' alt='Next Page' /></a>\n";
+ if($page > 1)
+ echo "<a href='$prev_page'><img src='".$base_uri."img/prev_page.png' width='125' height='25' alt='Previous Page' /></a>\n";
+ echo "</div>\n";
+
+?> \ No newline at end of file
diff --git a/package.php b/package.php
new file mode 100644
index 0000000..171a798
--- /dev/null
+++ b/package.php
@@ -0,0 +1,18 @@
+<?
+
+ if($package_id) {
+
+ $str = gettext("PACKAGE");
+ echo "<h4>$str</h4>";
+
+ $sql = "SELECT id FROM ebuilds WHERE package = ".$db->quote($package_id).";";
+ $arr = $db->getCol($sql);
+
+ if(count($arr))
+ echo keywordsRow($arr, 'package');
+
+ require_once 'inc.package.php';
+
+ }
+
+?> \ No newline at end of file
diff --git a/preferences.php b/preferences.php
new file mode 100644
index 0000000..4f0e3c2
--- /dev/null
+++ b/preferences.php
@@ -0,0 +1,87 @@
+<?
+
+ /**
+ * A note about cookies
+ *
+ * Use the strict mode on in_array() since some funky stuff can go in there
+ * and be impossible to unset. For example, I accidentally, somehow, set
+ * the key name of an array to zero, and couldn't unset it. Whoops.
+ */
+
+
+ $nocache = true;
+
+ require_once 'inc.header1.php';
+
+ $section = $_GET['section'];
+ $submit = $_GET['submit'];
+
+ switch($section) {
+
+ case 'architectures':
+
+ if($submit == 'Yay, cookies!')
+ $set = true;
+ elseif($submit == 'Reset Arches')
+ $reset = true;
+
+ if($set) {
+
+ if(!headers_sent() && count($_GET['arch'])) {
+
+ $arr_keys = array_keys($_GET['arch']);
+
+ // Check to see if the arches they selected aren't just
+ // the same ones as the default.
+
+ $cookie = false;
+
+ foreach($arr_keys as $name) {
+ if($cookie == false && in_array($name, $arr_arch, true) && !in_array($name, $arr_default_arch, true)) {
+ $cookie = true;
+ }
+ }
+
+ // Add a cookie if their preferences are different
+ // and the arches selected are actually in there
+ if($cookie) {
+
+ $expiration = time() + (86400 * 365);
+
+ foreach($arr_arch as $name) {
+ if(in_array($name, $arr_keys, true)) {
+ setcookie("arch[$name]", 1, $expiration);
+ }
+ }
+ }
+ }
+ }
+
+ if($reset || ($set && !$cookie)) {
+
+ $time = time() - 86400;
+
+ setcookie("arch[0]", "", $time);
+
+ if(!headers_sent() && count($_COOKIE['arch'])) {
+ $arr_keys = array_keys($_COOKIE['arch']);
+
+ foreach($arr_keys as $name) {
+ setcookie("arch[$name]", "", $time);
+ }
+ }
+ }
+
+ break;
+
+ }
+
+ // Send them back to the homepage if they actually made changes
+ // Otherwise, let them play with the page some more.
+
+ $url = $_SERVER['HTTP_REFERER'];
+
+ if(!headers_sent() && $url)
+ header("Location: $url");
+
+?> \ No newline at end of file
diff --git a/prototype.js b/prototype.js
new file mode 100644
index 0000000..9fe6e12
--- /dev/null
+++ b/prototype.js
@@ -0,0 +1,4874 @@
+/* Prototype JavaScript framework, version 1.6.1
+ * (c) 2005-2009 Sam Stephenson
+ *
+ * Prototype is freely distributable under the terms of an MIT-style license.
+ * For details, see the Prototype web site: http://www.prototypejs.org/
+ *
+ *--------------------------------------------------------------------------*/
+
+var Prototype = {
+ Version: '1.6.1',
+
+ Browser: (function(){
+ var ua = navigator.userAgent;
+ var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]';
+ return {
+ IE: !!window.attachEvent && !isOpera,
+ Opera: isOpera,
+ WebKit: ua.indexOf('AppleWebKit/') > -1,
+ Gecko: ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1,
+ MobileSafari: /Apple.*Mobile.*Safari/.test(ua)
+ }
+ })(),
+
+ BrowserFeatures: {
+ XPath: !!document.evaluate,
+ SelectorsAPI: !!document.querySelector,
+ ElementExtensions: (function() {
+ var constructor = window.Element || window.HTMLElement;
+ return !!(constructor && constructor.prototype);
+ })(),
+ SpecificElementExtensions: (function() {
+ if (typeof window.HTMLDivElement !== 'undefined')
+ return true;
+
+ var div = document.createElement('div');
+ var form = document.createElement('form');
+ var isSupported = false;
+
+ if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) {
+ isSupported = true;
+ }
+
+ div = form = null;
+
+ return isSupported;
+ })()
+ },
+
+ ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
+ JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
+
+ emptyFunction: function() { },
+ K: function(x) { return x }
+};
+
+if (Prototype.Browser.MobileSafari)
+ Prototype.BrowserFeatures.SpecificElementExtensions = false;
+
+
+var Abstract = { };
+
+
+var Try = {
+ these: function() {
+ var returnValue;
+
+ for (var i = 0, length = arguments.length; i < length; i++) {
+ var lambda = arguments[i];
+ try {
+ returnValue = lambda();
+ break;
+ } catch (e) { }
+ }
+
+ return returnValue;
+ }
+};
+
+/* Based on Alex Arnell's inheritance implementation. */
+
+var Class = (function() {
+ function subclass() {};
+ function create() {
+ var parent = null, properties = $A(arguments);
+ if (Object.isFunction(properties[0]))
+ parent = properties.shift();
+
+ function klass() {
+ this.initialize.apply(this, arguments);
+ }
+
+ Object.extend(klass, Class.Methods);
+ klass.superclass = parent;
+ klass.subclasses = [];
+
+ if (parent) {
+ subclass.prototype = parent.prototype;
+ klass.prototype = new subclass;
+ parent.subclasses.push(klass);
+ }
+
+ for (var i = 0; i < properties.length; i++)
+ klass.addMethods(properties[i]);
+
+ if (!klass.prototype.initialize)
+ klass.prototype.initialize = Prototype.emptyFunction;
+
+ klass.prototype.constructor = klass;
+ return klass;
+ }
+
+ function addMethods(source) {
+ var ancestor = this.superclass && this.superclass.prototype;
+ var properties = Object.keys(source);
+
+ if (!Object.keys({ toString: true }).length) {
+ if (source.toString != Object.prototype.toString)
+ properties.push("toString");
+ if (source.valueOf != Object.prototype.valueOf)
+ properties.push("valueOf");
+ }
+
+ for (var i = 0, length = properties.length; i < length; i++) {
+ var property = properties[i], value = source[property];
+ if (ancestor && Object.isFunction(value) &&
+ value.argumentNames().first() == "$super") {
+ var method = value;
+ value = (function(m) {
+ return function() { return ancestor[m].apply(this, arguments); };
+ })(property).wrap(method);
+
+ value.valueOf = method.valueOf.bind(method);
+ value.toString = method.toString.bind(method);
+ }
+ this.prototype[property] = value;
+ }
+
+ return this;
+ }
+
+ return {
+ create: create,
+ Methods: {
+ addMethods: addMethods
+ }
+ };
+})();
+(function() {
+
+ var _toString = Object.prototype.toString;
+
+ function extend(destination, source) {
+ for (var property in source)
+ destination[property] = source[property];
+ return destination;
+ }
+
+ function inspect(object) {
+ try {
+ if (isUndefined(object)) return 'undefined';
+ if (object === null) return 'null';
+ return object.inspect ? object.inspect() : String(object);
+ } catch (e) {
+ if (e instanceof RangeError) return '...';
+ throw e;
+ }
+ }
+
+ function toJSON(object) {
+ var type = typeof object;
+ switch (type) {
+ case 'undefined':
+ case 'function':
+ case 'unknown': return;
+ case 'boolean': return object.toString();
+ }
+
+ if (object === null) return 'null';
+ if (object.toJSON) return object.toJSON();
+ if (isElement(object)) return;
+
+ var results = [];
+ for (var property in object) {
+ var value = toJSON(object[property]);
+ if (!isUndefined(value))
+ results.push(property.toJSON() + ': ' + value);
+ }
+
+ return '{' + results.join(', ') + '}';
+ }
+
+ function toQueryString(object) {
+ return $H(object).toQueryString();
+ }
+
+ function toHTML(object) {
+ return object && object.toHTML ? object.toHTML() : String.interpret(object);
+ }
+
+ function keys(object) {
+ var results = [];
+ for (var property in object)
+ results.push(property);
+ return results;
+ }
+
+ function values(object) {
+ var results = [];
+ for (var property in object)
+ results.push(object[property]);
+ return results;
+ }
+
+ function clone(object) {
+ return extend({ }, object);
+ }
+
+ function isElement(object) {
+ return !!(object && object.nodeType == 1);
+ }
+
+ function isArray(object) {
+ return _toString.call(object) == "[object Array]";
+ }
+
+
+ function isHash(object) {
+ return object instanceof Hash;
+ }
+
+ function isFunction(object) {
+ return typeof object === "function";
+ }
+
+ function isString(object) {
+ return _toString.call(object) == "[object String]";
+ }
+
+ function isNumber(object) {
+ return _toString.call(object) == "[object Number]";
+ }
+
+ function isUndefined(object) {
+ return typeof object === "undefined";
+ }
+
+ extend(Object, {
+ extend: extend,
+ inspect: inspect,
+ toJSON: toJSON,
+ toQueryString: toQueryString,
+ toHTML: toHTML,
+ keys: keys,
+ values: values,
+ clone: clone,
+ isElement: isElement,
+ isArray: isArray,
+ isHash: isHash,
+ isFunction: isFunction,
+ isString: isString,
+ isNumber: isNumber,
+ isUndefined: isUndefined
+ });
+})();
+Object.extend(Function.prototype, (function() {
+ var slice = Array.prototype.slice;
+
+ function update(array, args) {
+ var arrayLength = array.length, length = args.length;
+ while (length--) array[arrayLength + length] = args[length];
+ return array;
+ }
+
+ function merge(array, args) {
+ array = slice.call(array, 0);
+ return update(array, args);
+ }
+
+ function argumentNames() {
+ var names = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1]
+ .replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, '')
+ .replace(/\s+/g, '').split(',');
+ return names.length == 1 && !names[0] ? [] : names;
+ }
+
+ function bind(context) {
+ if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
+ var __method = this, args = slice.call(arguments, 1);
+ return function() {
+ var a = merge(args, arguments);
+ return __method.apply(context, a);
+ }
+ }
+
+ function bindAsEventListener(context) {
+ var __method = this, args = slice.call(arguments, 1);
+ return function(event) {
+ var a = update([event || window.event], args);
+ return __method.apply(context, a);
+ }
+ }
+
+ function curry() {
+ if (!arguments.length) return this;
+ var __method = this, args = slice.call(arguments, 0);
+ return function() {
+ var a = merge(args, arguments);
+ return __method.apply(this, a);
+ }
+ }
+
+ function delay(timeout) {
+ var __method = this, args = slice.call(arguments, 1);
+ timeout = timeout * 1000
+ return window.setTimeout(function() {
+ return __method.apply(__method, args);
+ }, timeout);
+ }
+
+ function defer() {
+ var args = update([0.01], arguments);
+ return this.delay.apply(this, args);
+ }
+
+ function wrap(wrapper) {
+ var __method = this;
+ return function() {
+ var a = update([__method.bind(this)], arguments);
+ return wrapper.apply(this, a);
+ }
+ }
+
+ function methodize() {
+ if (this._methodized) return this._methodized;
+ var __method = this;
+ return this._methodized = function() {
+ var a = update([this], arguments);
+ return __method.apply(null, a);
+ };
+ }
+
+ return {
+ argumentNames: argumentNames,
+ bind: bind,
+ bindAsEventListener: bindAsEventListener,
+ curry: curry,
+ delay: delay,
+ defer: defer,
+ wrap: wrap,
+ methodize: methodize
+ }
+})());
+
+
+Date.prototype.toJSON = function() {
+ return '"' + this.getUTCFullYear() + '-' +
+ (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
+ this.getUTCDate().toPaddedString(2) + 'T' +
+ this.getUTCHours().toPaddedString(2) + ':' +
+ this.getUTCMinutes().toPaddedString(2) + ':' +
+ this.getUTCSeconds().toPaddedString(2) + 'Z"';
+};
+
+
+RegExp.prototype.match = RegExp.prototype.test;
+
+RegExp.escape = function(str) {
+ return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
+};
+var PeriodicalExecuter = Class.create({
+ initialize: function(callback, frequency) {
+ this.callback = callback;
+ this.frequency = frequency;
+ this.currentlyExecuting = false;
+
+ this.registerCallback();
+ },
+
+ registerCallback: function() {
+ this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+ },
+
+ execute: function() {
+ this.callback(this);
+ },
+
+ stop: function() {
+ if (!this.timer) return;
+ clearInterval(this.timer);
+ this.timer = null;
+ },
+
+ onTimerEvent: function() {
+ if (!this.currentlyExecuting) {
+ try {
+ this.currentlyExecuting = true;
+ this.execute();
+ this.currentlyExecuting = false;
+ } catch(e) {
+ this.currentlyExecuting = false;
+ throw e;
+ }
+ }
+ }
+});
+Object.extend(String, {
+ interpret: function(value) {
+ return value == null ? '' : String(value);
+ },
+ specialChar: {
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '\\': '\\\\'
+ }
+});
+
+Object.extend(String.prototype, (function() {
+
+ function prepareReplacement(replacement) {
+ if (Object.isFunction(replacement)) return replacement;
+ var template = new Template(replacement);
+ return function(match) { return template.evaluate(match) };
+ }
+
+ function gsub(pattern, replacement) {
+ var result = '', source = this, match;
+ replacement = prepareReplacement(replacement);
+
+ if (Object.isString(pattern))
+ pattern = RegExp.escape(pattern);
+
+ if (!(pattern.length || pattern.source)) {
+ replacement = replacement('');
+ return replacement + source.split('').join(replacement) + replacement;
+ }
+
+ while (source.length > 0) {
+ if (match = source.match(pattern)) {
+ result += source.slice(0, match.index);
+ result += String.interpret(replacement(match));
+ source = source.slice(match.index + match[0].length);
+ } else {
+ result += source, source = '';
+ }
+ }
+ return result;
+ }
+
+ function sub(pattern, replacement, count) {
+ replacement = prepareReplacement(replacement);
+ count = Object.isUndefined(count) ? 1 : count;
+
+ return this.gsub(pattern, function(match) {
+ if (--count < 0) return match[0];
+ return replacement(match);
+ });
+ }
+
+ function scan(pattern, iterator) {
+ this.gsub(pattern, iterator);
+ return String(this);
+ }
+
+ function truncate(length, truncation) {
+ length = length || 30;
+ truncation = Object.isUndefined(truncation) ? '...' : truncation;
+ return this.length > length ?
+ this.slice(0, length - truncation.length) + truncation : String(this);
+ }
+
+ function strip() {
+ return this.replace(/^\s+/, '').replace(/\s+$/, '');
+ }
+
+ function stripTags() {
+ return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi, '');
+ }
+
+ function stripScripts() {
+ return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
+ }
+
+ function extractScripts() {
+ var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
+ var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
+ return (this.match(matchAll) || []).map(function(scriptTag) {
+ return (scriptTag.match(matchOne) || ['', ''])[1];
+ });
+ }
+
+ function evalScripts() {
+ return this.extractScripts().map(function(script) { return eval(script) });
+ }
+
+ function escapeHTML() {
+ return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
+ }
+
+ function unescapeHTML() {
+ return this.stripTags().replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');
+ }
+
+
+ function toQueryParams(separator) {
+ var match = this.strip().match(/([^?#]*)(#.*)?$/);
+ if (!match) return { };
+
+ return match[1].split(separator || '&').inject({ }, function(hash, pair) {
+ if ((pair = pair.split('='))[0]) {
+ var key = decodeURIComponent(pair.shift());
+ var value = pair.length > 1 ? pair.join('=') : pair[0];
+ if (value != undefined) value = decodeURIComponent(value);
+
+ if (key in hash) {
+ if (!Object.isArray(hash[key])) hash[key] = [hash[key]];
+ hash[key].push(value);
+ }
+ else hash[key] = value;
+ }
+ return hash;
+ });
+ }
+
+ function toArray() {
+ return this.split('');
+ }
+
+ function succ() {
+ return this.slice(0, this.length - 1) +
+ String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
+ }
+
+ function times(count) {
+ return count < 1 ? '' : new Array(count + 1).join(this);
+ }
+
+ function camelize() {
+ var parts = this.split('-'), len = parts.length;
+ if (len == 1) return parts[0];
+
+ var camelized = this.charAt(0) == '-'
+ ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
+ : parts[0];
+
+ for (var i = 1; i < len; i++)
+ camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
+
+ return camelized;
+ }
+
+ function capitalize() {
+ return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
+ }
+
+ function underscore() {
+ return this.replace(/::/g, '/')
+ .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')
+ .replace(/([a-z\d])([A-Z])/g, '$1_$2')
+ .replace(/-/g, '_')
+ .toLowerCase();
+ }
+
+ function dasherize() {
+ return this.replace(/_/g, '-');
+ }
+
+ function inspect(useDoubleQuotes) {
+ var escapedString = this.replace(/[\x00-\x1f\\]/g, function(character) {
+ if (character in String.specialChar) {
+ return String.specialChar[character];
+ }
+ return '\\u00' + character.charCodeAt().toPaddedString(2, 16);
+ });
+ if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
+ return "'" + escapedString.replace(/'/g, '\\\'') + "'";
+ }
+
+ function toJSON() {
+ return this.inspect(true);
+ }
+
+ function unfilterJSON(filter) {
+ return this.replace(filter || Prototype.JSONFilter, '$1');
+ }
+
+ function isJSON() {
+ var str = this;
+ if (str.blank()) return false;
+ str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
+ return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
+ }
+
+ function evalJSON(sanitize) {
+ var json = this.unfilterJSON();
+ try {
+ if (!sanitize || json.isJSON()) return eval('(' + json + ')');
+ } catch (e) { }
+ throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
+ }
+
+ function include(pattern) {
+ return this.indexOf(pattern) > -1;
+ }
+
+ function startsWith(pattern) {
+ return this.indexOf(pattern) === 0;
+ }
+
+ function endsWith(pattern) {
+ var d = this.length - pattern.length;
+ return d >= 0 && this.lastIndexOf(pattern) === d;
+ }
+
+ function empty() {
+ return this == '';
+ }
+
+ function blank() {
+ return /^\s*$/.test(this);
+ }
+
+ function interpolate(object, pattern) {
+ return new Template(this, pattern).evaluate(object);
+ }
+
+ return {
+ gsub: gsub,
+ sub: sub,
+ scan: scan,
+ truncate: truncate,
+ strip: String.prototype.trim ? String.prototype.trim : strip,
+ stripTags: stripTags,
+ stripScripts: stripScripts,
+ extractScripts: extractScripts,
+ evalScripts: evalScripts,
+ escapeHTML: escapeHTML,
+ unescapeHTML: unescapeHTML,
+ toQueryParams: toQueryParams,
+ parseQuery: toQueryParams,
+ toArray: toArray,
+ succ: succ,
+ times: times,
+ camelize: camelize,
+ capitalize: capitalize,
+ underscore: underscore,
+ dasherize: dasherize,
+ inspect: inspect,
+ toJSON: toJSON,
+ unfilterJSON: unfilterJSON,
+ isJSON: isJSON,
+ evalJSON: evalJSON,
+ include: include,
+ startsWith: startsWith,
+ endsWith: endsWith,
+ empty: empty,
+ blank: blank,
+ interpolate: interpolate
+ };
+})());
+
+var Template = Class.create({
+ initialize: function(template, pattern) {
+ this.template = template.toString();
+ this.pattern = pattern || Template.Pattern;
+ },
+
+ evaluate: function(object) {
+ if (object && Object.isFunction(object.toTemplateReplacements))
+ object = object.toTemplateReplacements();
+
+ return this.template.gsub(this.pattern, function(match) {
+ if (object == null) return (match[1] + '');
+
+ var before = match[1] || '';
+ if (before == '\\') return match[2];
+
+ var ctx = object, expr = match[3];
+ var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
+ match = pattern.exec(expr);
+ if (match == null) return before;
+
+ while (match != null) {
+ var comp = match[1].startsWith('[') ? match[2].replace(/\\\\]/g, ']') : match[1];
+ ctx = ctx[comp];
+ if (null == ctx || '' == match[3]) break;
+ expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
+ match = pattern.exec(expr);
+ }
+
+ return before + String.interpret(ctx);
+ });
+ }
+});
+Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
+
+var $break = { };
+
+var Enumerable = (function() {
+ function each(iterator, context) {
+ var index = 0;
+ try {
+ this._each(function(value) {
+ iterator.call(context, value, index++);
+ });
+ } catch (e) {
+ if (e != $break) throw e;
+ }
+ return this;
+ }
+
+ function eachSlice(number, iterator, context) {
+ var index = -number, slices = [], array = this.toArray();
+ if (number < 1) return array;
+ while ((index += number) < array.length)
+ slices.push(array.slice(index, index+number));
+ return slices.collect(iterator, context);
+ }
+
+ function all(iterator, context) {
+ iterator = iterator || Prototype.K;
+ var result = true;
+ this.each(function(value, index) {
+ result = result && !!iterator.call(context, value, index);
+ if (!result) throw $break;
+ });
+ return result;
+ }
+
+ function any(iterator, context) {
+ iterator = iterator || Prototype.K;
+ var result = false;
+ this.each(function(value, index) {
+ if (result = !!iterator.call(context, value, index))
+ throw $break;
+ });
+ return result;
+ }
+
+ function collect(iterator, context) {
+ iterator = iterator || Prototype.K;
+ var results = [];
+ this.each(function(value, index) {
+ results.push(iterator.call(context, value, index));
+ });
+ return results;
+ }
+
+ function detect(iterator, context) {
+ var result;
+ this.each(function(value, index) {
+ if (iterator.call(context, value, index)) {
+ result = value;
+ throw $break;
+ }
+ });
+ return result;
+ }
+
+ function findAll(iterator, context) {
+ var results = [];
+ this.each(function(value, index) {
+ if (iterator.call(context, value, index))
+ results.push(value);
+ });
+ return results;
+ }
+
+ function grep(filter, iterator, context) {
+ iterator = iterator || Prototype.K;
+ var results = [];
+
+ if (Object.isString(filter))
+ filter = new RegExp(RegExp.escape(filter));
+
+ this.each(function(value, index) {
+ if (filter.match(value))
+ results.push(iterator.call(context, value, index));
+ });
+ return results;
+ }
+
+ function include(object) {
+ if (Object.isFunction(this.indexOf))
+ if (this.indexOf(object) != -1) return true;
+
+ var found = false;
+ this.each(function(value) {
+ if (value == object) {
+ found = true;
+ throw $break;
+ }
+ });
+ return found;
+ }
+
+ function inGroupsOf(number, fillWith) {
+ fillWith = Object.isUndefined(fillWith) ? null : fillWith;
+ return this.eachSlice(number, function(slice) {
+ while(slice.length < number) slice.push(fillWith);
+ return slice;
+ });
+ }
+
+ function inject(memo, iterator, context) {
+ this.each(function(value, index) {
+ memo = iterator.call(context, memo, value, index);
+ });
+ return memo;
+ }
+
+ function invoke(method) {
+ var args = $A(arguments).slice(1);
+ return this.map(function(value) {
+ return value[method].apply(value, args);
+ });
+ }
+
+ function max(iterator, context) {
+ iterator = iterator || Prototype.K;
+ var result;
+ this.each(function(value, index) {
+ value = iterator.call(context, value, index);
+ if (result == null || value >= result)
+ result = value;
+ });
+ return result;
+ }
+
+ function min(iterator, context) {
+ iterator = iterator || Prototype.K;
+ var result;
+ this.each(function(value, index) {
+ value = iterator.call(context, value, index);
+ if (result == null || value < result)
+ result = value;
+ });
+ return result;
+ }
+
+ function partition(iterator, context) {
+ iterator = iterator || Prototype.K;
+ var trues = [], falses = [];
+ this.each(function(value, index) {
+ (iterator.call(context, value, index) ?
+ trues : falses).push(value);
+ });
+ return [trues, falses];
+ }
+
+ function pluck(property) {
+ var results = [];
+ this.each(function(value) {
+ results.push(value[property]);
+ });
+ return results;
+ }
+
+ function reject(iterator, context) {
+ var results = [];
+ this.each(function(value, index) {
+ if (!iterator.call(context, value, index))
+ results.push(value);
+ });
+ return results;
+ }
+
+ function sortBy(iterator, context) {
+ return this.map(function(value, index) {
+ return {
+ value: value,
+ criteria: iterator.call(context, value, index)
+ };
+ }).sort(function(left, right) {
+ var a = left.criteria, b = right.criteria;
+ return a < b ? -1 : a > b ? 1 : 0;
+ }).pluck('value');
+ }
+
+ function toArray() {
+ return this.map();
+ }
+
+ function zip() {
+ var iterator = Prototype.K, args = $A(arguments);
+ if (Object.isFunction(args.last()))
+ iterator = args.pop();
+
+ var collections = [this].concat(args).map($A);
+ return this.map(function(value, index) {
+ return iterator(collections.pluck(index));
+ });
+ }
+
+ function size() {
+ return this.toArray().length;
+ }
+
+ function inspect() {
+ return '#<Enumerable:' + this.toArray().inspect() + '>';
+ }
+
+
+
+
+
+
+
+
+
+ return {
+ each: each,
+ eachSlice: eachSlice,
+ all: all,
+ every: all,
+ any: any,
+ some: any,
+ collect: collect,
+ map: collect,
+ detect: detect,
+ findAll: findAll,
+ select: findAll,
+ filter: findAll,
+ grep: grep,
+ include: include,
+ member: include,
+ inGroupsOf: inGroupsOf,
+ inject: inject,
+ invoke: invoke,
+ max: max,
+ min: min,
+ partition: partition,
+ pluck: pluck,
+ reject: reject,
+ sortBy: sortBy,
+ toArray: toArray,
+ entries: toArray,
+ zip: zip,
+ size: size,
+ inspect: inspect,
+ find: detect
+ };
+})();
+function $A(iterable) {
+ if (!iterable) return [];
+ if ('toArray' in Object(iterable)) return iterable.toArray();
+ var length = iterable.length || 0, results = new Array(length);
+ while (length--) results[length] = iterable[length];
+ return results;
+}
+
+function $w(string) {
+ if (!Object.isString(string)) return [];
+ string = string.strip();
+ return string ? string.split(/\s+/) : [];
+}
+
+Array.from = $A;
+
+
+(function() {
+ var arrayProto = Array.prototype,
+ slice = arrayProto.slice,
+ _each = arrayProto.forEach; // use native browser JS 1.6 implementation if available
+
+ function each(iterator) {
+ for (var i = 0, length = this.length; i < length; i++)
+ iterator(this[i]);
+ }
+ if (!_each) _each = each;
+
+ function clear() {
+ this.length = 0;
+ return this;
+ }
+
+ function first() {
+ return this[0];
+ }
+
+ function last() {
+ return this[this.length - 1];
+ }
+
+ function compact() {
+ return this.select(function(value) {
+ return value != null;
+ });
+ }
+
+ function flatten() {
+ return this.inject([], function(array, value) {
+ if (Object.isArray(value))
+ return array.concat(value.flatten());
+ array.push(value);
+ return array;
+ });
+ }
+
+ function without() {
+ var values = slice.call(arguments, 0);
+ return this.select(function(value) {
+ return !values.include(value);
+ });
+ }
+
+ function reverse(inline) {
+ return (inline !== false ? this : this.toArray())._reverse();
+ }
+
+ function uniq(sorted) {
+ return this.inject([], function(array, value, index) {
+ if (0 == index || (sorted ? array.last() != value : !array.include(value)))
+ array.push(value);
+ return array;
+ });
+ }
+
+ function intersect(array) {
+ return this.uniq().findAll(function(item) {
+ return array.detect(function(value) { return item === value });
+ });
+ }
+
+
+ function clone() {
+ return slice.call(this, 0);
+ }
+
+ function size() {
+ return this.length;
+ }
+
+ function inspect() {
+ return '[' + this.map(Object.inspect).join(', ') + ']';
+ }
+
+ function toJSON() {
+ var results = [];
+ this.each(function(object) {
+ var value = Object.toJSON(object);
+ if (!Object.isUndefined(value)) results.push(value);
+ });
+ return '[' + results.join(', ') + ']';
+ }
+
+ function indexOf(item, i) {
+ i || (i = 0);
+ var length = this.length;
+ if (i < 0) i = length + i;
+ for (; i < length; i++)
+ if (this[i] === item) return i;
+ return -1;
+ }
+
+ function lastIndexOf(item, i) {
+ i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
+ var n = this.slice(0, i).reverse().indexOf(item);
+ return (n < 0) ? n : i - n - 1;
+ }
+
+ function concat() {
+ var array = slice.call(this, 0), item;
+ for (var i = 0, length = arguments.length; i < length; i++) {
+ item = arguments[i];
+ if (Object.isArray(item) && !('callee' in item)) {
+ for (var j = 0, arrayLength = item.length; j < arrayLength; j++)
+ array.push(item[j]);
+ } else {
+ array.push(item);
+ }
+ }
+ return array;
+ }
+
+ Object.extend(arrayProto, Enumerable);
+
+ if (!arrayProto._reverse)
+ arrayProto._reverse = arrayProto.reverse;
+
+ Object.extend(arrayProto, {
+ _each: _each,
+ clear: clear,
+ first: first,
+ last: last,
+ compact: compact,
+ flatten: flatten,
+ without: without,
+ reverse: reverse,
+ uniq: uniq,
+ intersect: intersect,
+ clone: clone,
+ toArray: clone,
+ size: size,
+ inspect: inspect,
+ toJSON: toJSON
+ });
+
+ var CONCAT_ARGUMENTS_BUGGY = (function() {
+ return [].concat(arguments)[0][0] !== 1;
+ })(1,2)
+
+ if (CONCAT_ARGUMENTS_BUGGY) arrayProto.concat = concat;
+
+ if (!arrayProto.indexOf) arrayProto.indexOf = indexOf;
+ if (!arrayProto.lastIndexOf) arrayProto.lastIndexOf = lastIndexOf;
+})();
+function $H(object) {
+ return new Hash(object);
+};
+
+var Hash = Class.create(Enumerable, (function() {
+ function initialize(object) {
+ this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
+ }
+
+ function _each(iterator) {
+ for (var key in this._object) {
+ var value = this._object[key], pair = [key, value];
+ pair.key = key;
+ pair.value = value;
+ iterator(pair);
+ }
+ }
+
+ function set(key, value) {
+ return this._object[key] = value;
+ }
+
+ function get(key) {
+ if (this._object[key] !== Object.prototype[key])
+ return this._object[key];
+ }
+
+ function unset(key) {
+ var value = this._object[key];
+ delete this._object[key];
+ return value;
+ }
+
+ function toObject() {
+ return Object.clone(this._object);
+ }
+
+ function keys() {
+ return this.pluck('key');
+ }
+
+ function values() {
+ return this.pluck('value');
+ }
+
+ function index(value) {
+ var match = this.detect(function(pair) {
+ return pair.value === value;
+ });
+ return match && match.key;
+ }
+
+ function merge(object) {
+ return this.clone().update(object);
+ }
+
+ function update(object) {
+ return new Hash(object).inject(this, function(result, pair) {
+ result.set(pair.key, pair.value);
+ return result;
+ });
+ }
+
+ function toQueryPair(key, value) {
+ if (Object.isUndefined(value)) return key;
+ return key + '=' + encodeURIComponent(String.interpret(value));
+ }
+
+ function toQueryString() {
+ return this.inject([], function(results, pair) {
+ var key = encodeURIComponent(pair.key), values = pair.value;
+
+ if (values && typeof values == 'object') {
+ if (Object.isArray(values))
+ return results.concat(values.map(toQueryPair.curry(key)));
+ } else results.push(toQueryPair(key, values));
+ return results;
+ }).join('&');
+ }
+
+ function inspect() {
+ return '#<Hash:{' + this.map(function(pair) {
+ return pair.map(Object.inspect).join(': ');
+ }).join(', ') + '}>';
+ }
+
+ function toJSON() {
+ return Object.toJSON(this.toObject());
+ }
+
+ function clone() {
+ return new Hash(this);
+ }
+
+ return {
+ initialize: initialize,
+ _each: _each,
+ set: set,
+ get: get,
+ unset: unset,
+ toObject: toObject,
+ toTemplateReplacements: toObject,
+ keys: keys,
+ values: values,
+ index: index,
+ merge: merge,
+ update: update,
+ toQueryString: toQueryString,
+ inspect: inspect,
+ toJSON: toJSON,
+ clone: clone
+ };
+})());
+
+Hash.from = $H;
+Object.extend(Number.prototype, (function() {
+ function toColorPart() {
+ return this.toPaddedString(2, 16);
+ }
+
+ function succ() {
+ return this + 1;
+ }
+
+ function times(iterator, context) {
+ $R(0, this, true).each(iterator, context);
+ return this;
+ }
+
+ function toPaddedString(length, radix) {
+ var string = this.toString(radix || 10);
+ return '0'.times(length - string.length) + string;
+ }
+
+ function toJSON() {
+ return isFinite(this) ? this.toString() : 'null';
+ }
+
+ function abs() {
+ return Math.abs(this);
+ }
+
+ function round() {
+ return Math.round(this);
+ }
+
+ function ceil() {
+ return Math.ceil(this);
+ }
+
+ function floor() {
+ return Math.floor(this);
+ }
+
+ return {
+ toColorPart: toColorPart,
+ succ: succ,
+ times: times,
+ toPaddedString: toPaddedString,
+ toJSON: toJSON,
+ abs: abs,
+ round: round,
+ ceil: ceil,
+ floor: floor
+ };
+})());
+
+function $R(start, end, exclusive) {
+ return new ObjectRange(start, end, exclusive);
+}
+
+var ObjectRange = Class.create(Enumerable, (function() {
+ function initialize(start, end, exclusive) {
+ this.start = start;
+ this.end = end;
+ this.exclusive = exclusive;
+ }
+
+ function _each(iterator) {
+ var value = this.start;
+ while (this.include(value)) {
+ iterator(value);
+ value = value.succ();
+ }
+ }
+
+ function include(value) {
+ if (value < this.start)
+ return false;
+ if (this.exclusive)
+ return value < this.end;
+ return value <= this.end;
+ }
+
+ return {
+ initialize: initialize,
+ _each: _each,
+ include: include
+ };
+})());
+
+
+
+var Ajax = {
+ getTransport: function() {
+ return Try.these(
+ function() {return new XMLHttpRequest()},
+ function() {return new ActiveXObject('Msxml2.XMLHTTP')},
+ function() {return new ActiveXObject('Microsoft.XMLHTTP')}
+ ) || false;
+ },
+
+ activeRequestCount: 0
+};
+
+Ajax.Responders = {
+ responders: [],
+
+ _each: function(iterator) {
+ this.responders._each(iterator);
+ },
+
+ register: function(responder) {
+ if (!this.include(responder))
+ this.responders.push(responder);
+ },
+
+ unregister: function(responder) {
+ this.responders = this.responders.without(responder);
+ },
+
+ dispatch: function(callback, request, transport, json) {
+ this.each(function(responder) {
+ if (Object.isFunction(responder[callback])) {
+ try {
+ responder[callback].apply(responder, [request, transport, json]);
+ } catch (e) { }
+ }
+ });
+ }
+};
+
+Object.extend(Ajax.Responders, Enumerable);
+
+Ajax.Responders.register({
+ onCreate: function() { Ajax.activeRequestCount++ },
+ onComplete: function() { Ajax.activeRequestCount-- }
+});
+Ajax.Base = Class.create({
+ initialize: function(options) {
+ this.options = {
+ method: 'post',
+ asynchronous: true,
+ contentType: 'application/x-www-form-urlencoded',
+ encoding: 'UTF-8',
+ parameters: '',
+ evalJSON: true,
+ evalJS: true
+ };
+ Object.extend(this.options, options || { });
+
+ this.options.method = this.options.method.toLowerCase();
+
+ if (Object.isString(this.options.parameters))
+ this.options.parameters = this.options.parameters.toQueryParams();
+ else if (Object.isHash(this.options.parameters))
+ this.options.parameters = this.options.parameters.toObject();
+ }
+});
+Ajax.Request = Class.create(Ajax.Base, {
+ _complete: false,
+
+ initialize: function($super, url, options) {
+ $super(options);
+ this.transport = Ajax.getTransport();
+ this.request(url);
+ },
+
+ request: function(url) {
+ this.url = url;
+ this.method = this.options.method;
+ var params = Object.clone(this.options.parameters);
+
+ if (!['get', 'post'].include(this.method)) {
+ params['_method'] = this.method;
+ this.method = 'post';
+ }
+
+ this.parameters = params;
+
+ if (params = Object.toQueryString(params)) {
+ if (this.method == 'get')
+ this.url += (this.url.include('?') ? '&' : '?') + params;
+ else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
+ params += '&_=';
+ }
+
+ try {
+ var response = new Ajax.Response(this);
+ if (this.options.onCreate) this.options.onCreate(response);
+ Ajax.Responders.dispatch('onCreate', this, response);
+
+ this.transport.open(this.method.toUpperCase(), this.url,
+ this.options.asynchronous);
+
+ if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
+
+ this.transport.onreadystatechange = this.onStateChange.bind(this);
+ this.setRequestHeaders();
+
+ this.body = this.method == 'post' ? (this.options.postBody || params) : null;
+ this.transport.send(this.body);
+
+ /* Force Firefox to handle ready state 4 for synchronous requests */
+ if (!this.options.asynchronous && this.transport.overrideMimeType)
+ this.onStateChange();
+
+ }
+ catch (e) {
+ this.dispatchException(e);
+ }
+ },
+
+ onStateChange: function() {
+ var readyState = this.transport.readyState;
+ if (readyState > 1 && !((readyState == 4) && this._complete))
+ this.respondToReadyState(this.transport.readyState);
+ },
+
+ setRequestHeaders: function() {
+ var headers = {
+ 'X-Requested-With': 'XMLHttpRequest',
+ 'X-Prototype-Version': Prototype.Version,
+ 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
+ };
+
+ if (this.method == 'post') {
+ headers['Content-type'] = this.options.contentType +
+ (this.options.encoding ? '; charset=' + this.options.encoding : '');
+
+ /* Force "Connection: close" for older Mozilla browsers to work
+ * around a bug where XMLHttpRequest sends an incorrect
+ * Content-length header. See Mozilla Bugzilla #246651.
+ */
+ if (this.transport.overrideMimeType &&
+ (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
+ headers['Connection'] = 'close';
+ }
+
+ if (typeof this.options.requestHeaders == 'object') {
+ var extras = this.options.requestHeaders;
+
+ if (Object.isFunction(extras.push))
+ for (var i = 0, length = extras.length; i < length; i += 2)
+ headers[extras[i]] = extras[i+1];
+ else
+ $H(extras).each(function(pair) { headers[pair.key] = pair.value });
+ }
+
+ for (var name in headers)
+ this.transport.setRequestHeader(name, headers[name]);
+ },
+
+ success: function() {
+ var status = this.getStatus();
+ return !status || (status >= 200 && status < 300);
+ },
+
+ getStatus: function() {
+ try {
+ return this.transport.status || 0;
+ } catch (e) { return 0 }
+ },
+
+ respondToReadyState: function(readyState) {
+ var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
+
+ if (state == 'Complete') {
+ try {
+ this._complete = true;
+ (this.options['on' + response.status]
+ || this.options['on' + (this.success() ? 'Success' : 'Failure')]
+ || Prototype.emptyFunction)(response, response.headerJSON);
+ } catch (e) {
+ this.dispatchException(e);
+ }
+
+ var contentType = response.getHeader('Content-type');
+ if (this.options.evalJS == 'force'
+ || (this.options.evalJS && this.isSameOrigin() && contentType
+ && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
+ this.evalResponse();
+ }
+
+ try {
+ (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);
+ Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);
+ } catch (e) {
+ this.dispatchException(e);
+ }
+
+ if (state == 'Complete') {
+ this.transport.onreadystatechange = Prototype.emptyFunction;
+ }
+ },
+
+ isSameOrigin: function() {
+ var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
+ return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
+ protocol: location.protocol,
+ domain: document.domain,
+ port: location.port ? ':' + location.port : ''
+ }));
+ },
+
+ getHeader: function(name) {
+ try {
+ return this.transport.getResponseHeader(name) || null;
+ } catch (e) { return null; }
+ },
+
+ evalResponse: function() {
+ try {
+ return eval((this.transport.responseText || '').unfilterJSON());
+ } catch (e) {
+ this.dispatchException(e);
+ }
+ },
+
+ dispatchException: function(exception) {
+ (this.options.onException || Prototype.emptyFunction)(this, exception);
+ Ajax.Responders.dispatch('onException', this, exception);
+ }
+});
+
+Ajax.Request.Events =
+ ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
+
+
+
+
+
+
+
+
+Ajax.Response = Class.create({
+ initialize: function(request){
+ this.request = request;
+ var transport = this.transport = request.transport,
+ readyState = this.readyState = transport.readyState;
+
+ if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
+ this.status = this.getStatus();
+ this.statusText = this.getStatusText();
+ this.responseText = String.interpret(transport.responseText);
+ this.headerJSON = this._getHeaderJSON();
+ }
+
+ if(readyState == 4) {
+ var xml = transport.responseXML;
+ this.responseXML = Object.isUndefined(xml) ? null : xml;
+ this.responseJSON = this._getResponseJSON();
+ }
+ },
+
+ status: 0,
+
+ statusText: '',
+
+ getStatus: Ajax.Request.prototype.getStatus,
+
+ getStatusText: function() {
+ try {
+ return this.transport.statusText || '';
+ } catch (e) { return '' }
+ },
+
+ getHeader: Ajax.Request.prototype.getHeader,
+
+ getAllHeaders: function() {
+ try {
+ return this.getAllResponseHeaders();
+ } catch (e) { return null }
+ },
+
+ getResponseHeader: function(name) {
+ return this.transport.getResponseHeader(name);
+ },
+
+ getAllResponseHeaders: function() {
+ return this.transport.getAllResponseHeaders();
+ },
+
+ _getHeaderJSON: function() {
+ var json = this.getHeader('X-JSON');
+ if (!json) return null;
+ json = decodeURIComponent(escape(json));
+ try {
+ return json.evalJSON(this.request.options.sanitizeJSON ||
+ !this.request.isSameOrigin());
+ } catch (e) {
+ this.request.dispatchException(e);
+ }
+ },
+
+ _getResponseJSON: function() {
+ var options = this.request.options;
+ if (!options.evalJSON || (options.evalJSON != 'force' &&
+ !(this.getHeader('Content-type') || '').include('application/json')) ||
+ this.responseText.blank())
+ return null;
+ try {
+ return this.responseText.evalJSON(options.sanitizeJSON ||
+ !this.request.isSameOrigin());
+ } catch (e) {
+ this.request.dispatchException(e);
+ }
+ }
+});
+
+Ajax.Updater = Class.create(Ajax.Request, {
+ initialize: function($super, container, url, options) {
+ this.container = {
+ success: (container.success || container),
+ failure: (container.failure || (container.success ? null : container))
+ };
+
+ options = Object.clone(options);
+ var onComplete = options.onComplete;
+ options.onComplete = (function(response, json) {
+ this.updateContent(response.responseText);
+ if (Object.isFunction(onComplete)) onComplete(response, json);
+ }).bind(this);
+
+ $super(url, options);
+ },
+
+ updateContent: function(responseText) {
+ var receiver = this.container[this.success() ? 'success' : 'failure'],
+ options = this.options;
+
+ if (!options.evalScripts) responseText = responseText.stripScripts();
+
+ if (receiver = $(receiver)) {
+ if (options.insertion) {
+ if (Object.isString(options.insertion)) {
+ var insertion = { }; insertion[options.insertion] = responseText;
+ receiver.insert(insertion);
+ }
+ else options.insertion(receiver, responseText);
+ }
+ else receiver.update(responseText);
+ }
+ }
+});
+
+Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
+ initialize: function($super, container, url, options) {
+ $super(options);
+ this.onComplete = this.options.onComplete;
+
+ this.frequency = (this.options.frequency || 2);
+ this.decay = (this.options.decay || 1);
+
+ this.updater = { };
+ this.container = container;
+ this.url = url;
+
+ this.start();
+ },
+
+ start: function() {
+ this.options.onComplete = this.updateComplete.bind(this);
+ this.onTimerEvent();
+ },
+
+ stop: function() {
+ this.updater.options.onComplete = undefined;
+ clearTimeout(this.timer);
+ (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
+ },
+
+ updateComplete: function(response) {
+ if (this.options.decay) {
+ this.decay = (response.responseText == this.lastText ?
+ this.decay * this.options.decay : 1);
+
+ this.lastText = response.responseText;
+ }
+ this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
+ },
+
+ onTimerEvent: function() {
+ this.updater = new Ajax.Updater(this.container, this.url, this.options);
+ }
+});
+
+
+
+function $(element) {
+ if (arguments.length > 1) {
+ for (var i = 0, elements = [], length = arguments.length; i < length; i++)
+ elements.push($(arguments[i]));
+ return elements;
+ }
+ if (Object.isString(element))
+ element = document.getElementById(element);
+ return Element.extend(element);
+}
+
+if (Prototype.BrowserFeatures.XPath) {
+ document._getElementsByXPath = function(expression, parentElement) {
+ var results = [];
+ var query = document.evaluate(expression, $(parentElement) || document,
+ null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+ for (var i = 0, length = query.snapshotLength; i < length; i++)
+ results.push(Element.extend(query.snapshotItem(i)));
+ return results;
+ };
+}
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.Node) var Node = { };
+
+if (!Node.ELEMENT_NODE) {
+ Object.extend(Node, {
+ ELEMENT_NODE: 1,
+ ATTRIBUTE_NODE: 2,
+ TEXT_NODE: 3,
+ CDATA_SECTION_NODE: 4,
+ ENTITY_REFERENCE_NODE: 5,
+ ENTITY_NODE: 6,
+ PROCESSING_INSTRUCTION_NODE: 7,
+ COMMENT_NODE: 8,
+ DOCUMENT_NODE: 9,
+ DOCUMENT_TYPE_NODE: 10,
+ DOCUMENT_FRAGMENT_NODE: 11,
+ NOTATION_NODE: 12
+ });
+}
+
+
+(function(global) {
+
+ var SETATTRIBUTE_IGNORES_NAME = (function(){
+ var elForm = document.createElement("form");
+ var elInput = document.createElement("input");
+ var root = document.documentElement;
+ elInput.setAttribute("name", "test");
+ elForm.appendChild(elInput);
+ root.appendChild(elForm);
+ var isBuggy = elForm.elements
+ ? (typeof elForm.elements.test == "undefined")
+ : null;
+ root.removeChild(elForm);
+ elForm = elInput = null;
+ return isBuggy;
+ })();
+
+ var element = global.Element;
+ global.Element = function(tagName, attributes) {
+ attributes = attributes || { };
+ tagName = tagName.toLowerCase();
+ var cache = Element.cache;
+ if (SETATTRIBUTE_IGNORES_NAME && attributes.name) {
+ tagName = '<' + tagName + ' name="' + attributes.name + '">';
+ delete attributes.name;
+ return Element.writeAttribute(document.createElement(tagName), attributes);
+ }
+ if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
+ return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);
+ };
+ Object.extend(global.Element, element || { });
+ if (element) global.Element.prototype = element.prototype;
+})(this);
+
+Element.cache = { };
+Element.idCounter = 1;
+
+Element.Methods = {
+ visible: function(element) {
+ return $(element).style.display != 'none';
+ },
+
+ toggle: function(element) {
+ element = $(element);
+ Element[Element.visible(element) ? 'hide' : 'show'](element);
+ return element;
+ },
+
+
+ hide: function(element) {
+ element = $(element);
+ element.style.display = 'none';
+ return element;
+ },
+
+ show: function(element) {
+ element = $(element);
+ element.style.display = '';
+ return element;
+ },
+
+ remove: function(element) {
+ element = $(element);
+ element.parentNode.removeChild(element);
+ return element;
+ },
+
+ update: (function(){
+
+ var SELECT_ELEMENT_INNERHTML_BUGGY = (function(){
+ var el = document.createElement("select"),
+ isBuggy = true;
+ el.innerHTML = "<option value=\"test\">test</option>";
+ if (el.options && el.options[0]) {
+ isBuggy = el.options[0].nodeName.toUpperCase() !== "OPTION";
+ }
+ el = null;
+ return isBuggy;
+ })();
+
+ var TABLE_ELEMENT_INNERHTML_BUGGY = (function(){
+ try {
+ var el = document.createElement("table");
+ if (el && el.tBodies) {
+ el.innerHTML = "<tbody><tr><td>test</td></tr></tbody>";
+ var isBuggy = typeof el.tBodies[0] == "undefined";
+ el = null;
+ return isBuggy;
+ }
+ } catch (e) {
+ return true;
+ }
+ })();
+
+ var SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING = (function () {
+ var s = document.createElement("script"),
+ isBuggy = false;
+ try {
+ s.appendChild(document.createTextNode(""));
+ isBuggy = !s.firstChild ||
+ s.firstChild && s.firstChild.nodeType !== 3;
+ } catch (e) {
+ isBuggy = true;
+ }
+ s = null;
+ return isBuggy;
+ })();
+
+ function update(element, content) {
+ element = $(element);
+
+ if (content && content.toElement)
+ content = content.toElement();
+
+ if (Object.isElement(content))
+ return element.update().insert(content);
+
+ content = Object.toHTML(content);
+
+ var tagName = element.tagName.toUpperCase();
+
+ if (tagName === 'SCRIPT' && SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING) {
+ element.text = content;
+ return element;
+ }
+
+ if (SELECT_ELEMENT_INNERHTML_BUGGY || TABLE_ELEMENT_INNERHTML_BUGGY) {
+ if (tagName in Element._insertionTranslations.tags) {
+ while (element.firstChild) {
+ element.removeChild(element.firstChild);
+ }
+ Element._getContentFromAnonymousElement(tagName, content.stripScripts())
+ .each(function(node) {
+ element.appendChild(node)
+ });
+ }
+ else {
+ element.innerHTML = content.stripScripts();
+ }
+ }
+ else {
+ element.innerHTML = content.stripScripts();
+ }
+
+ content.evalScripts.bind(content).defer();
+ return element;
+ }
+
+ return update;
+ })(),
+
+ replace: function(element, content) {
+ element = $(element);
+ if (content && content.toElement) content = content.toElement();
+ else if (!Object.isElement(content)) {
+ content = Object.toHTML(content);
+ var range = element.ownerDocument.createRange();
+ range.selectNode(element);
+ content.evalScripts.bind(content).defer();
+ content = range.createContextualFragment(content.stripScripts());
+ }
+ element.parentNode.replaceChild(content, element);
+ return element;
+ },
+
+ insert: function(element, insertions) {
+ element = $(element);
+
+ if (Object.isString(insertions) || Object.isNumber(insertions) ||
+ Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
+ insertions = {bottom:insertions};
+
+ var content, insert, tagName, childNodes;
+
+ for (var position in insertions) {
+ content = insertions[position];
+ position = position.toLowerCase();
+ insert = Element._insertionTranslations[position];
+
+ if (content && content.toElement) content = content.toElement();
+ if (Object.isElement(content)) {
+ insert(element, content);
+ continue;
+ }
+
+ content = Object.toHTML(content);
+
+ tagName = ((position == 'before' || position == 'after')
+ ? element.parentNode : element).tagName.toUpperCase();
+
+ childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
+
+ if (position == 'top' || position == 'after') childNodes.reverse();
+ childNodes.each(insert.curry(element));
+
+ content.evalScripts.bind(content).defer();
+ }
+
+ return element;
+ },
+
+ wrap: function(element, wrapper, attributes) {
+ element = $(element);
+ if (Object.isElement(wrapper))
+ $(wrapper).writeAttribute(attributes || { });
+ else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);
+ else wrapper = new Element('div', wrapper);
+ if (element.parentNode)
+ element.parentNode.replaceChild(wrapper, element);
+ wrapper.appendChild(element);
+ return wrapper;
+ },
+
+ inspect: function(element) {
+ element = $(element);
+ var result = '<' + element.tagName.toLowerCase();
+ $H({'id': 'id', 'className': 'class'}).each(function(pair) {
+ var property = pair.first(), attribute = pair.last();
+ var value = (element[property] || '').toString();
+ if (value) result += ' ' + attribute + '=' + value.inspect(true);
+ });
+ return result + '>';
+ },
+
+ recursivelyCollect: function(element, property) {
+ element = $(element);
+ var elements = [];
+ while (element = element[property])
+ if (element.nodeType == 1)
+ elements.push(Element.extend(element));
+ return elements;
+ },
+
+ ancestors: function(element) {
+ return Element.recursivelyCollect(element, 'parentNode');
+ },
+
+ descendants: function(element) {
+ return Element.select(element, "*");
+ },
+
+ firstDescendant: function(element) {
+ element = $(element).firstChild;
+ while (element && element.nodeType != 1) element = element.nextSibling;
+ return $(element);
+ },
+
+ immediateDescendants: function(element) {
+ if (!(element = $(element).firstChild)) return [];
+ while (element && element.nodeType != 1) element = element.nextSibling;
+ if (element) return [element].concat($(element).nextSiblings());
+ return [];
+ },
+
+ previousSiblings: function(element) {
+ return Element.recursivelyCollect(element, 'previousSibling');
+ },
+
+ nextSiblings: function(element) {
+ return Element.recursivelyCollect(element, 'nextSibling');
+ },
+
+ siblings: function(element) {
+ element = $(element);
+ return Element.previousSiblings(element).reverse()
+ .concat(Element.nextSiblings(element));
+ },
+
+ match: function(element, selector) {
+ if (Object.isString(selector))
+ selector = new Selector(selector);
+ return selector.match($(element));
+ },
+
+ up: function(element, expression, index) {
+ element = $(element);
+ if (arguments.length == 1) return $(element.parentNode);
+ var ancestors = Element.ancestors(element);
+ return Object.isNumber(expression) ? ancestors[expression] :
+ Selector.findElement(ancestors, expression, index);
+ },
+
+ down: function(element, expression, index) {
+ element = $(element);
+ if (arguments.length == 1) return Element.firstDescendant(element);
+ return Object.isNumber(expression) ? Element.descendants(element)[expression] :
+ Element.select(element, expression)[index || 0];
+ },
+
+ previous: function(element, expression, index) {
+ element = $(element);
+ if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
+ var previousSiblings = Element.previousSiblings(element);
+ return Object.isNumber(expression) ? previousSiblings[expression] :
+ Selector.findElement(previousSiblings, expression, index);
+ },
+
+ next: function(element, expression, index) {
+ element = $(element);
+ if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
+ var nextSiblings = Element.nextSiblings(element);
+ return Object.isNumber(expression) ? nextSiblings[expression] :
+ Selector.findElement(nextSiblings, expression, index);
+ },
+
+
+ select: function(element) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ return Selector.findChildElements(element, args);
+ },
+
+ adjacent: function(element) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ return Selector.findChildElements(element.parentNode, args).without(element);
+ },
+
+ identify: function(element) {
+ element = $(element);
+ var id = Element.readAttribute(element, 'id');
+ if (id) return id;
+ do { id = 'anonymous_element_' + Element.idCounter++ } while ($(id));
+ Element.writeAttribute(element, 'id', id);
+ return id;
+ },
+
+ readAttribute: function(element, name) {
+ element = $(element);
+ if (Prototype.Browser.IE) {
+ var t = Element._attributeTranslations.read;
+ if (t.values[name]) return t.values[name](element, name);
+ if (t.names[name]) name = t.names[name];
+ if (name.include(':')) {
+ return (!element.attributes || !element.attributes[name]) ? null :
+ element.attributes[name].value;
+ }
+ }
+ return element.getAttribute(name);
+ },
+
+ writeAttribute: function(element, name, value) {
+ element = $(element);
+ var attributes = { }, t = Element._attributeTranslations.write;
+
+ if (typeof name == 'object') attributes = name;
+ else attributes[name] = Object.isUndefined(value) ? true : value;
+
+ for (var attr in attributes) {
+ name = t.names[attr] || attr;
+ value = attributes[attr];
+ if (t.values[attr]) name = t.values[attr](element, value);
+ if (value === false || value === null)
+ element.removeAttribute(name);
+ else if (value === true)
+ element.setAttribute(name, name);
+ else element.setAttribute(name, value);
+ }
+ return element;
+ },
+
+ getHeight: function(element) {
+ return Element.getDimensions(element).height;
+ },
+
+ getWidth: function(element) {
+ return Element.getDimensions(element).width;
+ },
+
+ classNames: function(element) {
+ return new Element.ClassNames(element);
+ },
+
+ hasClassName: function(element, className) {
+ if (!(element = $(element))) return;
+ var elementClassName = element.className;
+ return (elementClassName.length > 0 && (elementClassName == className ||
+ new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
+ },
+
+ addClassName: function(element, className) {
+ if (!(element = $(element))) return;
+ if (!Element.hasClassName(element, className))
+ element.className += (element.className ? ' ' : '') + className;
+ return element;
+ },
+
+ removeClassName: function(element, className) {
+ if (!(element = $(element))) return;
+ element.className = element.className.replace(
+ new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
+ return element;
+ },
+
+ toggleClassName: function(element, className) {
+ if (!(element = $(element))) return;
+ return Element[Element.hasClassName(element, className) ?
+ 'removeClassName' : 'addClassName'](element, className);
+ },
+
+ cleanWhitespace: function(element) {
+ element = $(element);
+ var node = element.firstChild;
+ while (node) {
+ var nextNode = node.nextSibling;
+ if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
+ element.removeChild(node);
+ node = nextNode;
+ }
+ return element;
+ },
+
+ empty: function(element) {
+ return $(element).innerHTML.blank();
+ },
+
+ descendantOf: function(element, ancestor) {
+ element = $(element), ancestor = $(ancestor);
+
+ if (element.compareDocumentPosition)
+ return (element.compareDocumentPosition(ancestor) & 8) === 8;
+
+ if (ancestor.contains)
+ return ancestor.contains(element) && ancestor !== element;
+
+ while (element = element.parentNode)
+ if (element == ancestor) return true;
+
+ return false;
+ },
+
+ scrollTo: function(element) {
+ element = $(element);
+ var pos = Element.cumulativeOffset(element);
+ window.scrollTo(pos[0], pos[1]);
+ return element;
+ },
+
+ getStyle: function(element, style) {
+ element = $(element);
+ style = style == 'float' ? 'cssFloat' : style.camelize();
+ var value = element.style[style];
+ if (!value || value == 'auto') {
+ var css = document.defaultView.getComputedStyle(element, null);
+ value = css ? css[style] : null;
+ }
+ if (style == 'opacity') return value ? parseFloat(value) : 1.0;
+ return value == 'auto' ? null : value;
+ },
+
+ getOpacity: function(element) {
+ return $(element).getStyle('opacity');
+ },
+
+ setStyle: function(element, styles) {
+ element = $(element);
+ var elementStyle = element.style, match;
+ if (Object.isString(styles)) {
+ element.style.cssText += ';' + styles;
+ return styles.include('opacity') ?
+ element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
+ }
+ for (var property in styles)
+ if (property == 'opacity') element.setOpacity(styles[property]);
+ else
+ elementStyle[(property == 'float' || property == 'cssFloat') ?
+ (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
+ property] = styles[property];
+
+ return element;
+ },
+
+ setOpacity: function(element, value) {
+ element = $(element);
+ element.style.opacity = (value == 1 || value === '') ? '' :
+ (value < 0.00001) ? 0 : value;
+ return element;
+ },
+
+ getDimensions: function(element) {
+ element = $(element);
+ var display = Element.getStyle(element, 'display');
+ if (display != 'none' && display != null) // Safari bug
+ return {width: element.offsetWidth, height: element.offsetHeight};
+
+ var els = element.style;
+ var originalVisibility = els.visibility;
+ var originalPosition = els.position;
+ var originalDisplay = els.display;
+ els.visibility = 'hidden';
+ if (originalPosition != 'fixed') // Switching fixed to absolute causes issues in Safari
+ els.position = 'absolute';
+ els.display = 'block';
+ var originalWidth = element.clientWidth;
+ var originalHeight = element.clientHeight;
+ els.display = originalDisplay;
+ els.position = originalPosition;
+ els.visibility = originalVisibility;
+ return {width: originalWidth, height: originalHeight};
+ },
+
+ makePositioned: function(element) {
+ element = $(element);
+ var pos = Element.getStyle(element, 'position');
+ if (pos == 'static' || !pos) {
+ element._madePositioned = true;
+ element.style.position = 'relative';
+ if (Prototype.Browser.Opera) {
+ element.style.top = 0;
+ element.style.left = 0;
+ }
+ }
+ return element;
+ },
+
+ undoPositioned: function(element) {
+ element = $(element);
+ if (element._madePositioned) {
+ element._madePositioned = undefined;
+ element.style.position =
+ element.style.top =
+ element.style.left =
+ element.style.bottom =
+ element.style.right = '';
+ }
+ return element;
+ },
+
+ makeClipping: function(element) {
+ element = $(element);
+ if (element._overflow) return element;
+ element._overflow = Element.getStyle(element, 'overflow') || 'auto';
+ if (element._overflow !== 'hidden')
+ element.style.overflow = 'hidden';
+ return element;
+ },
+
+ undoClipping: function(element) {
+ element = $(element);
+ if (!element._overflow) return element;
+ element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
+ element._overflow = null;
+ return element;
+ },
+
+ cumulativeOffset: function(element) {
+ var valueT = 0, valueL = 0;
+ do {
+ valueT += element.offsetTop || 0;
+ valueL += element.offsetLeft || 0;
+ element = element.offsetParent;
+ } while (element);
+ return Element._returnOffset(valueL, valueT);
+ },
+
+ positionedOffset: function(element) {
+ var valueT = 0, valueL = 0;
+ do {
+ valueT += element.offsetTop || 0;
+ valueL += element.offsetLeft || 0;
+ element = element.offsetParent;
+ if (element) {
+ if (element.tagName.toUpperCase() == 'BODY') break;
+ var p = Element.getStyle(element, 'position');
+ if (p !== 'static') break;
+ }
+ } while (element);
+ return Element._returnOffset(valueL, valueT);
+ },
+
+ absolutize: function(element) {
+ element = $(element);
+ if (Element.getStyle(element, 'position') == 'absolute') return element;
+
+ var offsets = Element.positionedOffset(element);
+ var top = offsets[1];
+ var left = offsets[0];
+ var width = element.clientWidth;
+ var height = element.clientHeight;
+
+ element._originalLeft = left - parseFloat(element.style.left || 0);
+ element._originalTop = top - parseFloat(element.style.top || 0);
+ element._originalWidth = element.style.width;
+ element._originalHeight = element.style.height;
+
+ element.style.position = 'absolute';
+ element.style.top = top + 'px';
+ element.style.left = left + 'px';
+ element.style.width = width + 'px';
+ element.style.height = height + 'px';
+ return element;
+ },
+
+ relativize: function(element) {
+ element = $(element);
+ if (Element.getStyle(element, 'position') == 'relative') return element;
+
+ element.style.position = 'relative';
+ var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);
+ var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
+
+ element.style.top = top + 'px';
+ element.style.left = left + 'px';
+ element.style.height = element._originalHeight;
+ element.style.width = element._originalWidth;
+ return element;
+ },
+
+ cumulativeScrollOffset: function(element) {
+ var valueT = 0, valueL = 0;
+ do {
+ valueT += element.scrollTop || 0;
+ valueL += element.scrollLeft || 0;
+ element = element.parentNode;
+ } while (element);
+ return Element._returnOffset(valueL, valueT);
+ },
+
+ getOffsetParent: function(element) {
+ if (element.offsetParent) return $(element.offsetParent);
+ if (element == document.body) return $(element);
+
+ while ((element = element.parentNode) && element != document.body)
+ if (Element.getStyle(element, 'position') != 'static')
+ return $(element);
+
+ return $(document.body);
+ },
+
+ viewportOffset: function(forElement) {
+ var valueT = 0, valueL = 0;
+
+ var element = forElement;
+ do {
+ valueT += element.offsetTop || 0;
+ valueL += element.offsetLeft || 0;
+
+ if (element.offsetParent == document.body &&
+ Element.getStyle(element, 'position') == 'absolute') break;
+
+ } while (element = element.offsetParent);
+
+ element = forElement;
+ do {
+ if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) {
+ valueT -= element.scrollTop || 0;
+ valueL -= element.scrollLeft || 0;
+ }
+ } while (element = element.parentNode);
+
+ return Element._returnOffset(valueL, valueT);
+ },
+
+ clonePosition: function(element, source) {
+ var options = Object.extend({
+ setLeft: true,
+ setTop: true,
+ setWidth: true,
+ setHeight: true,
+ offsetTop: 0,
+ offsetLeft: 0
+ }, arguments[2] || { });
+
+ source = $(source);
+ var p = Element.viewportOffset(source);
+
+ element = $(element);
+ var delta = [0, 0];
+ var parent = null;
+ if (Element.getStyle(element, 'position') == 'absolute') {
+ parent = Element.getOffsetParent(element);
+ delta = Element.viewportOffset(parent);
+ }
+
+ if (parent == document.body) {
+ delta[0] -= document.body.offsetLeft;
+ delta[1] -= document.body.offsetTop;
+ }
+
+ if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';
+ if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';
+ if (options.setWidth) element.style.width = source.offsetWidth + 'px';
+ if (options.setHeight) element.style.height = source.offsetHeight + 'px';
+ return element;
+ }
+};
+
+Object.extend(Element.Methods, {
+ getElementsBySelector: Element.Methods.select,
+
+ childElements: Element.Methods.immediateDescendants
+});
+
+Element._attributeTranslations = {
+ write: {
+ names: {
+ className: 'class',
+ htmlFor: 'for'
+ },
+ values: { }
+ }
+};
+
+if (Prototype.Browser.Opera) {
+ Element.Methods.getStyle = Element.Methods.getStyle.wrap(
+ function(proceed, element, style) {
+ switch (style) {
+ case 'left': case 'top': case 'right': case 'bottom':
+ if (proceed(element, 'position') === 'static') return null;
+ case 'height': case 'width':
+ if (!Element.visible(element)) return null;
+
+ var dim = parseInt(proceed(element, style), 10);
+
+ if (dim !== element['offset' + style.capitalize()])
+ return dim + 'px';
+
+ var properties;
+ if (style === 'height') {
+ properties = ['border-top-width', 'padding-top',
+ 'padding-bottom', 'border-bottom-width'];
+ }
+ else {
+ properties = ['border-left-width', 'padding-left',
+ 'padding-right', 'border-right-width'];
+ }
+ return properties.inject(dim, function(memo, property) {
+ var val = proceed(element, property);
+ return val === null ? memo : memo - parseInt(val, 10);
+ }) + 'px';
+ default: return proceed(element, style);
+ }
+ }
+ );
+
+ Element.Methods.readAttribute = Element.Methods.readAttribute.wrap(
+ function(proceed, element, attribute) {
+ if (attribute === 'title') return element.title;
+ return proceed(element, attribute);
+ }
+ );
+}
+
+else if (Prototype.Browser.IE) {
+ Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap(
+ function(proceed, element) {
+ element = $(element);
+ try { element.offsetParent }
+ catch(e) { return $(document.body) }
+ var position = element.getStyle('position');
+ if (position !== 'static') return proceed(element);
+ element.setStyle({ position: 'relative' });
+ var value = proceed(element);
+ element.setStyle({ position: position });
+ return value;
+ }
+ );
+
+ $w('positionedOffset viewportOffset').each(function(method) {
+ Element.Methods[method] = Element.Methods[method].wrap(
+ function(proceed, element) {
+ element = $(element);
+ try { element.offsetParent }
+ catch(e) { return Element._returnOffset(0,0) }
+ var position = element.getStyle('position');
+ if (position !== 'static') return proceed(element);
+ var offsetParent = element.getOffsetParent();
+ if (offsetParent && offsetParent.getStyle('position') === 'fixed')
+ offsetParent.setStyle({ zoom: 1 });
+ element.setStyle({ position: 'relative' });
+ var value = proceed(element);
+ element.setStyle({ position: position });
+ return value;
+ }
+ );
+ });
+
+ Element.Methods.cumulativeOffset = Element.Methods.cumulativeOffset.wrap(
+ function(proceed, element) {
+ try { element.offsetParent }
+ catch(e) { return Element._returnOffset(0,0) }
+ return proceed(element);
+ }
+ );
+
+ Element.Methods.getStyle = function(element, style) {
+ element = $(element);
+ style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
+ var value = element.style[style];
+ if (!value && element.currentStyle) value = element.currentStyle[style];
+
+ if (style == 'opacity') {
+ if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
+ if (value[1]) return parseFloat(value[1]) / 100;
+ return 1.0;
+ }
+
+ if (value == 'auto') {
+ if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
+ return element['offset' + style.capitalize()] + 'px';
+ return null;
+ }
+ return value;
+ };
+
+ Element.Methods.setOpacity = function(element, value) {
+ function stripAlpha(filter){
+ return filter.replace(/alpha\([^\)]*\)/gi,'');
+ }
+ element = $(element);
+ var currentStyle = element.currentStyle;
+ if ((currentStyle && !currentStyle.hasLayout) ||
+ (!currentStyle && element.style.zoom == 'normal'))
+ element.style.zoom = 1;
+
+ var filter = element.getStyle('filter'), style = element.style;
+ if (value == 1 || value === '') {
+ (filter = stripAlpha(filter)) ?
+ style.filter = filter : style.removeAttribute('filter');
+ return element;
+ } else if (value < 0.00001) value = 0;
+ style.filter = stripAlpha(filter) +
+ 'alpha(opacity=' + (value * 100) + ')';
+ return element;
+ };
+
+ Element._attributeTranslations = (function(){
+
+ var classProp = 'className';
+ var forProp = 'for';
+
+ var el = document.createElement('div');
+
+ el.setAttribute(classProp, 'x');
+
+ if (el.className !== 'x') {
+ el.setAttribute('class', 'x');
+ if (el.className === 'x') {
+ classProp = 'class';
+ }
+ }
+ el = null;
+
+ el = document.createElement('label');
+ el.setAttribute(forProp, 'x');
+ if (el.htmlFor !== 'x') {
+ el.setAttribute('htmlFor', 'x');
+ if (el.htmlFor === 'x') {
+ forProp = 'htmlFor';
+ }
+ }
+ el = null;
+
+ return {
+ read: {
+ names: {
+ 'class': classProp,
+ 'className': classProp,
+ 'for': forProp,
+ 'htmlFor': forProp
+ },
+ values: {
+ _getAttr: function(element, attribute) {
+ return element.getAttribute(attribute);
+ },
+ _getAttr2: function(element, attribute) {
+ return element.getAttribute(attribute, 2);
+ },
+ _getAttrNode: function(element, attribute) {
+ var node = element.getAttributeNode(attribute);
+ return node ? node.value : "";
+ },
+ _getEv: (function(){
+
+ var el = document.createElement('div');
+ el.onclick = Prototype.emptyFunction;
+ var value = el.getAttribute('onclick');
+ var f;
+
+ if (String(value).indexOf('{') > -1) {
+ f = function(element, attribute) {
+ attribute = element.getAttribute(attribute);
+ if (!attribute) return null;
+ attribute = attribute.toString();
+ attribute = attribute.split('{')[1];
+ attribute = attribute.split('}')[0];
+ return attribute.strip();
+ };
+ }
+ else if (value === '') {
+ f = function(element, attribute) {
+ attribute = element.getAttribute(attribute);
+ if (!attribute) return null;
+ return attribute.strip();
+ };
+ }
+ el = null;
+ return f;
+ })(),
+ _flag: function(element, attribute) {
+ return $(element).hasAttribute(attribute) ? attribute : null;
+ },
+ style: function(element) {
+ return element.style.cssText.toLowerCase();
+ },
+ title: function(element) {
+ return element.title;
+ }
+ }
+ }
+ }
+ })();
+
+ Element._attributeTranslations.write = {
+ names: Object.extend({
+ cellpadding: 'cellPadding',
+ cellspacing: 'cellSpacing'
+ }, Element._attributeTranslations.read.names),
+ values: {
+ checked: function(element, value) {
+ element.checked = !!value;
+ },
+
+ style: function(element, value) {
+ element.style.cssText = value ? value : '';
+ }
+ }
+ };
+
+ Element._attributeTranslations.has = {};
+
+ $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
+ 'encType maxLength readOnly longDesc frameBorder').each(function(attr) {
+ Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;
+ Element._attributeTranslations.has[attr.toLowerCase()] = attr;
+ });
+
+ (function(v) {
+ Object.extend(v, {
+ href: v._getAttr2,
+ src: v._getAttr2,
+ type: v._getAttr,
+ action: v._getAttrNode,
+ disabled: v._flag,
+ checked: v._flag,
+ readonly: v._flag,
+ multiple: v._flag,
+ onload: v._getEv,
+ onunload: v._getEv,
+ onclick: v._getEv,
+ ondblclick: v._getEv,
+ onmousedown: v._getEv,
+ onmouseup: v._getEv,
+ onmouseover: v._getEv,
+ onmousemove: v._getEv,
+ onmouseout: v._getEv,
+ onfocus: v._getEv,
+ onblur: v._getEv,
+ onkeypress: v._getEv,
+ onkeydown: v._getEv,
+ onkeyup: v._getEv,
+ onsubmit: v._getEv,
+ onreset: v._getEv,
+ onselect: v._getEv,
+ onchange: v._getEv
+ });
+ })(Element._attributeTranslations.read.values);
+
+ if (Prototype.BrowserFeatures.ElementExtensions) {
+ (function() {
+ function _descendants(element) {
+ var nodes = element.getElementsByTagName('*'), results = [];
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (node.tagName !== "!") // Filter out comment nodes.
+ results.push(node);
+ return results;
+ }
+
+ Element.Methods.down = function(element, expression, index) {
+ element = $(element);
+ if (arguments.length == 1) return element.firstDescendant();
+ return Object.isNumber(expression) ? _descendants(element)[expression] :
+ Element.select(element, expression)[index || 0];
+ }
+ })();
+ }
+
+}
+
+else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) {
+ Element.Methods.setOpacity = function(element, value) {
+ element = $(element);
+ element.style.opacity = (value == 1) ? 0.999999 :
+ (value === '') ? '' : (value < 0.00001) ? 0 : value;
+ return element;
+ };
+}
+
+else if (Prototype.Browser.WebKit) {
+ Element.Methods.setOpacity = function(element, value) {
+ element = $(element);
+ element.style.opacity = (value == 1 || value === '') ? '' :
+ (value < 0.00001) ? 0 : value;
+
+ if (value == 1)
+ if(element.tagName.toUpperCase() == 'IMG' && element.width) {
+ element.width++; element.width--;
+ } else try {
+ var n = document.createTextNode(' ');
+ element.appendChild(n);
+ element.removeChild(n);
+ } catch (e) { }
+
+ return element;
+ };
+
+ Element.Methods.cumulativeOffset = function(element) {
+ var valueT = 0, valueL = 0;
+ do {
+ valueT += element.offsetTop || 0;
+ valueL += element.offsetLeft || 0;
+ if (element.offsetParent == document.body)
+ if (Element.getStyle(element, 'position') == 'absolute') break;
+
+ element = element.offsetParent;
+ } while (element);
+
+ return Element._returnOffset(valueL, valueT);
+ };
+}
+
+if ('outerHTML' in document.documentElement) {
+ Element.Methods.replace = function(element, content) {
+ element = $(element);
+
+ if (content && content.toElement) content = content.toElement();
+ if (Object.isElement(content)) {
+ element.parentNode.replaceChild(content, element);
+ return element;
+ }
+
+ content = Object.toHTML(content);
+ var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
+
+ if (Element._insertionTranslations.tags[tagName]) {
+ var nextSibling = element.next();
+ var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
+ parent.removeChild(element);
+ if (nextSibling)
+ fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
+ else
+ fragments.each(function(node) { parent.appendChild(node) });
+ }
+ else element.outerHTML = content.stripScripts();
+
+ content.evalScripts.bind(content).defer();
+ return element;
+ };
+}
+
+Element._returnOffset = function(l, t) {
+ var result = [l, t];
+ result.left = l;
+ result.top = t;
+ return result;
+};
+
+Element._getContentFromAnonymousElement = function(tagName, html) {
+ var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];
+ if (t) {
+ div.innerHTML = t[0] + html + t[1];
+ t[2].times(function() { div = div.firstChild });
+ } else div.innerHTML = html;
+ return $A(div.childNodes);
+};
+
+Element._insertionTranslations = {
+ before: function(element, node) {
+ element.parentNode.insertBefore(node, element);
+ },
+ top: function(element, node) {
+ element.insertBefore(node, element.firstChild);
+ },
+ bottom: function(element, node) {
+ element.appendChild(node);
+ },
+ after: function(element, node) {
+ element.parentNode.insertBefore(node, element.nextSibling);
+ },
+ tags: {
+ TABLE: ['<table>', '</table>', 1],
+ TBODY: ['<table><tbody>', '</tbody></table>', 2],
+ TR: ['<table><tbody><tr>', '</tr></tbody></table>', 3],
+ TD: ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],
+ SELECT: ['<select>', '</select>', 1]
+ }
+};
+
+(function() {
+ var tags = Element._insertionTranslations.tags;
+ Object.extend(tags, {
+ THEAD: tags.TBODY,
+ TFOOT: tags.TBODY,
+ TH: tags.TD
+ });
+})();
+
+Element.Methods.Simulated = {
+ hasAttribute: function(element, attribute) {
+ attribute = Element._attributeTranslations.has[attribute] || attribute;
+ var node = $(element).getAttributeNode(attribute);
+ return !!(node && node.specified);
+ }
+};
+
+Element.Methods.ByTag = { };
+
+Object.extend(Element, Element.Methods);
+
+(function(div) {
+
+ if (!Prototype.BrowserFeatures.ElementExtensions && div['__proto__']) {
+ window.HTMLElement = { };
+ window.HTMLElement.prototype = div['__proto__'];
+ Prototype.BrowserFeatures.ElementExtensions = true;
+ }
+
+ div = null;
+
+})(document.createElement('div'))
+
+Element.extend = (function() {
+
+ function checkDeficiency(tagName) {
+ if (typeof window.Element != 'undefined') {
+ var proto = window.Element.prototype;
+ if (proto) {
+ var id = '_' + (Math.random()+'').slice(2);
+ var el = document.createElement(tagName);
+ proto[id] = 'x';
+ var isBuggy = (el[id] !== 'x');
+ delete proto[id];
+ el = null;
+ return isBuggy;
+ }
+ }
+ return false;
+ }
+
+ function extendElementWith(element, methods) {
+ for (var property in methods) {
+ var value = methods[property];
+ if (Object.isFunction(value) && !(property in element))
+ element[property] = value.methodize();
+ }
+ }
+
+ var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY = checkDeficiency('object');
+
+ if (Prototype.BrowserFeatures.SpecificElementExtensions) {
+ if (HTMLOBJECTELEMENT_PROTOTYPE_BUGGY) {
+ return function(element) {
+ if (element && typeof element._extendedByPrototype == 'undefined') {
+ var t = element.tagName;
+ if (t && (/^(?:object|applet|embed)$/i.test(t))) {
+ extendElementWith(element, Element.Methods);
+ extendElementWith(element, Element.Methods.Simulated);
+ extendElementWith(element, Element.Methods.ByTag[t.toUpperCase()]);
+ }
+ }
+ return element;
+ }
+ }
+ return Prototype.K;
+ }
+
+ var Methods = { }, ByTag = Element.Methods.ByTag;
+
+ var extend = Object.extend(function(element) {
+ if (!element || typeof element._extendedByPrototype != 'undefined' ||
+ element.nodeType != 1 || element == window) return element;
+
+ var methods = Object.clone(Methods),
+ tagName = element.tagName.toUpperCase();
+
+ if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);
+
+ extendElementWith(element, methods);
+
+ element._extendedByPrototype = Prototype.emptyFunction;
+ return element;
+
+ }, {
+ refresh: function() {
+ if (!Prototype.BrowserFeatures.ElementExtensions) {
+ Object.extend(Methods, Element.Methods);
+ Object.extend(Methods, Element.Methods.Simulated);
+ }
+ }
+ });
+
+ extend.refresh();
+ return extend;
+})();
+
+Element.hasAttribute = function(element, attribute) {
+ if (element.hasAttribute) return element.hasAttribute(attribute);
+ return Element.Methods.Simulated.hasAttribute(element, attribute);
+};
+
+Element.addMethods = function(methods) {
+ var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
+
+ if (!methods) {
+ Object.extend(Form, Form.Methods);
+ Object.extend(Form.Element, Form.Element.Methods);
+ Object.extend(Element.Methods.ByTag, {
+ "FORM": Object.clone(Form.Methods),
+ "INPUT": Object.clone(Form.Element.Methods),
+ "SELECT": Object.clone(Form.Element.Methods),
+ "TEXTAREA": Object.clone(Form.Element.Methods)
+ });
+ }
+
+ if (arguments.length == 2) {
+ var tagName = methods;
+ methods = arguments[1];
+ }
+
+ if (!tagName) Object.extend(Element.Methods, methods || { });
+ else {
+ if (Object.isArray(tagName)) tagName.each(extend);
+ else extend(tagName);
+ }
+
+ function extend(tagName) {
+ tagName = tagName.toUpperCase();
+ if (!Element.Methods.ByTag[tagName])
+ Element.Methods.ByTag[tagName] = { };
+ Object.extend(Element.Methods.ByTag[tagName], methods);
+ }
+
+ function copy(methods, destination, onlyIfAbsent) {
+ onlyIfAbsent = onlyIfAbsent || false;
+ for (var property in methods) {
+ var value = methods[property];
+ if (!Object.isFunction(value)) continue;
+ if (!onlyIfAbsent || !(property in destination))
+ destination[property] = value.methodize();
+ }
+ }
+
+ function findDOMClass(tagName) {
+ var klass;
+ var trans = {
+ "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
+ "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
+ "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
+ "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
+ "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
+ "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
+ "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
+ "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
+ "FrameSet", "IFRAME": "IFrame"
+ };
+ if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
+ if (window[klass]) return window[klass];
+ klass = 'HTML' + tagName + 'Element';
+ if (window[klass]) return window[klass];
+ klass = 'HTML' + tagName.capitalize() + 'Element';
+ if (window[klass]) return window[klass];
+
+ var element = document.createElement(tagName);
+ var proto = element['__proto__'] || element.constructor.prototype;
+ element = null;
+ return proto;
+ }
+
+ var elementPrototype = window.HTMLElement ? HTMLElement.prototype :
+ Element.prototype;
+
+ if (F.ElementExtensions) {
+ copy(Element.Methods, elementPrototype);
+ copy(Element.Methods.Simulated, elementPrototype, true);
+ }
+
+ if (F.SpecificElementExtensions) {
+ for (var tag in Element.Methods.ByTag) {
+ var klass = findDOMClass(tag);
+ if (Object.isUndefined(klass)) continue;
+ copy(T[tag], klass.prototype);
+ }
+ }
+
+ Object.extend(Element, Element.Methods);
+ delete Element.ByTag;
+
+ if (Element.extend.refresh) Element.extend.refresh();
+ Element.cache = { };
+};
+
+
+document.viewport = {
+
+ getDimensions: function() {
+ return { width: this.getWidth(), height: this.getHeight() };
+ },
+
+ getScrollOffsets: function() {
+ return Element._returnOffset(
+ window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
+ window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);
+ }
+};
+
+(function(viewport) {
+ var B = Prototype.Browser, doc = document, element, property = {};
+
+ function getRootElement() {
+ if (B.WebKit && !doc.evaluate)
+ return document;
+
+ if (B.Opera && window.parseFloat(window.opera.version()) < 9.5)
+ return document.body;
+
+ return document.documentElement;
+ }
+
+ function define(D) {
+ if (!element) element = getRootElement();
+
+ property[D] = 'client' + D;
+
+ viewport['get' + D] = function() { return element[property[D]] };
+ return viewport['get' + D]();
+ }
+
+ viewport.getWidth = define.curry('Width');
+
+ viewport.getHeight = define.curry('Height');
+})(document.viewport);
+
+
+Element.Storage = {
+ UID: 1
+};
+
+Element.addMethods({
+ getStorage: function(element) {
+ if (!(element = $(element))) return;
+
+ var uid;
+ if (element === window) {
+ uid = 0;
+ } else {
+ if (typeof element._prototypeUID === "undefined")
+ element._prototypeUID = [Element.Storage.UID++];
+ uid = element._prototypeUID[0];
+ }
+
+ if (!Element.Storage[uid])
+ Element.Storage[uid] = $H();
+
+ return Element.Storage[uid];
+ },
+
+ store: function(element, key, value) {
+ if (!(element = $(element))) return;
+
+ if (arguments.length === 2) {
+ Element.getStorage(element).update(key);
+ } else {
+ Element.getStorage(element).set(key, value);
+ }
+
+ return element;
+ },
+
+ retrieve: function(element, key, defaultValue) {
+ if (!(element = $(element))) return;
+ var hash = Element.getStorage(element), value = hash.get(key);
+
+ if (Object.isUndefined(value)) {
+ hash.set(key, defaultValue);
+ value = defaultValue;
+ }
+
+ return value;
+ },
+
+ clone: function(element, deep) {
+ if (!(element = $(element))) return;
+ var clone = element.cloneNode(deep);
+ clone._prototypeUID = void 0;
+ if (deep) {
+ var descendants = Element.select(clone, '*'),
+ i = descendants.length;
+ while (i--) {
+ descendants[i]._prototypeUID = void 0;
+ }
+ }
+ return Element.extend(clone);
+ }
+});
+/* Portions of the Selector class are derived from Jack Slocum's DomQuery,
+ * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
+ * license. Please see http://www.yui-ext.com/ for more information. */
+
+var Selector = Class.create({
+ initialize: function(expression) {
+ this.expression = expression.strip();
+
+ if (this.shouldUseSelectorsAPI()) {
+ this.mode = 'selectorsAPI';
+ } else if (this.shouldUseXPath()) {
+ this.mode = 'xpath';
+ this.compileXPathMatcher();
+ } else {
+ this.mode = "normal";
+ this.compileMatcher();
+ }
+
+ },
+
+ shouldUseXPath: (function() {
+
+ var IS_DESCENDANT_SELECTOR_BUGGY = (function(){
+ var isBuggy = false;
+ if (document.evaluate && window.XPathResult) {
+ var el = document.createElement('div');
+ el.innerHTML = '<ul><li></li></ul><div><ul><li></li></ul></div>';
+
+ var xpath = ".//*[local-name()='ul' or local-name()='UL']" +
+ "//*[local-name()='li' or local-name()='LI']";
+
+ var result = document.evaluate(xpath, el, null,
+ XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+
+ isBuggy = (result.snapshotLength !== 2);
+ el = null;
+ }
+ return isBuggy;
+ })();
+
+ return function() {
+ if (!Prototype.BrowserFeatures.XPath) return false;
+
+ var e = this.expression;
+
+ if (Prototype.Browser.WebKit &&
+ (e.include("-of-type") || e.include(":empty")))
+ return false;
+
+ if ((/(\[[\w-]*?:|:checked)/).test(e))
+ return false;
+
+ if (IS_DESCENDANT_SELECTOR_BUGGY) return false;
+
+ return true;
+ }
+
+ })(),
+
+ shouldUseSelectorsAPI: function() {
+ if (!Prototype.BrowserFeatures.SelectorsAPI) return false;
+
+ if (Selector.CASE_INSENSITIVE_CLASS_NAMES) return false;
+
+ if (!Selector._div) Selector._div = new Element('div');
+
+ try {
+ Selector._div.querySelector(this.expression);
+ } catch(e) {
+ return false;
+ }
+
+ return true;
+ },
+
+ compileMatcher: function() {
+ var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
+ c = Selector.criteria, le, p, m, len = ps.length, name;
+
+ if (Selector._cache[e]) {
+ this.matcher = Selector._cache[e];
+ return;
+ }
+
+ this.matcher = ["this.matcher = function(root) {",
+ "var r = root, h = Selector.handlers, c = false, n;"];
+
+ while (e && le != e && (/\S/).test(e)) {
+ le = e;
+ for (var i = 0; i<len; i++) {
+ p = ps[i].re;
+ name = ps[i].name;
+ if (m = e.match(p)) {
+ this.matcher.push(Object.isFunction(c[name]) ? c[name](m) :
+ new Template(c[name]).evaluate(m));
+ e = e.replace(m[0], '');
+ break;
+ }
+ }
+ }
+
+ this.matcher.push("return h.unique(n);\n}");
+ eval(this.matcher.join('\n'));
+ Selector._cache[this.expression] = this.matcher;
+ },
+
+ compileXPathMatcher: function() {
+ var e = this.expression, ps = Selector.patterns,
+ x = Selector.xpath, le, m, len = ps.length, name;
+
+ if (Selector._cache[e]) {
+ this.xpath = Selector._cache[e]; return;
+ }
+
+ this.matcher = ['.//*'];
+ while (e && le != e && (/\S/).test(e)) {
+ le = e;
+ for (var i = 0; i<len; i++) {
+ name = ps[i].name;
+ if (m = e.match(ps[i].re)) {
+ this.matcher.push(Object.isFunction(x[name]) ? x[name](m) :
+ new Template(x[name]).evaluate(m));
+ e = e.replace(m[0], '');
+ break;
+ }
+ }
+ }
+
+ this.xpath = this.matcher.join('');
+ Selector._cache[this.expression] = this.xpath;
+ },
+
+ findElements: function(root) {
+ root = root || document;
+ var e = this.expression, results;
+
+ switch (this.mode) {
+ case 'selectorsAPI':
+ if (root !== document) {
+ var oldId = root.id, id = $(root).identify();
+ id = id.replace(/([\.:])/g, "\\$1");
+ e = "#" + id + " " + e;
+ }
+
+ results = $A(root.querySelectorAll(e)).map(Element.extend);
+ root.id = oldId;
+
+ return results;
+ case 'xpath':
+ return document._getElementsByXPath(this.xpath, root);
+ default:
+ return this.matcher(root);
+ }
+ },
+
+ match: function(element) {
+ this.tokens = [];
+
+ var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
+ var le, p, m, len = ps.length, name;
+
+ while (e && le !== e && (/\S/).test(e)) {
+ le = e;
+ for (var i = 0; i<len; i++) {
+ p = ps[i].re;
+ name = ps[i].name;
+ if (m = e.match(p)) {
+ if (as[name]) {
+ this.tokens.push([name, Object.clone(m)]);
+ e = e.replace(m[0], '');
+ } else {
+ return this.findElements(document).include(element);
+ }
+ }
+ }
+ }
+
+ var match = true, name, matches;
+ for (var i = 0, token; token = this.tokens[i]; i++) {
+ name = token[0], matches = token[1];
+ if (!Selector.assertions[name](element, matches)) {
+ match = false; break;
+ }
+ }
+
+ return match;
+ },
+
+ toString: function() {
+ return this.expression;
+ },
+
+ inspect: function() {
+ return "#<Selector:" + this.expression.inspect() + ">";
+ }
+});
+
+if (Prototype.BrowserFeatures.SelectorsAPI &&
+ document.compatMode === 'BackCompat') {
+ Selector.CASE_INSENSITIVE_CLASS_NAMES = (function(){
+ var div = document.createElement('div'),
+ span = document.createElement('span');
+
+ div.id = "prototype_test_id";
+ span.className = 'Test';
+ div.appendChild(span);
+ var isIgnored = (div.querySelector('#prototype_test_id .test') !== null);
+ div = span = null;
+ return isIgnored;
+ })();
+}
+
+Object.extend(Selector, {
+ _cache: { },
+
+ xpath: {
+ descendant: "//*",
+ child: "/*",
+ adjacent: "/following-sibling::*[1]",
+ laterSibling: '/following-sibling::*',
+ tagName: function(m) {
+ if (m[1] == '*') return '';
+ return "[local-name()='" + m[1].toLowerCase() +
+ "' or local-name()='" + m[1].toUpperCase() + "']";
+ },
+ className: "[contains(concat(' ', @class, ' '), ' #{1} ')]",
+ id: "[@id='#{1}']",
+ attrPresence: function(m) {
+ m[1] = m[1].toLowerCase();
+ return new Template("[@#{1}]").evaluate(m);
+ },
+ attr: function(m) {
+ m[1] = m[1].toLowerCase();
+ m[3] = m[5] || m[6];
+ return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
+ },
+ pseudo: function(m) {
+ var h = Selector.xpath.pseudos[m[1]];
+ if (!h) return '';
+ if (Object.isFunction(h)) return h(m);
+ return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
+ },
+ operators: {
+ '=': "[@#{1}='#{3}']",
+ '!=': "[@#{1}!='#{3}']",
+ '^=': "[starts-with(@#{1}, '#{3}')]",
+ '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",
+ '*=': "[contains(@#{1}, '#{3}')]",
+ '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
+ '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
+ },
+ pseudos: {
+ 'first-child': '[not(preceding-sibling::*)]',
+ 'last-child': '[not(following-sibling::*)]',
+ 'only-child': '[not(preceding-sibling::* or following-sibling::*)]',
+ 'empty': "[count(*) = 0 and (count(text()) = 0)]",
+ 'checked': "[@checked]",
+ 'disabled': "[(@disabled) and (@type!='hidden')]",
+ 'enabled': "[not(@disabled) and (@type!='hidden')]",
+ 'not': function(m) {
+ var e = m[6], p = Selector.patterns,
+ x = Selector.xpath, le, v, len = p.length, name;
+
+ var exclusion = [];
+ while (e && le != e && (/\S/).test(e)) {
+ le = e;
+ for (var i = 0; i<len; i++) {
+ name = p[i].name
+ if (m = e.match(p[i].re)) {
+ v = Object.isFunction(x[name]) ? x[name](m) : new Template(x[name]).evaluate(m);
+ exclusion.push("(" + v.substring(1, v.length - 1) + ")");
+ e = e.replace(m[0], '');
+ break;
+ }
+ }
+ }
+ return "[not(" + exclusion.join(" and ") + ")]";
+ },
+ 'nth-child': function(m) {
+ return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
+ },
+ 'nth-last-child': function(m) {
+ return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
+ },
+ 'nth-of-type': function(m) {
+ return Selector.xpath.pseudos.nth("position() ", m);
+ },
+ 'nth-last-of-type': function(m) {
+ return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);
+ },
+ 'first-of-type': function(m) {
+ m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m);
+ },
+ 'last-of-type': function(m) {
+ m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m);
+ },
+ 'only-of-type': function(m) {
+ var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);
+ },
+ nth: function(fragment, m) {
+ var mm, formula = m[6], predicate;
+ if (formula == 'even') formula = '2n+0';
+ if (formula == 'odd') formula = '2n+1';
+ if (mm = formula.match(/^(\d+)$/)) // digit only
+ return '[' + fragment + "= " + mm[1] + ']';
+ if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
+ if (mm[1] == "-") mm[1] = -1;
+ var a = mm[1] ? Number(mm[1]) : 1;
+ var b = mm[2] ? Number(mm[2]) : 0;
+ predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +
+ "((#{fragment} - #{b}) div #{a} >= 0)]";
+ return new Template(predicate).evaluate({
+ fragment: fragment, a: a, b: b });
+ }
+ }
+ }
+ },
+
+ criteria: {
+ tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;',
+ className: 'n = h.className(n, r, "#{1}", c); c = false;',
+ id: 'n = h.id(n, r, "#{1}", c); c = false;',
+ attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;',
+ attr: function(m) {
+ m[3] = (m[5] || m[6]);
+ return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m);
+ },
+ pseudo: function(m) {
+ if (m[6]) m[6] = m[6].replace(/"/g, '\\"');
+ return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);
+ },
+ descendant: 'c = "descendant";',
+ child: 'c = "child";',
+ adjacent: 'c = "adjacent";',
+ laterSibling: 'c = "laterSibling";'
+ },
+
+ patterns: [
+ { name: 'laterSibling', re: /^\s*~\s*/ },
+ { name: 'child', re: /^\s*>\s*/ },
+ { name: 'adjacent', re: /^\s*\+\s*/ },
+ { name: 'descendant', re: /^\s/ },
+
+ { name: 'tagName', re: /^\s*(\*|[\w\-]+)(\b|$)?/ },
+ { name: 'id', re: /^#([\w\-\*]+)(\b|$)/ },
+ { name: 'className', re: /^\.([\w\-\*]+)(\b|$)/ },
+ { name: 'pseudo', re: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/ },
+ { name: 'attrPresence', re: /^\[((?:[\w-]+:)?[\w-]+)\]/ },
+ { name: 'attr', re: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/ }
+ ],
+
+ assertions: {
+ tagName: function(element, matches) {
+ return matches[1].toUpperCase() == element.tagName.toUpperCase();
+ },
+
+ className: function(element, matches) {
+ return Element.hasClassName(element, matches[1]);
+ },
+
+ id: function(element, matches) {
+ return element.id === matches[1];
+ },
+
+ attrPresence: function(element, matches) {
+ return Element.hasAttribute(element, matches[1]);
+ },
+
+ attr: function(element, matches) {
+ var nodeValue = Element.readAttribute(element, matches[1]);
+ return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]);
+ }
+ },
+
+ handlers: {
+ concat: function(a, b) {
+ for (var i = 0, node; node = b[i]; i++)
+ a.push(node);
+ return a;
+ },
+
+ mark: function(nodes) {
+ var _true = Prototype.emptyFunction;
+ for (var i = 0, node; node = nodes[i]; i++)
+ node._countedByPrototype = _true;
+ return nodes;
+ },
+
+ unmark: (function(){
+
+ var PROPERTIES_ATTRIBUTES_MAP = (function(){
+ var el = document.createElement('div'),
+ isBuggy = false,
+ propName = '_countedByPrototype',
+ value = 'x'
+ el[propName] = value;
+ isBuggy = (el.getAttribute(propName) === value);
+ el = null;
+ return isBuggy;
+ })();
+
+ return PROPERTIES_ATTRIBUTES_MAP ?
+ function(nodes) {
+ for (var i = 0, node; node = nodes[i]; i++)
+ node.removeAttribute('_countedByPrototype');
+ return nodes;
+ } :
+ function(nodes) {
+ for (var i = 0, node; node = nodes[i]; i++)
+ node._countedByPrototype = void 0;
+ return nodes;
+ }
+ })(),
+
+ index: function(parentNode, reverse, ofType) {
+ parentNode._countedByPrototype = Prototype.emptyFunction;
+ if (reverse) {
+ for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
+ var node = nodes[i];
+ if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
+ }
+ } else {
+ for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
+ if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
+ }
+ },
+
+ unique: function(nodes) {
+ if (nodes.length == 0) return nodes;
+ var results = [], n;
+ for (var i = 0, l = nodes.length; i < l; i++)
+ if (typeof (n = nodes[i])._countedByPrototype == 'undefined') {
+ n._countedByPrototype = Prototype.emptyFunction;
+ results.push(Element.extend(n));
+ }
+ return Selector.handlers.unmark(results);
+ },
+
+ descendant: function(nodes) {
+ var h = Selector.handlers;
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
+ h.concat(results, node.getElementsByTagName('*'));
+ return results;
+ },
+
+ child: function(nodes) {
+ var h = Selector.handlers;
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
+ for (var j = 0, child; child = node.childNodes[j]; j++)
+ if (child.nodeType == 1 && child.tagName != '!') results.push(child);
+ }
+ return results;
+ },
+
+ adjacent: function(nodes) {
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
+ var next = this.nextElementSibling(node);
+ if (next) results.push(next);
+ }
+ return results;
+ },
+
+ laterSibling: function(nodes) {
+ var h = Selector.handlers;
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
+ h.concat(results, Element.nextSiblings(node));
+ return results;
+ },
+
+ nextElementSibling: function(node) {
+ while (node = node.nextSibling)
+ if (node.nodeType == 1) return node;
+ return null;
+ },
+
+ previousElementSibling: function(node) {
+ while (node = node.previousSibling)
+ if (node.nodeType == 1) return node;
+ return null;
+ },
+
+ tagName: function(nodes, root, tagName, combinator) {
+ var uTagName = tagName.toUpperCase();
+ var results = [], h = Selector.handlers;
+ if (nodes) {
+ if (combinator) {
+ if (combinator == "descendant") {
+ for (var i = 0, node; node = nodes[i]; i++)
+ h.concat(results, node.getElementsByTagName(tagName));
+ return results;
+ } else nodes = this[combinator](nodes);
+ if (tagName == "*") return nodes;
+ }
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (node.tagName.toUpperCase() === uTagName) results.push(node);
+ return results;
+ } else return root.getElementsByTagName(tagName);
+ },
+
+ id: function(nodes, root, id, combinator) {
+ var targetNode = $(id), h = Selector.handlers;
+
+ if (root == document) {
+ if (!targetNode) return [];
+ if (!nodes) return [targetNode];
+ } else {
+ if (!root.sourceIndex || root.sourceIndex < 1) {
+ var nodes = root.getElementsByTagName('*');
+ for (var j = 0, node; node = nodes[j]; j++) {
+ if (node.id === id) return [node];
+ }
+ }
+ }
+
+ if (nodes) {
+ if (combinator) {
+ if (combinator == 'child') {
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (targetNode.parentNode == node) return [targetNode];
+ } else if (combinator == 'descendant') {
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (Element.descendantOf(targetNode, node)) return [targetNode];
+ } else if (combinator == 'adjacent') {
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (Selector.handlers.previousElementSibling(targetNode) == node)
+ return [targetNode];
+ } else nodes = h[combinator](nodes);
+ }
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (node == targetNode) return [targetNode];
+ return [];
+ }
+ return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
+ },
+
+ className: function(nodes, root, className, combinator) {
+ if (nodes && combinator) nodes = this[combinator](nodes);
+ return Selector.handlers.byClassName(nodes, root, className);
+ },
+
+ byClassName: function(nodes, root, className) {
+ if (!nodes) nodes = Selector.handlers.descendant([root]);
+ var needle = ' ' + className + ' ';
+ for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {
+ nodeClassName = node.className;
+ if (nodeClassName.length == 0) continue;
+ if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))
+ results.push(node);
+ }
+ return results;
+ },
+
+ attrPresence: function(nodes, root, attr, combinator) {
+ if (!nodes) nodes = root.getElementsByTagName("*");
+ if (nodes && combinator) nodes = this[combinator](nodes);
+ var results = [];
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (Element.hasAttribute(node, attr)) results.push(node);
+ return results;
+ },
+
+ attr: function(nodes, root, attr, value, operator, combinator) {
+ if (!nodes) nodes = root.getElementsByTagName("*");
+ if (nodes && combinator) nodes = this[combinator](nodes);
+ var handler = Selector.operators[operator], results = [];
+ for (var i = 0, node; node = nodes[i]; i++) {
+ var nodeValue = Element.readAttribute(node, attr);
+ if (nodeValue === null) continue;
+ if (handler(nodeValue, value)) results.push(node);
+ }
+ return results;
+ },
+
+ pseudo: function(nodes, name, value, root, combinator) {
+ if (nodes && combinator) nodes = this[combinator](nodes);
+ if (!nodes) nodes = root.getElementsByTagName("*");
+ return Selector.pseudos[name](nodes, value, root);
+ }
+ },
+
+ pseudos: {
+ 'first-child': function(nodes, value, root) {
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
+ if (Selector.handlers.previousElementSibling(node)) continue;
+ results.push(node);
+ }
+ return results;
+ },
+ 'last-child': function(nodes, value, root) {
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
+ if (Selector.handlers.nextElementSibling(node)) continue;
+ results.push(node);
+ }
+ return results;
+ },
+ 'only-child': function(nodes, value, root) {
+ var h = Selector.handlers;
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
+ if (!h.previousElementSibling(node) && !h.nextElementSibling(node))
+ results.push(node);
+ return results;
+ },
+ 'nth-child': function(nodes, formula, root) {
+ return Selector.pseudos.nth(nodes, formula, root);
+ },
+ 'nth-last-child': function(nodes, formula, root) {
+ return Selector.pseudos.nth(nodes, formula, root, true);
+ },
+ 'nth-of-type': function(nodes, formula, root) {
+ return Selector.pseudos.nth(nodes, formula, root, false, true);
+ },
+ 'nth-last-of-type': function(nodes, formula, root) {
+ return Selector.pseudos.nth(nodes, formula, root, true, true);
+ },
+ 'first-of-type': function(nodes, formula, root) {
+ return Selector.pseudos.nth(nodes, "1", root, false, true);
+ },
+ 'last-of-type': function(nodes, formula, root) {
+ return Selector.pseudos.nth(nodes, "1", root, true, true);
+ },
+ 'only-of-type': function(nodes, formula, root) {
+ var p = Selector.pseudos;
+ return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
+ },
+
+ getIndices: function(a, b, total) {
+ if (a == 0) return b > 0 ? [b] : [];
+ return $R(1, total).inject([], function(memo, i) {
+ if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);
+ return memo;
+ });
+ },
+
+ nth: function(nodes, formula, root, reverse, ofType) {
+ if (nodes.length == 0) return [];
+ if (formula == 'even') formula = '2n+0';
+ if (formula == 'odd') formula = '2n+1';
+ var h = Selector.handlers, results = [], indexed = [], m;
+ h.mark(nodes);
+ for (var i = 0, node; node = nodes[i]; i++) {
+ if (!node.parentNode._countedByPrototype) {
+ h.index(node.parentNode, reverse, ofType);
+ indexed.push(node.parentNode);
+ }
+ }
+ if (formula.match(/^\d+$/)) { // just a number
+ formula = Number(formula);
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (node.nodeIndex == formula) results.push(node);
+ } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
+ if (m[1] == "-") m[1] = -1;
+ var a = m[1] ? Number(m[1]) : 1;
+ var b = m[2] ? Number(m[2]) : 0;
+ var indices = Selector.pseudos.getIndices(a, b, nodes.length);
+ for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {
+ for (var j = 0; j < l; j++)
+ if (node.nodeIndex == indices[j]) results.push(node);
+ }
+ }
+ h.unmark(nodes);
+ h.unmark(indexed);
+ return results;
+ },
+
+ 'empty': function(nodes, value, root) {
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
+ if (node.tagName == '!' || node.firstChild) continue;
+ results.push(node);
+ }
+ return results;
+ },
+
+ 'not': function(nodes, selector, root) {
+ var h = Selector.handlers, selectorType, m;
+ var exclusions = new Selector(selector).findElements(root);
+ h.mark(exclusions);
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
+ if (!node._countedByPrototype) results.push(node);
+ h.unmark(exclusions);
+ return results;
+ },
+
+ 'enabled': function(nodes, value, root) {
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
+ if (!node.disabled && (!node.type || node.type !== 'hidden'))
+ results.push(node);
+ return results;
+ },
+
+ 'disabled': function(nodes, value, root) {
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
+ if (node.disabled) results.push(node);
+ return results;
+ },
+
+ 'checked': function(nodes, value, root) {
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
+ if (node.checked) results.push(node);
+ return results;
+ }
+ },
+
+ operators: {
+ '=': function(nv, v) { return nv == v; },
+ '!=': function(nv, v) { return nv != v; },
+ '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); },
+ '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); },
+ '*=': function(nv, v) { return nv == v || nv && nv.include(v); },
+ '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
+ '|=': function(nv, v) { return ('-' + (nv || "").toUpperCase() +
+ '-').include('-' + (v || "").toUpperCase() + '-'); }
+ },
+
+ split: function(expression) {
+ var expressions = [];
+ expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
+ expressions.push(m[1].strip());
+ });
+ return expressions;
+ },
+
+ matchElements: function(elements, expression) {
+ var matches = $$(expression), h = Selector.handlers;
+ h.mark(matches);
+ for (var i = 0, results = [], element; element = elements[i]; i++)
+ if (element._countedByPrototype) results.push(element);
+ h.unmark(matches);
+ return results;
+ },
+
+ findElement: function(elements, expression, index) {
+ if (Object.isNumber(expression)) {
+ index = expression; expression = false;
+ }
+ return Selector.matchElements(elements, expression || '*')[index || 0];
+ },
+
+ findChildElements: function(element, expressions) {
+ expressions = Selector.split(expressions.join(','));
+ var results = [], h = Selector.handlers;
+ for (var i = 0, l = expressions.length, selector; i < l; i++) {
+ selector = new Selector(expressions[i].strip());
+ h.concat(results, selector.findElements(element));
+ }
+ return (l > 1) ? h.unique(results) : results;
+ }
+});
+
+if (Prototype.Browser.IE) {
+ Object.extend(Selector.handlers, {
+ concat: function(a, b) {
+ for (var i = 0, node; node = b[i]; i++)
+ if (node.tagName !== "!") a.push(node);
+ return a;
+ }
+ });
+}
+
+function $$() {
+ return Selector.findChildElements(document, $A(arguments));
+}
+
+var Form = {
+ reset: function(form) {
+ form = $(form);
+ form.reset();
+ return form;
+ },
+
+ serializeElements: function(elements, options) {
+ if (typeof options != 'object') options = { hash: !!options };
+ else if (Object.isUndefined(options.hash)) options.hash = true;
+ var key, value, submitted = false, submit = options.submit;
+
+ var data = elements.inject({ }, function(result, element) {
+ if (!element.disabled && element.name) {
+ key = element.name; value = $(element).getValue();
+ if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
+ submit !== false && (!submit || key == submit) && (submitted = true)))) {
+ if (key in result) {
+ if (!Object.isArray(result[key])) result[key] = [result[key]];
+ result[key].push(value);
+ }
+ else result[key] = value;
+ }
+ }
+ return result;
+ });
+
+ return options.hash ? data : Object.toQueryString(data);
+ }
+};
+
+Form.Methods = {
+ serialize: function(form, options) {
+ return Form.serializeElements(Form.getElements(form), options);
+ },
+
+ getElements: function(form) {
+ var elements = $(form).getElementsByTagName('*'),
+ element,
+ arr = [ ],
+ serializers = Form.Element.Serializers;
+ for (var i = 0; element = elements[i]; i++) {
+ arr.push(element);
+ }
+ return arr.inject([], function(elements, child) {
+ if (serializers[child.tagName.toLowerCase()])
+ elements.push(Element.extend(child));
+ return elements;
+ })
+ },
+
+ getInputs: function(form, typeName, name) {
+ form = $(form);
+ var inputs = form.getElementsByTagName('input');
+
+ if (!typeName && !name) return $A(inputs).map(Element.extend);
+
+ for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
+ var input = inputs[i];
+ if ((typeName && input.type != typeName) || (name && input.name != name))
+ continue;
+ matchingInputs.push(Element.extend(input));
+ }
+
+ return matchingInputs;
+ },
+
+ disable: function(form) {
+ form = $(form);
+ Form.getElements(form).invoke('disable');
+ return form;
+ },
+
+ enable: function(form) {
+ form = $(form);
+ Form.getElements(form).invoke('enable');
+ return form;
+ },
+
+ findFirstElement: function(form) {
+ var elements = $(form).getElements().findAll(function(element) {
+ return 'hidden' != element.type && !element.disabled;
+ });
+ var firstByIndex = elements.findAll(function(element) {
+ return element.hasAttribute('tabIndex') && element.tabIndex >= 0;
+ }).sortBy(function(element) { return element.tabIndex }).first();
+
+ return firstByIndex ? firstByIndex : elements.find(function(element) {
+ return /^(?:input|select|textarea)$/i.test(element.tagName);
+ });
+ },
+
+ focusFirstElement: function(form) {
+ form = $(form);
+ form.findFirstElement().activate();
+ return form;
+ },
+
+ request: function(form, options) {
+ form = $(form), options = Object.clone(options || { });
+
+ var params = options.parameters, action = form.readAttribute('action') || '';
+ if (action.blank()) action = window.location.href;
+ options.parameters = form.serialize(true);
+
+ if (params) {
+ if (Object.isString(params)) params = params.toQueryParams();
+ Object.extend(options.parameters, params);
+ }
+
+ if (form.hasAttribute('method') && !options.method)
+ options.method = form.method;
+
+ return new Ajax.Request(action, options);
+ }
+};
+
+/*--------------------------------------------------------------------------*/
+
+
+Form.Element = {
+ focus: function(element) {
+ $(element).focus();
+ return element;
+ },
+
+ select: function(element) {
+ $(element).select();
+ return element;
+ }
+};
+
+Form.Element.Methods = {
+
+ serialize: function(element) {
+ element = $(element);
+ if (!element.disabled && element.name) {
+ var value = element.getValue();
+ if (value != undefined) {
+ var pair = { };
+ pair[element.name] = value;
+ return Object.toQueryString(pair);
+ }
+ }
+ return '';
+ },
+
+ getValue: function(element) {
+ element = $(element);
+ var method = element.tagName.toLowerCase();
+ return Form.Element.Serializers[method](element);
+ },
+
+ setValue: function(element, value) {
+ element = $(element);
+ var method = element.tagName.toLowerCase();
+ Form.Element.Serializers[method](element, value);
+ return element;
+ },
+
+ clear: function(element) {
+ $(element).value = '';
+ return element;
+ },
+
+ present: function(element) {
+ return $(element).value != '';
+ },
+
+ activate: function(element) {
+ element = $(element);
+ try {
+ element.focus();
+ if (element.select && (element.tagName.toLowerCase() != 'input' ||
+ !(/^(?:button|reset|submit)$/i.test(element.type))))
+ element.select();
+ } catch (e) { }
+ return element;
+ },
+
+ disable: function(element) {
+ element = $(element);
+ element.disabled = true;
+ return element;
+ },
+
+ enable: function(element) {
+ element = $(element);
+ element.disabled = false;
+ return element;
+ }
+};
+
+/*--------------------------------------------------------------------------*/
+
+var Field = Form.Element;
+
+var $F = Form.Element.Methods.getValue;
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element.Serializers = {
+ input: function(element, value) {
+ switch (element.type.toLowerCase()) {
+ case 'checkbox':
+ case 'radio':
+ return Form.Element.Serializers.inputSelector(element, value);
+ default:
+ return Form.Element.Serializers.textarea(element, value);
+ }
+ },
+
+ inputSelector: function(element, value) {
+ if (Object.isUndefined(value)) return element.checked ? element.value : null;
+ else element.checked = !!value;
+ },
+
+ textarea: function(element, value) {
+ if (Object.isUndefined(value)) return element.value;
+ else element.value = value;
+ },
+
+ select: function(element, value) {
+ if (Object.isUndefined(value))
+ return this[element.type == 'select-one' ?
+ 'selectOne' : 'selectMany'](element);
+ else {
+ var opt, currentValue, single = !Object.isArray(value);
+ for (var i = 0, length = element.length; i < length; i++) {
+ opt = element.options[i];
+ currentValue = this.optionValue(opt);
+ if (single) {
+ if (currentValue == value) {
+ opt.selected = true;
+ return;
+ }
+ }
+ else opt.selected = value.include(currentValue);
+ }
+ }
+ },
+
+ selectOne: function(element) {
+ var index = element.selectedIndex;
+ return index >= 0 ? this.optionValue(element.options[index]) : null;
+ },
+
+ selectMany: function(element) {
+ var values, length = element.length;
+ if (!length) return null;
+
+ for (var i = 0, values = []; i < length; i++) {
+ var opt = element.options[i];
+ if (opt.selected) values.push(this.optionValue(opt));
+ }
+ return values;
+ },
+
+ optionValue: function(opt) {
+ return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
+ }
+};
+
+/*--------------------------------------------------------------------------*/
+
+
+Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
+ initialize: function($super, element, frequency, callback) {
+ $super(callback, frequency);
+ this.element = $(element);
+ this.lastValue = this.getValue();
+ },
+
+ execute: function() {
+ var value = this.getValue();
+ if (Object.isString(this.lastValue) && Object.isString(value) ?
+ this.lastValue != value : String(this.lastValue) != String(value)) {
+ this.callback(this.element, value);
+ this.lastValue = value;
+ }
+ }
+});
+
+Form.Element.Observer = Class.create(Abstract.TimedObserver, {
+ getValue: function() {
+ return Form.Element.getValue(this.element);
+ }
+});
+
+Form.Observer = Class.create(Abstract.TimedObserver, {
+ getValue: function() {
+ return Form.serialize(this.element);
+ }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.EventObserver = Class.create({
+ initialize: function(element, callback) {
+ this.element = $(element);
+ this.callback = callback;
+
+ this.lastValue = this.getValue();
+ if (this.element.tagName.toLowerCase() == 'form')
+ this.registerFormCallbacks();
+ else
+ this.registerCallback(this.element);
+ },
+
+ onElementEvent: function() {
+ var value = this.getValue();
+ if (this.lastValue != value) {
+ this.callback(this.element, value);
+ this.lastValue = value;
+ }
+ },
+
+ registerFormCallbacks: function() {
+ Form.getElements(this.element).each(this.registerCallback, this);
+ },
+
+ registerCallback: function(element) {
+ if (element.type) {
+ switch (element.type.toLowerCase()) {
+ case 'checkbox':
+ case 'radio':
+ Event.observe(element, 'click', this.onElementEvent.bind(this));
+ break;
+ default:
+ Event.observe(element, 'change', this.onElementEvent.bind(this));
+ break;
+ }
+ }
+ }
+});
+
+Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
+ getValue: function() {
+ return Form.Element.getValue(this.element);
+ }
+});
+
+Form.EventObserver = Class.create(Abstract.EventObserver, {
+ getValue: function() {
+ return Form.serialize(this.element);
+ }
+});
+(function() {
+
+ var Event = {
+ KEY_BACKSPACE: 8,
+ KEY_TAB: 9,
+ KEY_RETURN: 13,
+ KEY_ESC: 27,
+ KEY_LEFT: 37,
+ KEY_UP: 38,
+ KEY_RIGHT: 39,
+ KEY_DOWN: 40,
+ KEY_DELETE: 46,
+ KEY_HOME: 36,
+ KEY_END: 35,
+ KEY_PAGEUP: 33,
+ KEY_PAGEDOWN: 34,
+ KEY_INSERT: 45,
+
+ cache: {}
+ };
+
+ var docEl = document.documentElement;
+ var MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED = 'onmouseenter' in docEl
+ && 'onmouseleave' in docEl;
+
+ var _isButton;
+ if (Prototype.Browser.IE) {
+ var buttonMap = { 0: 1, 1: 4, 2: 2 };
+ _isButton = function(event, code) {
+ return event.button === buttonMap[code];
+ };
+ } else if (Prototype.Browser.WebKit) {
+ _isButton = function(event, code) {
+ switch (code) {
+ case 0: return event.which == 1 && !event.metaKey;
+ case 1: return event.which == 1 && event.metaKey;
+ default: return false;
+ }
+ };
+ } else {
+ _isButton = function(event, code) {
+ return event.which ? (event.which === code + 1) : (event.button === code);
+ };
+ }
+
+ function isLeftClick(event) { return _isButton(event, 0) }
+
+ function isMiddleClick(event) { return _isButton(event, 1) }
+
+ function isRightClick(event) { return _isButton(event, 2) }
+
+ function element(event) {
+ event = Event.extend(event);
+
+ var node = event.target, type = event.type,
+ currentTarget = event.currentTarget;
+
+ if (currentTarget && currentTarget.tagName) {
+ if (type === 'load' || type === 'error' ||
+ (type === 'click' && currentTarget.tagName.toLowerCase() === 'input'
+ && currentTarget.type === 'radio'))
+ node = currentTarget;
+ }
+
+ if (node.nodeType == Node.TEXT_NODE)
+ node = node.parentNode;
+
+ return Element.extend(node);
+ }
+
+ function findElement(event, expression) {
+ var element = Event.element(event);
+ if (!expression) return element;
+ var elements = [element].concat(element.ancestors());
+ return Selector.findElement(elements, expression, 0);
+ }
+
+ function pointer(event) {
+ return { x: pointerX(event), y: pointerY(event) };
+ }
+
+ function pointerX(event) {
+ var docElement = document.documentElement,
+ body = document.body || { scrollLeft: 0 };
+
+ return event.pageX || (event.clientX +
+ (docElement.scrollLeft || body.scrollLeft) -
+ (docElement.clientLeft || 0));
+ }
+
+ function pointerY(event) {
+ var docElement = document.documentElement,
+ body = document.body || { scrollTop: 0 };
+
+ return event.pageY || (event.clientY +
+ (docElement.scrollTop || body.scrollTop) -
+ (docElement.clientTop || 0));
+ }
+
+
+ function stop(event) {
+ Event.extend(event);
+ event.preventDefault();
+ event.stopPropagation();
+
+ event.stopped = true;
+ }
+
+ Event.Methods = {
+ isLeftClick: isLeftClick,
+ isMiddleClick: isMiddleClick,
+ isRightClick: isRightClick,
+
+ element: element,
+ findElement: findElement,
+
+ pointer: pointer,
+ pointerX: pointerX,
+ pointerY: pointerY,
+
+ stop: stop
+ };
+
+
+ var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
+ m[name] = Event.Methods[name].methodize();
+ return m;
+ });
+
+ if (Prototype.Browser.IE) {
+ function _relatedTarget(event) {
+ var element;
+ switch (event.type) {
+ case 'mouseover': element = event.fromElement; break;
+ case 'mouseout': element = event.toElement; break;
+ default: return null;
+ }
+ return Element.extend(element);
+ }
+
+ Object.extend(methods, {
+ stopPropagation: function() { this.cancelBubble = true },
+ preventDefault: function() { this.returnValue = false },
+ inspect: function() { return '[object Event]' }
+ });
+
+ Event.extend = function(event, element) {
+ if (!event) return false;
+ if (event._extendedByPrototype) return event;
+
+ event._extendedByPrototype = Prototype.emptyFunction;
+ var pointer = Event.pointer(event);
+
+ Object.extend(event, {
+ target: event.srcElement || element,
+ relatedTarget: _relatedTarget(event),
+ pageX: pointer.x,
+ pageY: pointer.y
+ });
+
+ return Object.extend(event, methods);
+ };
+ } else {
+ Event.prototype = window.Event.prototype || document.createEvent('HTMLEvents').__proto__;
+ Object.extend(Event.prototype, methods);
+ Event.extend = Prototype.K;
+ }
+
+ function _createResponder(element, eventName, handler) {
+ var registry = Element.retrieve(element, 'prototype_event_registry');
+
+ if (Object.isUndefined(registry)) {
+ CACHE.push(element);
+ registry = Element.retrieve(element, 'prototype_event_registry', $H());
+ }
+
+ var respondersForEvent = registry.get(eventName);
+ if (Object.isUndefined(respondersForEvent)) {
+ respondersForEvent = [];
+ registry.set(eventName, respondersForEvent);
+ }
+
+ if (respondersForEvent.pluck('handler').include(handler)) return false;
+
+ var responder;
+ if (eventName.include(":")) {
+ responder = function(event) {
+ if (Object.isUndefined(event.eventName))
+ return false;
+
+ if (event.eventName !== eventName)
+ return false;
+
+ Event.extend(event, element);
+ handler.call(element, event);
+ };
+ } else {
+ if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED &&
+ (eventName === "mouseenter" || eventName === "mouseleave")) {
+ if (eventName === "mouseenter" || eventName === "mouseleave") {
+ responder = function(event) {
+ Event.extend(event, element);
+
+ var parent = event.relatedTarget;
+ while (parent && parent !== element) {
+ try { parent = parent.parentNode; }
+ catch(e) { parent = element; }
+ }
+
+ if (parent === element) return;
+
+ handler.call(element, event);
+ };
+ }
+ } else {
+ responder = function(event) {
+ Event.extend(event, element);
+ handler.call(element, event);
+ };
+ }
+ }
+
+ responder.handler = handler;
+ respondersForEvent.push(responder);
+ return responder;
+ }
+
+ function _destroyCache() {
+ for (var i = 0, length = CACHE.length; i < length; i++) {
+ Event.stopObserving(CACHE[i]);
+ CACHE[i] = null;
+ }
+ }
+
+ var CACHE = [];
+
+ if (Prototype.Browser.IE)
+ window.attachEvent('onunload', _destroyCache);
+
+ if (Prototype.Browser.WebKit)
+ window.addEventListener('unload', Prototype.emptyFunction, false);
+
+
+ var _getDOMEventName = Prototype.K;
+
+ if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED) {
+ _getDOMEventName = function(eventName) {
+ var translations = { mouseenter: "mouseover", mouseleave: "mouseout" };
+ return eventName in translations ? translations[eventName] : eventName;
+ };
+ }
+
+ function observe(element, eventName, handler) {
+ element = $(element);
+
+ var responder = _createResponder(element, eventName, handler);
+
+ if (!responder) return element;
+
+ if (eventName.include(':')) {
+ if (element.addEventListener)
+ element.addEventListener("dataavailable", responder, false);
+ else {
+ element.attachEvent("ondataavailable", responder);
+ element.attachEvent("onfilterchange", responder);
+ }
+ } else {
+ var actualEventName = _getDOMEventName(eventName);
+
+ if (element.addEventListener)
+ element.addEventListener(actualEventName, responder, false);
+ else
+ element.attachEvent("on" + actualEventName, responder);
+ }
+
+ return element;
+ }
+
+ function stopObserving(element, eventName, handler) {
+ element = $(element);
+
+ var registry = Element.retrieve(element, 'prototype_event_registry');
+
+ if (Object.isUndefined(registry)) return element;
+
+ if (eventName && !handler) {
+ var responders = registry.get(eventName);
+
+ if (Object.isUndefined(responders)) return element;
+
+ responders.each( function(r) {
+ Element.stopObserving(element, eventName, r.handler);
+ });
+ return element;
+ } else if (!eventName) {
+ registry.each( function(pair) {
+ var eventName = pair.key, responders = pair.value;
+
+ responders.each( function(r) {
+ Element.stopObserving(element, eventName, r.handler);
+ });
+ });
+ return element;
+ }
+
+ var responders = registry.get(eventName);
+
+ if (!responders) return;
+
+ var responder = responders.find( function(r) { return r.handler === handler; });
+ if (!responder) return element;
+
+ var actualEventName = _getDOMEventName(eventName);
+
+ if (eventName.include(':')) {
+ if (element.removeEventListener)
+ element.removeEventListener("dataavailable", responder, false);
+ else {
+ element.detachEvent("ondataavailable", responder);
+ element.detachEvent("onfilterchange", responder);
+ }
+ } else {
+ if (element.removeEventListener)
+ element.removeEventListener(actualEventName, responder, false);
+ else
+ element.detachEvent('on' + actualEventName, responder);
+ }
+
+ registry.set(eventName, responders.without(responder));
+
+ return element;
+ }
+
+ function fire(element, eventName, memo, bubble) {
+ element = $(element);
+
+ if (Object.isUndefined(bubble))
+ bubble = true;
+
+ if (element == document && document.createEvent && !element.dispatchEvent)
+ element = document.documentElement;
+
+ var event;
+ if (document.createEvent) {
+ event = document.createEvent('HTMLEvents');
+ event.initEvent('dataavailable', true, true);
+ } else {
+ event = document.createEventObject();
+ event.eventType = bubble ? 'ondataavailable' : 'onfilterchange';
+ }
+
+ event.eventName = eventName;
+ event.memo = memo || { };
+
+ if (document.createEvent)
+ element.dispatchEvent(event);
+ else
+ element.fireEvent(event.eventType, event);
+
+ return Event.extend(event);
+ }
+
+
+ Object.extend(Event, Event.Methods);
+
+ Object.extend(Event, {
+ fire: fire,
+ observe: observe,
+ stopObserving: stopObserving
+ });
+
+ Element.addMethods({
+ fire: fire,
+
+ observe: observe,
+
+ stopObserving: stopObserving
+ });
+
+ Object.extend(document, {
+ fire: fire.methodize(),
+
+ observe: observe.methodize(),
+
+ stopObserving: stopObserving.methodize(),
+
+ loaded: false
+ });
+
+ if (window.Event) Object.extend(window.Event, Event);
+ else window.Event = Event;
+})();
+
+(function() {
+ /* Support for the DOMContentLoaded event is based on work by Dan Webb,
+ Matthias Miller, Dean Edwards, John Resig, and Diego Perini. */
+
+ var timer;
+
+ function fireContentLoadedEvent() {
+ if (document.loaded) return;
+ if (timer) window.clearTimeout(timer);
+ document.loaded = true;
+ document.fire('dom:loaded');
+ }
+
+ function checkReadyState() {
+ if (document.readyState === 'complete') {
+ document.stopObserving('readystatechange', checkReadyState);
+ fireContentLoadedEvent();
+ }
+ }
+
+ function pollDoScroll() {
+ try { document.documentElement.doScroll('left'); }
+ catch(e) {
+ timer = pollDoScroll.defer();
+ return;
+ }
+ fireContentLoadedEvent();
+ }
+
+ if (document.addEventListener) {
+ document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false);
+ } else {
+ document.observe('readystatechange', checkReadyState);
+ if (window == top)
+ timer = pollDoScroll.defer();
+ }
+
+ Event.observe(window, 'load', fireContentLoadedEvent);
+})();
+
+Element.addMethods();
+
+/*------------------------------- DEPRECATED -------------------------------*/
+
+Hash.toQueryString = Object.toQueryString;
+
+var Toggle = { display: Element.toggle };
+
+Element.Methods.childOf = Element.Methods.descendantOf;
+
+var Insertion = {
+ Before: function(element, content) {
+ return Element.insert(element, {before:content});
+ },
+
+ Top: function(element, content) {
+ return Element.insert(element, {top:content});
+ },
+
+ Bottom: function(element, content) {
+ return Element.insert(element, {bottom:content});
+ },
+
+ After: function(element, content) {
+ return Element.insert(element, {after:content});
+ }
+};
+
+var $continue = new Error('"throw $continue" is deprecated, use "return" instead');
+
+var Position = {
+ includeScrollOffsets: false,
+
+ prepare: function() {
+ this.deltaX = window.pageXOffset
+ || document.documentElement.scrollLeft
+ || document.body.scrollLeft
+ || 0;
+ this.deltaY = window.pageYOffset
+ || document.documentElement.scrollTop
+ || document.body.scrollTop
+ || 0;
+ },
+
+ within: function(element, x, y) {
+ if (this.includeScrollOffsets)
+ return this.withinIncludingScrolloffsets(element, x, y);
+ this.xcomp = x;
+ this.ycomp = y;
+ this.offset = Element.cumulativeOffset(element);
+
+ return (y >= this.offset[1] &&
+ y < this.offset[1] + element.offsetHeight &&
+ x >= this.offset[0] &&
+ x < this.offset[0] + element.offsetWidth);
+ },
+
+ withinIncludingScrolloffsets: function(element, x, y) {
+ var offsetcache = Element.cumulativeScrollOffset(element);
+
+ this.xcomp = x + offsetcache[0] - this.deltaX;
+ this.ycomp = y + offsetcache[1] - this.deltaY;
+ this.offset = Element.cumulativeOffset(element);
+
+ return (this.ycomp >= this.offset[1] &&
+ this.ycomp < this.offset[1] + element.offsetHeight &&
+ this.xcomp >= this.offset[0] &&
+ this.xcomp < this.offset[0] + element.offsetWidth);
+ },
+
+ overlap: function(mode, element) {
+ if (!mode) return 0;
+ if (mode == 'vertical')
+ return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
+ element.offsetHeight;
+ if (mode == 'horizontal')
+ return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
+ element.offsetWidth;
+ },
+
+
+ cumulativeOffset: Element.Methods.cumulativeOffset,
+
+ positionedOffset: Element.Methods.positionedOffset,
+
+ absolutize: function(element) {
+ Position.prepare();
+ return Element.absolutize(element);
+ },
+
+ relativize: function(element) {
+ Position.prepare();
+ return Element.relativize(element);
+ },
+
+ realOffset: Element.Methods.cumulativeScrollOffset,
+
+ offsetParent: Element.Methods.getOffsetParent,
+
+ page: Element.Methods.viewportOffset,
+
+ clone: function(source, target, options) {
+ options = options || { };
+ return Element.clonePosition(target, source, options);
+ }
+};
+
+/*--------------------------------------------------------------------------*/
+
+if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
+ function iter(name) {
+ return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
+ }
+
+ instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ?
+ function(element, className) {
+ className = className.toString().strip();
+ var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className);
+ return cond ? document._getElementsByXPath('.//*' + cond, element) : [];
+ } : function(element, className) {
+ className = className.toString().strip();
+ var elements = [], classNames = (/\s/.test(className) ? $w(className) : null);
+ if (!classNames && !className) return elements;
+
+ var nodes = $(element).getElementsByTagName('*');
+ className = ' ' + className + ' ';
+
+ for (var i = 0, child, cn; child = nodes[i]; i++) {
+ if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
+ (classNames && classNames.all(function(name) {
+ return !name.toString().blank() && cn.include(' ' + name + ' ');
+ }))))
+ elements.push(Element.extend(child));
+ }
+ return elements;
+ };
+
+ return function(className, parentElement) {
+ return $(parentElement || document.body).getElementsByClassName(className);
+ };
+}(Element.Methods);
+
+/*--------------------------------------------------------------------------*/
+
+Element.ClassNames = Class.create();
+Element.ClassNames.prototype = {
+ initialize: function(element) {
+ this.element = $(element);
+ },
+
+ _each: function(iterator) {
+ this.element.className.split(/\s+/).select(function(name) {
+ return name.length > 0;
+ })._each(iterator);
+ },
+
+ set: function(className) {
+ this.element.className = className;
+ },
+
+ add: function(classNameToAdd) {
+ if (this.include(classNameToAdd)) return;
+ this.set($A(this).concat(classNameToAdd).join(' '));
+ },
+
+ remove: function(classNameToRemove) {
+ if (!this.include(classNameToRemove)) return;
+ this.set($A(this).without(classNameToRemove).join(' '));
+ },
+
+ toString: function() {
+ return $A(this).join(' ');
+ }
+};
+
+Object.extend(Element.ClassNames.prototype, Enumerable);
+
+/*--------------------------------------------------------------------------*/
diff --git a/requests.php b/requests.php
new file mode 100644
index 0000000..8864e60
--- /dev/null
+++ b/requests.php
@@ -0,0 +1,41 @@
+<?
+
+ echo "<h4>feature requests</h4>";
+
+ echo "<hr class='pkg_rule' style='margin-bottom: 15px; margin-top: 15px;'/>\n";
+
+ echo "<div class='about'>\n";
+ echo "<p>There are a lot of planned features for the site. If you don't see what you want added here, please feel free to <a href='http://wonkabar.org/contact-me'>contact me</a> and I'll let you know if it's viable or not.</p>\n";
+ echo "<p>Meanwhile, here's the ones that are going to go in sooner or later:</p>\n";
+ echo "<ul>\n";
+ echo "<li> new packages page, feed for all arches</li>\n";
+ echo "<li> compact version of the website</li>\n";
+ echo "<li> text-browser version of the website</li>\n";
+ echo "<li> XML API</li>\n";
+ echo "<li> browse by keyword status (stable, unstable, masked)</li>\n";
+ echo "<li> new ebuilds section and feeds (version bumps)</li>\n";
+ echo "<li> links to downloads in SRC_URI</li>\n";
+ echo "<li> display / search herds, maintainers</li>\n";
+ echo "<li> advanced search</li>\n";
+ echo "<li> view ebuild source</li>\n";
+ echo "<li> type-ahead find in search</li>\n";
+ echo "<li> \"last updated\" display</li>\n";
+ echo "<li> similar search on packages (maybe)</li>\n";
+ echo "<li> GLSA integration</li>\n";
+ echo "<li> portage profiles</li>\n";
+ echo "<li> track deleted ebuilds</li>\n";
+ echo "<li> display dates in client's timezone</li>\n";
+ echo "<li> direct link to open a new bug and assign to maintainer</li>\n";
+ echo "<li> display reason for package mask</li>\n";
+// echo "<li> </li>\n";
+// echo "<li> </li>\n";
+// echo "<li> </li>\n";
+ echo "<li> display status of import run</li>\n";
+ echo "<li> database dumps</li>\n";
+ echo "<li> open source website</li>\n";
+ echo "</ul>\n";
+
+ echo "</div>\n";
+
+
+?> \ No newline at end of file
diff --git a/search.php b/search.php
new file mode 100644
index 0000000..ef5a115
--- /dev/null
+++ b/search.php
@@ -0,0 +1,124 @@
+<?
+
+ require_once 'inc.header1.php';
+
+ if($_REQUEST['search']) {
+ die;
+ }
+
+ require_once 'inc.header2.php';
+ require_once 'inc.header3.php';
+ require_once 'inc.content1.php';
+
+ $q = trim($_GET['q']);
+
+ // Check to see if it's a bot
+
+
+// if($q && $_GET) {
+//
+// $url = $base_uri."search/$q";
+// header("Location: $url");
+// die;
+// }
+//
+// else {
+
+ // Advanced search
+ if(count($uri) == 1) {
+
+ $str = gettext("ADVANCED SEARCH");
+ echo "<h4>$str</h4>";
+
+ } else {
+
+// $q = $uri[1];
+
+ $offset = 0;
+
+ $query = $db->quote("%$q%");
+ $name = $db->quote($q);
+
+ // Use like (case insensitive) for now, should be less of a load on db
+ $sql = "SELECT * FROM search_ebuilds e WHERE cp ~~* $query OR description ~~* $query OR package_name ~~* $query OR ebuild_name ~~* $query OR atom ~~* $query ORDER BY $name = ebuild_name DESC, $name = package_name DESC, package_name, e.ev DESC, e.lvl DESC, e.p IS NULL, e.p DESC, e.rc IS NULL, e.rc DESC, e.pre IS NULL, e.pre DESC, e.beta IS NULL, e.beta DESC, e.alpha IS NULL, e.alpha DESC, e.pr IS NULL, e.pr DESC;";
+
+ $arr = $db->getAll($sql);
+
+ $arr_packages = array();
+
+ if(!PEAR::isError($arr)) {
+ if(count($arr))
+ foreach($arr as $row)
+ $arr_packages[$row['package']][] = $row['ebuild'];
+
+ // FIXME redirect to the page instead.
+ if(count($arr_packages) == 1) {
+ $package_id = key($arr_packages);
+ require_once 'package.php';
+ require_once 'inc.content2.php';
+ break;
+ }
+
+ $arr_easter_eggs = array(
+ 'torrent' => 'funny-pictures-pirate-cat-grimaces.jpg',
+ 'google' => 'o-hai-googlz-i-can-has-privacy.jpg',
+ 'fail' => 'fail_cat.jpg',
+ 'secret' => 'funny-pictures-cat-activates-secret-door.jpg',
+ 'flameeyes' => 'funny-pictures-cat-loves-coffee.jpg',
+ 'araujo' => 'funny-pictures-cat-will-destroy-your-work.jpg',
+ 'bonsaikitten' => 'cat_minions.jpg',
+ 'mr_bones_' => 'funny-pictures-kitten-kills-with-his-eye.jpg',
+ 'vader' => 'funny-pictures-darth-vader-cat.jpg',
+ 'drobbins' => 'dune-cat.jpg',
+ 'beandog' => 'ubeantoo.jpg',
+ );
+
+ $count = count($arr_packages);
+
+ if($count < 100) {
+ $str = sprintf(gettext('SEARCH RESULTS FOR %1$s &nbsp; (%2$u)'), "\"$q\"", $count);
+ echo "<h4>$str</h4>";
+ }
+
+ if($arr_easter_eggs[strtolower($q)] && $offset == 0) {
+ $url = $base_uri."images/".$arr_easter_eggs[$q];
+ echo "<div align='center' style='padding: 15px;'><img src='$url' /></div>\n";
+ }
+
+ if($count > 1) {
+
+ $str = "";
+
+ // Only display the first 100
+
+ if($count > 100) {
+ $str = sprintf(gettext('TOP (%1$u) SEARCH RESULTS FOR %2$s &nbsp; (%3$u)'), 100, "\"$q\"", $count);
+ echo "<h4>$str</h4>";
+ $arr_chunk = array_chunk($arr_packages, 100, true);
+ $arr_packages = current($arr_chunk);
+ }
+
+ foreach($arr_packages as $arr)
+ echo keywordsRow($arr, 'search');
+
+ }
+ }
+
+ elseif(PEAR::isError($arr)) {
+
+ $str = sprintf(gettext('SEARCH RESULTS FOR %1$s &nbsp; (%2$u)'), $q, count($arr_packages));
+ echo "<h4>$str</h4>";
+
+ $str = gettext("Hmm, that query didn't work.");
+ echo "<p>$str</p>";
+
+ }
+
+ }
+
+// }
+
+ require_once 'inc.content2.php';
+
+
+?> \ No newline at end of file
diff --git a/useflag.php b/useflag.php
new file mode 100644
index 0000000..380d085
--- /dev/null
+++ b/useflag.php
@@ -0,0 +1,48 @@
+<?
+
+ require_once 'class.db.use.php';
+
+ if($useflag_name) {
+
+ $obj = new DBUse($useflag_name);
+
+ $description = $obj->description;
+
+ $url = $base_uri."categories";
+
+ echo "<h4>$useflag_name</h4>";
+
+ echo "<div class='description'>$description</div>";
+
+ $sql = "SELECT category_name, package_name, description FROM view_package_useflags WHERE useflag_name = ".$db->quote($useflag_name)." ORDER BY category_name, package_name;";
+ $arr = $db->getAll($sql);
+
+ echo "<hr class='pkg_rule' style='margin-bottom: 15px; margin-top: 15px;'/>\n";
+
+ echo "<table class='useflags' cellpadding='4' cellspacing='0'>\n";
+
+ $x = 0;
+
+ foreach($arr as $row) {
+
+ extract($row);
+
+ $class = getRowClass($x++);
+
+ $cp = "$category_name/$package_name";
+ $url = $base_uri.$cp;
+
+ echo "\t<tr class='$class'>\n";
+ echo "\t\t<td valign='top'><a href='$url'>$cp</a></td>\n";
+ echo "\t\t<td>$description</td>\n";
+ echo "\t</tr>\n";
+
+ }
+
+ echo "</table>\n";
+
+
+
+ }
+
+?> \ No newline at end of file
diff --git a/useflags.php b/useflags.php
new file mode 100644
index 0000000..27420fe
--- /dev/null
+++ b/useflags.php
@@ -0,0 +1,40 @@
+<?
+ require_once 'inc.header1.php';
+ require_once 'inc.header2.php';
+ require_once 'inc.header3.php';
+ require_once 'inc.content1.php';
+
+ require_once 'class.db.category.php';
+
+ $sql = "SELECT name, description FROM use WHERE LENGTH(description) > 0 AND prefix = '' ORDER BY name;";
+ $arr = $db->getAssoc($sql);
+
+ echo "<h4>".gettext("use flags")."</h4>\n";
+
+ echo "<div class='about'>\n";
+
+ echo "<hr class='pkg_rule' style='margin-bottom: 15px; margin-top: 15px;'/>\n";
+
+ echo "<table style='padding-bottom: 25px;' cellpadding='4' cellspacing='0'>\n";
+
+ $x = 0;
+
+ foreach($arr as $useflag_name => $description) {
+
+ $class = getRowClass($x++);
+
+ $url = $base_uri."useflags/".urlencode($useflag_name);
+
+ echo "\t<tr class='$class'>\n";
+ echo "\t\t<td valign='top'><a href='$url'>$useflag_name </a></td>\n";
+ echo "\t\t<td>$description</td>\n";
+ echo "\t</tr>\n";
+
+ }
+
+ echo "</table>\n";
+
+ echo "</div>\n";
+
+ require_once 'inc.content2.php';
+?> \ No newline at end of file
diff --git a/xml.package.php b/xml.package.php
new file mode 100644
index 0000000..e004a5c
--- /dev/null
+++ b/xml.package.php
@@ -0,0 +1,58 @@
+<?
+
+ require_once 'class.db.category.php';
+
+ if($package_id) {
+
+ $db_package = new DBPackage($package_id);
+ $c = new DBCategory($db_package->category);
+
+ $category_name = $c->name;
+
+// Common::pre($db_package->arr_db);
+
+ $str = <<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<package>
+</package>
+XML;
+
+ $sxe = new SimpleXMLElement($str);
+ $child = $sxe->addChild('category');
+ $child->addAttribute('name', $category_name);
+
+ $child = $sxe->addChild('ebuild');
+ $child->addAttribute('pf', '1.2.0');
+
+ $sql = "SELECT DISTINCT category_name, package_name FROM view_reverse_depend WHERE package = ".$db->quote($package_id)." ORDER BY category_name, package_name;";
+ $arr = $db->getAll($sql);
+
+ if(count($arr)) {
+
+
+
+ foreach($arr as $row) {
+ extract($row);
+ $child = $sxe->addChild('dependency');
+ $child->addChild('type', 'reverse');
+ $child->addChild('category_name', $category_name);
+ $child->addChild('package_name', $package_name);
+ }
+
+ }
+
+ $sxe->addChild('description', htmlspecialchars($db_package->description));
+// $sxe->addChild('changelog', htmlspecialchars($db_package->changelog));
+
+
+ echo $sxe->asXML();
+
+
+
+
+ }
+
+
+
+
+?> \ No newline at end of file
diff --git a/xml.php b/xml.php
new file mode 100644
index 0000000..8bdb8a3
--- /dev/null
+++ b/xml.php
@@ -0,0 +1,242 @@
+<?
+
+ $nocache = true;
+
+ require_once 'inc.header1.php';
+ require_once 'class.db.package.php';
+ require_once 'class.db.category.php';
+ require_once 'class.portage.package.changelog.php';
+
+ // Web interface
+ // meh
+ $atom = true;
+ if($_GET['type'] == 'rss') {
+ $atom = false;
+ }
+
+ $arch = $_GET['arch'];
+ if(!in_array($arch, $arr_arch))
+ $arch = null;
+
+ $feed = $_GET['feed'];
+
+ // CLI interface
+ if(count($argv)) {
+ $cli = true;
+ $feed = $argv[1];
+ $type = $argv[2];
+ if($argv[3] && in_array($argv[3], $arr_arch))
+ $arch = $argv[3];
+
+ if($type == 'rss')
+ $atom = false;
+ }
+
+ $feed_amount = 100;
+
+ switch($feed) {
+
+ case 'new_packages':
+ $view = 'new_packages';
+// $sql = "SELECT p.id AS package, c.name AS category_name, p.name AS package_name, p.idate FROM category c JOIN package p ON p.category = c.id WHERE p.portage_mtime IS NOT NULL ORDER BY p.idate DESC, category_name, package_name LIMIT $feed_amount;";
+
+// $sql = "SELECT p.id AS package, e.category_name, p.name AS package_name, e.id AS ebuild, p.idate FROM package p LEFT OUTER JOIN ebuilds e ON e.package = p.id WHERE p.portage_mtime IS NOT NULL AND e.id IS NOT NULL ORDER BY p.idate DESC, e.cache_mtime DESC, e.category_name, e.package_name, e.ev DESC, e.lvl DESC, e.p IS NULL, e.p DESC, e.rc IS NULL, e.rc DESC, e.pre IS NULL, e.pre DESC, e.beta IS NULL, e.beta DESC, e.alpha IS NULL, e.alpha DESC, e.pr IS NULL, e.pr DESC LIMIT $feed_amount;";
+ $sql = "SELECT p.id AS package, e.id AS ebuild FROM package p LEFT OUTER JOIN ebuilds e ON e.package = p.id WHERE p.idate > '2010-01-04 12:00:00.0-07' AND p.portage_mtime IS NOT NULL AND e.id IS NOT NULL ORDER BY p.idate DESC, e.cache_mtime DESC, e.category_name, e.package_name, e.ev DESC, e.lvl DESC, e.p IS NULL, e.p DESC, e.rc IS NULL, e.rc DESC, e.pre IS NULL, e.pre DESC, e.beta IS NULL, e.beta DESC, e.alpha IS NULL, e.alpha DESC, e.pr IS NULL, e.pr DESC LIMIT $feed_amount;";
+
+ $arr = $db->getAll($sql);
+ $feed_title = "new packages";
+
+ if($atom)
+ $self_url = "http://znurt.org/xml/feeds/new_packages/atom.xml";
+ else
+ $self_url = "http://znurt.org/xml/feeds/new_packages/rss.xml";
+
+ break;
+
+ case 'new_ebuilds':
+
+ $sql = "SELECT e.package, e.id AS ebuild FROM package p LEFT OUTER JOIN ebuilds e ON e.package = p.id WHERE e.udate IS NULL AND e.idate > '2010-01-04 12:00:00.0-07' ORDER BY e.idate DESC, e.cache_mtime DESC, e.category_name, e.package_name, e.ev DESC, e.lvl DESC, e.p IS NULL, e.p DESC, e.rc IS NULL, e.rc DESC, e.pre IS NULL, e.pre DESC, e.beta IS NULL, e.beta DESC, e.alpha IS NULL, e.alpha DESC, e.pr IS NULL, e.pr DESC;";
+
+ $arr = $db->getAll($sql);
+ $feed_title = "new ebuilds";
+
+ if($atom)
+ $self_url = "http://znurt.org/xml/feeds/new_ebuilds/atom.xml";
+ else
+ $self_url = "http://znurt.org/xml/feeds/new_ebuilds/rss.xml";
+
+ break;
+
+ default:
+ $view = 'fresh_ebuilds';
+ $feed_title = "the fresh ebuilds";
+ $arr = recentPackages($feed_amount, 0, $arch);
+
+ $str = "";
+ if($arch) {
+ $str = "$arch.";
+ $feed_title .= " ~ $arch";
+ }
+
+ if($atom)
+ $self_url = "http://znurt.org/xml/feeds/fresh_ebuilds/atom.".$str."xml";
+ else
+ $self_url = "http://znurt.org/xml/feeds/fresh_ebuilds/rss.".$str."xml";
+
+ break;
+
+ }
+
+ if($atom)
+ $date_format = 'c';
+ else
+ $date_format = 'D, d M Y H:i:s O';
+
+// Common::pre($arr);
+
+
+ $feed_updated = $feed_published = date($date_format);
+ $feed_time = time();
+
+ $entries = array();
+
+ if(count($arr)) {
+
+ $e = new DBEbuild($arr[0]['ebuild']);
+
+ $feed_updated = date($date_format, $e->portage_mtime);
+
+ $x = 0;
+
+ foreach($arr as $row) {
+
+ extract($row);
+
+ $e = new DBEbuild($ebuild);
+ $p = new DBPackage($package);
+ $c = new DBCategory($p->category);
+ $ch = new PackageChangelog($p->changelog);
+
+ $package_name = $p->name;
+ $category_name = $c->name;
+ $pf = $e->pf;
+ $ebuild_portage_mtime = $e->portage_mtime;
+ $recent_changes = htmlspecialchars($ch->getRecentChanges());
+ $description = htmlspecialchars($p->description);
+
+ $entries[$x] = $row;
+
+ if($view == 'new_packages') {
+ $entries[$x]['title'] = "$category_name/$package_name";
+ $entries[$x]['portage_mtime'] = strtotime($p->portage_mtime);
+ } else {
+ $entries[$x]['title'] = "$pf";
+ }
+
+ $entries[$x]['package_url'] = "http://znurt.org/$category_name/$package_name";
+ $entries[$x]['ebuild_url'] = "http://znurt.org/$category_name/$package_name/$pf";
+ $entries[$x]['updated'] = date($date_format, $ebuild_portage_mtime);
+
+ $entries[$x]['id'] = $entries[$x]['ebuild_url']."#$ebuild_portage_mtime";
+
+ $entries[$x]['cp'] = htmlspecialchars("$category_name/$package_name");
+ $entries[$x]['recent_changes'] = $recent_changes;
+ $entries[$x]['description'] = $description;
+
+ $x++;
+
+ }
+
+ }
+
+
+ if($atom) {
+
+ header('Content-type: application/atom+xml');
+ echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+
+ echo "<feed xmlns='http://www.w3.org/2005/Atom'>\n";
+ echo "\t<link rel='self' href='$self_url' />\n";
+ echo "\t<title>$feed_title</title>\n";
+ echo "\t<updated>$feed_updated</updated>\n";
+ echo "\t<id>$self_url#$feed_time</id>\n";
+ echo "\t<author>\n";
+ echo "\t\t<name>Steve Dibb</name>\n";
+ echo "\t\t<email>beandog@gentoo.org</email>\n";
+ echo "\t</author>\n";
+
+ if(count($entries)) {
+
+ foreach($entries as $row) {
+
+ extract($row);
+
+ echo "\t<entry>\n";
+ echo "\t\t<title>$title</title>\n";
+ echo "\t\t<link rel='alternate' type='text/html' href='$package_url' />\n";
+ echo "\t\t<id>$id</id>\n";
+ echo "\t\t<updated>$feed_updated</updated>\n";
+ echo "\t\t<published>$updated</published>\n";
+ echo "\t\t<content type='xhtml' xml:lang='en' xml:base='http://znurt.org/'>\n";
+ echo "\t\t\t<div xmlns='http://www.w3.org/1999/xhtml'>\n";
+ echo "\t\t\t\t<p><b>$cp</b> - $description</p>\n";
+ echo "\t\t\t\t<p>$recent_changes</p>\n";
+ echo "\t\t\t</div>\n";
+ echo "\t\t</content>\n";
+ echo "\t</entry>\n";
+
+ }
+
+ }
+
+ echo "</feed>\n";
+ } else {
+
+ header('Content-type: application/rss+xml');
+ echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+
+ echo "<rss version='2.0' xmlns:atom='http://www.w3.org/2005/Atom'>\n";
+
+ echo "<channel>\n";
+ echo "\t<atom:link href='$self_url' rel='self' type='application/rss+xml' />\n";
+ echo "\t<title>$feed_title</title>\n";
+ echo "\t<link>http://znurt.org/</link>\n";
+ echo "\t<description>the fresh ebuilds</description>\n";
+ echo "\t<language>en-us</language>\n";
+ echo "\t<lastBuildDate>$feed_updated</lastBuildDate>\n";
+ echo "\t<pubDate>$feed_published</pubDate>\n";
+ echo "\t<managingEditor>beandog@gentoo.org (Steve Dibb)</managingEditor>\n";
+ echo "\t<webMaster>beandog@gentoo.org (Steve Dibb)</webMaster>\n";
+ echo "\t<ttl>60</ttl>\n";
+
+ if(count($entries)) {
+
+ foreach($entries as $row) {
+
+ extract($row);
+
+ echo "\t<item>\n";
+ echo "\t\t<title>$title</title>\n";
+ echo "\t\t<link>$package_url</link>\n";
+ echo "\t\t<guid isPermaLink='false'>$id</guid>\n";
+ echo "\t\t<pubDate>$updated</pubDate>\n";
+ echo "\t\t<description>\n";
+ echo "<![CDATA[\n";
+ echo "<p><b>$cp</b> - $description</p>\n";
+ echo "<p>$recent_changes</p>\n";
+ echo "]]>\n";
+ echo "</description>\n";
+ echo "\t</item>\n";
+
+ }
+
+ }
+
+ echo "</channel>\n";
+ echo "</rss>\n";
+
+ }
+
+ require_once 'inc.footer.php';
+
+?> \ No newline at end of file