-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathproj_edit.php
More file actions
117 lines (100 loc) · 3.87 KB
/
Copy pathproj_edit.php
File metadata and controls
117 lines (100 loc) · 3.87 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?php
require_once('include/login/auth.php');
include('include/mysql_connect.php');
require_once('include/debug.php');
$id = intval($_GET['proj_id']);
$GetDataProjectName = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM projects WHERE project_id = ".$id."");
$executesql = mysqli_fetch_assoc($GetDataProjectName);
if(isset($_POST['delete']))
{
$sqlDeleteProject = "DELETE FROM projects WHERE project_id = ".$id."";
$sql_exec_component_delete = mysqli_query($GLOBALS["___mysqli_ston"], $sqlDeleteProject);
$sqlDeleteProject = "DELETE FROM projects_data WHERE projects_data_project_id = ".$id."";
$sql_exec_project_delete = mysqli_query($GLOBALS["___mysqli_ston"], $sqlDeleteProject);
header("Location: proj_list.php?proj_del=1");
exit();
}
?>
<!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" xml:lang="sv" lang="sv">
<head>
<link rel="stylesheet" type="text/css" href="include/style.css" media="screen"/>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="apple-touch-icon" href="img/apple.png" />
<title>Your Projects - ecDB</title>
<?php include_once("include/analytics.php") ?>
</head>
<body>
<div id="wrapper">
<!-- Header -->
<?php include 'include/header.php'; ?>
<!-- END -->
<!-- Main menu -->
<?php include 'include/menu.php'; ?>
<!-- END -->
<!-- Main content -->
<div id="content">
<h1>Edit Project</h1>
<?php
include('include/include_proj_update.php');
$AddProj = new ProjAdd;
$AddProj->AddProj();
?>
<form class="globalForms" method="post" action="">
<div class="textInput">
<label class="keyWord">Project name</label>
<div class="input"><input name="name" type="text" class="big" value="<?php echo $executesql['project_name']; ?>" /></div>
</div>
<div class="textInput">
<label class="keyWord" >Project is public?</label>
<div class="input">
<select class="input" name="project_public">
<option value="0"
<?php
if(!isset($_POST['submit']) && $executesql['project_public'] == '0') {
echo 'selected';
}
if(isset($_POST['submit']) && $_POST['project_public'] == '0') {
echo 'selected';
}
?>
>No</option>
<option value="1"
<?php
if(!isset($_POST['submit']) && $executesql['project_public'] == '1') {
echo 'selected';
}
if(isset($_POST['submit']) && $_POST['project_public'] == '1') {
echo 'selected';
}
?>
>Yes</option>
</select>
</div>
</div>
<div class="textInput">
<label class="keyWord">Project URL</label>
<div class="input"><input name="project_url" type="text" class="big" value="<?php echo $executesql['project_url']; ?>" /></div>
</div>
<div class="textBoxInput">
<label class="keyWord boldText">Project Description (Use Markdown for style)</label>
<div class="text">
<textarea name="project_desc" rows="12"><?php echo $executesql['project_desc']; ?></textarea>
</div>
</div>
<div class="buttons">
<div class="input">
<button class="button green" name="submit" type="submit"><span class="icon medium save"></span> Save</button>
<button class="button red" name="delete" type="submit"><span class="icon medium trash"></span> Delete</button>
</div>
</div>
</form>
</div>
<!-- END -->
<!-- Text outside the main content -->
<?php include 'include/footer.php'; ?>
<!-- END -->
</div>
</body>
</html>