%%document-edit-member-html%%
roots.encielo.org : / (context:15)
2002-08-11 20:54:26

%%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->sitememberid!=$sitemember->id ) {
	$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>
";
    }

%%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>
<form method='post' action='$this->baseURL?method=save$session->cgi'>
<input type=hidden name=id value=$this->id>
<blockquote>
file name:<br>
<input type='text' name='name' size='42' maxlength='255' value="$this->name">
<br> &nbsp; No spaces, please.
<br>
<br>
<input type='hidden' name='flavor' value='campaign'>
campaign title:
<br>
<input type='text' name='title' size='42' maxlength='255' value="$this->title">
<br>
<br>
introduction ( <a href='http://berylium.org/berylium/docs/quickbml.html'>bml</a> ): A short summary or abstract.
<br>
<textarea name='description' cols='80' wrap='VIRTUAL' rows='8'>$this->description</textarea>
<br>
<br>
document body ( <a href='http://berylium.org/berylium/docs/quickbml.html'>bml</a> ):  Any additional text, images, etc.
<br>
<textarea name='body' cols='80' wrap='VIRTUAL' rows='12'>$this->body</textarea>
<br>
<br>
letter (the text of your letter):
<br>
<textarea name='p_letter' cols='80' wrap='VIRTUAL' rows='12'>$this->p_letter</textarea>
<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'>
<br>
<br>
Use the <i>save</i> button to save your work periodically!
$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%%

 
