Changeset 1035


Ignore:
Timestamp:
09/07/04 23:55:37 (9 years ago)
Author:
anonymous
Message:

modification diverses dans bureau
modification du fichier de menu
ecriture du script alternc-awstats

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/alternc-awstats

    r1030 r1035  
    22. /etc/alternc/local.sh 
    33 
    4 if [ -e /etc/alternc/webalizer.conf ] 
    5 then 
    6     . /etc/alternc/webalizer.conf 
    7 fi 
     4#if [ -e /etc/alternc/webalizer.conf ] 
     5#then 
     6#    . /etc/alternc/webalizer.conf 
     7#fi 
    88 
    99if [ -z "$ACCESSLOG" ]  
     
    1717fi 
    1818 
    19 CACHEDIR="/var/cache/alternc-webalizer" 
     19CACHEDIR="/var/cache/alternc-awstats" 
    2020TMPDNS=`mktemp -p /tmp` 
    2121TMPLOG=`mktemp -p /tmp` 
     
    3030 
    3131function dostat { 
    32     read LANG DOM 
     32    read DOM 
    3333    while [ "$DOM" ] 
    3434    do     
    35       export LC_ALL="$LANG" 
    36       export LC_MESSAGES="$LANG" 
    37       export LANG 
    38  
     35      #export LC_ALL="$LANG" 
     36      #export LC_MESSAGES="$LANG" 
     37      #export LANG 
     38      echo "processing $DOM" 
    3939      # first run: resolve IPs in cache 
    40       grep -h " $DOM$" $ACCESSLOG | /usr/bin/webalizer -c $CACHEDIR/$DOM.conf -N 5 -D $TMPDNS - &>/dev/null 
     40      #grep -h " $DOM$" $ACCESSLOG | /usr/bin/webalizer -c $CACHEDIR/$DOM.conf -N 5 -D $TMPDNS - &>/dev/null 
    4141      # second run: process the stats 
    42       /usr/bin/webalizer -c $CACHEDIR/$DOM.conf -N 0 -D $TMPDNS - 2>/dev/null  
    43       read LANG DOM 
     42      /usr/lib/cgi-bin/awstats.pl -config=$DOM  
     43      read DOM 
    4444    done 
    4545} 
     
    4848rm -rf $CACHEDIR/*  
    4949# Fill the cache dir 
    50 /usr/lib/alternc/webalizer.cache.php 
     50/usr/lib/alternc/awstats.cache.php 
    5151 
    5252# Launch the stat 
    53 mysql -h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE" -B -e "SELECT lang,hostname FROM stats" |grep -v "^lang" | dostat 
     53mysql -h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE" -B -e "SELECT hostname FROM aws" |grep -v "^hostname" | dostat 
    5454 
    5555cleanup 
  • trunk/awstats.template.conf

    r1030 r1035  
    3434# Example: "C:/WINNT/system32/LogFiles/W3SVC1/ex%YY-24%MM-24%DD-24.log" 
    3535# 
    36 LogFile="/tmp/awstats.log" 
     36LogFile="/var/log/apache/access.log" 
    3737 
    3838# Put here your log format (Must match your web server config. See setup 
     
    170170# Default: 0 
    171171# 
    172 AllowAccessFromWebToAuthenticatedUsersOnly=1 
     172AllowAccessFromWebToAuthenticatedUsersOnly=0 
    173173 
    174174# This parameter give the list of all authorized authenticated users to view 
  • trunk/bureau/admin/aws_list.php

    r1034 r1035  
    8282</table> 
    8383</form> 
    84  
     84<?php 
    8585} 
    8686 
  • trunk/bureau/admin/menu_awstats.php

    r1030 r1035  
    3030 
    3131/* ############# STATS ############# */ 
    32 $q=$quota->getquota("stats"); 
     32$q=$quota->getquota("aws"); 
    3333$r=$quota->getquota("dom"); 
    3434if ($q["t"]>0 && $r["u"]>0) { 
    3535?> 
    3636<tr><td nowrap="nowrap"> 
    37 <a href="sta_list.php"><?php __("Web Statistics"); ?></a><br /> 
     37<a href="aws_list.php"><?php __("Web Statistics"); ?></a><br /> 
    3838</td></tr> 
    3939<?php    }    ?> 
  • trunk/bureau/class/m_aws.php

    r1034 r1035  
    464464    $users=""; 
    465465    while ($db->next_record()) { 
    466         $users.=$db->("login")." "; 
    467     } 
    468     $s=str_replace("%HOSTNAME%",$hostname,$s); 
    469     $s=str_replace("%USERS%",$users,$s); 
    470     $f=fopen($this->CONFDIR."/awstats.".$db->f("hostname").".conf","wb"); 
     466        $users.=$db->f("login")." "; 
     467    } 
     468    $s=str_replace("%%HOSTNAME%%",$hostname,$s); 
     469    $s=str_replace("%%USERS%%",$users,$s); 
     470    $f=fopen($this->CONFDIR."/awstats.".$hostname.".conf","wb"); 
    471471    fputs($f,$s,strlen($s)); 
    472472    fclose($f); 
Note: See TracChangeset for help on using the changeset viewer.