-
Notifications
You must be signed in to change notification settings - Fork 0
/
todos.php
111 lines (92 loc) · 2.98 KB
/
todos.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
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
<?php
session_start();
if (!isset($_SESSION['username']))
header('Location: index.php');
include 'header.php';
include 'menu.php';
$jobid = $_REQUEST['jobid'];
$compname = $_REQUEST['compname'];
$title = $_REQUEST['title'];
$meet1='';
$meet2='';
$apply1='';
$apply2='';
$prep1='';
$prep2='';
if (isset($_REQUEST['tab']))
{
if ($_REQUEST['tab'] == "meet")
{
$meet1=' class="active"';
$meet2=' active';
}
elseif ($_REQUEST['tab'] == "apply")
{
$apply1=' class="active"';
$apply2=' active';
}
else
{
$prep1=' class="active"';
$prep2=' active';
}
}
else
{
$prep1=' class="active"';
$prep2=' active';
}
if (isset($_REQUEST['complete']))
file_get_contents("http://hiredinny.com/private/updatetodos/".$_REQUEST['complete'], true);
$url = file_get_contents("http://hiredinny.com/private/mytodos/".$_SESSION['username'], true);
$obj = json_decode($url);
$dataprep = "";
$datameet = "";
$dataapply = "";
for ($i = 0; $i < sizeof($obj); $i++)
if($obj[$i]->jobid == $jobid)
{
$temp = "";
if ($obj[$i]->link != "")
$temp = " - <a href='".$obj[$i]->link."' rel='external'>Link</a>";
if ($obj[$i]->section == "Prep")
$dataprep.="<li>".$obj[$i]->text.$temp." - <a href ='todos.php?jobid=".$jobid."&compname=".$compname."&title=".$title."&complete=".$obj[$i]->id."&tab=prep' rel='external' class='btn'>Complete</a></li>";
if ($obj[$i]->section == "Meet")
$datameet.="<li>".$obj[$i]->text.$temp." - <a href ='todos.php?jobid=".$jobid."&compname=".$compname."&title=".$title."&complete=".$obj[$i]->id."&tab=meet' rel='external' class='btn'>Complete</a></li>";
if ($obj[$i]->section == "Apply")
$dataapply.="<li>".$obj[$i]->text.$temp." - <a href ='todos.php?jobid=".$jobid."&compname=".$compname."&title=".$title."&complete=".$obj[$i]->id."&tab=apply' rel='external' class='btn'>Complete</a></li>";
}
?>
<header>
<div id="menu-button"><a href="" id="menu-btn"><i class="ss-icon"></i></a></div>
<h1><a href="/">HiredinNY</a></h1>
</header>
<div id="main">
<div id="profile">
<h3>Todos for <?php echo $compname; ?></h3>
<h4><?php echo $title; ?></h4>
</div><!--/profile-->
<ul class="nav nav-tabs">
<li<?php echo $prep1; ?>><a href="#prep" data-toggle="tab">Prep</a></li>
<li<?php echo $meet1; ?>><a href="#meet" data-toggle="tab">Meet</a></li>
<li<?php echo $apply1; ?>><a href="#apply" data-toggle="tab">Apply</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane<?php echo $prep2; ?>" id="prep">
<ul class="list">
<?php echo $dataprep; ?>
</ul>
</div><!--/prep-->
<div class="tab-pane<?php echo $meet2; ?>" id="meet">
<ul class="list">
<?php echo $datameet; ?>
</ul>
</div><!--/meet-->
<div class="tab-pane<?php echo $apply2; ?>" id="apply">
<ul class="list">
<?php echo $dataapply; ?>
</ul>
</div><!--/apply-->
</div><!--/tab-content-->
</div><!--/main-->
<?php include("footer.php"); ?>