%%generic-listall-anonymous-html%%
progmin : / (context #125)
2002-05-30 18:59:51

%%preprocess%%
$GLOBALS[session]->getListQuery();
$session= $GLOBALS[session];
$this->beryliumToHtml();
$this->getBaseURL();

// build flavor menu
if ($session->listflavor=="%") $selected= "selected";
else $selected="";
$this->flavormenu= "<select name='listflavor'>
<option value='%' $selected>any</option>";
$query= "SELECT DISTINCT flavor FROM $this->objtype WHERE siteid='$site->id' $this->queryExtras ORDER BY flavor ASC";
$result= mysql_query($query);
while ($array= mysql_fetch_array($result)) {
	if ($session->listflavor== $array[flavor]) $selected= "selected";
	else $selected= "";
	$flavor= htmlentities($array[flavor]);
	$this->flavormenu.= "
	  <option value='$flavor' $selected>$flavor</option>";
	}
$this->flavormenu.="</select>";

//list this folder
if ($session->listthisfolder) $this->thisfolderchecked="checked";

// status
if ($session->liststatus!="%") $sstatus= "status".$session->liststatus;
else $sstatus= "statusany";
$this->{$sstatus}= "selected";

// rank
switch ($session->listranksign) {
	case "<=": $this->ranksign1= "checked"; break;
	case "=": $this->ranksign2= "checked"; break;
	case ">=": $this->ranksign3= "checked"; break;
	}

// public
switch ($session->listpublic) {
	case 1: $this->public1= "checked"; break;
	case "%": $this->public2= "checked"; break;
	case "": $this->public3= "checked"; break;
	}

// build author menu
if ($session->listauthor=="%") $selected= "selected";
else $selected= "";
$this->authormenu= "<select name='listauthor'>
<option value='%' $selected>any</option>";
if ($session->listauthor== $sitemember->id) $selected= "selected";
else $selected= "";
$this->authormenu.= "
                <option value='$sitemember->id' $selected>yourself</option>";
$query= "SELECT DISTINCT sm.id, sm.sitememberid, sm.name FROM sitemember AS sm, folder WHERE sm.siteid='$site->id' AND sm.status='posted' AND ((folder.folderid='$folder->folderid' AND sm.folderid=folder.folderid) OR (folder.name LIKE '$folder->name/%' AND sm.folderid=folder.id)) ORDER BY sm.name ASC";
$result= mysql_query($query);
berror("preprocess building authormenu with query= $query; ",1);

while ($array= mysql_fetch_array($result)) {
	if ($session->listauthor== $array[sitememberid]) $selected= "selected";
	else $selected= "";
	$name= htmlentities($array[name]);
	$foldermemberid= $array[id];
	$sitememberid= $array[sitememberid];
	$this->authormenu.= "
	  <option value='$sitememberid' $selected>$name</option>";
	}
$this->authormenu.="</select>";

// created
switch ($session->listcreatedsign) {
	case ">": $this->created3= "checked"; break;
	case "=": $this->created2= "checked"; break;
	case "<": $this->created1= "checked"; break;
	}

// updated
switch ($session->listupdatedsign) {
	case ">": $this->updated3= "checked"; break;
	case "=": $this->updated2= "checked"; break;
	case "<": $this->updated1= "checked"; break;
	}








%%header%%




%%css%%
.querytable {background-color: #ffffff; border: 2px; border-color: #999999; border-style: solid; color: #333333; margin: 5px; FONT-FAMILY: Tahoma, Geneva, sans-serif; FONT-SIZE: 10px; line-height: 14px;}







%%template%%
<p><a href='$folder->baseurl/$this->objtype-.html?method=listall$session->cgi'>Click here</a to continue.</p>







%%listrow%%




%%nullobject%%
<form method='post' action='$session->refreshurl?method=listall$session->cgi' class='.form'>
<input type='hidden' name='flavor' value='memory'>
<!-- header --> <table width='' border='0' cellspacing='0' cellpadding='5' align='center'>
<tr> 
<td valign='top'><p>Top of List | Previous | Show 
        <input type="text" name="listlimit" size="2" maxlength="2" value="$session->listlimit">
Items | Next | Bottom of List | 
        <input type="submit" name="refresh2" value="refresh list" class="buttonstyle"></p>
{list:$session->listquery;list}
<p>Top of List | Previous | Show 
        <input type="text" name="listlimit" size="2" maxlength="2" value="$session->listlimit">
Items | Next | Bottom of List | 
        <input type="submit" name="refresh2" value="refresh list" class="buttonstyle"></p>
</td>
<td width="150" valign='top'> <table width="150" border="0" cellspacing="0" cellpadding="5" class='querytable'>
<tr> <td>Listing $this->flavormenu -flavored $this->objtype(s) in $folder->name ( <input type="checkbox" name="listthisfolder" value="$folder->id" $this->thisfolderchecked> this folder only ) where: </td>
</tr>
<tr> <td>Status: <select name="liststatus"> <option value="new" $this->statusnew>new</option> <option value="changed" $this->statuschanged>changed</option> <option value="posted" $this->statusposted>posted</option> <option value="hidden" $this->statushidden>hidden</option> <option value="deleted" $this->statusdeleted>deleted</option> <option value="%" $this->statusany>any</option></select>
</td>
</tr>
<tr> <td>Rank: <input type="text" name="listrank" size="6" maxlength="8" value="$session->listrank"><br><input type="radio" name="listranksign" value=">=" $this->ranksign3> greater than this<br><input type="radio" name="listranksign" value="=" $this->ranksign2> equal to this<br><input type="radio" name="listranksign" value="<=" $this->ranksign1> less than this<br>
</td>
</tr>
<tr> <td> <p>Public: ($session->listpublic)<br> <input type="radio" name="listpublic" value="1" $this->public1> public objects only<br> <input type="radio" name="listpublic" value="%" $this->public2> all objects<br> <input type="radio" name="listpublic" value="" $this->public3> private objects only</p>
</td>
</tr>
<tr> <td>By Author: $this->authormenu </td>
</tr>
<tr> <td>Created: <input type="text" name="listcreated" size="20" value="$session->listcreated" maxlength="19"><br><input type="radio" name="listcreatedsign" value="<" $this->created1> before<br><input type="radio" name="listcreatedsign" value="=" $this->created2> at <br><input type="radio" name="listcreatedsign" value=">" $this->created3> after </td>
</tr>
<tr> <td>Updated: <input type="text" name="listupdated" size="20" value="$session->listupdated" maxlength="19"><br><input type="radio" name="listupdatedsign" value="<" $this->updated1> before<br><input type="radio" name="listupdatedsign" value="=" $this->updated2> at <br><input type="radio" name="listupdatedsign" value=">" $this->updated3> after </td>
</tr>
<tr> <td> <input type="submit" name="refresh3" value="refresh list" class="buttonstyle">
</td>
</tr>
</table>
</td>
</tr>
<tr> <td colspan='2'>$session->listquery</td>
</tr>
<tr> <td colspan='2'> <!-- /header --> &nbsp;</td>
</tr>
</table>
</form>

%%footer%%




%%postprocess%%



%%end of context%%
