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


PHP xajaxResponse::addScriptCall方法代码示例

本文整理汇总了PHP中xajaxResponse::addScriptCall方法的典型用法代码示例。如果您正苦于以下问题:PHP xajaxResponse::addScriptCall方法的具体用法?PHP xajaxResponse::addScriptCall怎么用?PHP xajaxResponse::addScriptCall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在xajaxResponse的用法示例。


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

示例1: empty

	function get_pasien_check($val) {
		$val[tgl_periksa_tgl_start] = empty($val[tgl_periksa_tgl_start])?1:$val[tgl_periksa_tgl_start];
		$val[tgl_periksa_bln_start] = empty($val[tgl_periksa_bln_start])?1:$val[tgl_periksa_bln_start];
		$val[tgl_periksa_tgl_end] = empty($val[tgl_periksa_tgl_end])?1:$val[tgl_periksa_tgl_end];
		$val[tgl_periksa_bln_end] = empty($val[tgl_periksa_bln_end])?1:$val[tgl_periksa_bln_end];

		$objResponse = new xajaxResponse;

		$tgl_start = strtotime($val[tgl_periksa_thn_start] . "-" . $val[tgl_periksa_bln_start] . "-" . $val[tgl_periksa_tgl_start]);
		$tgl_end = strtotime($val[tgl_periksa_thn_end] . "-" . $val[tgl_periksa_bln_end] . "-" . $val[tgl_periksa_tgl_end]);

		if(!checkdate($val[tgl_periksa_bln_start], $val[tgl_periksa_tgl_start], $val[tgl_periksa_thn_start])) {
			$objResponse->addAlert("Tanggal Awal Tidak Valid");
			$objResponse->addScriptCall("fokus", "tgl_periksa_tgl_start");
		} elseif(!checkdate($val[tgl_periksa_bln_end], $val[tgl_periksa_tgl_end], $val[tgl_periksa_thn_end])) {
			$objResponse->addAlert("Tanggal Akhir Tidak Valid");
			$objResponse->addScriptCall("fokus", "tgl_periksa_tgl_start");
		} elseif($tgl_start > $tgl_end) {
			$objResponse->addAlert("Tanggal Awal Harus Kurang Dari Tanggal Akhir");
			$objResponse->addScriptCall("fokus", "tgl_periksa_tgl_start");
		} else {
			$objResponse->addScriptCall("xajax_get_pasien", $val);
		}
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:25,代码来源:statistik_pasien_semua_pekerjaan.php

示例2: elseif

	function simpan_tracer_check($value) {
		$cleaner = new FormCleaner;
		$cleaner->setValue($value);
		$cleaner->clean();
		$val = $cleaner->getValue();

		$objResponse = new xajaxResponse;

		if(!$val[no_rm]) {
			$objResponse->addAlert("Silakan Isi Nomor Rekam Medis");
			$objResponse->addScriptCall("fokus", "no_rm");
		} elseif(!$val[peminjam]) {
			$objResponse->addAlert("Silakan Isi Peminjam");
			$objResponse->addScriptCall("fokus", "peminjam");
		} else {
			$kon = new Konek;
			$arr_no_rm = explode("\n", $val[no_rm]);
			$str_no_rm = str_replace("\n", ", ", $val[no_rm]);
			//$objResponse->addAlert($str_no_rm);
			$kon->sql = "
				SELECT 
					CONCAT_WS('-', SUBSTRING(trc.pasien_id, 1,2), SUBSTRING(trc.pasien_id, 3,2), SUBSTRING(trc.pasien_id, 5,2), SUBSTRING(trc.pasien_id, 7,2)) as no_rm,
					kmr.nama as nama_kamar, 
					trc.peminjam as peminjam,
					DATE_FORMAT(trc.tgl_keluar, '%d/%m/%y') as tgl_keluar,
					p.nama as nama
				FROM 
					tracer trc
					LEFT JOIN kunjungan_kamar kk ON (kk.id = trc.kunjungan_kamar_id)
					LEFT JOIN kamar kmr ON (kmr.id = kk.kamar_id)
					JOIN pasien p ON (p.id = trc.pasien_id)
				WHERE
					trc.pasien_id IN (".$str_no_rm.")
					AND trc.tgl_kembali IS NULL
			";
			$kon->execute();
			$data = $kon->getAll();
			if(!empty($data)) {
				$str = "\n";
				for($i=0;$i<sizeof($data);$i++) {
					$str .= "---------------------------------------\n";
					$str .= "No RM : " . $data[$i][no_rm] . "\n";
					$str .= "Pasien : " . $data[$i][nama] . "\n";
					$str .= "Tgl Keluar : " . $data[$i][tgl_keluar] . "\n";
					if( $data[$i][peminjam]) $str .= "Peminjam : " . $data[$i][peminjam] . "\n";
					if( $data[$i][nama_kamar]) $str .= "Pelayanan : " . $data[$i][nama_kamar] . "\n";
					$str .= "---------------------------------------\n";
				}
				$objResponse->addAlert("Data Tidak Dapat Disimpan.\nNomor Rekam Medis Berikut Belum Kembali Ke Rak Penyimpanan :\n" . $str);
				$objResponse->addScriptCall("fokus", "no_rm");
			} else {
				$objResponse->addScriptCall("xajax_simpan_tracer", $val, $arr_no_rm);
			}
		}
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:56,代码来源:buat_tracer.php

示例3: submitForm

function submitForm($elems, $doneFunc = 'AjaxFormObj.checkDone', $errFunc = 'AjaxFormObj.checkError')
{
    global $lbl, $txt;
    $auth = R3AuthInstance::get();
    $fieldDescr = array('app_code' => array(MISSING_FIELD => !isset($txt['missing_fld_app']) ? _("Il campo 'applicazione' e' obbligatorio") : $txt['missing_fld_app'], INVALID_FIELD => "Il campo 'codice' contiene caratteri non validi. Solo lettere e numeri sono accettati", PK_ERROR => "Il campo 'codice' immesso esiste gia'"), 'app_name' => array(MISSING_FIELD => "Il campo 'nome' e' obbligatorio"));
    // print_r($elems);
    $elems = AjaxSplitArray($elems);
    //print_r($elems);
    $objResponse = new xajaxResponse();
    $error = array();
    try {
        if ($elems['act'] == 'add') {
            /** add a new acname */
            foreach (explode(',', str_replace(';', ',', $elems['ac_verb'])) as $verb) {
                $auth->addACName($elems['app_code'], strtoupper(trim($verb)), strtoupper(trim($elems['ac_name'])), trim($elems['ac_descr']), trim($elems['ac_order']), strtoupper($elems['ac_active']) == 'T', array('ac_type' => strtoupper($elems['ac_type'])));
            }
        } else {
            if ($elems['act'] == 'mod') {
                /** modify an acname */
                $auth->modACName($elems['old_app_code'], $elems['old_ac_verb'], $elems['old_ac_name'], $elems['app_code'], strtoupper(trim($elems['ac_verb'])), strtoupper(trim($elems['ac_name'])), trim($elems['ac_descr']), trim($elems['ac_order']), strtoupper($elems['ac_active']) == 'T', array('ac_type' => strtoupper($elems['ac_type'])));
            } else {
                if ($elems['act'] == 'del') {
                    /** delete an acname */
                    $auth->delACName($elems['app_code'], $elems['ac_verb'], $elems['ac_name']);
                } else {
                    throw new Exception('Invalid action');
                }
            }
        }
    } catch (EPermissionDenied $e) {
        $error['element'][] = '';
        $error['message'][] = $e->getMessage();
    } catch (EDatabaseError $e) {
        $error['element'][] = '';
        $error['message'][] = "Database error: " . $e->getMessage();
    } catch (EInputError $e) {
        $error['element'][] = $e->getField();
        if (isset($fieldDescr[$e->getField()][$e->getCode()])) {
            $error['message'][] = $fieldDescr[$e->getField()][$e->getCode()];
        } else {
            $error['message'][] = $e->getMessage();
        }
    } catch (Exception $e) {
        $error['element'][] = '';
        $error['message'][] = 'Generic error: ' . $e->getMessage();
    }
    // Action
    if (count($error) > 0) {
        $errText = (!isset($txt['err_store_failed']) ? _("Salvataggio fallito") . ":" : $txt['err_store_failed']) . "\n - " . implode("\n - ", $error['message']);
        $objResponse->addScriptCall($errFunc, $errText, $error['element'][0]);
    } else {
        $objResponse->addScriptCall($doneFunc);
    }
    return $objResponse->getXML();
}
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:55,代码来源:acnames_edit_ajax.php

示例4: callScript

function callScript()
{
    $response = new xajaxResponse();
    $value2 = "this is a string";
    $response->addScriptCall("myJSFunction", "arg1", 9432.120000000001, array("myKey" => "some value", "key2" => $value2));
    return $response;
}
开发者ID:hostinger,项目名称:revive-adserver,代码行数:7,代码来源:scriptCallTest.php

示例5:

    function tutup_resep_rawat_jalan() {
		$objResponse = new xajaxResponse;
		$objResponse->addScriptCall("enable_mainbar");
		$objResponse->addAssign("modal_resep_rawat_jalan", "style.display", "none");
		$objResponse->addScript("document.getElementById('input_resep_rawat_jalan').reset()");
		
		return $objResponse;
	}    
开发者ID:reekoheek,项目名称:srmis,代码行数:8,代码来源:resep_rajal.modal.php

示例6: ON

	function simpan_langsung_bayar($val) {
		$kon = new Konek;
		$objResponse = new xajaxResponse;
		$kon->sql = "SELECT kb.id as id, kb.bayar_bhp as bayar_bhp, kb.bayar_jasa as bayar_jasa, kb.mampu_bayar_bhp as mampu_bayar_bhp, kb.mampu_bayar_jasa as mampu_bayar_jasa FROM kunjungan_bayar kb JOIN kunjungan_kamar kk ON (kk.id = kb.kunjungan_kamar_id) JOIN kwitansi_detil kwd ON (kwd.kunjungan_bayar_id = kb.id) WHERE kk.kunjungan_id = '".$val[lb_id_kunjungan]."' AND kwd.kwitansi_id = '".$val[lb_id_kwitansi]."'";
		$kon->execute();
		$data = $kon->getAll();
		if(!empty($data)) {
			if($val[lb_mampu_bayar] < $val[lb_kurang]) $status = "ANGSUR";
			else $status = "LUNAS";
			$id_kwitansi = bikinKwitansi("KASIR", $val[lb_mampu_bayar], $status);
			$mampu = round($val[lb_mampu_bayar]/$val[lb_kurang], 2);
			//$objResponse->addAppend("debug", "innerHTML", $mampu . "<br />");
			$tot = 0;
			for($i=0;$i<sizeof($data);$i++) {
				$data[$i][angsuran_bhp] = round($data[$i][bayar_bhp] * $mampu);
				$data[$i][angsuran_jasa] = round($data[$i][bayar_jasa] * $mampu);
				$data[$i][pertambahan_bhp] += $data[$i][angsuran_bhp]-$data[$i][mampu_bayar_bhp];
				$data[$i][pertambahan_jasa] += $data[$i][angsuran_jasa]-$data[$i][mampu_bayar_jasa];
				$tot += $data[$i][angsuran_bhp] + $data[$i][angsuran_jasa];
				//$objResponse->addAppend("debug", "innerHTML", $data[$i][angsuran_bhp] . " - " . $data[$i][angsuran_jasa] . ", tot : ".$tot."<br />");
			}
			$selisih = ($val[lb_mampu_bayar]+$val[lb_sudah_dibayar]) - $tot;
			//$objResponse->addAppend("debug", "innerHTML", "selisih : " . $selisih . ", mampu bayar : " .$val[lb_mampu_bayar]. ", tot : ".$tot."<br />");
			if($data[0][angsuran_jasa]) {
				$data[0][angsuran_jasa] += $selisih;
			} else {
				$data[0][angsuran_bhp] += $selisih;
			}

			for($i=0;$i<sizeof($data);$i++) {
				$sql = "UPDATE kunjungan_bayar kb, kwitansi_detil kwd SET kb.mampu_bayar_bhp = '".$data[$i][angsuran_bhp]."', kb.mampu_bayar_jasa = '".$data[$i][angsuran_jasa]."' WHERE kwd.kunjungan_bayar_id = kb.id AND kb.id = '".$data[$i][id]."' AND kwd.kwitansi_id = '".$val[lb_id_kwitansi]."'";
				//$objResponse->addAppend("debug", "innerHTML", nl2br($sql) . "<br />");
				$kon->sql = $sql;
				$kon->execute();
				//pembayaran angsuran
				$sql = "INSERT INTO kwitansi_detil(kunjungan_bayar_id, kwitansi_id, angsuran_bhp, angsuran_jasa) VALUES ('".$data[$i][id]."', '".$id_kwitansi."', '".$data[$i][pertambahan_bhp]."', '".$data[$i][pertambahan_jasa]."')";
				//$objResponse->addAppend("debug", "innerHTML", nl2br($sql) . "<br />");
				$kon->sql = $sql;
				$kon->execute();
			}
			$id_kwitansi = tambahNol($id_kwitansi, 20);
			$objResponse->addScriptCall("cetak_kwitansi", "KASIR-" . $id_kwitansi);
			$objResponse->addScriptCall("show_status_simpan");
		} else {
			$objResponse->addAlert("Data Pembayaran Tidak Dapat Dirubah, karena : \n1. Kwitansi Sudah Dibuat atau\n2. Belum Terjadi Transaksi!");
		}
		$objResponse->addScriptCall("tutup_modal_lb");
		//$objResponse->addAssign("debug", "innerHTML", $sql);
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:50,代码来源:langsung_bayar_angsuran.modal.php

示例7: xajaxResponse

	function reset_dokter () {
		$objResponse = new xajaxResponse();
		$objResponse->addClear("id_dokter", "value");
		$objResponse->addClear("nama", "value");
		$objResponse->addClear("alamat", "value");
		$objResponse->addClear("telp", "value");
		$objResponse->addScriptCall("fokus", "spesialisasi_id");
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:9,代码来源:dokter.php

示例8: SUBSTRING


//.........这里部分代码省略.........
				AND kk.id = '".$idkk."'
			GROUP BY
				kb.id
			ORDER BY kb.id
		";
		$kon->execute();
		$data_karcis = $kon->getAll();
		if(!empty($data_karcis)) {
			$tabel->addRow("","<b>Karcis</b>","");
			for($i=0;$i<sizeof($data_karcis);$i++) {
				$tabel->addRow(
					($i+1),
					$data_karcis[$i][nama],
					uangIndo($data_karcis[$i][bayar])
				);
				$total += $data_karcis[$i][bayar];
				$sudah_dibayar += $data_karcis[$i][mampu_bayar];
				//belum bayar
				if(!$data_karcis[$i][kwitansi_id]) $kurang += $data_karcis[$i][bayar];
			}
		}

		//get data tindakan
		$kon->sql = "
			SELECT
				kki.nama as nama,
				SUM(kb.bayar_jasa) as bayar,
				SUM(kb.mampu_bayar_jasa) as mampu_bayar,
				kwd.kwitansi_id as kwitansi_id
			FROM
				kunjungan_kamar_icopim kki 
				JOIN kunjungan_bayar kb ON (kb.kunjungan_kamar_icopim_id = kki.id)
				LEFT JOIN kwitansi_detil kwd ON (kwd.kunjungan_bayar_id = kb.id)
			WHERE
				kb.icopim_detil_id IS NOT NULL
				AND kki.kunjungan_kamar_id = '".$idkk."'
			GROUP BY
				kki.id
			ORDER BY kki.id
		";
		$kon->execute();
		$data_tindakan = $kon->getAll();
		if(!empty($data_tindakan)) {
			$tabel->addRow("","<b>Tindakan</b>","");
			for($i=0;$i<sizeof($data_tindakan);$i++) {
				$tabel->addRow(
					($i+1),
					$data_tindakan[$i][nama],
					uangIndo($data_tindakan[$i][bayar])
				);
				$total += $data_tindakan[$i][bayar];
				$sudah_dibayar += $data_tindakan[$i][mampu_bayar];
				//belum bayar
				if(!$data_tindakan[$i][kwitansi_id]) $kurang += $data_tindakan[$i][bayar];
			}
		}


		//get data bhp
		$kon->sql = "
			SELECT
				kb.nama as nama,
				kb.bayar_bhp as bayar,
				kb.mampu_bayar_bhp as mampu_bayar,
				kwd.kwitansi_id as kwitansi_id
			FROM
				kunjungan_bayar kb
				JOIN kunjungan_kamar kk ON (kk.id = kb.kunjungan_kamar_id)
				LEFT JOIN kwitansi_detil kwd ON (kwd.kunjungan_bayar_id = kb.id)
			WHERE
				kb.bhp_id IS NOT NULL
				AND kk.id = '".$idkk."'
			GROUP BY
				kb.id
			ORDER BY kb.id
		";
		$kon->execute();
		$data_bhp = $kon->getAll();
		if(!empty($data_bhp)) {
			$tabel->addRow("","<b>Bahan Habis Pakai</b>","");
			for($i=0;$i<sizeof($data_bhp);$i++) {
				$tabel->addRow(
					($i+1),
					$data_bhp[$i][nama],
					uangIndo($data_bhp[$i][bayar])
				);
				$total += $data_bhp[$i][bayar];
				$sudah_dibayar += $data_bhp[$i][mampu_bayar];
				//belum bayar
				if(!$data_bhp[$i][kwitansi_id]) $kurang += $data_bhp[$i][bayar];
			}
		}
		
		$tabel->addRow("","<b>Total</b>", uangIndo($total));
		$tabel_jasa = $tabel->build();
		$tabel_jasa .= "<br />Terbilang : <i>" . terbilang($total) . "</i>";
		$objResponse->addAssign("lb_list_jasa", "innerHTML", $tabel_jasa);
		$objResponse->addScriptCall("disable_mainbar", "#E5E6E1");
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:101,代码来源:langsung_bayar.modal.php

示例9: NULLIF


//.........这里部分代码省略.........
				//UPDATE
				$sqlup = "UPDATE kunjungan_kendaraan SET jarak_tempuh = '".$val[input_jarak_tempuh]."', harga_bbm = '".$val[input_harga_bbm]."' WHERE id = '".$val[input_kunjungan_kendaraan_id][$parent]."'";
				$kon->sql = $sqlup;
				$kon->execute();
/*diinsert satu satu*/
				for($j=0;$j<sizeof($val[input_kendaraan_field][$parent]);$j++) {
					$field = "";
					$field = $val[input_kendaraan_field][$parent][$j];

					//$objResponse->addAppend("debug", "innerHTML", $field . " => " . $val[input_icopim_detil_bayar][$parent][$field] . "<br />");
					if($field == "jasa_rumah_sakit") {
						$sql = "UPDATE kunjungan_bayar SET hak_id = '".$val[input_kendaraan_hak][$parent][$j]."', biaya_jasa = '".$val[input_kendaraan_biaya][$parent][$j]."', bayar_jasa = '".$val[input_kendaraan_bayar][$parent][$j]."' WHERE id = '".$val[input_kunjungan_bayar_id][$parent][$j]."'";

					} elseif($field == "bahan_habis_pakai") {
						$sql = "UPDATE kunjungan_bayar SET hak_id = '".$val[input_kendaraan_hak][$parent][$j]."', biaya_bhp = '".$val[input_kendaraan_biaya][$parent][$j]."', bayar_bhp = '".$val[input_kendaraan_bayar][$parent][$j]."' WHERE id = '".$val[input_kunjungan_bayar_id][$parent][$j]."'";

					} elseif($field == "rumah_tangga") {
						$sql = "UPDATE kunjungan_bayar SET hak_id = '".$val[input_kendaraan_hak][$parent][$j]."', biaya_jasa = '".$val[input_kendaraan_biaya][$parent][$j]."', bayar_jasa = '".$val[input_kendaraan_bayar][$parent][$j]."' WHERE id = '".$val[input_kunjungan_bayar_id][$parent][$j]."'";
					
					} elseif($field == "sopir") {
						$sql = "UPDATE kunjungan_bayar SET hak_id = '".$val[input_kendaraan_hak][$parent][$j]."', biaya_jasa = '".$val[input_kendaraan_biaya][$parent][$j]."', bayar_jasa = '".$val[input_kendaraan_bayar][$parent][$j]."' WHERE id = '".$val[input_kunjungan_bayar_id][$parent][$j]."'";
					
					} elseif($field == "perawat") {
						$sql = "UPDATE kunjungan_bayar SET hak_id = '".$val[input_kendaraan_hak][$parent][$j]."', biaya_jasa = '".$val[input_kendaraan_biaya][$parent][$j]."', bayar_jasa = '".$val[input_kendaraan_bayar][$parent][$j]."' WHERE id = '".$val[input_kunjungan_bayar_id][$parent][$j]."'";
					
					} else {
						//lain-lain
					}
					//$objResponse->addAppend("debug", "innerHTML", $field . " => " . $sql . "<br /><br />");
					$kon->sql = $sql;
					$kon->execute();
				} //endfor

			}
			next($val[input_kendaraan_jenis]);
		}

        //simpan di database apotek
         //pasien id
         $usercreated = $_SESSION["username"];
         $unit_id = 4;
         $tgl=date("d/m/Y");
         
         if (!$val[input_no_resep]) {
         
             $sql="insert into db_apotek.resep_head (no_resep,param_no,pasien_id,created_datetime,created_user,tgl,unit_id) 
             values('".$val[input_no_resep]."','".$val[input_param_no]."','".$val[input_pasien_id]."',now(),'$usercreated','$tgl','$unit_id')";
             $kon->sql = $sql;
             $kon->execute();
         }
         else
         {
            $sql="update db_apotek.resep_head 
                  set 
                    param_no='".$val[input_param_no]."',
                    pasien_id='".$val[input_pasien_id]."',
                    created_datetime= now(),
                    created_user = '$usercreated',
                    tgl='$tgl',
                    unit_id=4 
                  where
					no_resep = '".$val[input_no_resep]."'"; 
            
             $kon->sql = $sql;
             $kon->execute();
         }   
         
         //BHP
         for($i = 0; $i < sizeof($val[input_bhp]); $i++) {
            $kunci = key($val[input_bhp]);
         
          //ambil kode barang
          $sql = "select db_apotek.ms_barang.id as id, db_apotek.ms_barang.kd_barang as kd_barang,db_apotek.ms_barang.nama as nama
          from db_apotek.ms_barang where db_apotek.ms_barang.id ='".$val[input_bhp][$i]."'";
 
         $kon->sql = $sql;
         $kon->execute();
         $ref = $kon->getOne(); //ambil data kd_barang
                 
         $date = date("d/m/Y");      
            
         $sql =  "INSERT INTO db_apotek.resep (no_resep, pasien_id, kode_obat, tgl, diminta,dosis_id,ket,racikan) 
		         VALUES ('".$val[input_no_resep]."','".$val[input_pasien_id]."', '".$ref[kd_barang].
                 "', '$date','".$val[input_bhp_jml][$i]."','".$val[input_dosis][$i]."','".$val[input_ket][$i]."','".$val[input_bhp_sifat][$i]."')";
         
         $kon->sql = $sql;
         $kon->execute();                 
              
           next($val[input_bhp]);
         }    

		if($afek < 0) {
			$objResponse->addAlert("Data Kunjungan Tidak Dapat Disimpan\nHubungi Bagian SIM.");
		} else {
			$objResponse->addScriptCall("list_data", "0");
			$objResponse->addScriptCall("tutup_kunjungan");
			$objResponse->addScriptCall("show_status_simpan");
		}
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:101,代码来源:kunjungan.modal.php

示例10: submitForm

function submitForm($elems, $doneFunc = 'AjaxFormObj.checkDone', $errFunc = 'AjaxFormObj.checkError')
{
    global $lbl, $txt, $users_extra_fields;
    $auth = R3AuthInstance::get();
    $fieldDescr = array('app_code' => array(MISSING_FIELD => _("Il campo 'applicazione' e' obbligatorio"), INVALID_FIELD => _("Il campo 'applicazione' contiene caratteri non validi. Solo lettere e numeri sono accettati"), PK_ERROR => _("Il campo 'codice' immesso esiste gia'")), 'app_name' => array(MISSING_FIELD => _("Il campo 'nome' e' obbligatorio")));
    // print_r($elems);
    $elems = AjaxSplitArray($elems);
    // print_r($elems);
    $objResponse = new xajaxResponse();
    /** User extra field for the common section */
    $extra_fields = $auth->getConfigValue('USER_MANAGER', 'EXTRA_FIELDS', array());
    if (isset($users_extra_fields)) {
        $extra_fields = array_merge($extra_fields, $users_extra_fields);
    }
    $error = array();
    try {
        $errors = checkReq($extra_fields, $elems);
        if (!empty($errors)) {
            $errorMsg = implode('\\n', $errors);
            throw new Exception($errorMsg);
        }
        if ($auth->passwordStatus < 0 && $elems['us_password'] == '') {
            throw new Exception('Password must be set');
        }
        /** Extra fields in user table */
        $extras = array();
        foreach ($extra_fields as $key => $val) {
            if (!isset($val['inistorage']) && !isset($val['kind'])) {
                if (isset($elems[$key])) {
                    $extras[$key] = $elems[$key];
                }
            }
        }
        /** password check */
        if ($elems['us_password'] != '' && $elems['us_password'] != $elems['us_password2']) {
            throw new Exception('Invalid password');
        }
        if ($elems['us_password'] != '') {
            $auth->setParam('us_password', $elems['us_password'], true);
        }
        foreach ($extras as $key => $val) {
            $auth->setParam($key, $val, true);
        }
        /** Extra fields in user table */
        foreach ($extra_fields as $key => $val) {
            if (isset($val['inistorage']) && !isset($val['kind'])) {
                if (isset($elems[$key])) {
                    $auth->setConfigValue($val['inistorage'][0], $val['inistorage'][1], $elems[$key]);
                }
            }
        }
    } catch (EPermissionDenied $e) {
        $error['element'][] = '';
        $error['message'][] = $e->getMessage();
    } catch (EDatabaseError $e) {
        $error['element'][] = '';
        $error['message'][] = "Database error: " . $e->getMessage();
    } catch (EInputError $e) {
        $error['element'][] = $e->getField();
        if (isset($fieldDescr[$e->getField()][$e->getCode()])) {
            $error['message'][] = $fieldDescr[$e->getField()][$e->getCode()];
        } else {
            $error['message'][] = $e->getMessage();
        }
    } catch (Exception $e) {
        $error['element'][] = '';
        //$error['message'][] = 'Generic error: ' . $e->getMessage();
        $error['message'][] = $e->getMessage();
    }
    // Action
    if (count($error) > 0) {
        $errText = $txt['err_store_failed'] . "\n - " . implode("\n - ", $error['message']);
        $objResponse->addScriptCall($errFunc, $errText, $error['element'][0]);
    } else {
        $objResponse->addScriptCall($doneFunc);
    }
    return $objResponse->getXML();
}
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:78,代码来源:personal_settings_ajax.php

示例11: xajaxResponse

	function reset_kamar () {
		$objResponse = new xajaxResponse();
		$objResponse->addClear("id_kamar", "value");
		$objResponse->addClear("nama", "value");
		$objResponse->addClear("pelayanan_id", "value");
		$objResponse->addClear("kelas", "value");
		$objResponse->addClear("jml_bed", "value");
		$objResponse->addScriptCall("fokus", "pelayanan_id");
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:10,代码来源:kamar.php

示例12: SUBSTRING

	function list_semua_kunjungan($hal, $pasien_id) {
		$paging = new MyPagina;
		$paging->hal = $hal;
		$paging->rows_on_page = 5;
		$sql = "
			SELECT 
				k.id as id_kunjungan,
				kk.id as id_kunjungan_kamar,
				k.kunjungan_ke as kunjungan_ke,
				kk.no_antrian as no_antrian,
				CONCAT_WS('-', SUBSTRING(p.id, 1,2), SUBSTRING(p.id, 3,2), SUBSTRING(p.id, 5,2), SUBSTRING(p.id, 7,2)) as no_rm,
				p.id as pasien_id,
				p.nama as nama,
				kmr.nama as kamar,
				kk.tgl_periksa as tgl_periksa,
				d.nama as nama_dokter
			FROM 
				kunjungan k
				JOIN pasien p ON (p.id = k.pasien_id)
				JOIN kunjungan_kamar kk ON (kk.kunjungan_id = k.id)
				JOIN kamar kmr ON (kmr.id = kk.kamar_id)
				LEFT JOIN dokter d ON (d.id = kk.dokter_id)
			WHERE
				p.id = '".$pasien_id."'
			ORDER BY 
				kk.id ASC
		";
		$paging->sql = $sql;
		$paging->onclick_func = "xajax_list_semua_kunjungan";
		$paging->setOnclickValue($pasien_id);
		$paging->get_page_result();

		$data = $paging->data;
		$no = $paging->start_number();
		$navi = $paging->navi();

		$objResponse = new xajaxResponse();
		//$objResponse->addAssign('debug', 'innerHTML', $sql);
		$objResponse->addScriptCall("buka_semua_kunjungan");
		$ret .= "<br /><b>No.RM : " . $data[0][no_rm] . "</b>";
		$ret .= "<br /><b>Pasien : " . $data[0][nama] . "</b>";
		$ret .= "<hr />";

		for($i=0;$i<sizeof($data);$i++) {
			
			$ret .= "<table cellpadding=\"0\" cellspacing=\"2\" border=\"0\">";
			$ret .= "<tr><td colspan=\"2\"><b>Kunjungan Ke-" . $data[$i][kunjungan_ke] ."</b></td></tr>";
			$ret .= "<tr><td style=\"width:150px\">Tanggal Kunjung</td><td>" . tanggalIndo($data[$i][tgl_periksa], "j F Y") . "</td></tr>";
			$ret .= "<tr><td>Pelayanan</td><td>" . $data[$i][kamar] . "</td></tr>";
			$ret .= "<tr><td>Dokter</td><td>" . $data[$i][nama_dokter] . "</td></tr>";
			$ret .= "</table>";
			$ret .= "<hr />";
		}
		$modal = new Modal;
		$modal->setNavi($navi);
		$modal->setTitle("Daftar Kunjungan");
		$modal->setContent($ret);
		$modal->setCloseButtonOnclick("tutup_semua_kunjungan()");
		$modal_cnt = $modal->build();
		//$objResponse->addAssign("list_semua_kunjungan_navi", "innerHTML", $navi);
		$objResponse->addAssign("list_semua_kunjungan", "innerHTML", $modal_cnt);
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:63,代码来源:cetak_tracer.php

示例13: GroupBan

function GroupBan($groupuri, $isgrpurl = "no", $queue = "no", $reason = "", $last = "")
{
    $objResponse = new xajaxResponse();
    if ($GLOBALS['config']['config.enablegroupbanning'] == 0) {
        return $objResponse;
    }
    global $userbank, $username;
    if (!$userbank->HasAccess(ADMIN_OWNER | ADMIN_ADD_BAN)) {
        $objResponse->redirect("index.php?p=login&m=no_access", 0);
        $log = new CSystemLog("w", "Ошибка доступа", $username . " пытался забанить группу '" . htmlspecialchars(addslashes(trim($groupuri))) . "', не имея на это прав.");
        return $objResponse;
    }
    if ($isgrpurl == "yes") {
        $grpname = $groupuri;
    } else {
        $url = parse_url($groupuri, PHP_URL_PATH);
        $url = explode("/", $url);
        $grpname = $url[2];
    }
    if (empty($grpname)) {
        $objResponse->addAssign("groupurl.msg", "innerHTML", "ошибка преобразования URL группы.");
        $objResponse->addScript("\$('groupurl.msg').setStyle('display', 'block');");
        return $objResponse;
    } else {
        $objResponse->addScript("\$('groupurl.msg').setStyle('display', 'none');");
    }
    if ($queue == "yes") {
        $objResponse->addScript("ShowBox('Ждите...', 'Банятся все участники выбранной группы... <br>Ждите...<br>Внимание: Это может занять 15 минут или дольше, в зависимости от количества участников группы!', 'info', '', true);");
    } else {
        $objResponse->addScript("ShowBox('Ждите...', 'Банятся все участники группы " . $grpname . "...<br>Ждите...<br>Внимание: Это может занять 15 минут или дольше, в зависимости от количества участников группы!', 'info', '', true);");
    }
    $objResponse->addScript("\$('dialog-control').setStyle('display', 'none');");
    $objResponse->addScriptCall("xajax_BanMemberOfGroup", $grpname, $queue, htmlspecialchars(addslashes($reason)), $last);
    return $objResponse;
}
开发者ID:BGCX261,项目名称:zion-downloads-css-svn-to-git,代码行数:35,代码来源:sb-callback.php

示例14: getOption

 function getOption($id)
 {
     $objResponse = new xajaxResponse("utf-8");
     global $db;
     $category_info = $db->assoc("Select cat_id, common_options From subcategories Where id = '{$id}'");
     if ($category_info['common_options'] == 'Y') {
         $common_options = $db->in_array("Select * From options Where cat_id = '" . $category_info['cat_id'] . "' and (subcat_id = '0' or subcat_id = '{$id}') order by name");
     } else {
         $common_options = $db->in_array("Select * From options Where subcat_id = '{$id}' and subcat_id <> '0' order by name");
     }
     $option_counter = 0;
     if ($common_options) {
         $result = '<div class="clear"></div><div class="mr_t10"><div class="fl_left w_110 mr_t8"><p class="fl_right"><span class="orange">*</span>Параметры:</p></div><div class="fl_left mr_l8"><div class="medium_select"><select name="option[' . $option_counter . ']">';
         $result .= '<option value="">' . $common_options[0]['name'] . '</option>';
         $label = $common_options[0]['name'];
         $option_counter++;
         for ($i = 0; $i < count($common_options); $i++) {
             if ($common_options[$i]['name'] == $label) {
                 if ($common_options[$i]['k'] == 'arr') {
                     $result .= '<option>' . $common_options[$i]['v'] . '</option>';
                 } else {
                     $start = explode('-', $common_options[$i]['k']);
                     for ($k = $start[0]; $k <= $start[1]; $k += $common_options[$i]['v']) {
                         $result .= '<option>' . $k . '</option>';
                     }
                 }
             } else {
                 $label = $common_options[$i]['name'];
                 $result .= '</select></div><div class="medium_select mr_t4"><div class="clear"></div><select class="slct fl_left mr_b0" name="option[' . $option_counter . ']">';
                 $result .= '<option>' . $common_options[$i]['name'] . '</option>';
                 $option_counter++;
                 if ($common_options[$i]['k'] == 'arr') {
                     $result .= '<option>' . $common_options[$i]['v'] . '</option>';
                 } else {
                     $start = explode('-', $common_options[$i]['k']);
                     for ($k = $start[0]; $k <= $start[1]; $k += $common_options[$i]['v']) {
                         $result .= '<option>' . $k . '</option>';
                     }
                 }
             }
         }
         $result .= '</select></div></div></div><div class="clear"></div>';
     } else {
         $result = "";
     }
     $objResponse->addScriptCall("addOption", $result);
     return $objResponse;
 }
开发者ID:RushCode,项目名称:oxDesk,代码行数:48,代码来源:edit_advertisement.php

示例15: xajaxResponse

 function _addComment($comment_text)
 {
     $xajax_response = new xajaxResponse();
     if ($comment_text == '') {
         $xajax_response->addAlert('Please enter a comment to submit.');
         $xajax_response->addScriptCall('commentAdded', '', '', '');
     } else {
         $new_comment = $this->article_model->InsertArticleComment($this->uri->segment(3), $this->user_auth->entityId, $comment_text);
         $xajax_response->addScriptCall('commentAdded', date('D jS F Y @ H:i', $new_comment['time']), $new_comment['name'], nl2br($comment_text));
     }
     return $xajax_response;
 }
开发者ID:TheYorkerArchive,项目名称:codebase-2006-2012,代码行数:12,代码来源:article.php


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