Annotation of ETA/skillsList.php3, revision 1.21
1.1 frystyk 1: <script language="php">
1.6 frystyk 2: #
1.21 ! frystyk 3: # @(#) $Id: skillsList.php3,v 1.20 1999/07/01 22:36:17 frystyk Exp $
1.6 frystyk 4: #
5: # Copyright © 1995-1998 World Wide Web Consortium, (Massachusetts
6: # Institute of Technology, Institut National de Recherche en
7: # Informatique et en Automatique, Keio University). All Rights
8: # Reserved. This program is distributed under the W3C's Software
9: # Intellectual Property License. This program is distributed in the hope
10: # that it will be useful, but WITHOUT ANY WARRANTY; without even the
11: # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12: # PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
13: # details.
14:
1.1 frystyk 15: $this = 'skillsList.php3';
1.2 frystyk 16: require ('funcs.phi');
17: $domain = getDomain();
1.12 frystyk 18: $this_forum = checkConfigFile($domain, 'config.phi', $this);
19: require ($domain.'config.phi');
1.11 frystyk 20:
21: # -------- setup template variables ----
1.1 frystyk 22:
1.10 frystyk 23: $W3C_AUTHOR = "forum@w3.org";
1.21 ! frystyk 24: $W3C_DATE = '$Date: 1999/07/01 22:36:17 $'; # '
1.10 frystyk 25: $W3C_TOP = '
26: '.render_help('Contacts', 'Contacts').' (either a single person or a group) can have
1.20 frystyk 27: certain '.render_help('skills', 'Skills').' or interests that make them capable of resolving issues or simply to track issues as they evolve.';
1.10 frystyk 28: $W3C_BOTTOM = '';
29: $W3C_NAVBAR = render_navbar_top(array());
30:
1.1 frystyk 31: # -------------------- get table data --------------------
32:
1.7 frystyk 33: if ($pass_contacts_id) {
1.20 frystyk 34: $filter = 'contacts.id='.$pass_contacts_id;
1.7 frystyk 35: list($w3cdb, $result, $contacts_realname) = contact_realname($w3cdb, $pass_contacts_id);
1.18 frystyk 36: $W3C_TITLE = render_listTitle('Skills and Interests for', $domain, $contacts_realname);
1.20 frystyk 37: } else if ($pass_issues_id) {
38: $filter = 'issues.id='.$pass_issues_id;
39: list($w3cdb, $result, $issues_summary) = issue_summary($w3cdb, $pass_issues_id);
40: $W3C_TITLE = render_listTitle('Contacts Interested in Issue', $domain, $issues_summary);
1.12 frystyk 41: } else
1.18 frystyk 42: $W3C_TITLE = render_listTitle('Skills and Interests', $domain, $contacts_realname);
1.1 frystyk 43:
1.12 frystyk 44: # Set up the query
1.15 frystyk 45: $query = "SELECT skills.id,uris.id,contacts.id,contacts.realname,skills.category,skills.priority,skills.state,forums.path,forums.description,skills.issue,issues.id,issues.summary FROM forums,contacts,uris,skills LEFT OUTER JOIN issues ON skills.issue=issues.id";
46:
1.16 frystyk 47: $condition = "contacts.id=skills.contact and uris.id=contacts.email AND skills.forum=forums.id AND forums.id=$this_forum";
1.6 frystyk 48:
49: list($w3cdb, $result) = formatQuery($w3cdb, $query, $condition);
1.1 frystyk 50:
51: # -------------------- pre templates --------------------
52:
1.8 frystyk 53: include ($domain.'pre-template.tpl');
1.1 frystyk 54:
1.12 frystyk 55: # -------------------- render fora --------------------
56:
57: render_subfora($this, 'Skills', array());
58:
1.1 frystyk 59: # -------------------- render table head --------------------
60:
61: </script>
62:
1.4 eric 63: <table border="1" cellspacing="0" width="100%">
1.1 frystyk 64: <caption></caption>
65: <tbody>
66: <tr>
1.12 frystyk 67: <th><a href="<?php echo formatChain($this, array('order'=>'skills.id'))?>">Skill</a></th>
1.2 frystyk 68: <th><a href="<?php echo formatChain($this, array('order'=>'uris.uri'))?>">Contact</a></th>
1.10 frystyk 69: <th><a href="<?php echo formatChain($this, array('order'=>'skills.forum'))?>">Forum</a></th>
1.15 frystyk 70: <th><a href="<?php echo formatChain($this, array('order'=>'skills.issue'))?>">Issue</a></th>
1.2 frystyk 71: <th><a href="<?php echo formatChain($this, array('order'=>'skills.category'))?>">Category</a></th>
72: <th><a href="<?php echo formatChain($this, array('order'=>'skills.priority'))?>">Priority</a></th>
73: <th><a href="<?php echo formatChain($this, array('order'=>'skills.state'))?>">State</a></th>
1.1 frystyk 74: </tr>
75: <script language="php">
76:
77: # -------------------- render data --------------------
78:
79: while ($row = mysql_fetch_row($result)) {
80: $T_skills_id = $row[0];
1.14 frystyk 81: $contacts_id = $row[2];
1.12 frystyk 82: $T_contacts_realname = render('contacts_email', 0,'text', stripslashes($row[3]), array('size'=>30, 'href'=>formatRef('contacts.php3', array('contacts_id'=>$row[2]))));
1.6 frystyk 83: if (isset($pass_contacts_id))
1.13 frystyk 84: $SKILLS_INSPECT = '<a href="'.formatRef('skills.php3', array('skills_id'=>$T_skills_id, 'pass_contacts_id'=>$pass_contacts_id))."\"><view></a>";
1.6 frystyk 85: else
1.13 frystyk 86: $SKILLS_INSPECT = '<a href="'.formatRef('skills.php3', array('skills_id'=>$T_skills_id))."\"><view></a>";
1.6 frystyk 87:
1.10 frystyk 88: $T_forums_path = '<a href="'.formatDomainRef('issuesList.php3', $row[7], array()).'">' .$row[8] .'</a>';
1.12 frystyk 89: $T_skills_category = $row[4]==0 ? "any" : $issues_categories[$row[4]];
90: $T_skills_priority = $row[5]==0 ? "any" : $issues_priorities[$row[5]];
91: $T_skills_state = $row[6]==0 ? "any" : $issues_states[$row[6]];
1.19 frystyk 92: $T_issues_summary = $row[10]==0? "any" : '<a href="' .formatRef('issues.php3', array('issues_id'=>$row[10])) .'">' .formatStringModifier(stripslashes($row[11]), 30) .'</a>';
1.1 frystyk 93: </script>
1.4 eric 94: <tr>
1.17 frystyk 95: <?php echo renderTableField($SKILLS_INSPECT, "center")?>
96: <?php echo renderTableField($T_contacts_realname, "center")?>
97: <?php echo renderTableField($T_forums_path, "left")?>
98: <?php echo renderTableField($T_issues_summary, "center")?>
99: <?php echo renderTableField($T_skills_category, "center")?>
100: <?php echo renderTableField($T_skills_priority, "center")?>
101: <?php echo renderTableField($T_skills_state, "center")?>
1.1 frystyk 102: </tr>
103: <?php
104: } ?>
105: </tbody>
106: </table>
1.21 ! frystyk 107:
1.1 frystyk 108: <script language="php">
1.21 ! frystyk 109:
! 110: if (isset($pass_contacts_id)) {
! 111: $prefix = '[<a href="'.formatRef('skills.php3', array('editing'=>1, 'nextAction'=>'add',
! 112: 'pass_contacts_id'=>$pass_contacts_id,
! 113: 'title_modifer'=>$title_modifier)).'">Add Skill</a>] ';
! 114: }
! 115:
! 116: render_navbar_bottom1($pass_issues_id, $prefix);
1.1 frystyk 117:
118: # -------------------- post templates --------------------
119:
1.8 frystyk 120: include ($domain.'post-template.tpl');
1.1 frystyk 121: </script>
122: </body>
123: </html>
Webmaster