Exemple #1
0
 }
 $page['current'] = $line + 1 > $configs['page_file_edit_line'] ? ceil(($line + 1) / $configs['page_file_edit_line']) : 1;
 if ($page['current'] > 1) {
     $page['paramater_0'] = '?page=' . $page['current'];
     $page['paramater_1'] = '&page=' . $page['current'];
 }
 if ($isGO) {
     goURL('edit_line.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '&line=' . $line . $page['paramater_1']);
 }
 $url = array('action' => null, 'prev' => null, 'next' => null);
 $url['action'] = 'edit_line.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '&line=' . $line . $page['paramater_1'] . '#line_label';
 $url['prev'] = $line > 0 ? '<a href="edit_line.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '&line=' . ($line - 1) . ($configs['page_file_edit_line'] > 0 && $line <= $configs['page_file_edit_line'] ? null : '&page=' . ceil($line / $configs['page_file_edit_line'])) . '#line_label"><img src="icon/arrow_left.png"/></a>' : '<img src="icon/arrow_left.png"/>';
 $url['next'] = $line < $count - 1 ? '<a href="edit_line.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '&line=' . ($line + 1) . ($configs['page_file_edit_line'] > 0 && $line <= $configs['page_file_edit_line'] ? null : '&page=' . ceil(($line + 2) / $configs['page_file_edit_line'])) . '#line_label"><img src="icon/arrow_right.png"/></a>' : '<img src="icon/arrow_right.png"/>';
 echo $notice;
 echo '<div class="list">
     <span class="bull">&bull;</span><span>' . printPath($dir, true) . '</span><hr/>
     <div class="ellipsis break-word">
         <span class="bull">&bull;</span>Tập tin: <strong class="file_name_edit">' . $name . '</strong>
     </div><hr/>
     <form action="edit_line.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '&line=' . $line . $page['paramater_1'] . '#line_label" method="post">
         <span class="bull" id="line_label">&bull;</span>Dòng [<strong class="line_number_form">' . $line . '</strong>/<strong class="line_number_form">' . ($count - 1) . '</strong>]:<br/>
         <div class="parent_box_edit">
             <textarea class="box_edit_normal" name="content" rows="10">' . htmlspecialchars($lines[$line]) . '</textarea>
         </div>
         <div style="margin-left: -4px">
             <input type="submit" name="continue" value="Tiếp tục"/>
             <input type="submit" name="save" value="Lưu"/>
             <a href="delete_line.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '&line=' . $line . $page['paramater_1'] . '" id="href_line_edit">Xóa</a>
         </div>
     </form><hr/>
     <form action="' . $url['action'] . '" method="post">
 if ($path) {
     if ($path == "walk" || $path == "same") {
         $cpath = $path;
     } else {
         $cpath = $path->path;
     }
     if ($cpath == "walk") {
         echo "You don't need to take the subway. Why don't you walk instead?<br/>";
     } else {
         if ($cpath == "same") {
             echo "You're just testing the system, aren't you? Go do something more interesting, like telling your firends about this great site.<br/>";
         } else {
             if (count($path->path) > 1) {
                 $cpath = consolidatePath($path, $_GET['type']);
             }
             printPath($cpath);
         }
     }
     echo "<br/>\n";
     echo "<form id=\"form_pick\" action=\"{$current_url}\" method=\"get\">\n";
     // list alternate stations
     echo "<table border=\"1\">\n<tbody>\n<tr>\n<td colspan=\"4\"><b>Start Station Choices</b></td>\n</tr>\n<tr>\n<td>&nbsp;<b>Show</b>&nbsp;</td>\n<td><b>Station Name</b></td>\n<td><b>Subway Lines</b></td>\n</tr>\n";
     $num = 1;
     // grab the stations
     $start_stations = findNearestStations2($starts[0]);
     $start_station_marker = $path_array[0]->m2;
     foreach ($start_stations as $station) {
         $station_marker = $station->marker;
         echo "<tr>\n";
         printStation($station_marker);
         echo "<td>\n";
function preview($currImage)
{
    global $baseURL, $scriptPath, $dir, $gallery_images_in_preview, $galleryWidth, $enable_caption_editing, $loadingGif, $enableHTMLlinks, $enableBBCodelinks;
    # Scan the folder for pictures & thumbnails
    $folder_scan_results = folder_scan();
    # Find Images with Thumbnails.
    $images_with_thumbs = images_with_thumbnails($folder_scan_results['images']);
    $noThumbs = count($folder_scan_results['images']) - count($images_with_thumbs);
    # Find where the current image is in the list of images.
    $imageIndex = array_search($currImage, $images_with_thumbs);
    if (empty($imageIndex)) {
        $imageIndex = 0;
    }
    # If somehow the user tries to preview an image  that doesn't exist, just go back to gallery view.
    if ($imageIndex === NULL) {
        header("Location:" . rrawurlencode($baseURL . $dir));
    }
    # Load the Captions
    $captions = get_captions();
    foreach ($images_with_thumbs as $idx => $image) {
        $captions[$idx] = str_replace(array("\r", "\n"), array("", "<br>"), htmlentities($captions[$image]));
    }
    /*
    In folder with 300 images in it, each of these functions was run 100 times. (30,000 times times per function). This is how long those took:
    getimagesize: 8.4805779743195
    captions: 0.11382412910461
    imgName: 0.13228607177734
    getFileSize: 1.2750179767609
    getFileDate: 13.157135009766
    fullLink : 0.33402609825134
    preview: 0.41940498352051
    gallery: 0.45263981819153
    So everything gets cached to disk if it can be.
    */
    # Attempt to load the cache file.
    if ($cache = @unserialize(file_get_contents($scriptPath . "cache/" . $dir . "cache"))) {
        #Extract all the variables
        //$num_cached_images = $cache["images_with_thumbs"];
        $fileSize = $cache["fileSize"];
        $exifDate = $cache["exifDate"];
        $imgName = $cache["imgName"];
        $fullLinkURL = $cache["fullLinkURL"];
        $preview = $cache["preview"];
        $gallery = $cache["gallery"];
        $bbCode = $cache["bbcode"];
        $html = $cache["html"];
    }
    # Determine the uncached images.
    $uncached_images = count($images_with_thumbs) - $num_cached_images;
    # Rebuild cache if there were any changes.
    if ($uncached_images) {
        //if (1) {
        # Clean out any old data and create arrays
        $bbCode = $html = $fileSize = $exifDate = $imgName = $fullLinkURL = $preview = $gallery = array();
        foreach ($images_with_thumbs as $idx => $image) {
            $hardlinks = hardlinks($image);
            $bbCode[$idx] = $hardlinks["bbCode"];
            $html[$idx] = $hardlinks["html"];
            $fileSize[$idx] = getFileSize($scriptPath . $dir . $image);
            $exifDate[$idx] = getFileDate($scriptPath . $dir . $image);
            $imgName[$idx] = addslashes(pathinfo($image, PATHINFO_FILENAME));
            $fullLinkURL[$idx] = rrawurlencode($baseURL . $dir . $image);
            $preview[$idx] = rrawurlencode($baseURL . "cache/" . $dir . "preview/" . $image);
            $gallery[$idx] = rrawurlencode($baseURL . "cache/" . $dir . "gallery/" . $image);
        }
        # If there was a cache change.
        $cache["images_with_thumbs"] = count($images_with_thumbs);
        $cache["fileSize"] = $fileSize;
        $cache["exifDate"] = $exifDate;
        $cache["imgName"] = $imgName;
        $cache["fullLinkURL"] = $fullLinkURL;
        $cache["preview"] = $preview;
        $cache["gallery"] = $gallery;
        $cache["bbcode"] = $bbCode;
        $cache["html"] = $html;
        file_put_contents($scriptPath . "cache/" . $dir . "cache", serialize($cache));
    }
    # Count the number of images, used for wrap around math.
    $imageCount = count($images_with_thumbs);
    for ($i = -$gallery_images_in_preview; $i <= $gallery_images_in_preview; $i++) {
        # Build the array +- image_previews.
        $slide_previews[$i] = $gallery[($imageIndex + $i + $imageCount) % $imageCount];
    }
    $title = $imgName[$imageIndex];
    if (function_exists("printheader")) {
        printheader($title);
    } else {
        html_header($title);
    }
    if ($enable_caption_editing) {
        echo "<a href=\"" . rrawurlencode($baseURL . "captions/" . $dir) . "\">Edit Captions</a>\n";
    }
    # Print the directory path.
    printPath();
    ?>
<!-- Begin Previews -->
<div id="preview">
<span id="navDirections"></span>
<div id="leftpreview">
<?php 
    for ($i = -$gallery_images_in_preview; $i <= -1; $i++) {
        echo "\t<img src=\"" . $slide_previews[$i] . "\" id=\"gallery{$i}\" width=\"{$galleryWidth}\" alt=\"gallery{$i}\" onclick=\"changePicture({$i});return false;\">\n";
    }
    ?>
</div>
<div id="rightpreview">
<?php 
    for ($i = 1; $i <= $gallery_images_in_preview; $i++) {
        echo "\t<img src=\"" . $slide_previews[$i] . "\" id=\"gallery{$i}\" width=\"{$galleryWidth}\" alt=\"gallery{$i}\" onclick=\"changePicture({$i});return false;\">\n";
    }
    ?>
</div>
<div id="centerpreview">
	<center>
		<a href="<?php 
    echo $preview[($imageIndex + 1 + $imageCount) % $imageCount];
    ?>
"  id="nextLink" onclick="changePicture(1);return false;">
			<img src="<?php 
    echo $preview[$imageIndex];
    ?>
" alt="Current Preview" id="mainPreview">
		</a>
		<br>
		<a href="<?php 
    echo $fullLinkURL[$imageIndex];
    ?>
" target="_new" id="fullLink">Link to Full Picture (<?php 
    echo $fileSize[$imageIndex];
    ?>
)</a><br>
		<div id="caption" style="display:<?php 
    echo empty($captions[$imageIndex]) ? "none" : "block";
    ?>
"><?php 
    echo str_replace("\n", "<br>", htmlentities($captions[$imageIndex]));
    ?>
</div>
		<div id="timeStamp" style="display:<?php 
    echo empty($exifDate[$imageIndex]) ? "none" : "block";
    ?>
"><?php 
    echo $exifDate[$imageIndex];
    ?>
	</div>
		<?php 
    if ($enableBBCodelinks) {
        echo "<div><input type=\"text\" size=\"100\" value=\"" . $bbCode[$imageIndex] . "\" id=\"bbCodeLink\"></div>\n";
    }
    if ($enableHTMLlinks) {
        echo "<div><input type=\"text\" size=\"100\" value=\"" . $html[$imageIndex] . "\" id=\"htmlLink\"></div>\n";
    }
    ?>
	</center>
	<img src="<?php 
    echo $slide_previews[0];
    ?>
" id="gallery0" class="cache" alt='cache'>
	<?php 
    echo display_generating_thumbnails($noThumbs);
    ?>
	<?php 
    /* The current index of the image */
    ?>
	<div style="display:none" id="imageIndex"><?php 
    echo $imageIndex;
    ?>
</div>
	<div style="clear:both;"></div>
</div>
</div>
<div id="end_javascript">
<script type="text/javascript">
<!--
var previewSrc = Array();
var gallerySrc = Array();
var fullLinkURL = Array();
var imgSize = Array();
var timeStamp = Array();
var imgName = Array();
var caption = Array();
var bbCode= Array();
var html=Array();
<?php 
    for ($i = 0; $i < $imageCount; $i++) {
        echo "previewSrc[{$i}]=\"" . $preview[$i] . "\";\n";
        echo "gallerySrc[{$i}]=\"" . $gallery[$i] . "\";\n";
        echo "fullLinkURL[{$i}]=\"" . $fullLinkURL[$i] . "\";\n";
        echo "imgName[{$i}]=\"" . $imgName[$i] . "\";\n";
        echo "imgSize[{$i}]=\"Link To Full Picture (" . $fileSize[$i] . ")\";\n";
        echo "timeStamp[{$i}]=\"" . $exifDate[$i] . "\"\n";
        echo "bbCode[{$i}]=\"" . $bbCode[$i] . "\"\n";
        echo "html[{$i}]=\"" . str_replace("/", "\\/", $html[$i]) . "\"\n";
        echo "caption[{$i}]=\"" . $captions[$i] . "\";\n\n";
    }
    ?>
function $(e) {return document.getElementById(e);}
function keyBoardNav(e) {
	var KeyID = (window.event) ? event.keyCode : e.keyCode;
	switch(KeyID) {
		// Left Arrow
		case 37:
			changePicture(-1);
			break;
		// Space Bar
		case 32:
		// Right Arrow
		case 39:
			changePicture(1);
			break;
		default:
			return true;
	}	
}
function changePicture(imgChg) {
	var imgIdx=parseInt($('imageIndex').innerHTML)+imgChg;
	// Calculate the wrap around math. If the user scrolls past first or last image
	if (imgIdx<0) {
		imgIdx=previewSrc.length-1;
	} else if (imgIdx>=previewSrc.length) {
		imgIdx=0;
	}
	$('mainPreview').src=previewSrc[imgIdx];
	$('mainPreview').title=caption[imgIdx];
	try {
	<?php 
    if ($enableBBCodelinks) {
        echo "\$('bbCodeLink').value=bbCode[imgIdx];\n";
    }
    if ($enableHTMLlinks) {
        echo "\$('htmlLink').value=html[imgIdx];\n";
    }
    ?>
	} catch (e) {
		alert(e);
	}
	var l=previewSrc.length;
	for (i=-<?php 
    echo $gallery_images_in_preview;
    ?>
;i<=<?php 
    echo $gallery_images_in_preview;
    ?>
;i++) {
		try {
			$('gallery'+i).src=gallerySrc[(l+imgIdx+i)%l];
		} catch(err) {
		}
	}
	// Change the document title and hash.
	document.title=(imgName[imgIdx]);
	document.location.hash=(imgName[imgIdx]);
	// Set the new current image index.
	$('imageIndex').innerHTML=imgIdx;
	// Change the full image url
	$('fullLink').href=fullLinkURL[imgIdx];
	// Change the inner html
	$('fullLink').innerHTML=imgSize[imgIdx];
	if (timeStamp[imgIdx]=="") {
		$('timeStamp').style.display="none";
	} else {
		$('timeStamp').style.display="block";
		$('timeStamp').innerHTML=timeStamp[imgIdx];
	}
	if (caption[imgIdx]=="") {
		$('caption').style.display="none";
	} else {
		$('caption').style.display="block";
		$('caption').innerHTML=caption[imgIdx];
	}
	$('navDirections').innerHTML="";
}
<?php 
    /*
    If the url has a hash, attempt to locate the picture in the picture array. If it does, swap the image to that one. 
    This helps if people scroll left or right from a picture then send a link of the image to someone.
    */
    ?>
if (window.location.hash.substring(1)!="") {
	var newImg=window.location.hash.substring(1);
	for (i in imgName) {
		if (imgName[i]==newImg) {
			changePicture(i-parseInt($('imageIndex').innerHTML));
			break;
		}
	}
}
<?php 
    /*
    Display a 'loading previews' image. 
    
    Once the page is loaded (all images too) then display the 'use arrow keys' message.
    */
    ?>
$('navDirections').innerHTML="<img alt='Loading Previews' src='<?php 
    echo $loadingGif;
    ?>
' title='Loading Previews'><br>Loading Preview Images.<br>Use arrow keys to navigate pictures.";
window.onload=function(){document.onkeydown = keyBoardNav;$('navDirections').innerHTML=["Use arrow keys to navigate pictures"];};
// -->
</script>
</div>
<div id="cache">
<?php 
    /* Javascript or CSS Image Caching... */
    if (false) {
        echo "<script language=\"JavaScript\">";
        for ($i = $gallery_images_in_preview; $i < count($images_with_thumbs) - $gallery_images_in_preview; $i++) {
            $q = ($i + $imageIndex) % count($images_with_thumbs);
            $x++;
            echo "pic{$x}= new Image();";
            echo "pic{$x}.src=\"" . $preview[$q] . "\";\n";
            $x++;
            echo "pic{$x}= new Image();";
            echo "pic{$x}.src=\"" . $gallery[$q] . "\";\n";
        }
        echo "</script>";
    } else {
        for ($i = $gallery_images_in_preview; $i < count($images_with_thumbs) - $gallery_images_in_preview; $i++) {
            $q = ($i + $imageIndex) % count($images_with_thumbs);
            echo "<img src=\"" . $preview[$q] . "\" class='cache' alt='cache'>\n";
            echo "<img src=\"" . $gallery[$q] . "\" class='cache' alt='cache'>\n";
        }
    }
    ?>
</div>
<?php 
    if (function_exists("printfooter")) {
        printfooter($title);
    } else {
        html_footer($title);
    }
}
Exemple #4
0
                                 if (!@rename($entryPath . '-' . $rand, $dir . '/' . processName($modifier[$k]))) {
                                     $isSucceed = false;
                                     echo '<div class="notice_failure">Đổi tên ' . $entryLabel . ' <strong class="' . $entryCss . '_name_rename_action">' . $e . '</strong> <strong>=></strong> <strong class="' . $entryCss . '_name_rename_action">' . $modifier[$k] . '</strong> thất bại</div>';
                                 } else {
                                     $entry[$k] = $modifier[$k];
                                     echo '<div class="notice_succeed">Đổi tên ' . $entryLabel . ' <strong class="' . $entryCss . '_name_rename_action">' . $e . '</strong> <strong>=></strong> <strong class="' . $entryCss . '_name_rename_action">' . $modifier[$k] . '</strong> thành công</div>';
                                 }
                             }
                         }
                         if (!$isFailed && $isSucceed) {
                             goURL('index.php?dir=' . $dirEncode . $pages['paramater_1']);
                         }
                     }
                     echo $entryHtmlList;
                     echo '<div class="list ellipsis break-word">
 <span>' . printPath($dir, true) . '</span><hr/>
 <form action="action.php?dir=' . $dirEncode . $pages['paramater_1'] . '" method="post">';
                     for ($i = 0; $i < count($entry); ++$i) {
                         $entryPath = $dir . '/' . $entry[$i];
                         $entryName = $entry[$i];
                         if (is_dir($entryPath)) {
                             echo '<span class="bull">&bull;</span>Tên thư mục (<strong class="folder_name_rename_action">' . $entryName . '</strong>):<br/>';
                         } else {
                             echo '<span class="bull">&bull;</span>Tên tập tin (<strong class="file_name_rename_action">' . $entryName . '</strong>):<br/>';
                         }
                         echo '<input type="text" name="modifier[]" value="' . $modifier[$i] . '" size="18"/><br/>';
                     }
                     echo '<input type="hidden" name="is_action" value="1"/>
 <input type="hidden" name="option" value="' . $option . '"/>';
                     echo $entryCheckbox;
                     echo '<input type="submit" name="submit" value="Đổi tên"/>
