コード例 #1
1
ファイル: index.php プロジェクト: shrknt35/nunit.org
<?php

// Main entry for the NUnitLite website, now being moved
// to it's own location, outside of NUnit.com
// Define Home and PHP diretories
$here = dirname(__FILE__);
$php = $here . '/php';
define("HOME_DIR", "{$here}/");
// Add Home directory and PHP directory to the include path
$current_path = ini_get("include_path");
ini_set("include_path", "{$current_path}:{$here}:{$php}");
// Set HOME_PATH using the url for this page.
if (isset($_SERVER["PHP_SELF"])) {
    define("HOME_PATH", dirname($_SERVER["PHP_SELF"]) . '/');
} else {
    define("HOME_PATH", '/');
}
// Include required routines
require_once "display_page.php";
require_once "html_funcs.php";
// Get any arguments passed
$name = getarg("p", "home");
// Display the requested page
displayPage($name, array($here, "{$here}/docs", "{$here}/dev"));
コード例 #2
0
ファイル: index.php プロジェクト: shrknt35/nunit.org
// Define base directory locations used
$here = dirname(__FILE__);
define("HOME_DIR", "{$here}/");
// Add Home directory and PHP directory to the include path
$current_path = ini_get("include_path");
if (!defined("PATH_SEPARATOR")) {
    if (strpos($_ENV["OS"], "Win") !== false) {
        define("PATH_SEPARATOR", ";");
    } else {
        define("PATH_SEPARATOR", ":");
    }
}
ini_set("include_path", $current_path . PATH_SEPARATOR . $here . PATH_SEPARATOR . $here . DIRECTORY_SEPARATOR . "php");
// Set NUNIT_PATH using the url for this page.
/*if ( isset( $_SERVER[ "PHP_SELF" ] ) )
    define( "NUNIT_PATH", dirname( $_SERVER[ "PHP_SELF" ] ) . '/' );
  else
    define( "NUNIT_PATH", '/' );*/
// Include required routines
require_once "display_page.php";
require_once "html_funcs.php";
// Get any arguments passed
$name = getarg("p", "home");
$rel = getarg("r", "");
$NUnitRelease = $rel;
$html_dirs = array($here);
if ($rel != "") {
    array_push($html_dirs, "{$here}/docs/{$rel}");
}
// Display the requested page
displayPage($name, $html_dirs);
コード例 #3
0
ファイル: selectRelease.php プロジェクト: shrknt35/nunit.org
    case "part":
        echo '<h2>HTML Generation - Single Release Site</h2>';
        break;
    case "docs":
        echo '<h2>HTML Generation - Release Documentation</h2>';
        break;
    case "print":
        echo '<h2>HTML Generation - Documentation for Printing</h2>';
        break;
}
?>

    <form>
      <input type="hidden" name="p" value="generate">
	  <input type="hidden" name="m" value="<?php 
echo getarg("m", "docs");
?>
">
      <table>
        <tr height="40">
          <td>&nbsp;</td>
          <td>Select Release:  
            <select name="r" width="30" >
			
	   		<?php 
