navigation  interaction  search

 other resources

Changeset 427

Show
Ignore:
Timestamp:
08/13/08 12:09:00
Author:
nate
Message:
  • Initial implementation of table imports.
  • Tables engine type changed to INNODB to support mysql transactions.
  • Tabledefs and tableoptions tables modified with additional columns.
  • Permits additional commands to be called without records needing to be selected, provided they have the correct property (found in tableoptions sections of the tabledef add edit).
  • Fixes delete button name for tax areas tabledef.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/phpbms/common/javascript/queryfunctions.js

    r308 r427  
    9393        if(!ctrlkeydown && shiftkeydown){ 
    9494                //Need to program shift click in here! 
    95                 var curID=null; 
    96                 var theTable=theTR.parentNode; 
    97                 var searchArray="+"+selIDs.join("+")+"+"; 
    98                 var point1=null; 
    99                 var point2=null; 
     95                var curID = null; 
     96                var theTable = theTR.parentNode; 
     97                var searchArray = "+"+selIDs.join("+")+"+"; 
     98                var point1 = null; 
     99                var point2 = null; 
    100100                 
    101101                for(i=0;i<theTable.childNodes.length;i++){ 
    102102                        if (theTable.childNodes[i].className){                           
    103103                                if(theTable.childNodes[i].className != "queryGroup"){ 
    104                                         theTable.childNodes[i].className="qr"+theTable.childNodes[i].className.charAt(theTable.childNodes[i].className.length-1); 
    105                                         curID=theTable.childNodes[i].id.substr(2); 
    106                                         if(curID==theID) 
    107                                                 point1=i; 
    108                                         if(searchArray.indexOf("+"+curID+"+")!=-1 && point2==null) { 
    109                                                 point2=i; 
     104                                        theTable.childNodes[i].className = "qr"+theTable.childNodes[i].className.charAt(theTable.childNodes[i].className.length-1); 
     105                                        curID = theTable.childNodes[i].id.substr(2); 
     106                                        if(curID == theID) 
     107                                                point1 = i; 
     108                                        if(searchArray.indexOf("+"+curID+"+") != -1 && point2==null) { 
     109                                                point2 = i; 
    110110                                        } 
    111111                                } 
     
    157157} 
    158158 
    159 function chooseOtherCommand(thevalue,thetext){ 
    160         var thediv = getObjectFromID("otherDropDown"); 
    161         var otherField = getObjectFromID("othercommands"); 
    162          
    163         otherField.value = thevalue; 
    164          
    165         if (thevalue != "-1") { 
    166                 setSelIDs(otherField.form); 
    167                 otherField.form.submit(); 
    168         } else { 
    169                 var confirmcommand=thetext 
    170                 confirmDelete(confirmcommand); 
    171                 thediv.style.display = "none"; 
    172         } 
     159function chooseOtherCommand(thevalue, thetext, thesource){ 
     160         
     161        if(!thesource.className.match(/Disabled/)){ 
     162                 
     163                switch(thevalue){ 
     164                        case "-1": 
     165                                var thediv = getObjectFromID("otherDropDown"); 
     166                                var confirmcommand=thetext; 
     167                                confirmDelete(confirmcommand); 
     168                                thediv.style.display = "none"; 
     169                                break; 
     170                         
     171                        case "-2": 
     172                                importRecord(); 
     173                                break; 
     174                         
     175                        default: 
     176                                var otherField = getObjectFromID("othercommands"); 
     177                                setSelIDs(otherField.form); 
     178                                otherField.value = thevalue; 
     179                                otherField.form.submit(); 
     180                                break; 
     181                }//end switch 
     182                 
     183        }//end if 
     184         
    173185} 
    174186 
     
    210222        var printButton=getObjectFromID("print"); 
    211223        var deleteButton=getObjectFromID("deleteRecord"); 
    212         var otherCommands=getObjectFromID("otherCommandButton"); 
     224        //var otherCommands=getObjectFromID("otherCommandButton"); 
    213225        var relationship=getObjectFromID("relationship"); 
     226        var select = getElementsByClassName("needselect"); 
     227        if(!select.length) 
     228                var select = getElementsByClassName("needselectDisabled"); 
    214229                 
    215230        if(editButton) 
     
    218233        if(deleteButton) 
    219234                deleteButton.className = "deleteRecord"+((disabledstatus)?"Disabled":""); 
    220  
    221         if(otherCommands) { 
    222                 otherCommands.className = "otherCommands"+((disabledstatus)?"Disabled":""); 
    223                 var otherDropDown = getObjectFromID("otherDropDown"); 
    224                 otherDropDown.style.display = "none";            
    225         } 
     235                         
     236         
     237        for(i = 0;i < select.length; i++) 
     238                select[i].className = "needselect"+((disabledstatus)?"Disabled":""); 
     239         
     240         
     241        //if(otherCommands) { 
     242        //      otherCommands.className = "otherCommands"+((disabledstatus)?"Disabled":""); 
     243        //      var otherDropDown = getObjectFromID("otherDropDown"); 
     244        //      otherDropDown.style.display = "none"; 
     245        //} 
    226246                 
    227247        if(relationship) relationship.disabled=disabledstatus; 
     
    271291} 
    272292 
     293function importRecord(){ 
     294        var connector; 
     295        if (importFile.indexOf("?")>=0) 
     296                connector="&"; 
     297        else 
     298                connector="?"; 
     299        if(typeof xtraParamaters != "undefined") 
     300                importFile+=connector+(xtraParamaters); 
     301        document.location=importFile; 
     302} 
    273303 
    274304// Select All/None Button 
  • trunk/phpbms/common/stylesheet/mozilla/pages/search.css

    r318 r427  
    4040.otherCommandsDisabled{background-image: url("../image/search-toolbar-cmd-db.png")} 
    4141.searchSelection{background-image: url("../image/search-toolbar-selection.png")} 
    42 .searchSelectionDisabled{background-image: url("../image/search-toolbar-selection-db.png")} 
     42.needselectDisabled{background-image: url("../image/search-toolbar-selection-db.png")} 
     43.needselectDisabled{ 
     44        color:grey; 
     45
    4346.sqlUp{background-image: url("../image/search-toolbar-sql.png")} 
    4447.sqlDn{background-image: url("../image/search-toolbar-sql-dn.png")} 
  • trunk/phpbms/include/common_functions.php

    r398 r427  
    220220                        case "SQL": 
    221221                                $temparray=explode("-",$datestring); 
    222                                 if(count($temparray)>1
     222                                if(count($temparray)==3
    223223                                        $thedate=mktime(0,0,0,(int) $temparray[1],(int) $temparray[2],(int) $temparray[0]); 
    224224                                else  
     
    229229                                $datestring="/".ereg_replace(",.","/",$datestring); 
    230230                                $temparray=explode("/",$datestring); 
    231                                 if(count($temparray)>1
     231                                if(count($temparray)==4
    232232                                        $thedate=mktime(0,0,0,(int) $temparray[1],(int) $temparray[2],(int) $temparray[3]); 
    233233                                else  
     
    238238                                $datestring="/".ereg_replace(",.","/",$datestring); 
    239239                                $temparray=explode("/",$datestring); 
    240                                 if(count($temparray)>1
     240                                if(count($temparray)==4
    241241                                        $thedate=mktime(0,0,0,(int) $temparray[2],(int) $temparray[1],(int) $temparray[3]); 
    242242                                else  
     
    247247                                $datestring="-".ereg_replace(",.","-",$datestring); 
    248248                                $temparray=explode("-",$datestring); 
    249                                 if(count($temparray)>1
     249                                if(count($temparray)==4
    250250                                        $thedate=mktime(0,0,0,(int) $temparray[2],(int) $temparray[1],(int) $temparray[3]); 
    251251                                else  
     
    265265                        case "24 Hour": 
    266266                                $temparray=explode(":",$timestring); 
    267                                 if(count($temparray)>1
     267                                if(count($temparray)==3
    268268                                        $thetime=mktime($temparray[0],$temparray[1],$temparray[2]); 
     269                                else 
     270                                        return false; 
    269271                        break; 
    270272 
     
    279281                                } 
    280282                                $timearray=explode(":",$timestring); 
    281                                 if ($timearray[0]==12) 
    282                                         $timearray[0]=0; 
    283                                 $timearray[0]= ((integer) $timearray[0]) + $addtime; 
    284                                 $thetime=mktime($timearray[0],$timearray[1],0); 
     283                                if(count($timearray) == 2){ 
     284                                        if ($timearray[0]==12) 
     285                                                $timearray[0]=0; 
     286                                        $timearray[0]= ((integer) $timearray[0]) + $addtime; 
     287                                        $thetime=mktime($timearray[0],$timearray[1],0); 
     288                                }else 
     289                                        return false; 
    285290                        break; 
    286291                } 
  • trunk/phpbms/include/db.php

    r311 r427  
    112112                                $this->db_link = @ mysql_connect($this->hostname,$this->dbuser,$this->dbpass); 
    113113                        if(!$this->db_link){ 
    114                                 $error = new appError(-400,"Could not connect to database server.\n\n".mysql_error(),"",$this->showError,$this->stopOnError,false,$this->errorFormat); 
     114                                $error = new appError(-400,"Could not connect to database server.\n\n".$this->getError(),"",$this->showError,$this->stopOnError,false,$this->errorFormat); 
    115115                                return false; 
    116116                        } else                   
     
    136136                                        if(!isset($this->db_link))  
    137137                                                if(!$this->dataB()) die($this->error); 
    138                                         $queryresult= @ mysql_query($sqlstatement,$this->db_link); 
     138                                        $queryresult = @ mysql_query($sqlstatement,$this->db_link); 
    139139                                        if(!$queryresult){ 
    140                                                 $this->error = mysql_error($this->db_link); 
    141                                                 $error = new appError(-420,mysql_error($this->db_link)."\n\nStatement: ".$sqlstatement,"",$this->showError,$this->stopOnError,$this->logError,$this->errorFormat); 
     140                                                $this->error = $this->getError($this->db_link); 
     141                                                $error = new appError(-420,$this->getError($this->db_link)."\n\nStatement: ".$sqlstatement,"",$this->showError,$this->stopOnError,$this->logError,$this->errorFormat); 
    142142                                                return false; 
    143143                                        }                                        
     
    162162 
    163163 
     164                function getError($link = NULL){ 
     165                         
     166                        switch($this->type){ 
     167                                case "mysql": 
     168                                        $thereturn = mysql_error($link); 
     169                                break; 
     170                        }//end switch --type-- 
     171                         
     172                        return $thereturn; 
     173                         
     174                }//end method --getError-- 
     175                 
     176 
    164177                function numRows($queryresult){ 
    165178                        switch($this->type){ 
     
    187200                }//end function 
    188201 
     202                 
     203                function startTransaction(){ 
     204                         
     205                        switch($this->type){ 
     206                                 
     207                                case "mysql": 
     208                                        $this->query("START TRANSACTION;"); 
     209                                break; 
     210                         
     211                        }//end switch 
     212                         
     213                }//end method --startTransaction-- 
     214                 
     215                 
     216                function commitTransaction(){ 
     217                         
     218                        switch($this->type){ 
     219                                 
     220                                case "mysql": 
     221                                        $this->query("COMMIT;"); 
     222                                break; 
     223                         
     224                        }//end switch 
     225                         
     226                }//end method --startTransaction-- 
     227                 
     228                 
     229                function rollbackTransaction(){ 
     230                         
     231                        switch($this->type){ 
     232                                 
     233                                case "mysql": 
     234                                        $this->query("ROLLBACK;"); 
     235                                break; 
     236                         
     237                        }//end switch 
     238                         
     239                }//end method --startTransaction-- 
     240                 
    189241 
    190242                function seek($queryresult,$rownum){ 
  • trunk/phpbms/include/search_class.php

    r330 r427  
    6060                //given a table id, go grab the table definition information for that table 
    6161                function getTableDef($id){ 
    62                         $querystatement="SELECT tabledefs.id,maintable,querytable,tabledefs.displayname,addfile,editfile,deletebutton,type, 
    63                                                           defaultwhereclause,defaultsortorder,defaultsearchtype,defaultcriteriafindoptions,defaultcriteriaselection, 
    64                                                           modules.name,searchroleid,advsearchroleid,viewsqlroleid 
    65                                                           FROM tabledefs inner join modules on tabledefs.moduleid=modules.id 
    66                                                           WHERE tabledefs.id=".$id; 
     62                        $querystatement=" 
     63                                SELECT 
     64                                        tabledefs.id, 
     65                                        maintable, 
     66                                        querytable, 
     67                                        tabledefs.displayname, 
     68                                        addfile, 
     69                                        editfile, 
     70                                        importfile, 
     71                                        deletebutton, 
     72                                        type, 
     73                                        defaultwhereclause, 
     74                                        defaultsortorder, 
     75                                        defaultsearchtype, 
     76                                        defaultcriteriafindoptions, 
     77                                        defaultcriteriaselection, 
     78                                        modules.name, 
     79                                        searchroleid, 
     80                                        advsearchroleid, 
     81                                        viewsqlroleid 
     82                                FROM 
     83                                        tabledefs inner join modules on tabledefs.moduleid=modules.id 
     84                                WHERE 
     85                                        tabledefs.id=".$id; 
    6786                         
    6887                        $queryresult=$this->db->query($querystatement); 
     
    112131                } 
    113132                                                 
    114 function showResultHeader(){ 
    115         ?> 
    116         <tr> 
    117         <?php 
    118         $columncount=count($this->thecolumns); 
    119         $i=1; 
    120  
    121         foreach ($this->thecolumns as $therow){ ?> 
    122 <th nowrap="nowrap" align="<?php echo $therow["align"]?>" <?php if($therow["size"]) echo "width=\"".$therow["size"]."\" ";?> > 
    123         <input name="sortit<?php echo $i?>" type="hidden" value="<?php echo $therow["name"]?>" /> 
    124         <a href="/" onclick="doSort(<?php echo $i?>);return false;"><?php echo $therow["name"]?></a> 
    125         <?php 
    126                 // If sorting on this column give the option to reverse the sort order. 
    127                 if ($this->querysortorder==$therow["column"] || $this->querysortorder==$therow["sortorder"])  
    128         {?>&nbsp;<a href="/" onclick="doDescSort();return false;"><img src="<?php echo APP_PATH?>common/image/down_arrow.gif" alt="dn" title="dn" width="10" height="10" border="0" /></a><input name="desc" type="hidden" value="" /> 
    129 <?php }       elseif ($this->querysortorder==$therow["column"]." DESC" || $this->querysortorder==$therow["sortorder"]." DESC")  
    130 {?> &nbsp;<a href="/" onclick="doSort(<?php echo $i?>);return false;"><img src="<?php echo APP_PATH?>common/image/up_arrow.gif" alt="up" title="up" width="10" height="10" border="0" /></a> 
    131 <?php }       ?></th><?php 
    132                 $i++; 
    133         }//end foreach 
    134         ?></tr><?php 
    135          
    136 }//end function 
     133               function showResultHeader(){ 
     134                       ?> 
     135                       <tr> 
     136                       <?php 
     137                       $columncount=count($this->thecolumns); 
     138                       $i=1; 
     139                 
     140                       foreach ($this->thecolumns as $therow){ ?> 
     141               <th nowrap="nowrap" align="<?php echo $therow["align"]?>" <?php if($therow["size"]) echo "width=\"".$therow["size"]."\" ";?> > 
     142                       <input name="sortit<?php echo $i?>" type="hidden" value="<?php echo $therow["name"]?>" /> 
     143                       <a href="/" onclick="doSort(<?php echo $i?>);return false;"><?php echo $therow["name"]?></a> 
     144                       <?php 
     145                               // If sorting on this column give the option to reverse the sort order. 
     146                               if ($this->querysortorder==$therow["column"] || $this->querysortorder==$therow["sortorder"])  
     147                       {?>&nbsp;<a href="/" onclick="doDescSort();return false;"><img src="<?php echo APP_PATH?>common/image/down_arrow.gif" alt="dn" title="dn" width="10" height="10" border="0" /></a><input name="desc" type="hidden" value="" /> 
     148               <?php }        elseif ($this->querysortorder==$therow["column"]." DESC" || $this->querysortorder==$therow["sortorder"]." DESC")  
     149               {?> &nbsp;<a href="/" onclick="doSort(<?php echo $i?>);return false;"><img src="<?php echo APP_PATH?>common/image/up_arrow.gif" alt="up" title="up" width="10" height="10" border="0" /></a> 
     150               <?php }        ?></th><?php 
     151                               $i++; 
     152                       }//end foreach 
     153                       ?></tr><?php 
     154                        
     155               }//end function 
    137156 
    138157                //output a query 
     
    406425                                        name, 
    407426                                        `option`, 
     427                                        needselect, 
    408428                                        othercommand, 
    409429                                        roleid, 
     
    427447                                                "name" => $therecord["option"], 
    428448                                                "roleid" => $therecord["roleid"], 
    429                                                 "displayorder" => $therecord["displayorder"] 
     449                                                "displayorder" => $therecord["displayorder"], 
     450                                                "needselect" => $therecord["needselect"] 
    430451                                        ); 
    431452                                                                         
     
    434455                                        $options[$therecord["name"]]["allowed"]=$therecord["option"]; 
    435456                                        $options[$therecord["name"]]["roleid"]=$therecord["roleid"]; 
     457                                        $options[$therecord["name"]]["needselect"]=$therecord["needselect"]; 
    436458                                         
    437459                                }//endif 
     
    576598 
    577599                 
    578 function displayQueryButtons() { 
    579  
    580         global $phpbms; 
    581          
    582         ?><div id="resultInfoDiv"><?php 
    583          
    584         if(!isset($this->tableoptions["new"])){ 
    585                  $this->tableoptions["new"]["allowed"]=0; 
    586                  $this->tableoptions["new"]["roleid"]=0; 
    587         }  
    588         if(!isset($this->tableoptions["select"])) { 
    589                 $this->tableoptions["select"]["allowed"]=0; 
    590                 $this->tableoptions["select"]["roleid"]=0; 
    591         } 
    592         if(!isset($this->tableoptions["edit"])){ 
    593                  $this->tableoptions["edit"]["allowed"]=0; 
    594                  $this->tableoptions["edit"]["roleid"]=0; 
    595         } 
    596         if(!isset($this->tableoptions["printex"])) { 
    597                 $this->tableoptions["printex"]["allowed"]=0; 
    598                 $this->tableoptions["printex"]["roleid"]=0; 
    599         } 
    600         if(!isset($this->tableoptions["othercommands"])) $this->tableoptions["othercommands"]=false; 
    601  
    602         // If they have rights to see the SQL statement, spit it out here. 
    603         if(hasRights($this->thetabledef["viewsqlroleid"])) { 
    604          
    605         ?><div id="sqlstatement"> 
    606                 <fieldset> 
    607                         <legend>SQL Statement</legend> 
    608                         <div id="theSqlText" class="mono small"><?php echo stripslashes(htmlQuotes($this->querystatement))?></div> 
    609                 </fieldset><?php  
    610  
    611                 if($this->sqlerror) {?> 
    612                 <fieldset> 
    613                         <legend><span style="text-transform:capitalize">SQL</span> Error</legend> 
    614                         <div><?php echo $this->sqlerror?></div> 
    615                 </fieldset><?php  
    616  
    617                 }?> 
    618         </div> 
    619          
    620         <?php } 
    621  
    622         ?><div id="commandSet"><?php 
    623          
    624         if($this->numrows){ 
    625                 ?> 
    626                 <div id="numCount" align="right" class="small"><input type="hidden" id="deleteCommand" name="deleteCommand" value="" /><?php 
    627                  
    628                 if ($this->truecount<=RECORD_LIMIT)  
    629                         echo "<div>records:&nbsp;".$this->numrows."</div>"; 
    630                 else { 
    631                  
    632                 ?>                       
    633                         <input name="offset" type="hidden" value="" /><select name="offsetselector" onchange="this.form.offset.value=this.value;this.form.submit();"> 
    634                                 <?php 
     600                function displayQueryButtons() { 
     601                 
     602                        global $phpbms; 
     603                         
     604                        ?><div id="resultInfoDiv"><?php 
     605                         
     606                        if(!isset($this->tableoptions["new"])){ 
     607                                 $this->tableoptions["new"]["allowed"]=0; 
     608                                 $this->tableoptions["new"]["roleid"]=0; 
     609                                 $this->tableoptions["new"]["needselect"]=0; 
     610                        }  
     611                        if(!isset($this->tableoptions["select"])) { 
     612                                $this->tableoptions["select"]["allowed"]=0; 
     613                                $this->tableoptions["select"]["roleid"]=0; 
     614                                $this->tableoptions["select"]["needselect"]=0; 
     615                        } 
     616                        if(!isset($this->tableoptions["edit"])){ 
     617                                 $this->tableoptions["edit"]["allowed"]=0; 
     618                                 $this->tableoptions["edit"]["roleid"]=0; 
     619                                 $this->tableoptions["edit"]["needselect"]=0; 
     620                        } 
     621                        if(!isset($this->tableoptions["printex"])) { 
     622                                $this->tableoptions["printex"]["allowed"]=0; 
     623                                $this->tableoptions["printex"]["roleid"]=0; 
     624                                $this->tableoptions["printex"]["needselect"]=0; 
     625                        } 
     626                        if(!isset($this->tableoptions["import"])) { 
     627                                $this->tableoptions["import"]["allowed"]=0; 
     628                                $this->tableoptions["import"]["roleid"]=0; 
     629                                $this->tableoptions["import"]["needselect"]=0; 
     630                        } 
     631                        if(!isset($this->tableoptions["othercommands"])) $this->tableoptions["othercommands"]=false; 
     632                 
     633                        // If they have rights to see the SQL statement, spit it out here. 
     634                        if(hasRights($this->thetabledef["viewsqlroleid"])) { 
     635                         
     636                        ?><div id="sqlstatement"> 
     637                                <fieldset> 
     638                                        <legend>SQL Statement</legend> 
     639                                        <div id="theSqlText" class="mono small"><?php echo stripslashes(htmlQuotes($this->querystatement))?></div> 
     640                                </fieldset><?php  
     641                 
     642                                if($this->sqlerror) {?> 
     643                                <fieldset> 
     644                                        <legend><span style="text-transform:capitalize">SQL</span> Error</legend> 
     645                                        <div><?php echo $this->sqlerror?></div> 
     646                                </fieldset><?php  
     647                 
     648                                }?> 
     649                        </div> 
     650                         
     651                        <?php } 
     652                 
     653                        ?><div id="commandSet"><?php 
     654                         
     655                        if($this->numrows){ 
     656                                ?> 
     657                                <div id="numCount" align="right" class="small"><input type="hidden" id="deleteCommand" name="deleteCommand" value="" /><?php 
    635658                                 
    636                                         $displayedoffset=0; 
    637                                         while($displayedoffset<$this->truecount){ 
    638                                                 ?><option value="<?php echo $displayedoffset?>" <?php if($displayedoffset==$this->recordoffset) echo "selected=\"selected\"";?>><?php echo ($displayedoffset+1)?>-<?php if($displayedoffset+RECORD_LIMIT<$this->truecount) echo ($displayedoffset+RECORD_LIMIT); else echo $this->truecount;?></option><?php 
    639                                                 $displayedoffset+=RECORD_LIMIT; 
     659                                if ($this->truecount<=RECORD_LIMIT)  
     660                                        echo "<div>records:&nbsp;".$this->numrows."</div>"; 
     661                                else { 
     662                                 
     663                                ?>                       
     664                                        <input name="offset" type="hidden" value="" /><select name="offsetselector" onchange="this.form.offset.value=this.value;this.form.submit();"> 
     665                                                <?php 
     666                                                 
     667                                                        $displayedoffset=0; 
     668                                                        while($displayedoffset<$this->truecount){ 
     669                                                                ?><option value="<?php echo $displayedoffset?>" <?php if($displayedoffset==$this->recordoffset) echo "selected=\"selected\"";?>><?php echo ($displayedoffset+1)?>-<?php if($displayedoffset+RECORD_LIMIT<$this->truecount) echo ($displayedoffset+RECORD_LIMIT); else echo $this->truecount;?></option><?php 
     670                                                                $displayedoffset+=RECORD_LIMIT; 
     671                                                        } 
     672                                                         
     673                                                ?> 
     674                                          </select> of <?php echo $this->truecount; 
     675                                        if($this->recordoffset>0){ 
     676                                                ?><button type="button" class="graphicButtons buttonRew" onclick="document.search.offset.value=<?php echo $this->recordoffset-RECORD_LIMIT ?>;document.search.submit();"><span>prev.</span></button><?php 
    640677                                        } 
     678                                        if(($this->numrows+$this->recordoffset)<$this->truecount){ 
     679                                                ?><button type="button" class="graphicButtons buttonFF" onclick="document.search.offset.value=<?php echo $this->recordoffset+RECORD_LIMIT ?>;document.search.submit();"><span>next</span></button><?php 
     680                                        } 
     681                                                                   
     682                                }//end if ?></div><?php  
     683                        }//end if?>      
     684                         
     685                                <ul id="recordCommands"> 
     686                                <?php  
     687                                        $showFirst = ' id="firstToolbarItem" '; 
    641688                                         
    642                                 ?> 
    643                           </select> of <?php echo $this->truecount; 
    644                         if($this->recordoffset>0){ 
    645                                 ?><button type="button" class="graphicButtons buttonRew" onclick="document.search.offset.value=<?php echo $this->recordoffset-RECORD_LIMIT ?>;document.search.submit();"><span>prev.</span></button><?php 
    646                         } 
    647                         if(($this->numrows+$this->recordoffset)<$this->truecount){ 
    648                                 ?><button type="button" class="graphicButtons buttonFF" onclick="document.search.offset.value=<?php echo $this->recordoffset+RECORD_LIMIT ?>;document.search.submit();"><span>next</span></button><?php 
    649                         } 
    650                                                    
    651                 } ?></div><?php  
    652         }?>      
    653          
    654                 <ul id="recordCommands"> 
    655                 <?php  
    656                         $showFirst = ' id="firstToolbarItem" '; 
    657                          
    658                         if ($this->tableoptions["new"]["allowed"] && hasRights($this->tableoptions["new"]["roleid"])) { 
    659                          
    660                         ?><li <?php echo $showFirst?>> 
    661                                 <a href="#" id="newRecord" class="newRecord" accesskey="n" title="new record (alt + n)" onclick="addRecord();return false;"><span>new</span></a> 
    662                           </li><?php  
    663                         $showFirst = NULL;                         
    664                 }  
    665                          
    666                 if($this->numrows) { 
    667                         if ($this->tableoptions["edit"]["allowed"] && hasRights($this->tableoptions["edit"]["roleid"])) { 
    668                                 ?><li <?php echo $showFirst?>> 
    669                                         <a href="#" id="editRecord" class="editRecordDisabled" accesskey="e" onclick="return editButton();" title="edit record (alt + e)"><span>edit</span></a> 
    670                                 </li> 
    671                                 <?php 
    672                                 $showFirst = NULL;                         
    673                         } 
    674 &nbs