Пример #1
0
<?php

php();
?>

class <?php 
echo $name;
?>
Controller extends NovemberController
{

}

<?php 
unphp();
Пример #2
0
<?php

namespace Bob\BuildConfig;

task("default", array("test"));
desc("Runs all tests.");
task("test", array("phpunit.xml", "composer.json"), function () {
    sh("./vendor/bin/phpunit");
});
fileTask("phpunit.xml", array("phpunit.dist.xml"), function ($task) {
    copy($task->prerequisites[0], $task->name);
});
fileTask("composer.json", array("composer.lock"), function ($task) {
    if (!file_exists("composer.phar")) {
        file_put_contents("composer.phar", file_get_contents("http://getcomposer.org/composer.phar"));
    }
    php("composer.phar install --dev");
});
Пример #3
0
<?php

namespace Bob\BuildConfig;

task("default", array("test"), function () {
});
desc("Runs all tests.");
task("test", array("phpunit.xml", "composer.json"), function () {
    sh("./vendor/bin/phpunit");
});
fileTask("phpunit.xml", array("phpunit.dist.xml"), function ($task) {
    copy($task->prerequisites[0], $task->name);
});
fileTask("composer.json", array("composer.lock"), function ($task) {
    if (!file_exists("composer.phar")) {
        file_put_contents("composer.phar", file_get_contents("http://getcomposer.org/composer.phar"));
    }
    php("composer.phar self-update");
    php("composer.phar update --dev");
});
Пример #4
0
<?php

namespace Bob\BuildConfig;

task("default", array("test"), function () {
});
desc("Runs all tests.");
task("test", array("phpunit.xml", "composer.json"), function () {
    sh("phpunit");
});
fileTask("phpunit.xml", array("phpunit.dist.xml"), function ($task) {
    copy($task->prerequisites[0], $task->name);
});
fileTask("composer.json", array("composer.lock"), function ($task) {
    if (!file_exists("composer.phar")) {
        file_put_contents("composer.phar", file_get_contents("http://getcomposer.org/composer.phar"));
    }
    php("composer.phar install");
});
Пример #5
0
<?php

include_once '../config/symbini.php';
include_once $serverRoot . '/classes/OccurrenceGeoLocate.php';
header("Content-Type: text/html; charset=" . $charset);
if (!$SYMB_UID) {
    header('Location: ' . $serverRoot . '/profile/index.php?refurl=../misc/generaltemplate.php?' . $_SERVER['QUERY_STRING']);
}
$collid = $_REQUEST['collid'];
$action = array_key_exists('action', $_POST) ? $_POST['action'] : '';
$formSubmit = array_key_exists('formsubmit', $_POST) ? $_POST['formsubmit'] : '';
$geoLocateManager = new OccurrenceGeoLocate() . php();
$geoLocateManager->setCollid($collid);
$isEditor = 0;
if ($SYMB_UID) {
    if ($IS_ADMIN) {
        $isEditor = 1;
    } elseif ($collid) {
        if (array_key_exists("CollAdmin", $USER_RIGHTS) && in_array($collid, $USER_RIGHTS["CollAdmin"])) {
            $isEditor = 1;
        }
    }
}
$occRecArr = array();
if ($isEditor) {
    if (array_key_exists('qCountry', $_POST) && $_POST['qCountry']) {
        $geoLocateManager->addFilterTerm('country', $_POST['qCountry']);
    }
    if (array_key_exists('qStateProvince', $_POST) && $_POST['qStateProvince']) {
        $geoLocateManager->addFilterTerm('stateProvince', $_POST['qStateProvince']);
    }
Пример #6
0
 function runPaths($tail)
 {
     $buffer = '';
     $context = new Hash(array('response' => response(), 'request' => request(), 'route' => $this));
     $context->params = $context->request->params;
     $included = false;
     $this->bubble = $this->options->get('bubble', true);
     foreach ($this->options->paths as $path) {
         $filename = "{$path}/{$tail}.php";
         $filename = realpath($filename);
         if (!$filename) {
             continue;
         }
         if (strncmp($filename, $path, strlen($path)) !== 0) {
             throw new \Exception("route tried to access unsafe path");
         }
         ob_start();
         if (php($filename, $context)) {
             $included = true;
         }
         $buffer .= ob_get_clean();
         if (!$this->bubble) {
             break;
         }
     }
     if (!$included) {
         throw new \Exception("no matching files in route paths");
     }
     return $buffer;
 }
Пример #7
-2
function render($template, $locals = array())
{
    $context = new Hash(array('response' => response(), 'request' => request(), 'route' => route()));
    $context->params = $context->request->params;
    $context->merge($locals);
    $views = options()->get('views', __DIR__ . '/views');
    $filename = realpath("{$views}/{$template}");
    ob_start();
    $included = php($filename, $context);
    $output = ob_get_clean();
    return $included ? $output : false;
}