当前位置: 首页>>代码示例>>PHP>>正文


PHP Chtml类代码示例

本文整理汇总了PHP中Chtml的典型用法代码示例。如果您正苦于以下问题:PHP Chtml类的具体用法?PHP Chtml怎么用?PHP Chtml使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Chtml类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getUniversityList

 public function getUniversityList()
 {
     // $u1[]='Select university';
     // $u2[0]='Select university';
     $u2 = Chtml::listData(University::model()->findAll(), 'uid', 'uname');
     //$u=array_merge($u1,$u2);
     return $u2;
 }
开发者ID:riyaskp,项目名称:easy-btech,代码行数:8,代码来源:University.php

示例2: getListOption

 /**
  * @Author: ANH DUNG Mar 13, 2015
  * @Todo: get list option by type
  * @Param: $type 
  */
 public static function getListOption($type)
 {
     $criteria = new CDbCriteria();
     $criteria->order = 't.value';
     $aId = array();
     if ($type == ProMasterFurnished::TYPE_NORMAL) {
         $aId = ProMasterFurnished::getFurnishedNormal();
     } elseif ($type == ProMasterFurnished::TYPE_INDUSTRIAL) {
         $aId = ProMasterFurnished::getFurnishedIndustrial();
     }
     $criteria->addInCondition('t.id', $aId);
     $models = self::model()->findAll($criteria);
     return Chtml::listData($models, 'id', 'name');
 }
开发者ID:jasonhai,项目名称:onehome,代码行数:19,代码来源:ProMasterFurnished.php

示例3: procesarListaPartidos

 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/>';
 }
开发者ID:ednjv,项目名称:SSBMVZLA,代码行数:34,代码来源:ApiChallongeController.php

示例4: createMarkup

  /**
   * Creates markup required for the current mode.
   */
  public function createMarkup() {
    list($name,$id)=$this->resolveNameID();

    $this->htmlOptions["name"]= $name;
    $this->htmlOptions["id"]= $id;
     if(!$this->hasModel()) {
      $this->htmlOptions["value"]= $this->getValue();
    } else {
      $this->htmlOptions["value"]= $this->model->{$this->attribute} != "" ? $this->model->{$this->attribute} :
        $this->getValue();
    }
    $this->htmlOptions["style"]= "width:".($this->getWidth()-13)."px";
    $this->htmlOptions["class"]= "textfield";
    $this->htmlOptions["readonly"]= "true";
    $field = $this->hasModel()  ?
      Chtml::activeTextField($this->model,$this->attribute,$this->htmlOptions) :
      Chtml::TextField($this->name,$this->getValue(),$this->htmlOptions);
    ?>

<script>
  var <?php echo $id."_list"?> = new Array();
    <?php if (count($this->_list) > 0) { ?>
      <?php foreach ($this->_list as $i=>$v) { ?>
        <?php echo $id."_list"?>.push('<?php echo addslashes($v)?>');
        <?php }
    }?>
</script>
<div class='spinner' style="height:<?php echo $this->getHeight()?>px">
  <table cellspacing=0 cellpadding=0 align="left">
    <tr>
      <td rowspan='2'>
            <?php echo $field ?>
      </td>
      <td class="button_up" style="background-color:<?php echo $this->bgColor?>"
          onmousedown="javascript:setMouseDown('up','<?php echo $id?>','<?php echo $this->_type?>',
              <?php echo $id."_list"?>
                ,<?php echo "0"?>,<?php echo "0"?>,
              <?php echo "0"?>,<?php echo $this->getDelay()?>,
                '<?php echo $this->getAcceleration()?>');"
          onmouseup="setMouseUp();" onmouseout="setMouseUp();">
      </td>
    </tr>
    <tr>
      <td class="button_down" style="background-color:<?php echo $this->bgColor?>"
          onmousedown="javascript:setMouseDown('down','<?php echo $id?>','<?php echo $this->_type?>',
              <?php echo $id."_list"?>,
              <?php echo "0"?>,<?php echo "0"?>,
              <?php echo "0"?>,<?php echo $this->getDelay()?>,
                '<?php echo $this->getAcceleration()?>')"
          onmouseup="setMouseUp();" onmouseout="setMouseUp();">
      </td>
    </tr>


  </table>&nbsp;
  <span class="text"><?php echo  $this->text?></span>
</div>
    <?
  }
开发者ID:Henriquemvsantos,项目名称:GoNuts,代码行数:62,代码来源:STextSpinner.php

