本文整理汇总了PHP中Alert::alertMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP Alert::alertMessage方法的具体用法?PHP Alert::alertMessage怎么用?PHP Alert::alertMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Alert
的用法示例。
在下文中一共展示了Alert::alertMessage方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionCreate
/**
* Creates a new model.
* If creation is successful, the browser will be redirected to the 'view' page.
*/
public function actionCreate($id)
{
LoginForm::checkLogin();
$this->pageTitle = "Create Maternal Health Record";
if (!Patient::model()->findByPk($id)) {
Alert::alertMessage('danger', 'Patient does not exist.');
Yii::app()->getController()->redirect(array('patient/index'));
}
if (MaternalHealth::model()->findByAttributes(array('patient_id' => $id))) {
Alert::alertMessage('danger', 'Maternal Health Record for this patient already exists.');
Yii::app()->getController()->redirect(array('patient/view', 'id' => $id));
}
$model = new MaternalHealth();
$patient_model = Patient::model()->findByPk($id);
$model->patient_id = $patient_model->id;
// Uncomment the following line if AJAX validation is needed
$this->performAjaxValidation($model);
if (isset($_POST['MaternalHealth'])) {
$model->attributes = $_POST['MaternalHealth'];
if (isset($_POST['MaternalHealth']['checklist']) && $_POST['MaternalHealth']['checklist'] !== "") {
$model->checklist = implode(';', $_POST['MaternalHealth']['checklist']);
}
if ($model->save()) {
$this->redirect(array('view', 'id' => $model->id));
}
}
if (isset($model->checklist) && $model->checklist !== '') {
$model->checklist = explode(';', $model->checklist);
}
$this->render('create', array('model' => $model, 'patient_model' => $patient_model));
}
开发者ID:rlaput,项目名称:integrated-municipality-management-system,代码行数:35,代码来源:MaternalhealthController.php
示例2: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate($id)
{
LoginForm::checkLogin();
$this->pageTitle = "Update Patient";
$model = $this->loadModel($id);
// Uncomment the following line if AJAX validation is needed
$this->performAjaxValidation($model);
if (isset($_POST['Patient'])) {
$model->attributes = $_POST['Patient'];
if ($model->save()) {
Alert::alertMessage('success', 'Patient record updated successfully.');
}
}
$this->render('update', array('model' => $model));
}
示例3: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate($id)
{
LoginForm::checkAdminOrSelf($id);
$this->pageTitle = "Update User";
$model = $this->loadModel($id);
$this->performAjaxValidation($model);
if (isset($_POST['User'])) {
$model->attributes = $_POST['User'];
if ($model->save()) {
$model->password = LoginForm::encrypt($model->password);
$model->password_repeat = $model->password;
$model->save();
Alert::alertMessage('success', 'Account updated successfully.');
}
}
$this->render('update', array('model' => $model));
}
示例4: actionCreate
/**
* Creates a new model.
* If creation is successful, the browser will be redirected to the 'view' page.
*/
public function actionCreate($id)
{
LoginForm::checkLogin();
$this->pageTitle = "Create NTP Treatment Card";
if (!Patient::model()->findByPk($id)) {
Alert::alertMessage('danger', 'Patient does not exist.');
Yii::app()->getController()->redirect(array('patient/index'));
}
$model = new NtpTreatmentCard();
$patient_model = Patient::model()->findByPk($id);
$model->patient_id = $patient_model->id;
// Uncomment the following line if AJAX validation is needed
$this->performAjaxValidation($model);
if (isset($_POST['NtpTreatmentCard'])) {
$model->attributes = $_POST['NtpTreatmentCard'];
if (isset($_POST['NtpTreatmentCard']['type_of_patient']) && $_POST['NtpTreatmentCard']['type_of_patient'] !== "") {
$model->type_of_patient = implode(';', $_POST['NtpTreatmentCard']['type_of_patient']);
}
if (isset($_POST['NtpTreatmentCard']['category_1']) && $_POST['NtpTreatmentCard']['category_1'] !== "") {
$model->category_1 = implode(';', $_POST['NtpTreatmentCard']['category_1']);
}
if (isset($_POST['NtpTreatmentCard']['category_2']) && $_POST['NtpTreatmentCard']['category_2'] !== "") {
$model->category_2 = implode(';', $_POST['NtpTreatmentCard']['category_2']);
}
if (isset($_POST['NtpTreatmentCard']['category_3']) && $_POST['NtpTreatmentCard']['category_3'] !== "") {
$model->category_3 = implode(';', $_POST['NtpTreatmentCard']['category_3']);
}
if ($model->save()) {
$this->redirect(array('index'));
}
}
if (isset($model->type_of_patient) && $model->type_of_patient !== '') {
$model->type_of_patient = explode(';', $model->type_of_patient);
}
if (isset($model->category_1) && $model->category_1 !== '') {
$model->category_1 = explode(';', $model->category_1);
}
if (isset($model->category_2) && $model->category_2 !== '') {
$model->category_2 = explode(';', $model->category_2);
}
if (isset($model->category_3) && $model->category_3 !== '') {
$model->category_3 = explode(';', $model->category_3);
}
$this->render('create', array('model' => $model, 'patient_model' => $patient_model));
}
开发者ID:rlaput,项目名称:integrated-municipality-management-system,代码行数:49,代码来源:NtptreatmentcardController.php
示例5: actionCreate
/**
* Creates a new model.
* If creation is successful, the browser will be redirected to the 'view' page.
*/
public function actionCreate($id)
{
LoginForm::checkLogin();
$this->pageTitle = "Create NTP Laboratory Request";
if (!Patient::model()->findByPk($id)) {
Alert::alertMessage('danger', 'Patient does not exist.');
Yii::app()->getController()->redirect(array('patient/index'));
}
$model = new NtpLaboratoryRequest();
$patient_model = Patient::model()->findByPk($id);
$model->patient_id = $patient_model->id;
// Uncomment the following line if AJAX validation is needed
$this->performAjaxValidation($model);
if (isset($_POST['NtpLaboratoryRequest'])) {
$model->attributes = $_POST['NtpLaboratoryRequest'];
if ($model->save()) {
$this->redirect(array('view', 'id' => $model->id));
}
}
$this->render('create', array('model' => $model, 'patient_model' => $patient_model));
}
开发者ID:rlaput,项目名称:integrated-municipality-management-system,代码行数:25,代码来源:NtplaboratoryrequestController.php
示例6: actionCreate
/**
* Creates a new model.
* If creation is successful, the browser will be redirected to the 'view' page.
*/
public function actionCreate($id)
{
LoginForm::checkLogin();
$this->pageTitle = "Create Family Planning Service Record";
if (!Patient::model()->findByPk($id)) {
Alert::alertMessage('danger', 'Patient does not exist.');
Yii::app()->getController()->redirect(array('patient/index'));
}
if (FamilyPlanningService::model()->findByAttributes(array('patient_id' => $id))) {
Alert::alertMessage('danger', 'Family Planning Service Record for this patient already exists.');
Yii::app()->getController()->redirect(array('patient/view', 'id' => $id));
}
$model = new FamilyPlanningService();
$medical_history_model = new MedicalHistory();
$obstetrical_history_model = new ObstetricalHistory();
$physical_examination_model = new PhysicalExamination();
$pelvic_examination_model = new PelvicExamination();
$patient_model = Patient::model()->findByPk($id);
$model->patient_id = $patient_model->id;
// Uncomment the following line if AJAX validation is needed
$this->performAjaxValidation($model);
if (isset($_POST['FamilyPlanningService'])) {
$model->attributes = $_POST['FamilyPlanningService'];
if (isset($_POST['FamilyPlanningService']['method_accepted']) && $_POST['FamilyPlanningService']['method_accepted'] !== "") {
$model->method_accepted = implode(';', $_POST['FamilyPlanningService']['method_accepted']);
}
if ($model->save()) {
$medical_history_model->family_planning_service_id = $model->id;
$obstetrical_history_model->family_planning_service_id = $model->id;
$physical_examination_model->family_planning_service_id = $model->id;
$pelvic_examination_model->family_planning_service_id = $model->id;
if (isset($_POST['MedicalHistory'])) {
$medical_history_model->attributes = $_POST['MedicalHistory'];
if (isset($_POST['MedicalHistory']['heent']) && $_POST['MedicalHistory']['heent'] !== "") {
$medical_history_model->heent = implode(';', $_POST['MedicalHistory']['heent']);
}
if (isset($_POST['MedicalHistory']['chest_heart']) && $_POST['MedicalHistory']['chest_heart'] !== "") {
$medical_history_model->chest_heart = implode(';', $_POST['MedicalHistory']['chest_heart']);
}
if (isset($_POST['MedicalHistory']['abdomen']) && $_POST['MedicalHistory']['abdomen'] !== "") {
$medical_history_model->abdomen = implode(';', $_POST['MedicalHistory']['abdomen']);
}
if (isset($_POST['MedicalHistory']['genital']) && $_POST['MedicalHistory']['genital'] !== "") {
$medical_history_model->genital = implode(';', $_POST['MedicalHistory']['genital']);
}
if (isset($_POST['MedicalHistory']['extremities']) && $_POST['MedicalHistory']['extremities'] !== "") {
$medical_history_model->extremities = implode(';', $_POST['MedicalHistory']['extremities']);
}
if (isset($_POST['MedicalHistory']['skin']) && $_POST['MedicalHistory']['skin'] !== "") {
$medical_history_model->skin = implode(';', $_POST['MedicalHistory']['skin']);
}
if (isset($_POST['MedicalHistory']['other_history']) && $_POST['MedicalHistory']['other_history'] !== "") {
$medical_history_model->other_history = implode(';', $_POST['MedicalHistory']['other_history']);
}
}
if (isset($_POST['ObstetricalHistory'])) {
$obstetrical_history_model->attributes = $_POST['ObstetricalHistory'];
if (isset($_POST['ObstetricalHistory']['other_history']) && $_POST['ObstetricalHistory']['other_history'] !== "") {
$obstetrical_history_model->other_history = implode(';', $_POST['ObstetricalHistory']['other_history']);
}
}
if (isset($_POST['PhysicalExamination'])) {
$physical_examination_model->attributes = $_POST['PhysicalExamination'];
if (isset($_POST['PhysicalExamination']['conjunctiva']) && $_POST['PhysicalExamination']['conjunctiva'] !== "") {
$physical_examination_model->conjunctiva = implode(';', $_POST['PhysicalExamination']['conjunctiva']);
}
if (isset($_POST['PhysicalExamination']['neck']) && $_POST['PhysicalExamination']['neck'] !== "") {
$physical_examination_model->neck = implode(';', $_POST['PhysicalExamination']['neck']);
}
if (isset($_POST['PhysicalExamination']['breast']) && $_POST['PhysicalExamination']['breast'] !== "") {
$physical_examination_model->breast = implode(';', $_POST['PhysicalExamination']['breast']);
}
if (isset($_POST['PhysicalExamination']['thorax']) && $_POST['PhysicalExamination']['thorax'] !== "") {
$physical_examination_model->thorax = implode(';', $_POST['PhysicalExamination']['thorax']);
}
if (isset($_POST['PhysicalExamination']['abdomen']) && $_POST['PhysicalExamination']['abdomen'] !== "") {
$physical_examination_model->abdomen = implode(';', $_POST['PhysicalExamination']['abdomen']);
}
if (isset($_POST['PhysicalExamination']['extremities']) && $_POST['PhysicalExamination']['extremities'] !== "") {
$physical_examination_model->extremities = implode(';', $_POST['PhysicalExamination']['extremities']);
}
}
if (isset($_POST['PelvicExamination'])) {
$pelvic_examination_model->attributes = $_POST['PelvicExamination'];
if (isset($_POST['PelvicExamination']['perenium']) && $_POST['PelvicExamination']['perenium'] !== "") {
$pelvic_examination_model->perenium = implode(';', $_POST['PelvicExamination']['perenium']);
}
if (isset($_POST['PelvicExamination']['vagina']) && $_POST['PelvicExamination']['vagina'] !== "") {
$pelvic_examination_model->vagina = implode(';', $_POST['PelvicExamination']['vagina']);
}
if (isset($_POST['PelvicExamination']['cervix']) && $_POST['PelvicExamination']['cervix'] !== "") {
$pelvic_examination_model->cervix = implode(';', $_POST['PelvicExamination']['cervix']);
}
if (isset($_POST['PelvicExamination']['cervix_color']) && $_POST['PelvicExamination']['cervix_color'] !== "") {
$pelvic_examination_model->cervix_color = implode(';', $_POST['PelvicExamination']['cervix_color']);
}
//.........这里部分代码省略.........
开发者ID:rlaput,项目名称:integrated-municipality-management-system,代码行数:101,代码来源:FamilyplanningserviceController.php