本文整理汇总了PHP中xajaxResponse::Assign方法的典型用法代码示例。如果您正苦于以下问题:PHP xajaxResponse::Assign方法的具体用法?PHP xajaxResponse::Assign怎么用?PHP xajaxResponse::Assign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xajaxResponse
的用法示例。
在下文中一共展示了xajaxResponse::Assign方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: xajaxResponse
function populate_sponsors_onchange($locationID)
{
$objResponse = new xajaxResponse();
if ($locationID != '0') {
$output = $this->build_sponsor_dropdownlist($locationID, '0');
$objResponse->Assign("sponsorsListDiv", "innerHTML", $output);
} else {
$objResponse->Assign("sponsorsListDiv", "innerHTML", "");
}
return $objResponse;
}
示例2: consultarDatos
function consultarDatos($pos, $incremento, $limite, $tabla)
{
#Instanciamos el objeto para generar la respuesta con ajax.
$output = new xajaxResponse();
#ACTUALIZAR ÍNDICES.
$indice1 = $pos - $incremento / 2;
if ($indice1 < 0) {
$indice1 = 0;
}
$indice2 = $indice1 + $incremento;
if ($indice2 > $limite) {
$indice2 = $limite;
$indice1 = $indice2 - $incremento;
}
conectar();
#Parámetros de subsecuencia_arr(NombreCampo, ValorInicial, NumDeValoresAconsultar)
$result = pg_query("SELECT (subsecuencia_arr(signal, {$indice1}, {$incremento})).f2,\n\t\t\t\tposicion FROM derivacion WHERE id={$tabla}");
$result2 = pg_query("SELECT nombre, id_paciente FROM electrocardiografia WHERE\n\t\t\t\tid=(SELECT id_electrocardiografia FROM derivacion WHERE id={$tabla})");
desconectar();
$i = 0;
while ($row = pg_fetch_assoc($result)) {
$a[$i] = $row['f2'];
#Señal.
$posicion = $row['posicion'];
#Tipo de derivación.
$i++;
}
while ($row = pg_fetch_assoc($result2)) {
$nombreElectro = $row['nombre'];
#Nombre del ECG.
$idPaciente = $row['id_paciente'];
#ID del paciente.
}
#Se asignan los valores de los índices a controles ocultos.
$output->Assign("indice1", "innerHTML", $indice1);
$output->Assign("indice2", "innerHTML", $indice2);
#Información sobre la señal.
$output->Assign("idPaciente", "innerHTML", $idPaciente);
$output->Assign("idECG", "innerHTML", $nombreElectro);
$output->Assign("idDerivacion", "innerHTML", $posicion);
#Retornamos la salida XAJAX.
$output->setReturnValue($a);
return $output;
}
示例3: xajaxResponse
function Hapus_PenerimaSurat($id)
{
$objresponse = new xajaxResponse();
$this->load->model("M_Surat");
//$id = $form_data['c_del'];
$this->M_Surat->DeletePenerima($id);
$key = $this->session->userdata("IDSRT");
$content = $this->BuildListPenerima($key);
$objresponse->Assign("dlistpenerima03", "innerHTML", $content);
return $objresponse;
}
示例4: vote
function vote($vote)
{
//$this->load->model('bill_model');
$bill_id = $this->uri->segment(3);
$user_profile = $this->redux_auth->profile();
$user_id = $user_profile->id;
$current_vote = $this->bill_model->get_bill_user_vote($bill_id, $user_id);
if ($current_vote) {
$bill_votes_id = $current_vote->id;
$this->bill_model->update_bill_vote($bill_votes_id, $vote);
} else {
$this->bill_model->insert_bill_vote($bill_id, $user_id, $vote);
}
$objResponse = new xajaxResponse();
$vote_stats = $this->bill_model->get_bill_rating($bill_id);
if ($vote) {
//$support_text = 'You support this legislation.';
$support_html = '<span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
Your vote has been recorded. Thank you for your vote! You support this legislation.<br><br>';
$support_html = $support_html . '<strong>' . round($vote_stats->PercentSupport) . '%</strong> users support this bill<br>';
$support_html = $support_html . $vote_stats->TotalSupport . ' support /';
$support_html = $support_html . $vote_stats->TotalNotSupport . ' do not support';
} else {
//$support_text = 'You do not support this legislation.';
$support_html = '<span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
Your vote has been recorded. Thank you for your vote! You do not support this legislation.<br><br>';
$support_html = $support_html . '<strong>' . round($vote_stats->PercentSupport) . '%</strong> users support this bill<br>';
$support_html = $support_html . $vote_stats->TotalSupport . ' support /';
$support_html = $support_html . $vote_stats->TotalNotSupport . ' do not support';
}
$objResponse->Assign("bill_vote_results_div", "innerHTML", $support_html);
return $objResponse;
}