Menu

[2eb2a2]: / delete_project_confirm.php  Maximize  Restore  History

Download this file

80 lines (67 with data), 2.0 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
<?php session_start(); ?>
<html>
<head>
<title>deltasql - Delete project</title>
<link rel="stylesheet" type="text/css" href="deltasql.css">
<link rel="shortcut icon" href="pictures/favicon.ico" />
</head>
<body>
<?php
include("head.inc.php");
include("conf/config.inc.php");
include("utils/utils.inc.php");
$rights = $_SESSION["rights"];
$user = $_SESSION["username"];
$userid = $_SESSION["userid"];
if ($rights<2) die("<b>Not enough rights to delete a project.</b>");
$id = $_GET['id'];
$name = $_GET['name'];
if ($id=="") exit;
echo "<h2>Please confirm <b>project deletion</b>:</h2>";
echo "<h3><b>$name</b></h3><br><br><br>";
include("conf/config.inc.php");
mysql_connect($dbserver, $username, $password);
@mysql_select_db($database) or die("Unable to select database");
$query="SELECT * from tbbranch where project_id=$id";
$result=mysql_query($query);
if ($result!="") $num=mysql_num_rows($result); else $num=0;
if ($num>0) {
echo "<p><b>WARNING:</b> Following branches will be deleted as well, together with their script reference. ";
echo "The scripts itself will not be deleted. <br></p>";
echo "<table>";
echo "<tr>
<th>branch name</th>
<th>description</th>
<th>updated</th>
<th>version</th>
<th>visible</th>
</tr>";
}
$i=0;
while ($i<$num) {
$branchname=mysql_result($result,$i,"name");
$description=mysql_result($result,$i,"description");
$create_dt=mysql_result($result,$i,"create_dt");
$versionnr=mysql_result($result,$i,"versionnr");
$visible=mysql_result($result,$i,"visible");
echo "
<tr>
<td><h3>$branchname</h3></td>
<td>$description</td>
<td>$create_dt</td>
<td>$versionnr</td>
<td>$visible</td>
</tr>
";
$i++;
}
if ($num>0) echo "</table>";
mysql_close();
echo "<p>Are you sure that you want to delete this project? If not, please press the <b>Back</b> button on your browser</p>";
echo "<ul>";
echo "<li><b><a href=\"delete_project.php?id=$id\">Yes, delete project $name</a></b></li>";
echo "</ul>";
?>
<?php include("bottom.inc.php"); ?>
</body>
</html>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.