2012-08-30 12:50:19 +00:00
< ? php
/*
----------------------------------------------------------------------
AlternC - Web Hosting System
Copyright ( C ) 2000 - 2012 by the AlternC Development Team .
https :// alternc . org /
----------------------------------------------------------------------
LICENSE
This program is free software ; you can redistribute it and / or
modify it under the terms of the GNU General Public License ( GPL )
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
To read the license please visit http :// www . gnu . org / copyleft / gpl . html
----------------------------------------------------------------------
Purpose of file : List awstats statistics and manage them .
----------------------------------------------------------------------
*/
require_once ( " ../class/config.php " );
include_once ( " head.php " );
2017-08-16 17:59:33 +00:00
$nosta = false ;
if ( ! $r = $aws -> get_list ()) {
$msg -> raise ( 'Info' , " aws " , _ ( " No statistics currently defined " ));
$nosta = true ;
}
$create = true ;
if ( ! $quota -> cancreate ( " aws " )) {
$msg -> raise ( 'Info' , " aws " , _ ( " Your stat quota is over... " ));
$create = false ;
}
2013-01-31 12:54:12 +00:00
?>
< h3 >< ? php __ ( " Statistics List " ); ?> </h3>
< hr id = " topbar " />
< br />
2017-08-16 17:59:33 +00:00
< ? php
echo $msg -> msg_html_all ( " <li> " , true , true );
?>
2013-01-31 12:54:12 +00:00
< p >
< ? php
2017-08-16 17:59:33 +00:00
//echo "<pre>";print_r($mem);echo "</pre>";
2012-08-30 12:50:19 +00:00
?>
2013-01-31 12:54:12 +00:00
< span class = " ina " >< a href = " aws_users.php " >< ? php __ ( " Manage allowed users' accounts " ); ?> </a></span><br /><br />
2012-08-30 12:50:19 +00:00
< ? php
2017-08-16 17:59:33 +00:00
if ( $create ) { ?>
2013-01-31 12:54:12 +00:00
< span class = " ina " >< a href = " aws_add.php " >< ? php __ ( " Create new Statistics " ); ?> </a></span><br />
< ? php } // cancreate ?>
2012-08-30 12:50:19 +00:00
</ p >
2013-01-31 12:54:12 +00:00
< ? php if ( ! $nosta ) { ?>
2012-08-30 12:50:19 +00:00
< form method = " post " action = " aws_del.php " >
2016-05-20 12:25:46 +00:00
< ? php csrf_get (); ?>
2012-08-30 12:50:19 +00:00
< table cellspacing = " 0 " cellpadding = " 4 " >
< tr >< th colspan = " 2 " >< ? php __ ( " Action " ); ?> </th><th><?php __("Domain name"); ?></th><th><?php __("Allowed Users"); ?></th><th><?php __("View the statistics"); ?></th></tr>
< ? php
reset ( $r );
$col = 1 ;
2013-01-31 12:54:12 +00:00
while ( list ( $key , $val ) = each ( $r )) {
2012-08-30 12:50:19 +00:00
$col = 3 - $col ;
?>
< tr class = " lst<?php echo $col ; ?> " >
< td >< input type = " checkbox " class = " inc " id = " del_<?php echo $val["id"] ; ?> " name = " del_<?php echo $val["id"] ; ?> " value = " <?php echo $val["id"] ; ?> " /></ td >
< td >< div class = " ina " >< a href = " aws_edit.php?id=<?php echo $val["id"] ?> " >< img src = " images/edit.png " alt = " <?php __( " Edit " ); ?> " title = " <?php __( " Edit " ); ?> " />< ? php __ ( " Edit " ); ?> </a></div></td>
2013-02-07 23:21:48 +00:00
< td class = 'retour-auto' >< label for = " del_<?php echo $val["id"] ; ?> " >< ? php echo $val [ " hostname " ] ?> </label></td>
2012-08-30 12:50:19 +00:00
< td >< ? php echo $val [ " users " ] ?> </td>
2013-10-17 08:15:52 +00:00
< td >< div class = " ina " >< a href = " /cgi-bin/awstats.pl?config=<?php echo $val["hostname"] ; ?> " target = " _blank " >< img src = " images/stat.png " alt = " <?php __( " View the statistics " ); ?> " />< ? php __ ( " View the statistics " ); ?> </a></div></td>
2012-08-30 12:50:19 +00:00
</ tr >
2013-01-31 12:54:12 +00:00
< ? php } // while ?>
2012-08-30 12:50:19 +00:00
2013-01-31 12:54:12 +00:00
< tr >< td colspan = " 5 " >< input type = " submit " class = " inb " name = " submit " onClick = 'return confirm("<?php __("Are you sure you want to delete the selected statistics?");?>");' value = " <?php __( " Delete the checked Statistics " ); ?> " /></ td ></ tr >
2012-08-30 12:50:19 +00:00
</ table >
</ form >
< ? php
2013-01-31 12:54:12 +00:00
} // if !nosta
2012-08-30 12:50:19 +00:00
2013-01-31 12:54:12 +00:00
include_once ( " foot.php " );
2012-08-30 12:50:19 +00:00
?>