$user_id = 1;
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_id=:uid LIMIT 1", [":uid"=>(int)$user_id]);
if (dbrows($result)) {
$data = dbarray($result);
}
$tab["title"] = ["Home", "Profile", "Messages", "Settings"];
$tab["id"] = ["home", "profile", "messages", "settings"];
$tab_active = tab_active($tab, 0);
echo
opentab($tab, $tab_active, "my-tabs")
.opentabbody($tab["title"][0], $tab["id"][0], $tab_active);
."..."
.closetabbody()
.opentabbody($tab["title"][1], $tab["id"][1], $tab_active)
."..."
.closetabbody()
closetab();
echo
openform("form_name", "POST", FORM_REQUEST, ["id"=>"custom_form"])
.form_text("text", "Text Field", "")
.form_text("number", "Number Field", "", ["type"=>"number"])
.form_text("email", "Email", "", ["type"=>"email"])
.form_button("save_button", "Save", "save_button")
.closeform();
if (check_post("save_button")) {
$array["text"] = sanitizer("text", "", "");
$array["number"] = sanitizer("number", "", "");
$array["email"] = sanitizer("email", "", "");
if (fusion_safe()) {
dbquery_insert(DB_CONTACT, $array, "save");
}
}
echo
opencollapse("group")
.opencollapsebody("Group 1", "group1", "group")
."..."
.closecollapsebody()
.opencollapsebody("Group 2", "group2", "group")
."..."
.closecollapsebody()
.opencollapsebody("Group 3", "group3", "group")
."..."
.closecollapsebody()
.closecollapse();
echo openmodal("id", "Modal Title")
."One fine body…
"
.modalfooter(
form_button("save_changes", "Save Changes", "save_changes", ["class" => "btn-primary"]),
TRUE
)
.closemodal();
$navbar_config = [
"show_header"=>TRUE,
"custom_header"=>"Brand",
"searchbar" => TRUE,
"callback_data" => [
0 => [
"link_1" => [
"link_id" => "link_1",
"link_name" => "Link 1"
],
"link_2" => [
"link_id" => "link_2",
"link_name" => "Link 2"
],
],
"link_2" => [
"action_1" => [
"link_id" => "action_1",
"link_name" => "Action"
],
"action_2" => [
"link_id" => "action_2",
"link_name" => "Another action"
],
"action_3" => [
"link_id" => "action_3",
"link_name" => "Something else here"
],
"action_4" => [
"link_id" => "action_4",
"link_name" => "---"
],
"action_5" => [
"link_id" => "action_5",
"link_name" => "Separated link"
],
"action_6" => [
"link_id" => "action_6",
"link_name" => "---"
],
"action_7" => [
"link_id" => "action_7",
"link_name" => "One more separated link"
]
]
],
"additional_data" => [
0 => [
"link_3" => [
"link_id" => "link_3",
"link_name" => "Link 3"
]
],
"link_3" => [
"action_a1" => [
"link_id" => "action_a1",
"link_name" => "Action"
],
"action_a2" => [
"link_id" => "action_a2",
"link_name" => "Another action"
],
"action_a3" => [
"link_id" => "action_a3",
"link_name" => "Something else here"
],
"action_a4" => [
"link_id" => "action_a4",
"link_name" => "---"
],
"action_a5" => [
"link_id" => "action_a5",
"link_name" => "Separated link"
],
"action_a6" => [
"link_id" => "action_a6",
"link_name" => "---"
],
"action_a7" => [
"link_id" => "action_a7",
"link_name" => "One more separated link"
]
]
]
];
echo showsublinks("default", $navbar_config);