<?php
//initial---------------------------------
require_once('./admin.php');
//_____________________________________________________
$Display->Title = 'Profile';
$Display->Subtitle = 'Edit Profile Element';
$Display->Meta = '
<script language="javascript" type="text/javascript" src="../pr-inside/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
theme_advanced_buttons1 : "bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright, justifyfull,bullist,numlist,undo,redo,link,unlink",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]"
});
</script> ';
//___________________________________________________
require('./admin-display-header.php');
$ID = $_GET['id'];
//----------------------------- Database quries
$Element = $DC->Result("SELECT * FROM ".PR_DATABASE_PREFIX."profile WHERE profile_id = $ID");
//-------------------------------------------
$Form = new AdminForm("profile-edit-update.php?action=edit&id=$ID");
//show errors from profile-update.php
if(isset($Error))
{
foreach($Error as $Key => $KeyValue)
$Form->Error[$Key] = $KeyValue;
}
else
{
$Type = $Element[0]['profile_category'];
$Name = $Element[0]['profile_name'];
$Value = $Element[0]['profile_value'];
}
$Form->Input('text', 'type', $Type, 'Category', 'Ex: music, about me');
$Form->Input('text', 'name', $Name, 'Element Name', 'Ex: favourite music artists, last trip');
$Form->Textarea(12, 'value', $Value, 'Description', 'Seperate multiple values by comma, Ex: artist-1, artist-2');
?>
<h2> Edit Profile Element »»</h2>
Create a new profile item.
<?php echo $Form->Finish('Publish'); ?>
<?php require('./admin-display-footer.php'); ?>