Code
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright ? 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+---------------------------------------------------------+
| original idea: Ronald Iwema (Scor3p) ? 2002-2005
| further development: muscapaul ? 2005-2008
| web: http://www.muscapaul.com
| email: muscapaul@gmail.com
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
include "../../maincore.php";
require_once THEMES."templates/admin_header.php";
//if (!iSUPERADMIN) { die("Access Denied"); }
if (!checkrights("XPF") || !defined("iAUTH") || $_GET['aid'] != iAUTH) { redirect("../index.php"); }
include INFUSIONS."extended_profile/infusion_db.php";
if (file_exists(INFUSIONS."extended_profile/locale/".$settings['locale'].".php")) {
include_once INFUSIONS."extended_profile/locale/".$settings['locale'].".php";
} else {
include_once INFUSIONS."extended_profile/locale/English.php";
}
// process
$error = "";
if (isset($_GET['move']) && !empty($_GET['move'])) {
$name = $_GET['name'];
$from = $_GET['from'];
if (!isnum($from)) { redirect(FUSION_SELF); } // SQL Injection
if ($_GET['move'] == "down") { $to = $from+1; }
elseif ($_GET['move'] == "up") { $to = $from-1; }
else { redirect(FUSION_SELF.$aidlink); }
$result = dbquery("UPDATE ".DB_EXTENDED_PROFILE_PROPS." SET prop_order=$from WHERE prop_order=$to");
$result = dbquery("UPDATE ".DB_EXTENDED_PROFILE_PROPS." SET prop_order=$to WHERE prop_name='".htmlspecialchars($name) . "'");
redirect(FUSION_SELF.$aidlink);
}
if (isset($_POST['save_new_prop']) && !empty($_POST['save_new_prop'])) {
$new_prop_name = strtolower(trim($_POST['prop_name']));
$new_prop_title = trim($_POST['prop_title']);
$new_prop_order = tonumber($_POST['prop_order']);
if (empty($new_prop_name)) { $error .= $locale['xpf_201'] . "<br />"; }
if (empty($new_prop_title)) { $error .= $locale['xpf_202'] . "<br />"; }
if (prop_name_exists($new_prop_name)) { $error .= $locale['xpf_203'] . "<br />"; }
if (!is_name_valid($new_prop_name)) { $error .= $locale['xpf_204'] . "<br />"; }
if (empty($error)) { // add it
$result = dbquery("UPDATE ".DB_EXTENDED_PROFILE_PROPS." SET prop_order = prop_order + 1 WHERE prop_order >= $new_prop_order");
$result = dbquery("INSERT INTO ".DB_EXTENDED_PROFILE_PROPS." (prop_name, prop_title, prop_order) VALUES ('".$new_prop_name."', '".addslashes($new_prop_title)."', '". $new_prop_order ."')");
$new_prop_name = $new_prop_title = $new_prop_order = "";
redirect(FUSION_SELF.$aidlink);
}
}
if (isset($_POST['save_edit_prop']) && !empty($_POST['save_edit_prop'])) {
$new_prop_name = strtolower(trim($_POST['prop_name']));
$new_prop_title = trim($_POST['prop_title']);
$new_prop_order = $_POST['prop_order'];
if (empty($new_prop_name)) { $error .= $locale['xpf_201'] . "<br />"; }
if (empty($new_prop_title)) { $error .= $locale['xpf_202'] . "<br />"; }
if (!is_name_valid($new_prop_name)) $error .= $locale['xpf_204'] . "<br />"; // do this check anyway to prevent ppl from fucking with it..
if (empty($error)) { // edit it
$result = dbquery("UPDATE ".DB_EXTENDED_PROFILE_PROPS." SET prop_title = '".addslashes($new_prop_title)."', prop_order = '". $new_prop_order ."' WHERE prop_name = '". $new_prop_name . "'");
$new_prop_name = $new_prop_title = $new_prop_order = "";
redirect(FUSION_SELF.$aidlink);
}
}
if (isset($_POST['del_prop']) && !empty($_POST['del_prop'])) {
$name = $_POST['prop_name'];
$result = mysql_query("SELECT prop_order FROM ".DB_EXTENDED_PROFILE_PROPS." WHERE prop_name='".addslashes($name)."'");
if ($result && mysql_num_rows($result) == 1) {
$old_prop_order = mysql_result($result, 0, 'prop_order');
$result = dbquery("DELETE FROM ".DB_EXTENDED_PROFILE_PROPS." WHERE prop_name='".addslashes($name)."'");
$result = dbquery("UPDATE ".DB_EXTENDED_PROFILE_PROPS." SET prop_order = prop_order - 1 WHERE prop_order >= $old_prop_order");
}
}
// populate order select
$order_select = "<select name='prop_order' class='textbox'>\n";
$order_select.= "<option value='1'>-- ".$locale['xpf_016']." --</option>\n";
// Current Fields
echo "<table border='0' width='100%' cellspacing='0' cellpadding='0' class='tbl'>\n";
echo " <tr>\n";
echo " <td>\n";
opentable ($locale['xpf_001']);
$result = dbquery("SELECT * FROM ".DB_EXTENDED_PROFILE_PROPS." ORDER BY prop_order ASC");
if ($result && mysql_num_rows($result) > 0) {
$total_fields = mysql_num_rows($result);
echo "\n <table width='100%' align='left' cellspacing='0' cellpadding='0' class='tbl'>\n";
while ($obj = mysql_fetch_object($result)) {
echo " <tr>\n";
echo " <td>\n";
echo " <form name='editform".$obj->prop_name."' method='post' action='".FUSION_SELF.$aidlink."' >\n";
echo " <table border='0' width='100%' align='left'>\n";
echo " <tr>\n";
echo " <td width='15%'>".$obj->prop_name." </td>\n";
echo " <td width='25%'>".htmlspecialchars($obj->prop_title, ENT_QUOTES)." </td>\n";
echo " <td width='10' align='right'> [ ".$obj->prop_order."</td>\n";
echo " <td width='20' valign='middle' align='right'> \n";
if ($obj->prop_order != 1) {
echo " <a href='".FUSION_SELF.$aidlink."&move=up&name=".$obj->prop_name."&from=".$obj->prop_order."'>\n";
echo " <img src='".THEME."images/up.gif' border='0' alt='Up' /></a>\n";
}
echo " </td>\n";
echo " <td width='20' valign='middle' align='left'> \n";
if ($obj->prop_order != $total_fields) {
echo " <a href='".FUSION_SELF.$aidlink."&move=down&name=".$obj->prop_name."&from=".$obj->prop_order."'>\n";
echo " <img src='".THEME."images/down.gif' border='0' alt='Down' /></a>\n";
}
echo " </td>\n";
echo " <td width='10' align='left'> ] </td>\n";
echo " <td>\n";
echo " <input type='submit' name='edit_prop' value='".$locale['xpf_022']."' class='button' /> \n";
echo " <input type='submit' name='del_prop' value='".$locale['xpf_023']."' class='button' onClick='return DeleteField();' /> \n";
echo " <input type='hidden' name='prop_name' value='".$obj->prop_name."' />\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </form>\n";
echo " </td>\n";
echo " </tr>\n";
if ($obj->prop_order != $total_fields) {
$order_select.= "<option value='".($obj->prop_order+1)."'>".$locale['xpf_015']." ".$obj->prop_name."</option>\n";
}
else {
$order_select.= "<option value='".($obj->prop_order+1)."' selected>-- ".$locale['xpf_017']." --</option>\n";
}
}
echo " </table>\n";
}
else {
echo $locale['xpf_002'];
}
closetable();
echo " </td>\n";
echo " </tr>\n";
$order_select .= "</select>\n";
if (isset($_POST['edit_prop']) && !empty($_POST['edit_prop'])) {
echo " <tr>\n";
echo " <td>\n";
opentable ($locale['xpf_021']);
$result = dbquery("SELECT * FROM ".DB_EXTENDED_PROFILE_PROPS." WHERE prop_name = '".$_POST['prop_name']."'");
if ($result && mysql_num_rows($result) == 1) {
$new_prop_name = mysql_result($result, 0, 'prop_name');
$new_prop_title = mysql_result($result, 0, 'prop_title');
$new_prop_order = mysql_result($result, 0, 'prop_order');
}
$submit = "<input type='submit' name='save_edit_prop' value='".$locale['xpf_021']."' class='button' />\n";
$name = "<input type='text' name='prop_name' value='$new_prop_name' class='textbox' style='width:250px;' readonly /> (<span class='small'>".$locale['xpf_040'].")</span>\n";
$order_select = $new_prop_order;
}
else {
echo " <tr>\n";
echo " <td>\n";
opentable ($locale['xpf_010']);
$new_prop_name = $new_prop_title = $new_prop_order = "";
$submit = "<input type='submit' name='save_new_prop' value='".$locale['xpf_020']."' class='button' />";
$name = "<input type='text' name='prop_name' value='$new_prop_name' class='textbox' style='width:250px;' /> * ".$locale['xpf_012'];
}
if (!empty($error)) {
echo " <div class=\"quote\">".$locale['xpf_200']."<hr />".$error."</div>";
}
echo " <form name='inputform' method='post' action='".FUSION_SELF.$aidlink."' onSubmit='return ValidateForm(this)'>\n";
echo " <table align='center' cellspacing='0' cellpadding='0'>\n";
echo " <tr>\n";
echo " <td width='100' class='tbl' align='right'>".$locale['xpf_011'].":</td>\n";
echo " <td class='tbl'>$name</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td valign='top' width='100' class='tbl' align='right'>\n";
echo " <input type='hidden' name='prop_order' value='$new_prop_order' />".$locale['xpf_013'].":</td>\n";
echo " <td class='tbl'><input type='text' name='prop_title' value='$new_prop_title' class='textbox' style='width:250px;' /></td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td class='tbl' align='right'>".$locale['xpf_014'].":</td>\n";
echo " <td class='tbl'>$order_select</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align='center' colspan='2' class='tbl'><br />$submit</td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </form>\n";
// finally add some JavaScript
echo "<script type='text/javascript'>
function DeleteField() {
return confirm('".$locale['xpf_030']."');
}
function ValidateForm(frm) {
if(frm.prop_name.value=='') {
alert('".$locale['xpf_205']."');
return false;
}
if(frm.prop_title.value=='') {
alert('".$locale['xpf_206']."');
return false;
}
return true;
}
</script>\n";
closetable();
echo " </td>\n";
echo " </tr>\n";
echo "</table>\n";
/*
echo "<pre>";
print_r($_POST);
echo "</pre>";
*/
require_once THEMES."templates/footer.php";
/*function deleteField($name) { // delete field
$result = mysql_query("SELECT prop_order FROM ".DB_EXTENDED_PROFILE_PROPS." WHERE prop_name='".addslashes($name)."'");
if ($result && mysql_num_rows($result) == 1) {
$old_prop_order = mysql_result($result, 0, 'prop_order');
$result = dbquery("DELETE FROM ".DB_EXTENDED_PROFILE_PROPS." WHERE prop_name='".addslashes($name)."'");
$result = dbquery("UPDATE ".DB_EXTENDED_PROFILE_PROPS." SET prop_order = prop_order - 1 WHERE prop_order >= $old_prop_order");
}
} */
function tonumber ($new_order) { // check input, if valid leave as new order remove leading zero's, else get highest order around
// global $db_prefix;
if (preg_match("/^(0*)([1-9]{1}[0-9]*)$/", $new_order, $result)) { return $result[2]; }
$result = dbquery("SELECT MAX(prop_order)+1 AS new_order FROM ".DB_EXTENDED_PROFILE_PROPS."");
if (!$result || mysql_num_rows($result) == 0 || mysql_result($result, 0, 'new_order') == 0) { return 1; }
return mysql_result($result, 0, 'new_order');
}
function is_name_valid($new_prop_name) { // names should be alfanumeric, and lowercase, but script should do that
return preg_match("/^[a-z0-9_]+$/", $new_prop_name);
}
function prop_name_exists($new_prop_name, $old_prop_name = "") { // checks if a name already exists, except when name is the same as the old name
// global $db_prefix;
// when editing the old name could be unchanged, so the update is allowed, return false
if ($new_prop_name == $old_prop_name) { return false; }
// try to find the prop_name
$result = dbquery("SELECT prop_name FROM ".DB_EXTENDED_PROFILE_PROPS." WHERE prop_name='".addslashes($new_prop_name)."'");
// if there is no result for any reason it's safer to prevent futher db changed, return true
if (!$result) { return true; }
// no records found means the prop_name is not found, return true
if (mysql_num_rows($result) == 0) { return false; }
// so there is a record found, return true
return true;
}
?>
Code
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>SiteMaster style - Admin Panel</title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
<meta name='description' content='' />
<meta name='keywords' content='' />
<link rel='stylesheet' href='../../themes/Krumelure/styles.css' type='text/css' media='screen' />
<link rel='shortcut icon' href='../../images/favicon.ico' type='image/x-icon' />
<script type='text/javascript' src='../../includes/jscript.js'></script>
<script type='text/javascript' src='../../includes/jquery.js'></script>
</head>
<body>
<table align='center' cellspacing='0' cellpadding='0' width='980' class='outer-border'>
<tr>
<td class='b-left'><img src='../../themes/Krumelure/images/bspacer.gif' border='0' alt='' /></td>
<td>
<table class='full-header' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td id='banners' colspan='2'><a href='http://test.sitemaster.dk/test/'><img src='../../images/logo.png' alt='SiteMaster style' style='border: 0;' /></a>
</td>
</tr>
<tr>
<td class='sub-header'><ul>
<li class='first-link white'><span class='bullet'>?</span><a href='../../index.php'><span>Forsiden</span></a></li>
<li class='white'><span class='bullet'>?</span><a href='../../articles.php'><span>Artikler</span></a></li>
<li class='white'><span class='bullet'>?</span><a href='../../infusions/jokes/jokes.php'><span>Vitser</span></a></li>
<li class='white'><span class='bullet'>?</span><a href='../../downloads.php'><span>Downloads</span></a></li>
<li class='white'><span class='bullet'>?</span><a href='../../forum/index.php'><span>Forum</span></a></li>
<li class='white'><span class='bullet'>?</span><a href='../../weblinks.php'><span>Web Links</span></a></li>
<li class='white'><span class='bullet'>?</span><a href='../../news_cats.php'><span>Nyheds Kategorier</span></a></li>
</ul>
</td>
<td class='sub-header' style='align:right; width:1%; white-space:nowrap;'> <a href='../../login.php'><img src='../../themes/Krumelure/images/login.gif' alt='' title='SiteMaster' style='vertical-align:middle;' /></a>
</td>
</tr>
</table><table cellpadding='0' cellspacing='0' width='100%' class='side-left'>
<tr>
<td id='side-border-left' valign='top'>
<div class='panelbg'>
<div class='scapbg'>
<div class='scapl'>
<div class='scapr'>
<div class='scapmain'>SiteMaster</div>
</div>
</div>
</div>
<div class='sbodyl'>
<div class='sbodyr'>
<div class='side-body'>
<img src='../../themes/Krumelure/images/bullet.gif' alt='' border='0' /> <a href='../../edit_profile.php' class='side'>Edit Profile</a><br />
<img src='../../themes/Krumelure/images/bullet.gif' alt='' border='0' /> <a href='../../messages.php' class='side'>Private Messages</a><br />
<img src='../../themes/Krumelure/images/bullet.gif' alt='' border='0' /> <a href='../../members.php' class='side'>Members List</a><br />
<img src='../../themes/Krumelure/images/bullet.gif' alt='' border='0' /> <a href='../../administration/index.php?aid=a0468c608b659038' class='side'>Admin Panel</a><br />
<img src='../../themes/Krumelure/images/bullet.gif' alt='' border='0' /> <a href='../../setuser.php?logout=yes' class='side'>Logout</a>
</div>
</div>
<div class='sfootbg'>
<div class='sfootl'>
<div class='sfootr'>
</div>
</div>
</div>
</div></div>
<div class='panelbg'>
<div class='scapbg'>
<div class='scapl'>
<div class='scapr'>
<div class='scapmain'>Navigation</div>
</div>
</div>
</div>
<div class='sbodyl'>
<div class='sbodyr'>
<div class='side-body'>
<img src='../../themes/Krumelure/images/bullet.gif' alt='' border='0' /> <a href='../../administration/index.php?aid=a0468c608b659038' class='side'>Admin Home</a>
<hr class='side-hr' />
<form action='extended_profile_admin.php'>
<select onchange='window.location.href=this.value' style='width:100%;' class='textbox'>
<option value='extended_profile_admin.php' style='font-style:italic;' selected='selected'>Content Admin</option>
<option value='../../administration/article_cats.php?aid=a0468c608b659038'>Article Categories</option>
<option value='../../administration/articles.php?aid=a0468c608b659038'>Articles</option>
<option value='../../administration/custom_pages.php?aid=a0468c608b659038'>Custom Pages</option>
<option value='../../administration/download_cats.php?aid=a0468c608b659038'>Download Categories</option>
<option value='../../administration/downloads.php?aid=a0468c608b659038'>Downloads</option>
<option value='../../administration/faq.php?aid=a0468c608b659038'>FAQs</option>
<option value='../../administration/forums.php?aid=a0468c608b659038'>Forums</option>
<option value='../../administration/images.php?aid=a0468c608b659038'>Images</option>
<option value='../../administration/news.php?aid=a0468c608b659038'>News</option>
<option value='../../administration/news_cats.php?aid=a0468c608b659038'>News Categories</option>
<option value='../../administration/photoalbums.php?aid=a0468c608b659038'>Photo Albums</option>
<option value='../../administration/polls.php?aid=a0468c608b659038'>Polls</option>
<option value='../../administration/weblink_cats.php?aid=a0468c608b659038'>Web Link Categories</option>
<option value='../../administration/weblinks.php?aid=a0468c608b659038'>Web Links</option>
</select>
</form>
<form action='extended_profile_admin.php'>
<select onchange='window.location.href=this.value' style='width:100%;' class='textbox'>
<option value='extended_profile_admin.php' style='font-style:italic;' selected='selected'>User Admin</option>
<option value='../../administration/administrators.php?aid=a0468c608b659038'>Administrators</option>
<option value='../../administration/blacklist.php?aid=a0468c608b659038'>Blacklist</option>
<option value='../../administration/forum_ranks.php?aid=a0468c608b659038'>Forum Ranks</option>
<option value='../../administration/members.php?aid=a0468c608b659038'>Members</option>
<option value='../../administration/shoutbox.php?aid=a0468c608b659038'>Shoutbox</option>
<option value='../../administration/submissions.php?aid=a0468c608b659038'>Submissions</option>
<option value='../../administration/user_fields.php?aid=a0468c608b659038'>User Fields</option>
<option value='../../administration/user_groups.php?aid=a0468c608b659038'>User Groups</option>
</select>
</form>
<form action='extended_profile_admin.php'>
<select onchange='window.location.href=this.value' style='width:100%;' class='textbox'>
<option value='extended_profile_admin.php' style='font-style:italic;' selected='selected'>System Admin</option>
<option value='../../administration/banners.php?aid=a0468c608b659038'>Banners</option>
<option value='../../administration/bbcodes.php?aid=a0468c608b659038'>BB Codes</option>
<option value='../../administration/db_backup.php?aid=a0468c608b659038'>Database Backup</option>
<option value='../../administration/settings_forum.php?aid=a0468c608b659038'>Forum Settings</option>
<option value='../../administration/infusions.php?aid=a0468c608b659038'>Infusions</option>
<option value='../../administration/settings_main.php?aid=a0468c608b659038'>Main Settings</option>
<option value='../../administration/settings_misc.php?aid=a0468c608b659038'>Miscellaneous Settings</option>
<option value='../../administration/panels.php?aid=a0468c608b659038'>Panels</option>
<option value='../../administration/settings_photo.php?aid=a0468c608b659038'>Photo Gallery Settings</option>
<option value='../../administration/phpinfo.php?aid=a0468c608b659038'>PHP Info</option>
<option value='../../administration/settings_messages.php?aid=a0468c608b659038'>Private Message Options</option>
<option value='../../administration/settings_registration.php?aid=a0468c608b659038'>Registration Settings</option>
<option value='../../administration/site_links.php?aid=a0468c608b659038'>Site Links</option>
<option value='../../administration/smileys.php?aid=a0468c608b659038'>Smileys</option>
<option value='../../administration/settings_time.php?aid=a0468c608b659038'>Time and Date Settings</option>
<option value='../../administration/upgrade.php?aid=a0468c608b659038'>Upgrade</option>
</select>
</form>
<form action='extended_profile_admin.php'>
<select onchange='window.location.href=this.value' style='width:100%;' class='textbox'>
<option value='extended_profile_admin.php' style='font-style:italic;' selected='selected'>Infusions</option>
<option value='../../administration/../infusions/error_reports/error_reports_admin.php?aid=a0468c608b659038'>Error Reports</option>
<option value='../../administration/../infusions/extended_profile/extended_profile_admin.php?aid=a0468c608b659038'>Extended Profile</option>
<option value='../../administration/../infusions/photo_upload/photo_upload_admin.php?aid=a0468c608b659038'>Mass Photo Upload Admin</option>
<option value='../../administration/../infusions/pro_download_panel/admin/admin.php?aid=a0468c608b659038'>Professional Download System</option>
<option value='../../administration/../infusions/thanks_to/thanks_to_admin.php?aid=a0468c608b659038'>Thanks to Admin</option>
<option value='../../administration/../infusions/jokes/jokes_admin.php?aid=a0468c608b659038'>Vits Administration</option>
<option value='../../administration/../infusions/jokes/jokes_admin_cats.php?aid=a0468c608b659038'>Vits Kategori Administration</option>
</select>
</form>
<hr class='side-hr' />
<img src='../../themes/Krumelure/images/bullet.gif' alt='' border='0' /> <a href='../../index.php' class='side'>Return to Site</a>
</div>
</div>
<div class='sfootbg'>
<div class='sfootl'>
<div class='sfootr'>
</div>
</div>
</div>
</div></div></td><td class='main-bg' valign='top'><table border='0' width='100%' cellspacing='0' cellpadding='0' class='tbl'>
<tr>
<td>
<div class='newsbg'>
<div class='ncapbg'>
<div class='ncapl'>
<div class='ncapr'>
<div class='capmain'>
Current Fields
</div>
</div>
</div>
</div>
<div class='nbodyl'>
<div class='nbodyr'>
<div class='tab-body'>
<table width='100%' align='left' cellspacing='0' cellpadding='0' class='tbl'>
<tr>
<td>
<form name='editformtest' method='post' action='extended_profile_admin.php?aid=a0468c608b659038' >
<table border='0' width='100%' align='left'>
<tr>
<td width='15%'>test </td>
<td width='25%'>tester </td>
<td width='10' align='right'> [ 1</td>
<td width='20' valign='middle' align='right'>
</td>
<td width='20' valign='middle' align='left'>
<a href='extended_profile_admin.php?aid=a0468c608b659038&move=down&name=test&from=1'>
<img src='../../themes/Krumelure/images/down.gif' border='0' alt='Down' /></a>
</td>
<td width='10' align='left'> ] </td>
<td>
<input type='submit' name='edit_prop' value='Edit' class='button' />
<input type='submit' name='del_prop' value='Delete' class='button' onClick='return DeleteField();' />
<input type='hidden' name='prop_name' value='test' />
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td>
<form name='editform1' method='post' action='extended_profile_admin.php?aid=a0468c608b659038' >
<table border='0' width='100%' align='left'>
<tr>
<td width='15%'>1 </td>
<td width='25%'>2 </td>
<td width='10' align='right'> [ 2</td>
<td width='20' valign='middle' align='right'>
<a href='extended_profile_admin.php?aid=a0468c608b659038&move=up&name=1&from=2'>
<img src='../../themes/Krumelure/images/up.gif' border='0' alt='Up' /></a>
</td>
<td width='20' valign='middle' align='left'>
</td>
<td width='10' align='left'> ] </td>
<td>
<input type='submit' name='edit_prop' value='Edit' class='button' />
<input type='submit' name='del_prop' value='Delete' class='button' onClick='return DeleteField();' />
<input type='hidden' name='prop_name' value='1' />
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class='tfootbg'>
<div class='tfootl'>
<div class='tfootr'>
</div>
</div>
</div>
</div> </td>
</tr>
<tr>
<td>
<div class='newsbg'>
<div class='ncapbg'>
<div class='ncapl'>
<div class='ncapr'>
<div class='capmain'>
Add a new field
</div>
</div>
</div>
</div>
<div class='nbodyl'>
<div class='nbodyr'>
<div class='tab-body'> <form name='inputform' method='post' action='extended_profile_admin.php?aid=a0468c608b659038' onSubmit='return ValidateForm(this)'>
<table align='center' cellspacing='0' cellpadding='0'>
<tr>
<td width='100' class='tbl' align='right'>DB Field Name:</td>
<td class='tbl'><input type='text' name='prop_name' value='' class='textbox' style='width:250px;' /> * only alphanumeric and _</td>
</tr>
<tr>
<td valign='top' width='100' class='tbl' align='right'>
<input type='hidden' name='prop_order' value='' />Field Display:</td>
<td class='tbl'><input type='text' name='prop_title' value='' class='textbox' style='width:250px;' /></td>
</tr>
<tr>
<td class='tbl' align='right'>Order:</td>
<td class='tbl'><select name='prop_order' class='textbox'>
<option value='1'>-- First --</option>
<option value='2'>After test</option>
<option value='3' selected>-- Last --</option>
</select>
</td>
</tr>
<tr>
<td align='center' colspan='2' class='tbl'><br /><input type='submit' name='save_new_prop' value='Save Field' class='button' /></td>
</tr>
</table>
</form>
<script type='text/javascript'>
function DeleteField() {
return confirm('Delete this field?');
}
function ValidateForm(frm) {
if(frm.prop_name.value=='') {
alert('Field name is empty');
return false;
}
if(frm.prop_title.value=='') {
alert('Field title is empty');
return false;
}
return true;
}
</script>
</div>
</div>
</div>
<div class='tfootbg'>
<div class='tfootl'>
<div class='tfootr'>
</div>
</div>
</div>
</div> </td>
</tr>
</table>
</td></tr>
</table>
<table align='center' width='100%' cellspacing='0' cellpadding='0'>
<tr>
<td id='footleft'>
</td >
<td class='footer'><center>Copyright ? 2008 SiteMaster style</center><br />
</td>
<td id='footright'>
</td>
</tr>
</table>
</td><td class='b-right' align='right'><img src='../../themes/Krumelure/images/bspacer.gif' border='0' alt='' /></td>
</tr>
</table><table align='center' width='980' cellspacing='0' cellpadding='0'>
<tr><td id='b-left-bottom' width='40'></td><td id='bottom-center'><!--counter-->236 unique visits | Render time: 0.14 seconds | <a class='footer-link' href='http://yafs.net' target='_blank' title='Krumelure by Sveinung {Sveinungs} Skj?rseth'>Design by Yafs.net</a> | <a class='footer-link' href='http://icon-king.com/?p=15' target='_blank'>Icons: Nuvola</a></td><td id='b-right-bottom' width='40' align='right'></td></tr>
<tr><td colspan='3' style='text-align:right; font-size:9px; background-color: #000; color: #555;'>
Powered by <a href='http://www.php-fusion.co.uk' class='footer-link'>PHP-Fusion</a> copyright ? 2002 - 2008 by Nick Jones. Released as free software without warranties under <a href='http://www.fsf.org/licensing/licenses/agpl-3.0.html' class='footer-link'>GNU Affero GPL</a> v3.
</td></tr>
</table></body>
</html>