Ejemplo n.º 1
0
<?php

use Danack\Console\Application;
use Danack\Console\Output\BufferedOutput;
use Danack\Console\Command\Command;
use Danack\Console\Input\InputArgument;
require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/../src/appFunctions.php';
require __DIR__ . '/../src/cliFunctions.php';
require __DIR__ . "/../vendor/danack/tier/src/Tier/tierFunctions.php";
register_shutdown_function('fatalErrorShutdownHandler');
set_exception_handler('exceptionHandler');
set_error_handler('errorHandler');
//Figure out what Command was requested.
try {
    $application = createApplication();
    $parsedCommand = $application->parseCommandLine();
} catch (\Exception $e) {
    //@TODO change to just catch parseException when that's implemented
    $output = new BufferedOutput();
    $application->renderException($e, $output);
    echo $output->fetch();
    exit(-1);
}
$injector = new \Auryn\Injector();
$injectionParams = (require __DIR__ . "/../src/injectionParams.php");
$injectionParams->addToInjector($injector);
chdir(realpath(__DIR__) . '/../imagick');
try {
    $input = $parsedCommand->getInput();
    foreach ($parsedCommand->getParams() as $key => $value) {
Ejemplo n.º 2
0
 public function createApplication()
 {
     return createApplication();
 }
    switch ( $task['task'] )
    {
        case TASK_UPDATE:
            updateApplication( $task['object'], $task['internal_name'] );
            break;
        case TASK_CREATE:
            createApplication( $clusterIdentifier, $task['identifier'], $task['internal_name'], $country, $language );
            break;
        case TASK_CREATE_HOMEPAGE:
            createHomepage( $country, $clusterIdentifier, $language );
            break;
        case TASK_CREATE_PAGES_FOLDER:
            createPagesFolder( $country, $clusterIdentifier, $language );
            break;
        case TASK_CREATE_MERCK_MANUAL_SHOWCASE:
            createApplication( $clusterIdentifier, $task['identifier'], $task['internal_name'], $country, $language );
            break;
        default:
            $script->shutdown( 1, "Unknown task {$task['task']}" );
            break;
    }
}

$script->shutdown( 0 );

/**
 * Selects applications from database that are localized in specified cluster and are of given type
 * @param string $clusterIdentifier
 * @param string $type
 * @return array
 */
Ejemplo n.º 4
0
    //$_SESSION['a7_submenu']            = $par['a7_submenu'];
} else {
    if (!isset($_POST['action'])) {
        $_POST['action'] = "undefined";
    }
    $action = $_POST['action'];
    if ($action == 'apply_account') {
        $username = $_POST['username'];
        $g_user = safeUserName($username);
        $email = $_POST['email'];
        //$letter   = $_POST['letter'];
        $pswd = $_POST['pswd'];
        $g_pswd = safeUserName($pswd);
        // $letter = safeText3($letter);
        $c_a_r = 0;
        $c_a_r = createApplication($g_user, $email, $g_pswd);
        $c_a_r = $c_a_r + createAccount($g_user, $g_pswd);
    }
}
//====================================================
//  HTML functions
//====================================================
//********************************************
function viking_7_mainmenu($sys_id)
{
    global $par;
    $path = $par['path'];
    $user = $par['user'];
    //$submenu = $par['a7_submenu'];
    //if(!$submenu) $submenu = 1;
    echo "<ul id=\"dropdown\">";