public static function DropDown() { $res = array(); foreach (Languages::model()->findAll() as $record) { $res[$record->idLanguages] = $record->LanguagesName; } return $res; }
public static function GetLngArray() { /* @var $item Languages */ $lngArr = array(); //if admin controller - arrington controller if (Yii::app()->controller->id == 'panel') { $all = Languages::model()->findAllByAttributes(array('status' => Constants::STATUS_VISIBLE), array('order' => 'priority ASC')); } elseif (Yii::app()->controller->id == 'lmt') { $all = LmtLanguages::model()->findAllByAttributes(array('status' => Constants::STATUS_VISIBLE), array('order' => 'priority ASC')); } else { $all = LuxLanguages::model()->findAllByAttributes(array('status' => Constants::STATUS_VISIBLE), array('order' => 'priority ASC')); } foreach ($all as $item) { $lngArr[$item->notification] = $item->prefix; } if (empty($lngArr) || count($lngArr) == 0) { $lngArr[strtoupper(DEFAULT_LANGUAGE)] = DEFAULT_LANGUAGE; } return $lngArr; }
public function run() { $model = new Filter(); $model->city = $this->city; $model->date_n = $this->date_n; $model->time_n = $this->time_n; $model->language = $this->language; $model->guide = $this->guide; /*CITY*/ $citys = SegCities::model()->findAll(); /*TIME*/ $times = SegStarttimes::model()->findAll(); /*LANGUAGE*/ $languages = Languages::model()->findAll(); /*GUIDE*/ $criteria = new CDbCriteria(); $criteria->condition = 'cities_id=:cities_id'; $criteria->params = array(':cities_id' => $this->city); //$criteria->join = 'LEFT JOIN `users` ON (`users`.`id` = `t`.`users_id`)'; $guides_link = SegGuidesCities::model()->findAll($criteria); $guides = array(); $i = 0; foreach ($guides_link as $item) { $criteria_1 = new CDbCriteria(); $criteria_1->condition = 'id=:id'; $criteria_1->params = array(':id' => $item->users_id); $guides_contact = User::model()->find($criteria_1); // print_r($guides_contact); $criteria_2 = new CDbCriteria(); $criteria_2->condition = 'idcontacts=:idcontacts'; $criteria_2->params = array(':idcontacts' => $guides_contact->id_contact); $guides[$i] = SegContacts::model()->find($criteria_2); $i++; } $this->render('dopMenuFilter', array('citys' => $citys, 'times' => $times, 'languages' => $languages, 'guides' => $guides, 'model' => $model)); }
foreach($data as $d=>$row) { $langss=$row['languages_known1']; } $langArr = array(); $as=explode(',',$langss); foreach($as as $ai) { $langArr[$ai] = array('selected'=>true); } echo $form->labelEx($lang,'Languages Known',array('style'=>'width:143px')); echo "</td><td>"; echo $form->dropDownList($lang, 'languages_known1[]', CHtml::listData(Languages::model()->findAll(), 'languages_name', 'languages_name'), array( 'class'=>'chosen-select input-xxlarge', 'multiple'=>'multiple', 'maxlength'=>200, 'options' => $langArr, )); echo "</td><td><span class=\"status\" style='margin-left:-4px'> </span></td></tr></table>"; ?> <?php echo $form->error($lang,'languages_known1'); ?> </div> </div> <div class="row"> <div class = "row-left"> <?php echo $form->labelEx($info,'passport_exp_date'); ?> <?php if($info->passport_exp_date != '' && $info->passport_exp_date != 0000-00-00)
echo $form->labelEx($model, 'organizationID'); ?> <?php echo CHtml::activeDropDownList($model, 'organizationID', CHtml::listData(Organizations::model()->findAll(), 'organizationID', 'organizationName'), array('empty' => 'Select Organization')); ?> <?php echo $form->error($model, 'organizationID'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'languageID'); ?> <?php echo CHtml::activeDropDownList($model, 'languageID', CHtml::listData(Languages::model()->findAll(), 'languageID', 'languageName'), array('empty' => 'Select Language')); ?> <?php echo $form->error($model, 'languageID'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'personnelTypeID'); ?> <?php echo CHtml::activeDropDownList($model, 'personnelTypeID', CHtml::listData(PersonnelTypes::model()->findAll(), 'personnelTypeID', 'personnelTypeName'), array('empty' => 'Select Personnel Type')); ?> <?php echo $form->error($model, 'personnelTypeID');
<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array('name' => 'SegScheduledTours[date]', 'attribute' => 'date', 'model' => $model, 'options' => array('showAnim' => 'fold', 'dateFormat' => 'dd.mm.yy'), 'htmlOptions' => array('class' => 'form-control-date-filter'))); // echo $form->textField($model,'date'); ?> </div> </div> <div class="row-filter"> <div class="form-group"> <?php echo $form->dropDownList($model, 'starttime', CHtml::listData(SegStarttimes::model()->findAll(), 'timevalue', 'timevalue'), array('empty' => 'Uhrzeit', 'id' => 'picktime')); ?> </div> </div> <div class="row-filter"> <?php echo $form->dropDownList($model, 'language_id', CHtml::listData(Languages::model()->findAll(), 'id_languages', 'germanname'), array('empty' => 'Sprache', 'id' => 'picklang')); ?> </div> <div class="row-filter"> <?php $gui = new User('search_gn'); echo $form->dropDownList($model, 'guide1_id', CHtml::listData($gui->search_gn(), 'id', 'guidename'), array('empty' => 'Guide', 'id' => 'pickguide')); ?> </div> <div class="row-filter"> <button class="but-filter" type="submit"><?php echo 'SUCHE'; ?> </button> <?php
protected function _setDefaults($model) { if ($model->PersonID > 0) { $lng = Languages::model()->findByPk($model->person->LanguageID); if (!empty($lng)) { $id = Languagesex::model()->find("LanguageExName='{$lng->LanguagesName}'"); if (!empty($id)) { $model->LanguageExID = $id->idLanguageEx; } } } //$model = new Personspeciality(); $user = User::model()->findByPk(Yii::app()->user->id); //debug(print_r($user->syspk, true)); if (!empty($user->syspk)) { $pk = $user->syspk; //$pk=new SysPk(); $model->CourseID = $pk->CourseID; $model->QualificationID = $pk->QualificationID; $model->isBudget = $pk->isBudget; $model->isContract = $pk->isContract; $model->EducationFormID = $pk->EducationFormID; } }
if (LanguagesKnown::model()->findByPk($langknownid)->languages_known3 != 0) { echo Languages::model()->findByPk(LanguagesKnown::model()->findByPk($langknownid)->languages_known3)->languages_name; echo "</br>"; } else { echo "N/A.</br>"; } ?> </div> </div> <div class="rowv"> <?php echo '<lable><b>Language 4 :</b></lable>'; ?> <div class="rown"> <?php if (LanguagesKnown::model()->findByPk($langknownid)->languages_known4 != 0) { echo Languages::model()->findByPk(LanguagesKnown::model()->findByPk($langknownid)->languages_known4)->languages_name; echo "</br>"; } else { echo "N/A.</br>"; } ?> </div> </div> </div>
public function getLanguagesUrl($faculty, $lang) { $WU = new WebUser(); $model = $WU->getUserModel(); if (empty($model->syspk) || empty($model->syspk->printIP)) { throw new Exception("Необхідно визначити адресу серверу друку документів!"); } $ip = $model->syspk->printIP; $_faculty = Facultets::model()->find("idFacultet={$faculty}"); $_lang = Languages::model()->find("idLanguages={$lang}"); if (empty($_faculty) || empty($_lang) && $lang != '0') { throw new Exception("Помилка вхідних даних!"); } return "http://" . $ip . ":8080/request_report-1.0/language.jsp?faculty={$faculty}&lang={$lang}&iframe=true&width=1024&height=600"; }
<?php if (file_exists(Yii::getPathOfAlias('webroot') . '/public/images/logo_' . $currentLang . '.png')) { echo CHtml::link('<img src="/public/images/logo_' . $currentLang . '.png" alt=""/>', '/'); } else { $model = Languages::model()->findAll('active=1'); $finded = false; foreach ($model as $element) { if (file_exists(Yii::getPathOfAlias('webroot') . '/public/images/logo_' . $element->code . '.png')) { echo CHtml::link('<img src="/public/images/logo_' . $element->code . '.png" alt=""/>', '/'); $finded = true; break; } } if (!$finded) { echo CHtml::link('<img src="/public/images/logo_en.png" alt=""/>', '/'); } }
/** * Метод асинхронно повертає усі іноземні мови */ public function actionLanguages() { $models = Languages::model()->findAll(); $result = array(); foreach ($models as $model) { /* @var $model Languages */ $result[] = array('text' => $model->LanguagesName, 'id' => $model->idLanguages); } echo CJSON::encode($result); }
public function loadLang($id) { $model=Languages::model()->findByPk($id); if($model===null) throw new CHttpException(404,'The requested page does not exist.'); return $model; }
public function actionShow($id) { $id_control = Yii::app()->user->id; // $update_user = User::model()->findByPk($id_user); $role_control = User::model()->findByPk($id_control)->id_usergroups; // $id_guide = SegGuidesdata::model()->findByPk($update_user->id_guide)->idseg_guidesdata; if ($role_control == 1) { $this->layout = "root"; } if ($role_control == 2) { $this->layout = "admin"; } if ($role_control == 3) { $this->layout = "office"; } if ($role_control == 5) { $this->layout = "guide"; } $model = $this->loadModel($id); //city //$citie->seg_cityname = ''; $j = 0; $criteria_city = new CDbCriteria(); $criteria_city->condition = 'users_id=:users_id'; $criteria_city->params = array(':users_id' => $model->guide1_id); $city = SegGuidesCities::model()->find($criteria_city); if (isset($city)) { $criteria_c = new CDbCriteria(); $criteria_c->condition = 'idseg_cities=:idseg_cities'; $criteria_c->params = array(':idseg_cities' => $city->cities_id); $citie = SegCities::model()->find($criteria_c); $model->city_id_all = $citie->seg_cityname; $j = $citie->idseg_cities; } else { $model->city_id_all = 'no element'; } //language if ($model->language_id == NULL) { $i = 0; $criteria_language = new CDbCriteria(); $criteria_language->condition = 'users_id=:users_id'; $criteria_language->params = array(':users_id' => $model->guide1_id); $language = SegLanguagesGuides::model()->findAll($criteria_language); if (isset($language)) { foreach ($language as $item) { $criteria_i = new CDbCriteria(); $criteria_i->condition = 'id_languages=:id_languages'; $criteria_i->params = array(':id_languages' => $item->languages_id); $languages = Languages::model()->findAll($criteria_i); $model->language_id_all[$i] = $languages; $i++; } } else { $model->language_id_all[0] = 'no element'; } } else { $criteria_i = new CDbCriteria(); $criteria_i->condition = 'id_languages=:id_languages'; $criteria_i->params = array(':id_languages' => $model->language_id); $language = Languages::model()->find($criteria_i); $model->language_id_all[0] = $language; } //tour canegories + tourroute //$tourroute_id_all; $z = 0; $criteria_tour = new CDbCriteria(); $criteria_tour->condition = 'usersid=:usersid'; $criteria_tour->params = array(':usersid' => $model->guide1_id); $tourcats = SegGuidesTourroutes::model()->findAll($criteria_tour); if (isset($tourcats)) { foreach ($tourcats as $tourroute) { $criteria_t = new CDbCriteria(); $criteria_t->condition = 'id_tour_categories=:id_tour_categories AND cityid=:cityid'; $criteria_t->params = array(':id_tour_categories' => $tourroute->tourroutes_id, ':cityid' => $j); $tourroutes = SegTourroutes::model()->find($criteria_t); $model->tourroute_id_all[$z] = $tourroutes->name; $z++; } } else { $model->tourroute_id_all[0] = 'no element'; } $this->render('show', array('model' => $model)); }
public function run() { $currentLang = Yii::app()->language; $languages = CHtml::listData(Languages::model()->findAllByAttributes(array('active' => 1)), 'code', 'name'); $this->render('siteLogo', array('currentLang' => $currentLang, 'languages' => $languages)); }
} else { echo "N/A.</br>"; } ?> </div> </div> <div class="rowv"> <?php echo '<lable><b>Language 4 :</b></lable>'; ?> <div class="rown"> <?php if ($model->Rel_languages_known->languages_known4 != 0) { echo Languages::model()->findByPk($model->Rel_languages_known->languages_known4)->languages_name; echo "</br>"; } else { echo "N/A.</br>"; } ?> </div> <?php } ?> </div> </div>
echo Languages::model()->findByPk($lang1)->languages_name; } else { echo "N/A"; } ?> </td> </tr> <tr> <td> <label> Language 2 </label> </td> <td> <?php $lang2 = LanguagesKnown::model()->findByPk($student_transaction[0]->student_transaction_languages_known_id)->languages_known2; if (isset($lang2)) { echo Languages::model()->findByPk($lang2)->languages_name; } else { echo "N/A"; } ?> </td> </tr> </table> </br></br> <h4>Address Info</h4> <table border="1" width="200px"> <tr> <td colspan="2" align="center">Current Address</td> </tr>
*/ 'stime', 'TA_string', 'cancel', array( 'name'=>'countCustomers', 'value'=>'$data->countCustomers."/".$data->sched->TNmax_sched', //'filter'=>CHtml::listData($usergroups, 'idusergroups', 'groupname'), ), array( 'name'=>'trname', 'filter'=>CHtml::listData(TourCategories::model()->findAll(),'id_tour_categories', 'name'), ), array( 'name'=>'langname', 'filter'=>CHtml::listData(Languages::model()->findAll(),'id_languages', 'germanname'), ), // 'langname' ), )); ?> </div> </div> </section><!-- /.content --> </div><!-- /.content-wrapper --> <script type="text/javascript"> function newtourist() { document.forms['current-subscriber-form']['newrecord'].value=1; document.forms['current-subscriber-form'].submit(); } </script>
<tr> <td> <label> Language 3 </label></td><td><?php if ($LanguagesKnown->languages_known3 != 0) { echo Languages::model()->findByPk($LanguagesKnown->languages_known3)->languages_name; } else { echo ""; } ?> </td> </tr> <tr> <td> <label> Language 4 </label></td><td><?php if ($LanguagesKnown->languages_known4 != 0) { echo Languages::model()->findByPk($LanguagesKnown->languages_known4)->languages_name; } else { echo ""; } ?> </td> </tr> <tr> <td> <label> Organization </label></td><td><?php echo $Organization->organization_name; ?> </td> </tr> </table>
echo $form->labelEx($info, 'employee_type'); ?> <?php echo $form->dropDownList($info, 'employee_type', array("empty" => "---------Select---------", "1" => "Teaching", "0" => "Non Teaching"), array('tabindex' => 25)); ?> <span class="status"> </span> <?php echo $form->error($info, 'employee_type'); ?> </div> <div class="row-right"> <?php echo $form->labelEx($lang, 'languages_known1'); ?> <?php echo $form->dropDownList($lang, 'languages_known1', CHtml::listData(Languages::model()->findAll(), 'languages_id', 'languages_name'), array('empty' => 'select', 'tabindex' => 25)); ?> <span class="status"> </span> <?php echo $form->error($lang, 'languages_known1'); ?> </div> </div> <div class="row last"> <div class="row-right"> <?php echo $form->labelEx($info, 'employee_private_email'); ?> <?php echo $form->textField($info, 'employee_private_email', array('size' => 18, 'maxlength' => 60, 'tabindex' => 28)); ?>
//array que ir� receber os sados selecionados $selected_languages = array(); //para cada plataforma foreach ($model->languages as $language) { array_push($selected_languages, $language->id); } ?> <div> <?php echo TbHtml::label($model->getAttributeLabel('languages'), 'Languages'); ?> <p> <div class="portlet-content"> <?php echo TbHtml::CheckBoxList('Languages', $selected_languages, CHtml::listData(Languages::model()->findAll(), 'id', 'name'), array('template' => '{input} {label}')); ?> <?php echo $form->error($model, 'languages'); ?> </div> </p> </div> </div></div> <div class="span4"> <div class="row-fluid"> <?php //array que ir� receber os sados selecionados
} $langArr = array(); $as=explode(',',$langss); foreach($as as $ai) { $langArr[$ai] = array('selected'=>true); } echo $form->labelEx($lang,'Languages Known'); echo "</td><td>"; echo $form->dropDownList( $lang, 'languages_known1[]', CHtml::listData(Languages::model()->findAll(), 'languages_name', 'languages_name'), array( 'class'=>'chosen-select input-xxlarge', 'multiple'=>'multiple', 'maxlength'=>200, 'options' => $langArr, ) ); echo "</td></tr></table>"; ?> <?php echo $form->error($lang,'languages_known1'); ?><span class="status"> </span> </div> </div>
// echo $form->textField($model,'date'); ?> </div> </div> <div class="row-filter"> <div class="form-group"> <?php echo $form->dropDownList($model,'starttime', CHtml::listData (SegStarttimes::model()->findAll(),/*'idseg_starttimes'*/'timevalue', 'timevalue'), array('empty'=>'Uhrzeit','id'=>'picktime')); ?> </div> </div> <div class="row-filter"> <?php echo $form->dropDownList($model,'language_id', CHtml::listData (Languages::model()->findAll(),'id_languages', 'germanname'), array('empty'=>'Sprache','id'=>'picklang')); ?> </div> <div class="row-filter"> <?php $gui=new User('search_gn'); echo $form->dropDownList($model,'guide1_id',CHtml::listData($gui->search_gn(),'id','guidename'), array('empty'=>'Guide','id'=>'pickguide')); ?> </div> <div class="row-filter"> <button class="but-filter" type="submit"><?php echo 'SUCHE'; ?></button> <?php // echo CHtml::submitButton('Search'); ?> </div>
public function actionBooky($id_sched) { $tour=null; $scheduled = SegScheduledTours::model()->findByPk($id_sched); /*tourroutes*/ if($scheduled->tourroute_id==null){ $criteria_tours_link = new CDbCriteria; $criteria_tours_link->condition = 'usersid=:usersid'; $criteria_tours_link->params = array(':usersid' => $scheduled->guide1_id); $criteria_tours_link->join = 'LEFT JOIN `seg_guides_tourroutes` ON ((`seg_guides_tourroutes`.`tourroutes_id` = `t`.`id_tour_categories`) AND(`t`.`cityid` = '.$scheduled->city_id.'))'; $tours_guide = SegTourroutes::model()->findAll($criteria_tours_link); }else{ $criteria_tours_link2 = new CDbCriteria; $criteria_tours_link2->condition = 'idseg_tourroutes=:idseg_tourroutes'; $criteria_tours_link2->params = array(':idseg_tourroutes' => $scheduled->tourroute_id); $tours_guide = SegTourroutes::model()->findAll($criteria_tours_link2); $criteria = new CDbCriteria; $criteria->condition = 'cityid=:cityid AND idseg_tourroutes=:id_tour_categories'; $criteria->params = array(':cityid' => $scheduled->city_id,':id_tour_categories'=>$scheduled->tourroute_id); $tour = SegTourroutes::model()->find($criteria); } /*languages*/ if($scheduled->language_id==null){ $criteria_lan_link = new CDbCriteria; $criteria_lan_link->condition = 'users_id=:users_id'; $criteria_lan_link->params = array(':users_id' => $scheduled->guide1_id); $criteria_lan_link->join = 'LEFT JOIN `seg_languages_guides` ON `seg_languages_guides`.`languages_id` = `t`.`id_languages`'; $languages_guide = Languages::model()->findAll($criteria_lan_link); }else{ $languages_guide = Languages::model()->findByPk($scheduled->language_id); } //$model = new SegContacts; $contact = new Bookq; if(isset($_POST['Bookq'])) { if(is_null($scheduled->tourroute_id)) { $scheduled->tourroute_id = $_POST['Bookq']['tour']; $scheduled->language_id = $_POST['Bookq']['language']; $criteria = new CDbCriteria; $criteria->condition = 'cityid=:cityid AND idseg_tourroutes=:id_tour_categories'; $criteria->params = array(':cityid' => $scheduled->city_id,':id_tour_categories'=>$scheduled->tourroute_id); $tour = SegTourroutes::model()->find($criteria); } $contact->attributes=$_POST['Bookq']; $ticket_array = SegTourroutes::model()->findByPk($scheduled->tourroute_id); $ticket_count = $contact->tickets; /* $cat_i = $_POST['Bookq']['cat_hidden']; if($cat_i == 1)$ticket_count = $_POST['Bookq']['tickets1']; if($cat_i == 2)$ticket_count = $_POST['Bookq']['tickets2']; if($cat_i == 3)$ticket_count = $_POST['Bookq']['tickets3']; $contact->tickets = $ticket_count; */ if($contact->validate()){ //save contact $user_contact = new SegContacts; $user_contact->firstname = $_POST['Bookq']['firstname']; $user_contact->surname = $_POST['Bookq']['lastname']; $user_contact->additional_address = $_POST['Bookq']['additional_address']; $user_contact->city = $_POST['Bookq']['city']; $user_contact->street = $_POST['Bookq']['street']; $user_contact->postalcode = $_POST['Bookq']['postalcode']; // $user_contact->house = $_POST['Bookq']['house']; $user_contact->country = $_POST['Bookq']['country']; $user_contact->phone = $_POST['Bookq']['phone']; $user_contact->email = $_POST['Bookq']['email']; $user_contact->save(); $id_user = $user_contact->idcontacts; //save guidestourinvoice $guidestourinvoices = new SegGuidestourinvoices; $guidestourinvoices->creationDate = $scheduled->date; $guidestourinvoices->cityid = $scheduled->city_id; $guidestourinvoices->sched_tourid = $scheduled->tourroute_id; $guidestourinvoices->guideNr = $scheduled->guide1_id; $guidestourinvoices->status = 0; $guidestourinvoices->contacts_id = $id_user; $guidestourinvoices->id_sched = $scheduled->idseg_scheduled_tours; $guidestourinvoices->save(); //save guidestourinvoicecustomers $id_invoice = $guidestourinvoices->idseg_guidesTourInvoices; for($j=0;$j<$ticket_count;$j++){ $guidestourinvoicescustomers = new SegGuidestourinvoicescustomers; $guidestourinvoicescustomers->customersName = $user_contact->firstname.' '.$user_contact->surname; // $guidestourinvoicescustomers->price = $tour->base_price; $guidestourinvoicescustomers->price = 0; $guidestourinvoicescustomers->cityid = $tour->cityid; $guidestourinvoicescustomers->tourInvoiceid = $id_invoice; //$guidestourinvoicescustomers->CustomeInvoicNumber = ; $b = $tour->city['seg_cityname']{0}; $year = date('y',time()); $max= Yii::app()->db->createCommand("SELECT max(CustomerInvoiceNumber) from seg_guidestourinvoicescustomers where cityid=".$scheduled->city_id)->queryScalar(); $max_i = $max+1; $guidestourinvoicescustomers->KA_string = 'KA'.$b.$year.'/'.$max_i; $guidestourinvoicescustomers->CustomerInvoiceNumber = $max_i; $guidestourinvoicescustomers->isPaid = 0; // $guidestourinvoicescustomers->origin_booking = $id_book; $guidestourinvoicescustomers->save(); } //save scheduled $scheduled->TNmax_sched = $ticket_array->TNmax; if($scheduled->current_subscribers==null){ $scheduled->current_subscribers=$ticket_count; }else{ $scheduled->current_subscribers=$scheduled->current_subscribers +$ticket_count; } $scheduled->save(); //email $date_ex = date('d/m/Y',$scheduled->date_now); $x1 = strtotime($scheduled->starttime) - strtotime("00:00:00"); $x2 = $tour->standard_duration*60; $x3 = $x1+$x2; $x4 = $x3+strtotime("00:00:00"); $x5 = date('H:i:s',$x4); $tourend = $x5; $guidename = $scheduled->user_ob->contact_ob->firstname; $guidemnr = $scheduled->user_ob->contact_ob->phone; $message="Thank you for booking your city tour with Cherry Tours ".$scheduled->city_ob->seg_cityname; $message.="\n"; $message.="\nWe have just reserved the following tour date for you:"; $message.="\n".$date_ex; $message.="\nTour start: ".$scheduled->date_now." (Please show up at the assigned meeting point about 10 minutes before tour start.)"; $message.="\n"; $message.="\nEnd of tour: ".$tourend; $message.="\nTour route: ".$scheduled->tourroute_ob->name; $message.="\nTour language: ".$scheduled->language_ob->englishname; $message.="\nTour guide: ".$guidename; $message.="\nGuide phone: ".$guidemnr."(for last-minute requests regarding weather or meeting point)"; $message.="\nFurthermore we recommend:"; $message.="\n- comfortable shoes, no high heels"; $message.="\n- adequate clothing (below 15 degrees centigrade, we especially recommend wearing warm clothes and gloves)"; $message.="\n- sunglasses, if necessary sun protection etc."; $message.="\n"; $message.="\nPayment:"; $message.="\n- On site"; $message.="\n"; $message.="\nWe accept the following methods of payment:"; $message.="\n- Cash in EUR"; $message.="\n- EC"; $message.="\n- Credit cards (Visa, Master Card, American Express, JCB Cards, Union Pay)"; $message.="\n- Vouchers purchased at Cherry Tours"; $message.="\n"; $message.="\nWeather:"; $message.="\nIf the weather forecast shows a high chance of rain at the tour date, we will contact you near-term via email, SMS or phone and inform you if the tour has to be cancelled."; $message.="\nIf it rains despite a positive weather forecast, the tour guide will decide on-site if the tour can take place. Generally, the tour is arranged along a route where you can always take cover in case of a short rain shower."; $message.="\n"; $message.="\n"; $name_forms = $scheduled->city_ob->seg_cityname; $to = $user_contact->email; if ($this->sendMail($to, $name_forms, $message)) { $this->redirect(array('current','id_sched'=>$id_sched)); } } } // $criteria_cat = new CDbCriteria; // $criteria_cat->condition = 'cityid=:cityid AND id_tour_categories=:id_tour_categories'; // $criteria_cat->params = array(':cityid' => $scheduled->city_id,':id_tour_categories'=>$cat); // $cat_item = SegTourroutes::model()->find($criteria_cat)->idseg_tourroutes; $test=array('guide'=>$this->loadGuide(),'tours'=>$this->loadTours(),'todo'=>$this->loadUnreported()); $this->render('book',array( 'scheduled'=>$scheduled, 'contact'=>$contact, 'tour'=>$tour, 'tours_guide'=>$tours_guide, 'languages_guide'=>$languages_guide, 'info'=>$test, )); }
$sel=''; if($model->city_ob->webadress_en == $val->webadress_en) $sel = 'selected'; $opt_city .= '<option value="'.$val->idseg_cities.'" data-city="'.$val->webadress_en.'" '.$sel.'>'.$val->seg_cityname.'</option>'; }; $times = SegStarttimes::model()->findAll(); $opt_time=''; foreach($times as $val){ $tm = str_replace("00:00","00",$val->timevalue); $sel=''; if(isset($_POST['SegScheduledTours']['starttime']) || !empty($arr->starttime)){ if(!empty($arr->starttime) && $arr->starttime == $val->timevalue) $sel = 'selected'; if(@$_POST['SegScheduledTours']['starttime'] == $val->timevalue) $sel = 'selected'; } $opt_time .= '<option value="'.$val->timevalue.'" '.$sel.'>'.$tm.'</option>'; }; $lang = Languages::model()->findAll(); $opt_lang=''; foreach($lang as $val){ $sel=''; if(isset($_POST['SegScheduledTours']['language_id']) || !empty($arr->language_id)){ if(!empty($arr->language_id) && $arr->language_id == $val->id_languages) $sel = 'selected'; if(isset($_POST['SegScheduledTours']['language_id'])){ if($_POST['SegScheduledTours']['language_id'] == $val->id_languages) $sel = 'selected'; } } $opt_lang .= '<option value="'.$val->id_languages.'" '.$sel.'>'.$val->germanname.'</option>'; }; $us = new User('search_gn'); $guide = $us->search_gn(); $opt_guide=''; foreach($guide as $val){
public function actionLngDelete() { /* @var $language Languages */ $id = Yii::app()->request->getParam('id', null); $language = Languages::model()->findByPk($id); if ($language == null) { $this->redirect($this->createUrl('/admin/panel/login')); } $language->delete(); $this->redirect($this->createUrl('/admin/panel/languages')); }