本文整理汇总了PHP中Combo类的典型用法代码示例。如果您正苦于以下问题:PHP Combo类的具体用法?PHP Combo怎么用?PHP Combo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Combo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: comboTipoDocumento
public function comboTipoDocumento($optionsHTML)
{
$o_LTesoreria = new LTesoreria();
$arrayCombo = $o_LTesoreria->tipoDocumento();
//print_r($arrayCombo);
$o_Combo = new Combo($arrayCombo);
$comboHTML = $o_Combo->getOptionsHTML($optionsHTML);
return $comboHTML;
}
示例2: comboTipoDocumento
public function comboTipoDocumento($optionsHTML)
{
$o_LPersona = new LPersona();
$arrayCombo = $o_LPersona->seleccionarTipoDocumentoBusqueda();
//$arrayCombo=array('dni','le','array');
//print_r($arrayCombo);
$o_Combo = new Combo($arrayCombo);
$comboHTML = $o_Combo->getOptionsHTML($optionsHTML);
return $comboHTML;
}
示例3: combos
public function combos()
{
$product_id = null;
if ($this->uri->segment(3) !== false) {
$product_id = $this->uri->segment(3);
}
$variants = Thing::getVariants($product_id);
$type_a = array();
$type_b = array();
//get all options
foreach ($variants as $variant) {
$fields = $variant->getFields();
$type_a[] = $fields['option2']->getValue();
$type_b[] = $fields['option3']->getValue();
}
//remove duplicates
$type_a = array_unique($type_a);
$type_b = array_unique($type_b);
foreach ($type_a as $a) {
foreach ($type_b as $b) {
$combos[] = Combo::load($a, $b);
}
}
//encode json
$comboJson = array();
foreach ($combos as $combo) {
$comboJson[] = $combo->toJson();
}
echo json_encode($comboJson, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_QUOT);
}
示例4: Render
function Render()
{
global $Translation;
$eo['silentErrors'] = true;
$result = sql($this->Query . ' limit ' . datalist_auto_complete_size, $eo);
if ($eo['error'] != '') {
$this->HTML = error_message(htmlspecialchars($eo['error']) . "\n\n<!--\n{$Translation['query:']}\n {$this->Query}\n-->\n\n");
return;
}
$this->ItemCount = db_num_rows($result);
$combo = new Combo();
$combo->Class = $this->Class;
$combo->Style = $this->Style;
$combo->SelectName = $this->SelectName;
$combo->SelectedData = $this->SelectedData;
$combo->SelectedText = $this->SelectedText;
$combo->SelectedClass = 'SelectedOption';
$combo->ListType = $this->ListType;
$combo->ListBoxHeight = $this->ListBoxHeight;
$combo->RadiosPerLine = $this->RadiosPerLine;
$combo->AllowNull = $this->ListType == 2 ? 0 : $this->AllowNull;
while ($row = db_fetch_row($result)) {
$combo->ListData[] = htmlspecialchars($row[0], ENT_QUOTES, 'iso-8859-1');
$combo->ListItem[] = $row[1];
}
$combo->Render();
$this->MatchText = $combo->MatchText;
$this->SelectedText = $combo->SelectedText;
$this->SelectedData = $combo->SelectedData;
if ($this->ListType == 2) {
$rnd = rand(100, 999);
$SelectedID = htmlspecialchars(urlencode($this->SelectedData));
$pt_perm = getTablePermissions($this->parent_table);
if ($pt_perm['view'] || $pt_perm['edit']) {
$this->HTML = str_replace(">{$this->MatchText}</label>", ">{$this->MatchText}</label> <button type=\"button\" class=\"btn btn-default view_parent hspacer-lg\" id=\"{$this->parent_table}_view_parent\" title=" . htmlspecialchars($Translation['View']) . "><i class=\"glyphicon glyphicon-eye-open\"></i></button>", $combo->HTML);
}
$this->HTML = str_replace(' type="radio" ', ' type="radio" onclick="' . $this->SelectName . '_changed();" ', $this->HTML);
} else {
$this->HTML = $combo->HTML;
}
}
示例5: Render
function Render()
{
global $Translation;
$eo['silentErrors'] = true;
$result = sql($this->Query . ' limit ' . datalist_auto_complete_size, $eo);
if ($eo['error'] != '') {
$this->HTML = error_message(htmlspecialchars($eo['error']) . "\n\n<!--\n{$Translation['query:']}\n {$this->Query}\n-->\n\n");
return;
}
$this->ItemCount = db_num_rows($result);
$combo = new Combo();
$combo->Class = $this->Class;
$combo->Style = $this->Style;
$combo->SelectName = $this->SelectName;
$combo->SelectedData = $this->SelectedData;
$combo->SelectedText = $this->SelectedText;
$combo->SelectedClass = 'SelectedOption';
$combo->ListType = $this->ListType;
$combo->ListBoxHeight = $this->ListBoxHeight;
$combo->RadiosPerLine = $this->RadiosPerLine;
$combo->AllowNull = $this->ListType == 2 ? 0 : $this->AllowNull;
while ($row = db_fetch_row($result)) {
$combo->ListData[] = htmlspecialchars($row[0], ENT_QUOTES);
$combo->ListItem[] = $row[1];
}
$combo->Render();
$this->MatchText = $combo->MatchText;
$this->SelectedText = $combo->SelectedText;
$this->SelectedData = $combo->SelectedData;
if ($this->ListType == 2) {
$rnd = rand(100, 999);
$SelectedID = htmlspecialchars(urlencode($this->SelectedData));
$this->HTML = str_replace(">{$this->MatchText}</label>", ">{$this->MatchText}</label> <span id=\"{$this->parent_table}_plink{$rnd}\"><a href=\"{$this->parent_table}_view.php?SelectedID={$SelectedID}\" class=\"btn btn-default btn-sm\"><i class=\"glyphicon glyphicon-search\"></i></a></span>", $combo->HTML);
$this->HTML = str_replace(' type="radio" ', ' type="radio" onclick="' . $this->SelectName . '_changed();" ', $this->HTML);
} else {
$this->HTML = $combo->HTML;
}
}
示例6: require_once
<?
require_once($_SERVER["DOCUMENT_ROOT"]."/../Classes/provart/combo.php");
if ($_REQUEST["id"] == 2)
$sql =
"SELECT 0 id, 'Capital Federal' detalle
FROM DUAL";
else
$sql =
"SELECT cp_id id, cp_localidadcap detalle
FROM art.ccp_codigopostal
WHERE cp_fechabaja IS NULL
AND cp_provincia = :provincia
ORDER BY 2";
$comboLocalidad = new Combo($sql, "localidad");
if ($_REQUEST["id"] == 2)
$comboLocalidad->setAddFirstItem(false);
else
$comboLocalidad->addParam(":provincia", $idProvincia);
?>
示例7: Combo
$sql =
"SELECT gr_id id, gr_detalle detalle
FROM rrhh.rgr_grupos
ORDER BY 2";
$comboGrupo = new Combo($sql, "grupo", $grupo);
$comboGrupo->setClass("combo");
$sql =
"SELECT pu_id id, pu_detalle detalle
FROM rrhh.rpu_puestos
ORDER BY 2";
$comboPuesto = new Combo($sql, "puesto", $puesto);
$comboPuesto->setClass("combo");
$sql =
"SELECT pl_id id, pl_empleado detalle
FROM rrhh.dpl_login
WHERE pl_empresa = :empresa
AND pl_fechabaja IS NULL
ORDER BY 2";
$comboReferenteRrhh = new Combo($sql, "referenteRrhh", $referenteRrhh);
$comboReferenteRrhh->addParam(":empresa", $empresa);
$comboReferenteRrhh->setClass("combo");
$sql =
"SELECT 1
FROM DUAL
WHERE 1 = 2";
$comboReporta = new Combo($sql, "reporta");
$comboReporta->setClass("combo");
?>
示例8: require_once
<?
require_once($_SERVER["DOCUMENT_ROOT"]."/../Classes/provart/combo.php");
$sql =
"SELECT id, detalle
FROM (SELECT DISTINCT ii_periodo id, art.utiles.nombredemes(SUBSTR(ii_periodo, 5, 2)) || ' ' || SUBSTR(ii_periodo, 1, 4) detalle
FROM web.wii_informesiys
WHERE ii_contrato = :contrato
AND ii_fechabaja IS NULL
ORDER BY ii_periodo DESC)";
$comboPeriodo = new Combo($sql, "periodo");
$comboPeriodo->addParam(":contrato", $_SESSION["contrato"]);
$comboPeriodo->setFocus(true);
$comboPeriodo->setOnChange("submitForm()");
?>
示例9: require_once
<?
require_once($_SERVER["DOCUMENT_ROOT"]."/../Classes/provart/combo.php");
$sql =
"SELECT et_id id, et_nombre || ' (' || art.utiles.armar_domicilio(et_calle, et_numero, et_piso, et_departamento, NULL) || art.utiles.armar_localidad(et_cpostal, NULL, et_localidad, et_provincia) || ')' detalle
FROM SIN.set_establecimiento_temporal
WHERE et_fechabaja IS NULL
AND et_cuit = :cuit
ORDER BY 2";
$comboEstablecimientoTercero = new Combo($sql, "establecimientoTercero");
$comboEstablecimientoTercero->addParam(":cuit", $_SESSION["cuit"]);
$sql =
"SELECT DISTINCT pv_codigo id, pv_descripcion detalle
FROM cpv_provincias
ORDER BY 2";
$comboProvincia = new Combo($sql, "provincia", $provincia);
?>
示例10: Combo
$sql =
"SELECT tb_codigo id, tb_descripcion detalle
FROM ctb_tablas
WHERE tb_clave = 'USCAR'
AND tb_fechabaja IS NULL
ORDER BY 2";
$comboCargo = new Combo($sql, "cargo", $row["SE_CARGO"]);
$sql =
"SELECT el_id id, el_nombre detalle
FROM del_delegacion
WHERE el_fechabaja IS NULL
ORDER BY 2";
$comboDelegacion = new Combo($sql, "delegacion", $row["SE_DELEGACION"]);
$comboDelegacion->setOnChange("cambiarDelegacion(this.value)");
$sql =
"SELECT es_id id, es_descripcion || ' - ' || es_calle || ' ' || es_numero detalle
FROM art.des_delegacionsede
ORDER BY 2";
$comboEdificio = new Combo($sql, "edificio", $row["SE_IDDELEGACIONSEDE"]);
$sql =
"SELECT ru_id id, ru_detalle detalle
FROM comunes.cru_relacionlaboralusuario
WHERE ru_fechabaja IS NULL
ORDER BY 2";
$comboRelacionLaboral = new Combo($sql, "relacionLaboral", ($row["SE_CONTRATO"] == 0)?-1:$row["SE_CONTRATO"]);
示例11: Combo
ORDER BY 2";
$comboSexoEmpleador = new Combo($sql, "sexoEmpleador", ($alta)?-1:$row["SA_SEXO_TITULAR"]);
$comboSexoEmpleador->setClass("select2");
$sql =
"SELECT 'F' id, 'Femenino' detalle
FROM DUAL
UNION ALL
SELECT 'M', 'Masculino'
FROM DUAL
ORDER BY 2";
$comboSexoResponsable = new Combo($sql, "sexoResponsable", ($alta)?-1:$row["SA_SEXO_CONT"]);
$comboSexoResponsable->setClass("select2");
$sql =
"SELECT tb_codigo id, tb_descripcion detalle
FROM ctb_tablas
WHERE tb_clave = 'TARJE'
AND tb_fechabaja IS NULL
ORDER BY 2";
$comboTarjetaCredito = new Combo($sql, "tarjetaCredito", (isset($rowRC["PR_ORIGENPAGO"]))?($alta)?-1:$rowRC["PR_ORIGENPAGO"]:-1);
$comboTarjetaCredito->setClass("select2");
$sql =
"SELECT 1
FROM DUAL
WHERE 1 = 2";
$comboTarjetaCreditoFalso = new Combo($sql, "tarjetaCreditoFalso");
$comboTarjetaCreditoFalso->setClass("select2");
$comboTarjetaCreditoFalso->setDisabled(true);
?>
示例12: Combo
?>
</td>
</tr>
<tr>
<td>Usuario</td>
<td><input type="text" name="usuario" id="usuario" /></td>
</tr>
<tr>
<td>Password</td>
<td><input type="text" name="password" id="password" /></td>
</tr>
<tr>
<td>Nivel</td>
<td>
<?php
$cmb = new Combo();
$cmb->AddItem(0, "Selecciona");
$cmb->AddItem(1, "Administrador");
$cmb->AddItem(2, "Usuario");
$cmb->Render("nivel");
?>
</td>
</tr>
<tr>
<td colspan="2"><div align="center"><input type="submit" value="Guardar" name="Guardar" /></div></td>
</tr>
</table>
</form>
</body>
</html>
示例13: require_once
<?
require_once($_SERVER["DOCUMENT_ROOT"]."/../Classes/provart/combo.php");
$sql =
"SELECT de_id id, de_nombre detalle, 2 orden
FROM rrhh.rde_descargables
WHERE de_fechabaja IS NULL
AND de_idpadre = -1
ORDER BY 3, 2";
$comboItemPadre = new Combo($sql, "itemPadre", ($isAlta)?-1:$row["DE_IDPADRE"]);
$comboItemPadre->setFirstItem("* ITEM RAÍZ *");
$comboItemPadre->setFocus(true);
$comboItemPadre->setOnChange("cambiarItemPadre(this.value)");
?>
示例14: require_once
<?
require_once($_SERVER["DOCUMENT_ROOT"]."/../Classes/provart/combo.php");
$sql =
"SELECT DISTINCT pv_codigo id, pv_descripcion detalle
FROM cpv_provincias
ORDER BY 2";
$comboProvincia2 = new Combo($sql, "provincia2", $_REQUEST["provincia"]);
$comboProvincia2->setOnChange("cambiaProvincia2(this.value)");
?>
示例15: modificarCombo
private function modificarCombo($position, $objSectorCiudad)
{
$cantidad = Yii::app()->getRequest()->getPost('cantidad', null);
if ($cantidad === null || $cantidad < 0) {
echo CJSON::encode(array('result' => 'error', 'response' => array('message' => 'Solicitud inválida, no se detectan datos', 'carroHTML' => $this->renderPartial('carro', null, true))));
Yii::app()->end();
}
$fecha = new DateTime();
$objCombo = Combo::model()->find(array('with' => array('listProductos', 'listProductosCombo', 'listComboSectorCiudad'), 'condition' => 't.idCombo=:combo AND t.estadoCombo=:estado AND t.fechaInicio<=:fecha AND t.fechaFin>=:fecha AND listComboSectorCiudad.saldo>=:saldo AND listComboSectorCiudad.codigoCiudad=:ciudad AND listComboSectorCiudad.codigoSector=:sector', 'params' => array(':combo' => $position->objCombo->idCombo, ':estado' => 1, ':fecha' => $fecha->format('Y-m-d H:i:s'), 'saldo' => $cantidad, ':ciudad' => $objSectorCiudad->codigoCiudad, ':sector' => $objSectorCiudad->codigoSector)));
if ($objCombo === null) {
echo CJSON::encode(array('result' => 'error', 'response' => array('message' => "La cantidad solicitada no está disponible en este momento. No hay combos disponibles", 'carroHTML' => $this->renderPartial('carro', null, true))));
Yii::app()->end();
}
Yii::app()->shoppingCart->update($position, false, $cantidad);
echo CJSON::encode(array('result' => 'ok', 'response' => array('canastaHTML' => $this->renderPartial('canasta', null, true), 'carroHTML' => $this->renderPartial('carro', null, true))));
Yii::app()->end();
}