$datas['Hydrogene'] = 0;
    $datas['PropImpulsion'] = 0;
    $datas['PropWarp'] = 0;
    $datas['PropConsommation'] = 0;
    $datas['ArmType'] = 0;
    $datas['ArmDegat'] = 0;
    $datas['ArmManiabilite'] = 0;
    $datas['ProtType'] = 0;
    $datas['ProtChasseur'] = 0;
    $datas['ProtGVG'] = 0;
    $datas['EquipType'] = 0;
    $datas['EquipNiv'] = 0;
}
if (isset($_POST['submit'])) {
    if (($_POST['submit'] == 'Sauver' || $_POST['submit'] == 'Sauver et retour') && $datas_id > 0) {
        mysql_update_array('SQL_PREFIX_Modules_Template', '`ID`=' . $datas_id, $datas);
        if ($_POST['submit'] == 'Sauver et retour') {
            header('Location: template_list.php#ID' . $datas_id);
            exit;
        }
    } elseif ($_POST['submit'] == 'SUPPRIMER' && $datas_id > 0) {
        $mysql_result = DataEngine::sql('DELETE FROM `SQL_PREFIX_Modules_Template` WHERE `ID`=' . $datas_id) or die(mysql_error());
        $mysql_result = DataEngine::sql('DELETE FROM `SQL_PREFIX_Modules_Users` WHERE `Module_ID`=' . $datas_id) or die(mysql_error());
        header('Location: template_list.php');
        exit;
    } elseif ($_POST['submit'] == 'Sauver sous nouveau') {
        $datas_id = mysql_insert_array('SQL_PREFIX_Modules_Template', $datas);
    }
}
// FIN CODE LIBRE
?>
示例#2
0
            $datas['Paiement'] += pow(2, $i);
        }
    }
    $datas['Planetes'] = 0;
    for ($i = 0; $i < 5; $i++) {
        if ($_POST['Planete_' . $i] == 'on') {
            $datas['Planetes'] += pow(2, $i);
        }
    }
} else {
    header('Location: index.php');
    exit;
}
if (isset($_POST['submit'])) {
    if (($_POST['submit'] == 'Sauver' || $_POST['submit'] == 'Sauver et retour') && !empty($datas_id)) {
        mysql_update_array('SQL_PREFIX_Modules_Users_Config', '`Login`=\'' . $datas['Login'] . '\'', $datas);
        Load_Prefs();
        Update_Modifier($datas['Login'], $datas['Modifier']);
        if ($_POST['submit'] == 'Sauver et retour') {
            header('Location: index.php');
            exit;
        }
    } elseif ($_POST['submit'] == 'Sauver' || $_POST['submit'] == 'Sauver et retour') {
        mysql_insert_array('SQL_PREFIX_Modules_Users_Config', $datas);
        $datas['DateCreated'] = date(DATE_SQL_FORMAT);
        $datas['DateLast'] = $datas['DateCreated'];
        $datas_id = $datas['Login'];
        Load_Prefs();
        Update_Modifier($datas['Login'], $datas['Modifier']);
        if ($_POST['submit'] == 'Sauver et retour') {
            header('Location: index.php');