當前位置: 首頁>>代碼示例>>PHP>>正文


PHP xajaxResponse::addAlert方法代碼示例

本文整理匯總了PHP中xajaxResponse::addAlert方法的典型用法代碼示例。如果您正苦於以下問題:PHP xajaxResponse::addAlert方法的具體用法?PHP xajaxResponse::addAlert怎麽用?PHP xajaxResponse::addAlert使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在xajaxResponse的用法示例。


在下文中一共展示了xajaxResponse::addAlert方法的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: processPersonalData

function processPersonalData($aFormValues)
{
    $objResponse = new xajaxResponse();
    $bError = false;
    if (trim($aFormValues['firstName']) == "") {
        $objResponse->addAlert("Please enter your first name.");
        $bError = true;
    }
    if (trim($aFormValues['lastName']) == "") {
        $objResponse->addAlert("Please enter your last name.");
        $bError = true;
    }
    if (!preg_match("/^[a-zA-Z0-9]+[_a-zA-Z0-9-]*(\\.[_a-z0-9-]+)*@[a-z??????0-9]+(-[a-z??????0-9]+)*(\\.[a-z??????0-9-]+)*(\\.[a-z]{2,4})\$/i", $aFormValues['email'])) {
        $objResponse->addAlert("Please enter a valid email address.");
        $bError = true;
    }
    if (!$bError) {
        $_SESSION['newaccount']['firstname'] = $aFormValues['firstName'];
        $_SESSION['newaccount']['lastname'] = $aFormValues['lastName'];
        $_SESSION['newaccount']['email'] = $aFormValues['email'];
        $objResponse->addAssign("formDiv", "style.textAlign", "center");
        $sForm = "Account created.<br />Thank you.";
        $objResponse->addAssign("formDiv", "innerHTML", $sForm);
        $objResponse->addAssign("formWrapper", "style.backgroundColor", "rgb(67,97,149)");
        $objResponse->addAssign("outputDiv", "innerHTML", "\$_SESSION:<pre>" . var_export($_SESSION, true) . "</pre>");
    } else {
        $objResponse->addAssign("submitButton", "value", "done");
        $objResponse->addAssign("submitButton", "disabled", false);
    }
    return $objResponse;
}
開發者ID:jwest00724,項目名稱:AccountLab-Plus,代碼行數:31,代碼來源:signup.server.php

示例3: testAjax

/**
 * OpenX Schema Management Utility
 *
 * @author     Monique Szpak <monique.szpak@openx.org>
 *
 * $Id$
 *
 */
function testAjax($form)
{
    $objResponse = new xajaxResponse();
    $objResponse->addAlert('testing ajax');
    $objResponse->addAlert(print_r($form, true));
    return $objResponse;
}
開發者ID:ballistiq,項目名稱:revive-adserver,代碼行數:15,代碼來源:xajax.inc.php

示例4: testClassMethod

 function testClassMethod($formData)
 {
     $objResponse = new xajaxResponse();
     $objResponse->addAlert("This is a class method.");
     $objResponse->addAlert("formData: " . print_r($formData, true));
     $objResponse->addAssign("submittedDiv", "innerHTML", nl2br(print_r($formData, true)));
     return $objResponse->getXML();
 }
開發者ID:dapfru,項目名稱:gladiators,代碼行數:8,代碼來源:registerObjectTest.php

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

示例6: preMethod

 function preMethod($funcName, $args)
 {
     $objResponse = new xajaxResponse();
     if ($args[1] == 0) {
         $objResponse->addAlert($this->message . ", which will now call " . $funcName);
         return $objResponse;
     }
     $objResponse->addAlert($this->message . ", which will now end the request.");
     return array(false, $objResponse);
 }
開發者ID:hostinger,項目名稱:revive-adserver,代碼行數:10,代碼來源:preFunctionTest.php

示例7: confirmTest

function confirmTest()
{
    $objResponse = new xajaxResponse();
    $objResponse->addAlert("Here is an alert.");
    $objResponse->addConfirmCommands(2, "Are you sure you want to show two (2) more alerts?");
    $objResponse->addAlert("This will only happen if the user presses OK.");
    $objResponse->addAlert("This also will only happen if the user presses OK.");
    $objResponse->addAlert("This will always happen.");
    return $objResponse->getXML();
}
開發者ID:Spark-Eleven,項目名稱:revive-adserver,代碼行數:10,代碼來源:confirmTest.php

示例8: nuevaCuenta

function nuevaCuenta($datos)
{
    $objResponse = new xajaxResponse();
    $controlCuenta = new ManejadorCuenta();
    $resultado = $controlCuenta->registrarNuevaCuenta($datos[select], $datos[nombre], $datos[des]);
    if ($resultado) {
        $objResponse->addAlert("Nueva Cuenta registrada con exito");
    } else {
        $objResponse->addAlert("Error: La cuenta ya existe");
    }
    return $objResponse;
}
開發者ID:Ludmito16,項目名稱:proyectocontabilidad,代碼行數:12,代碼來源:registroCuenta.php

示例9: sendmail

