Beispiel #1
0
 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;
 }
Beispiel #2
0
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;
}
Beispiel #3
0
 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;
 }
Beispiel #4
0
 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;
 }