-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget.compte.php
executable file
·86 lines (71 loc) · 1.7 KB
/
get.compte.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
$page='compte';
include("includes/base.access.php");
include("includes/class.compte.php");
include("includes/class.utilisateur.php");
$db = openDB();
if(isset($_GET['action'])){
if($_GET['action']=="del"){
$n = new compte();
$n->id_compte = $_GET['id_compte'];
$n->delete();
}
}
if(isset($_POST['action']) && $_POST['action'] == "save"){
$n = new compte();
$n->compte = $_POST['compte'];
$n->id_compte = $_POST['id_compte'];
$n->id_utilisateur = $_POST['id_utilisateur'];
$n->etat = $_POST['etat'];
if($_POST['communication_reference']=='on'){
$n->communication_reference='1';
}
else{
$n->communication_reference='0';
}
if($_POST['maj_support']=='on'){
$n->maj_support='1';
}
else{
$n->maj_support='0';
}
$n->save();
if(mysql_error()==""){
$error = "ok";
}else{
echo("erreur mysql : ".mysql_error());
}
}
?>
<?php include("includes/base.header.php"); ?>
<?php include("includes/base.header.php"); ?>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".ajaxform").bind("keyup change",function(){
var str = $(this).serialize();
$.ajax({
type: "POST",
data: str
});
});
});
</script>
<link media="screen" rel="stylesheet" href="css/colorbox.css" />
<script type="text/javascript" src="js/jquery.colorbox.min.js"></script>
<script>
$(document).ready(function(){
$(".modalbox").colorbox({iframe:true, innerWidth:500, innerHeight:300, onCleanup:function(){ window.parent.location.reload(); } });
});
</script>
</head>
<body>
<?php include("includes/base.menu.php"); ?>
<?php
$n = new compte();
$n->dashboard($_COOKIE['statut'],$_COOKIE['nom']);
closeDB($db);
?>
</div>
</body>
</html>