示例5: transform

 public function transform($output)
 {
     // toc process
     $toc = '';
     $output = parent::transform($output);
     if (preg_match_all('/<h2(?: id=".+")?>(.+?)<\\/h2>/', $output, $match, PREG_PATTERN_ORDER) > 1) {
         $toc = CHtml::openTag('div', array('class' => 'toc')) . CHtml::openTag('ol');
         for ($i = 0; $i < count($match[0]); $i++) {
             $text = $i + 1 . '. ' . $match[1][$i] . CHtml::link('¶', null, array('name' => 'ch' . $i, 'class' => 'anchor'));
             $html = CHtml::tag('h2', array('id' => 'ch' . $i), $text);
             $toc .= Chtml::tag('li', array(), CHtml::link($match[1][$i], '#ch' . $i));
             $output = str_replace($match[0][$i], $html, $output);
         }
         $toc .= CHtml::closeTag('ol') . CHtml::closeTag('div');
     }
     // image process
     $output = preg_replace_callback('#<img\\s+src=".+?"\\s+alt="(.+?)"(?:\\s+title="(.+?)")?\\s+/>#s', array(&$this, '_doImages_callback_format'), $output);
     return $toc . $output;
 }
开发者ID:nash635,项目名称:xunsearch,代码行数:19,代码来源:Markdown.php

示例6: img

 static function img($table, $vid, $url = 'post/default/update')
 {
     unset($str);
     $rows = self::languages($table, $vid);
     if ($rows) {
         $all = cache('defaultDBLangugeAll');
         foreach ($rows as $sid => $language_id) {
             unset($urls);
             if (is_array($url)) {
                 $url[1]['id'] = $sid;
                 $urls = url($url[0], $url[1]);
             } else {
                 $urls = url($url);
             }
             $s = Chtml::image(base_url() . '/misc/gq/' . strtolower($all[$language_id]) . ".gif");
             $s = strtolower($all[$language_id]);
             $str .= CHtml::link($s, $urls);
             $str .= "&nbsp;";
         }
     }
     return $str;
 }
开发者ID:hiproz,项目名称:mincms,代码行数:22,代码来源:LanguageHelper.php

示例7: actionData

 public function actionData($id = null, $metric = null)
 {
     if (isset($_POST['data'])) {
         foreach ($_POST['data'] as $id => $value) {
             $model = Data::model()->findByPk($id);
             $model->value = is_numeric($value) ? (int) $value : null;
             $model->save();
         }
         echo Sector::getJson();
     } else {
         $metricModel = Metric::model()->findByAttributes(array('name' => $metric));
         $metric_ids = CHtml::listData($metricModel->getMetricWithDescendants(), 'id', 'id');
         if ($metricModel->type == '1') {
             echo $this->renderPartial('dataForm', array('sector' => Sector::model()->findByPk($id), 'metric_ids' => $metric_ids));
         } elseif ($metricModel->type = '2') {
             foreach (Sector::model()->findByPk($id)->square->sectors as $sector) {
                 echo CHtml::tag('h3', array(), $sector->title);
                 echo $this->renderPartial('dataForm', array('sector' => $sector, 'metric_ids' => $metric_ids));
                 echo Chtml::hiddenField('sector_id', $id);
             }
         }
     }
 }
开发者ID:nizsheanez,项目名称:kur.ru,代码行数:23,代码来源:SaveController.php

示例8: array

        <?php 
if (Yii::app()->hasModule('page')) {
    echo CHtml::radioButton('MenuItem[type]', $model->type == 'content', array('value' => 'content', 'id' => 'radio_content'));
    echo Yii::t('app', 'Content') . ' ';
    echo CHtml::dropDownList('MenuItem[content]', $model->link, CHtml::listData(Page::model()->findAll(), 'path', 'title'), array('onfocus' => 'js:$("#radio_content").attr("checked", "checked");'));
}
?>
        <br/>
        <?php 
echo CHtml::radioButton('MenuItem[type]', $model->type == 'url', array('value' => 'url', 'id' => 'radio_url'));
?>
        <?php 
echo Yii::t('app', 'Link') . ' ';
?>
        <?php 
echo Chtml::textField('MenuItem[url]', $model->link, array('size' => 60, 'onfocus' => 'js:$("#radio_url").attr("checked", "checked");'));
?>
        <?php 
echo $form->error($model, 'link');
?>
        <br/>
        <p class="hint">
            /item points to base_url/item, //item points to root_of_server/item, item creates link relative to dynamic user location, 
            URLs rendered as is.
        </p>
    </div><!-- row -->

    <div class="row">
        <?php 
echo $form->labelEx($model, 'description');
?>
开发者ID:awecode,项目名称:awecms,代码行数:31,代码来源:_form.php

