%%document-edit-member-html%%
roots.encielo.org : /recipients
2002-08-16 10:30:00

%%preprocess%%
$this->beryliumToForm(); 
$this->timeFormat("F j, Y \a\\t g:ia");
$this->getBaseUrl();

//
// DO NOT ALLOW MEMBERS TO EDIT OTHER MEMBERS' DOCUMENTS! (only editor/admin)
//
if ($sitemember->role!="admin" && $sitemember->role!="editor" && $this->memberid!=$sitemember->memberid ) {
	$this->showNull=1;
	}

if ($this->id!="") {
	$this->hiddenvars= "<input type='hidden' name='id' value=\"$this->id\">";
	}

if ($this->flavor=="") $this->flavor= "Generic";
$fflavor= "flavor".str_replace(" ","",$this->flavor);
$this->{$fflavor}= "selected";

$sstatus= "status".$this->status;
$this->{$sstatus}= "selected";
$ppublic= "public".$this->public; 
$this->{$ppublic}= "checked";

// show sitemember if no author defined
if (trim($this->author)== "") $this->authorTag= bparsebml("[sitemember:$this->sitememberid]");
else $this->authorTag= $this->author;

// determine dateTag
if ($this->p_originaldate) {
	$origdate= mysql_timestamp($this->p_originaldate);
	$this->originaldate= date("l, F j, Y", $origdate);
	$this->dateTag= $this->originaldate;
	}
else $this->dateTag= $this->created;
	
// compile publishStatus ( like: public-posted-100 )
if ($this->public) $this->publishStatus= "public-$this->status-$this->rank";
else $this->publishStatus= "private-$this->status-$this->rank";

// show default icon or alt icon from imageid
if ($this->imageid!="0") {
	$this->iconTag= bparsebml("[icon:$this->imageid;document:$this->id]");
	}
else $this->iconTag= "<img src='/bicons/document.png' border=0 alt='document:$this->id' title='document:$this->id'>";

// headline fix if only title, and vice-versa
if ($this->title=="" && $this->headline=="") $this->title= "Untitled ($this->name)";
elseif ($this->title=="") $this->title= $this->headline;
elseif ($this->headline=="") $this->headline= $this->title;

// show sitemember if no author defined, show sitename if no sitemember found...
if (trim($this->author)== "") $this->author= bparsebml("[sitemember:$this->sitememberid]");
if (trim($this->author)== "") $this->author= $site->title;

// id tag, just in case or something
$this->idTag= " (document:$this->id) ";


// publishing tag if editor/admin
if ($sitemember->role=="editor" OR $sitemember->role=="admin") {
    $this->publishingTag= "
<br>
<br>
<b>Publishing Info:</b>
<blockquote>
status:
		<select name='status'>
		<option value='new' $this->statusnew>new</option>
		<option value='posted' $this->statusposted>posted</option>
		<option value='hidden' $this->statushidden>hidden</option>
		<option value='deleted' $this->statusdeleted>deleted</option>
		</select>
<br>
<br>
public: 
<input type='checkbox' name='public' value='1' $this->public1>
<br>
<br>
rank:
<input type='text' name='rank' size='6' maxlength='6' value='$this->rank'>
<br>
<br>
<input type='submit' name='submit' value='update' title='Save, then view finished document'>
<input type='submit' name='submit' value='save' title='Save, then continue editing'>
</blockquote>
";
    }


// category selector
$ccategory= "category".$this->p_category;
$this->{$ccategory}= "selected";

%%header%%


%%css%%


%%template%%
<tt>
<font size='+2'><b><a href="$session->refreshUrl?method=view$session->cgi">$this->title</a></b></font>
<br>
$this->created by $this->author $this->idTag
<br>
<br>
Helpful resources: <a href='http://www.house.gov/house/MemberWWW_by_State.htm' target='_BLANK'>Find your Representative</a> | <a href='http://www.senate.gov/contacting/index_by_state.cfm' target='_BLANK'>Find your Senator</a>
<form method='post' action='$this->baseURL?method=save$session->cgi'>
<input type=hidden name=id value=$this->id>
<blockquote>
Category: 
    <select name='p_category'>
	<option value='un' $this->categoryun >United Nations</option>
	<option value='world' $this->categoryworld >World Leaders</option>
	<option value='exec' $this->categoryexec >U.S. Executive</option>
	<option value='sen' $this->categorysen >U.S. Senate</option>
	<option value='house' $this->categoryhouse >U.S. House</option>
	<option value='state' $this->categorystate >State Official</option>
	<option value='local' $this->categorylocal >Local Official</option>
	<option value='org' $this->categoryorg >Organization</option>
	<option value='media' $this->categorymedia >Media</option>
    </select>
<br>
<br>
Surname or Organization Name:
<br>
<input type='text' name='p_surname' size='42' maxlength='255' value="$this->p_surname">
<br>
<br>
Given Names (person only):
<br>
<input type='text' name='p_givenname' size='42' maxlength='255' value="$this->p_givenname">
<br>
<br>
Title / Honorific: (how to address the recipient, like Representative, Mayor, Ms...)
<br>
(person only)
<br>
<input type='text' name='p_salutation' size='42' maxlength='255' value="$this->p_salutation">
<br>
<br>
Position or Description:
<br>
<input type='text' name='description' size='42' maxlength='255' value="$this->description">
<br>
<br>
Location / Jurisdiction:
<br>
<input type='text' name='p_location' size='42' maxlength='255' value="$this->p_location">
<br>
<br>
Email Address / Web Address of Contact Form:
<br>
<input type='text' name='p_email' size='42' maxlength='255' value="$this->p_email">
<br>
<br>
Website:
<br>
<input type='text' name='p_website' size='42' maxlength='255' value="$this->p_website">
<br>
<br>
Mailing Address:
<br>
<textarea name='p_mail' cols='40' rows='5' wrap='VIRTUAL'>$this->p_mail</textarea>
<br>
<br>
Fax Number:
<br>
<input type='text' name='p_fax' size='24' maxlength='255' value="$this->p_fax">
<br>
<br>
Notes ( <a href='http://berylium.org/berylium/docs/quickbml.html'>bml</a> ):
<br>
<textarea name='body' cols='60' wrap='VIRTUAL' rows='6'>$this->body</textarea>
<br>
<br>
File name: (for URL)
<br>
<input type='text' name='name' size='42' maxlength='255' value="$this->name">
<br> &nbsp; Leave as is, or change in special cases.
<br>
<br>
<input type='submit' name='submit' value='update' title='Save'>
$this->publishingTag
</blockquote>
</form>
</tt>

%%listrow%%
 

%%nullobject%%
<img src='/bicons/warning.png' alt='Warning' align=absmiddle> Sorry, that document is not available for editing. 

%%footer%%


%%postprocess%%


%%end of context%%

 
