private function procesarListaPartidos($postJugadorApi, $postJugadorLocal, $postTorneo, &$listaPartidos) { $selectTorneos = Torneo::model()->selectTorneos(); $peticionPartidos = ApiChallonge::getPartidoTorneo($postTorneo['idTorneo']); $lengthJugadores = count($postJugadorApi); for ($i = 0; $i < $lengthJugadores; $i++) { $jugadorApi = $postJugadorApi[$i]; $jugadorLocal = $postJugadorLocal['jugadorId'][$i]; $idTorneoLocal = $postJugadorLocal['idTorneoVzla']; $posicionJugadorLocal = $postJugadorLocal['posicionJugador'][$i]; $peticionPartidos = str_replace($jugadorApi, $jugadorLocal, $peticionPartidos); $posicionJugador = new JugadorPosicionTorneo(); $posicionJugador->id_jugador = $jugadorLocal; $posicionJugador->id_torneo = $idTorneoLocal; $posicionJugador->posicion = $posicionJugadorLocal; $posicionJugador->save(); } $jsonPartidos = json_decode($peticionPartidos, true); $i = 0; foreach ($jsonPartidos as $key => $value) { $match = $value['match']; $player1Id = $match['player1_id']; $player2Id = $match['player2_id']; $winnerId = $match['winner_id']; $ronda = $match['identifier']; $numeroRonda = $match['round']; $jugadorVzla1 = Jugador::model()->findByPk($player1Id); $jugadorVzla2 = Jugador::model()->findByPk($player2Id); $ganadorVzla = Jugador::model()->findByPk($winnerId); $listaPartidos .= $this->renderPartial('_listaPartidos', array('jsonPartidos' => $jsonPartidos, 'player1Id' => $player1Id, 'player2Id' => $player2Id, 'winnerId' => $winnerId, 'ronda' => $ronda, 'numeroRonda' => $numeroRonda, 'jugadorVzla1' => $jugadorVzla1, 'jugadorVzla2' => $jugadorVzla2, 'ganadorVzla' => $ganadorVzla, 'i' => $i), true, false); $i++; } $listaPartidos .= Chtml::label('ID Torneo SSBMVZLA', 'ResultadoPvP_idTorneoVzla') . '<br/>' . CHtml::dropDownList('ResultadoPvP[idTorneoVzla]', '', $selectTorneos, array('empty' => '')) . '<br/>'; }
echo $form->labelEx($model, "[{$i}]DateGet"); ?> <?php echo $form->textField($model, "[{$i}]DateGet", array("class" => "span12 datepicker")); ?> <?php //echo $form->textFieldRow($model,"ZNOPin",array("class"=>"span5")); ?> <?php //echo $form->textFieldRow($model,"AtestatValue",array("class"=>"span5","maxlength"=>10)); ?> </div> <div class ="span8"> <?php echo $form->labelEx($model, "[{$i}]Issued"); ?> <?php echo $form->textField($model, "[{$i}]Issued", array("class" => "span12", "maxlength" => 250)); ?> </div> <div class ="span2"> <?php echo Chtml::label("Знищити", ""); ?> <?php $url = Yii::app()->createUrl("personbenefits/delbenefitdoc", array('num' => $i)); $this->widget("bootstrap.widgets.TbButton", array('type' => 'danger', 'label' => '', 'size' => null, 'icon' => "icon-trash", 'htmlOptions' => array("style" => "margin-top: 2px;", 'title' => "Видалити пільгу", 'class' => "span7", 'onclick' => "PSN.delBenefitDoc(this,'{$url}');"))); ?> </div> </div>
?> '> <?php $pprs_listData = CHtml::listData(PprsPerson::model()->getSysCompanyPersons(), 'pprs_id', 'itemLabel'); echo $form->listBox($model, 'ttsk_pprs_id', $pprs_listData, array('class' => 'span11')); //echo $form->error($model,'ttsk_pprs_id') ?> </span> </div> </div> <div class="control-group"> <div class='control-label'> <?php echo Chtml::label('Managers', 'managers'); ?> </div> <div class='controls'> <span class="tooltip-wrapper" data-toggle='tooltip' data-placement="right" title='<?php echo ($t = Yii::t('D2tasksModule.model', 'tooltip.ttsk_name')) != 'tooltip.ttsk_name' ? $t : ''; ?> '> <?php $person = PprsPerson::model()->getSysCompanyPersons(); echo Chtml::listBox('managers', Yii::app()->getModule('user')->user()->profile->person_id, CHtml::listData(PprsPerson::model()->findAll(array('limit' => 1000, 'order' => 'pprs_second_name')), 'pprs_id', 'itemLabel'), array('style' => 'width:300px;', 'size' => 30, 'multiple' => 'multiple')); ?> </span> </div> </div>
?> " class="row field-row"<?php if (@$htmlOptions['hide']) { ?> style="display: none;"<?php } ?> > <div class="large-<?php echo $layoutColumns['label']; ?> column"> <?php $labelText = empty($htmlOptions['label']) ? CHtml::encode($element->getAttributeLabel($field)) : $htmlOptions['label']; $labelText .= ':'; echo Chtml::label($labelText, Chtml::getIdByName($name)); ?> </div> <div class="large-<?php echo $layoutColumns['field']; ?> column<?php if (empty($htmlOptions['append-text']) || empty($layoutColumns['append-text'])) { ?> end<?php } ?> "> <?php echo CHtml::textField($name, $value, $htmlOptions); ?>
<?php if ($model->isNewRecord) { $this->widget('ext.matchcode.MatchCode', array('nombrecampo' => 'codart', 'ordencampo' => 6, 'controlador' => $this->id, 'relaciones' => $model->relations(), 'tamano' => 8, 'model' => $model, 'form' => $form, 'nombredialogo' => 'cru-dialog3', 'nombreframe' => 'cru-frame3', 'nombrearea' => 'fhdfj')); echo $form->error($model, 'codart'); } else { echo CHtml::textField('Sax', $model->codart, array('disabled' => 'disabled', 'size' => 8)); echo CHtml::textField('Sa', $model->maestro->descripcion, array('disabled' => 'disabled', 'size' => 40)); } ?> </div> <div class="row"> <?php echo Chtml::label('um', 'um'); ?> <?php echo Chtml::textField('ssfsfs', $model->maestro->maestro_ums->desum, array('disabled' => 'disabled', 'size' => 3, 'maxlength' => 3)); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'cantlibre'); ?> <?php echo $form->textField($model, 'cantlibre', array('disabled' => 'disabled')); ?> <?php
?> <?php echo CHtml::dropDownList('SpecialityID', "", Specialities::DropDown(0), array('empty' => '', 'class' => "span12")); ?> </div> <div class ="span2"> <?php echo CHtml::label("Форма обучения", 'eduFormID'); ?> <?php echo CHtml::dropDownList('eduFormID', "", CHtml::listData(Personeducationforms::model()->findAll(), 'idPersonEducationForm', 'PersonEducationFormName'), array('empty' => '', 'class' => "span12")); ?> </div> <div class="span2"> <?php echo Chtml::label("Окр", 'idOKR'); ?> <?php echo CHtml::dropDownList('idOKR', "", CHtml::listData(Qualifications::model()->findAll(), 'idQualification', 'QualificationName'), array('empty' => '', 'class' => "span12")); ?> </div> <div class ="span2"> <?php echo CHtml::label("Дата", 'Date'); ?> <?php echo CHtml::textField('Date', "", array('class' => 'span12 datepicker')); ?> </div>
?> <?php //echo $model->username ?> <?php echo $form->hiddenField($model, 'username', array('size' => 30, 'maxlength' => 30)); ?> <br> <?php echo $form->error($model, 'username'); ?> </div> <div class="row"> <?php echo Chtml::label('Current Password', 'oldpw'); ?> <?php //echo Chtml::textField("aoldpw",'',array('size'=>60,'maxlength'=>64)); ?> <?php echo Chtml::passwordField("oldpw", '', array('size' => 60, 'maxlength' => 64)); ?> </div> <div class="row"> <?php echo CHtml::label('New Password', 'password'); ?> <?php echo CHtml::passwordField("password", '', array('size' => 60, 'maxlength' => 64)); ?>
<?php } ?> <div class="form-group"> <?php echo Chtml::label('', '', array('class' => 'col-md-3 control-label')); ?> <div class="col-md-9"> <?php echo CHtml::fileField('files[]', Yii::t('app', 'Выберите файл')); ?> </div> </div> <div class="form-group"> <?php echo Chtml::label('', '', array('class' => 'col-md-3 control-label')); ?> <div class="col-md-9"> <?php echo CHtml::link(Yii::t('app', 'Загрузить еще'), 'javascript:void(0);', array('id' => 'createFileUpload', 'onClick' => 'createFileUpload()')); ?> </div> </div> </div> <div class="form-actions"> <?php echo CHtml::submitButton($model->isNewRecord ? Yii::t('app', 'Создать') : Yii::t('app', 'Сохранить'), array('class' => 'btn green')); ?> <a href="<?php echo $this->createUrl('index'); ?>
</div> <div class="row"> <?php echo $form->labelEx($model, 'validez'); ?> <?php echo $form->textField($model, 'validez', array('size' => 3, 'maxlength' => 3)); ?> <?php echo $form->error($model, 'validez'); ?> </div> <div class="row"> <?php echo Chtml::label('Solicitud', 'Solicitud'); ?> <?php //echo Chtml::textField('ddd',$model->peticion_solpe->numero,array('size'=>16,'maxlength'=>16)); ?> <?php echo CHtml::link($model->peticion_solpe->numero, array('solpe/update', 'id' => $model->peticion_solpe->id)); ?> </div> <div class="row"> <?php if (!$model->isnewRecord) { ?> <?php
</div> </div> <!-- Статистика заяв на старші курси --> <div class="well well-large span5"> <h3 id="elderstat">Статистика заяв на старші курси</h3> <div class="form" id="elderstat_block" style="display:none;"> <?php $statdetail_act = Yii::app()->createUrl("statistic/stat/statgraduated"); /* @var $statdetail_form TbActiveForm */ $statdetail_form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'statgr', 'enableAjaxValidation' => false, 'method' => "GET", 'action' => $statdetail_act)); ?> <div class="row-fluid"> <div class="span12"> <?php echo Chtml::label("ОКР", 'QualificationID'); ?> <?php echo CHtml::dropDownList('QualificationID', "", array("3" => "Спеціаліст", "2" => "Магістр"), array('empty' => '', 'class' => 'span12')); ?> </div> </div> <div class="row-fluid"> <div class='span6'> <?php echo CHtml::label("Від дати", 'DateFrom'); ?> <?php echo CHtml::textField('DateFrom', date('d.m.Y'), array('class' => 'datepicker span12')); ?> </div>