예제 #1
0
function get_line_ini($text_to_scan, $a)
{
    $t = crlf() . $text_to_scan . crlf();
    $r = "";
    $p = strpos($t, crlf() . $a . "=");
    if ($p > -1) {
        $r = substr($t, $p + strlen($a) + 3);
        $p = strpos($r, crlf());
        $r = substr($r, 0, $p);
    }
    return $r;
}
예제 #2
0
		/**
		  * Draw a header for the HTML-Page
		  */
		 function htmlHeader() {
		 	global $cds;
		  
		  $this->_autoInitPlugins();
		 	echo $this->docType."\n";
		 	echo "<html>\n";
		 	echo "<head>\n";
		 	if ($this->pageTitle) {
		 		echo "<title>".$this->pageTitle."</title>\n";
		 	} else {
		 		echo "<title>".$this->staticTitle.$this->parent->menu->getTitle()."</title>\n";
		 	}
		 	
		 	// write meta-data
		 	echo '  <meta http-equiv="Content-Type" content="'.$this->contentType.'"/>'."\n";
			echo '  <meta name="generator" content="N/X WCMS 2004 - www.nxsystems.org"/>'."\n";
			echo '  <meta name="date" content = "'. gmdate("Y-m-d H:i:s") .'"/>'."\n";
			echo '  <meta name="keywords" content = "'.$this->keywords.','.$this->parent->meta->get("Keywords").'"/>'."\n";
			echo '  <meta name="description" content = "'.$this->description.' '.$this->parent->meta->get("Description").'"/>'."\n";
			echo '  <meta name="revisit-after" content="7 days"/>'."\n";
			echo '  <meta name="robots" content="follow,index"/>'."\n";		 			 	
		 	
			// add css
			for ($i=0; $i<count($this->cssArray); $i++) {
		 		echo '  <link href="'.$cds->docroot.$this->cssArray[$i]["path"].'" media="'.$this->cssArray[$i]["media"].'" rel="stylesheet" type="text/css"/>'."\n";
		 	}
		 	
		 	// add js
		 	for ($i=0; $i<count($this->jsArray); $i++) {
		 		echo '  <script language="javascript" type="text/javascript" src="'.$cds->docroot.$this->jsArray[$i].'"></script>'."\n";
		 	}
		 	
		 	// add preloader
		 	if (count($this->images) > 0) {
		 		echo '<script language="javascript" type="text/javascript">';
		 		crlf();
		 		echo '  if (document.images) {';
		 		crlf();
		 		for ($i=0; $i< count($this->images); $i++) {
		 		  echo '    $img'.$i.' = new Image(100,100);';
		 		  crlf();
		 		  echo '    $img'.$i.'.src="'.$this->images[$i].'";'; 	
		 			crlf();
		 		}		 		
		 		echo '  }';
		 		crlf();
		 		echo '</script>';		 				 		
		 	}
		 	
			echo $this->header;
			echo "</head>\n";
		 	echo "<body ".$this->bodyAttributes.">\n";
		 }
예제 #3
0
fwrite($sock, $req = "POST /component/BStorage/FileRevSetBlocks HTTP/1.1\r\n" . "Authorization: Basic MToxMTE=\r\n" . "Host: bitfile.me\r\n" . "Accept: */*\r\n" . "Content-Length: " . strlen($body) . "\r\n" . "Content-Type: application/json\r\n" . "Connection: close\r\n" . "\r\n" . $body);
echo $req . PHP_EOL . '------------------------------------------------' . PHP_EOL;
fpassthru($sock);
function crlf($s)
{
    $s = str_replace("\r", "", $s);
    $s = str_replace("\n", "\r\n", $s);
    return $s;
}
$body = crlf('------------------------------e5be2a69d4aa
Content-Disposition: form-data; name="file"; filename="test.txt"
Content-Type: text/plain

1
------------------------------e5be2a69d4aa--
');
$req = crlf('POST /component/BStorage/UploadFile/json HTTP/1.1
User-Agent: libcurl-agent/1.0
Host: bitfile.me
Accept: */*
Connection: close
Referer: http://bitfile.me/
Expect: 100-continue
Content-Length: ' . strlen($body) . '
Content-type: multipart/form-data; boundary=----------------------------e5be2a69d4aa

') . $body;
echo json_encode($req);
$fp = fsockopen('bitfile.me', 80);
fwrite($fp, $req);
fpassthru($fp);
예제 #4
0
    if (!isset($_GET['format'])) {
        $format = 'ical';
        $version = 2;
        $target = 'ical';
        $begin = 1188597600;
        $ende = 1202166000;
    }
}
$jahr = date("Y", $begin);
$mon = date("m", $begin);
$name = 'FH-Kalender_' . $mon . '_' . $jahr;
if (isset($target)) {
    $name .= '_' . $target;
}
// doing some DOS-CRLF magic...
$crlf = crlf();
// Check Type
// Print in csv-file
if ($format == 'csv') {
    $name .= '.csv';
    header("Content-disposition: filename={$name}");
    header("Content-type: application/ms-excel");
    header("Pragma: public");
    header("Expires: 0");
    if ($target == 'outlook') {
        echo '"Betreff","Beginnt am","Beginnt um","Endet am","Endet um","Ganztaegiges Ereignis","Erinnerung Ein/Aus","Erinnerung am","Erinnerung um","Besprechungsplanung","Erforderliche Teilnehmer","Optionale Teilnehmer","Besprechungsressourcen","Abrechnungsinformationen","Beschreibung","Kategorien","Ort","Priorit?t","Privat","Reisekilometer","Vertraulichkeit","Zeitspanne zeigen als"';
    } else {
        echo '"title","category","location","description","keywords","start_date","start_time","end_date","end_time","alarm","recur_type","recur_end_date","recur_interval","recur_data"';
    }
} elseif ($format == 'ical') {
    $name .= '.ics';