Пример #1
0
 * conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */
// includes
require_once "config.php";
require_once "clsAWStats.php";
// external include files
if (isset($g_aConfig["includes"]) == true && strlen($g_aConfig["includes"]) > 0) {
    $aIncludes = explode(",", $g_aConfig["includes"]);
    foreach ($aIncludes as $sInclude) {
        include $sInclude;
    }
}
// select configuraton
$g_sConfig = GetConfig();
$g_aConfig = $aConfig[$g_sConfig];
// create class
$clsAWStats = new clsAWStats($g_sConfig, $g_aConfig["statspath"], $_GET["year"], $_GET["month"]);
// create xml
$clsAWStats->OutputXML($clsAWStats->CreatePagesXMLString());
Пример #2
0
$g_aConfig = $aConfig[$g_sConfig];
if (isset($_GET["part"])) {
    $g_sConfig = $g_sConfig . "." . $_GET["part"];
}
// get date range and valid log file
$g_dtStatsMonth = ValidateDate(isset($_GET["year"]) ? $_GET["year"] : null, isset($_GET["month"]) ? $_GET["month"] : null);
$g_aLogFiles = GetLogList($g_sConfig, $g_aConfig["statspath"], $g_aConfig["statsname"]);
// create xml
$aXML = array();
$aXML[] = "<data>";
$iYear = date("Y", $g_aLogFiles[count($g_aLogFiles) - 1][0]);
$iMonth = date("n", $g_aLogFiles[count($g_aLogFiles) - 1][0]);
$iMaxLastUpdate = 0;
for ($iIndex = count($g_aLogFiles) - 1; $iIndex >= 0; $iIndex--) {
    $dtNextMonth = mktime(0, 0, 0, $iMonth + 1, 0, $iYear);
    $clsAWStats = new clsAWStats($g_sConfig, $g_aConfig["statspath"], isset($g_aConfig["statsname"]) ? $g_aConfig["statsname"] : null, date("Y", $g_aLogFiles[$iIndex][0]), date("n", $g_aLogFiles[$iIndex][0]));
    if ($clsAWStats->dtLastUpdate > $iMaxLastUpdate) {
        $iMaxLastUpdate = $clsAWStats->dtLastUpdate;
    }
    // sum pages, hits & bandwidth
    $aTemp = $clsAWStats->GetSection("DAY");
    $iPages = 0;
    $iHits = 0;
    $iBW = 0;
    for ($iIndexItem = 0; $iIndexItem < count($aTemp); $iIndexItem++) {
        $iHits += $aTemp[$iIndexItem][2];
        $iPages += $aTemp[$iIndexItem][1];
        $iBW += $aTemp[$iIndexItem][3];
    }
    // days in month
    $iDaysInMonth = date("d", $dtNextMonth);
Пример #3
0
 */
// includes
require_once "config.php";
require_once "clsAWStats.php";
// external include files
if (isset($g_aConfig["includes"]) == true && strlen($g_aConfig["includes"]) > 0) {
    $aIncludes = explode(",", $g_aConfig["includes"]);
    foreach ($aIncludes as $sInclude) {
        include $sInclude;
    }
}
// select configuraton
$g_sConfig = GetConfig();
$g_aConfig = $aConfig[$g_sConfig];
// create class
$clsAWStats = new clsAWStats($g_sConfig, $g_aConfig["statspath"], $_GET["year"], $_GET["month"]);
// create xml
$sSection = strtoupper($_GET["section"]);
switch ($sSection) {
    case "BROWSER":
    case "DAY":
    case "DOMAIN":
    case "ERRORS":
    case "FILETYPES":
    case "KEYWORDS":
    case "PAGEREFS":
    case "OS":
    case "ROBOT":
    case "SEARCHWORDS":
    case "SEREFERRALS":
    case "SESSION":
Пример #4
0
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */
require_once "defaults.php";
require_once "config.php";
require_once "clsAWStats.php";
// external include files
if (isset($g_aConfig["includes"]) == true && strlen($g_aConfig["includes"]) > 0) {
    $aIncludes = explode(",", $g_aConfig["includes"]);
    foreach ($aIncludes as $sInclude) {
        include $sInclude;
    }
}
// select configuraton
$g_sConfig = GetConfig();
$g_aConfig = $aConfig[$g_sConfig];
if (isset($_GET["part"])) {
    $g_sConfig = $g_sConfig . "." . $_GET["part"];
}
// create class
$clsAWStats = new clsAWStats($g_sConfig, $g_aConfig["statspath"], null, $_GET["year"], $_GET["month"]);
$urlAliasFile = null;
if (isset($g_aConfig["urlaliasfile"])) {
    $urlAliasFile = $g_aConfig["statspath"] . $g_aConfig["urlaliasfile"];
}
// create xml
$clsAWStats->OutputXML($clsAWStats->CreatePagesXMLString($urlAliasFile));