$docsdir = opendir(NUNIT_DOCS_DIR);
$releases = array();
while ($release = readdir($docsdir)) {
    if (is_dir(NUNIT_DOCS_DIR . $release) && $release > '2.1') {
        array_push($releases, $release);
    }
コード例 #4
0
ファイル: apiv1_tester.php プロジェクト: asgrim/joind.in
/**
 * Handler for calls to the site API
 *
 * @param string $command Site command to run
 * @param array  $args    Arguments for command
 *
 * @return void
 */
function site($command, $args)
{
    echo "*** Site: {$command} ***\n";
    switch ($command) {
        case 'status':
            $string = getarg($args, 0, 'apiv1 test');
            call_api('site', 'status', array("test_string" => $string));
            break;
        default:
            echo "ERROR: invalid command\n";
            return;
    }
}
コード例 #5
0
ファイル: control.php プロジェクト: shrknt35/nunit.org
    if (strpos($_ENV["OS"], "Win") !== false) {
        define("PATH_SEPARATOR", ";");
    } else {
        define("PATH_SEPARATOR", ":");
    }
}
ini_set("include_path", $current_path . PATH_SEPARATOR . $here . PATH_SEPARATOR . $here . DIRECTORY_SEPARATOR . "php");
// Set NUNIT_PATH using the url for this page.
if (isset($_SERVER["PHP_SELF"])) {
    define("NUNIT_PATH", dirname($_SERVER["PHP_SELF"]) . '/');
} else {
    define("NUNIT_PATH", '/');
}
// The following are only used for file generation
define("NUNIT_FILES_DIR", HOME_DIR . "files/");
define("NUNIT_IMAGE_DIR", HOME_DIR . "img/");
define("NUNIT_DOCS_DIR", HOME_DIR . "docs/");
// Target directories for Generating Static content
define("TARGET_DIR", HOME_DIR . "static/");
define("TARGET_FILES_DIR", TARGET_DIR . "files/");
define("TARGET_IMAGE_DIR", TARGET_DIR . "img/");
define("TARGET_DOCS_DIR", TARGET_DIR . "docs/");
// URL for viewing the generated html
define("TARGET_PATH", NUNIT_PATH . "static/");
// Include required routines
require_once "display_page.php";
require_once "html_funcs.php";
// Get any arguments passed
$name = getarg("p", "controlPanel");
// Display the requested page
include "control/{$name}.php";
コード例 #6
0
ファイル: generate.php プロジェクト: shrknt35/nunit.org
{
    echo "<h4>Processing Images</h4>\n<blockquote>\n";
    CreateDir(TARGET_IMAGE_DIR);
    if ($mode == "docs" || $mode == 'print') {
        CopyFile(NUNIT_IMAGE_DIR, TARGET_IMAGE_DIR, "logo.gif");
        CopyFile(NUNIT_IMAGE_DIR, TARGET_IMAGE_DIR, "langfilter.gif");
        CopyFile(NUNIT_IMAGE_DIR, TARGET_IMAGE_DIR, "bulletOn.gif");
        CopyFile(NUNIT_IMAGE_DIR, TARGET_IMAGE_DIR, "bulletOff.gif");
    } else {
        CopyDirectory(NUNIT_IMAGE_DIR, TARGET_IMAGE_DIR);
    }
    echo "</blockquote>\n";
}
// Main Program handles each type of build separately
$mode = getarg("m", "full");
$release = getarg("r", "2.2");
switch ($mode) {
    case "full":
        echo "<h2>Generate Static HTML - Full Site</h2>";
        ProcessMainDirectory($mode);
        ProcessImageDirectory($mode);
        ProcessAllDocumentation();
        break;
    case "part":
        echo "<h2>Generate Static HTML - NUnit {$release} Site</h2>";
        ProcessMainDirectory($mode);
        ProcessImageDirectory($mode);
        CopyDocumentation($release, $mode, TARGET_DIR);
        break;
    case "docs":
        echo "<h2>Generate Static HTML - NUnit {$release} Docs</h2>";
コード例 #7
0
ファイル: index.php プロジェクト: tink3r/tt-pds
    $acc = $masterkey;
}
$linkstr = "lang=" . $lang . "&acc=" . $acc;
$count_galleries = 0;
$first_t = '';
$t = getarg('t');
foreach ($TTPDS_galleries as $key => $value) {
    if (strpos($acc, $value["key"]) !== false) {
        $count_galleries = $count_galleries + 1;
        if ($first_t == '') {
            $first_t = $key;
        }
        $TTPDS_galleries[$key]["access"] = 1;
        if ($t == $key) {
            $mode = $key;
            $f = getarg('f');
            if (is_numeric($f)) {
                sendFile($TTPDS_datafolder . '/' . $TTPDS_galleries[$mode]["folder"], $f);
            }
        }
    }
}
if ($t == 'help') {
    $mode = 'default';
} else {
    if ($t == "disclaimer") {
        $mode = "disclaimer";
    } else {
        if ($mode == 'default' && $count_galleries == 1) {
            $mode = $first_t;
        }