pnuser.php search function:
Code
function pnDiagram_user_search()
{
if (!pnSecAuthAction(0, 'pnDiagram::', '::', ACCESS_OVERVIEW)) {
return pnVarPrepHTMLDisplay(_MODULENOAUTH);
}
$pnRender =& new pnRender('pnDiagram');
$pnRender->caching = false;
return $pnRender->fetch('pnDiagram_user_search.htm');
}
{
if (!pnSecAuthAction(0, 'pnDiagram::', '::', ACCESS_OVERVIEW)) {
return pnVarPrepHTMLDisplay(_MODULENOAUTH);
}
$pnRender =& new pnRender('pnDiagram');
$pnRender->caching = false;
return $pnRender->fetch('pnDiagram_user_search.htm');
}
The above is called to from a link in the users menu.
this is what I have in my template file now:
Code
<!--[* $Id: pnDiagram_admin_modify.htm,v 1.9 2004/04/05 19:47:51 markwest exp $ *]-->
<!--[include file="pnDiagram_user_menu.htm"]-->
<br /><br />
<div class="pn-title"><!--[pnml name="_pnDiagramSEARCH"]--></div>
<br /><br />
<form action="<!--[pnmodurl modname="pnDiagram" type="user" func="query"]-->" method="post" enctype="application/x-www-form-urlencoded">
<div>
<input type="hidden" name="authid" value="<!--[pnsecgenauthkey module="pnDiagram"]-->" />
<input type="hidden" name="tid" value="<!--[$tid|pnvarprepfordisplay]-->" />
<table border="1" cellpadding="5" cellspacing="1"><tbody>
<tr>
<td><label for="pnDiagram_name"><!--[pnml name="_pnDiagramNAME"]--></label></td>
<td><input id="pnDiagram_name" name="itemname" type="text" size="32" maxlength="32" /></td>
</tr>
<tr>
<td><label for="pnDiagram_site_type"><!--[pnml name="_pnDiagramSITETYPE"]--></label></td>
<td><select name="Tsite" size="1" tabindex="3"><option value=""></option><option value="Master Headend">Master Headend</option><option value="Hub">Hub</option><option value="CoLocation">CoLocation</option><option value="Central Office">Central Office</option><option value="Aggregation Point">Aggregation Point</option></select></td>
</tr>
<tr>
<td><label for="pnDiagram_city"><!--[pnml name="_pnDiagramCITY"]--></label></td>
<td><input id="pnDiagram_city" name="city" type="text" size="32" maxlength="32" /></td>
</tr>
<tr>
<td><label for="pnDiagram_state"><!--[pnml name="_pnDiagramSTATE"]--></label></td>
<td><input id="pnDiagram_state" name="state" type="text" size="32" maxlength="32" /></td>
</tr>
<tr>
<td><label for="pnDiagram_technology"><!--[pnml name="_pnDiagramTECHNOLOGY"]--></label></td>
<td><label><input type="radio" name="tech1" value="PowerLink">PowerLink</label></td>
</tr>
<tr>
<td><label for="pnDiagram_technology"><!--[pnml name="_pnDiagramTECHNOLOGY"]--></label></td>
<td><label><input type="radio" name="tech2" value="Digital TV">Digital TV</label></td>
</tr>
<tr>
<td><label for="pnDiagram_technology"><!--[pnml name="_pnDiagramTECHNOLOGY"]--></label></td>
<td><label><input type="radio" name="tech3" value="Video on Demand">Video on Demand</label></td>
</tr>
<tr>
<td><label for="pnDiagram_status"><!--[pnml name="_pnDiagramSTATUS"]--></label></td>
<td><select name="status" size="1" tabindex="13"><option value=""></option><option value="Verified">Verified</option><option value="Unverified">Unverified</option><option value="Proposed">Proposed</option><option value="Acquisition">Acquisition</option></select></td>
</tr>
<tr>
<td><label for="pnDiagram_diagram"><!--[pnml name="_pnDiagramDIAGRAM"]--></label></td>
<td><select name="diagram" size="1" tabindex="11"><option value=""></option><option value="Port">Port</option><option value="Rack">Rack</option><option value="Vlan">Vlan</option><option value="Connectivity">Connectivity</option><option value="Overview">Overview</option></select></td>
</tr>
<tr>
<td><label for="pnDiagram_author"><!--[pnml name="_pnDiagramAUTHOR"]--></label></td>
<td><input id="pnDiagram_author" name="author" type="text" size="32" maxlength="32" /></td>
</tr>
<tr>
<td><label for="pnDiagram_category"><!--[pnml name="_pnDiagramCATEGORY"]--></label></td>
<td><select name="category" size="1" tabindex="11"><option value=""></option><option value="NorthEast">NorthEast</option><option value="SouthEast">SouthEast</option><option value="SoutherCal">SoutherCal</option><option value="Western">Western</option><option value="Central">Central</option></select></td>
</tr>
</table>
<input name="submit" type="submit" value="<!--[pnml name="_pnDiagramSEARCH"]-->" />
</div>
</form>
<!--[include file="pnDiagram_user_menu.htm"]-->
<br /><br />
<div class="pn-title"><!--[pnml name="_pnDiagramSEARCH"]--></div>
<br /><br />
<form action="<!--[pnmodurl modname="pnDiagram" type="user" func="query"]-->" method="post" enctype="application/x-www-form-urlencoded">
<div>
<input type="hidden" name="authid" value="<!--[pnsecgenauthkey module="pnDiagram"]-->" />
<input type="hidden" name="tid" value="<!--[$tid|pnvarprepfordisplay]-->" />
<table border="1" cellpadding="5" cellspacing="1"><tbody>
<tr>
<td><label for="pnDiagram_name"><!--[pnml name="_pnDiagramNAME"]--></label></td>
<td><input id="pnDiagram_name" name="itemname" type="text" size="32" maxlength="32" /></td>
</tr>
<tr>
<td><label for="pnDiagram_site_type"><!--[pnml name="_pnDiagramSITETYPE"]--></label></td>
<td><select name="Tsite" size="1" tabindex="3"><option value=""></option><option value="Master Headend">Master Headend</option><option value="Hub">Hub</option><option value="CoLocation">CoLocation</option><option value="Central Office">Central Office</option><option value="Aggregation Point">Aggregation Point</option></select></td>
</tr>
<tr>
<td><label for="pnDiagram_city"><!--[pnml name="_pnDiagramCITY"]--></label></td>
<td><input id="pnDiagram_city" name="city" type="text" size="32" maxlength="32" /></td>
</tr>
<tr>
<td><label for="pnDiagram_state"><!--[pnml name="_pnDiagramSTATE"]--></label></td>
<td><input id="pnDiagram_state" name="state" type="text" size="32" maxlength="32" /></td>
</tr>
<tr>
<td><label for="pnDiagram_technology"><!--[pnml name="_pnDiagramTECHNOLOGY"]--></label></td>
<td><label><input type="radio" name="tech1" value="PowerLink">PowerLink</label></td>
</tr>
<tr>
<td><label for="pnDiagram_technology"><!--[pnml name="_pnDiagramTECHNOLOGY"]--></label></td>
<td><label><input type="radio" name="tech2" value="Digital TV">Digital TV</label></td>
</tr>
<tr>
<td><label for="pnDiagram_technology"><!--[pnml name="_pnDiagramTECHNOLOGY"]--></label></td>
<td><label><input type="radio" name="tech3" value="Video on Demand">Video on Demand</label></td>
</tr>
<tr>
<td><label for="pnDiagram_status"><!--[pnml name="_pnDiagramSTATUS"]--></label></td>
<td><select name="status" size="1" tabindex="13"><option value=""></option><option value="Verified">Verified</option><option value="Unverified">Unverified</option><option value="Proposed">Proposed</option><option value="Acquisition">Acquisition</option></select></td>
</tr>
<tr>
<td><label for="pnDiagram_diagram"><!--[pnml name="_pnDiagramDIAGRAM"]--></label></td>
<td><select name="diagram" size="1" tabindex="11"><option value=""></option><option value="Port">Port</option><option value="Rack">Rack</option><option value="Vlan">Vlan</option><option value="Connectivity">Connectivity</option><option value="Overview">Overview</option></select></td>
</tr>
<tr>
<td><label for="pnDiagram_author"><!--[pnml name="_pnDiagramAUTHOR"]--></label></td>
<td><input id="pnDiagram_author" name="author" type="text" size="32" maxlength="32" /></td>
</tr>
<tr>
<td><label for="pnDiagram_category"><!--[pnml name="_pnDiagramCATEGORY"]--></label></td>
<td><select name="category" size="1" tabindex="11"><option value=""></option><option value="NorthEast">NorthEast</option><option value="SouthEast">SouthEast</option><option value="SoutherCal">SoutherCal</option><option value="Western">Western</option><option value="Central">Central</option></select></td>
</tr>
</table>
<input name="submit" type="submit" value="<!--[pnml name="_pnDiagramSEARCH"]-->" />
</div>
</form>
Now from this file I will call to a pnuser.php query function to run the API function to do the search, this is where I am having a bit of trouble I am not 100% sure what this function should look like since the Example module doesn't have a search function and every module I have loaded on my system does not make use of the pnrender engine.
Any pointers anyone could provide would be awesome.
Thanks
-SUNADMN