Exemple #5
0
         } else {
             if (isPathNotPermission(processDirectory($_POST['path']))) {
                 echo 'Bạn không thể sao chép tập tin tới đường dẫn của File Manager';
             } else {
                 if (!@copy($dir . '/' . $name, processDirectory($_POST['path']) . '/' . $name)) {
                     echo 'Sao chép tập tin thất bại';
                 } else {
                     goURL('index.php?dir=' . $dirEncode . $pages['paramater_1']);
                 }
             }
         }
     }
     echo '</div>';
 }
 echo '<div class="list">
         <span class="bull">&bull;</span><span>' . printPath($dir . '/' . $name) . '</span><hr/>
         <form action="file_copy.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '" method="post">
             <span class="bull">&bull;</span>Đường dẫn tập tin mới:<br/>
             <input type="text" name="path" value="' . (isset($_POST['path']) ? $_POST['path'] : $dir) . '" size="18"/><br/>
             <input type="submit" name="submit" value="Sao chép"/>
         </form>
     </div>
     <div class="title">Chức năng</div>
     <ul class="list">
         <li><img src="icon/info.png"/> <a href="file.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '">Thông tin</a></li>';
 if (isFormatText($name)) {
     echo '<li><img src="icon/edit.png"/> <a href="edit_text.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '">Sửa văn bản</a></li>';
     echo '<li><img src="icon/edit_text_line.png"/> <a href="edit_text_line.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '">Sửa theo dòng</a></li>';
 } else {
     if (in_array($format, $formats['zip'])) {
         echo '<li><img src="icon/unzip.png"/> <a href="file_viewzip.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '">Xem</a></li>';
Exemple #6
0
 include_once 'header.php';
 echo '<div class="title">' . $title . '</div>';
 if ($dir == null || $name == null || !is_file(processDirectory($dir . '/' . $name))) {
     echo '<div class="list"><span>Đường dẫn không tồn tại</span></div>
         <div class="title">Chức năng</div>
         <ul class="list">
             <li><img src="icon/list.png"/> <a href="index.php' . $pages['paramater_1'] . '">Danh sách</a></li>
         </ul>';
 } else {
     $dir = processDirectory($dir);
     $path = $dir . '/' . $name;
     $format = getFormat($name);
     $isImage = false;
     $pixel = null;
     echo '<ul class="info">';
     echo '<li class="not_ellipsis"><span class="bull">&bull;</span><strong>Đường dẫn</strong>: <span>' . printPath($dir, true) . '</span></li>';
     if ($format != null && in_array($format, array('png', 'ico', 'jpg', 'jpeg', 'gif', 'bmp'))) {
         $pixel = getimagesize($path);
         $isImage = true;
         echo '<li><center><img src="read_image.php?path=' . rawurlencode($path) . '" width="' . ($pixel[0] > 200 ? 200 : $pixel[0]) . 'px"/></center><br/></li>';
     }
     echo '<li><span class="bull">&bull;</span><strong>Tên</strong>: <span>' . $name . '</span></li>
             <li><span class="bull">&bull;</span><strong>Kích thước</strong>: <span>' . size(filesize($path)) . '</span></li>
             <li><span class="bull">&bull;</span><strong>Chmod</strong>: <span>' . getChmod($path) . '</span></li>';
     if ($isImage) {
         echo '<li><span class="bull">&bull;</span><strong>Độ phân giải</strong>: <span>' . $pixel[0] . 'x' . $pixel[1] . '</span></li>';
     }
     echo '<li><span class="bull">&bull;</span><strong>Định dạng</strong>: <span>' . ($format == null ? 'Không rõ' : $format) . '</span></li>
             <li><span class="bull">&bull;</span><strong>Ngày sửa</strong>: <span>' . @date('d.m.Y - H:i', filemtime($path)) . '</span></li>
         </ul>
         <div class="title">Chức năng</div>
Exemple #7
0
                 if (count($cpath) > 1) {
                     if ($debug) {
                         echo "consolidating path<br/>";
                     }
                     $cpath = consolidatePath2($path, $type);
                 }
                 if (is_string($cpath)) {
                     if ($cpath == "walk") {
                         echo "You don't need to take the subway. Why don't you walk instead?<br/>";
                     } else {
                         if ($cpath == "same") {
                             echo "You're just testing the system, aren't you? Go do something more interesting, like telling your friends about this great site.<br/>";
                         }
                     }
                 } else {
                     printPath($cpath, $path->time);
                 }
                 echo "<br/>\n";
                 #displayStationChoices($current_url, $start_location, $end_location, $path->path);
             }
         }
     } else {
         echo "No Path Found.<br/>\n";
     }
 } else {
     echo "<b>How To Use This Site</b><br/>\n";
     echo "Find the <i>nearest station</i> by entering an address in one of the two fields.<br/>";
     if ($state == "NY") {
         echo "(i.e. <a href=\"http://transitcompass.com/nyc/?sa=50+Wall+St\">50 Wall St</a>)<br/>";
     }
     echo "<br/>\n";
Exemple #8
0
   curl_setopt($c, CURLOPT_TIMEOUT, 10);
   curl_exec($c);
   if(curl_errno($c))
       echo "CURL error ".curl_error($c)."</li>\n";
   elseif(curl_getinfo($c, CURLINFO_HTTP_CODE) == 400)
       echo "<b>NOT PROTECTED</b> - see installation instructions for how to secure this site!</li>";
   else
       echo "protected; HTTP code ".curl_getinfo($c, CURLINFO_HTTP_CODE)."</li>\n";
   curl_close($c);
   */
?>
</ul> -->

<hr><h2>Directories on your PATH:</h2>
    <?php 
printPath();
?>

<hr><h2>External programs required by MolProbity:</h2>
    <?php 
$ok &= testForProgs(array("which", "rm", "du", "df", "fold", "zip", "gzip", "gunzip", "php", "awk", "gawk", "perl", "java", "reduce", "prekin", "probe", "flipkin", "clashlist", "cluster", "suitename", "pdbcns", "dang", "scrublines", "cksegid.pl", "sswing", "sswingmkrotscrByPerl", "sswingpdb2rotscr", "genContour", "genScoreResult", "preGenScore", "noe-display"));
?>

<hr><h2>Version numbers for external programs:</h2>
<ul>
<?php 
// Reduce writes help on stderr
$java_help = explode("\n", shell_exec("java -version 2>&1"));
$reduce_help = explode("\n", shell_exec("reduce -help 2>&1"));
preg_match('/version.+?\\n/i', shell_exec("noe-display 2>&1"), $m);
$noe_version = $m[0];
Exemple #9
0
         if ($key < count($array) - 1) {
             $html .= '</a>';
         }
     }
 } else {
     if ($path == null) {
         $html = '/' . $root;
     } else {
         $html = '/<a href="file_viewzip.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'] . '">' . $root . '</a>/' . $path;
     }
 }
 echo '<script language="javascript" src="checkbox.js"></script>';
 echo '<div class="title">' . $html . '</div>';
 echo '<ul class="list_file">';
 echo '<li class="normal">
     <span>' . printPath($dir . '/' . $name) . '</span>
 </li>';
 if ($path != null) {
     $back = strrchr($path, '/');
     if ($back !== false) {
         $back = 'file_viewzip.php?dir=' . $dirEncode . '&name=' . $name . '&path=' . rawurlencode(substr($path, 0, strlen($path) - strlen($back))) . $pages['paramater_1'];
     } else {
         $back = 'file_viewzip.php?dir=' . $dirEncode . '&name=' . $name . $pages['paramater_1'];
     }
     echo '<li class="normal">
         <img src="icon/back.png" style="margin-left: 5px; margin-right: 5px"/> 
         <a href="' . $back . '">
             <strong class="back">...</strong>
         </a>
     </li>';
 }
Exemple #10
0
                 if (count($cpath) > 1) {
                     if ($debug) {
                         echo "consolidating path<br/>";
                     }
                     $cpath = consolidatePath2($path, $type);
                 }
                 if (is_string($cpath)) {
                     if ($cpath == "walk") {
                         echo "You don't need to take the subway. Why don't you walk instead?<br/>";
                     } else {
                         if ($cpath == "same") {
                             echo "You're just testing the system, aren't you? Go do something more interesting, like telling your friends about this great site.<br/>";
                         }
                     }
                 } else {
                     printPath($cpath, $path->t);
                 }
                 echo "<br/>\n";
                 #displayStationChoices($current_url, $start_location, $end_location, $path->path);
             }
         }
     } else {
         echo "No Path Found.<br/>\n";
     }
 } else {
     echo "<b>How To Use This Site</b><br/>\n";
     echo "Find the <i>nearest station</i> by entering an address in one of the two fields.<br/>";
     if ($state == "NY") {
         echo "(i.e. <a href=\"/nyc/?sa=50+Wall+St\">50 Wall St</a>)<br/>";
     }
     echo "<br/>\n";