Example #1
0
function installComposer()
{
    $colors = getColors();
    extract($colors);
    $quiet = '';
    if (!in_array('--debug', $_SERVER['argv'])) {
        $quiet = '-q';
        echo "\n{$yellow}Running composer... {$reset}";
    }
    $rundir = __DIR__ . '/../';
    echo `cd "{$rundir}" && php composer.phar update {$quiet}`;
    if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
        require_once __DIR__ . '/../vendor/autoload.php';
        if ($quiet) {
            echo "[{$green}OK{$reset}]\n\n";
        } else {
            echo "\n\n";
        }
    } else {
        if ($quiet) {
            echo "[{$red}!!{$reset}]\n";
            echo "{$red}Something went wrong! Please try again using the \"--debug\" flag :({$reset}\n";
        } else {
            echo "{$red}Something went wrong! Please check the output above for details.{$reset}\n";
        }
        exit;
    }
}
Example #2
0
         if ($second !== false) {
             $tld = substr($domain, 0, $second);
         }
     }
     if (strcasecmp($tld, $lastTLD)) {
         if (strlen($lastTLD)) {
             getColors($colors, $count, $index);
         }
         // reset the counter
         $count = 0;
         $lastTLD = $tld;
     }
     $count++;
 }
 if (strlen($lastTLD)) {
     getColors($colors, $count, $index);
 }
 $graph = new PieGraph($width, $height);
 $graph->SetFrame(false);
 $graph->SetAntiAliasing();
 $pie = new PiePlot($values);
 // set  the actual labels for the wedges
 $pie->SetLabels($labels, 1.1);
 if (count($colors)) {
     $pie->SetSliceColors($colors);
 }
 // set other options
 $pie->SetGuideLines(true, true, true);
 $graph->title->SetFont(FF_FONT2, FS_BOLD);
 $graph->title->Set($chartType);
 $pie->ShowBorder(true, true);
    // const neutral_red_light = "#d6a3a0";
    const neutral_purple_light = "#b886a7";
    // const neutral_orange_light = "#d2aba0";
    // const neutral_yellow_light = "#d0b897";
    const neutral_green_dark = "#1d3524";
    const neutral_blue_dark = "#1e3146";
    // const neutral_red_dark = "#773733";
    const neutral_purple_dark = "#472a3d";
    // const neutral_orange_dark = "#714335";
    // const neutral_yellow_dark = "#6b5230";
    const mostly_white = "#e2efe6";
    const mostly_black = "#171717";
}
$ref = new ReflectionClass('Colors');
$colors = $ref->getConstants();
$polygons = [18 => ["points" => hexPoints("900,600"), "colors" => getColors(3)], 15 => ["points" => hexPoints("640,450"), "colors" => getColors(3)], 16 => ["points" => hexPoints("1160,450"), "colors" => getColors(3)], 17 => ["points" => hexPoints("900,900"), "colors" => getColors(3)], 12 => ["points" => hexPoints("900,300"), "colors" => getColors(3)], 13 => ["points" => hexPointS("640,750"), "colors" => getColors(3)], 14 => ["points" => hexPoints("1160,750"), "colors" => getColors(3)], 6 => ["points" => hexPoints("1160,150"), "colors" => getColors(3)], 7 => ["points" => hexPoints("640,150"), "colors" => getColors(3)], 8 => ["points" => hexPoints("380,600"), "colors" => getColors(3)], 9 => ["points" => hexPoints("1420,600"), "colors" => getColors(3)], 10 => ["points" => hexPoints("640,1050"), "colors" => getColors(3)], 11 => ["points" => hexPoints("1160,1050"), "colors" => getColors(3)], 0 => ["points" => hexPoints("900,0"), "colors" => getColors(3)], 1 => ["points" => hexPoints("380,900"), "colors" => getColors(3)], 2 => ["points" => hexPoints("1420,900"), "colors" => getColors(3)], 3 => ["points" => hexPoints("1420,300"), "colors" => getColors(3)], 4 => ["points" => hexPoints("380,300"), "colors" => getColors(3)], 5 => ["points" => hexPoints("900,1200"), "colors" => getColors(3)]];
$polyTemplate = '<polygon id="poly-{index}" points="{points}" style="fill:{start};">{animate}</polygon>';
$animateTemplate = '<animate attributeName="fill" values="{colors}" repeatCount="indefinite" begin="{begin}s" dur="{dur}s" />';
$templateData = ['polygons' => []];
foreach ($polygons as $index => $item) {
    $item['start'] = $item['colors'][0];
    $item['index'] = $index;
    $item['animate'] = '';
    if (count($item['colors']) > 1) {
        $item['colors'][] = $item['colors'][0];
        $item['colors'] = implode('; ', $item['colors']);
        $item['begin'] = rand(0, 2);
        $item['dur'] = rand(3, 6);
        $item['animate'] = interpolate($animateTemplate, $item);
    }
    $templateData['polygons'][] = interpolate($polyTemplate, $item);
<?php

// Globale Skripte einbinden
require_once dirname(__FILE__) . '/../dist/include/autoloader.php';
require_once DIR_INCLUDE . 'cli.php';
say(array('Anhand Ihrer Angaben in der settings/global.ini werden ', 'nun die CSS-Dateien generiert und Grafiken eingefaerbt. ', ''));
$hColors = getColors();
if ($hColors) {
    writeSassConfig($hColors);
    updateSVGImages($hColors);
}
//////////////////////// FUNKTIONEN //////////////////////////
/**
 * Farbeinstellungen des Benutzers auslesen
 *
 * @return array        Farbwerte aus der global.ini als Array
 */
function getColors()
{
    // Einstellungen aus der global.ini auslesen
    $hColors = Settings::getValue('global', 'colors');
    if (!$hColors) {
        say("Farbeinstellungen konnten nicht ausgelesen werden");
        return false;
    }
    $hSettingsToChange = array();
    // Hauptfarbe nicht vorhanden -> Alles abbrechen
    if (!array_key_exists('main', $hColors) || $hColors['main'] === '{{hauptfarbe}}') {
        say('Es fehlt die Hauptfarbe in der global.ini! ');
        say('Bitte stellen Sie sicher, dass ein Bereich [colors] vorhanden ist. ');
        say('Setzen Sie darunter eine Zeile mit dem Inhalt main="#<ihrefarbe>". ');
Example #5
0
function actionGetColors($mysqli)
{
    return getColors($mysqli);
}
                         if ($method == "quec") {
                             $data = getNumOfFeatures($map, $layer, $attribute);
                             $breaks = quantile($data, $classes);
                             $colors = getColors(hex2rgb($startColor), hex2rgb($endColor), count($breaks));
                             saveToMapFile($map, $layer, $attribute, $type, $breaks, $colors, $mapFile);
                         } else {
                             if ($method == "sd") {
                                 $data = getNumOfFeatures($map, $layer, $attribute);
                                 $breaks = standardDeviation($data, $classes);
                                 $colors = getColors(hex2rgb($startColor), hex2rgb($endColor), count($breaks));
                                 saveToMapFile($map, $layer, $attribute, $type, $breaks, $colors, $mapFile);
                             } else {
                                 if ($method == "pb") {
                                     $data = getNumOfFeatures($map, $layer, $attribute);
                                     $breaks = pretty($data, $classes);
                                     $colors = getColors(hex2rgb($startColor), hex2rgb($endColor), count($breaks));
                                     saveToMapFile($map, $layer, $attribute, $type, $breaks, $colors, $mapFile);
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 } else {
     if ($_POST["function"] == "updateStyles") {
         $mapFile = $_POST["mapFile"];
         $layerName = $_POST["layerName"];
         $data = json_decode($_POST["data"]);
         updateStyles($mapFile, $layerName, $data);
</head>
<body>
    <?php 
    include "menu_empleado.php";
    ?>
	
    <div class="container-fluid">
    	<div class="row">
    		<div class="col-xs-4">
	    		<div class="panel panel-warning">
	  				<div class="panel-body">
	  					<form>
  							<div class="form-group">
    							<label for="color_label">Color: </label>
    							<?php 
    getColors();
    ?>
  							</div>
  							<div class="form-group">
    							<label for="talla_label">Talla: </label>
    							<?php 
    getSizes();
    ?>
  							</div>
  							<div class="form-group">
    							<label for="model_label">Modelo: </label>
    							<?php 
    getModels();
    ?>
  							</div>
  							<button type="button" class="btn btn-primary" id="search_shoe"><i class="icon-search icon-small"></i> Buscar</button>