The database has errors, so we need to wait for that to be
fixed...
Some speed fixes:
- do not search in the DB if we were unable to find any
helpful data in the index. A full DB search is something
we should not do because of performance reasons
- return a two element array in the index lookup specifying
a range where the IP should be in the DB (if it is correct).
If we pass that range, we were unable to find the IP.
This reduces the number of compared records significantly
Note that this is not a fix for Rasmus' and others'
lookup problems. That is caued by the DB containing
overlapping IP ranges, which are not OK for our indexer,
and would even not return valid results in an SQL
'BETWEEN' search [which is the recommended search
method on ip-to-country.com].
them disabled now, so autoglobal vars should work on
all mirrors without special preparation
Use $_SERVER['DOCUMENT_ROOT'] for includes
instead of a user defined constant, as the docroot
value is always available [even before prepend.inc]
This ensures consistency and causes no stat() calls
Add myphpnet_...() functions to load, get/set and save
the user preferences, and use them everywhere. This
enables us to easily add new preferences to the same
cookie. Every preference will last for a year this way,
and the cookie will only be set again, if someone
modifies his data on my.php
If this works nicely, then we can easily add a preferred
mirror site setting (and more)
[These changes seem to work on my local mirror]
the correct URI of a manual page which is currently served.
The code uses no external calls, it is based on config params
provided by sendmanualheaders() and manualheaders(), which
are always properly parameterized on all manpages and are
always called.
The <base> printout is added with a comment now,
so we can see if it works correcly. If yes, that the
comment signs can be removed, making that effective.
Then all the manual shortcuts can be changed to include()
manual pages instead of redirecting to them. Relative
links will work.
# As it now stands phpweb uses EXTREMELY inefficient way of including files
# by relying on the include_path parameter. Which causes at least 2 useless
# stat() calls for every include. By prefixing all includes & requires for
# files from include/ with the __PHPWEB_INC_PATH__ constants this is avoided.
instead to print out the '[+] add a note' part at the
top and the bottom of user notes
Also use a small font to be like the text around
Remove ending ?> for include header() safetly reasons
have no official direct interface for direct downloads,
and it would be painfull to maintain one
Also make the download code much more modern using
$_SERVER and $_REQUEST vars, instead of globals,
also use i2c_realip() for more accurate() IP detection
a cookie for all mirror sites, and use it for
country and last language cookies set by our
code
Also add code to remember the last search term
and selected search option in a cookie (JS code
will come to handle this on the client side)
# phpweb guys: please make it a point to try and use make_image() function
# for generating images where you can. It allows us to manage the load
# a little easier
country bold. This JS file will be expanded in the future
to add features like last search keyword / last selected
search option remembering
This JS was tested in Mozilla, Galeon and Konqueror
with success and the code was human checked against
MSDN for Internet Explorer questions. It also includes
a BC check for browsers without DOM support.