Added new structure for iplookups (ie called from logs).
[moodle.git] / iplookup / index.php
CommitLineData
f4fb66d7 1<?php // $Id$
2 // Do an IP lookup of a user, using selected plugin
3
4 require('../config.php');
5
6 require_login();
7
8 $ip = optional_param('ip', getremoteaddr());
9 $user = optional_param('user', $USER->id);
10
11 if (empty($CFG->iplookup)) {
12 set_config('iplookup', 'ipatlas');
13 }
14
15 require("$CFG->dirroot/iplookup/$CFG->iplookup/lib.php");
16
17 iplookup_display($ip, $user);
18
19?>