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


PHP CAppUI::redirect方法代碼示例

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


在下文中一共展示了CAppUI::redirect方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: doStore

 /**
  * Store
  *
  * @return void
  */
 function doStore()
 {
     // keep track of former values for fieldModified below
     $obj = $this->_obj;
     $old = $obj->loadOldObject();
     if ($msg = $obj->store()) {
         CAppUI::setMsg($msg, UI_MSG_ERROR);
         if ($this->redirectError) {
             CAppUI::redirect($this->redirectError);
         }
     } else {
         // Keep trace for redirections
         CValue::setSession($this->objectKey, $obj->_id);
         // Insert new group and function permission
         if ($obj->fieldModified("function_id") || !$old->_id) {
             $obj->insFunctionPermission();
             $obj->insGroupPermission();
         }
         // Message
         CAppUI::setMsg($old->_id ? $this->modifyMsg : $this->createMsg, UI_MSG_OK);
         // Redirection
         if ($this->redirectStore) {
             CAppUI::redirect($this->redirectStore);
         }
     }
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:do_mediusers_aed.php

示例2: redirect

/**
 * Redirect to the last page
 *
 * @return void
 */
function redirect()
{
    if (CValue::post("ajax")) {
        echo CAppUI::getMsg();
        CApp::rip();
    }
    $m = CValue::post("m");
    $tab = CValue::post("tab");
    CAppUI::redirect("m={$m}&tab={$tab}");
}
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:15,代碼來源:do_translate_aed.php

示例3: viewMsg

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Urgences
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
function viewMsg($msg, $action, $txt = "")
{
    global $m, $tab;
    $action = CAppUI::tr($action);
    if ($msg) {
        CAppUI::setMsg("{$action}: {$msg}", UI_MSG_ERROR);
        CAppUI::redirect("m={$m}&tab={$tab}");
        return;
    }
    CAppUI::setMsg("{$action} {$txt}", UI_MSG_OK);
}
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:20,代碼來源:do_transfert_aed.php

示例4: mbGetObjectFromGetOrSession

/**
 * Returns the CMbObject with given GET or SESSION params keys,
 * if it doesn't exist, a redirect is made
 *
 * @param string $class_key The class name of the object
 * @param string $id_key    The object ID
 * @param string $guid_key  The object GUID (classname-id)
 *
 * @return CMbObject The object loaded or nothing
 **/
function mbGetObjectFromGetOrSession($class_key, $id_key, $guid_key = null)
{
    $object_class = CValue::getOrSession($class_key);
    $object_id = CValue::getOrSession($id_key);
    $object_guid = "{$object_class}-{$object_id}";
    if ($guid_key) {
        $object_guid = CValue::getOrSession($guid_key, $object_guid);
    }
    $object = CMbObject::loadFromGuid($object_guid);
    // Redirection
    if (!$object || !$object->_id) {
        global $ajax;
        CAppUI::redirect("ajax={$ajax}" . "&suppressHeaders=1" . "&m=system" . "&a=object_not_found" . "&object_guid={$object_guid}");
    }
    return $object;
}
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:26,代碼來源:mb_functions.php

示例5: redirect

 /**
  * Redirection facility
  *  
  * @param string $action Action view     
  * @param string $params HTTP GET styled paramters
  * 
  * @return void
  */
 function redirect($action = "access_denied", $params = null)
 {
     global $actionType;
     // on passe a null soit "tab" soit "a" selon ou l'on se trouve
     CValue::setSession($actionType);
     if ($this->setValues) {
         if (is_scalar($this->setValues)) {
             CValue::setSession($this->setValues);
         } else {
             foreach ($this->setValues as $key => $value) {
                 CValue::setSession($key, $value);
             }
         }
     }
     $action_params = "";
     foreach (array("wsdl", "info", "ajax", "raw", "dialog") as $_action_type) {
         $_action_flag = CValue::get($_action_type);
         if ($_action_flag) {
             $action_params .= "&{$_action_type}={$_action_flag}";
         }
     }
     $context_param = $this->context ? "&context={$this->context}" : "";
     CAppUI::redirect("m=system&a={$action}" . $context_param . $action_params . $params);
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:32,代碼來源:CCanDo.class.php

示例6: doRedirect

 function doRedirect($demandeSynchro = false)
 {
     if ($this->ajax) {
         if ($this->synchro) {
             $del = CValue::post("del", 0);
             $tmp_repas_id = CValue::post("_tmp_repas_id", 0);
             $msgSystem = CAppUI::getMsg();
             $smarty = new CSmartyDP("modules/dPrepas");
             $smarty->assign("del", $del);
             $smarty->assign("tmp_repas_id", $tmp_repas_id);
             $smarty->assign("demandeSynchro", $demandeSynchro);
             $smarty->assign("msgSystem", $msgSystem);
             $smarty->assign("callBack", $this->callBack);
             if ($demandeSynchro) {
                 $smarty->assign("object", $this->_old);
             }
             $smarty->display("add_del_repas_offline.tpl");
         }
         CApp::rip();
     }
     if ($this->redirect !== null) {
         CAppUI::redirect($this->redirect);
     }
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:24,代碼來源:do_repas_aed.php

示例7: clash_cancel

function clash_cancel(CAppUI $AppUI)
{
    global $a;
    $a = $_SESSION['add_event_caller'];
    clear_clash();
    $AppUI->setMsg($AppUI->_('Event Cancelled'), UI_MSG_ALERT);
    $AppUI->redirect();
}
開發者ID:viniciusbudines,項目名稱:sisnuss,代碼行數:8,代碼來源:cleanup_functions.php

示例8: doRedirect

 /**
  * Redirect at the end of the request
  *
  * @return void
  */
 function doRedirect()
 {
     if ($this->redirect === null) {
         return;
     }
     // Cas ajax
     if ($this->ajax) {
         $this->doCallback();
     }
     // Cas normal
     CAppUI::redirect($this->redirect);
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:17,代碼來源:CDoObjectAddEdit.class.php

示例9: max

        if ($plageAfter->_id) {
            $plageBefore->fin = $plageAfter->debut;
        } else {
            $plageBefore->fin = max($plageBefore->fin, $hour_next);
        }
        $plage =& $plageBefore;
    } elseif ($plageAfter->_id) {
        $plageAfter->debut = min($plageAfter->debut, $hour_now);
        $plage =& $plageAfter;
    } else {
        $plage->chir_id = $prat_id;
        $plage->date = $day_now;
        $plage->freq = "00:" . CPlageconsult::$minutes_interval . ":00";
        $plage->debut = $hour_now;
        $plage->fin = $hour_next;
        $plage->libelle = "automatique";
    }
    $plage->updateFormFields();
    if ($msg = $plage->store()) {
        CAppUI::setMsg($msg, UI_MSG_ERROR);
    }
}
$consult->plageconsult_id = $plage->_id;
if ($msg = $consult->store()) {
    CAppUI::setMsg($msg, UI_MSG_ERROR);
}
if ($current_m == "dPurgences") {
    CAppUI::redirect("m=dPurgences&tab=edit_consultation&selConsult={$consult->_id}&ajax={$ajax}");
} else {
    CAppUI::redirect("m=dPcabinet&tab=edit_consultation&selConsult={$consult->_id}&ajax={$ajax}");
}
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:do_change_prat_pec.php

示例10: CSmartyDP

} else {
    $affectation->loadRefSejour();
    $affectation->loadRefLit();
    $affectation->_ref_lit->loadCompleteView();
    $canAffectation = $affectation->canDo();
    if (!$canAffectation->read || !$affectation->_ref_sejour->sejour_id || $affectation->_ref_sejour->type == "ambu") {
        // Droit Interdit ou Ambulatoire
        CValue::setSession("affectation_id", null);
        $affectation_id = null;
        if (!$affectation->_canRead) {
            $msg = "Vous n'avez pas les droit suffisant pour cette affectation";
        } else {
            $msg = "Vous ne pouvez pas plannifier de repas pour cette affectation";
        }
        CAppUI::setMsg($msg, UI_MSG_ALERT);
        CAppUI::redirect("m=dPrepas&tab=vw_planning_repas");
    }
    // Chargement des Repas
    $listRepas = $listRepas->loadByDate($date, $typerepas_id);
    // Chargement Du Repas
    $affectation->loadMenu($date);
    $repas =& $affectation->_list_repas[$date][$typerepas_id];
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("affectation", $affectation);
$smarty->assign("typerepas_id", $typerepas_id);
$smarty->assign("date", $date);
$smarty->assign("listRepas", $listRepas);
$smarty->assign("repas", $repas);
$smarty->assign("typeRepas", $typeRepas);
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:31,代碼來源:vw_edit_repas.php

示例11: CPatient

 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 19840 $
 */
CCanDo::checkRead();
$sejour_id = CValue::get("sejour_id");
$patient_id = CValue::get("patient_id");
// Chargement du patient
$patient = new CPatient();
$patient->load($patient_id);
$patient->loadRefsCorrespondantsPatient();
// On récupére le séjour
$sejour = new CSejour();
if ($sejour_id) {
    $sejour->load($sejour_id);
    // On vérifie que l'utilisateur a les droits sur le sejour
    if (!$sejour->_canRead) {
        global $m, $tab;
        CAppUI::setMsg("Vous n'avez pas accés à ce séjour", UI_MSG_WARNING);
        CAppUI::redirect("m={$m}&tab={$tab}&sejour_id=0");
    }
    $patient = $sejour->_ref_patient;
} else {
    $sejour->patient_id = $patient->_id;
    $sejour->_ref_patient = $patient;
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("sejour", $sejour);
$smarty->assign("patient", $patient);
$smarty->assign("form", "editSejour");
$smarty->display("inc_vw_assurances.tpl");
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:ajax_list_assurances.php

示例12: foreach

            CAppUI::setMsg($msg, UI_MSG_ERROR);
        } else {
            CAppUI::setMsg("Manipulateur ajouté", UI_MSG_OK);
        }
    }
    foreach ($del_personnel as $_personnel_id) {
        if ($_personnel_id) {
            $affectation_personnel = new CAffectationPersonnel();
            $affectation_personnel->object_class = $obj->_class;
            $affectation_personnel->object_id = $obj->_id;
            $affectation_personnel->personnel_id = $_personnel_id;
            $affectation_personnel->loadMatchingObject();
            if ($affectation_personnel->_id) {
                if ($msg = $affectation_personnel->delete()) {
                    CAppui::setMsg($msg, UI_MSG_ERROR);
                } else {
                    CAppUI::setMsg("Personnel supprimé");
                }
            }
        }
    }
}
if ($ajax) {
    echo CAppUI::getMsg();
    CApp::rip();
}
if ($otherm = CValue::post("otherm", 0)) {
    $m = $otherm;
}
CAppUI::redirect("m={$m}");
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:30,代碼來源:do_plagesop_aed.php

