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


PHP xajaxResponse::addClear方法代码示例

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


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

示例1: xajaxResponse

	function clear_form($arr) {
		$objResponse = new xajaxResponse();
		for($i=0;$i<sizeof($arr);$i++) {
			$key = key($arr);
			$objResponse->addClear($key, "value");
			next($arr);
		}
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:9,代码来源:form.php

示例2:

  	function buka_resep_rajal($id_kunjungan_kamar) {
		$objResponse = new xajaxResponse;
		$kon = new Konek;
	
		//$objResponse->addAssign("debug", "innerHTML", $sql);
		//info utama
		$objResponse->addAssign("judul_daftar_ranap", "innerHTML", "Pendaftaran Pasien Rawat Inap");
		
        //tampilkan modal window input pesan kamar
		$objResponse->addClear("modal_resep_rawat_jalan", "style.display");
		$objResponse->addScriptCall("disable_mainbar", "#E5E6E1");
		$objResponse->addScriptCall('fokus', 'cara_bayar');
		return $objResponse;  
    }
开发者ID:reekoheek,项目名称:srmis,代码行数:14,代码来源:resep_rajal.modal.php

示例3: xajaxResponse

	function chat_kirim_pesan($val) {
		$kon = new Konek;
		$kon->sql = "
		INSERT INTO 
			pesan (pengirim_id, penerima_id, tgl_kirim, pesan) 
		VALUES (
			'".$_SESSION[pengguna_id]."', 
			NULLIF('".$val[chat_penerima_id]."',''), 
			NOW(), 
			'".$val[chat_pesan]."'
		)";
		$kon->execute();
		//hapus pesan lama
		$kon->sql = "DELETE FROM pesan LIMIT 1";
		$kon->execute();
		$objResponse = new xajaxResponse();
		$objResponse->addClear("chat_pesan", "value");
		$objResponse->addScriptCall("chat_get_pesan", "yes");
		$objResponse->addScriptCall("fokus", "chat_pesan");
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:21,代码来源:chat_rm.php

示例4: SUBSTRING


//.........这里部分代码省略.........
            $tgl = substr($data_obat['tgl'],3,2);
            
            
            if ($tgl == $date)
            {
            	$temp = $data_obat['param_no'];
            	$count = $temp + 1;
            }
            else
            {
            	$temp = 1;
            	$count = $temp;
            }
            
            //cek untuk ketersediaan record
            if (!$data_obat)
            {
            	$temp = 1;
            	$count = $temp;
            }
            
            
            $digit1 = (int) ($count % 10);
            $digit2 = (int) (($count % 100) / 10);
            $digit3 = (int) (($count % 1000) / 100);
            $digit4 = (int) (($count % 10000) / 1000);       
            
            
            $kd="RUGD/";
            	
            $no_resep = $kd . date("dmy")."$digit7" . "$digit6" . "$digit5" . "$digit4" . "$digit3" . "$digit2" . "$digit1";
            $param_no = $count;   


		$skr = date("Y-m-d");
		$usia = hitungUmur($data[tgl_lahir], $skr);
		$umur = empty($usia[tahun])?"":$usia[tahun] . "&nbsp;th&nbsp;&nbsp;";
		$umur .= empty($usia[bulan])?"":$usia[bulan] . "&nbsp;bl&nbsp;&nbsp;";
		$umur .= empty($usia[hari])?"":$usia[hari] . "&nbsp;hr&nbsp;&nbsp;";
		
		//$objResponse->addAssign("debug", "innerHTML", $sql);
		//info utama
         $objResponse->addAssign("input_pasien_id", "value", $data[pasien_id]);
         $objResponse->addAssign("input_param_no", "value", $param_no);
         $objResponse->addAssign("input_no_resep", "value", $no_resep);
         $objResponse->addAssign("no_resep", "innerHTML", $no_resep);
		$objResponse->addAssign("input_no_rm", "innerHTML", $data[no_rm]);
		$objResponse->addAssign("input_pasien", "innerHTML", $data[nama]);
		$objResponse->addAssign("input_sex", "innerHTML", $data[sex]);
		$objResponse->addAssign("input_usia", "innerHTML", $umur);
		$objResponse->addAssign("input_cara_masuk", "innerHTML", $data[cara_masuk]);
		$objResponse->addAssign("input_cara_bayar", "innerHTML", $data[cara_bayar]);
		$objResponse->addAssign("input_id_kunjungan_kamar", "value", $data[id_kunjungan_kamar]);
		$objResponse->addAssign("input_id_kunjungan", "value", $data[id_kunjungan]);
		$objResponse->addAssign("icopim_kelas", "value", $data[kelas]);
		
		$objResponse->addAssign("input_kunjungan_ke", "innerHTML", $data[kunjungan_ke]);
		$objResponse->addAssign("input_spesialisasi", "innerHTML", $data[spesialisasi]);
		$objResponse->addScriptCall("xajax_ref_get_dokter_from_kamar", "input_dokter_id", $data[id_kamar], $data[id_dokter]);

		//set default
		$kelanjutan = empty($data[kelanjutan])?"PULANG":$data[kelanjutan];
		$objResponse->addAssign("input_kelanjutan", "value", $kelanjutan);
		$keadaan_keluar = empty($data[keadaan_keluar])?"SEMBUH":$data[keadaan_keluar];
		$objResponse->addAssign("input_keadaan_keluar", "value", $keadaan_keluar);

		//tanggal keluar
		$tgl_keluar = explode("-", $data[tgl_keluar]);
		$objResponse->addAssign("input_tgl_keluar_thn", "value", $tgl_keluar[2]);
		$objResponse->addAssign("input_tgl_keluar_bln", "value", $tgl_keluar[1]);
		$objResponse->addAssign("input_tgl_keluar_tgl", "value", $tgl_keluar[0]);
		$wkt_keluar = explode(":", $data[wkt_keluar]);
		$objResponse->addAssign("input_tgl_keluar_jam", "value", $wkt_keluar[0]);
		$objResponse->addAssign("input_tgl_keluar_mnt", "value", $wkt_keluar[1]);

		$objResponse->addAssign("input_tgl_daftar", "innerHTML", tanggalIndo($data[tgl_daftar], 'j F Y'));
		$objResponse->addAssign("input_tgl_periksa", "innerHTML", tanggalIndo($data[tgl_daftar], 'j F Y'));

		//tab diagnosa_tindakan
		$objResponse->addAssign("input_diagnosa_utama", "value", $data[diagnosa_utama_id]);
		$objResponse->addAssign("input_diagnosa_utama_nama", "innerHTML", $data[diagnosa_utama_nama]);

		if(!empty($data_kc)) $objResponse->addScriptCall("xajax_get_karcis_from_kunjungan", $data_kc);
		if(!empty($data_bhp)) $objResponse->addScriptCall("xajax_get_bhp_from_kunjungan", $data_bhp);
		if(!empty($data_ic)) $objResponse->addScriptCall("xajax_get_icopim_from_kunjungan", $data_ic);
		if(!empty($data_kd)) {
			$objResponse->addScriptCall("xajax_get_kendaraan_from_kunjungan", $data_kd);
			$objResponse->addAssign("input_harga_bbm", "value", $data_kd[0][harga_bbm]);
			$objResponse->addAssign("input_jarak_tempuh", "value", $data_kd[0][jarak_tempuh]);
		} else {
			$objResponse->addAssign("input_harga_bbm", "value", $_SESSION[setting][harga_bbm]);
			$objResponse->addClear("input_jarak_tempuh", "value");
		}

		//tampilkan modal window input kunjungan
		$objResponse->addClear("modal_kunjungan", "style.display");
		$objResponse->addScriptCall("disable_mainbar", "#E5E6E1");
		$objResponse->addScriptCall("fokus", "input_dokter_id");
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:101,代码来源:kunjungan.modal.php

示例5: SUBSTRING

	function buka_langsung_bayar($idkw) {
		unset($_SESSION[kasir][kunjungan][jasa_cetak]);
		$kon = new Konek;
		//$kon->debug = 1;
		$objResponse = new xajaxResponse;
		//get data pasien
		$sql = "
			SELECT
				k.id as kunjungan_id,
				CONCAT_WS('-', SUBSTRING(p.id, 1,2), SUBSTRING(p.id, 3,2), SUBSTRING(p.id, 5,2), SUBSTRING(p.id, 7,2)) as id_display,
				p.nama as nama,
				p.tgl_lahir as tgl_lahir,
				CONCAT(p.alamat, ' ', IF(p.rt = '','',CONCAT(' RT ', p.rt)), IF(p.rw = '','',CONCAT(' RW ', p.rw)), ', ', des.nama, ', ', kec.nama, ', ', kab.nama) as alamat,
				kk.tgl_daftar as tgl_daftar,
				kk.tgl_periksa as tgl_periksa,
				pel.nama as nama_pelayanan,
				p.sex as jk,
				CONCAT_WS(' - ', kk.cara_bayar, kk.jenis_askes, rper.nama) as cara_bayar,
				kk.nomor as nomor
			FROM
				kunjungan_kamar kk
				JOIN kunjungan k ON (k.id = kk.kunjungan_id)
				JOIN pasien p ON (p.id = k.pasien_id)
				JOIN kamar kmr ON (kmr.id = kk.kamar_id)
				JOIN pelayanan pel ON (pel.id = kmr.pelayanan_id)
				JOIN kunjungan_bayar kb ON (kb.kunjungan_kamar_id = kk.id)
				JOIN kwitansi_detil kwd ON (kwd.kunjungan_bayar_id = kb.id)
				JOIN kwitansi kw ON (kw.id = kwd.kwitansi_id)
				JOIN ref_desa des ON (des.id = p.desa_id)
				JOIN ref_kecamatan kec ON (kec.id = des.kecamatan_id)
				JOIN ref_kabupaten kab ON (kab.id = kec.kabupaten_id)
				JOIN ref_propinsi prop ON (prop.id = kab.propinsi_id)
				LEFT JOIN ref_perusahaan rper ON (rper.id = kk.perusahaan_id)
			WHERE
				kw.id = '".$idkw."'
			GROUP BY
				p.id
		";
		//$objResponse->addAssign("debug", "innerHTML", $sql);
		$kon->sql = $sql;
		$kon->execute();
		$data_pasien = $kon->getOne();
		$arr_usia = hitungUmur($data_pasien[tgl_lahir], $data_pasien[tgl_periksa]);
		$data_pasien[usia] = empty($arr_usia[tahun])?"":$arr_usia[tahun] . " thn ";
		$data_pasien[usia] .= empty($arr_usia[bulan])?"":$arr_usia[bulan] . " bln ";
		$data_pasien[usia] .= empty($arr_usia[hari])?"":$arr_usia[hari] . " hr ";
		$objResponse->addClear("modal_lb", "style.display");
		$objResponse->addAssign("lb_id_kunjungan", "value", $data_pasien[kunjungan_id]);
		$objResponse->addAssign("lb_id_kwitansi", "value", $idkw);
		$objResponse->addAssign("lb_no_rm", "innerHTML", $data_pasien[id_display]);
		$objResponse->addAssign("lb_pasien", "innerHTML", $data_pasien[nama]);
		$objResponse->addAssign("lb_sex", "innerHTML", $data_pasien[jk]);
		$objResponse->addAssign("lb_usia", "innerHTML", $data_pasien[usia]);
		$objResponse->addAssign("lb_alamat", "innerHTML", $data_pasien[alamat]);
		$objResponse->addAssign("lb_tgl_daftar", "innerHTML", tanggalIndo($data_pasien[tgl_daftar], 'j F Y'));
		$objResponse->addAssign("lb_cara_bayar", "innerHTML", $data_pasien[cara_bayar]);
		$objResponse->addAssign("lb_nomor", "innerHTML", empty($data_pasien[nomor])?"-":$data_pasien[nomor]);
	
		//BIKIN SESSION UNTUK DICETAK
		$_SESSION[igd][langsung_bayar][data_px] = $data_pasien;

		$tabel = new Table;
		$tabel->cellspacing = "0";
		$tabel->scroll = false;
		$tabel->extra_table = "style=\"width:9cm;\"";
		$tabel->addTh("No", "Jasa", "Biaya");
		$tabel->addExtraTh("style=\"width:0.7cm;\"", "style=\"width:6.5cm;\"", "");
		//get data karcis
		$kon->sql = "
			SELECT
				kb.nama as nama,
				kb.bayar_bhp+kb.bayar_jasa as bayar,
				kb.mampu_bayar_bhp+kb.mampu_bayar_jasa as mampu_bayar,
				kwd.kwitansi_id as kwitansi_id
			FROM
				kunjungan_bayar kb
				JOIN kwitansi_detil kwd ON (kwd.kunjungan_bayar_id = kb.id)
				JOIN kunjungan_kamar kk ON (kk.id = kb.kunjungan_kamar_id)
			WHERE
				kb.karcis_id IS NOT NULL
				AND kwd.kwitansi_id = '".$idkw."'
			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
				$kurang += $data_karcis[$i][bayar]-$data_karcis[$i][mampu_bayar];
			}
//.........这里部分代码省略.........
开发者ID:reekoheek,项目名称:srmis,代码行数:101,代码来源:langsung_bayar_angsuran.modal.php

示例6: scribble

function scribble($aFormValues)
{
    $sHandle = $aFormValues['handle'];
    $sWords = $aFormValues['words'];
    $objResponse = new xajaxResponse();
    $objGraffiti = new graffiti($sHandle, $sWords);
    $sErrMsg = $objGraffiti->save();
    if (!$sErrMsg) {
        $objResponse->addScript("xajax_updateWall();");
        $objResponse->addClear("words", "value");
    } else {
        $objResponse->addAlert($sErrMsg);
    }
    return $objResponse;
}
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:15,代码来源:thewall.server.php

示例7: search_users

function search_users($needle, $type, $relation_type)
{
    global $tbl_user, $tbl_user_rel_access_url, $tbl_group_rel_user, $group_id;
    $xajax_response = new xajaxResponse();
    $return = $return_origin = $return_destination = '';
    $without_user_id = $without_user_id = $condition_relation = '';
    if (!empty($group_id) && !empty($relation_type)) {
        $group_id = intval($group_id);
        $relation_type = intval($relation_type);
        // get user_id from relation type and group id
        $sql = "SELECT user_id FROM {$tbl_group_rel_user}\n                WHERE group_id = '{$group_id}'\n                AND relation_type IN (" . GROUP_USER_PERMISSION_ADMIN . "," . GROUP_USER_PERMISSION_READER . "," . GROUP_USER_PERMISSION_PENDING_INVITATION . "," . GROUP_USER_PERMISSION_MODERATOR . ", " . GROUP_USER_PERMISSION_HRM . ") ";
        $res = Database::query($sql);
        $user_ids = array();
        if (Database::num_rows($res) > 0) {
            while ($row = Database::fetch_row($res)) {
                $user_ids[] = $row[0];
            }
            $without_user_id = " AND user.user_id NOT IN(" . implode(',', $user_ids) . ") ";
        }
        $condition_relation = " AND groups.relation_type = '{$relation_type}' ";
        // data for destination user list
        $sql = "SELECT user.user_id, user.username, user.lastname, user.firstname\n                FROM {$tbl_group_rel_user} groups\n                INNER JOIN  {$tbl_user} user ON user.user_id = groups.user_id\n                WHERE groups.group_id = '{$group_id}' {$condition_relation} ";
        $rs_destination = Database::query($sql);
        if (Database::num_rows($rs_destination) > 0) {
            $return_destination .= '<select id="destination_users" name="sessionUsersList[]" multiple="multiple" size="15" style="width:360px;">';
            while ($row = Database::fetch_array($rs_destination)) {
                $person_name = api_get_person_name($row['firstname'], $row['lastname']);
                $return_destination .= '<option value="' . $row['user_id'] . '">' . $person_name . ' (' . $row['username'] . ')</option>';
            }
            $return_destination .= '</select>';
        } else {
            $return_destination .= '<select id="destination_users" name="sessionUsersList[]" multiple="multiple" size="15" style="width:360px;"></select>';
        }
        $xajax_response->addAssign('ajax_destination_list', 'innerHTML', api_utf8_encode($return_destination));
    } else {
        $return_destination .= '<select id="destination_users" name="sessionUsersList[]" multiple="multiple" size="15" style="width:360px;"></select>';
        $xajax_response->addAssign('ajax_destination_list', 'innerHTML', api_utf8_encode($return_destination));
        if ($type == 'single') {
            $return .= '';
            $xajax_response->addAssign('ajax_list_users_single', 'innerHTML', api_utf8_encode($return));
        } else {
            $return_origin .= '<select id="origin_users" name="nosessionUsersList[]" multiple="multiple" size="15" style="width:360px;"></select>';
            $xajax_response->addAssign('ajax_origin_list_multiple', 'innerHTML', api_utf8_encode($return_origin));
        }
    }
    if (!empty($needle) && !empty($type)) {
        $user_anonymous = api_get_anonymous_id();
        $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username';
        if ($type == 'single') {
            if (!empty($group_id) && !empty($relation_type)) {
                // search users where username or firstname or lastname begins likes $needle
                $sql = "SELECT user_id, username, lastname, firstname\n                        FROM {$tbl_user} user\n                        WHERE (username LIKE '{$needle}%' OR firstname LIKE '{$needle}%' OR lastname LIKE '{$needle}%')\n                        AND user_id<>'{$user_anonymous}' {$without_user_id} {$order_clause} LIMIT 11";
                if (api_is_multiple_url_enabled()) {
                    $access_url_id = api_get_current_access_url_id();
                    if ($access_url_id != -1) {
                        $sql = "SELECT user.user_id, username, lastname, firstname FROM {$tbl_user} user\n                                INNER JOIN {$tbl_user_rel_access_url} url_user ON (url_user.user_id=user.user_id)\n                                WHERE access_url_id = '{$access_url_id}'  AND (username LIKE '{$needle}%' OR firstname LIKE '{$needle}%' OR lastname LIKE '{$needle}%')\n                                AND user.user_id<>'{$user_anonymous}' {$without_user_id} {$order_clause} LIMIT 11 ";
                    }
                }
                $rs_single = Database::query($sql);
                $i = 0;
                while ($user = Database::fetch_array($rs_single)) {
                    $i++;
                    if ($i <= 10) {
                        $person_name = api_get_person_name($user['firstname'], $user['lastname']);
                        $return .= '<a href="javascript: void(0);" onclick="javascript: add_user(\'' . $user['user_id'] . '\',\'' . $person_name . ' (' . $user['username'] . ')' . '\')">' . $person_name . ' (' . $user['username'] . ')</a><br />';
                    } else {
                        $return .= '...<br />';
                    }
                }
                $xajax_response->addAssign('ajax_list_users_single', 'innerHTML', api_utf8_encode($return));
            } else {
                $xajax_response->addAlert(get_lang('YouMustChooseARelationType'));
                $xajax_response->addClear('user_to_add', 'value');
            }
        } else {
            // multiple
            if (!empty($group_id) && !empty($relation_type)) {
                $sql = "SELECT user_id, username, lastname, firstname FROM {$tbl_user} user\n                        WHERE " . (api_sort_by_first_name() ? 'firstname' : 'lastname') . " LIKE '{$needle}%' AND user_id<>'{$user_anonymous}' {$without_user_id} {$order_clause} ";
                if (api_is_multiple_url_enabled()) {
                    $access_url_id = api_get_current_access_url_id();
                    if ($access_url_id != -1) {
                        $sql = "SELECT user.user_id, username, lastname, firstname\n                                FROM {$tbl_user} user\n                                INNER JOIN {$tbl_user_rel_access_url} url_user ON (url_user.user_id=user.user_id)\n                                WHERE\n                                    access_url_id = '{$access_url_id}' AND\n                                    " . (api_sort_by_first_name() ? 'firstname' : 'lastname') . " LIKE '{$needle}%' AND\n                                    user.user_id<>'{$user_anonymous}' {$without_user_id} {$order_clause} ";
                    }
                }
                $rs_multiple = Database::query($sql);
                $return_origin .= '<select id="origin_users" name="nosessionUsersList[]" multiple="multiple" size="15" style="width:360px;">';
                while ($user = Database::fetch_array($rs_multiple)) {
                    $person_name = api_get_person_name($user['firstname'], $user['lastname']);
                    $return_origin .= '<option value="' . $user['user_id'] . '">' . $person_name . ' (' . $user['username'] . ')</option>';
                }
                $return_origin .= '</select>';
                $xajax_response->addAssign('ajax_origin_list_multiple', 'innerHTML', api_utf8_encode($return_origin));
            }
        }
    }
    return $xajax_response;
}
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:97,代码来源:add_users_to_group.php

示例8: searchFormSubmit

function searchFormSubmit($searchFormValue, $numRows = null, $limit = null, $id = null, $type = null, $order = '')
{
    global $locate, $db;
    #print_r($searchFormValue);exit;
    $objResponse = new xajaxResponse();
    $searchField = array();
    $searchContent = array();
    $searchType = array();
    $optionFlag = $searchFormValue['optionFlag'];
    $searchContent = $searchFormValue['searchContent'];
    //搜索内容 数组
    $searchField = $searchFormValue['searchField'];
    //搜索条件 数组
    $searchType = $searchFormValue['searchType'];
    //搜索方式 数组
    $ordering = $searchFormValue['ordering'];
    $order = $searchFormValue['order'];
    $divName = "grid";
    $allOrAnswer = $searchFormValue['allOrAnswer'];
    #选中的radio值
    if ($optionFlag == "export" || $optionFlag == "exportcsv") {
        $fieldArray = array('mycdr.*', 'astercrm_accountgroup.groupname', 'astercrm_account.username');
        $leftjoinArray = array('astercrm_accountgroup' => array('astercrm_accountgroup.id', 'mycdr.astercrm_groupid'), 'astercrm_account' => array('astercrm_account.id', 'mycdr.accountid'));
        if ($searchFormValue['allOrAnswer'] == 'answered') {
            $searchContent[] = '0';
            $searchField[] = 'billsec';
            $searchType[] = 'more';
        }
        $sql = astercrm::getSql($searchContent, $searchField, $searchType, 'mycdr', $fieldArray, $leftjoinArray);
        //得到要导出的sql语句
        $_SESSION['export_sql'] = $sql;
        $objResponse->addAssign("hidSql", "value", $sql);
        //赋值隐含域
        $objResponse->addAssign("exporttype", "value", $optionFlag);
        $objResponse->addScript("document.getElementById('exportForm').submit();");
    } else {
        if ($type == "delete") {
            $res = Customer::deleteRecord($id, 'account');
            if ($res) {
                $html = createGrid('', '', $searchFormValue['numRows'], $searchFormValue['limit'], $searchField, $searchContent, $order, $divName, $ordering, $searchType, $allOrAnswer);
                $objResponse = new xajaxResponse();
                $objResponse->addAssign("msgZone", "innerHTML", $locate->Translate("delete_rec"));
            } else {
                $objResponse->addAssign("msgZone", "innerHTML", $locate->Translate("rec_cannot_delete"));
            }
        } else {
            $html .= createGrid('', '', $numRows, $limit, $searchField, $searchContent, $order, $divName, $ordering, $searchType, $allOrAnswer);
        }
        $objResponse->addClear("msgZone", "innerHTML");
        $objResponse->addAssign($divName, "innerHTML", $html);
    }
    return $objResponse->getXML();
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:53,代码来源:cdr.server.php

示例9: searchFormSubmit

function searchFormSubmit($searchFormValue, $numRows = null, $limit = null, $id = null, $type = null)
{
    global $locate, $db;
    $objResponse = new xajaxResponse();
    $searchField = array();
    $searchContent = array();
    $optionFlag = $searchFormValue['optionFlag'];
    $searchContent = $searchFormValue['searchContent'];
    //搜索内容 数组
    $searchField = $searchFormValue['searchField'];
    //搜索条件 数组
    $searchType = $searchFormValue['searchType'];
    $ordering = $searchFormValue['ordering'];
    $order = $searchFormValue['order'];
    $divName = "grid";
    if ($optionFlag == "export") {
        $sql = astercrm::getSql($searchContent, $searchField, $searchType, 'astercrm_account');
        //得到要导出的sql语句
        $_SESSION['export_sql'] = $sql;
        $objResponse->addAssign("hidSql", "value", $sql);
        //赋值隐含域
        $objResponse->addScript("document.getElementById('exportForm').submit();");
    } elseif ($optionFlag == "delete") {
        astercrm::deletefromsearch($searchContent, $searchField, $searchType, 'astercrm_account');
        $html = createGrid($searchFormValue['numRows'], $searchFormValue['limit'], '', '', $order, $divName, $ordering, '');
        $objResponse->addClear("msgZone", "innerHTML");
        $objResponse->addAssign($divName, "innerHTML", $html);
    } elseif ($type == "delete") {
        $arreglo =& Customer::getAllRecords($start, $limit, $order, $_SESSION['curuser']['groupid']);
        $content = '';
        foreach ($arreglo as $agents) {
            if ($agents['agent'] == $id) {
                continue;
            } else {
                $addstr = "\nagent => " . trim($agents['agent']) . ',' . trim($agents['password']) . ',' . trim($agents['name']);
            }
            $content .= $addstr;
        }
        $agentsfile = '/etc/asterisk/agents_astercc.conf';
        if ($fhandle = fopen($agentsfile, 'w')) {
            fwrite($fhandle, $content);
            $html = createGrid($searchFormValue['numRows'], $searchFormValue['limit'], $searchField, $searchContent, $order, $divName, $ordering, $searchType);
            $objResponse = new xajaxResponse();
            $objResponse->addAssign("msgZone", "innerHTML", $locate->Translate("delete_rec"));
            $objResponse->addAssign($divName, "innerHTML", $html);
        } else {
            $objResponse->addAssign("msgZone", "innerHTML", $locate->Translate("rec_cannot_delete"));
        }
    } else {
        $html = createGrid($numRows, $limit, $searchField, $searchContent, $order, $divName, $ordering, $searchType);
        $objResponse->addClear("msgZone", "innerHTML");
        $objResponse->addAssign($divName, "innerHTML", $html);
    }
    return $objResponse->getXML();
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:55,代码来源:agent.server.php

示例10: 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

示例11: searchFormSubmit

function searchFormSubmit($searchFormValue, $numRows = null, $limit = null, $id = null, $type = null)
{
    global $locate, $db, $config;
    $objResponse = new xajaxResponse();
    $searchField = array();
    $searchContent = array();
    $searchContent = $searchFormValue['searchContent'];
    //搜索内容 数组
    $searchField = $searchFormValue['searchField'];
    //搜索条件 数组
    $searchType = $searchFormValue['searchType'];
    $divName = "grid";
    if ($type == "delete") {
        if ($config['system']['portal_display_type'] == "note") {
            $res = Customer::deleteRecord($id, 'note');
        } else {
            $res = Customer::deleteRecord($id, 'customer');
        }
        if ($res) {
            $html = createGrid($searchFormValue['numRows'], $searchFormValue['limit'], $searchField, $searchContent, $searchField, $divName, "");
            $objResponse = new xajaxResponse();
            $objResponse->addAssign("msgZone", "innerHTML", $locate->Translate("delete_rec"));
        } else {
            $objResponse->addAssign("msgZone", "innerHTML", $locate->Translate("rec_cannot_delete"));
        }
    } else {
        $html = createGrid($numRows, $limit, $searchField, $searchContent, $searchField, $divName, "", $searchType);
    }
    $objResponse->addClear("msgZone", "innerHTML");
    $objResponse->addAssign($divName, "innerHTML", $html);
    return $objResponse->getXML();
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:32,代码来源:portal.server.php

示例12: xajaxResponse

	function reset_karcis () {
		$objResponse = new xajaxResponse();
		$objResponse->addClear("id_karcis", "value");
		$objResponse->addClear("nama", "value");
		$objResponse->addClear("jenis", "value");
		$objResponse->addClear("kelas", "value");
		$objResponse->addClear("biaya_bhp", "value");
		$objResponse->addClear("biaya_jasa", "value");
		$objResponse->addClear("bhp_p", "value");
		$objResponse->addClear("bhp_rs", "value");
		$objResponse->addClear("bhp_rs_adm", "value");
		$objResponse->addClear("bhp_rs_op", "value");
		$objResponse->addClear("jasa_p", "value");
		$objResponse->addClear("jasa_rs", "value");
		$objResponse->addClear("jasa_rs_op", "value");
		$objResponse->addClear("jasa_rs_kembang", "value");
		$objResponse->addClear("jasa_rs_adm", "value");
		$objResponse->addClear("jasa_rs_sdm", "value");
		$objResponse->addClear("spesialis", "value");
		$objResponse->addClear("spesialis_pendamping", "value");
		$objResponse->addClear("ugp", "value");
		$objResponse->addClear("grabaf", "value");
		$objResponse->addClear("perawat", "value");
		$objResponse->addClear("penunjang", "value");
		$objResponse->addClear("zakat", "value");
		$objResponse->addClear("pajak", "value");
		$objResponse->addClear("netto", "value");
		$objResponse->addScriptCall("fokus", "nama");
		return $objResponse;
	}
开发者ID:reekoheek,项目名称:srmis,代码行数:30,代码来源:karcis.php

示例13: archiveCDR

function archiveCDR($archiveDate)
{
    global $db, $locate, $config;
    $objResponse = new xajaxResponse();
    $date = date("Y-m-d");
    $end_date = date("Y-m-d", strtotime("{$date} - {$archiveDate} month"));
    if ($config['system']['useHistoryCdr'] == 1) {
        $table = 'historycdr';
    } else {
        $table = 'mycdr';
    }
    $sql = "SELECT calldate FROM {$table} WHERE calldate < '" . $end_date . "' ORDER BY calldate ASC LIMIT 1";
    $start_date = $db->getOne($sql);
    if ($start_date == '') {
        $objResponse->addAlert($locate->Translate('no cdr data early than') . " " . $archiveDate . " " . $locate->Translate('months'));
        $objResponse->addAssign("divMsg", "style.visibility", "hidden");
        $objResponse->addClear("msgZone", "innerHTML");
        return $objResponse->getXML();
    }
    $file_dir = $config['system']['upload_file_path'] . "cdr_archive";
    if (!is_dir($file_dir)) {
        if (!mkdir($file_dir)) {
            $objResponse->addAlert($locate->Translate('cant create archive directory'));
            $objResponse->addAssign("divMsg", "style.visibility", "hidden");
            $objResponse->addClear("msgZone", "innerHTML");
            return $objResponse->getXML();
        }
    }
    $start_date = split('\\ ', $start_date);
    $start_date = $start_date['0'];
    $file_name = $start_date . "_to_" . $end_date;
    if (!($handle = fopen($file_dir . "/" . $file_name . ".csv", 'x'))) {
        $objResponse->addAlert($locate->Translate('cant create archive file'));
        $objResponse->addAssign("divMsg", "style.visibility", "hidden");
        $objResponse->addClear("msgZone", "innerHTML");
        return $objResponse->getXML();
    }
    $sql = "SELECT * FROM {$table} WHERE calldate < '" . $end_date . "' ORDER BY calldate ASC";
    $archiveData = astercrm::exportDataToCSV($sql);
    if (!fwrite($handle, $archiveData)) {
        $objResponse->addAlert($locate->Translate('cant create archive file'));
        $objResponse->addAssign("divMsg", "style.visibility", "hidden");
        $objResponse->addClear("msgZone", "innerHTML");
        return $objResponse->getXML();
    }
    fclose($handle);
    system("tar zcf " . $file_dir . "/" . $file_name . ".tar.gz " . $file_dir . "/" . $file_name . ".csv", $r);
    if ($r === false) {
        $final_file = $file_dir . "/" . $file_name . ".csv";
    } else {
        $final_file = $file_dir . "/" . $file_name . ".tar.gz";
        unlink($file_dir . "/" . $file_name . ".csv");
    }
    $objResponse->addAlert($locate->Translate('archive success') . ", " . $locate->Translate('file save in') . ": " . $final_file);
    $sql = "DELETE FROM {$table} WHERE calldate < '" . $end_date . "'";
    $res = $db->query($sql);
    if ($res == 1) {
        $objResponse->addAlert($locate->Translate('clear cdr date success'));
    } else {
        $objResponse->addAlert($locate->Translate('clear cdr date failed'));
    }
    $html = createGrid(0, ROWSXPAGE);
    $objResponse->addAssign("divMsg", "style.visibility", "hidden");
    $objResponse->addClear("msgZone", "innerHTML");
    $objResponse->addAssign("grid", "innerHTML", $html);
    return $objResponse->getXML();
    //echo $file_name;exit;
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:68,代码来源:cdr.server.php

示例14: xajaxResponse

      function daftar_dari_cari($value) {
         $objResponse = new xajaxResponse();
         $objResponse->addScript("document.tambah_pasien.reset()");
         $objResponse->addScriptCall("show_hide_form", "form_tambah");
         $objResponse->addClear("id_pasien", "value");
         $objResponse->addAssign("id", "value", $value[cari_id]);
         $objResponse->addAssign("nama", "value", $value[cari_nama]);
         $objResponse->addAssign("alamat", "value", $value[cari_alamat]);
         $objResponse->addAssign("rt", "value", $value[cari_rt]);
         $objResponse->addAssign("rw", "value", $value[cari_rw]);
         $objResponse->addAssign("propinsi_id", "value", $value[cari_propinsi_id]);
         $objResponse->addAssign("sex", "value", $value[cari_sex]);

         $objResponse->addScriptCall("xajax_get_kabupaten", $value[cari_propinsi_id], $value[cari_kabupaten_id]);
         $objResponse->addScriptCall("xajax_get_kecamatan", $value[cari_kabupaten_id], $value[cari_kecamatan_id]);
         $objResponse->addScriptCall("xajax_get_desa", $value[cari_kecamatan_id], $value[cari_desa_id]);
         $objResponse->addScriptCall("fokus", "nama");
         return $objResponse;
      }
开发者ID:reekoheek,项目名称:srmis,代码行数:19,代码来源:sub.pencarian.php

示例15: searchFormSubmit

function searchFormSubmit($searchFormValue, $numRows, $limit, $id, $type)
{
    global $locate, $db, $config;
    $objResponse = new xajaxResponse();
    $searchField = array();
    $searchContent = array();
    $optionFlag = $searchFormValue['optionFlag'];
    $searchContent = $searchFormValue['searchContent'];
    //搜索内容 数组
    $searchField = $searchFormValue['searchField'];
    //搜索条件 数组
    $searchType = $searchFormValue['searchType'];
    //搜索方式 数组
    $divName = "grid";
    if ($optionFlag == "export") {
        $sql = astercrm::getSql($searchContent, $searchField, $searchType, 'clid');
        //得到要导出的sql语句
        $_SESSION['export_sql'] = $sql;
        $objResponse->addAssign("hidSql", "value", $sql);
        //赋值隐含域
        $objResponse->addScript("document.getElementById('exportForm').submit();");
    } elseif ($optionFlag == "delete") {
        if (empty($_SESSION['curuser']['usertype'])) {
            $objResponse->addAlert($locate->Translate("Session time out,please try again"));
            return $objResponse->getXML();
        }
        if ($_SESSION['curuser']['usertype'] == 'groupadmin') {
            $searchContent[] = $_SESSION['curuser']['groupid'];
            $searchField[] = 'groupid';
            $searchType[] = 'equal';
        } elseif ($_SESSION['curuser']['usertype'] == 'reseller') {
            $searchContent[] = $_SESSION['curuser']['resellerid'];
            $searchField[] = 'resellerid';
            $searchType[] = 'equal';
        }
        if ($config['synchronize']['delete_by_use_history']) {
            astercrm::deleteToHistoryFromSearch($searchContent, $searchField, $searchType, 'clid');
        } else {
            astercrm::deletefromsearch($searchContent, $searchField, $searchType, 'clid');
        }
        $html = createGrid($numRows, $limit, '', '', '', $divName, "", $searchType);
        $objResponse->addClear("msgZone", "innerHTML");
        $objResponse->addAssign($divName, "innerHTML", $html);
    } elseif ($type == "delete") {
        if (empty($_SESSION['curuser']['usertype'])) {
            $objResponse->addAlert($locate->Translate("Session time out,please try again"));
            return $objResponse->getXML();
        }
        if ($config['synchronize']['delete_by_use_history']) {
            $res = Customer::deleteRecordToHistory('id', $id, 'clid');
        } else {
            $res = Customer::deleteRecord($id, 'clid');
        }
        if ($res) {
            $html = createGrid($searchFormValue['numRows'], $searchFormValue['limit'], $searchField, $searchContent, $searchField, $divName, "", $searchType);
            $objResponse->addAssign("msgZone", "innerHTML", $locate->Translate("record deleted"));
            $objResponse->addAssign($divName, "innerHTML", $html);
        } else {
            $objResponse->addAssign("msgZone", "innerHTML", $locate->Translate("record cannot be deleted"));
        }
    } else {
        $html = createGrid($numRows, $limit, $searchField, $searchContent, $searchField, $divName, "", $searchType);
        $objResponse->addClear("msgZone", "innerHTML");
        $objResponse->addAssign($divName, "innerHTML", $html);
    }
    return $objResponse->getXML();
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:67,代码来源:clid.server.php


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