$yearepsilon) || // year outside given range ($month<1) || ($month>12) || ($day<1) || (($month==2) && ($day>28+(!($year%4))-(!($year%100))+(!($year%400)))) || ($day>30+(($month>7)^($month&1)))) return false; // date out of range return array( 'year' => $year, 'month' => $month, 'day' => $day ); } function array_sort($array, $key) { for ($i = 0; $i < sizeof($array); $i++) { $sort_values[$i] = $array[$i][$key]; } arsort ($sort_values); reset ($sort_values); while (list ($arr_key, $arr_val) = each ($sort_values)) { $sorted_arr[] = $array[$arr_key]; } return $sorted_arr; } function image_info($file = null, $out = null) { // If $file is not supplied or is not a file, warn the user and return false. if (is_null($file) || !is_file($file)) { echo '

Warning: image_info() => first argument must be a file.

'; return false; } // Defines the keys we want instead of 0, 1, 2, 3, 'bits', 'channels', and 'mime'. $redefine_keys = array( 'width', 'height', 'type', 'attr', 'bits', 'channels', 'mime', ); // If $out is supplied, but is not a valid key, nullify it. if (!is_null($out) && !in_array($out, $redefine_keys)) $out = null; // Assign usefull values for the third index. $types = array( 1 => 'GIF', 2 => 'JPG', 3 => 'PNG', 4 => 'SWF', 5 => 'PSD', 6 => 'BMP', 7 => 'TIFF(intel byte order)', 8 => 'TIFF(motorola byte order)', 9 => 'JPC', 10 => 'JP2', 11 => 'JPX', 12 => 'JB2', 13 => 'SWC', 14 => 'IFF', 15 => 'WBMP', 16 => 'XBM' ); $temp = array(); $data = array(); // Get the image info using getimagesize(). // If $temp fails to populate, warn the user and return false. if (!$temp = getimagesize($file)) { echo '

Warning: image_info() => first argument must be an image.

