' . _("Could not create hashed directory structure!") . "
\n" . _("Please contact your system administrator and report this error.") . "
\n"; exit; } } } /* And return that directory. */ return ($real_hash_dir); } /** * Helper function for getHashDir which does the actual hash calculation. * * @param string username the username to calculate the hash dir for * @return array a list of hash dirs for this username */ function computeHashDirs($username) { /* Compute the hash for this user and extract the hash directories. */ $hash = base_convert(crc32($username), 10, 16); $hash_dirs = array(); for ($h = 0; $h < 4; ++ $h) { $hash_dirs[] = substr($hash, $h, 1); } /* Return our array of hash directories. */ return ($hash_dirs); } function checkForJavascript() { global $data_dir, $username, $javascript_on; if ( sqGetGlobalVar('javascript_on', $javascript_on) ) return; if ( !sqGetGlobalVar('js_autodetect_results', $js_autodetect_results) ) $js_autodetect_results = SMPREF_JS_OFF; $javascript_setting = getPref($data_dir, $username, 'javascript_setting', SMPREF_JS_AUTODETECT); if ( $javascript_setting == SMPREF_JS_AUTODETECT ) $js_pref = $js_autodetect_results; else $js_pref = $javascript_setting; sqsession_register('javascript_on',$js_pref); return $js_pref; } ?>