묻고답하기

카운터에서...

2003.01.19 11:38

☺NaBi

http://secomhea.com/count/count.cgi
이 카운터에 보면 배경이 하얀색이잖아요
그래서 회색으루 바꿀려구 소스를 <body bgcolor="#F0F0F0"> 이걸 넣어야데는데
도대체 어딜 넣어야 될지 모르겠어요;
소스수정하는곳은 conut.cgi 밖에 없거든요
근데 그곳 어느곳에 넣어두 다 오류나더라구요
어딜 넣어야 될지;












<---conunt.cgi에 들어있는 내용 -->
#!/usr/bin/perl

$dir=".";
$total_count_file = "totalcount.dat";
$today_count_file = "todaycount.dat";
$yes_count_file = "yesdaycount.dat";
$max_count_file = "maxcount.dat";
$min_count_file = "mincount.dat";
$day_file = "today.dat";
$kdate = &get_date;

################## 수정해야 할 부분 ######################

$where="1";         # 카운터를 가로로 놓으려면 0, 세로로 놓으려면 1로

#_______________ 전체 오늘 현재 등의 글자색 설정 ________________

$total_textcolor="#808080";        # 전체 글자색
$today_textcolor="#808080";      # 오늘 글자색
$yes_textcolor="#808080";         # 어제 글자색
$max_textcolor="#808080";       # 최대 글자색
$min_textcolor="#808080";        # 최저 글자색
$user_textcolor="#808080";       # 현재 글자색


#______________ 전체 오늘 현재등의 숫자(데이타)색 설정 __________

$total_datacolor="#404840";         # 전체 데이타색
$today_datacolor="#404840";       # 오늘 데이타색
$yes_datacolor="#404840";         # 어제 데이타색
$max_datacolor="#404840";        # 최대 데이타색
$min_datacolor="#404840";         # 최저 데이타색
$user_datacolor="#404840";         # 현재접속자 데이타색

################### 여기까지 ##############################
&cookie;
&get_current;
&get_Total_num;
&get_date_file;
&get_max_num;
&get_min_num;
&get_yes_num;
&get_today_num;
&put_date_file;  
&print_count;


sub get_date {
  local ($current_date, $sec, $min, $hour, $day, $mon, $year);
  ($sec ,$min, $hour, $day, $mon, $year) = (localtime(time))[0,1,2,3,4,5];
  $mon++;
  $current_date = "$day";

($current_date);
}

sub get_date_file {
   open(COUNT,"$day_file") || die "Can't Open Count Data File: $!n";
    $day_file_count = <COUNT>;
   close(COUNT);
   if ($day_file_count =~ /n$/) {
      chop($day_file_count);
   }
}

sub put_date_file {
   open(COUNT,">$day_file") || die "Can't Open Count Data File For Writing: $!n";
   print COUNT "$kdate";
   close(COUNT);
}


sub get_Total_num {
   open(COUNT,"$total_count_file") || die "Can't Open Count Data File: $!n";
    $total_count = <COUNT>;
   close(COUNT);
   if ($total_count =~ /n$/) {
      chop($total_count);
   }
if ($COOKIE{'COUNT'} ne "카운터"){$total_count++;}
   open(COUNT,">$total_count_file") || die "Can't Open Count Data File For Writing: $!n";
   print COUNT "$total_count";
   close(COUNT);
}

sub get_yes_num {
   open(COUNT,"$yes_count_file") || die "Can't Open Count Data File: $!n";
    $yes_count = <COUNT>;
   close(COUNT);
   if ($yes_count =~ /n$/) {
       chop($yes_count);
   }
   }

sub get_max_num {
   open(COUNT,"$max_count_file") || die "Can't Open Count Data File: $!n";
     $max_count = <COUNT>;
     close(COUNT);
   if ($max_count =~ /n$/) {
     chop($max_count);
     }
     }

sub get_min_num {
   open(COUNT,"$min_count_file") || die "Can't Open Count Data File: $!n";
     $min_count = <COUNT>;
     close(COUNT);
   if ($min_count =~ /n$/) {
      chop($min_count);
     }
     }

