-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetProjects.php
executable file
·53 lines (51 loc) · 1.37 KB
/
getProjects.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
<?php
require_once 'connect.inc.php';
require_once 'chkLogIn.inc.php';
?>
<?php
$ct=1;
function getTabled($myVal)
{
global $ct;
echo '<tr onclick="changeModalText(\''.$myVal['description'].'\',\''.$myVal['stipend'].'\','.getTablesStudents($myVal['id']).',\''.$myVal['id'].'\')" data-target="#myModal" data-toggle="modal"><td>'.$ct.'</td>
<td>'.$myVal['project_name'].'</td>
<td>'.date('jS F,Y H:i A',strtotime($myVal['sub_date'])).'</td>
</tr>';
}
function getTablesStudents($ids)
{
$stlist = getLinkStudentProject($ids);
return $stlist;
}
if(isCompany())
{
$st = $_GET['page'];
$st_len=strlen($st);
if($st_len==0)
{
$st=0;
}
$st=mysqli_real_escape_string($connect,$st);
$vals=array();
$myquery=sprintf("SELECT project_name,sub_date,id,description,stipend FROM %s WHERE company_email_id='%s' LIMIT %s OFFSET %s",$table_name_project,$_SESSION['company_id'],10,$st);
if($resQuery=mysqli_query($connect,$myquery))
{
$ct=1;
if($myValue = mysqli_fetch_assoc($resQuery))
{
#echo '<tr><td colspan="3"><input type="button" value="Fetch data" class="btn btn-primary" onclick="loadProjects()"></td></tr>';
echo '<tr><th>Sr. No.</th><th>Project Name</th><th>Submitted On</th></tr>';
getTabled($myValue);
$ct++;
while ( $myValue = mysqli_fetch_assoc($resQuery) ) {
getTabled($myValue);
$ct++;
}
}
}
}
else
{
echo "You are Not supposed to be here ==\"";
}
?>