Ir para conteúdo
Fórum Script Brasil

luizhbm

Membros
  • Total de itens

    5
  • Registro em

  • Última visita

Sobre luizhbm

luizhbm's Achievements

0

Reputação

  1. luizhbm

    DropDown

    Segue abaixo: <?php class WLocationSelectDropDown extends UWidgetWorklet { public function accessRules() { return array(array('allow','users'=>array('*'))); } public function taskRenderOutput() { $current = wm()->get('deal.helper')->location(); $countries = array(); $locations = array(); $fixed = $this->param('fixed'); if($this->param('src') == 'fixed' && is_array($fixed) && count($fixed)) { $fixed = $this->param('fixed'); $fixed = $fixed?$fixed:array(); $sql = "SELECT * FROM {{Location}} as t WHERE t.id IN (".implode(',',$fixed).") ORDER BY country, city"; $command = app()->db->createCommand($sql); } else { $sql = "SELECT t2.* FROM {{Deal}} as t1, {{Location}} as t2, {{DealLocation}} as t3 WHERE t1.id=t3.id AND t3.location=t2.id AND t1.`active`=1 AND t1.`status`=1 AND t1.`start` <= :time AND t1.`end` >= :time GROUP BY t2.id"; $command = app()->db->createCommand($sql); $command->bindParam(':time',UTimestamp::getNow()); } $dataReader = $command->query(); while(($row=$dataReader->read())!==false) { $country = $row['country']; $locations[$country][] = $row; } $this->render('selectDropDown',array('locations'=>$locations,'current'=>$current, 'showCountry'=>!wm()->get('location.helper')->defaultCountry())); } }
  2. luizhbm

    DropDown

    Bom galera estou editando um DropDown de cidades e estou com um probleminha , nele e mostrado a cidade selecionada 3 vezes... alguém poderia me ajudar a solucionar esse problema? <div class="LocationSelectDropDown"> <select onchange="location=this.value"> <option><?php $location = wm()->get('location.helper')->locationToData(wm()->get('deal.helper')->location()); //Pelo que percebi para solucionar preciso mudar aqui! echo $location['city']; ?></option> <?php foreach($locations as $country=>$locs) { ?> <?php if($showCountry) {?> <optgroup label="<?php echo wm()->get('location.helper')->country($country); ?>"> <?php foreach($locs as $loc) { $params = wm()->get('location.helper')->urlParams($loc); ?> <option class="dropoption" value='<?php echo url('/',$params); ?>'><?php echo $loc['city']; ?></option> <?php } ?> </optgroup> <?php } else { ?> <?php foreach($locs as $loc) { $params = wm()->get('location.helper')->urlParams($loc); $defaultCountry = wm()->get('location.helper')->defaultCountry(); ?> <?php if($country==$defaultCountry) {?> <option class="dropoption" value='<?php echo url('/',$params); ?>'><?php echo $loc['city']; ?></option> <?php } ?> <?php } ?> <?php } ?> <?php } ?> </select> </div> Segue uma imagem do problema: segue como quero deixá-lo: desde já, agradeço!
  3. luizhbm

    Webinsta Importar contatos

    no caso que citei acima eu estou importando um arquivo localmente... e logo após clicar em "Seguinte" eu tenho esse erro tambem citado acima... :S
  4. galera estou tentando importar contatos de um arquivo para o sistema de mailing webinsta e não estou tendo sucesso... está dando esse erro: Warning: copy(temp/data.csv) [function.copy]: failed to open stream: Permission denied in /home/boomurbano/www/maillist/admin/import.php on line 104 There was an error importing the file data.csv. alguém que já utilizou esse sistema e fez essa importação pode me ajudar?
  5. luizhbm

    Galeria de fotos

    galera estou querendo adicionar uma galeria de fotos estilo lightbox a uma página de meu site , na parte de informações... o código da página está assim: <div class='clearfix'> <div class='span-11 colborder'> <?php echo $this->deal->description; ?> <h3><?php echo $this->t('Fotos'); ?></h3> QUERO ADICIONAR AQUI...já CRIEI O TITULO ACIMA.... <h3><?php echo $this->t('Reviews'); ?></h3> <?php foreach($this->deal->reviews as $review) { ?> <blockquote><?php echo app()->format->ntext($review->review); ?> <span class='signature'>&ndash; <?php echo CHtml::link($review->name,$review->website,array('target'=>'_blank')); ?></span> </blockquote> <?php } ?> </div> <div class='span-5 last'> <h3><?php echo $this->t('The Company'); ?></h3> <strong><?php echo $this->deal->company->name; ?></strong> <address> <?php $address = $this->deal->company->address . "\n" . $this->deal->company->zipCode . "\n" . txt()->format( $this->deal->company->loc->city, ',', ' ', $this->deal->company->loc->state, ' ', $this->deal->company->loc->country); echo nl2br($address); ?> </address> <?php echo CHtml::link($this->t('website'),$this->deal->company->website,array('target'=>'_blank')); ?> <?php app()->controller->worklet('base.googleMap',array('address' => $address)); ?> </div> </div> alguém pode me dar um help nisso?? agradeço...
×
×
  • Criar Novo...