} } else { $d = Sql_Fetch_Row($req); $attid = $d[0]; } $import_attribute[$attribute] = array("index" => $i, "record" => $attid); } } if (!isset($emailindex)) { Fatal_error($GLOBALS['I18N']->get("Cannot find the email in the header")); } if (!isset($passwordindex)) { Fatal_error($GLOBALS['I18N']->get("Cannot find the password in the header")); } if (!isset($loginnameindex)) { Fatal_error($GLOBALS['I18N']->get("Cannot find the loginname in the header")); } // Parse the lines into records $c = 1; $invalid_email_count = 0; foreach ($email_list as $line) { $values = explode($import_field_delimiter, $line); $email = clean($values[$emailindex]); $password = $values[$passwordindex]; $loginname = $values[$loginnameindex]; $invalid = 0; if (!$email) { if ($test_input && $show_warnings) { Warn($GLOBALS['I18N']->get('Record has no email') . ": " . $c->{$line}); } $email = $GLOBALS['I18N']->get('Invalid Email') . " " . $c;
Sql_Query(sprintf('insert into %s (name,type,listorder,default_value,required,tablename) values("%s","%s",0,"",0,"%s")', $tables["adminattribute"],addslashes($attribute),"textline",$lc_name)); $attid = Sql_Insert_id(); } else $attid = 0; } else { $d = Sql_Fetch_Row($req); $attid = $d[0]; } $import_attribute[$attribute] = array("index"=>$i,"record"=>$attid); } } if (!isset($emailindex)) Fatal_error("Cannot find the email in the header"); if (!isset($passwordindex)) Fatal_error("Cannot find the password in the header"); if (!isset($loginnameindex)) Fatal_error("Cannot find the loginname in the header"); // Parse the lines into records $c = 1;$invalid_email_count = 0; foreach ($email_list as $line) { $values = explode($import_field_delimiter,$line); $email = clean($values[$emailindex]); $password = $values[$passwordindex]; $loginname = $values[$loginnameindex]; $invalid = 0; if (!$email) { if ($test_input && $show_warnings) Warn("Record has no email: $c -> $line"); $email = "Invalid Email $c"; $invalid = 1;