Nieuw lid |
|
Ik krijg deze error vanuit mijn index.php:
Fatal error: Call to a member function on a non-object in test/index.php on line 156
de code op lijn 156:
$row = $rs->GetRowAssoc(false);
$row = $rs->GetRowAssoc(false);
de totale code:
if(!$form["gender_1"]) $form["gender_1"] = 2;
if(!$form["gender_2"]) $form["gender_2"] = 1;
$strSQL = "select distinct a.id, b.".$field_name." as name, c.".$field_name." as name_search from ".USER_TYPES_SPR_TABLE." a left join ".REFERENCE_LANG_TABLE." b on b.table_key='".$multi_lang->TableKey(USER_TYPES_SPR_TABLE, 1)."' and b.id_reference=a.id left join ".REFERENCE_LANG_TABLE." c on c.table_key='".$multi_lang->TableKey(USER_TYPES_SPR_TABLE, 2)."' and c.id_reference=a.id where a.status='1' order by a.sorter ";
$rs = $dbconn->Execute($strSQL);
$i=0;
while(!$rs->EOF){
$row = $rs->GetRowAssoc(false);
$gender_arr[$i]["id"] = $row["id"];
$gender_arr[$i]["name"] = $row["name"];
$gender_arr[$i]["name_search"] = $row["name_search"];
if(intval($form["gender_1"]) == $row["id"])
$gender_arr[$i]["sel"] = 1;
else
$gender_arr[$i]["sel"] = 0;
if(intval($form["gender_2"]) == $row["id"])
$gender_arr[$i]["sel_search"] = 1;
else
$gender_arr[$i]["sel_search"] = 0;
$rs->MoveNext();
$i++;
}
$smarty->assign("gender", $gender_arr);
$strSQL = "select count(*) from ".ACTIVE_SESSIONS_TABLE." group by id_user";
$rs = $dbconn->Execute($strSQL);
$form["user_online"] = $rs->fields[0];
$form["login_action"] = $file_name;
$form["search_action"] = "./quick_search.php";
$form["search_hiddens"] = "<input type=hidden name=sel value=search>";
$form["search_hiddens"] .= "<input type=hidden name=search_type value=".$search_type.">";
$form["search_hiddens"] .= "<input type=hidden name=flag_country value=0>";
$form["register_link"] = "./registration.php";
$form["learn_more_link"] = "./registration.php";
$form["online_link"] = "./quick_search.php?sel=search_on";
$form["login_link"] = "./index.php?sel=login";
$form["lost_passw_link"] = "./lost_pass.php";
$form["search_type"] = $search_type;
if($user == "err") $form["login_err"] = "1";
$smarty->assign("header", $lang["home_page"]);
$smarty->assign("top_index_menu", $config_index["top_menu_index"]);
$smarty->assign("form", $form);
$smarty->assign("alt", $lang["alt"]);
$smarty->assign("err", $lang["err"]);
$smarty->display(TrimSlash($config["index_theme_path"])."/index_home_page.tpl");
exit;
}
?>
if(!$form["gender_1"]) $form["gender_1"] = 2; if(!$form["gender_2"]) $form["gender_2"] = 1; $strSQL = "select distinct a.id, b.".$field_name." as name, c.".$field_name." as name_search from ".USER_TYPES_SPR_TABLE." a left join ".REFERENCE_LANG_TABLE." b on b.table_key='".$multi_lang->TableKey(USER_TYPES_SPR_TABLE, 1)."' and b.id_reference=a.id left join ".REFERENCE_LANG_TABLE." c on c.table_key='".$multi_lang->TableKey(USER_TYPES_SPR_TABLE, 2)."' and c.id_reference=a.id where a.status='1' order by a.sorter "; $rs = $dbconn->Execute($strSQL); $i=0; while(!$rs->EOF){ $row = $rs->GetRowAssoc(false); $gender_arr[$i]["id"] = $row["id"]; $gender_arr[$i]["name"] = $row["name"]; $gender_arr[$i]["name_search"] = $row["name_search"]; if(intval($form["gender_1"]) == $row["id"]) $gender_arr[$i]["sel"] = 1; else $gender_arr[$i]["sel"] = 0; if(intval($form["gender_2"]) == $row["id"]) $gender_arr[$i]["sel_search"] = 1; else $gender_arr[$i]["sel_search"] = 0; $rs->MoveNext(); $i++; } $smarty->assign("gender", $gender_arr); $strSQL = "select count(*) from ".ACTIVE_SESSIONS_TABLE." group by id_user"; $rs = $dbconn->Execute($strSQL); $form["user_online"] = $rs->fields[0]; $form["login_action"] = $file_name; $form["search_action"] = "./quick_search.php"; $form["search_hiddens"] = "<input type=hidden name=sel value=search>"; $form["search_hiddens"] .= "<input type=hidden name=search_type value=".$search_type.">"; $form["search_hiddens"] .= "<input type=hidden name=flag_country value=0>"; $form["register_link"] = "./registration.php"; $form["learn_more_link"] = "./registration.php"; $form["online_link"] = "./quick_search.php?sel=search_on"; $form["login_link"] = "./index.php?sel=login"; $form["lost_passw_link"] = "./lost_pass.php"; $form["search_type"] = $search_type; if($user == "err") $form["login_err"] = "1"; $smarty->assign("header", $lang["home_page"]); $smarty->assign("top_index_menu", $config_index["top_menu_index"]); $smarty->assign("form", $form); $smarty->assign("alt", $lang["alt"]); $smarty->assign("err", $lang["err"]); $smarty->display(TrimSlash($config["index_theme_path"])."/index_home_page.tpl"); } ?>
Weet iemand waar de fout kan zitten??
|