예제 #1
0
파일: user.php 프로젝트: rpshaw/CDash
 $project = pdo_query("SELECT name,id FROM project WHERE id\n                        NOT IN (SELECT projectid as id FROM user2project\n                        WHERE userid='{$userid}') AND public='1' ORDER BY name");
 $j = 0;
 if ($CDASH_USE_LOCAL_DIRECTORY == '1') {
     if (file_exists('local/user.php')) {
         include_once 'local/user.php';
     }
 }
 while ($project_array = pdo_fetch_array($project)) {
     $xml .= "<publicproject>";
     if ($j % 2 == 0) {
         $xml .= add_XML_value("trparity", "trodd");
     } else {
         $xml .= add_XML_value("trparity", "treven");
     }
     if (function_exists('getAdditionalPublicProject')) {
         $xml .= getAdditionalPublicProject($project_array["id"]);
     }
     $xml .= add_XML_value("id", $project_array["id"]);
     $xml .= add_XML_value("name", $project_array["name"]);
     $xml .= "</publicproject>";
     $j++;
 }
 //Go through the claimed sites
 $claimedsiteprojects = array();
 $siteidwheresql = "";
 $claimedsites = array();
 $site2user = pdo_query("SELECT siteid FROM site2user WHERE userid='{$userid}'");
 while ($site2user_array = pdo_fetch_array($site2user)) {
     $siteid = $site2user_array["siteid"];
     $site["id"] = $siteid;
     $site_array = pdo_fetch_array(pdo_query("SELECT name,outoforder FROM site WHERE id='{$siteid}'"));
예제 #2
0
파일: user.php 프로젝트: kitware/cdash
 $project = pdo_query("SELECT name,id FROM project WHERE id\n                        NOT IN (SELECT projectid as id FROM user2project\n                        WHERE userid='{$userid}') AND public='1' ORDER BY name");
 $j = 0;
 if ($CDASH_USE_LOCAL_DIRECTORY == '1') {
     if (file_exists('local/user.php')) {
         include_once 'local/user.php';
     }
 }
 while ($project_array = pdo_fetch_array($project)) {
     $xml .= '<publicproject>';
     if ($j % 2 == 0) {
         $xml .= add_XML_value('trparity', 'trodd');
     } else {
         $xml .= add_XML_value('trparity', 'treven');
     }
     if (function_exists('getAdditionalPublicProject')) {
         $xml .= getAdditionalPublicProject($project_array['id']);
     }
     $xml .= add_XML_value('id', $project_array['id']);
     $xml .= add_XML_value('name', $project_array['name']);
     $xml .= '</publicproject>';
     $j++;
 }
 //Go through the claimed sites
 $claimedsiteprojects = array();
 $siteidwheresql = '';
 $claimedsites = array();
 $site2user = pdo_query("SELECT siteid FROM site2user WHERE userid='{$userid}'");
 while ($site2user_array = pdo_fetch_array($site2user)) {
     $siteid = $site2user_array['siteid'];
     $site['id'] = $siteid;
     $site_array = pdo_fetch_array(pdo_query("SELECT name,outoforder FROM site WHERE id='{$siteid}'"));