Changeset 14121
- Timestamp:
- 06/08/12 17:02:06 (12 years ago)
- Location:
- trunk/FACT++/www/smartfact
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/www/smartfact/index.js
r14105 r14121 29 29 function onload() 30 30 { 31 try { var dummy = new XMLHttpRequest(); } 31 try 32 { 33 var xmlLoad = new XMLHttpRequest(); 34 xmlLoad.open('POST', "index.php?load", true); 35 xmlLoad.onload = function() 36 { 37 if (xmlLoad.status!=200) 38 { 39 //alert("ERROR[0] - HTTP request '"+xmlLoad.statusText+" ["+xmlLoad.status+"]"); 40 return; 41 } 42 if (xmlLoad.responseText.length>0) 43 alert(xmlLoad.responseText); 44 }; 45 xmlLoad.send(null); 46 } 32 47 catch(e) 33 48 { -
trunk/FACT++/www/smartfact/index.php
r13891 r14121 61 61 } 62 62 // -------------------------------------------------------------------- 63 64 if (isset($_GET['load'])) 65 { 66 $d = date("Y/m"); 67 68 $path = "log/".$d; 69 70 if (!file_exists($path)) 71 mkdir($path, 0777, true); 72 73 $addr = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "-"; 74 $user = isset($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : "-"; 75 $dns = gethostbyaddr($addr); 76 77 $file = fopen($path."/smartfact.log", "a"); 78 fwrite($file, date("Y/m/d H:i:s ").$addr." ".$dns." ".$user."\n"); 79 fclose($file); 80 81 return; 82 } 63 83 64 84 if (isset($_GET['logout']))
Note:
See TracChangeset
for help on using the changeset viewer.