~sahana-relief-team/sahana-agasti/trunk

« back to all changes in this revision

Viewing changes to inc/lib_misc.inc

  • Committer: Ravith Botejue
  • Date: 2009-11-15 06:37:21 UTC
  • Revision ID: ravithb@gmail.com-20091115063721-3hhuq07x71lw14m7
Fixing bug lp:480923

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
        $count=0;
115
115
        foreach ($db_arr as $x) {
116
116
                if($count==0){
117
 
                                $db_str.=$x;    
118
 
                        }else{
119
 
                                $db_str.=",".$x;        
120
 
                        }
121
 
                $count++;
 
117
                $db_str.=$x;    
 
118
        }else{
 
119
            $db_str.=",".$x;
 
120
        }
 
121
        $count++;
122
122
        }
123
123
        $db_str.=",";
124
124
 
125
125
            
126
126
?>
127
127
<script type="text/javascript">
128
 
var db_str="<?php echo $db_str;?>"; 
129
 
var sort=<?php if($sort==true) {echo "true";}else{ echo "false";}?>;
 
128
    var db_str="<?php echo html_entity_decode($db_str,ENT_QUOTES); ?>";
 
129
    var sort=<?php if($sort==true) {echo "true";}else{ echo "false";}?>;
130
130
 // sort function - ascending (case-insensitive)
131
131
        function sortFuncAsc(record1, record2) {
132
132
            var value1 = record1.optText.toLowerCase();
219
219
            var x=document.getElementsByName("<?php echo $name?>");
220
220
            removeSelectedOptions(x[0]);
221
221
            if(sort==true){
222
 
                        sortSelect(x[0], true) ;
223
 
                }
 
222
                sortSelect(x[0], true) ;
 
223
            }
224
224
        }
225
225
 
226
226
        function hasOptions(obj) {
278
278
        }
279
279
        
280
280
        function search_and_replace(str_obj,value){
281
 
                        value=value+",";
 
281
                value=value+",";
282
282
                        if (window.RegExp) {
283
283
                        var re = new RegExp(value);
284
284
                                str_obj=str_obj.replace(re,"");