¾È³çÇϼ¼¿ä. ÇØÇÇ CGI À±¿µ¿õÀÔ´Ï´Ù.
ÇØÇÇ CGI¿¡¼ »ç¿ëÇÏ´Â »çÀÌÆ®¸Ê ¼Ò½ºÀÔ´Ï´Ù.
¼Ò½ºÀÇ ±ÇÇÑ ¹× Àç ¹èÆ÷´Â ÇØÇÇ CGI¿¡ ÀÖ½À´Ï´Ù.
¿ì¼± ÇÊ¿äÇÑ À̹ÌÁö´Â
openfolder.gif
tree_e.gif
tree_f.gif
ÀÔ´Ï´Ù.
ÇØÇÇ CGI »çÀÌÆ®¸ÊÀ» Ŭ¸¯Çϼż À̹ÌÁö ÀúÀåÀ» ÇÏ¸é µÇ°Ú³×¿ä.
site_html_templates.pl ÆÄÀÏÀ» ¿¾îº¾´Ï´Ù.
sub site_html_print_cat {Áß¾óÁß¾ó}ÀÇ ¼ºê·çƾÀÌ ³¡³ ¸Ç¸¶Áö¸·¿¡ »õ·Î Çϳª´õ ºÙ¾î º¾´Ï´Ù.
sub site_html_print_cat3 {
# --------------------------------------------------------
# ÇØÇÇ CGI »çÀÌÆ® ¸Ê
#
my (@subcat) = @_;
my ($url, $numlinks, $mod, $subcat, $category_name,
$description, $output, $i);
my ($half) = int (($#subcat 2) / 2);
# Print Header.
$output = qq&pip;width="80%" border="0" cellspacing="0" cellpadding="0"
height=130> &pip;;
foreach $subcat (sort @subcat) {
($description) = @{$category{$subcat}}[2];
# First let s get the name, number of links, and last modified date...
$url = "$build_root_url/" . &urlencode($subcat) . "/";
if ($subcat =~ m,.*/([^/] )$,) { $category_name = &build_clean($1); } else { $category_name = &build_clean($subcat); }
$numlinks = $stats{"$subcat"}[0];
$mod = $stats{"$subcat"}[1];
# We check to see if we are half way through, if so we stop this table cell
# and begin a new one (this lets us have category names in two columns).
if ($i == $half) {
$output .= qq&pip; | &pip;;
}
$i ;
# Then we print out the name linked, new if it s new, and popular if its popular.
if ($#{$subcategories{$subcat}} >= 0 ) {
$output .= qq&pip; class="link" href="$url">$category_name @ &pip;;
}
else {
$output .= qq&pip; class="link" href="$url">$category_name
lor=black>[$numlinkssize=2 face=arial color=black>] &pip;;
}
my $days_old = &days_old($mod);
if ($days_old <= 2) { $output .= qq&pip; $new_1&pip;; }
elsif ($days_old <= 7) { $output .= qq&pip; $new_3&pip;; }
elsif ($days_old <= 14) { $output .= qq&pip; $new_7&pip;; }
$output .= qq&pip; &pip;;
# $output .= qq&pip;&pip;;
# ¾ßÈÄ Ä«Å×°í¸® ¸ðµå Ãß°¡
if ($#{$subcategories{$subcat}} > 0 ) {
$v = 0;
@yahoo = ();
$sub_length = "";
$output .= qq&pip; &pip;;
foreach $subcatsub (sort @{$subcategories{$subcat}}) {
$suburl = "$build_root_url/" . &urlencode($subcatsub) . "/";
if ($subcatsub =~ m,.*/([^/] )$,) { $subcategory_name = &build_clean($1); }
else { $subcategory_name = &build_clean($subcatsub); }
$sub_length .= qq&pip;, &pip; if ($description =~ /1$/ && $v ne "0");
$sub_length .= qq&pip;$subcategory_name&pip; if ($description =~ /1$/);
if ($description =~ /1$/ && length($sub_length) > $subcat_length) {
$output .= qq&pip;...&pip;;
last;
}
else {
$output .= qq&pip;, &pip; if ($description =~ /1$/ && $v ne "0");
$add_array = " border=0 ALIGN=TOP> $subcategory_name
";
@yahoo = (@yahoo, $add_array);
$v ;
}
}
$del_array = pop(@yahoo);
for ($h = 0;$h <= $v ; $h ) {
$output .= $yahoo[$h];
}
$output .= qq&pip; &pip;;
$output .= qq&pip;size=2 face=arial color=#00007E>$subcategory_name color=black> &pip;;
}
else {
$output .= qq&pip;$description&pip; if (!($description =~ /^[s ]*$/));
}
# ¾ßÈÄ Ä«Å×°í¸® ¸ðµå Ãß°¡ ³¡
}
# Don t forget to end the unordered list..
$output .= " |
";
return $output;
}
nph-build.cgi ÆÄÀÏÀ» ¿¾îº¾´Ï´Ù.
sub build_home_page ¼ºê·çƾÀ» ã¾Æ ÀÌ ·çƾÀÌ ³¡³ª´Â ¸¶Áö¸·¿¡ ¾Æ·¡¸¦ ºÙÀÔ´Ï´Ù.
sub build_sitemap_page {
# --------------------------------------------------------
my ($subcat, @rootcat);
local ($total);
# Check to see which categories are off of the root.
foreach $subcat (sort keys