Lines 95-100
Link Here
|
95 |
} |
95 |
} |
96 |
} |
96 |
} |
97 |
|
97 |
|
|
|
98 |
|
99 |
function php_backtrace() { |
100 |
echo "<pre>"; |
101 |
debug_print_backtrace(); |
102 |
echo "</pre>"; exit; |
103 |
} |
104 |
|
98 |
// MySQL wrapper function for keeping backtrace information |
105 |
// MySQL wrapper function for keeping backtrace information |
99 |
function mysql_remember_query ($statement, $dbh, $logstring = null) { |
106 |
function mysql_remember_query ($statement, $dbh, $logstring = null) { |
100 |
global $query_btrace; |
107 |
global $query_btrace; |
Lines 160-166
Link Here
|
160 |
|
167 |
|
161 |
$dbh = $context->database( $dbname ); |
168 |
$dbh = $context->database( $dbname ); |
162 |
$statement = str_replace ('%NOW%', $context->now(), $statement); |
169 |
$statement = str_replace ('%NOW%', $context->now(), $statement); |
163 |
$statement = str_replace ('%USER%', $context->theuser->getFoundationID() , $statement); |
170 |
$statement = str_replace ('%USER%', $context->theuser->getBugzillaUserID() , $statement); |
164 |
|
171 |
|
165 |
$result = mysql_remember_query ($statement, $dbh); |
172 |
$result = mysql_remember_query ($statement, $dbh); |
166 |
if( $do_error_check ) mysql_error_check(); |
173 |
if( $do_error_check ) mysql_error_check(); |
Lines 796-806
Link Here
|
796 |
echo $context->theuser->user_email(); |
803 |
echo $context->theuser->user_email(); |
797 |
} |
804 |
} |
798 |
?> / |
805 |
?> / |
799 |
<a href="?logout=Log%20Out<?=$gets?>">logout</a> |
806 |
<a href="?logout=Log%20Out<?=$gets?>">Log out</a> |
800 |
</div> |
807 |
</div> |
801 |
<? |
808 |
<? |
802 |
}elseif(!$dologin and !isset($_GET['login']) ){ |
809 |
}elseif(!$dologin and !isset($_GET['login']) ){ |
803 |
?><div id="login-logout"><a href="?login=true<?=($gets)?>">log in</a></div><? |
810 |
?><div id="login-logout"><a href="?login=true<?=($gets)?>">Log in</a></div><? |
804 |
} |
811 |
} |
805 |
} |
812 |
} |
806 |
|
813 |
|
Lines 978-984
Link Here
|
978 |
/* |
985 |
/* |
979 |
* if the user is the on this talk |
986 |
* if the user is the on this talk |
980 |
*/ |
987 |
*/ |
981 |
if($person['PersonID'] == $context->theuser->getFoundationID()){ |
988 |
if($person['PersonID'] == $context->theuser->getBugzillaUserID()){ |
982 |
/* |
989 |
/* |
983 |
* ... then we will show the status of all the speaker signing |
990 |
* ... then we will show the status of all the speaker signing |
984 |
*/ |
991 |
*/ |
Lines 1008-1024
Link Here
|
1008 |
$auths = get_authors_on_a_submission($submission_id); |
1015 |
$auths = get_authors_on_a_submission($submission_id); |
1009 |
$assistans = get_authors_on_a_submission($submission_id,'assistant'); |
1016 |
$assistans = get_authors_on_a_submission($submission_id,'assistant'); |
1010 |
$is_assistant = false;//in_array($context->theuser->getFoundationID(),array_keys($assistans)); |
1017 |
$is_assistant = false;//in_array($context->theuser->getFoundationID(),array_keys($assistans)); |
1011 |
|
1018 |
$style = 'border-bottom: 1px dotted grey; padding-bottom: 7px;'; |
1012 |
$style = ""; |
|
|
1013 |
foreach($auths as $author){ |
1019 |
foreach($auths as $author){ |
1014 |
?> |
1020 |
?> |
1015 |
<div style='<?=$style;?>'> |
1021 |
<div style='<?=$style;?>'> |
1016 |
<?show_a_user_bio($author['PersonID'],$is_assistant);?> |
1022 |
Author: <?= $author['name']?><br /> |
|
|
1023 |
<?show_a_user_bio($author['BugzillaUserID'],$is_assistant);?> |
1017 |
</div> |
1024 |
</div> |
1018 |
<? |
1025 |
<? |
1019 |
if($style == ""){ |
|
|
1020 |
$style = 'border-bottom: 1px dotted grey; padding-bottom: 7px;'; |
1021 |
} |
1022 |
} |
1026 |
} |
1023 |
} |
1027 |
} |
1024 |
|
1028 |
|
Lines 1190-1196
Link Here
|
1190 |
/* |
1194 |
/* |
1191 |
* If the current users is an author or assistant of this talk |
1195 |
* If the current users is an author or assistant of this talk |
1192 |
*/ |
1196 |
*/ |
1193 |
if( can_user_edit_submission($sub['submission_id'],$context->theuser->getFoundationID() ) ) { |
1197 |
if( can_user_edit_submission($sub['submission_id'],$context->theuser->getBugzillaUserID() ) ) { |
1194 |
/* |
1198 |
/* |
1195 |
* .. then show an 'edit submission' button to allow the to make modify the talk |
1199 |
* .. then show an 'edit submission' button to allow the to make modify the talk |
1196 |
*/ |
1200 |
*/ |
Lines 1598-1608
Link Here
|
1598 |
function get_tags_for_submission($submission_id,$limiter){ |
1602 |
function get_tags_for_submission($submission_id,$limiter){ |
1599 |
global $context; |
1603 |
global $context; |
1600 |
|
1604 |
|
1601 |
$PersonID = $context->theuser->getFoundationID(); |
1605 |
$PersonID = $context->theuser->getBugzillaUserID(); |
1602 |
|
1606 |
|
1603 |
$query = "select |
1607 |
$query = "select /* functions.php:get_tags_for_submission() */ tags.tag, tags.tag_id |
1604 |
tags.tag, |
|
|
1605 |
tags.tag_id |
1606 |
from |
1608 |
from |
1607 |
tags, |
1609 |
tags, |
1608 |
submission_tags |
1610 |
submission_tags |
Lines 1612-1620
Link Here
|
1612 |
submission_id = '".addslashes($submission_id)."' |
1614 |
submission_id = '".addslashes($submission_id)."' |
1613 |
and |
1615 |
and |
1614 |
tags.limiter_type = '".addslashes($limiter)."' |
1616 |
tags.limiter_type = '".addslashes($limiter)."' |
1615 |
order by |
1617 |
order by tag"; |
1616 |
tag |
|
|
1617 |
"; |
1618 |
|
1618 |
|
1619 |
$res = conference_sql($query); |
1619 |
$res = conference_sql($query); |
1620 |
$tags = array(); |
1620 |
$tags = array(); |
Lines 1641-1673
Link Here
|
1641 |
} |
1641 |
} |
1642 |
} |
1642 |
} |
1643 |
|
1643 |
|
1644 |
function show_a_user_bio($PersonID, $allow_edit = false){ |
1644 |
function show_a_user_bio($BugzillaUserID, $allow_edit = false){ |
1645 |
global $context; |
1645 |
global $context; |
1646 |
|
1646 |
|
1647 |
/* |
1647 |
/* |
1648 |
* If this bio is for the current users |
1648 |
* If this bio is for the current users |
1649 |
*/ |
1649 |
*/ |
1650 |
if($PersonID == $context->theuser->getFoundationID() or $allow_edit){ |
1650 |
if($BugzillaUserID == $context->theuser->getBugzillaUserID() or $allow_edit){ |
1651 |
/* |
1651 |
/* |
1652 |
* ...show an 'edit bio' button to allow the to make changes to their bio |
1652 |
* ...show an 'edit bio' button to allow the to make changes to their bio |
1653 |
*/ |
1653 |
*/ |
1654 |
?> |
1654 |
?> |
1655 |
<div style='float: right' id='bio'> |
1655 |
<div style='float: right' id='bio'> |
1656 |
<form action="bio.php" method="get" onsubmit="return false;"><input onclick="editBio('edit','<?=$PersonID?>'); return false;" type="submit" |
1656 |
<form action="bio.php" method="get" onsubmit="return false;"><input onclick="editBio('edit','<?= $BugzillaUserID ?>'); return false;" type="submit" |
1657 |
value="edit bio"></form> |
1657 |
value="edit bio"></form> |
1658 |
</div> |
1658 |
</div> |
1659 |
<? |
1659 |
<? |
1660 |
} |
1660 |
} |
1661 |
|
1661 |
|
1662 |
$query = "select |
1662 |
$query = "select /* functions.php:show_a_user_bio() */ bio |
1663 |
bio |
1663 |
FROM speakers |
1664 |
from |
1664 |
WHERE BugzillaUserID = '".addslashes($BugzillaUserID)."' |
1665 |
speakers |
1665 |
AND conference_id = ".addslashes($context->theconference->getConferenceID()); |
1666 |
where |
|
|
1667 |
PersonID = '".addslashes($PersonID)."' |
1668 |
and |
1669 |
conference_id = ".addslashes($context->theconference->getConferenceID())." |
1670 |
"; |
1671 |
|
1666 |
|
1672 |
$res = conference_sql($query); |
1667 |
$res = conference_sql($query); |
1673 |
$bio = mysql_fetch_assoc($res); |
1668 |
$bio = mysql_fetch_assoc($res); |
Lines 1675-1681
Link Here
|
1675 |
echo $bio['bio']; |
1670 |
echo $bio['bio']; |
1676 |
}else{ |
1671 |
}else{ |
1677 |
?> |
1672 |
?> |
1678 |
<em>no bio provided.</em> |
1673 |
<em>No bio provided.</em> |
1679 |
<? |
1674 |
<? |
1680 |
} |
1675 |
} |
1681 |
?> |
1676 |
?> |
Lines 1714-1727
Link Here
|
1714 |
return $submission[$subid]; |
1709 |
return $submission[$subid]; |
1715 |
} |
1710 |
} |
1716 |
|
1711 |
|
1717 |
$query = "select |
1712 |
$query = "SELECT /* functions.php:get_submission_details() */ * |
1718 |
* |
1713 |
FROM submissions |
1719 |
from |
1714 |
WHERE submission_id = '".addslashes($subid)."' |
1720 |
submissions |
1715 |
AND conference_id = ".addslashes($context->theconference->getConferenceID())." |
1721 |
where |
|
|
1722 |
submission_id = '".addslashes($subid)."' |
1723 |
and |
1724 |
conference_id = ".addslashes($context->theconference->getConferenceID())." |
1725 |
"; |
1716 |
"; |
1726 |
$res = conference_sql($query); |
1717 |
$res = conference_sql($query); |
1727 |
$found = mysql_fetch_assoc($res); |
1718 |
$found = mysql_fetch_assoc($res); |
Lines 1852-1904
Link Here
|
1852 |
* in the cache), then look them up and cache them |
1843 |
* in the cache), then look them up and cache them |
1853 |
*/ |
1844 |
*/ |
1854 |
if( count($unknowns) > 0 ) { |
1845 |
if( count($unknowns) > 0 ) { |
1855 |
$sql = "select PersonID, FName, LName,Email from People where PersonID in ('" . implode("','",$unknowns) . "')"; |
1846 |
$sql = "select /* functions.php:get_people_information().1 */ userid AS BugzillaUserID, realname, login_name from profiles where userid in ('" . implode("','",$unknowns) . "')"; |
1856 |
$result = foundation_sql($sql); |
1847 |
$result = bugzilla_sql($sql); |
1857 |
$people = array(); |
1848 |
$people = array(); |
1858 |
|
1849 |
|
1859 |
while( $row = mysql_fetch_assoc($result) ) { |
1850 |
while( $row = mysql_fetch_assoc($result) ) { |
1860 |
/* |
1851 |
/* |
1861 |
* gather the speaker information for this person |
1852 |
* gather the speaker information for this person |
1862 |
*/ |
1853 |
*/ |
1863 |
$query = "select |
1854 |
$query = "select /* functions.php:get_people_information().2 */ * |
1864 |
* |
1855 |
FROM speakers |
1865 |
from |
1856 |
WHERE BugzillaUserID = '".addslashes($row['BugzillaUserID'])."' |
1866 |
speakers |
1857 |
AND conference_id = '".addslashes($context->theconference->getConferenceID())."'"; |
1867 |
where |
|
|
1868 |
PersonID = '".addslashes($row['PersonID'])."' |
1869 |
and |
1870 |
conference_id = '".addslashes($context->theconference->getConferenceID())."' |
1871 |
"; |
1872 |
$speaker_res = conference_sql($query); |
1858 |
$speaker_res = conference_sql($query); |
1873 |
$speaker = mysql_fetch_assoc($speaker_res); |
1859 |
$speaker = mysql_fetch_assoc($speaker_res); |
1874 |
|
1860 |
|
1875 |
$p = array(); |
1861 |
$p = array(); |
1876 |
$p['name'] = $row['FName'] . ' ' . $row['LName']; |
1862 |
$p['name'] = $row['realname']; |
1877 |
$p['first'] = $row['FName']; |
1863 |
$names = split_full_name($row['realname']); |
1878 |
$p['last'] = $row['LName']; |
1864 |
$p['first'] = $names['FName']; |
1879 |
$p['email'] = $row['Email']; |
1865 |
$p['last'] = $names['LName']; |
1880 |
$p['PersonID'] = $row['PersonID']; |
1866 |
$p['email'] = $row['login_name']; |
|
|
1867 |
$p['PersonID'] = $row['BugzillaUserID']; |
1868 |
$p['BugzillaUserID'] = $row['BugzillaUserID']; |
1881 |
$p['signed_speaker_agreement'] = $speaker['signed_speaker_agreement']; |
1869 |
$p['signed_speaker_agreement'] = $speaker['signed_speaker_agreement']; |
1882 |
|
1870 |
|
1883 |
/* |
1871 |
/* |
1884 |
* find company affiliation |
1872 |
* TODO: find company affiliation |
1885 |
*/ |
1873 |
*/ |
1886 |
$sql = "select Organizations.Name1 from Organizations,OrganizationContacts where OrganizationContacts.PersonID = '".addslashes($row['PersonID'])."' and OrganizationContacts.Relation = 'EMPLY' and Organizations.OrganizationID = OrganizationContacts.OrganizationID"; |
1874 |
$sql = "select /* functions.php:get_people_information().3 */ Organizations.Name1 from Organizations,OrganizationContacts where OrganizationContacts.PersonID = '".addslashes($row['PersonID'])."' and OrganizationContacts.Relation = 'EMPLY' and Organizations.OrganizationID = OrganizationContacts.OrganizationID"; |
1887 |
$rescomp = foundation_sql($sql); |
1875 |
$rescomp = foundation_sql($sql); |
1888 |
if($company = mysql_fetch_assoc($rescomp)){ |
1876 |
if($company = mysql_fetch_assoc($rescomp)){ |
1889 |
$p['company'] = $company['Name1']; |
1877 |
$p['company'] = $company['Name1']; |
1890 |
} |
1878 |
} |
1891 |
|
1879 |
|
1892 |
/* |
1880 |
$rtrn[$row['BugzillaUserID']] = $p; |
1893 |
* bad bad bad hack |
1881 |
$known_people[$row['BugzillaUserID']] = $p; |
1894 |
* |
|
|
1895 |
*/ |
1896 |
if($p['company'] == "Innoopract"){ |
1897 |
$p['company'] = "EclipseSource"; |
1898 |
} |
1899 |
|
1900 |
$rtrn[$row['PersonID']] = $p; |
1901 |
$known_people[$row['PersonID']] = $p; |
1902 |
} |
1882 |
} |
1903 |
} |
1883 |
} |
1904 |
/* |
1884 |
/* |
Lines 1943-1969
Link Here
|
1943 |
$invited[$k] = array('email'=> $auth); |
1923 |
$invited[$k] = array('email'=> $auth); |
1944 |
} |
1924 |
} |
1945 |
} |
1925 |
} |
1946 |
|
|
|
1947 |
for($i=0; $i < count($authors); $i++){ |
1926 |
for($i=0; $i < count($authors); $i++){ |
1948 |
$person = $authors[$i]; |
1927 |
$person = $authors[$i]; |
1949 |
?><li id="<?=$role;?>-<?=$person['PersonID'];?>"> |
1928 |
?><li id="<?=$role;?>-<?=$person['BugzillaUserID'];?>"> |
1950 |
<?show_person($person['PersonID']);?> |
1929 |
<?show_person($person['BugzillaUserID']);?> |
1951 |
<?php |
1930 |
<?php |
1952 |
/* |
1931 |
/* |
1953 |
* if this author is the current one logged in |
1932 |
* if this author is the current one logged in |
1954 |
*/ |
1933 |
*/ |
1955 |
if($person['PersonID'] == $context->theuser->getFoundationID()){ |
1934 |
if($person['BugzillaUserID'] == $context->theuser->getBugzillaUserID()){ |
1956 |
if(preg_match("/assistant/",$role)){ |
1935 |
if(preg_match("/assistant/",$role)){ |
1957 |
/* |
1936 |
/* |
1958 |
* .. then show the 'become author' option |
1937 |
* .. then show the 'become author' option |
1959 |
*/ |
1938 |
*/ |
1960 |
echo "<a href='' onclick='becomeAuthor(\"".$context->theuser->getFoundationID()."\",".$submission_id.");return false;'>become author</a>"; |
1939 |
echo "<a href='' onclick='becomeAuthor(\"".$context->theuser->getBugzillaUserID()."\",".$submission_id.");return false;'>become author</a>"; |
1961 |
} |
1940 |
} |
1962 |
if(preg_match("/author/",$role)){ |
1941 |
if(preg_match("/author/",$role)){ |
1963 |
/* |
1942 |
/* |
1964 |
* .. then show the 'become assistant' option |
1943 |
* .. then show the 'become assistant' option |
1965 |
*/ |
1944 |
*/ |
1966 |
echo "<a href='' title='I am proposing this submission on the behalf of others' onclick='becomeAssistant(\"".$context->theuser->getFoundationID()."\",".$submission_id.");return false;'>become assistant</a>"; |
1945 |
echo "<a href='' title='I am proposing this submission on the behalf of others' onclick='becomeAssistant(\"".$context->theuser->getBugzillaUserID()."\",".$submission_id.");return false;'>become assistant</a>"; |
1967 |
} |
1946 |
} |
1968 |
} |
1947 |
} |
1969 |
|
1948 |
|
Lines 1977-1983
Link Here
|
1977 |
* .. show the remove icon |
1956 |
* .. show the remove icon |
1978 |
*/ |
1957 |
*/ |
1979 |
?> |
1958 |
?> |
1980 |
<a href=''onClick="remove_author(<?=$submission_id;?>,'<?=$person['PersonID'];?>','<?=$role;?>'); return false;"><img src="image/minus.gif"></a><? |
1959 |
<a href=''onClick="remove_author(<?=$submission_id;?>,'<?=$person['BugzillaUserID'];?>','<?=$role;?>'); return false;"><img src="image/minus.gif"></a><? |
1981 |
} |
1960 |
} |
1982 |
|
1961 |
|
1983 |
/* |
1962 |
/* |
Lines 1989-2000
Link Here
|
1989 |
*/ |
1968 |
*/ |
1990 |
if($i != 0){ |
1969 |
if($i != 0){ |
1991 |
?> |
1970 |
?> |
1992 |
<div class='reorder-authors' onclick="reorder_authors(<?=$submission_id?>,'<?=$person['PersonID']?>','<?=$role;?>','up');">⇑</div> |
1971 |
<div class='reorder-authors' onclick="reorder_authors(<?=$submission_id?>,'<?=$person['BugzillaUserID']?>','<?=$role;?>','up');">⇑</div> |
1993 |
<? |
1972 |
<? |
1994 |
} |
1973 |
} |
1995 |
if($i != count($authors)-1){ |
1974 |
if($i != count($authors)-1){ |
1996 |
?> |
1975 |
?> |
1997 |
<div class='reorder-authors' onclick="reorder_authors(<?=$submission_id?>,'<?=$person['PersonID']?>','<?=$role;?>','down');">⇓</div> |
1976 |
<div class='reorder-authors' onclick="reorder_authors(<?=$submission_id?>,'<?=$person['BugzillaUserID']?>','<?=$role;?>','down');">⇓</div> |
1998 |
<? |
1977 |
<? |
1999 |
} |
1978 |
} |
2000 |
} |
1979 |
} |
Lines 2148-2155
Link Here
|
2148 |
foreach($pc as $PersonID){ |
2127 |
foreach($pc as $PersonID){ |
2149 |
$person = get_people_information($PersonID); |
2128 |
$person = get_people_information($PersonID); |
2150 |
|
2129 |
|
2151 |
?><li style='margin-bottom: 5px;'><?= show_person($person['PersonID'])?><a href='' |
2130 |
?><li style='margin-bottom: 5px;'><?= show_person($person['BugzillaUserID'])?><a href='' |
2152 |
onClick="remove_program_committee('<?=$person['PersonID'];?>'); return false;"><img |
2131 |
onClick="remove_program_committee('<?=$person['BugzillaUserID'];?>'); return false;"><img |
2153 |
src="image/minus.gif"></a> |
2132 |
src="image/minus.gif"></a> |
2154 |
<br> |
2133 |
<br> |
2155 |
(<?=$person['email']?>) |
2134 |
(<?=$person['email']?>) |
Lines 2164-2171
Link Here
|
2164 |
foreach($queens as $PersonID){ |
2143 |
foreach($queens as $PersonID){ |
2165 |
$person = get_people_information($PersonID); |
2144 |
$person = get_people_information($PersonID); |
2166 |
|
2145 |
|
2167 |
?><li style='margin-bottom: 5px;'><?= show_person($person['PersonID'])?><a href='' |
2146 |
?><li style='margin-bottom: 5px;'><?= show_person($person['BugzillaUserID'])?><a href='' |
2168 |
onClick="remove_conference_queen('<?=$person['PersonID'];?>'); return false;"><img |
2147 |
onClick="remove_conference_queen('<?=$person['BugzillaUserID'];?>'); return false;"><img |
2169 |
src="image/minus.gif"></a> |
2148 |
src="image/minus.gif"></a> |
2170 |
<br> |
2149 |
<br> |
2171 |
(<?=$person['email']?>) |
2150 |
(<?=$person['email']?>) |
Lines 2224-2236
Link Here
|
2224 |
if(!isset($roles[$role][$context->theconference->getConferenceID()])){ |
2203 |
if(!isset($roles[$role][$context->theconference->getConferenceID()])){ |
2225 |
$roles[$role][$context->theconference->getConferenceID()] = false; |
2204 |
$roles[$role][$context->theconference->getConferenceID()] = false; |
2226 |
|
2205 |
|
2227 |
$query = "select * from people_roles where |
2206 |
$query = "SELECT /* functions.php:current_user_has_role() */ * FROM people_roles |
2228 |
PersonID = '".addslashes($context->theuser->getFoundationID())."' |
2207 |
WHERE BugzillaUserID = '" . $context->theuser->getBugzillaUserID() . "' |
2229 |
and |
2208 |
AND role = '".addslashes($role)."' |
2230 |
role = '".addslashes($role)."' |
2209 |
AND conference_id = '".addslashes($context->theconference->getConferenceID()) . "'"; |
2231 |
and |
|
|
2232 |
conference_id = '".addslashes($context->theconference->getConferenceID())."' |
2233 |
"; |
2234 |
$res = conference_sql($query); |
2210 |
$res = conference_sql($query); |
2235 |
|
2211 |
|
2236 |
if(mysql_num_rows($res) == 1){ |
2212 |
if(mysql_num_rows($res) == 1){ |
Lines 2251-2282
Link Here
|
2251 |
$people_to_email = $PersonIDs; |
2227 |
$people_to_email = $PersonIDs; |
2252 |
|
2228 |
|
2253 |
/* |
2229 |
/* |
2254 |
* Find all the users watching everything |
2230 |
* Find all the users watching everything and on the CC list for this talk |
2255 |
*/ |
2231 |
*/ |
2256 |
$query = "select PersonID from watching_everything where conference_id = '".$context->theconference->getConferenceID()."'"; |
2232 |
$query = "select /* functions.php:get_people_info_for_a_submission().1 */ BugzillaUserID from watching_everything where conference_id = '".$context->theconference->getConferenceID()."' |
|
|
2233 |
UNION |
2234 |
SELECT BugzillaUserID from watching_submissions where submission_id = '".addslashes($submission_id)."' and conference_id = '".$context->theconference->getConferenceID()."'"; |
2257 |
$res = conference_sql($query); |
2235 |
$res = conference_sql($query); |
2258 |
while($pid = mysql_fetch_assoc($res)){ |
2236 |
while($pid = mysql_fetch_assoc($res)){ |
2259 |
$people_to_email[] = $pid['PersonID']; |
2237 |
$people_to_email[] = $pid['BugzillaUserID']; |
2260 |
} |
2238 |
} |
2261 |
|
2239 |
|
2262 |
/* |
|
|
2263 |
* Find all the users who are on the CC list for this talk |
2264 |
*/ |
2265 |
$query = "select PersonID from watching_submissions where submission_id = '".addslashes($submission_id)."' and conference_id = '".$context->theconference->getConferenceID()."'"; |
2266 |
$res = conference_sql($query); |
2267 |
while($pid = mysql_fetch_assoc($res)){ |
2268 |
$people_to_email[] = $pid['PersonID']; |
2269 |
} |
2270 |
|
2240 |
|
2271 |
/* |
2241 |
/* |
2272 |
* Find all the people who are watching the category for this talk |
2242 |
* Find all the people who are watching the category for this talk |
2273 |
*/ |
2243 |
*/ |
2274 |
$query = "select |
2244 |
$query = "select /* functions.php:get_people_info_for_a_submission().2 */ |
2275 |
PersonID |
2245 |
BugzillaUserID |
2276 |
from |
2246 |
FROM submissions, categories, watching_categories |
2277 |
submissions, |
|
|
2278 |
categories, |
2279 |
watching_categories |
2280 |
where |
2247 |
where |
2281 |
submissions.submission_id = '".addslashes($submission_id)."' |
2248 |
submissions.submission_id = '".addslashes($submission_id)."' |
2282 |
and |
2249 |
and |
Lines 2288-2301
Link Here
|
2288 |
"; |
2255 |
"; |
2289 |
$res = conference_sql($query); |
2256 |
$res = conference_sql($query); |
2290 |
while($pid = mysql_fetch_assoc($res)){ |
2257 |
while($pid = mysql_fetch_assoc($res)){ |
2291 |
$people_to_email[] = $pid['PersonID']; |
2258 |
$people_to_email[] = $pid['BugzilllaUserID']; |
2292 |
} |
2259 |
} |
2293 |
|
2260 |
|
2294 |
/* |
2261 |
/* |
2295 |
* Find all the people who are watching the type for this talk |
2262 |
* Find all the people who are watching the type for this talk |
2296 |
*/ |
2263 |
*/ |
2297 |
$query = "select |
2264 |
$query = "select |
2298 |
PersonID |
2265 |
BugzillaUserID |
2299 |
from |
2266 |
from |
2300 |
submissions, |
2267 |
submissions, |
2301 |
watching_types |
2268 |
watching_types |
Lines 2308-2329
Link Here
|
2308 |
"; |
2275 |
"; |
2309 |
$res = conference_sql($query); |
2276 |
$res = conference_sql($query); |
2310 |
while($pid = mysql_fetch_assoc($res)){ |
2277 |
while($pid = mysql_fetch_assoc($res)){ |
2311 |
$people_to_email[] = $pid['PersonID']; |
2278 |
$people_to_email[] = $pid['BugzillaUserID']; |
2312 |
} |
2279 |
} |
2313 |
|
2280 |
|
2314 |
/* |
2281 |
/* |
2315 |
* Add authors/assistants to the list of people to email |
2282 |
* Add authors/assistants to the list of people to email |
2316 |
*/ |
2283 |
*/ |
2317 |
$query = "select PersonID from submission_authors where submission_id = '".addslashes($submission_id)."' and role in ('author','assistant')"; |
2284 |
$query = "select BugzillaUserID from submission_authors where submission_id = '".addslashes($submission_id)."' and role in ('author','assistant')"; |
2318 |
$res = conference_sql($query); |
2285 |
$res = conference_sql($query); |
2319 |
while($person = mysql_fetch_assoc($res)){ |
2286 |
while($person = mysql_fetch_assoc($res)){ |
2320 |
$people_to_email[] = $person['PersonID']; |
2287 |
$people_to_email[] = $person['BugzillaUserID']; |
2321 |
} |
2288 |
} |
2322 |
/* |
2289 |
/* |
2323 |
* Remove any duplicate people from the list |
2290 |
* Remove any duplicate people from the list |
2324 |
*/ |
2291 |
*/ |
2325 |
$people_to_email = array_unique($people_to_email); |
2292 |
$people_to_email = array_unique($people_to_email); |
2326 |
|
|
|
2327 |
/* |
2293 |
/* |
2328 |
* Get all the peoples names and email addresses |
2294 |
* Get all the peoples names and email addresses |
2329 |
*/ |
2295 |
*/ |
Lines 2396-2416
Link Here
|
2396 |
|
2362 |
|
2397 |
function get_registration_master_email_address(){ |
2363 |
function get_registration_master_email_address(){ |
2398 |
global $context; |
2364 |
global $context; |
2399 |
$query = "select |
2365 |
$query = "select /* functions.php:get_registration_master_email_address() */ BugzillaUserID |
2400 |
PersonID |
2366 |
FROM people_roles |
2401 |
from |
2367 |
WHERE people_roles.role = 'registration_master' |
2402 |
people_roles |
2368 |
AND people_roles.conference_id = '".addslashes($context->theconference->getConferenceID())."'"; |
2403 |
where |
|
|
2404 |
people_roles.role = 'registration_master' |
2405 |
and |
2406 |
people_roles.conference_id = '".addslashes($context->theconference->getConferenceID())."' |
2407 |
"; |
2408 |
$res = conference_sql($query); |
2369 |
$res = conference_sql($query); |
2409 |
|
2370 |
|
2410 |
$reg_masters = array(); |
2371 |
$reg_masters = array(); |
2411 |
if(mysql_num_rows($res) > 0){ |
2372 |
if(mysql_num_rows($res) > 0){ |
2412 |
$person = mysql_fetch_assoc($res); |
2373 |
$person = mysql_fetch_assoc($res); |
2413 |
$person = get_people_information($person['PersonID']); |
2374 |
$person = get_people_information($person['BugzillaUserID']); |
2414 |
$reg_masters[] = $person['email']; |
2375 |
$reg_masters[] = $person['email']; |
2415 |
} |
2376 |
} |
2416 |
|
2377 |
|
Lines 2433-2439
Link Here
|
2433 |
$reg_masters = array(); |
2394 |
$reg_masters = array(); |
2434 |
if(mysql_num_rows($res) > 0){ |
2395 |
if(mysql_num_rows($res) > 0){ |
2435 |
$person = mysql_fetch_assoc($res); |
2396 |
$person = mysql_fetch_assoc($res); |
2436 |
$person = get_people_information($person['PersonID']); |
2397 |
$person = get_people_information($person['BugzillaUserID']); |
2437 |
$reg_masters[] = $person['email']; |
2398 |
$reg_masters[] = $person['email']; |
2438 |
} |
2399 |
} |
2439 |
|
2400 |
|
Lines 2521-2541
Link Here
|
2521 |
/* |
2482 |
/* |
2522 |
* Get all the information about all the authors on this submission |
2483 |
* Get all the information about all the authors on this submission |
2523 |
*/ |
2484 |
*/ |
2524 |
$query = "SELECT |
2485 |
$query = "SELECT /* functions.php:get_authors_on_a_submission() */ submission_id, PersonID, BugzillaUserID, role, rank |
2525 |
submission_id,PersonID,role,rank |
2486 |
FROM submission_authors |
2526 |
from |
2487 |
WHERE submission_id in ('".implode("','",$no_cache)."') |
2527 |
submission_authors |
2488 |
AND role IN ('author','assistant') |
2528 |
where |
2489 |
order by rank asc"; |
2529 |
submission_authors.submission_id in ('".implode("','",$no_cache)."') |
|
|
2530 |
and |
2531 |
role in ('author','assistant') |
2532 |
order by |
2533 |
rank asc |
2534 |
"; |
2535 |
$res = conference_sql($query); |
2490 |
$res = conference_sql($query); |
2536 |
|
2491 |
|
2537 |
while($row = mysql_fetch_assoc($res)){ |
2492 |
while($row = mysql_fetch_assoc($res)){ |
2538 |
$submissions[$row['submission_id']]['role'][$row['role']][] = $row['PersonID']; |
2493 |
$submissions[$row['submission_id']]['role'][$row['role']][] = $row['BugzillaUserID']; |
2539 |
} |
2494 |
} |
2540 |
} |
2495 |
} |
2541 |
|
2496 |
|
Lines 2660-2700
Link Here
|
2660 |
} |
2615 |
} |
2661 |
|
2616 |
|
2662 |
|
2617 |
|
2663 |
function get_speakers_accepted_submissions($PersonID){ |
2618 |
function get_speakers_accepted_submissions($BugzillaUserID){ |
2664 |
global $context; |
|
|
2665 |
static $people = array(); |
2666 |
|
2667 |
if(isset($people[$PersonID])){ |
2668 |
return $people[$PersonID]; |
2669 |
} |
2670 |
|
2671 |
/* |
2672 |
* find all the accepted talks the specified user is a speaker on |
2673 |
*/ |
2674 |
$query = "select |
2675 |
* |
2676 |
from |
2677 |
submissions, |
2678 |
submission_authors |
2679 |
where |
2680 |
submissions.submission_id = submission_authors.submission_id |
2681 |
and |
2682 |
PersonID = '".addslashes($PersonID)."' |
2683 |
and |
2684 |
submissions.conference_id = '".addslashes($context->theconference->getConferenceID())."' |
2685 |
and |
2686 |
status = 'accepted' |
2687 |
and |
2688 |
submission_authors.role = 'author' |
2689 |
order by submissions.submission_id |
2690 |
"; |
2691 |
|
2692 |
$res = conference_sql($query); |
2693 |
$subs = array(); |
2619 |
$subs = array(); |
2694 |
while($row = mysql_fetch_assoc($res)){ |
2620 |
if(preg_match("/^[0-9]+$/", $BugzillaUserID)) { |
2695 |
$subs[$row['submission_id']] = $row; |
2621 |
global $context; |
|
|
2622 |
static $people = array(); |
2623 |
|
2624 |
if(isset($people[$PersonID])){ |
2625 |
return $people[$PersonID]; |
2626 |
} |
2627 |
|
2628 |
/* |
2629 |
* find all the accepted talks the specified user is a speaker on |
2630 |
*/ |
2631 |
$query = "select /* functions.php:get_speakers_accepted_submissions() */ * FROM submissions AS S |
2632 |
INNER JOIN submission_authors AS A ON A.submission_id = S.submission_id |
2633 |
WHERE A.BugzillaUserID = ". mysql_real_escape_string($BugzillaUserID) . " |
2634 |
AND S.conference_id = '".mysql_real_escape_string($context->theconference->getConferenceID())."' |
2635 |
and status = 'accepted' and A.role = 'author' order by S.submission_id"; |
2636 |
|
2637 |
$res = conference_sql($query); |
2638 |
while($row = mysql_fetch_assoc($res)){ |
2639 |
$subs[$row['submission_id']] = $row; |
2640 |
} |
2641 |
$people[$PersonID] = $subs; |
2696 |
} |
2642 |
} |
2697 |
$people[$PersonID] = $subs; |
|
|
2698 |
return $subs; |
2643 |
return $subs; |
2699 |
} |
2644 |
} |
2700 |
|
2645 |
|