Migrate all DB code to use PDO

All DB code currently uses the quickly aging mysql_* functions. These
functions are strongly discouraged and may eventually be deprecated.

Transition all code to utilize the PDO data access abstraction layer. PDO
allows for consistent query code across multiple databases. This could
potentially allow for someone to use a database other than MySQL with
minimal code changes.

All functions and behaviors are reproduced as faithfully as possible with
PDO equivalents and some changes in code.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Adjust user directions after registering to reflect new login page

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
logout.php: Fix PHP undefined variable notice

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Add the new package icon back to the front page

This regression was introduced with d2480e8b9d3d0f946d57fa9422811cb37296b8b4.
Re-implement the functionality in a cleaner way.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Use the "new" icon from archweb for the recent updates table

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Remove unused image "titlelogo.png"

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
pkg_comment_form.php: Fix PHP undefined variable notice for package "ID"

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Fix account search page results routing to /account/

Account search page has /account/ in the address bar when it should still be
/accounts/. The only time /account/ should be used is on a specific user's
page.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Use URL rewriting for user info page

Navigation to the "AccountInfo" page should only require a user to know the
username of the account they are looking for. Update all AUR links that use
the user info page to reflect the new URL.

Before:
AUR_URL/account/?Action=AccountInfo&U=userfoo

After:
AUR_URL/account/userfoo

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Use URL rewriting for user editing page

Allows for easier account editing and saner URLs. Update account editing links
to use new URL.

Before:
AUR_URL/account/?Action=DisplayAccount&U=userfoo

After:
AUR_URL/account/userfoo/edit

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Use URL rewriting for user account update page

The "UpdateAccount" page displays information as to whether an account
update was successful. All POST account info goes to this page, so use
it with sane URLs.

Before:
AUR_URL/account/?Action=UpdateAccount&U=userfoo

After:
AUR_URL/account/userfoo/update

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Overhaul ability to edit own account

* Restructure account.php to remove redundant code.
* Remove own_account_details().
* Rework logic check to default to no access to account edit form.
* Make default account action viewing account info.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
header.php: Update account editing link

* Use AUR_URL/account/userfoo/edit format for own account editing.
* Change "Accounts" label to "My Account" for regular users.
* Add ability for Developers and Trusted Users to edit their account
without having to use the search form first.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Make account registration work with recent account editing changes

The account editing form requires two different form action URLs
due to the fact that the same template is shared for both account
registration and account editing.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>