-
Notifications
You must be signed in to change notification settings - Fork 0
/
customize_profile.php
269 lines (256 loc) · 15.4 KB
/
customize_profile.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
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<?php
session_start();
include_once 'utils.php';
$db_conn = real_db_connect($_db_server, $_db_username, $_db_password, $_db_name);
real_check_valid_session($db_conn, $_SESSION['UID'], session_id(), $_SERVER['REMOTE_ADDR']);
$_POST['page-title'] = "Toolbox";
$_POST['page-link1'] = "<link rel='stylesheet' type='text/css' href='styles/index.css' />";
$_POST['page-link2'] = "<link href='styles/style1.css' rel='stylesheet' type='text/css' />";
$_POST['page-link3'] = "<link href='styles/list.css' rel='stylesheet' type='text/css' />";
$_POST['page-link4'] = "<link rel='stylesheet' href='styles/mktree.css' type='text/css'>";
$_POST['page-script1'] = "<SCRIPT LANGUAGE='JavaScript' SRC='scripts/mktree.js'></SCRIPT>";
$_POST['page-script2'] = "<script language='JavaScript' type='text/javascript' src='scripts/section_and_menu.js'></script>";
$_POST['page-script3'] = "<script language='JavaScript' type='text/javascript' src='scripts/findprofile.js'></script>";
$_POST['page-include-page-top2'] = "true";
include_once 'includes/page-top.php';
include_once 'includes/page-top2.php';
$view = real_unescape($_GET['view']);
if ($view == "" || $view == '3') $view = '1';
$user_has_edit_rights = false;
$editable = false;
$pid = real_mysql_specialchars(real_unescape($_GET["pid"]), true);
$checkrights = real_can_user_edit($db_conn, $pid);
$qtype = "SELECT type_id FROM gen_profile_info WHERE pid='$pid'";
$rtype = real_execute_query($qtype, $db_conn);
$rowtype = mysql_fetch_array($rtype);
if ($rowtype["type_id"] != 1 && $view == '4') $view = '1';
if ($checkrights == false) real_redirect('editprofile.php', $pid, $db_conn);
else {
$user_has_edit_rights = true;
$view1 = array('Activate / Inactivate', 'Core Sections', 'Additional Sections', 'Assign Editors', '0');
$view2 = array('Industry Clusters', 'Technology Clusters', 'Homeland Security Clusters', 'Disciplines', '0');
$view3 = array('Add Sections', 'Remove Sections', 'Create New Sections', 'Edit Views', '0');
$view4 = array('National Science Foundation', 'National Institute for Health', 'University Format', '0');
include "sections/gen_activate_profile_query.php";
include "sections/gen_editor_info_query.php";
include "sections/gen_core_section_query.php";
include "sections/gen_additional_section_query.php";
include "sections/gen_cluster_info_query.php";
}
?>
<script type="text/javascript">
<!--
startList = function()
{
if (document.all&&document.getElementById)
{
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++)
{
node = navRoot.childNodes[i];
if (node.nodeName=="LI")
{
node.onmouseover=function()
{
this.className+=" over";
}
node.onmouseout=function()
{
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=function()
{
startList();
}
-->
</script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="form_elements_row_action" id="basic_layout">
<tr>
<td colspan="2">
<!-- InstanceBeginEditable name="content" -->
<?php
if ($user_has_edit_rights == true) {
print( "<table width='100%' border='0' cellspacing='0' cellpadding='0'> ");
print( "<tr >");
print( "<td background='images/tabsil.gif0' height='12' width='111' valign='bottom' align='center' ><a href='editprofile.php?pid=$pid' style='text-decoration:none'><span class='tab_menu'>Edit</span></a></td>");
print( "<td background='images/tabsil.gif0' height='12' width='111' valign='bottom' align='center'><a href='editprofile.php?pid=$pid&onlyview=1&view=$view' style='text-decoration:none'><span class='tab_menu'>View</span></a></td>");
print( "<td background='images/tabblu.gif0' height='12' width='111' valign='bottom' align='center' ><span class='tab_menu'>Vita Toolbox</span></td>");
print( "<td> </td>");
print( "</tr>");
print( "<tr>");
// print( "<td colspan='4' height='5' bgcolor='#8DB0D3'> </td>");
print( "<td colspan='4' height='5' bgcolor='#580000'> </td>");
print( "</tr>");
print( "<tr>");
print( "<td colspan='4' height='5' > </td>");
print( "</tr>");
print( "</table>");
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="table_background_viewedit">
<td colspan="2" valign="top">
<div id="navcontainer">
<ul id="navlist">
<?php
switch ($view) {
case 1:
print "<li id='active'>Profile Settings</li>";
print "<li><a href='customize_profile.php?pid=" . $pid . "&view=2'>Assign Profiles to Disciplines</a></li>";
if ($rowtype["type_id"] == 1) print "<li><a href='customize_profile.php?pid=" . $pid . "&view=4'>Biosketches & Vitas</a></li>";
break;
case 2:
print "<li><a href='customize_profile.php?pid=" . $pid . "&view=1'>Profile Settings</a></li>";
print "<li id='active'>Assign Profiles to Disciplines</li>";
if ($rowtype["type_id"] == 1) print "<li><a href='customize_profile.php?pid=" . $pid . "&view=4'>Biosketches & Vitas</a></li>";
break;
case 4:
if ($rowtype["type_id"] == 1) {
print "<li><a href='customize_profile.php?pid=" . $pid . "&view=1'>Profile Settings</a></li>";
print "<li><a href='customize_profile.php?pid=" . $pid . "&view=2'>Assign Profiles to Disciplines</a></li>";
print "<li id='active'>Biosketches & Vitas</li>";
}
break;
}
?>
</ul>
</div>
</td>
</tr>
<tr>
<td width="172" valign="top" class="table_background_other">
<div id="sidenav">
<ul id="sidenavlist">
<?php
$i = 0;
switch ($view) {
case 1:
while ($view1[$i] != '0') {
print( "<li");
print("><a href='#" . $i . "'>" . $view1[$i] . "</a></li>");
$i++;
}
break;
case 2:
while ($view2[$i] != '0') {
print( "<li");
print("><a href='#" . $i . "'>" . $view2[$i] . "</a></li>");
$i++;
}
break;
case 4:
while ($view4[$i] != '0') {
print( "<li");
print("><a href='#" . $i . "'>" . $view4[$i] . "</a></li>");
$i++;
}
break;
}
?>
</ul>
</div>
</td>
<td valign="top" >
<?php
$i = 0;
switch ($view) {
case 1:
while ($view1[$i] != '0') {
print "<a name='" . $i . "' id='" . $i . "'></a>";
switch ($i) {
case 0:
include "sections/gen_activate_profile_display.php";
break;
case 3:
include "sections/gen_editor_info_display.php";
break;
case 1:
include "sections/gen_core_section_display.php";
break;
case 2:
include "sections/gen_additional_section_display.php";
break;
}
$i++;
}
break;
case 2:
while ($view2[$i] != '0') {
print "<a name='" . $i . "' id='" . $i . "'></a>";
switch ($i) {
case 0:
include "sections/gen_cluster_ind_display.php";
print "<br>";
break;
case 1:
include "sections/gen_cluster_tech_display.php";
print "<br>";
break;
case 2:
include "sections/gen_cluster_home_display.php";
print "<br>";
break;
case 3:
include "sections/gen_cluster_disc_display.php";
print "<br>";
break;
}
$i++;
}
break;
case 4:
print "<p>";
print "<span id='secname'>Biosketches</span>";
print "<table border=0 align=center width=90%><tr><td>";
print "<span id='secname'>National Science Foundation (NSF) Vitae</span><br>";
//print "<span id='secdetail'><a href='./rtf_new/nsf_rtfdata.php?pid=" . $pid . "'>One Click Generation of Biographical Sketch </a> | Step by Step Builder (under construction) </span>";
print "<span id='secdetail'><a href='./rtf_new/publications.php?pid=" . $pid . "&target=nsf' target='_blank'>One Click Generation of Biographical Sketch </a> </span>";
print "</td></tr><tr><td></td></tr><tr><td>";
print "<span id='secname'>National Institutes of Health (NIH) Biographical Sketch</span><br>";
//print "<span id='secdetail'><a href='./rtf_new/nih_rtfdata.php?pid=" . $pid . "'>One Click Generation of Curriculum vitae </a> | <a href='nih.php?pid=" . $pid . "' target='blank'>Step by Step builder (under construction)</a></span>";
print "<span id='secdetail'><a href='./rtf_new/publications.php?pid=" . $pid . "&target=nih&relevant=1' target='_blank'>One Click Generation of Curriculum vitae </a> </span>";
print "</td></tr>";
print "</table>";
print "</p>";
//university format
print "<p>";
print "<span id='secname'>Vitas</span>";
print "<table border=0 align=center width=90%><tr><td>";
print "<span id='secname'>University Vita Format</span><br>";
print "<span id='secdetail'><a href='./rtf_new/new_rtfdata.php?pid=" . $pid . "'>One Click Generation of Vita in Word Format (Auto Fill)</a> | <a href='nih4rtf.php?pid=" . $pid . "' target='blank'>Step by Step builder</a></span>";
print "</td></tr>";
print "</table>";
print "</p>";
while ($view4[$i] != '0') {
print "<a name='" . $i . "' id='" . $i . "'></a>";
$i++;
}
break;
}
?>
</td>
</tr>
</table>
<!-- InstanceEndEditable -->
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><!-- Page footer -->
<td align="center">
<p align="center"><img src="images/line.jpg" alt="" width="700" height="1"/></p>
<p>
<a href="http://www.txstate.edu/research" target="_blank" class="rsp">powering - The Partnership</a><br />
© 2010 <a href="http://www.txstate.edu/" target="www.txstate.edu">Texas State University-San Marcos</a> | Questions or Comments about this site? | Email: <a href="feedback.php">webmaster</a> <br /><br />
</p>
</td>
</tr>
</table>
</body>
<!-- InstanceEnd -->
</html>