示例13: CTypeAnesth

 * @subpackage Cabinet
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 24175 $
 */
CCanDo::checkRead();
// Utilisateur sélectionné ou utilisateur courant
$prat_id = CValue::getOrSession("chirSel", 0);
$userSel = CMediusers::get($prat_id);
$userSel->loadRefs();
$canUserSel = $userSel->canDo();
// Vérification des droits sur les praticiens
$listChir = CConsultation::loadPraticiens(PERM_EDIT);
if (!$userSel->isMedical()) {
    CAppUI::setMsg("Vous devez selectionner un professionnel de santé", UI_MSG_ALERT);
    CAppUI::redirect("m=dPcabinet&tab=0");
}
$canUserSel->needsEdit();
$selConsult = CValue::getOrSession("selConsult", 0);
$dossier_anesth_id = CValue::getOrSession("dossier_anesth_id", 0);
if (isset($_GET["date"])) {
    $selConsult = null;
    CValue::setSession("selConsult", 0);
}
$anesth = new CTypeAnesth();
$anesth = $anesth->loadGroupList();
// Consultation courante
$consult = new CConsultation();
$consult->_ref_chir = $userSel;
if ($selConsult) {
    $consult->load($selConsult);
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:httpreq_vw_choix_anesth.php

示例14: CService

CCanDo::checkRead();
$group_id = CGroups::loadCurrent()->_id;
$sejour_id = CValue::getOrSession("sejour_id");
$user = CMediusers::get();
$prats = $user->loadPraticiens(PERM_READ);
$service = new CService();
$where = array("group_id" => "= '{$group_id}'");
$order = "nom";
$services = $service->loadListWithPerms(PERM_READ, $where, $order);
$sejour = new CSejour();
$sejour->load($sejour_id);
$sejour->loadRefsNotes();
$sejour->loadRefsDocItems();
if ($sejour_id && !$sejour->_id) {
    CAppUI::setMsg(CAppUI::tr("CSejour-unavailable"), UI_MSG_WARNING);
    CAppUI::redirect("m=ssr&tab=vw_aed_sejour&sejour_id=0");
}
$fiche_autonomie = new CFicheAutonomie();
$patient = new CPatient();
$bilan = new CBilanSSR();
$prescription = null;
$lines = array();
$medecin_adresse_par = "";
$correspondantsMedicaux = array();
if ($sejour->_id) {
    $sejour->loadRefPatient();
    $sejour->loadNDA();
    // Chargement du patient
    $patient = $sejour->_ref_patient;
    $patient->loadIPP();
    $patient->loadRefsCorrespondants();
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:vw_aed_sejour_ssr.php

示例15: header

            }
            if ($success == 1) {
                $fileconvert = $file->loadPDFconverted();
                header("Location: lib/phpThumb/phpThumb.php?src={$fileconvert->_file_path}" . $finUrl);
            } else {
                header("Location: images/pictures/medifile.png");
            }
        } else {
            header("Location: images/pictures/medifile.png");
        }
    } else {
        // BEGIN extra headers to resolve IE caching bug (JRP 9 Feb 2003)
        // [http://bugs.php.net/bug.php?id=16173]
        header("Pragma: ");
        header("Cache-Control: ");
        header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
        header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
        header("Cache-Control: no-store, no-cache, must-revalidate");
        //HTTP/1.1
        header("Cache-Control: post-check=0, pre-check=0", false);
        // END extra headers to resolve IE caching bug
        header("MIME-Version: 1.0");
        header("Content-length: {$file->doc_size}");
        header("Content-type: {$file->file_type}");
        header('Content-disposition: ' . $disposition . '; filename="' . $file->file_name . '"');
        readfile($file->_file_path);
    }
} else {
    CAppUI::setMsg("fileIdError", UI_MSG_ERROR);
    CAppUI::redirect();
}
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:31,代碼來源:fileviewer.php


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