示例9: array

    echo CHtml::link(Chtml::image(Yii::app()->getTheme()->baseUrl . '/img/imprimir.png'), array('/solpe/imprimir2', 'id' => $model->id));
    echo "</div>";
}
?>
          <?php 
if ($model->cestadovale == '01') {
    echo "<div class='botones'>";
    echo CHtml::link(Chtml::image(Yii::app()->getTheme()->baseUrl . '/img/ok.png'), array('/solpe/procesarsolpe', 'id' => $model->id, 'ev' => 60));
    echo "</div>";
}
?>

           <?php 
if ($model->cestadovale == '01') {
    echo "<div class='botones'>";
    echo CHtml::link(Chtml::image(Yii::app()->getTheme()->baseUrl . '/img/tacho1.png'), array('/solpe/procesarsolpe', 'id' => $model->id, 'ev' => 61));
    echo "</div>";
}
?>


	</div>





<div class="panelizquierdo">

	<div class="row">
		<?php 
开发者ID:hipogea,项目名称:zega,代码行数:31,代码来源:salidareserva.php

示例10:

echo CJSON::encode(CHtml::activeId($shipment, 'service_code'));
?>
,
																name:<?php 
echo CJSON::encode(CHtml::activeName($shipment, 'service_code'));
?>
,
																value:<?php 
