public function createUrl($route, $params = array(), $ampersand = '&') { if ($route[0] != '/' && !isset($params['rec']) && isset($this->actionParams['rec'])) { $params['rec'] = $this->actionParams['rec']; } return parent::createUrl($route, $params, $ampersand); }
public function actionRegistro() { $modelAlumnos = new Alumno(); if (isset($_POST['Alumno'])) { try { $usuario = new Usuario(); $usuario->perfil = 3; $usuario->nombreUsuario = $_POST['Alumno']['identificacion']; $usuario->password = md5($_POST['Alumno']['identificacion']); if ($usuario->save()) { $alumno = new Alumno(); $alumno->attributes = $_POST['Alumno']; $alumno->idUsuario = $usuario->idUsuario; if (!$alumno->save()) { Yii::app()->user->setFlash('alert alert-danger', "Alumno no fue creado"); } else { Yii::app()->user->setFlash('alert alert-success', "Alumno fue creado con éxito"); $this->redirect(CController::createUrl('/sitio/index')); } } else { Yii::app()->user->setFlash('alert alert-danger', "Alumno no fue creado"); } } catch (Exception $e) { Yii::app()->user->setFlash('alert alert-danger', "Alumno no fue creado"); } } $this->render('registroEstudiantes', array('modelAlumnos' => $modelAlumnos)); }
public function sendRequest($hole, $user) { if (!$hole->isMoscow) { return false; } $client = $this->client; Yii::app()->request->baseUrl = Yii::app()->request->hostInfo; $pictures = array(); foreach ($hole->pictures_fresh as $pict) { $pictures[] = array('name' => $pict->filename, 'fileType' => $pict->extension, 'content' => $pict->binary); } $answer = $client->RequestNew(array('request' => array('hidden' => false, 'informer' => array('name' => $this->name, 'surname' => $this->surname, 'fatherName' => $this->fatherName, 'phoneNumber' => $this->phoneNumber, 'email' => $this->email, 'notifyViaEmail' => $this->notifyViaEmail, 'notifyViaSms' => $this->notifyViaSms, 'address' => array('fullAddress' => $this->address)), 'category' => array('code' => $hole->type->dorogimos_id), 'details' => $this->details, 'address' => array('latitude' => $hole->LATITUDE, 'longitude' => $hole->LONGITUDE, 'fullAddress' => $this->holeAddress, 'webLink' => CController::createUrl('/holes/view', array('id' => $hole->ID))), 'pictures' => $pictures))); if ($answer->successful) { $holeRequest = new HoleRequests(); $holeRequest->hole_id = $hole->ID; $holeRequest->user_id = $user->id; $holeRequest->date_sent = time(); $holeRequest->response_requestid = $answer->request->requestNumber; $holeRequest->type = 'dorogimos'; $holeRequest->gibdd_id = 0; if ($holeRequest->save()) { return true; } //else print_r($holeRequest->errors); die(); } else { $this->errortext = $answer->failReason; //print_r($answer); die(); } return false; }
/** * Creates the URL suitable for pagination. * This method is mainly called by pagers when creating URLs used to * perform pagination. The default implementation is to call * the controller's createUrl method with the page information. * You may override this method if your URL scheme is not the same as * the one supported by the controller's createUrl method. * @param CController $controller the controller that will create the actual URL * @param integer $page the page that the URL should point to. This is a zero-based index. * @return string the created URL */ public function createPageUrl($controller, $page) { $params = $this->params === null ? $_GET : $this->params; if ($page > 0) { // page 0 is the default $params[$this->pageVar] = $page + 1; } else { unset($params[$this->pageVar]); } if ($controller->id == 'categories') { $id = $params['id']; unset($params['id']); return $controller->createUrl($controller->route . '/id/' . $id, $params); } else { return $controller->createUrl($this->route, $params); } }
/** * This is the default 'index' action that is invoked * when an action is not explicitly requested by users. */ public function actionIndex() { if (Yii::app()->user->isGuest) { $this->redirect(CController::createUrl('login')); } // renders the view file 'protected/views/site/index.php' // using the default layout 'protected/views/layouts/main.php' $this->render('index'); }
/** * @see CController::createUrl() */ public function createUrl($route, $params = array(), $ampersand = '&') { if (strlen($route) >= 0 && $route[0] == '#') { if (($query = Yii::app()->getUrlManager()->createPathInfo($params, '=', $ampersand)) !== '') { return $route . '?' . $query; } else { return $route; } } else { return parent::createUrl($route, $params, $ampersand); } }
/** * Displays the contact page */ public function actionContact() { $model = CustomPage::LoadByRequestUrl('contact-us'); $this->pageTitle = $model->PageTitle; $this->pageDescription = $model->meta_description; $this->breadcrumbs = array($model->title => $model->RequestUrl); $this->layout = "//layouts/column" . $model->column_template; $ContactForm = new ContactForm(); if (isset($_POST['ContactForm'])) { $ContactForm->attributes = $_POST['ContactForm']; if ($ContactForm->validate()) { $objEmail = new EmailQueue(); if (!Yii::app()->user->isGuest) { $objCustomer = Customer::GetCurrent(); $objEmail->customer_id = $objCustomer->id; $ContactForm->fromName = $objCustomer->mainname; $ContactForm->fromEmail = $objCustomer->email; } $strHtmlBody = $this->renderPartial('/mail/_contactform', array('model' => $ContactForm), true); $strSubject = Yii::t('email', 'Contact Us:') . $ContactForm->contactSubject; $objEmail->htmlbody = $strHtmlBody; $objEmail->subject = $strSubject; $orderEmail = _xls_get_conf('ORDER_FROM', ''); $objEmail->to = empty($orderEmail) ? _xls_get_conf('EMAIL_FROM') : $orderEmail; $objHtml = new HtmlToText(); //If we get back false, it means conversion failed which 99.9% of the time means improper HTML. $strPlain = $objHtml->convert_html_to_text($strHtmlBody); if ($strPlain !== false) { $objEmail->plainbody = $strPlain; } if (!$objEmail->save()) { Yii::log("Error creating email " . print_r($objEmail, true) . " " . print_r($objEmail->getErrors(), true), 'error', 'application.' . __CLASS__ . "." . __FUNCTION__); } Yii::app()->user->setFlash('success', Yii::t('email', 'Message sent. Thank you for contacting us. We will respond to you as soon as possible.')); //Attempt to use an AJAX call to send the email. If it doesn't work, the Download process will catch it anyway. $jsScript = "\$.ajax({url:\"" . CController::createUrl('site/sendemail', array("id" => $objEmail->id)) . "\"});"; Yii::app()->clientScript->registerScript('sendemail', $jsScript, CClientScript::POS_READY); } else { Yii::app()->user->setFlash('error', Yii::t('cart', 'Please check your form for errors.')); if (YII_DEBUG) { Yii::app()->user->setFlash('error', print_r($ContactForm->getErrors(), true)); } } } if (!Yii::app()->user->isGuest) { $objCustomer = Customer::GetCurrent(); $ContactForm->fromName = $objCustomer->mainname; $ContactForm->fromEmail = $objCustomer->email; } $this->canonicalUrl = $model->canonicalUrl; $this->render('contact', array('ContactForm' => $ContactForm, 'model' => $model)); }
/** * @param $model - profile model * @param $field - profile fields model item * @param $params - htmlOptions * @return string */ public function editAttribute($model, $field, $htmlOptions = array()) { $list = array(); if ($this->params['emptyField']) { $list[0] = $this->params['emptyField']; } $models = CActiveRecord::model($this->params['modelName'])->findAll(); foreach ($models as $m) { $list[$m->getAttribute($m->tableSchema->primaryKey)] = $this->params['optionName'] ? $m->getAttribute($this->params['optionName']) : $m->getAttribute($m->tableSchema->primaryKey); } return CHtml::activeDropDownList($model, $field->varname, $list, $htmlOptions = array('ajax' => array('type' => 'POST', 'url' => CController::createUrl('/fm/fields/getDroDownDepValues'), 'data' => array('model' => $this->params['modelDestName'], 'field_dest' => $this->params['destField'], 'varname' => $field->VARNAME, $field->varname => 'js:this.value', 'optionDestName' => $this->params['optionDestName']), 'success' => 'function(data){ $("#ajax_loader").hide(); $("#Profile_' . $this->params['destField'] . '").html(data) }', 'beforeSend' => 'function(){ $("#ajax_loader").fadeIn(); }'))); }
/** * @return string|void */ public function createUrl($route, $params = array(), $ampersand = '&') { if ($route == '/site/index') { return '/index.php' . self::buildQuery($params); } elseif ($route == '/wiki/view' && $params['pageName']) { $pageName = $params['pageName']; unset($params['pageName']); return '/wiki/' . $pageName . self::buildQuery($params); } elseif ($route == '/wiki/index') { return '/list' . self::buildQuery($params); } elseif ($route == '/site/page' && $params['view']) { return '/page/' . $params['view']; } elseif ($route == '/wiki/search') { return '/search' . self::buildQuery($params); } return parent::createUrl($route, $params, $ampersand); }
/** * @param string $route * @param array $params * @param string $ampersand * @return string */ public function createUrl($route, $params = array(), $ampersand = '&') { $p = explode("/", $route); if ($p[0] != "infos") { if (!isset($params["veranstaltung_id"]) && $this->veranstaltung !== null) { $params["veranstaltung_id"] = $this->veranstaltung->url_verzeichnis; } if (MULTISITE_MODE && !isset($params["veranstaltungsreihe_id"]) && $this->veranstaltungsreihe != null) { $params["veranstaltungsreihe_id"] = $this->veranstaltungsreihe->subdomain; } if ($route == "veranstaltung/index" && !is_null($this->veranstaltungsreihe) && strtolower($params["veranstaltung_id"]) == strtolower($this->veranstaltungsreihe->aktuelle_veranstaltung->url_verzeichnis)) { unset($params["veranstaltung_id"]); } if (in_array($route, array("veranstaltung/ajaxEmailIstRegistriert", "veranstaltung/anmeldungBestaetigen", "veranstaltung/benachrichtigungen", "veranstaltung/impressum", "veranstaltung/login", "veranstaltung/logout", "/admin/index/reiheAdmins", "/admin/index/reiheVeranstaltungen"))) { unset($params["veranstaltung_id"]); } } return parent::createUrl($route, $params, $ampersand); }
/** * Displays a particular model. * @param integer $id the ID of the model to be displayed */ public function actionFilaProducto() { $model = new FacturasProductos(); //echo '<tr>'; $form = $this->beginWidget('booster.widgets.TbActiveForm', array('id' => 'facturas-productos-fila', 'enableAjaxValidation' => false)); //echo '<div id="retorno">'; echo '<td>'; echo '<div class="form-group">'; $list = CHtml::listData(PresupuestoPartidas::model()->findAllByAttributes(array('ente_organo_id' => Usuarios::model()->findByPk(Yii::app()->user->getId())->enteOrgano->ente_organo_id, 'anho' => Yii::app()->params['trimestresFechas'][Yii::app()->session['trimestreSeleccionado']]['anho'])), 'partida_id', function ($presuPartida) { return $presuPartida->partida->etiquetaPartida(); }); echo CHtml::label('Seleccionar partida', 'partida'); echo "<br>"; $this->widget('booster.widgets.TbSelect2', array('asDropDownList' => true, 'model' => $model, 'attribute' => 'presupuesto_partida_id', 'data' => $list, 'htmlOptions' => array('id' => 'partida', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('facturasProductos/buscarProductosPartida'), 'update' => '#producto')), 'options' => array('placeholder' => 'Partida', 'width' => '40%', 'tokenSeparators' => array(',', ' ')))); echo '</div>'; echo '</td>'; echo '<td>'; echo '<div class="form-group">'; echo CHtml::label('Seleccionar producto', 'producto'); echo "<br>"; $this->widget('booster.widgets.TbSelect2', array('asDropDownList' => true, 'model' => $model, 'attribute' => 'producto_id', 'data' => array(), 'htmlOptions' => array('id' => 'producto'), 'options' => array('placeholder' => 'Producto', 'width' => '40%', 'tokenSeparators' => array(',', ' ')))); echo '</div>'; echo '</td>'; echo '<td>'; echo $form->textFieldGroup($model, 'costo_unitario', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 38)))); echo '</td>'; echo '<td>'; echo $form->textFieldGroup($model, 'cantidad_adquirida', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5')))); echo '</td>'; echo '<td>'; $list = CHtml::listData(Iva::model()->findAll(), 'id', 'porcentaje'); echo $form->dropDownListGroup($model, 'iva_id', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => $list, 'htmlOptions' => array()))); echo '</td>'; echo '</div>'; $this->endWidget(); //echo '</tr>'; }
?> <span class="status"> </span> <?php echo $form->error($address, 'student_address_p_country'); ?> </div> <div class="row-left"> <?php echo $form->labelEx($address, 'student_address_p_state'); ?> <?php if (isset($address->student_address_p_state)) { echo $form->dropDownList($address, 'student_address_p_state', CHtml::listData(State::model()->findAll(array('condition' => 'country_id=' . $address->student_address_p_country)), 'state_id', 'state_name'), array('prompt' => '-----------Select-----------', 'tabindex' => 10, 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('dependent/UpdateStudPCities'), 'update' => '#StudentAddress_student_address_p_city'))); } else { echo $form->dropDownList($address, 'student_address_p_state', array(), array('prompt' => '-----------Select-----------', 'tabindex' => 10, 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('dependent/UpdateStudPCities'), 'update' => '#StudentAddress_student_address_p_city'))); } ?> <span class="status"> </span> <?php echo $form->error($address, 'student_address_p_state'); ?> </div> </div> <div class="row"> <div class="row-left"> <?php echo $form->labelEx($address, 'student_address_p_city');
src="<?php echo Yii::app()->request->baseUrl . '/js_plugins/ajaxform/images/icons/cross_grey_small.png'; ?> " title="Close this notification" alt="close"/></a> <div> <?php echo $val_error_msg; ?> </div> </div> <div id="ajax-form" class='form'> <?php $formId = 'contact-groups-form'; $actionUrl = $model->isNewRecord ? CController::createUrl('contactgroups/ajax_create') : CController::createUrl('contactgroups/ajax_update'); $form = $this->beginWidget('CActiveForm', array('id' => 'contact-groups-form', 'action' => $actionUrl, 'enableClientValidation' => true, 'focus' => array($model, 'name'), 'errorMessageCssClass' => 'input-notification-error error-simple png_bg', 'clientOptions' => array('validateOnSubmit' => true, 'validateOnType' => false, 'afterValidate' => 'js_afterValidate', 'errorCssClass' => 'err', 'successCssClass' => 'suc', 'afterValidate' => 'js:function(form,data,hasError){ $.js_afterValidate(form,data,hasError); }', 'errorCssClass' => 'err', 'successCssClass' => 'suc', 'success' => 'function(){alert(1);}', 'afterValidateAttribute' => 'js:function(form, attribute, data, hasError){ $.js_afterValidateAttribute(form, attribute, data, hasError); }'))); ?> <?php echo $form->errorSummary($model, ' <div style="font-weight:bold">Please correct these errors:</div> ', NULL, array('class' => 'errorsum notification errorshow png_bg')); ?> <p class="note">Fields with <span class="required">*</span> are required.</p> <div class="row"> <?php echo $form->labelEx($model, 'group_name');
<?php $pl_details = $plans_list = array(); $sql = "SELECT * FROM {{view_panel_list_master}} WHERE panel_list_id = '" . $_SESSION['plid'] . "'"; $pl_details = Yii::app()->db->createCommand($sql)->query()->readAll(); $sql = "SELECT * FROM {{panellist_answer}} WHERE panellist_id = '" . $_SESSION['plid'] . "'"; $pl_answer = Yii::app()->db->createCommand($sql)->query()->readAll(); foreach ($pl_answer as $key => $value) { foreach ($value as $ky => $val) { $plans_list[$ky] = $val; } } if (count($pl_answer) > 0) { ?> <div style="float:right;"> <a href="<?php echo CController::createUrl('pl/home/sa/edit_profile'); ?> " class="nav-cta login"> <input type="button" value="Edit Profile"> </a> <!-- <a href="security_question" class="nav-cta login">Security Questions</span></a>--> </div> <section class="container w90_per"> <div class="box w98_per effect7"> <h3>Registration Information</h3> <p> <table class="InfoForm" style="width: 95%; margin: 0px auto;"> <tr class="even"> <td>Email Address</td> <td><?php
<?php $form = $this->beginWidget('CActiveForm', array('id' => 'lugares-form', 'enableAjaxValidation' => false)); ?> <div class="row"> <?php echo $form->labelEx($model, 'n_direc'); if (!$model->isNewRecord) { $criterial = new CDbCriteria(); $criterial->condition = 'c_hcod=:prove'; $criterial->params = array(':prove' => $model->codpro); $datos = CHtml::listData(Direcciones::model()->findAll($criterial), 'n_direc', 'c_direc'); } echo $form->dropDownList($model, 'n_direc', $model->isNewRecord ? array() : $datos, array('ajax' => array('type' => 'POST', 'url' => CController::createUrl('Lugares/Verlugares'), 'update' => '#primo'), 'prompt' => 'Seleccione una organizacion', 'disabled' => $model->isNewRecord ? '' : 'disabled')); ?> </div> <div id="primo" style ="width:250px"> </div> <div class="row"> <?php echo $form->labelEx($model, 'deslugar'); ?> <?php echo $form->textField($model, 'deslugar', array('size' => 30, 'maxlength' => 30)); ?> <?php echo $form->error($model, 'deslugar'); ?> </div>
<span class="status"> </span> <?php echo $form->error($model, 'country'); ?> </div> <div class="row-right"> <?php echo $form->labelEx($model, 'state'); ?> <?php if (isset($model->state)) { echo $form->dropDownList($model, 'state', CHtml::listData(State::model()->findAll(array('condition' => 'country_id=' . $model->country)), 'state_id', 'state_name'), array('prompt' => 'Select State', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('Organization/UpdateCities'), 'update' => '#Organization_city'))); } else { echo $form->dropDownList($model, 'state', array(), array('prompt' => 'Select State', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('Organization/UpdateCities'), 'update' => '#Organization_city'))); } ?> <span class="status"> </span> <?php echo $form->error($model, 'state'); ?> </div> </div> <div class="row"> <div class="row-left"> <?php echo $form->labelEx($model, 'city'); ?> <?php if (isset($model->city)) {
<div data-role='main'> <div class='ui-content' data-role='content' role='main'> Contamos con <?php echo $objSaldo->saldoUnidad ?> unidad(es) disponible(s) para entrega inmediata. Si necesitas mas unidades, estarán disponibles en <?php echo Yii::app()->shoppingCart->getDeliveryStored() ?> hrs y debes "configurar tu pedido", de lo contrario solo debes dar clic en "Cancelar" y adicionar al carro la cantidad disponible. <a class='ui-btn ui-btn-r ui-corner-all ui-shadow cprod_add_car_spcl' href="<?php echo CController::createUrl('/catalogo/bodega', array('producto' => $objProducto->codigoProducto,'ubicacion' => $cantidadUbicacion, 'bodega'=> $cantidadBodega)) ?>" data-ajax='false'>Configurar pedido</a> <a class='ui-btn ui-corner-all ui-shadow' data-rel='back' href='#'>Cancelar</a> </div> </div>
?> <?php echo $form->dropDownList($model, 'type', $model->getArrayTypes(), array('prompt' => '----', "class" => "tooltipster", "title" => Yii::t('common', 'typeQuestion'))); ?> <?php echo $form->error($model, 'type'); ?> </div> </div> <div> <div class="col-lg-6"> <?php echo $form->labelEx($model, 'idQuestionGroup'); ?> <?php echo $form->dropDownList($model, 'idQuestionGroup', $model->getArrayGroups(), array('prompt' => '----', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('formulaire/dynamicquestions&id=' . $model->questionnaire->_id), 'update' => '#' . CHtml::activeId($model, 'idQuestionBefore')), "class" => "tooltipster", "title" => Yii::t('common', 'groupQuestion'))); ?> <?php echo $form->error($model, 'idQuestionGroup'); ?> </div> <div class="col-lg-6"> <?php echo $form->labelEx($model, 'idQuestionBefore'); ?> <?php echo $form->dropDownList($model, 'idQuestionBefore', array()); ?> <?php echo $form->error($model, 'idQuestionBefore'); ?>
<?php } ?> <table style="width: 100%"> <tr> <td><?php echo $form->labelEx($model, 'status'); ?> </td> <td> <?php if ($others['readOnly'] == true) { echo $form->textField($model, 'status', array('value' => $model->status == 'Yes' ? 'Member' : $model->status, 'required' => true, 'style' => 'text-align:center', 'readonly' => $others['readOnly'])); } else { echo $form->dropDownList($model, 'status', $array, array('prompt' => '-- Select An Option --', 'required' => true, 'style' => 'text-align:center', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('memberWithdrawal/renderPartialForm'), 'update' => '#fomu'))); echo $form->hiddenField($model, 'member'); } ?> </td> <td> <?php echo $form->error($model, 'status'); ?> </td> </tr> </table> <?php $this->renderPartial('application.views.loanApplications.saved'); ?>
<li class="error_message"><?php echo $form->error($model, 'state_id'); ?> </li> </ul> <div id="city_content"> <ul> <li><span><?php echo $form->labelEx($model, 'city_id'); ?> </span> <?php echo $form->dropdownList($model, 'city_id', CHtml::listData(GeoCity::model()->findAll('state_id=:state_id', array(':state_id' => $model->state_id)), 'id', 'city'), array('empty' => 'All', 'class' => 'slctbox', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('/location/locality/getList/page/project'), 'update' => '#locality_content', 'data' => 'js:jQuery(this).serialize()'))); ?> </li> <li class="error_message"><?php echo $form->error($model, 'city_id'); ?> </li> </ul> <div id="locality_content"> <ul> <li><span><?php
} else { $cls = 'class="even"'; echo '<tr ' . $cls . '> <td>' . $value['id'] . '</td> <td>' . $value['subject'] . '</td> <td>   ' . $value['body'] . '</td> <td>' . $value['created_datetime'] . '</td> <td>'; echo "<div id='your-form-block-id'>"; echo CHtml::beginForm(); echo CHtml::link('Reply', array('/pl/home/sa/message_history/id/' . $value['id'] . '/email_to/' . $value['email_from'] . '/subject/' . $value['subject']), array('class' => 'class-link')); echo CHtml::endForm(); echo "</div>"; echo '</td> <td> <a title ="Click change to status Read" href="' . CController::createUrl('pl/home/sa/message_status/s/Read/id/' . $value['id']) . '">' . $value['status'] . '</a> </td> <tr>'; } $odd = !$odd; } } else { echo '<tr class="odd"> <td colspan="6" style="text-align: center;">No Message Available</td> <tr>'; } ?> </table> </p> </div> </section>
<div class="row"> <?php echo $form->labelEx($model, 'punit'); ?> <?php echo $form->textField($model, 'punit'); ?> <?php echo $form->error($model, 'punit'); ?> <?php echo Chtml::ajaxLink(Chtml::image(Yii::app()->getTheme()->baseUrl . Yii::app()->params["rutatemaimagenes"] . "package.png"), CController::createUrl($this->id . '/cargaprecios'), array('type' => 'POST', 'url' => CController::createUrl($this->id . '/cargaprecios'), "data" => array("codigoprove" => "js:codigoprove.value", "codigomaterial" => "js:Docompratemp_codart.value"), "update" => "#zona_precios")); ?> </div> <div class="row"> <div id="zona_precios"></div> </div>
?> <span class="status"> </span> <?php echo $form->error($model, 'student_transaction_branch_id'); ?> </div> <div class="row-right"> <?php echo $form->labelEx($model, 'student_transaction_division_id'); ?> <?php if (isset($model->student_transaction_division_id)) { echo $form->dropDownList($model, 'student_transaction_division_id', CHtml::listData(Division::model()->findAll(array('condition' => 'academic_name_id=' . $model->student_academic_term_name_id . ' and branch_id=' . $model->student_transaction_branch_id . ' and division_organization_id=' . $org_id)), 'division_id', 'division_code'), array('prompt' => '-----------Select-----------', 'tabindex' => 12, 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('dependent/getStudbatch'), 'update' => '#StudentTransaction_student_transaction_batch_id'))); } else { echo $form->dropDownList($model, 'student_transaction_division_id', array(), array('prompt' => '-----------Select-----------', 'tabindex' => 12, 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('dependent/getStudbatch'), 'update' => '#StudentTransaction_student_transaction_batch_id'))); } ?> <span class="status"> </span> <?php echo $form->error($model, 'student_transaction_division_id'); ?> </div> </div> <div class="row"> <div class="row-left"> <?php echo $form->labelEx($model, 'student_transaction_batch_id'); ?> <?php
id="editIco" title="<?php echo Yii::t('module', '0373'); ?>"/> </a> </div> <?php }?> <a name="list"> </a> <div onclick="showForm();"> <?php $form=$this->beginWidget('CActiveForm', array( 'id'=>'ajaxaddlecture-form', )); ?> <a href="#lessonForm"> <?php echo CHtml::hiddenField('idmodule', $module->module_ID); ?> <?php echo CHtml::ajaxSubmitButton('', CController::createUrl('module/lecturesupdate'), array('update' => '#lessonForm'), array('id' => 'addLecture','title'=>Yii::t('module', '0374'))); ?> </a> <?php $this->endWidget(); ?> </div> <h2><?php echo Yii::t('module', '0225'); ?></h2> <?php $this->widget('zii.widgets.grid.CGridView', array( 'id'=>'lectures-grid', 'dataProvider' => $dataProvider, 'emptyText' => Yii::t('module', '0375'), 'columns' => array( array( 'class'=>'CButtonColumn', 'template'=>'{up}{down}{delete}', 'headerHtmlOptions'=>array('style'=>'display:none'),
<div class="wide form"> <?php $form = $this->beginWidget('CActiveForm', array('action' => Yii::app()->createUrl($this->route), 'method' => 'get', 'htmlOptions' => array('class' => 'form-horizontal'))); ?> <table> <tbody> <tr> <td> <?php echo $form->label($model, 'subdiv'); ?> <?php echo $form->dropDownList($model, 'subdiv', CHtml::listData(Subdiv::model()->findAll(), 'id', 'name'), array('prompt' => 'Alegeți', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('tDb/Dynamicresp'), 'update' => '#' . CHtml::activeId($model, 'responsabil')))); ?> </td> <td> <?php echo $form->label($model, 'responsabil'); ?> <?php echo $form->DropDownList($model, 'responsabil', CHtml::listData(Responsabil::model()->findAllByAttributes(array('subdiv' => $model->subdiv)), 'id', 'fullname'), array('prompt' => 'Alegeți')); ?> </td> </tr> <tr> <td> <?php echo $form->label($model, 'date_reg'); ?> <?php
<td> </td> <td style="width:100px;"><strong><?php echo Yii::t('report', 'Batch'); ?> </strong></td> <td> </td> <?php $criteria = new CDbCriteria(); $criteria->compare('is_deleted', 0); ?> <td> <?php if ($batch_id != NULL) { echo CHtml::dropDownList('batch', '', CHtml::listData(Batches::model()->findAll($criteria), 'id', 'coursename'), array('prompt' => 'Select', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('/report/default/batch'), 'update' => '#exam_id', 'data' => 'js:$(this).serialize()'), 'style' => 'width:270px;', 'options' => array($batch_id => array('selected' => true)))); } else { echo CHtml::dropDownList('batch', '', CHtml::listData(Batches::model()->findAll($criteria), 'id', 'coursename'), array('prompt' => 'Select', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('/report/default/batch'), 'update' => '#exam_id', 'data' => 'js:$(this).serialize()'), 'style' => 'width:270px;')); } ?> </td> </tr> <tr> <td colspan="4"> </td> </tr> <tr> <td> </td> <td valign="top"><strong><?php echo Yii::t('report', 'Examination'); ?> </strong></td> <td> </td>
<?php echo $form->textField($model, 'city'); ?> <?php echo $form->error($model, 'city'); ?> </div> </div> <div class="row-fluid"> <div class="span5"> <?php echo $form->labelEx($model, 'country_id'); ?> <?php echo $form->dropDownList($model, 'country_id', $checkout->getCountries(), array('ajax' => array('type' => 'POST', 'url' => CController::createUrl('cart/getdestinationstates'), 'update' => '#' . CHtml::activeId($model, 'state_id'), 'data' => 'js:{"country_id": $("#' . CHtml::activeId($model, 'country_id') . ' option:selected").val()}'))); ?> <?php echo $form->error($model, 'country_id'); ?> </div> </div> <div class="row-fluid"> <div id="state_id" class="span5"> <?php echo $form->labelEx($model, 'state_id'); ?> <?php echo $form->dropDownList($model, 'state_id', $checkout->getStates('myaccount', $model->country_id), array('prompt' => '--')); ?>
<h1>Crear Relación de Bienes Faltantes</h1> <h2>Paso 2: Especificar Bienes Muebles Faltantes</h2> <?php echo $this->renderPartial('_search_bm', array('bien' => $bien, 'fbmid' => $_GET['id'])); ?> <div style="background-color:#CDE; padding: 5px; text-align:right;"> <div id="data" style="min-height:100px;"> <?php $this->renderPartial('_content'); ?> </div> <?php $options = array('update' => '#data2', 'type' => 'post', 'data' => array('fbmid' => $_GET['id'])); echo CHtml::ajaxButton('Agregar', CController::createUrl('fbm3/AgregarAjax'), $options, array('class' => 'button blue')); ?> </div> <div style="margin:10px 0"> <div class="table-grey" style="min-height:150px"> <h2>Bienes Muebles Adscritos</h2> <div id="data2"> <?php $this->renderPartial('_content2'); ?> </div> </div> <script> function prueba() { <?php echo CHtml::ajax(array('type' => 'POST', 'url' => array("fbm3/ActualizarAjax"), 'update' => '#data2', 'data' => array('fbmid' => $_GET['id'])));
//foreach ($vendor_arr_single as $val) { ?> <table style="width: 80%; margin: 0px auto;"> <tr> <td style="text-align: right;"> <label for='panel'><?php $clang->eT("Panel : "); ?> </label> </td> <td> <?php $sql = "SELECT * FROM {{view_company}} WHERE company_type LIKE '%V%'"; $result = Yii::app()->db->createCommand($sql)->query(); $vendor_list = CHtml::listData($result, 'contact_id', 'company_name'); echo CHtml::dropDownList('panel', $vendor_arr_single[0]['vendor_id'], $vendor_list, array('prompt' => 'Select Vendor', 'ajax' => array('type' => 'POST', 'data' => array('client_id' => 'js:this.value', 'vendor' => 'vendor'), 'url' => CController::createUrl('admin/project/sa/selectclientcontact'), 'update' => '#vendor_contact'), 'required' => true)); ?> <input type='hidden' id='project_id' name='project_id' value="<?php echo $project_id; ?> "/> <input type='hidden' id='vendor_project_id' name='vendor_project_id' value="<?php echo $vendor_project_id; ?> "/> </td> <td style="text-align: right;"> <label for='vendor_contact'><?php $clang->eT("Vendor Contact : "); ?> </label>
$("#link").removeClass("hidden"); } } function getBD(){ //var id = document.getElementById("txt_name").value; var url = window.location.search; var id = url.substring(11); var idJSON = JSON.stringify(id); $.ajax({ data: {"id": idJSON}, type: "POST", url: <?php echo "'".CController::createUrl('GetInfoBD')."'";?>, }).done(function( result ) { //$('#stage').text(result); console.log(result); restoreInformationBD(result); }).error( function(XMLHttpRequest, textStatus, errorThrown){ console.log(XMLHttpRequest+" "+" "+errorThrown); }); } </script> <?php