function sendmail($formValues, $mailbody)
{
    $resp = new xajaxResponse();
    $resp->addAssign("state", "innerHTML", "<img src=\"images/loading.gif\">正在發送...");
    if (send_mail($formValues['mailto'], $formValues['subject'], $mailbody)) {
        $resp->addAssign("state", "innerHTML", "");
        $resp->addAlert("send ok");
    } else {
        $resp->addAlert($mailbody);
    }
    return $resp;
}
開發者ID:haseok86,項目名稱:millkencode,代碼行數:12,代碼來源:mail.php

示例10: enviar_mail

function enviar_mail($formulario)
{
    $respuesta = new xajaxResponse('utf-8');
    if ($formulario['nombre'] == "") {
        $error = "Por favor dinos tu nombre";
    } elseif ($formulario['email'] == "") {
        $error = "Por favor escribe un correo electrónico para comunicarnos";
    } elseif ($formulario['telefono'] == "") {
        $error = "Necesitamos un número telefónico para comunicarnos";
    } elseif ($formulario['mensaje'] == "") {
        $error = "Cual es tu mensaje ?";
    } else {
        $error = "";
    }
    if ($error != "") {
        $respuesta->addAlert("{$error}");
        return $respuesta;
    }
    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    $headers .= "From: NuestraRed.org <correo@nuestrared.org>\r\n";
    $headers .= "Reply-To: correo@nuestrared.org\r\n";
    $headers .= "Return-path: correo@nuestrared.org\r\n";
    $headers .= "Cc: correo@nuestrared.org" . "\r\n";
    $asunto = "Mensaje de Nuestra Red ";
    $cuerpo = "\n<img  src='http://nuestrared.org/images/logo.png' style='width:100%'>\nGracias <strong>{$formulario['nombre']}</strong> por comunicarse con <a href='NuestraRed.org'>NuestraRed.org</a>\n<div>\n<h3>{$asunto}</h3>\n<li><strong>Nombre</strong> {$formulario['nombre']}</li>\n<li><strong>Email</strong> {$formulario['email']}</li>\n<li><strong>Teléfono</strong> {$formulario['telefono']}</li>\n<li><strong>Mensaje</strong> {$formulario['mensaje']}</li>\n</div> \n<p>Sigue en contacto con <a href='NuestraRed.org'>NuestraRed.org</a></p>\n\n";
    if (mail("{$formulario['email']}", "{$asunto}", "{$cuerpo}", "{$headers}")) {
        $mensaje = "{$cuerpo}";
    } else {
        $mensaje = "<div class='alert alert-danger'><h2>Error enviando correo </h2>";
    }
    $respuesta->addAssign("div_contacto", "innerHTML", "{$mensaje}");
    //$respuesta->addAlert("Hola Mundo");
    return $respuesta;
}
開發者ID:kleper,項目名稱:NuestraRED,代碼行數:35,代碼來源:portal.php

示例11: test

function test()
{
    $objResponse = new xajaxResponse();
    $objResponse->addAlert("hallo");
    $objResponse->addAssign('testButton', 'label', 'Success!');
    return $objResponse->getXML();
}
開發者ID:udistrital,項目名稱:PROVEEDOR_PRODUCCION,代碼行數:7,代碼來源:xulServer.php

示例12: myErrorRiddenFunction

function myErrorRiddenFunction()
{
    $value = $silly['nuts'];
    $objResponse = new xajaxResponse();
    $objResponse->addAlert("Bad array value: {$value}");
    include "file_doesnt_exist.php";
    return $objResponse->getXML();
}
開發者ID:dapfru,項目名稱:gladiators,代碼行數:8,代碼來源:errorHandlingTest.php

示例13: testForm

function testForm($formData, $strText)
{
    global $useEncoding, $htmlEntities;
    $objResponse = new xajaxResponse($useEncoding, $htmlEntities);
    $objResponse->addAlert("formData: " . print_r($formData, true) . $strText);
    $objResponse->addAssign("submittedDiv", "innerHTML", nl2br(print_r($formData, true)) . '<br /><br />' . $strText);
    return $objResponse->getXML();
}
開發者ID:yunsite,項目名稱:gloryroad,代碼行數:8,代碼來源:charEncodingTest.php

示例14: asigna

function asigna($ultimo)
{
    $respuesta = new xajaxResponse();
    javascript:
    alert("funciona");
    $MSG = "Datos asignados con exito";
    $respuesta->addAlert($MSG);
    return $respuesta;
}
開發者ID:raulsuro,項目名稱:Faculty,代碼行數:9,代碼來源:add_material.php

示例15: xajaxResponse

	function simpan_perujuk_check($value) {
		$objResponse = new xajaxResponse();
		$value[nama] = addslashes(trim($value[nama]));
		if(!$value[nama])
			$objResponse->addAlert("Silakan Isi Nama Perujuk.");
		else 
			$objResponse->addScriptCall("xajax_simpan_perujuk", $value);
		return $objResponse;
	}
開發者ID:reekoheek,項目名稱:srmis,代碼行數:9,代碼來源:perujuk.php


注:本文中的xajaxResponse::addAlert方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。