This is my code, from step 4, and 100 lines above it!
$msg = $lang['invalid_email'];
}
}
$action = "lostpassword";
}
if ($action == "lostpassword") {
$txt_clickstream = $lang['lost_password'];
$user_email = (isset($HTTP_POST_VARS['user_email'])) ? format_text(stripslashes($HTTP_POST_VARS['user_email']), 2) : "";
$site_template->register_vars(array(
"lang_email" => $lang['email'],
"lang_lost_password" => $lang['lost_password'],
"lang_lost_password_msg" => $lang['lost_password_msg'],
"lang_submit" => $lang['submit'],
"user_email" => $user_email,
));
$content = $site_template->parse_template("member_lostpassword");
}
//-----------------------------------------------------
//--- Edit Profile ------------------------------------
//-----------------------------------------------------
$update_process = 0;
$new_email_msg = "";
//-----------------------------------------------------
//--- Show uploaded images from edit profile ----------
//-----------------------------------------------------
if ($action == "show_uploaded_images") {
$sql1 = "
SELECT i.image_id, i.image_name, i.image_thumb_file, i.image_media_file, i.cat_id" . get_user_table_field(", u.", "user_name") . "
FROM (" . IMAGES_TABLE . " i, " . CATEGORIES_TABLE . " c)
LEFT JOIN " . USERS_TABLE . " u ON (" . get_user_table_field("u.", "user_id") . " = i.user_id)
WHERE i.image_active = 1 AND i.cat_id = c.cat_id AND " . get_user_table_field("u.", "user_id") . " = i.user_id AND i.user_id = " . $user_info['user_id'] . " AND (i.cat_id NOT IN (".get_auth_cat_sql("auth_viewimage", "NOTIN").", ".get_auth_cat_sql("auth_viewcat", "NOTIN")."))
ORDER BY i.image_date DESC
";
$result = $site_db->query($sql1);
$num_rows = $site_db->get_numrows($result);
if (!$num_rows) {
$uploaded_images_from_edit_profile = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
$uploaded_images_from_edit_profile .= $lang['no_new_images'];
$uploaded_images_from_edit_profile .= "</td></tr></table>";
}
else {
$uploaded_images_from_edit_profile = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
$count = 0;
$bgcounter = 0;
while ($uploaded_images_from_edit_profile_row = $site_db->fetch_array($result)) {
$user_name = format_text(trim(ucfirst($uploaded_images_from_edit_profile_row[$user_table_fields['user_name']]), 2));
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$uploaded_images_from_edit_profile .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$uploaded_images_from_edit_profile .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
show_image($uploaded_images_from_edit_profile_row);
$uploaded_images_from_edit_profile .= $site_template->parse_template("thumbnail_bit");
$uploaded_images_from_edit_profile .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$uploaded_images_from_edit_profile .= "</tr>\n";
$count = 0;
}
} // end while
if ($count > 0) {
$leftover = ($config['image_cells'] - $count);
if ($leftover >= 1) {
for ($f = 0; $f < $leftover; $f++) {
$uploaded_images_from_edit_profile .= "<td width=\"".$imgtable_width."\">\n \n</td>\n";
}
$uploaded_images_from_edit_profile .= "</tr>\n";
}
}
$uploaded_images_from_edit_profile .= "</table>\n";
} // end else
$site_template->register_vars("lang_uploaded_images_from_edit_profile", $lang['uploaded_images_from_edit_profile']);
$site_template->register_vars("uploaded_images_from_edit_profile", $uploaded_images_from_edit_profile);
$site_template->register_vars("lang_uploaded_images_go_back", $lang['uploaded_images_go_back']);
$content = $site_template->parse_template("member_editprofile");
$txt_clickstream = $lang['show_uploaded_images'];
unset($uploaded_images_from_edit_profile);
}
if ($action == "updateprofile") {
$txt_clickstream = $lang['control_panel'];
if ($user_info['user_level'] == GUEST) {
show_error_page($lang['no_permission']);
exit;
}
$user_email = (isset($HTTP_POST_VARS['user_email'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['user_email'])) : "";
$user_email2 = (isset($HTTP_POST_VARS['user_email2'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['user_email2'])) : "";
/*
MOD MULTI-LIGHTBOXES
START INSERT
*/
$user_lightbox = "";
$limit = ($user_row['user_lightbox_count'] == -1 || !$config['lightbox_count'] || $user_row['user_level'] == ADMIN) ? -1 : (($user_row['user_lightbox_count']) ? $user_row['user_lightbox_count'] : $config['lightbox_count']);
if ((($user_row['user_lightbox_private'] || $user_row['user_level'] == ADMIN) && $config['lightbox_share']) || $user_info['user_level'] == ADMIN)
{
$condition = "";
if ($limit != -1)
{
$condition = " LIMIT ".$limit;
}
$condition;
$sql = "SELECT lightbox_id, lightbox_name, lightbox_private, lightbox_image_ids
FROM ".LIGHTBOXES_TABLE."
WHERE user_id = ".$user_row['user_id'].$condition;
$result = $site_db->query($sql);
if ($result)
{
while ($row = $site_db->fetch_array($result))
{
if (!$row['lightbox_private'] || $user_info['user_level'] == ADMIN)
{
$user_lightbox .= (($user_lightbox) ? "<br />" : "").(($user_info['user_level'] == ADMIN) ? ((!$row['lightbox_private']) ? "+ " : "- ") : "")."<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php?lightbox_id=".$row['lightbox_id'])."\">".$row['lightbox_name']." (".((trim($row['lightbox_image_ids'])) ? count(explode(" ", trim($row['lightbox_image_ids']))) : 0).")</a>\n";
}
}
}
}
$site_template->register_vars(array(
"user_lightbox" => $user_lightbox,
"lang_user_lightbox" => $lang['user_lightbox'],
));
/*
MOD MULTI-LIGHTBOXES
END INSERT
*/
Thanks for help!