本文整理汇总了PHP中redirige函数的典型用法代码示例。如果您正苦于以下问题:PHP redirige函数的具体用法?PHP redirige怎么用?PHP redirige使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了redirige函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action
/**
*
* controller for all actions on administrator
*
* @param \Symfony\Component\HttpFoundation\Request $request
*/
public function action(Request $request)
{
switch ($request->get("action")) {
case "modifier":
$noms = $request->request->get("nom");
$error = array();
foreach ($noms as $id => $nom) {
try {
AdministrateurAdmin::getInstance($id)->modify($nom, $request->request->get("prenom[" . $id . "]", null, true), $request->request->get("identifiant[" . $id . "]", null, true), $request->request->get("lang[" . $id . "]", null, true));
} catch (TheliaAdminException $e) {
$error[$id][] = $e->getCode();
}
}
if (!empty($error)) {
throw new TheliaAdminException("multiple errors", TheliaAdminException::ADMIN_MULTIPLE_ERRORS, null, $error);
}
redirige("gestadm.php");
break;
case "delete":
AdministrateurAdmin::getInstance($request->query->get("administrateur"))->delete();
break;
case "ajouter":
AdministrateurAdmin::getInstance()->add($request->request->get("nom"), $request->request->get("prenom"), $request->request->get("identifiant"), $request->request->get("password"), $request->request->get("verifyPassword"), $request->request->get("lang"), $request->request->get("profil"));
break;
case "modifier_password":
AdministrateurAdmin::getInstance($request->request->get("id"))->modifyPassword($request->request->get("password"), $request->request->get("verifyPassword"));
break;
case "change_droits_admin":
AdministrateurAdmin::getInstance($request->request->get("administrateur"))->changePermissions($request->request->get("profil"), $request->request->get("droits_g"), $request->request->get("droits_m"));
break;
}
}
示例2: add
public function add($nom)
{
$this->nom = $nom;
$this->unite = 0;
$this->id = parent::add();
redirige("zone.php?id=" . $this->id . "&action=showZone#zone");
}
示例3: action
public function action(Request $request)
{
switch ($request->get("action")) {
case "modClassementDeclinaison":
DeclinaisonAdmin::getInstance($request->query->get("id"))->modClassement($request->query->get("type"));
break;
case "supprimer":
DeclinaisonAdmin::getInstance($request->query->get("id"))->delete();
redirige("declinaison.php");
break;
case "ajouter":
DeclinaisonAdmin::getInstance()->ajouter($request->request->get("titre"), $request->request->get("ajoutrub"));
break;
case "modifier":
DeclinaisonAdmin::getInstance($request->request->get("id"))->modifier($request->request->get("titre"), $request->request->get("chapo"), $request->request->get("description"), $request->request->get("declinaisondesc_titre"), $request->request->get("lang"));
break;
case "delDeclidisp":
DeclinaisonAdmin::getInstance($request->query->get("id"))->delDeclidisp($request->query->get("declidisp_id"), $request->query->get("lang"));
break;
case "modClassementDeclidisp":
DeclinaisonAdmin::getInstance($request->query->get("id"))->modclassementdeclidisp($request->query->get("declidispdesc"), $request->query->get("type"), $request->query->get("lang"));
break;
case "setclassementdeclidisp":
DeclinaisonAdmin::getInstance($request->request->get("id"))->setclassementdeclidisp($request->request->get("desclidispdesc"), $request->request->get("newClassement"), $request->request->get("lang"));
break;
case "ajDeclidisp":
DeclinaisonAdmin::getInstance($request->request->get("id"))->ajDeclidisp($request->request->get("titre"), $request->request->get("lang"));
break;
}
}
示例4: action
public function action(Request $request)
{
switch ($request->get("action")) {
case "modClassementCaracteristique":
CaracteristiqueAdmin::getInstance($request->query->get("id"))->modifyOrder($request->query->get("type"));
redirige('caracteristique.php');
break;
case "supprimer":
CaracteristiqueAdmin::getInstance($request->query->get("id"))->delete();
redirige('caracteristique.php');
break;
case "ajouter":
CaracteristiqueAdmin::getInstance()->add($request->request->get("titre"), $request->request->get("affiche"), $request->request->get("ajoutrub"));
break;
case "setclassementcaracdisp":
CaracteristiqueAdmin::getInstance($request->request->get("id"))->setClassementCaracdisp($request->request->get("caracdispdesc"), $request->request->get("newClassement"), $request->request->get("lang"));
break;
case "modClassementCaracdisp":
CaracteristiqueAdmin::getInstance($request->query->get("id"))->modClassementCaracdisp($request->query->get("cacacdispdesc"), $request->query->get("type"), $request->query->get("lang"));
break;
case "modifier":
CaracteristiqueAdmin::getInstance($request->request->get("id"))->modifier($request->request->get("titre"), $request->request->get("chapo"), $request->request->get("description"), $request->request->get("affiche"), $request->request->get("caracdispdesc_titre"), $request->request->get("lang"));
break;
case "ajCaracdisp":
CaracteristiqueAdmin::getInstance($request->request->get("id"))->addCaracdisp($request->request->get("titre"), $request->request->get("lang"));
break;
case "delCaracdisp":
CaracteristiqueAdmin::getInstance($request->query->get("id"))->delCaracdisp($request->query->get("caracdisp"), $request->query->get("lang"));
break;
}
}
示例5: update_config
public function update_config()
{
if (!empty($_REQUEST['fichier'])) {
$_REQUEST[Tlog::VAR_FILES] = ltrim($_REQUEST[Tlog::VAR_FILES] . ";" . trim($_REQUEST['fichier']), ";");
}
foreach ($_REQUEST as $var => $value) {
if (!preg_match('/^tlog_/', $var)) {
continue;
}
$this->maj_variable($var, $value);
}
// Mise à jour des destinations
$actives = "";
foreach ($_REQUEST['destinations'] as $classname) {
if (isset($_REQUEST["{$classname}_actif"])) {
$actives .= $classname . ";";
foreach ($_REQUEST as $var => $valeur) {
if (strpos($var, "{$classname}_") !== false) {
$nom = str_replace("{$classname}_", "", $var);
if ($nom == 'actif') {
continue;
}
$this->maj_variable($nom, $valeur);
}
}
}
}
$this->maj_variable(self::VAR_DESTINATIONS, rtrim($actives, ";"));
redirige("logs.php");
}
示例6: refresh
/**
* Mettre à jour les taux de conversions par rapport à l'Euro
*/
public function refresh()
{
$file_contents = file_get_contents('http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml');
$devise = new Devise();
if ($file_contents && ($sxe = new SimpleXMLElement($file_contents))) {
foreach ($sxe->Cube[0]->Cube[0]->Cube as $last) {
$devise->query("UPDATE {$devise->table} SET taux='" . $devise->escape_string($last["rate"]) . "' WHERE code='" . $devise->escape_string($last["currency"]) . "'");
}
}
redirige("devise.php");
}
示例7: edit
public function edit($request)
{
foreach ($this->getList() as $variable) {
if ($this->charger_id($variable['id'])) {
$this->valeur = $request->request->get("valeur_" . $this->id);
$this->maj();
ActionsModules::instance()->appel_module("modvariable", new Variable($this->nom));
}
}
redirige("variable.php");
}
示例8: updateConfig
public function updateConfig()
{
if ('' != ($value = lireParam('white_list'))) {
$this->updateParam('htmlpurifier_whiteList', $value);
unset($_REQUEST['white_list']);
}
foreach ($_REQUEST as $key => $value) {
if (!preg_match('/^sanitize/', $key)) {
continue;
}
self::ecrire($key, $value);
}
redirige($_SERVER['PHP_SELF']);
}
示例9: ajouter
public function ajouter($nom)
{
$nom = trim($nom);
if (empty($nom)) {
throw new TheliaAdminException("Empty message name", TheliaAdminException::MESSAGE_NAME_EMPTY);
}
if (Message::exist_nom($nom)) {
throw new TheliaAdminException("Message already exists", TheliaAdminException::MESSAGE_ALREADY_EXISTS);
}
$message = new Message();
$message->nom = $nom;
$message->id = $message->add();
redirige("message_modifier.php?id=" . $message->id);
}
示例10: edit
public function edit($request)
{
$this->serveur = $request->request->get("serveur");
$this->port = $request->request->get("port");
$this->username = $request->request->get("username");
$this->password = $request->request->get("password");
$this->secure = $request->request->get("secure");
$this->active = $request->request->get("active");
if ($this->id > 0) {
$this->maj();
} else {
$this->id = 1;
$this->add();
}
redirige("smtp.php");
}
示例11: modification
function modification($serveur, $port, $username, $password, $secure, $active)
{
$smtp = new Smtpconfig();
$smtp->charger(1);
$smtp->serveur = $serveur;
$smtp->port = $port;
$smtp->username = $username;
$smtp->password = $password;
$smtp->secure = $secure;
if ($active == "on") {
$smtp->active = 1;
} else {
$smtp->active = 0;
}
if ($smtp->id != "") {
$smtp->maj();
} else {
$smtp->add();
}
redirige("smtp.php");
}
示例12: TheliaException
if ($_FILES['plugin']['error'] == UPLOAD_ERR_OK) {
$plugin = $_FILES['plugin']['tmp_name'];
$plugin_name = $_FILES['plugin']['name'];
ActionsAdminModules::instance()->installer($plugin, $plugin_name);
} else {
throw new TheliaException(trad("L'envoi du fichier a échoué", 'admin'), TheliaException::MODULE_ECHEC_UPLOAD);
}
}
break;
case 'modclassement':
$module = new Modules($id);
$module->changer_classement($id, $type);
redirige("plugins.php#mod_{$id}");
break;
}
redirige($_SERVER['PHP_SELF']);
}
// Mise a jour de la base suivant le contenu du repertoire plugins
ActionsAdminModules::instance()->mettre_a_jour();
} catch (Exception $ex) {
$message_erreur = $ex->getMessage() . ' (erreur ' . $ex->getCode() . ')';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
require_once "title.php";
?>
示例13: trim
$admin->valeur = $valeur;
$admin->nom = $nom;
$admin->prenom = $prenom;
$admin->identifiant = $identifiant;
$motdepasse1 = trim($motdepasse1);
$admin->motdepasse = $motdepasse1;
$admin->profil = $_POST['profil'];
$admin->crypter();
$lastid = $admin->add();
$autorisation_profil = new Autorisation_profil();
$query = "select * from {$autorisation_profil->table} where profil=\"" . $_POST['profil'] . "\"";
$resul = mysql_query($query, $autorisation_profil->link);
while ($row = mysql_fetch_object($resul)) {
$autorisation_administrateur = new Autorisation_administrateur();
$autorisation_administrateur->administrateur = $lastid;
$autorisation_administrateur->autorisation = $row->autorisation;
$autorisation_administrateur->lecture = $row->lecture;
$autorisation_administrateur->ecriture = $row->ecriture;
$autorisation_administrateur->add();
}
redirige("gestadm.php");
}
if ($action == "supprimer") {
$autorisation_administrateur = new Autorisation_administrateur();
$query = "delete from {$autorisation_administrateur->table} where administrateur=\"{$id}\"";
$resul = mysql_query($query, $autorisation_administrateur->link);
$admin = new Administrateur();
$admin->charger_id($id);
$admin->delete();
redirige("gestadm.php");
}
示例14: redirige
<?php
require_once __DIR__ . '/../auth.php';
$request = Symfony\Component\HttpFoundation\Request::createFromGlobals();
if ($request->isXmlHttpRequest() === false) {
redirige("../accueil.php");
}
if (!est_autorise("acces_contenu")) {
exit;
}
switch ($request->query->get('action')) {
case 'changeDisplay':
FolderAdmin::getInstance($request->query->get('folder_id'))->display($request->query->get('display'));
break;
}
示例15: trim
}
}
// Ajout éventuel d'une devise
if (intval($_REQUEST['flag_ajouter']) != 0) {
ActionsAdminDevises::instance()->ajouter(trim($ajout_nom), trim($ajout_taux), trim($ajout_symbole), trim($ajout_code));
}
} else {
if ($action == "supprimer") {
ActionsAdminDevises::instance()->supprimer($id);
} else {
if ($action == "refresh") {
ActionsAdminDevises::instance()->refresh();
}
}
}
redirige("devise.php");
}
$devises = ActionsAdminDevises::instance()->lister();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
require_once "title.php";
?>
<script type="text/javascript">
function confirmer_suppression() {
return confirm("<?php