Пример #1
0
 public function __construct($data)
 {
     parent::__construct();
     $this->counter = new Counter();
     $this->starsArray = Arrays::allStarsArray();
     $this->sizeArray = Arrays::sizeTypeArray();
     $this->planetTypeArray = Arrays::planetTypeArray();
     $this->star = $data['star'];
     $data['size'] == 999 ? $this->size = [0, 1, 2, 3, 4, 5, 6, 7] : ($this->size = [$data['size']]);
     $data['class'] == 999 ? $this->class = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] : ($this->class = [$data['class']]);
     if ($data['size'] == 999 && $data['class'] == 999) {
         $this->addr = $this->starsArray[$data['star']];
         $this->nameStyle = 'all-all';
     }
     if ($data['size'] == 999 && $data['class'] != 999) {
         $this->addr = $this->starsArray[$data['star']] . $data['class'];
         $this->nameStyle = 'all-size';
     }
     if ($data['size'] != 999 && $data['class'] == 999) {
         $this->addr = $this->starsArray[$data['star']] . " " . $this->sizeArray[$data['size']];
         $this->nameStyle = 'all-class';
     }
     if ($data['size'] != 999 && $data['class'] != 999) {
         $this->addr = $this->starsArray[$data['star']] . $data['class'] . " " . $this->sizeArray[$data['size']];
         $this->nameStyle = 'one-one';
     }
     $this->name = $this->thirdChartName($this->locale, $this->nameStyle);
     $this->count();
 }
Пример #2
0
 public function __construct($addr_id)
 {
     $inside = \App\Inside::where('address_id', $addr_id)->first();
     $this->inside = unserialize($inside->data);
     $this->starName = \App\Myclasses\Arrays::allStarsArray();
     $this->planetName = \App\Myclasses\Arrays::planetsForCabinet();
     $this->sizeName = \App\Myclasses\Arrays::sizeTypeArray();
 }
Пример #3
0
 public function __construct($data)
 {
     parent::__construct();
     $this->counter = new Counter();
     $this->planetTypeArray = Arrays::planetTypeArray();
     $starsArray = Arrays::allStarsArray();
     $sizeArray = Arrays::sizeTypeArray();
     if ($data['size'] == 100) {
         $this->nameSize = 'size-all';
         $this->size = [0, 1, 2, 3, 4, 5, 6, 7];
     } else {
         $this->nameSize = 'size-one';
         $this->sizeHeader = $sizeArray[$data['size']];
         $this->size = [$data['size']];
     }
     if ($data['class'] == 100) {
         $this->nameClass = 'class-all';
         $this->class = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
     } else {
         $this->tempHeader = $data['class'];
         $this->nameClass = 'class-one';
         $this->class = [$data['class']];
     }
     $this->star = $data['star'];
     $this->starHeader = $starsArray[$data['star']];
     $data['step'] == 0 ? $this->step = 0.25 : ($this->step = $data['step']);
     switch ($data['planet']) {
         case 3:
             $this->planet = [3];
             $this->chartSelection = 'el';
             $this->charType = 1;
             $this->querySimple();
             break;
         case 3210:
             $this->planet = [0, 1, 2, 3];
             $this->chartSelection = 'eltf';
             $this->charType = 1;
             $this->querySimple();
             break;
         case 14:
             $this->planet = [1, 4];
             $this->chartSelection = 'ww';
             $this->charType = 1;
             $this->querySimple();
             break;
         case 543210:
             $this->chartSelection = 'all';
             $this->charType = 2;
             $this->queryAll();
     }
     $this->headerName($this->locale);
 }
Пример #4
0
 public function __construct($data)
 {
     parent::__construct();
     switch ($data['style']) {
         case 1:
             $this->planets = [0, 1, 2, 3];
             $this->chartSelection = 'life';
             break;
         case 2:
             $this->planets = [0];
             $this->chartSelection = 'metal';
             break;
         case 3:
             $this->planets = [1];
             $this->chartSelection = 'tw';
             break;
         case 4:
             $this->planets = [4];
             $this->chartSelection = 'w';
             break;
         case 5:
             $this->planets = [5];
             $this->chartSelection = 'aw';
             break;
         case 6:
             $this->planets = [3];
             $this->chartSelection = 'el';
             break;
     }
     $this->chartName($this->locale);
     $this->counter = new Counter();
     $this->sizeList = $this->counter->starSelect('size');
     $this->stopList = Arrays::stopList();
     $this->starsArray = Arrays::allStarsArray();
     $this->sizeArray = Arrays::sizeTypeArray();
     $this->total = $this->counter->planetSelect($this->planets);
     $this->starsList = $this->counter->starSelectExcluding($this->stopList);
     $this->searchNormal();
 }
Пример #5
0
 public function giveBaryAdder(Request $request)
 {
     $addrId = $request->input('id');
     $stars = \App\Myclasses\Arrays::allStarsArray(true);
     $sizes = \App\Myclasses\Arrays::sizeTypeArray();
     if ($addrId > 0) {
         $converter = new \App\Myclasses\Insides\Converter($addrId);
         return view($this->localeDir . 'templates.addBary', compact('stars', 'sizes', 'addrId', 'converter'));
     }
 }
Пример #6
0
<h3 class="white">Editing the object</h3>
<h4 class="white">Changes</h4>
@if($data['type']=='star')
    <?php 
$starData = \App\Myclasses\StarInfo::getFromDb($data['id']);
$stars = \App\Myclasses\Arrays::allStarsArray(true);
$sizes = \App\Myclasses\Arrays::sizeTypeArray();
?>
    <h5>Provided the data: <span class="white">{{$starData->user->name}}</span></h5>
    <form class="form-inline" method="get" action="{{route('changeObject')}}">
        <input type="hidden" value="{{$data['id']}}" name="id">
        <input type="hidden" value="star" name="type">
        <input type="hidden" value="change" name="action">
        <label for="starD"> Star:</label>
        <select name="star" id="starD">
            <option value="{{$starData->star}}">{{$stars[$starData->star]}}</option>
            @foreach($stars as $key=>$value)
                <option value="{{$key}}">{{$value}}</option>
            @endforeach
        </select>
        <label for="classD"> Class</label>
        <select name="class" id="classD">
            <option>{{$starData->class}}</option>
            @for($n=0; $n<10; $n++)
                <option value="{{$n}}">{{$n}}</option>
            @endfor
        </select>
        <label for="sizeD"> Size</label>
        <select name="size" id="sizeD">
            <option value="{{$starData->size}}">{{$sizes[$starData->size]}}</option>
            @foreach($sizes as $key=>$value)