$page['num_step'] = "3"; $page['show_step_1'] = ''; $page['show_step_2'] = ''; $page['show_step_3'] = "1"; $page['show_step_4'] = ''; } else { # there was an error $page['nb_column'] = sizeof($_POST['match_field']); $page['nb_line'] = sizeof($_POST['data']); for ($i = 0; $i < $page['nb_line']; $i++) { $page['line'][$i]['i'] = $i; $page['line'][$i]['mod'] = $i % 2; $page['line'][$i]['column'] = array(); for ($j = 0; $j < $page['nb_column']; $j++) { $page['line'][$i]['column'][$j]['value'] = format_txt($_POST['data'][$i][$j]); $page['line'][$i]['column'][$j]['example'] = text_tronquer($_POST['data'][$i][$j], 20, 1); $page['line'][$i]['column'][$j]['i'] = $i; $page['line'][$i]['column'][$j]['j'] = $j; } } } } elseif (isset($_POST['step']) and $_POST['step'] == "associate_value" and $right_user['import_match']) { # we check submited data # we check that all records have a corresponding value if (isset($_POST['value']) and !empty($_POST['value'])) { $nb_value = sizeof($_POST['value']); for ($i = 0; $i < $nb_value; $i++) { if (empty($_POST['value_associate'][$i]) and $nb_error == 0) { // error :: each value must be associated $page['erreur'][$nb_error]['message'] = $lang['match']['E_empty_value_associate']; $nb_error++;
if (!isset($var['order'])) { $var['order'] = " ORDER BY dm.message_date_add DESC "; } $sql_topic = sql_replace($sql['forum']['select_topic'], $var); $sgbd = sql_connect(); $res_message = sql_query($sql_topic); $nb_ligne = sql_num_rows($res_message); if ($nb_ligne == "0") { $page['L_message_topic'] = $lang['forum']['E_message_not_found']; } else { $i = "0"; while ($ligne = sql_fetch_array($res_message)) { $page['topic'][$i]['forum'] = $ligne['forum_name']; $page['topic'][$i]['id'] = $ligne['message_id']; $page['topic'][$i]['title'] = $ligne['message_title']; $page['topic'][$i]['title_court'] = text_tronquer($ligne['message_title'], 30); $page['topic'][$i]['message'] = $ligne['message_text']; $page['topic'][$i]['login'] = $ligne['member_login']; $page['topic'][$i]['link_member'] = convert_url("index.php?r=" . $lang['general']['idurl_member'] . "&v1=view&v2=" . $ligne['member_id']); $page['topic'][$i]['L_guest'] = ""; if ($ligne['member_login'] == NULL) { $page['topic'][$i]['L_guest'] = $lang['forum']['guest']; } $page['topic'][$i]['date'] = convert_date($ligne['message_date_add'], $lang['forum']['format_date_php']); $page['topic'][$i]['visit'] = $ligne['message_visit']; $page['topic'][$i]['reponse'] = $ligne['message_nb_reply']; $page['topic'][$i]['login_last'] = $ligne['member_login_last']; $page['topic'][$i]['L_last_guest'] = ""; if ($ligne['member_login_last'] == NULL) { $page['topic'][$i]['L_last_guest'] = $lang['forum']['guest']; }