sub get_today_num {
   open(COUNT,"$today_count_file") || die "Can't Open Count Data File: $!n";
    $today_count = <COUNT>;
   close(COUNT);
   if ($today_count =~ /n$/) {
      chop($today_count);
   }
   if ($kdate == $day_file_count){
if ($COOKIE{'COUNT'} ne "카운터"){$today_count++;}
   }
      else {
           $yes_count=$today_count;
            open(COUNT,">$yes_count_file") || die "Can't Open Count Data File For Writing: $!n";
            print COUNT "$yes_count";
            close(COUNT);
      if ($max_count < $today_count) {
          $max_count = $today_count;
          open(COUNT,">$max_count_file") || die "Can't Open Count Data File For Writing: $!n";
          print COUNT "$max_count";
          close(COUNT);
          }
          elsif ($min_count > $today_count) {
          $min_count = $today_count;
          open(COUNT,">$min_count_file") || die "Can't Open Count Data File For Writing: $!n";
          print COUNT "$min_count";
          close(COUNT);
          }
           $today_count=1;
   }
  

   open(COUNT,">$today_count_file") || die "Can't Open Count Data File For Writing: $!n";
   print COUNT "$today_count";
   close(COUNT);
}
sub get_current {
unless (open(MYDIR, "$dir/logs")){
print `mkdir $dir/logs`;
print `chmod 777 $dir/logs`;
print `chmod 777 $dir`;
}

$user_ip=$ENV{'REMOTE_ADDR'};

opendir(MODIFY_FILE, "$dir/logs");
@modify_file = readdir(MODIFY_FILE);
closedir(MODIFY_FILE);
foreach $modify_file (@modify_file) {
if (-f "$dir/logs/$modify_file") {
if (-M "$dir/logs/$modify_file" > 60/60/24) {
print `rm -rf $dir/logs/$modify_file`;
}
}
}

$login_data=join("||", "$year$mon$day$hour$min$sec");
unless (open(MYDIR, "$dir/logs/$user_ip")){
open(WRITE, "+>$dir/logs/$user_ip");
flock (WRITE, 8);
print WRITE "$login_datan";
close(WRITE);
flock (WRITE, 2);
print `chmod 777 $dir/logs/$user_ip`;
}

opendir(COUNT_FILE, "$dir/logs");
@count_file = readdir(COUNT_FILE);
closedir(COUNT_FILE);
foreach $count_file (@count_file) {
if (-f "$dir/logs/$count_file") {
$user_count++;
}
}#foreach문 종료
}
#------------------
sub print_count {
   print "Set-Cookie: COUNT=카운터;rn";
   print "Content-type: text/htmlnn";
   print "<html>n";
   print "<STYLE TYPE="text/css">";
   print "<!--";
   print "body, table, tr, td{";
   print "  color: black;";
   print "  font-family: 정9, verdana, arial, helvetica, sans-serif;";
   print "  font-size: 9pt;";
   print "  }";
   print " A:link    {text-decoration:none;}";
   print " A:visited {text-decoration:none;}";
   print " A:active  {color:red;}";
   print " A:hover  {color:red;}";
   print "-->";
   print "</style>";
   print "<body>n";
#_______________________________________ display1(세로배열)___________________________________
if($where eq "1") {
   print "<font color=$total_textcolor>전체</font> <font color=$total_datacolor>$total_count</font><br>n";
   print "<font color=$yes_textcolor>어제</font> <font color=$yes_datacolor>$yes_count</font><br>n";
   print "<font color=$max_textcolor>최고</font> <font color=$max_datacolor>$max_count</font><br>n";
   print "<font color=$today_textcolor>오늘</font> <font color=$today_datacolor>$today_count</font><br>n";
}
#_______________________________________ display2(가로배열)__________________________________

else {
  print "<font color=$total_textcolor>전체</font> <font color=$total_datacolor>$total_count</font> <font color=$yes_textcolor>어제</font> <font color=$yes_datacolor>$yes_count</font> <font color=$max_textcolor>최고</font> <font color=$max_datacolor>$max_count</font> <font color=$today_textcolor>오늘</font> <font color=$today_datacolor>$today_count</font>n";
}
#__________________________________________________________________________________________

   print "n</body></html>n";

   exit;
}


sub cookie{
    if($ENV{'HTTP_COOKIE'}) {
        @cookies = split(/; /,$ENV{'HTTP_COOKIE'});
        foreach(@cookies) {
        ($name,$value) = split(/=/,$_);
        $COOKIE{$name} = $value;
        }}
}
<--끝-->

코멘트 부탁드려요 (__)
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
튼튼니노 인터넷에서 사진저장할때 비트맵으로저장되거든요..속성은 JPG인데..비트맵으로밖에 저장이 않돼요..  
피버노바 아이프래임관련 질문입니다.(iframe) [2] 2007.08.10
안건호 저 제발 도와주세요 ㅜㅜ 전전리뉴얼 때부터 그랬는데여... [5] 2007.08.10
이찬규 통합검색창 만들려면 어떻게 해야 하나요?  
ttackstyle~♬ 포토샵 질문입니다!! [1] 2007.08.10
김민성 노 프레임홈에 대한... 질문이에요.  
사랑하나 플래쉬 프리로딩과 관련된 질문입니다 [2] 2007.08.10
물탱이 테두리가 나왔다 안나왔다 하네요...?? [2] 2007.08.10
미자 무식하게 프로그래밍했네요. 간단하게 고쳐주실 고수님! [2] 2007.08.10
굴비호쌍 인덱스가 안 뜹니다!!!!!! 제발 답변좀!!!!!!! [1] 2007.08.10
Black 브라우저에 글씨가요! [2] 2007.08.10
『PokerFace』™ 레..레이어 메뉴 만들기-_-; 간단한 설명부탁요;; [1] 2007.08.10
마일 전체화면 창 띄울때 스크롤바 없애는 방법좀.. [1] 2007.08.10
하얀공포 홈페쥐 초짠데여... 소스 많은 홈페이지점 알려주세여..^^;;; [2] 2007.08.10
최락호 꼭 좀 알려주세요~~~~^^ [1] 2007.08.10
공손운비 서버만들고나서 [2] 2007.08.10
편현장 mysql 데이타 베이스에 접속을 어찌 하나요? [1] 2007.08.10
박기현 갤러리 스킨에서.. [1] 2007.08.10
심은 카테고리부분 글씨가 깨지는 현상에 대해서.. [2] 2007.08.10
초보 카운터 스킨자료 받았는데요..어떻게 올리나요 -_-; [2] 2007.08.10
레드 고정ip 로 변경하려면.. [2] 2007.08.10
같은기억 노프레임으로 만들었는데요.  
A|X 웹페이지의 접속권한을 부여하는 방법 부탁드립니다. [1] 2007.08.10
김상은 나모에서 표 만들고 나서요!!! [1] 2007.08.10
신성남 테이블을 크기 고정은 안 되나요?  
이효석 운영자님.. 제로보드 설치가 안되나봐여  
제이 자바스크립트에 오류난것같은데~ [2] 2007.08.10
SJH 최근게시물...-_-;;; [2] 2007.08.10
클린아이 폰트 고수님 이것좀 봐주세요. [1] 2007.08.10
권민섭 백그라운드 에관한건데요... 투명처리를.... [1] 2007.08.10