'; return false; }} function getCollections( $pfad , &$files){ $files[] = Array( "COLLECTION", $pfad ); $exist = XML_DB_eXist::getInstance('soap'); $exist->setWSDL('http://localhost:8080/exist/services/Query?wsdl'); $exist->connect('admin', ''); $collections = $exist->getCollections( $pfad ); if(is_array($collections->resources->elements)) for($k=0;$kresources->elements);$k++) $files[]= Array( "FILE", $pfad."/".$collections->resources->elements[$k]); else if($collections->resources->elements != null && strlen($collections->resources->elements) > 0) $files[]= Array( "FILE", $pfad."/".$collections->resources->elements ); if(is_array($collections->collections->elements)) for($k=0;$kcollections->elements);$k++) getCollections( $pfad."/".$collections->collections->elements[$k], $files); else if($collections->collections->elements != null && strlen($collections->collections->elements )> 0 ) getCollections( $pfad."/".$collections->collections->elements, $files); } function comphp( $function, $array= null ){ if($array)foreach( $array as $name => $value ) eval ("\$$name = \$value;"); $code = loadfile( $function); $pos = strripos($code, "?>"); $code = substr( $code, 0, $pos-1) ; $pos = stripos($code, ""; return eval( $code ); } function b(){ $code = loadfile( $function); $code = str_replace( "", "", $code ); return eval( $code ); } function KeyName($myArray,$pos) { // $pos--; /* uncomment the above line if you */ /* prefer position to start from 1 */ if ( ($pos < 0) || ( $pos >= count($myArray) ) ) return "NULL"; // set this any way you like reset($myArray); for($i = 0;$i < $pos; $i++) next($myArray); return key($myArray); } function get_iso_8601_date($int_date) { //$int_date: current date in UNIX timestamp $date_mod = date('Y-m-d\TH:i:s', $int_date); $pre_timezone = date('O', $int_date); $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2); $date_mod .= $time_zone; return $date_mod; } function get_subdirectories($dir) { $dirs = Array(); if (is_dir($dir)){ $dir_contents = scandir($dir); foreach ($dir_contents as $item) { if (is_dir($dir."/".$item) && $item != '.' && $item != '..') { $dirs[]= $dir."/".$item ; } } } return $dirs; } function remove_directory($dir) { if (is_dir($dir)){ $dir_contents = scandir($dir); foreach ($dir_contents as $item) { if (is_dir($dir."/".$item) && $item != '.' && $item != '..') { remove_directory($dir."/".$item.'/'); }elseif (file_exists($dir."/".$item) && $item != '.' && $item != '..') { unlink($dir."/".$item); } } rmdir($dir); } } function dir_exists($dir_name = false, $path = './') { if(!$dir_name) return false; if(is_dir($path.$dir_name)) return true; $tree = glob($path.'*', GLOB_ONLYDIR); if($tree && count($tree)>0) { foreach($tree as $dir) if(dir_exists($dir_name, $dir.'/')) return true; } return false; } function makeDirs($strPath, $mode = 0777) //creates directory tree recursively { return is_dir($strPath) or ( makeDirs(dirname($strPath), $mode) and mkdir($strPath, $mode) ); } function iso_8601totime($tstamp) { // converts ISODATE to unix date // 1984-09-01T14:21:31Z sscanf($tstamp,"%u-%u-%uT%u:%u:%uZ",$year,$month,$day, $hour,$min,$sec); $newtstamp=mktime($hour,$min,$sec,$month,$day,$year); return $newtstamp; } function date8601_dif( $date8601 ){ //calculate the difference between two dates in days. $regDate=iso_8601totime( $date8601 );; //will come from DB $curDate=mktime(); //current UNIX timestamp. $diff= $curDate - $regDate; //date diff in seconds //$diff = $diff / 86400; //date diff in days return $diff; //will be used to check member subscription } function cutString3( $str, $len ){ $str = trim( strip_tags( $str )); if( strlen($str) > $len ){ $cutter = substr( $str, 0, ($len-4) ); $pos = strrpos ( $cutter, " " ); if($pos) $cutter = substr( $str, 0, $pos ); return $cutter." ..."; } else return $str; } function get_links( $pos, $length, $max, $link, $indexlength){ $pos = intval(( $pos / $length ))+1; $buffer =""; $posa = 1; $liste = ""; //$indexlength = $indexlength -1; for($i=1;$i< ($max/$length)+1 ;$i++ ){ $mark =""; if($i == $pos) $mark = "class=\"marked\""; if( (($max/$length)+1) > $indexlength ){ if(!( $i<($pos-$indexlength) || $i > ($pos+$indexlength) )) $liste .="
  • ".($posa+$i-1)."
  • "; } else $liste .="
  • ".($posa+$i-1)."
  • "; } $buffer .= ""; return $buffer; } if (PHP_VERSION < 5) { if(!function_exists('str_split')){ function str_split($string,$split_length=1){ $count = strlen($string); if($split_length < 1){ return false; } elseif($split_length > $count){ return array($string); } else { $num = (int)ceil($count/$split_length); $ret = array(); for($i=0;$i<$num;$i++){ $ret[] = substr($string,$i*$split_length,$split_length); } return $ret; } } } function strripos($string, $needle){ $len=strlen($string); for ($i=$len-1; $i>-1;$i--){ if (substr($string, $i, 1)==$needle) return ($i); } return FALSE; } if(!function_exists('stripos')) { function stripos($haystack,$needle,$offset = 0) { return(strpos(strtolower($haystack),strtolower($needle),$offset)); } } } if (PHP_VERSION >= 5) { // Emulate the old xslt library functions function xslt_create() { return new XsltProcessor(); } function xslt_process($xsltproc, $xml_arg, $xsl_arg, $xslcontainer = null, $args = null, $params = null) { // Start with preparing the arguments $xml_arg = str_replace('arg:', '', $xml_arg); $xsl_arg = str_replace('arg:', '', $xsl_arg); // Create instances of the DomDocument class $xml = new DomDocument; $xsl = new DomDocument; // Load the xml document and the xsl template $xml->loadXML($args[$xml_arg]); $xsl->loadXML($args[$xsl_arg]); // Load the xsl template $xsltproc->importStyleSheet($xsl); // Set parameters when defined if ($params) { foreach ($params as $param => $value) { $xsltproc->setParameter("", $param, $value); } } // Start the transformation $processed = $xsltproc->transformToXML($xml); // Put the result in a file when specified if ($xslcontainer) { return @file_put_contents($xslcontainer, $processed); } else { return $processed; } } function xslt_free($xsltproc) { unset($xsltproc); } } function _strtr( $data, $arr ){ foreach($arr as $key=>$value)$data= str_replace($key,$value,$data); return $data; } function echoBrowser($string, $bufferSize = 8192) { // suggest doing a test for Integer & positive bufferSize // for ($chars=strlen($string)-1,$start=0;$start <= $chars;$start += $bufferSize) { // echo substr($string,$start,$buffer_size); // } $splitString = str_split($string, $bufferSize); foreach($splitString as $chunk) echo $chunk; } function loadfile( $url ){ $buffer = false; if( file_exists( $url ) ){ $file = file( $url ); $buffer = implode( "", $file); } return $buffer; } class xslt{ function xslt(){ } function transform($xml, $xslt){ $r = $this->_transform($xml, $xslt); return $r; } function _transform($xml, $xslt){ return false; } } class xslt_php extends xslt{ function xslt_php(){ //xslt_set_base('file://C:\rla\Programme\xampp_1413\xampp\htdocs\eXist\db\xslt_html'); } function _transform($xml, $xslt){ $buffer = ""; $arguments = array( '/_xml' => $xml, '/_xsl' => $xslt ); $xsltproc = xslt_create(); $buffer = xslt_process( $xsltproc, 'arg:/_xml', 'arg:/_xsl', null, $arguments ); xslt_free($xsltproc); return $buffer; } } /*****************************************************************************************/ function globGetAuth($name, $pass){ global $WEBBOXX; global $GLOB_GROUPS; $return = Array(); if($WEBBOXX[ "usermanagement" ] == "ldap") { $ldap = new userdb(null, $WEBBOXX[ "ldap_ip" ],$WEBBOXX[ "ldap_dn" ] , $WEBBOXX[ "ldap_port" ] ); $uid = $ldap->isUser($name, $pass); if($uid){ $return['GROUP'] = $uid; $return['CACHE'] = null; } }else if($WEBBOXX[ "usermanagement" ] == "relay") { include('PEAR/HTTP/Request.php'); $req = &new HTTP_Request($WEBBOXX[ "ldap_relay" ]); $req->setMethod(HTTP_REQUEST_METHOD_GET); $req->setURL($WEBBOXX[ "ldap_relay" ]); $req->addRawQueryString('account='.$WEBBOXX[ "ldap_account" ].'&l='.$_POST["user"] .'&p='.$_POST["pass"]); $req->sendRequest(); $buf = $req->getResponseBody(); $tmp = unserialize(base64_decode($buf )); $uid = key($tmp); if(strlen($uid)>0){ $return['GROUP'] = $uid; $return['CACHE'] = base64_decode($buf); } } else { foreach( $GLOB_GROUPS as $name => $value ){ if( $value['login']==$_POST["user"] && $value['pass']==$_POST["pass"] ){ $return['GROUP'] = $name; $return['CACHE'] = serialize($GLOB_GROUPS); } } } return $return; } function globGetGroups( $auth = Array() ){ global $WEBBOXX; $auth['GROUPS'] = Array(); if($WEBBOXX[ "usermanagement" ] == "ldap") { $ldap = new userdb(null, $WEBBOXX[ "ldap_ip" ],$WEBBOXX[ "ldap_dn" ] , $WEBBOXX[ "ldap_port" ] ); $tmp = array_merge( $ldap->groupsByMemberUid($WEBBOXX[ "ldap_account" ],$auth['GROUP']), $ldap->groupsByMemberUid('global',$auth['GROUP'])); $auth['GROUPS'][$auth['GROUP']] = Array( 'title' => $ldap->attributeByUid( "initials", $auth['GROUP'] ).' '.$ldap->attributeByUid( "givenname",$auth['GROUP'] ).' '.$ldap->attributeByUid( "sn", $auth['GROUP']), 'super' => Array(), 'directories' => Array(), 'files' => Array() ); $buf = ''; $right = Array();; for($i=0;$i=0;$k--){ $x = explode ( "=",$p[$k] ); if($x[0] == 'ou'){ $buf .= '/'.$x[1].''; } if($x[0] == 'cn'){ $right[$x[1]] = true; } } $x = explode ( "=",$p[sizeof($p)-1]); if(strlen($buf)>0 ) $auth['GROUPS'][$auth['GROUP']][$x[1]][$buf] = $right; else { if(strlen($x[1])>0) $auth['GROUPS'][$auth['GROUP']][$x[1]] = $right; } } } else if($WEBBOXX[ "usermanagement" ] == "relay") { $auth['GROUPS'] = unserialize($auth["cache"] ); } else $auth['GROUPS'] = unserialize($auth["cache"] ); return $auth; } function globChkRight( $auth = Array(), $uri = '', $right='' ){ $return = false; $tdirectory = "";$directory_true = ''; $expl = explode("?",$uri);$expl = explode("/",$expl[0]); for($k=3; $k $value ) if($name ==$right) $return = true; if(!$return){ if(is_array($auth['GROUPS'][$auth['GROUP'] ]['directories'])) if(is_array($auth['GROUPS'][$auth['GROUP'] ]['directories'][$tdirectory])) foreach($auth['GROUPS'][$auth['GROUP'] ]['directories'][$tdirectory] as $name => $value ) if($name ==$right) $return = true; } if(!$return){ if(is_array($auth['GROUPS'][$auth['GROUP'] ]['files'])) if(is_array($auth['GROUPS'][$auth['GROUP'] ]['files'][$directory_true])) foreach( $auth['GROUPS'][$auth['GROUP'] ]['files'][$directory_true] as $name => $value ) if($name ==$right) $return = true; } return $return; } ?>
    Notice: Undefined index: jid in /var/www/clients/client3/web25/web/kula-invent/content on line 21

    Notice: Undefined index: jid in /var/www/clients/client3/web25/web/kula-invent/content on line 21
    Required PHP 5.6.30-0+deb8u1 extension missing: Can neither locate
    • the XSL extension
    • nor the XSLT extension
    Please enable the XSLT extension(php4-xslt)

    Fatal error: Call to undefined function comphp() in /var/www/clients/client3/web25/web/kula-invent/content on line 49