$f[$i]->name = 'mood'; $f[$i]->desc = $l['ucp-mood']; // CUSTOM ? if (!empty($user->data['custom'])) { $i++; $f[$i]->type = 'text'; $f[$i]->name = 'custom'; $f[$i]->desc = $user->data['custom']; } // ACCESS $i++; $f[$i]->type = 'select'; $f[$i]->name = 'access'; $f[$i]->desc = $l['ucp-access']; $f[$i]->value = array(1 => $l['access-public'], 2 => $l['access-friends'], 3 => $l['access-private']); // OPTIONS $i++; $options = array(array('name' => 'bb', 'value' => 'x', 'desc' => $l['ucp-opt-bb']), array('name' => 'html', 'value' => 'x', 'desc' => $l['ucp-opt-html']), array('name' => 'smiles', 'value' => 'x', 'desc' => $l['ucp-opt-smiles']), array('name' => 'comments', 'value' => 'x', 'desc' => $l['ucp-opt-comments'])); $f[$i]->type = 'checkboxes'; $f[$i]->desc = $l['ucp-options']; $f[$i]->value = $options; badHtmlFirst($merge['body']); // SUBMIT $i++; $f[$i]->type = 'submit'; $f[$i]->desc = $l['submit']; $f[$i]->value = $l['submit']; // Output. $ets->page_body .= $js_insert_window . "\n"; $ets->page_body .= build_form($f, $form, $table, $merge); }
$db->query('UPDATE ' . db_comments . ' SET body="' . $clean['body'] . '" WHERE comment_id="' . $comment_id . '" LIMIT 1;'); $ets->page_body .= $l['goodedit']; } } } if (empty($_POST) || $missing) { if ($missing) { $ets->page_body = '<div class="error">' . $l['data-problems'] . "\n"; $ets->page_body .= '<li>' . $l['all-fields-required'] . '</li></div>'; } // get username? if ($comment['author_id'] != -1) { $get = $db->getArray('SELECT username FROM ' . db_users . ' WHERE user_id=' . $comment['author_id'] . ' LIMIT 1;'); $username = $get['username']; // anti html pass 1 badHtmlFirst($comment['body']); } else { $username = $l['guest']; } // build form $form->action = 'admincp.php?action=edit_comment&id=' . $comment_id; $form->method = 'post'; $form->class = 'nlb_form'; $form->name = 'new_entry'; $table->class = 'nlb_table'; $table->width = "100%"; // USERNAME $i = 0; $f[$i]->type = 'data'; $f[$i]->desc = $l['username:']; $f[$i]->value = $username;