Ejemplo n.º 1
0
 *
 * 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());
Ejemplo n.º 2
0
    $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);
    if ($iIndex == 0) {
        $iPartDay = abs(date("s", $clsAWStats->dtLastUpdate));
        $iPartDay += abs(date("i", $clsAWStats->dtLastUpdate)) * 60;
        $iPartDay += abs(date("H", $clsAWStats->dtLastUpdate)) * 60 * 60;
        $iPartDay = $iPartDay / (60 * 60 * 24);
        $iDaysInMonth = number_format(abs(date("d", $clsAWStats->dtLastUpdate)) - 1 + $iPartDay, 3);
    }
    // create xml body
    if ($g_aLogFiles[$iIndex][1] == true) {
        $aXML[] = "<month month=\"" . date("n", $g_aLogFiles[$iIndex][0]) . "\" " . "year=\"" . date("Y", $g_aLogFiles[$iIndex][0]) . "\" " . "daysinmonth=\"" . $iDaysInMonth . "\" " . "visits=\"" . abs($clsAWStats->iTotalVisits) . "\" " . "uniques=\"" . abs($clsAWStats->iTotalUnique) . "\" " . "pages=\"" . $iPages . "\" " . "hits=\"" . $iHits . "\" " . "bw=\"" . $iBW . "\" " . "/>\n";
    } else {
        $aXML[] = "<month month=\"" . date("n", $g_aLogFiles[$iIndex][0]) . "\" " . "year=\"" . date("Y", $g_aLogFiles[$iIndex][0]) . "\" " . "daysinmonth=\"" . $iDaysInMonth . "\" " . "visits=\"0\" uniques=\"0\" pages=\"0\" hits=\"0\" bw=\"0\" />\n";
    }
    // increment month
    $iMonth++;
}
// output
$aXML[] = "</data>";
$aXML[] = "<info lastupdate=\"" . $iMaxLastUpdate . "\" />\n";
$clsAWStats->OutputXML(implode("", $aXML));
Ejemplo n.º 3
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":
    case "SIDER":
    case "SIDER_404":
    case "TIME":
        $clsAWStats->OutputXML($clsAWStats->CreateXMLString($sSection));
        break;
}
Ejemplo n.º 4
0
 * 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));