-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalytics.php
More file actions
47 lines (43 loc) · 1.17 KB
/
analytics.php
File metadata and controls
47 lines (43 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?
$strAbsPath = "/home/paulthetutor/paulthetutors.com";
include($strAbsPath . "/includes/pttec_includes.phtml");
MySQL_PaulTheTutor_Connect();
$popup = $_REQUEST[popup];
// printarray($_REQUEST);
?>
<?php
put_ptts_header("Applying For Admin Position", $strAbsPath, "", $popup);
?>
<?php
/*function check_and_update_visits() {
$url = $_SERVER['REQUEST_URI'];
$db_result = singlequery("SELECT count(*) FROM PT_Analytics where URL = '$url'");
$result = "";
/*while($row = mysql_fetch_array($db_result)) {
if($row['url'] == $url) {
mysql_query("UPDATE PT_Analytics SET visits = visits + 1
WHERE url = '".$url."';");
} else {
mysql_query("INSERT INTO PT_Analytics(url, visits)
VALUES ('" .$url. "', 1);");
}
}
if($db_result == 0) {
$result = "insert";
$iq = "INSERT INTO PT_Analytics(url, visits) VALUES ('$url', 1);";
mysql_query($iq);
} else {
$result = "update";
mysql_query("UPDATE PT_Analytics SET visits = visits + 1
WHERE url = '$url';");
}
echo "The results are: $result <br> url is: $url" ;
}
*/
//check_and_update_visits();
?>
<?
MySQL_PaulTheTutor_Connect();
analytics();
put_ptts_footer("popup");
?>