묻고답하기

카운터에서...

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 남기남
EULAB 홈페이지 문의!! 급합니다 ㅠㅠ 전문가 님들 도와주세요! [3] file 2015.04.22 by EULAB
1113공병단 ip접속과 도메인접속 차이 [6] file 2015.04.22 by 1113공병단
슬픈휘파람 N포탈에 노출시키고 싶습니다. [2] file 2015.04.22 by Double'U'
maxform 그누보드 export시 데이터 누락  
Asaph 포인트 차감 기간 문의 [3] 2015.04.22 by I-JEX
장밋빛로지 파일 크기 제한 설정 [4] 2015.04.22 by I-JEX
putty 스케치북 스킨 쓰시는 분들께 질문 드립니다. [2] file 2015.04.22 by putty
슈니슈니 가장안정화되어있는 버전은? [2] 2015.04.22 by bin
대장부당웅비 카페24기반 홈페이지가 크롬과 모바일에서 깨져보입니다. 도와주세요~!!  
페르난도_알론소 ftp 서버에 저장된 html 파일을 열고싶습니다.  
늘같이 PHP 버전 5.2.9에서 xe 1.8.1 업그레이드가 되었어요.. [2] file 2015.04.22 by 늘같이
제이니스 그룹별로 위젯내용 보이기.... 어떻게 하나요?  
hooms 제로보드로 홈페이지를 만들려고 합니다. [1] 2015.04.22 by BJ람보
씨드리f612e 다국어 언어 선택시 링크걸기....  
김동하123 새창이 아닌 바로 가기 할 수 있나요? [2] 2015.04.22 by 김동하123
구구가가 크롬에서 아이콘들이 엑박으로 뜨는 문제... [3] file 2015.04.22 by 수지♥
KaelXP 짧은 주소가 게시물 목록에서 작동을 안하네요 file  
GwangHoon 이런 상담, 문의류의 위젯은 없는건가요? [1] file 2015.04.22 by I-JEX
피아노트 대시보드가 뚱뚱해졌습니다 ;; [6] file 2015.04.22 by 숭숭군
우냠냠냠 자동복구되는 웹호스팅 있나요? [1] 2015.04.21 by BJ람보
피아노트 혹이 이 모듈 이름이 뭔지 아시나요? [4] file 2015.04.21 by 피아노트
knh5177 php 게시판 글 보기 연결 에러..같은데 봐주세요ㅠㅠ! file  
문화사랑 페이지에 글작성이 안됩니다 [9] file 2015.04.21 by 문화사랑
月芽 작성글 카운트 [2] 2015.04.21 by 月芽
jhee 사이트메뉴 추가시 오류 [3] 2015.04.21 by I-JEX
camel01 관리자 페이지 오류... not valid xml... [2] file 2015.04.21 by camel01
라루루리 1.8 업데이트 후 CKEditor에서 문서서식이 안됩니다. [3] 2015.04.21 by flowerrain
김동하123 구글처럼 검색창 하나만 띄워놓고 싶습니다 [1] 2015.04.21 by Ansi™
핑크스윗로즈 스케치북5 게시판 분류 질문  
MF천월 이런 위젯 제작코드나 아니면 의뢰가능한가요 file