Changeset 205 for trunk/phpbms/include/search_class.php
- Timestamp:
- 03/26/07 16:50:25 (5 years ago)
- Files:
-
- 1 modified
-
trunk/phpbms/include/search_class.php (modified) (19 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/include/search_class.php
r204 r205 90 90 ?> 91 91 <script language="JavaScript" type="text/javascript">selIDs=new Array();</script> 92 <input name="newsort" type="hidden" value="" /><table cellspacing= 0 cellpadding=0 border=0class="querytable" id="queryresults"><tr>92 <input name="newsort" type="hidden" value="" /><table cellspacing="0" cellpadding="0" border="0" class="querytable" id="queryresults"><tr> 93 93 <?php 94 94 $columncount=count($this->thecolumns); … … 96 96 97 97 foreach ($this->thecolumns as $therow){ ?> 98 <th nowrap align="<?php echo $therow["align"]?>" <?php if($therow["size"]) echo "width=\"".$therow["size"]."\" ";?> >98 <th nowrap="nowrap" align="<?php echo $therow["align"]?>" <?php if($therow["size"]) echo "width=\"".$therow["size"]."\" ";?> > 99 99 <input name="sortit<?php echo $i?>" type="hidden" value="<?php echo $therow["name"]?>" /> 100 100 <a href="/" onclick="doSort(<?php echo $i?>);return false;"><?php echo $therow["name"]?></a> … … 134 134 135 135 foreach($this->thecolumns as $thecolumn){ 136 ?><td align="<?php echo $thecolumn["align"]?>" <?php if(!$thecolumn["wrap"]) echo "nowrap "?>><?php echo (($therecord[$thecolumn["name"]]!=="")?formatVariable($therecord[$thecolumn["name"]],$thecolumn["format"]):" ")?></td><?php136 ?><td align="<?php echo $thecolumn["align"]?>" <?php if(!$thecolumn["wrap"]) echo "nowrap=\"nowrap\""?>><?php echo (($therecord[$thecolumn["name"]]!=="")?formatVariable($therecord[$thecolumn["name"]],$thecolumn["format"]):" ")?></td><?php 137 137 } 138 138 ?></tr><?php … … 144 144 function displayNoResults(){ 145 145 $i=count($this->thecolumns);?> 146 <tr><td colspan="<?php echo $i?>" align= centerstyle="padding:0px;">146 <tr><td colspan="<?php echo $i?>" align="center" style="padding:0px;"> 147 147 <?php if(!$this->sqlerror) {?> 148 148 <div class="norecords">No Records to Display</div> … … 392 392 393 393 ?> 394 <form name="search" id="search" method="post" action="<?php echo $_SERVER["PHP_SELF"]?>?id=<?php echo $this->thetabledef["id"]?>" on Submit="setSelIDs(this);return true;">394 <form name="search" id="search" method="post" action="<?php echo $_SERVER["PHP_SELF"]?>?id=<?php echo $this->thetabledef["id"]?>" onsubmit="setSelIDs(this);return true;"> 395 395 <input id="tabledefid" name="tabledefid" type="hidden" value="<?php echo $this->thetabledef["id"]?>" /> 396 396 <input id="theids" name="theids" type="hidden" value="" /> … … 405 405 ?> 406 406 <ul class="tabs"> 407 <li id="basicSearchT" class="tabsSel"><a href="/" on Click="switchSearchTabs(this);return false">basic</a></li>408 <?php if(hasRights($this->thetabledef["advsearchroleid"])){?><li id="advancedSearchT"><a href="/" on Click="switchSearchTabs(this,'<?php echo $_SESSION["app_path"]?>');return false">advanced</a></li><?php } //end access ?>409 <li id="loadSearchT"><a href="/" on Click="switchSearchTabs(this,'<?php echo $_SESSION["app_path"]?>');return false">load search</a></li>410 <li id="saveSearchT"><a href="/" on Click="switchSearchTabs(this,'<?php echo $_SESSION["app_path"]?>');return false">save search</a></li>411 <li id="advancedSortT"><a href="/" on Click="switchSearchTabs(this,'<?php echo $_SESSION["app_path"]?>');return false">sorting</a></li>407 <li id="basicSearchT" class="tabsSel"><a href="/" onclick="switchSearchTabs(this);return false">basic</a></li> 408 <?php if(hasRights($this->thetabledef["advsearchroleid"])){?><li id="advancedSearchT"><a href="/" onclick="switchSearchTabs(this,'<?php echo $_SESSION["app_path"]?>');return false">advanced</a></li><?php } //end access ?> 409 <li id="loadSearchT"><a href="/" onclick="switchSearchTabs(this,'<?php echo $_SESSION["app_path"]?>');return false">load search</a></li> 410 <li id="saveSearchT"><a href="/" onclick="switchSearchTabs(this,'<?php echo $_SESSION["app_path"]?>');return false">save search</a></li> 411 <li id="advancedSortT"><a href="/" onclick="switchSearchTabs(this,'<?php echo $_SESSION["app_path"]?>');return false">sorting</a></li> 412 412 </ul> 413 413 <div class="box" id="searchBox"> … … 415 415 <table cellpadding="0" cellspacing="0" border="0"> 416 416 <tr> 417 <td nowrap valign="top">417 <td nowrap="nowrap" valign="top"> 418 418 <p> 419 419 <label for="find">find</label><br /> … … 423 423 if(hasRights($this->findoptions[$i]["roleid"])){ 424 424 ?><option value="<?php echo $this->findoptions[$i]["name"]?>"<?php 425 if($this->querytype=="search" and $this->findoptions[$i]["name"]==$this->savedfindoptions) echo "selected ";425 if($this->querytype=="search" and $this->findoptions[$i]["name"]==$this->savedfindoptions) echo "selected=\"selected\""; 426 426 ?>><?php echo $this->findoptions[$i]["name"]?></option><?php 427 427 } … … 431 431 </p> 432 432 </td> 433 <td nowrap valign=top>433 <td nowrap="nowrap" valign="top"> 434 434 <p> 435 435 <label for="startswithfield">where</label><br /> … … 439 439 echo "<option value=\"".$this->searchablefields[$i]["id"]."\" "; 440 440 if(!isset($this->savedstartswithfield)){ 441 if($this->querytype!="search" and $i==0) echo "selected ";441 if($this->querytype!="search" and $i==0) echo "selected=\"selected\""; 442 442 } else { 443 if($this->querytype=="search" and addslashes($this->searchablefields[$i]["id"])==$this->savedstartswithfield) echo "selected ";443 if($this->querytype=="search" and addslashes($this->searchablefields[$i]["id"])==$this->savedstartswithfield) echo "selected=\"selected\""; 444 444 } 445 445 echo ">".$this->searchablefields[$i]["name"]."</option>\n"; … … 449 449 </p> 450 450 </td> 451 <td width="100%" nowrap valign="top" >451 <td width="100%" nowrap="nowrap" valign="top" > 452 452 <p><label for="startswith">starts with</label><br /> 453 453 <input id="startswith" name="startswith" type="text" value="<?php if($this->querytype=="search" and isset($this->savedstartswith)) echo str_replace("\"",""",stripslashes($this->savedstartswith))?>" size="35" maxlength="128" /><script language="JavaScript" type="text/javascript">setMainFocus()</script> 454 454 </p> 455 455 </td> 456 <td align="left" valign="top" nowrap class="small">456 <td align="left" valign="top" nowrap="nowrap" class="small"> 457 457 <p> 458 458 <br /> … … 462 462 </tr> 463 463 <tr> 464 <td colspan="3" align="left" valign= middle nowrap>464 <td colspan="3" align="left" valign="middle" nowrap="nowrap"> 465 465 <p> 466 466 <select name="Selection"> 467 <option value="new" <?php if ($this->querytype!="search" or ($this->querytype=="search" and $this->savedselection=="new") ) echo "selected "?> >new result</option>468 <option value="add" <?php if ($this->querytype=="search" and $this->savedselection=="add")echo "selected "?>>add to result</option>469 <option value="remove" <?php if ($this->querytype=="search" and $this->savedselection=="remove")echo " checked"?>>remove from result</option>470 <option value="narrow" <?php if ($this->querytype=="search" and $this->savedselection=="narrow")echo " checked"?>>narrow result</option>471 </select></p> 472 <td align="left" valign= top nowrap ><p><input name="command" type="submit" id="reset" class="smallButtons" value="reset" accesskey="t" title="(alt+t)"/></p></td>467 <option value="new" <?php if ($this->querytype!="search" or ($this->querytype=="search" and $this->savedselection=="new") ) echo "selected=\"selected\""?> >new result</option> 468 <option value="add" <?php if ($this->querytype=="search" and $this->savedselection=="add")echo "selected=\"selected\""?>>add to result</option> 469 <option value="remove" <?php if ($this->querytype=="search" and $this->savedselection=="remove")echo "selected=\"selected\""?>>remove from result</option> 470 <option value="narrow" <?php if ($this->querytype=="search" and $this->savedselection=="narrow")echo "selected=\"selected\""?>>narrow result</option> 471 </select></p></td> 472 <td align="left" valign="top" nowrap="nowrap"><p><input name="command" type="submit" id="reset" class="smallButtons" value="reset" accesskey="t" title="(access key+t)"/></p></td> 473 473 </tr> 474 474 </table> … … 482 482 <p><label for="saveSearchName">save current search as</label> 483 483 <br /> 484 <input id="saveSearchName" name="saveSearchName" type="text" value="" size="35" maxlength="128" on KeyUp="enableSave(this)" />484 <input id="saveSearchName" name="saveSearchName" type="text" value="" size="35" maxlength="128" onkeyup="enableSave(this)" /> 485 485 </p> 486 486 </td> … … 488 488 <p> 489 489 <br /> 490 <input id="saveSearch" on Click="saveMySearch('<?php echo $_SESSION["app_path"] ?>')" disabled="true" type="button" class="Buttons" value="save search" />490 <input id="saveSearch" onclick="saveMySearch('<?php echo $_SESSION["app_path"] ?>')" disabled="disabled" type="button" class="Buttons" value="save search" /> 491 491 </p> 492 492 </td> … … 530 530 echo "<div>records: ".$this->numrows."</div>"; 531 531 else {?> 532 <input name="offset" type="hidden" value="" ><select name="offsetselector" onchange="this.form.offset.value=this.value;this.form.submit();">532 <input name="offset" type="hidden" value="" /><select name="offsetselector" onchange="this.form.offset.value=this.value;this.form.submit();"> 533 533 <?php 534 534 $displayedoffset=0; 535 535 while($displayedoffset<$this->truecount){ 536 ?><option value="<?php echo $displayedoffset?>" <?php if($displayedoffset==$this->recordoffset) echo "selected ";?>><?php echo ($displayedoffset+1)?>-<?php if($displayedoffset+$_SESSION["record_limit"]<$this->truecount) echo ($displayedoffset+$_SESSION["record_limit"]); else echo $this->truecount;?></option><?php536 ?><option value="<?php echo $displayedoffset?>" <?php if($displayedoffset==$this->recordoffset) echo "selected=\"selected\"";?>><?php echo ($displayedoffset+1)?>-<?php if($displayedoffset+$_SESSION["record_limit"]<$this->truecount) echo ($displayedoffset+$_SESSION["record_limit"]); else echo $this->truecount;?></option><?php 537 537 $displayedoffset+=$_SESSION["record_limit"]; 538 538 } … … 543 543 } 544 544 if(($this->numrows+$this->recordoffset)<$this->truecount){ 545 ?><button type="button" class="graphicButtons buttonFF" on Click="document.search.offset.value=<?php echo $this->recordoffset+$_SESSION["record_limit"] ?>;document.search.submit();"><span>next</span></button><?php545 ?><button type="button" class="graphicButtons buttonFF" onclick="document.search.offset.value=<?php echo $this->recordoffset+$_SESSION["record_limit"] ?>;document.search.submit();"><span>next</span></button><?php 546 546 } 547 547 … … 552 552 if ($this->tableoptions["new"]["allowed"] && hasRights($this->tableoptions["new"]["roleid"])) 553 553 { 554 ?><button type="button" accesskey="n" class="graphicButtons buttonNew" on Click="addRecord()" title="new (alt+n)"><span>new</span></button><?php554 ?><button type="button" accesskey="n" class="graphicButtons buttonNew" onclick="addRecord()" title="new (alt+n)"><span>new</span></button><?php 555 555 } 556 556 557 557 if($this->numrows) { 558 558 if ($this->tableoptions["edit"]["allowed"] && hasRights($this->tableoptions["edit"]["roleid"])) { 559 ?><button id="edit" accesskey="e" type="button" disabled=" true" class="graphicButtons buttonEditDisabled" onClick="editThis()" title="edit (alt+e)"><span>edit</span></button><?php559 ?><button id="edit" accesskey="e" type="button" disabled="disabled" class="graphicButtons buttonEditDisabled" onclick="editThis()" title="edit (alt+e)"><span>edit</span></button><?php 560 560 } 561 561 562 562 if($this->tableoptions["printex"]["allowed"] && hasRights($this->tableoptions["printex"]["roleid"])){ 563 ?><button id="print" accesskey="p" type="submit" disabled=" true" class="graphicButtons buttonPrintDisabled" name="doprint" title="print (alt+p)"><span>print</span></button><?php563 ?><button id="print" accesskey="p" type="submit" disabled="disabled" class="graphicButtons buttonPrintDisabled" name="doprint" title="print (alt+p)"><span>print</span></button><?php 564 564 } 565 565 566 566 if($this->thetabledef["deletebutton"] == "delete") { 567 ?><button id="delete" name="dodelete" accesskey="d" type="button" title="delete (alt+d)" disabled=" true" onClick="confirmDelete('delete')" class="graphicButtons buttonDeleteDisabled"><span>delete</span></button><?php567 ?><button id="delete" name="dodelete" accesskey="d" type="button" title="delete (alt+d)" disabled="disabled" onclick="confirmDelete('delete')" class="graphicButtons buttonDeleteDisabled"><span>delete</span></button><?php 568 568 } 569 569 570 570 if($this->tableoptions["othercommands"] || ($this->thetabledef["deletebutton"] != "delete" && $this->thetabledef["deletebutton"] != "NA") ){?> 571 <select id="othercommands" name="othercommands" disabled= trueonchange="chooseOtherCommand(this)">572 <option value="" selected class="choiceListBlank">commands...</option>571 <select id="othercommands" name="othercommands" disabled="disabled" onchange="chooseOtherCommand(this)"> 572 <option value="" selected="selected" class="choiceListBlank">commands...</option> 573 573 <?php if($this->thetabledef["deletebutton"] != "delete" && $this->thetabledef["deletebutton"] != "NA") {?> 574 574 <option value="delete_record" class="important"><?php echo $this->thetabledef["deletebutton"]?></option> … … 586 586 <option class="choiceListBlank" value="">selection...</option> 587 587 <option value="">_____________</option> 588 <option value="selectall" title="(a lt+a)">select all</option>589 <option value="selectnone" title="(a lt+x)">select none</option>588 <option value="selectall" title="(access key+a)">select all</option> 589 <option value="selectnone" title="(access key+x)">select none</option> 590 590 <option value="">_____________</option> 591 <option value="keepselected" title="(a lt+k)">keep selected</option>592 <option value="omitselected" title="(a lt+o)" >omit selected</option>593 </select><a href="/" on Click="changeSelection('selectall');return false;" accesskey="a" tabindex="0"></a><a href="/" onClick="changeSelection('selectnone');return false;" accesskey="x" tabindex="0"></a><a href="/" onClick="changeSelection('keepselected');return false;" accesskey="k" tabindex="0"></a><a href="/" onClick="changeSelection('omitselected');return false;" accesskey="o" tabindex="0"></a><?php }591 <option value="keepselected" title="(access key+k)">keep selected</option> 592 <option value="omitselected" title="(access key+o)" >omit selected</option> 593 </select><a href="/" onclick="changeSelection('selectall');return false;" accesskey="a" tabindex="0"></a><a href="/" onclick="changeSelection('selectnone');return false;" accesskey="x" tabindex="0"></a><a href="/" onclick="changeSelection('keepselected');return false;" accesskey="k" tabindex="0"></a><a href="/" onclick="changeSelection('omitselected');return false;" accesskey="o" tabindex="0"></a><?php } 594 594 595 595 }//end if numrows … … 634 634 if (mysql_num_rows($queryresult)) { 635 635 ?><div class="small box" style="margin:0px;margin-top:3px;"> 636 relate selected records to <select id="relationship" name="relationship" onchange="setSelIDs(this.form);this.form.submit();" disabled=" true">637 <option value="" selected class="choiceListBlank">area...</option><?php636 relate selected records to <select id="relationship" name="relationship" onchange="setSelIDs(this.form);this.form.submit();" disabled="disabled"> 637 <option value="" selected="selected" class="choiceListBlank">area...</option><?php 638 638 while($therecord = mysql_fetch_array($queryresult)){ 639 639 ?><option value="<?php echo $therecord["id"]?>"><?php echo $therecord["name"]?></option><?php }