Menu

[r47]: / html / projects.php  Maximize  Restore  History

Download this file

150 lines (147 with data), 4.3 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?php
session_start();
$user_ID=$_SESSION[user_ID];
if (!$user_ID || $user_ID=='0')
{
header('location: index.php');
die('Login failed');
}
require("util.php");
$sql = new MySQL_class;
$sql->Create("generator");
$esql = new MySQL_class;
$esql->Create("generator");
if ($_GET[project]) { $_SESSION[var_project] = $_GET[project]; }
$project=$_SESSION[var_project];
?>
<html>
<head>
<link href="list.css" type="text/css" rel=stylesheet>
<meta content="text/css" http-equiv="Content-Style-Type">
<title>Screen generator Scherm: Projects</title>
</head>
<script type="text/javascript" src="handlers.js" language="JavaScript">
alert ("no code");
</script>
<body>
<?php
include 'menu.php';
include 'makemenu.php';
makeMenu(0, 0, '');
?>
<div id="content">
<?php
if ($_GET[order59]<>'') {
$sql->QueryItem("DELETE FROM user_selection WHERE user=$user_ID and field='sort_59'");
$sql->QueryItem("INSERT INTO user_selection VALUES ('$user_ID', 'sort_59','$_GET[order59]'");
}
$lastid=$_SESSION[last_59];
$lastfilter59=$_SESSION[filter59];
$_SESSION[last_59]='';
if ($_GET[filter59]) { $filter59 =$_GET[filter59]; } else { $filter59=$_POST[filter59];}
if ($_GET[page59]) { $page=$_GET[page59]; } else { $page=$_POST[page59]; }
if ($filter59!=$lastfilter59) {
$_SESSION[filter59]=$filter59;
$page=0;
}
if ($_GET[full_59]=='Fullpage') {
$_SESSION[fullpage_59]='f';
}
if ($_GET[full_59]=='Pages') {
$_SESSION[fullpage_59]='';
}
if ($filter59!='')
{
$qfilter59 = quote('%'.$filter59.'%');
$query = ("
FROM `project`
WHERE (project.`name` LIKE $qfilter59
OR project.`sql` LIKE $qfilter59
OR project.`directory` LIKE $qfilter59
)
");
}
else
{
$query = ("
FROM `project`
WHERE 1
");
}
$lastrec=-1;
$sql->QueryItem("SELECT COUNT(*) AS records$query");
$records=$sql->data[records];
$query.=(($sortorder=='' || $sortorder=='2')?" ORDER BY `project`.`name` ":'');
$sortorder=$sql->QueryItem("SELECT value FROM user_selection WHERE user=$user_ID and field='sort_59'");
if ($lastid=='') {$fromrec=20*$page;} else {
$fromrec=0;
$sql->Query("SELECT `project`.`project` AS id $query$querysort");
for ($r=0; $r<$sql->rows; $r++) {
$sql->Fetch($r);
if ($sql->data[id]==$lastid) {
$fromrec=$r-10;
if($fromrec<0) $fromrec=0;
$lastrec=$r-$fromrec;
break;
}
}
}
$sql->Query("SELECT project.project as F443, project.name as F437, project.sql as F438, project.directory as F439, project.select as F574$query".
($_SESSION[fullpage_59]==''?"LIMIT $fromrec, 20":''));
if (($part_rights['24/nofilter']==0)) {
echo "<form action=\"\" method=get name=Filter59>";
echo "<p class=filter>";
echo "Records: $records ";
$maxpage=(int) (($records+19)/20);
if ($maxpage>1) {
if ($_SESSION[fullpage_59]=='') {
echo "Page: ";
echo "<select name=\"page59\" OnChange=\"Filter59.submit();\">\n";
for ($i = 0; $i < $maxpage; $i++)
{
$nr=$i+1;
if ($i==$page) {$sel=" selected";} else {$sel="";}
echo "<option value=$i$sel>$nr van $maxpage</option>\n";
}
echo "</select>\n";
echo "<input type=submit name=full_59 value=\"Fullpage\">";
} else {
echo "<input type=submit name=full_59 value=\"Pages\">";
}
}
echo "<input type=text name=\"filter59\" size=25 value=\"$filter59\">";
echo "<input type=submit value=\"Search\">";
echo "<input type=button value=\"Add Project\" onClick=\"javascript: window.open('addproject.php?project=$project','','width=500,height=500,location=no,menubar=no,scrollbars=yes,status=no,resizable=yes'); return false;\">";
echo "</p>";
echo "</form>";
}
?>
<table class=list>
<tr>
<th width=0px>Name</th>
<th width=0px>Database</th>
<th width=0px>Directory</th>
<th width=0px>Select</th>
</tr>
<?php
for ($i = 0; $i < $sql->rows; $i++)
{
$sql->Fetch($i);
$project = $sql->data['F443'];
$name = htmlspecialchars($sql->data['F437']);
$intern = htmlspecialchars($sql->data['F438']);
$directory = htmlspecialchars($sql->data['F439']);
$select = htmlspecialchars($sql->data['F574']);
if ($lastrec==$i) {$color="style=\"background-color: #aaaaff;\"";} else {$color="";}
echo ("
<tr $color onMouseOver=\"ChangeColor(this)\" onMouseOut=\"ChangeColorBack(this)\" onClick=\"location='project.php?project=$project'\">
<td>$name</td>
<td>$intern</td>
<td>$directory</td>
<td>$select</td>
</tr>");
}
?>
</table>
</div></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.