| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | include(INCLUDESPATH.'/countries_list.inc.php'); |
|---|
| 26 | |
|---|
| 27 | unset($labels['profile']['country']['(null)']); |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | if(!$_SESSION['my_login']) |
|---|
| 31 | { |
|---|
| 32 | header('Location: /new'); |
|---|
| 33 | exit(); |
|---|
| 34 | } |
|---|
| 35 | |
|---|
| 36 | if($_SESSION['my_login'] && $_SESSION['my_status']=='ok') |
|---|
| 37 | { |
|---|
| 38 | header('Location: /my/profile/general'); |
|---|
| 39 | exit(); |
|---|
| 40 | } |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | $_SMARTY['Title'] = 'Profile creation'; |
|---|
| 44 | |
|---|
| 45 | $step = array( |
|---|
| 46 | _('You'), |
|---|
| 47 | _('Contact'), |
|---|
| 48 | _('Job'), |
|---|
| 49 | _('Interests'), |
|---|
| 50 | _('Personal'), |
|---|
| 51 | _('Photo'), |
|---|
| 52 | _('Finish')); |
|---|
| 53 | |
|---|
| 54 | $t_name = 'user_general'; |
|---|
| 55 | $my['general'] =& $db->getRow('SELECT relationship_status ,birthday ,here_for ,children ,gender ,fashion ,smoking ,drinking ,living ,web ,description FROM ! WHERE id=?', array($t_name, $_SESSION['my_id'])); |
|---|
| 56 | $my['general']['here_for'] = split(',', $my['general']['here_for']); |
|---|
| 57 | $my['general']['fashion'] = split(',', $my['general']['fashion']); |
|---|
| 58 | $my['general']['living'] = split(',', $my['general']['living']); |
|---|
| 59 | |
|---|
| 60 | if( DB::isError( $my['general'] ) ) |
|---|
| 61 | error_log($_SERVER['HTTP_HOST'].' | Erreyr SQL dans '.__FILE__.': '.$my['general']->getMessage()); |
|---|
| 62 | $access_list[$t_name] = get_access_list($_SESSION['my_id'], $t_name ); |
|---|
| 63 | |
|---|
| 64 | |
|---|
| 65 | |
|---|
| 66 | $t_name = 'user_contact'; |
|---|
| 67 | $t_fields = implode(',', array_keys($table_fields[$t_name])); |
|---|
| 68 | $my['contact'] =& $db->getRow('SELECT ! FROM ! WHERE id=?', array($t_fields, $t_name, $_SESSION['my_id'])); |
|---|
| 69 | |
|---|
| 70 | if( DB::isError($user_contact) ) |
|---|
| 71 | error_log($_SERVER['HTTP_HOST'].' | Erreyr SQL dans '.__FILE__.': '.$user_contact->getMessage()); |
|---|
| 72 | $access_list[$t_name] = get_access_list($_SESSION['my_id'], $t_name ); |
|---|
| 73 | |
|---|
| 74 | |
|---|
| 75 | $t_name = 'user_professional'; |
|---|
| 76 | $my['professional'] =& $db->getRow('SELECT occupation, industry, company, web, title, description, email, phone FROM ! WHERE id=?', array($t_name, $_SESSION['my_id'])); |
|---|
| 77 | if( DB::isError($my['professional']) ) |
|---|
| 78 | error_log($_SERVER['HTTP_HOST'].' | Erreyr SQL dans '.__FILE__.': '.$my['professional']->getMessage()); |
|---|
| 79 | $access_list[$t_name] = get_access_list($_SESSION['my_id'], $t_name ); |
|---|
| 80 | |
|---|
| 81 | |
|---|
| 82 | $t_name = 'user_interests'; |
|---|
| 83 | $t_fields = implode(',', array_keys($table_fields[$t_name])); |
|---|
| 84 | $my['interests'] =& $db->getRow('SELECT ! FROM ! WHERE id=?', array($t_fields, $t_name, $_SESSION['my_id'])); |
|---|
| 85 | if( DB::isError($user_interests) ) |
|---|
| 86 | error_log($_SERVER['HTTP_HOST'].' | Erreyr SQL dans '.__FILE__.': '.$user_interests->getMessage()); |
|---|
| 87 | |
|---|
| 88 | |
|---|
| 89 | $my['personal'] =& $db->getRow('SELECT headline ,notice ,size , eye ,hair ,body_art ,best_feature ,things_i_cant_live_without ,ideal_match FROM user_personal WHERE id=?', array($_SESSION['my_id'])); |
|---|
| 90 | $my['personal']['body_art'] = split(',', $my['personal']['body_art']); |
|---|
| 91 | if( DB::isError($user_personal) ) |
|---|
| 92 | error_log($_SERVER['HTTP_HOST'].' | Erreyr SQL dans '.__FILE__.': '.$user_personal->getMessage()); |
|---|
| 93 | |
|---|
| 94 | |
|---|
| 95 | $_SMARTY['access_list'] = $access_list; |
|---|
| 96 | $_SMARTY['my'] = $my; |
|---|
| 97 | |
|---|
| 98 | $_SMARTY['step'] = $step; |
|---|
| 99 | |
|---|
| 100 | ?> |
|---|