2 /***********************************************************************/
4 /***********************************************************************/
5 /* Copyright (c) 2002-2009 */
6 /* Adaptive Technology Resource Centre / Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /***********************************************************************/
14 $_user_location = 'public';
16 define('AT_INCLUDE_PATH', '../../include/');
17 require(AT_INCLUDE_PATH.'vitals.inc.php');
19 if (isset($_GET['id'], $_GET['m'])) {
20 $id = intval($_GET['id']);
23 $sql = "SELECT email, requested_date FROM ".TABLE_PREFIX."jb_employers WHERE id=$id AND approval_state=".AT_JB_STATUS_UNCONFIRMED;
24 $result = mysql_query($sql, $db);
25 if ($row = mysql_fetch_assoc($result)) {
26 $code = substr(md5($row['email'] . $row['requested_date'] . $id), 0, 10);
29 $sql = "UPDATE ".TABLE_PREFIX."jb_employers SET approval_state=".AT_JB_STATUS_CONFIRMED.", last_login=NOW() WHERE id=$id";
30 mysql_query($sql, $db);
31 $msg->addFeedback('CONFIRM_GOOD');
35 $msg->addError('CONFIRM_BAD');
40 header('Location: index.php');