echo CJSON::encode($shipment->service_code);
?>
,
																listeners:{
																	focus:function(){
																		var that = this;
																		var customer_id = formPanel.down('#<?php 
echo Chtml::activeId($shipment, 'customer_id');
?>
').getValue();
																		var shipper_country = formPanel.down('#<?php 
echo CHtml::activeId($shipment, 'shipper_country');
?>
').getValue();
																		var receiver_country = formPanel.down('#<?php 
echo CHtml::activeId($shipment, 'receiver_country');
?>
').getValue();
																		var product;
																		var routing_code = Ext.getCmp('<?php 
echo CHtml::activeId($shipment, 'destination_code');
?>
').getValue();
开发者ID:aantonw,项目名称:dcourier.system,代码行数:31,代码来源:_formAWB.php

示例11: array

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>
开发者ID:upmunspel,项目名称:abiturient,代码行数:31,代码来源:_document.php

示例12: array_key_exists

<?php 
echo CHtml::beginForm();
?>
<table class="list">
    <tbody>
        <tr>
            <td>Логин</td>
            <td><?php 
echo Chtml::textField('filter[username]', array_key_exists('username', $filter) ? $filter['username'] : '');
?>
</td>
        </tr>
        <tr>
            <td><a href="javascript: void(0)" onClick="location.href='/admin/roles/authmanager/assignment'">Сбросить фильтр</a></td>
            <td><?php 
echo Chtml::button('Найти', array('name' => 'btn_filter', 'onClick' => 'saveFilter()'));
?>
</td>
        </tr>                
    </tbody>            
</table>
<?php 
echo CHtml::endForm();
?>
<br /><br />

<table class="list" id="roles">
    <tbody>
        <tr class="top-table" >
            <th class="photo">Логин</th>
            <th class="photo">Email</th>
开发者ID:hikaram,项目名称:utitheme,代码行数:31,代码来源:assignment.php

示例13:

echo Chtml::activeLabel($model, 'password');
echo Chtml::activePasswordField($model, 'password');
?>
</div>

<div class="row">
<?php 
echo Chtml::activeLabel($model, 'email');
echo Chtml::activeTextField($model, 'email');
?>
</div>

<div class="row">
<?php 
echo Chtml::activeLabel($model, 'telephone');
echo Chtml::activeTextField($model, 'telephone');
?>
</div>

<div class="row submit">
<?php 
echo CHtml::submitButton('register');
?>
</div>

<?php 
echo CHtml::endForm();
?>
</div><!-- form -->

</div>
开发者ID:bogdantarasenko,项目名称:myshop,代码行数:31,代码来源:reg.php

示例14: array

 echo $form->textArea($model, 'text', array('class' => 'txt', 'rows' => 6, 'cols' => 30, 'placeholder' => $model->getAttributeLabel('text') . ' *'));
 ?>
         </div>
         <?php 
 if (extension_loaded('gd') and CallbackConfig::model()->checkCaptchaEnabled()) {
     ?>
             <div class="captcha-inner">
                 <?php 
     $this->widget('CCaptcha', array('captchaAction' => '/callback/default/captcha', 'buttonLabel' => ''));
     ?>
                 <div class="captcha-code-inner">
                     <?php 
     echo CHtml::activeTextField($model, 'verifyCode', array('id' => 'user-captcha', 'placeholder' => 'Введите код'));
     ?>
                     <?php 
     echo Chtml::link('Получить новый код', '/callback/default/captcha/refresh/1', array('id' => 'yw0_button'));
     ?>
                 </div>
             </div>
         <?php 
 }
 ?>
         <div class="row">
             <?php 
 echo CHtml::button('Отправить', array('id' => 'submit', 'class' => 'button', 'name' => 'Send message'));
 ?>
         </div>
     </div>
     <?php 
 $this->endWidget();
 ?>
开发者ID:xPashaNx,项目名称:diet,代码行数:31,代码来源:_form.php

示例15: array

<?php

if (strtolower($this->action->id) == 'verdocumento') {
    $proveedor = Docompra::model()->search_por_compra($filtro);
} else {
    $proveedor = Docompratemp::model()->search_por_compra($filtro);
}
$descuento = $model->descuento + 0;
//var_dump($descuento);yii::app()->end();
?>
<div id="AjFlash" class="flash-regular"></div>
<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'detalle-grid', 'dataProvider' => $proveedor, 'itemsCssClass' => 'table table-striped table-bordered table-hover', 'summaryText' => '>', 'columns' => array(array('class' => 'CCheckBoxColumn', 'selectableRows' => 20, 'value' => '$data->idtemp', 'checkBoxHtmlOptions' => array('name' => 'cajita[]')), array('name' => 'st.', 'header' => 'st', 'type' => 'raw', 'value' => 'CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"].$data->coddocu.$data->estadodetalle.".png")'), 'codentro', 'codigoalma', 'item', 'cant', 'ums.desum', 'codart', 'descri', array('name' => 'texto', 'type' => 'raw', 'header' => 't', 'value' => '(!empty($data->detalle))?CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"]."texto.png","hola"):""'), 'punit', array('name' => 'Bruto', 'header' => 'Bruto', 'value' => 'Mifactoria::decimal($data->cant*($data->punit),2)', 'footer' => Chtml::openTag("span", array("class" => "label label-info")) . MiFactoria::decimal(Docompratemp::getTotal($proveedor)["bruto"], 2) . CHTml::CloseTag("span")), array('name' => 'Descuento', 'visible' => $descuento > 0 ? true : false, 'header' => 'Dcto', 'value' => 'Mifactoria::decimal($data->cant*$data->punit*($data->ocompra->descuento/100),2)', 'footer' => Chtml::openTag("span", array("class" => "label label-info")) . MiFactoria::decimal(Docompratemp::getTotal($proveedor)["descuento"], 2) . CHTml::CloseTag("span")), array('name' => 'potal', 'value' => 'Mifactoria::decimal(($data->punit*(1-$data->ocompra->descuento/100))*$data->cant,2)', 'footer' => Chtml::openTag("span", array("class" => "label label-info")) . MiFactoria::decimal(Docompratemp::getTotal($proveedor)["total"], 2) . CHTml::CloseTag("span")), array('class' => 'CButtonColumn', 'buttons' => array('view' => array('visible' => 'false'), 'update' => array('visible' => $this->eseditable($model->{$this->campoestado}) ? 'false' : 'true', 'url' => '$this->grid->controller->createUrl("/Ocompra/Modificadetalle/",
										    array("id"=>$data->idtemp,
                                                                                         "asDialog"=>1,
											"gridId"=>$this->grid->id
											)
									    )', 'click' => 'function(){ 
							    $("#cru-detalle").attr("src",$(this).attr("href")); 
							    $("#cru-dialogdetalle").dialog("open");  
							     return false;
							 }', 'imageUrl' => '' . Yii::app()->getTheme()->baseUrl . Yii::app()->params['rutatemagrid'] . 'update.png', 'label' => 'Actualizar Item'), 'delete' => array('visible' => $this->eseditable($model->{$this->campoestado}) ? 'false' : 'true', 'url' => '$this->grid->controller->createUrl("/Ocompra/borraitem", array("identi"=>$data->id,"idcabecera"=>$data->hidguia))', 'options' => array('ajax' => array('type' => 'GET', 'success' => "js:function() { \$.fn.yiiGridView.update('detalle-grid'); }", 'url' => 'js:$(this).attr("href")')), 'imageUrl' => '' . Yii::app()->getTheme()->baseUrl . Yii::app()->params['rutatemaimagenes'] . 'borrador.png', 'label' => 'Borrary'))))));
开发者ID:hipogea,项目名称:zega,代码行数:22,代码来源:vw_detalle.php


注:本文中的Chtml类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。