Esempio n. 1
0
$mail = $_POST["mail"];
//debug($_POST);
if ($act != "" and $act != 3) {
    // Traitement des champs a insérer
    if (!$nom || !$ville) {
        $mess = getError(4);
    } else {
        switch ($act) {
            case 1:
                // ajout d'un epn
                $idespace = addEspace($nom, $adresse, $ville, $tel, $fax, $logoespace, $couleur, $mail);
                if (FALSE == $idespace) {
                    header("Location: ./index.php?a=43&mesno=0");
                } else {
                    copyhoraires($idespace);
                    copyconfig($idespace, '0', $nom);
                    header("Location: ./index.php?a=43");
                }
                break;
            case 2:
                // modifie un espace
                if (FALSE == modEspace($id, $nom, $adresse, $ville, $tel, $fax, $logoespace, $couleur, $mail)) {
                    header("Location: ./index.php?a=43&mesno=0");
                } else {
                    modifconfigespace($id, $nom, 2, '', '');
                    header("Location: ./index.php?a=43");
                }
                break;
        }
    }
}
Esempio n. 2
0
         if ($langmark == $val['mark']) {
             metsave('-1', $lang_langnamerepeat, $depth);
         }
         if ($val['order'] == $langorder) {
             metsave('-1', $lang_langnameorder, $depth);
         }
     }
 }
 $met_webhtm = $met_langok[$langfile]['met_webhtm'];
 $met_htmtype = $met_langok[$langfile]['met_htmtype'];
 $met_weburl = $met_langok[$langfile]['met_weburl'];
 $re = copyconfig();
 if ($re != 1) {
     $langdlok = 0;
     $langfile = $met_index_type;
     copyconfig();
     $retxt = $lang_jsok . '<br/>' . $lang_langadderr6;
 }
 $query = "INSERT INTO {$met_lang} SET\n\t\t\t\tname          = '{$langname}',\n\t\t\t\tuseok         = '{$languseok}',\n\t\t\t\tno_order      = '{$langorder}',\n\t\t\t\tmark          = '{$langmark}',\n\t\t\t\tsynchronous   = '{$synchronous}',\n\t\t\t\tflag          = '{$langflag}',\n\t\t\t\tlink          = '{$langlink}',\n\t\t\t\tnewwindows    = '{$langnewwindows}',\n\t\t\t\tmet_webhtm    = '{$met_webhtm}',\n\t\t\t\tmet_htmtype   = '{$met_htmtype}',\n\t\t\t\tmet_weburl    = '{$met_weburl}',\n\t\t\t\tlang          = '{$langmark}'\n\t\t\t";
 $db->query($query);
 $query = "INSERT INTO {$met_admin_array} set array_name='{$lang_access1}',admin_type='',admin_ok='0',admin_op='',admin_issueok='0',admin_group='0',user_webpower='1',array_type='1',lang='{$langmark}',langok=''";
 $db->query($query);
 $query = "INSERT INTO {$met_admin_array} set array_name='{$lang_access2}',admin_type='',admin_ok='0',admin_op='',admin_issueok='0',admin_group='0',user_webpower='2',array_type='1',lang='{$langmark}',langok=''";
 $db->query($query);
 if ($met_index_type1) {
     if ($languseok) {
         $met_index_type = $langmark;
         require_once $depth . '../include/config.php';
     } else {
         $retxt = $retxt ? $retxt . '<br/>' . $lang_langexplain12 : $lang_jsok . $lang_langexplain12;
     }