phpBMS

Show
Ignore:
Timestamp:
03/26/07 16:50:25 (5 years ago)
Author:
brieb
Message:

Updated XHTML compliance

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/include/search_class.php

    r204 r205  
    9090        ?> 
    9191        <script language="JavaScript" type="text/javascript">selIDs=new Array();</script> 
    92         <input name="newsort" type="hidden" value="" /><table cellspacing=0 cellpadding=0 border=0 class="querytable" id="queryresults"><tr> 
     92        <input name="newsort" type="hidden" value="" /><table cellspacing="0" cellpadding="0" border="0" class="querytable" id="queryresults"><tr> 
    9393        <?php 
    9494        $columncount=count($this->thecolumns); 
     
    9696 
    9797        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"]."\" ";?> > 
    9999        <input name="sortit<?php echo $i?>" type="hidden" value="<?php echo $therow["name"]?>" /> 
    100100        <a href="/" onclick="doSort(<?php echo $i?>);return false;"><?php echo $therow["name"]?></a> 
     
    134134                                 
    135135                                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"]):"&nbsp;")?></td><?php 
     136                                        ?><td align="<?php echo $thecolumn["align"]?>" <?php if(!$thecolumn["wrap"]) echo "nowrap=\"nowrap\""?>><?php echo (($therecord[$thecolumn["name"]]!=="")?formatVariable($therecord[$thecolumn["name"]],$thecolumn["format"]):"&nbsp;")?></td><?php 
    137137                                } 
    138138                                ?></tr><?php  
     
    144144                function displayNoResults(){ 
    145145                        $i=count($this->thecolumns);?> 
    146                         <tr><td colspan="<?php echo $i?>" align=center style="padding:0px;"> 
     146                        <tr><td colspan="<?php echo $i?>" align="center" style="padding:0px;"> 
    147147                                <?php if(!$this->sqlerror) {?> 
    148148                                <div class="norecords">No Records to Display</div> 
     
    392392 
    393393                ?> 
    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;"> 
     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;"> 
    395395<input id="tabledefid" name="tabledefid" type="hidden" value="<?php echo $this->thetabledef["id"]?>" /> 
    396396<input id="theids" name="theids" type="hidden" value="" /> 
     
    405405?> 
    406406<ul class="tabs"> 
    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> 
     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> 
    412412</ul> 
    413413<div class="box" id="searchBox"> 
     
    415415                <table cellpadding="0" cellspacing="0" border="0"> 
    416416                        <tr> 
    417                                 <td nowrap valign="top"> 
     417                                <td nowrap="nowrap" valign="top"> 
    418418                                        <p> 
    419419                                                <label for="find">find</label><br />                                     
     
    423423                                                                if(hasRights($this->findoptions[$i]["roleid"])){ 
    424424                                                                        ?><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\""; 
    426426                                                                        ?>><?php echo $this->findoptions[$i]["name"]?></option><?php 
    427427                                                                } 
     
    431431                                        </p> 
    432432                                </td> 
    433                         <td nowrap valign=top> 
     433                        <td nowrap="nowrap" valign="top"> 
    434434                                <p> 
    435435                                <label for="startswithfield">where</label><br /> 
     
    439439                                                                echo "<option value=\"".$this->searchablefields[$i]["id"]."\" "; 
    440440                                                                        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\"";                           
    442442                                                                        } 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\""; 
    444444                                                                        } 
    445445                                                                echo ">".$this->searchablefields[$i]["name"]."</option>\n"; 
     
    449449                                </p> 
    450450                        </td> 
    451                         <td width="100%" nowrap valign="top" > 
     451                        <td width="100%" nowrap="nowrap" valign="top" > 
    452452                                <p><label for="startswith">starts with</label><br /> 
    453453                                        <input id="startswith" name="startswith" type="text"  value="<?php if($this->querytype=="search" and isset($this->savedstartswith)) echo str_replace("\"","&quot;",stripslashes($this->savedstartswith))?>" size="35" maxlength="128" /><script language="JavaScript" type="text/javascript">setMainFocus()</script> 
    454454                                </p> 
    455455                        </td> 
    456                         <td align="left" valign="top" nowrap class="small"> 
     456                        <td align="left" valign="top" nowrap="nowrap" class="small"> 
    457457                                <p> 
    458458                                        <br /> 
     
    462462                </tr> 
    463463                <tr> 
    464                         <td colspan="3" align="left" valign=middle nowrap> 
     464                        <td colspan="3" align="left" valign="middle" nowrap="nowrap"> 
    465465                        <p> 
    466466                        <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> 
    473473                </tr>                            
    474474        </table> 
     
    482482                                <p><label for="saveSearchName">save current search as</label> 
    483483                                        <br /> 
    484                                         <input id="saveSearchName" name="saveSearchName" type="text"  value="" size="35" maxlength="128" onKeyUp="enableSave(this)" /> 
     484                                        <input id="saveSearchName" name="saveSearchName" type="text"  value="" size="35" maxlength="128" onkeyup="enableSave(this)" /> 
    485485                                </p> 
    486486                        </td> 
     
    488488                                <p> 
    489489                                        <br /> 
    490                                         <input id="saveSearch" onClick="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" /> 
    491491                                </p> 
    492492                        </td> 
     
    530530                        echo "<div>records:&nbsp;".$this->numrows."</div>"; 
    531531                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();"> 
    533533                                <?php 
    534534                                        $displayedoffset=0; 
    535535                                        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><?php 
     536                                                ?><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 
    537537                                                $displayedoffset+=$_SESSION["record_limit"]; 
    538538                                        } 
     
    543543                        } 
    544544                        if(($this->numrows+$this->recordoffset)<$this->truecount){ 
    545                                 ?><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 
     545                                ?><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 
    546546                        } 
    547547                                                   
     
    552552                if ($this->tableoptions["new"]["allowed"] && hasRights($this->tableoptions["new"]["roleid"]))  
    553553                        { 
    554                 ?><button type="button" accesskey="n" class="graphicButtons buttonNew" onClick="addRecord()" title="new (alt+n)"><span>new</span></button><?php  
     554                ?><button type="button" accesskey="n" class="graphicButtons buttonNew" onclick="addRecord()" title="new (alt+n)"><span>new</span></button><?php  
    555555                        }  
    556556                         
    557557                if($this->numrows) { 
    558558                        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><?php 
     559                                ?><button id="edit" accesskey="e" type="button" disabled="disabled" class="graphicButtons buttonEditDisabled" onclick="editThis()" title="edit (alt+e)"><span>edit</span></button><?php 
    560560                        } 
    561561                 
    562562                        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><?php 
     563                                ?><button id="print" accesskey="p" type="submit" disabled="disabled" class="graphicButtons buttonPrintDisabled" name="doprint"  title="print (alt+p)"><span>print</span></button><?php 
    564564                        } 
    565565 
    566566                        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><?php 
     567                                ?><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 
    568568                        } 
    569569         
    570570                        if($this->tableoptions["othercommands"] || ($this->thetabledef["deletebutton"] != "delete" && $this->thetabledef["deletebutton"] != "NA") ){?>                   
    571                                 <select id="othercommands" name="othercommands" disabled=true onchange="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> 
    573573                                <?php if($this->thetabledef["deletebutton"] != "delete" && $this->thetabledef["deletebutton"] != "NA") {?> 
    574574                                        <option value="delete_record" class="important"><?php echo $this->thetabledef["deletebutton"]?></option> 
     
    586586                                <option class="choiceListBlank" value="">selection...</option> 
    587587                                <option value="">_____________</option> 
    588                                 <option value="selectall" title="(alt+a)">select all</option> 
    589                                 <option value="selectnone" title="(alt+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> 
    590590                                <option value="">_____________</option> 
    591                                 <option value="keepselected" title="(alt+k)">keep selected</option> 
    592                                 <option value="omitselected" title="(alt+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 }  
     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 }  
    594594                 
    595595                }//end if numrows        
     
    634634        if (mysql_num_rows($queryresult)) { 
    635635                ?><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><?php  
     636                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  
    638638                        while($therecord = mysql_fetch_array($queryresult)){ 
    639639                        ?><option value="<?php echo $therecord["id"]?>"><?php echo $therecord["name"]?></option><?php } 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.