View Single Post
  #5  
Old 30th April 2012, 15:27
thinkpad thinkpad is offline
Junior Member
 
Join Date: Apr 2012
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Falko,

These are lines 70 to 140. Thanks.

PHP Code:
root@mail:/home/admispconfig/ispconfig/web/webmail/inc# sed -n '70,140p' lib.php
function array_qsort2 (&$array$column=0$order="ASC"$first=0$last= -2) {
        if(
$last == -2$last count($array) - 1;
        if(
$last $first) {
                
$alpha $first;
                
$omega $last;
                
$guess $array[$alpha][$column];
                while(
$omega >= $alpha) {
                        if(
$order == "ASC") {
                                while(
strtolower($array[$alpha][$column]) < strtolower($guess)) $alpha++;
                                while(
strtolower($array[$omega][$column]) > strtolower($guess)) $omega--;
                        } else {
                                while(
strtolower($array[$alpha][$column]) > strtolower($guess)) $alpha++;
                                while(
strtolower($array[$omega][$column]) < strtolower($guess)) $omega--;
                        }
                        if(
strtolower($alpha) > strtolower($omega)) break;
                        
$temporary $array[$alpha];
                        
$array[$alpha++] = $array[$omega];
                        
$array[$omega--] = $temporary;
                }
                
array_qsort2 ($array$column$order$first$omega);
                
array_qsort2 ($array$column$order$alpha$last);
        }
}


class 
Session {

        var 
$temp_folder;
        var 
$sid;

        function 
Load() {
                
$sessionfile $this->temp_folder."_sessions/".$this->sid.".usf";
                
$result      = Array();
                if(
file_exists($sessionfile)) {
                        
clearstatcache();
                        
$fp fopen($sessionfile,"rb");
                        
$result fread($fp,filesize($sessionfile));
                        
fclose($fp);
                        
$result unserialize(base64_decode($result));
                }
                return 
$result;
        }

        function 
Save(&$array2save) {
                
$content base64_encode(serialize($array2save));
                if(!
is_writable($this->temp_folder)) die("<h3>The folder \"".$this->temp_folder."\" is not writtable or does not exist!!!</h3>");
                
$sessiondir $this->temp_folder."_sessions/";
                if(!
file_exists($sessiondir)) mkdir($sessiondir,0777);
                
$f fopen("$sessiondir".$this->sid.".usf","wb") or die("<h3>Could not open session file</h3>");
                
fwrite($f,$content);
                
fclose($f);
                return 
1;
        }
        function 
Kill() {
                
$sessionfile $this->temp_folder."_sessions/".$this->sid.".usf";
                return @
unlink($sessionfile);
        }
}


// load settings
function load_prefs() {

        global  
$userfolder,
                        
$sess,
                        
$default_preferences;

        
extract($default_preferences);

        
$pref_file $userfolder."_infos/prefs.upf"
Reply With Quote