当前位置: 首页>>代码示例>>PHP>>正文


PHP add_XML_value函数代码示例

本文整理汇总了PHP中add_XML_value函数的典型用法代码示例。如果您正苦于以下问题:PHP add_XML_value函数的具体用法?PHP add_XML_value怎么用?PHP add_XML_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了add_XML_value函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_project_property

    $xml .= "<menu>";
    $nightlytime = get_project_property($projectname, "nightlytime");
    $xml .= add_XML_value("back", "index.php?project=" . urlencode($projectname) . "&date=" . get_dashboard_date_from_build_starttime($build_array["starttime"], $nightlytime));
    $xml .= add_XML_value("noprevious", "1");
    $xml .= add_XML_value("nonext", "1");
    $xml .= "</menu>";
    $xml .= "<user>";
    $userid = $_SESSION['cdash']['loginid'];
    $user = pdo_query("SELECT admin FROM " . qid("user") . " WHERE id='{$userid}'");
    $user_array = pdo_fetch_array($user);
    $xml .= add_XML_value("id", $userid);
    $xml .= add_XML_value("admin", $user_array["admin"]);
    $xml .= "</user>";
    //get any measurements associated with this test
    $xml .= "<measurements>";
    $query = "SELECT id,name,testpage,summarypage FROM measurement WHERE projectid='{$projectid}' ORDER BY name ASC";
    $result = pdo_query($query);
    while ($row = pdo_fetch_array($result)) {
        $xml .= "<measurement>";
        $xml .= add_XML_value("id", $row["id"]);
        $xml .= add_XML_value("name", $row["name"]);
        $xml .= add_XML_value("showT", $row["testpage"]);
        $xml .= add_XML_value("showS", $row["summarypage"]);
        $xml .= "</measurement>";
    }
    $xml .= "</measurements>";
    $xml .= "</cdash>";
    // Now doing the xslt transition
    generate_XSLT($xml, "manageMeasurements");
}
// end if session
开发者ID:rpshaw,项目名称:CDash,代码行数:31,代码来源:manageMeasurements.php

示例2: natcasesort

    }
    if (count($tests) > 0) {
        natcasesort($tests);
        //now generate some XML
        $xml .= "<tests>\n";
        $previousLetter = "";
        $firstSection = TRUE;
        foreach ($tests as $testName) {
            $letter = strtolower(substr($testName, 0, 1));
            if ($letter != $previousLetter) {
                if ($firstSection) {
                    $xml .= "<section>\n";
                    $firstSection = FALSE;
                } else {
                    $xml .= "</section>\n<section>";
                }
                $xml .= add_XML_value("sectionName", $letter) . "\n";
                $previousLetter = $letter;
            }
            $xml .= "<test>\n";
            $xml .= add_XML_value("testName", $testName) . "\n";
            $summaryLink = "testSummary.php?project={$projectid}&name={$testName}&date={$today}";
            $xml .= add_XML_value("summaryLink", $summaryLink) . "\n";
            $xml .= "</test>\n";
        }
        $xml .= "</section>\n";
        $xml .= "</tests>\n";
    }
}
$xml .= "</cdash>";
generate_XSLT($xml, "testOverview");
开发者ID:rpshaw,项目名称:CDash,代码行数:31,代码来源:testOverview.php

示例3: add_XML_value

        $xml .= add_XML_value('description', stripslashes($siteinformation_array['description']));
        $xml .= add_XML_value('processoris64bits', $siteinformation_array['processoris64bits']);
        $xml .= add_XML_value('processorvendor', $siteinformation_array['processorvendor']);
        $xml .= add_XML_value('processorvendorid', $siteinformation_array['processorvendorid']);
        $xml .= add_XML_value('processorfamilyid', $siteinformation_array['processorfamilyid']);
        $xml .= add_XML_value('processormodelid', $siteinformation_array['processormodelid']);
        $xml .= add_XML_value('processorcachesize', $siteinformation_array['processorcachesize']);
        $xml .= add_XML_value('numberlogicalcpus', $siteinformation_array['numberlogicalcpus']);
        $xml .= add_XML_value('numberphysicalcpus', $siteinformation_array['numberphysicalcpus']);
        $xml .= add_XML_value('totalvirtualmemory', $siteinformation_array['totalvirtualmemory']);
        $xml .= add_XML_value('totalphysicalmemory', $siteinformation_array['totalphysicalmemory']);
        $xml .= add_XML_value('logicalprocessorsperphysical', $siteinformation_array['logicalprocessorsperphysical']);
        $xml .= add_XML_value('processorclockfrequency', $siteinformation_array['processorclockfrequency']);
        $xml .= add_XML_value('ip', $site_array['ip']);
        $xml .= add_XML_value('latitude', $site_array['latitude']);
        $xml .= add_XML_value('longitude', $site_array['longitude']);
        $xml .= add_XML_value('outoforder', $site_array['outoforder']);
        $xml .= '</site>';
        $user2site = pdo_query("SELECT su.userid FROM site2user AS su,user2project AS up\n                            WHERE su.userid=up.userid AND up.role>0 AND su.siteid='{$siteid}' and su.userid='{$userid}'");
        echo pdo_error();
        if (pdo_num_rows($user2site) == 0) {
            $xml .= add_XML_value('siteclaimed', '0');
        } else {
            $xml .= add_XML_value('siteclaimed', '1');
        }
        $xml .= '</user>';
    }
    $xml .= '</cdash>';
    // Now doing the xslt transition
    generate_XSLT($xml, 'editSite');
}
开发者ID:kitware,项目名称:cdash,代码行数:31,代码来源:editSite.php

示例4: elseif

        }
    } elseif (isset($_POST['makenormaluser'])) {
        if ($postuserid > 1) {
            $update_array = pdo_fetch_array(pdo_query('SELECT firstname,lastname FROM ' . qid('user') . " WHERE id='" . $postuserid . "'"));
            pdo_query('UPDATE ' . qid('user') . " SET admin=0 WHERE id='" . $postuserid . "'");
            $xml .= '<warning>' . $update_array['firstname'] . ' ' . $update_array['lastname'] . ' is not administrator anymore.</warning>';
        } else {
            $xml .= '<error>Administrator should remain admin.</error>';
        }
    } elseif (isset($_POST['makeadmin'])) {
        $update_array = pdo_fetch_array(pdo_query('SELECT firstname,lastname FROM ' . qid('user') . " WHERE id='" . $postuserid . "'"));
        pdo_query('UPDATE ' . qid('user') . " SET admin=1 WHERE id='" . $postuserid . "'");
        $xml .= '<warning>' . $update_array['firstname'] . ' ' . $update_array['lastname'] . ' is now an administrator.</warning>';
    } elseif (isset($_POST['removeuser'])) {
        $user = new User();
        $user->Id = $postuserid;
        $user->Fill();
        $name = $user->GetName();
        $user->Delete();
        $xml .= "<warning>{$name} has been removed.</warning>";
    }
    if (isset($_POST['search'])) {
        $xml .= '<search>' . $_POST['search'] . '</search>';
    }
    if (isset($CDASH_FULL_EMAIL_WHEN_ADDING_USER) && $CDASH_FULL_EMAIL_WHEN_ADDING_USER == 1) {
        $xml .= add_XML_value('fullemail', '1');
    }
    $xml .= '</cdash>';
    // Now doing the xslt transition
    generate_XSLT($xml, 'manageUsers');
}
开发者ID:kitware,项目名称:cdash,代码行数:31,代码来源:manageUsers.php

示例5: pdo_connect

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
include "cdash/config.php";
require_once "cdash/pdo.php";
include_once "cdash/common.php";
include_once "cdash/version.php";
require_once "cdash/cdashmail.php";
$db = pdo_connect("{$CDASH_DB_HOST}", "{$CDASH_DB_LOGIN}", "{$CDASH_DB_PASS}");
pdo_select_db("{$CDASH_DB_NAME}", $db);
$xml = begin_XML_for_XSLT();
$xml .= "<title>Recover password</title>";
if (isset($CDASH_NO_REGISTRATION) && $CDASH_NO_REGISTRATION == 1) {
    $xml .= add_XML_value("noregister", "1");
}
@($recover = $_POST["recover"]);
if ($recover) {
    $email = pdo_real_escape_string($_POST["email"]);
    $emailResult = pdo_query("SELECT id FROM " . qid("user") . " where email='{$email}'");
    add_last_sql_error("recoverPassword");
    if (pdo_num_rows($emailResult) == 0) {
        $xml .= "<warning>This email is not registered.</warning>";
    } else {
        // Create a new password
        $keychars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!#\$%&";
        $length = 10;
        // seed with microseconds
        function make_seed_recoverpass()
        {
开发者ID:rpshaw,项目名称:CDash,代码行数:31,代码来源:recoverPassword.php

示例6: pdo_query

    $dynid = $dynamicanalysis_array["id"];
    $defects = pdo_query("SELECT * FROM dynamicanalysisdefect WHERE dynamicanalysisid='{$dynid}'");
    while ($defects_array = pdo_fetch_array($defects)) {
        // defects
        $defect_type = $defects_array["type"];
        if (array_key_exists($defect_type, $defect_nice_names)) {
            $defect_type = $defect_nice_names[$defect_type];
        }
        if (!in_array($defect_type, $defect_types)) {
            $defect_types[] = $defect_type;
        }
        $column = array_search($defect_type, $defect_types);
        $xml .= "<defect>";
        $xml .= add_XML_value("column", $column);
        $xml .= add_XML_value("value", $defects_array["value"]);
        $xml .= "</defect>";
    }
    $xml .= get_labels_xml_from_query_results("SELECT text FROM label, label2dynamicanalysis WHERE " . "label.id=label2dynamicanalysis.labelid AND " . "label2dynamicanalysis.dynamicanalysisid='{$dynid}' " . "ORDER BY text ASC");
    $xml .= "</dynamicanalysis>";
}
// explicitly list the defect types encountered here
// so we can dynamically generate the header row
foreach ($defect_types as $defect_type) {
    $xml .= "<defecttypes>";
    $xml .= add_XML_value("type", $defect_type);
    $xml .= "</defecttypes>";
}
$xml .= add_XML_value("numcolumns", sizeof($defect_types));
$xml .= "</cdash>";
// Now doing the xslt transition
generate_XSLT($xml, "viewDynamicAnalysis");
开发者ID:rpshaw,项目名称:CDash,代码行数:31,代码来源:viewDynamicAnalysis.php

示例7: pdo_fetch_array

    if (pdo_num_rows($project) > 0) {
        $project_array = pdo_fetch_array($project);
        $projectname = $project_array["name"];
    }
    $Project->Id = $projectid;
    $role = $Project->GetUserRole($userid);
} else {
    $projectname = 'Global';
}
$xml = begin_XML_for_XSLT();
$xml .= "<title>Feed - " . $projectname . "</title>";
$xml .= get_cdash_dashboard_xml(get_project_name($projectid), $date);
$sql = '';
if ($date) {
    $sql = "AND date>'" . $date . "'";
}
// Get the errors
$query = pdo_query("SELECT * FROM feed WHERE projectid=" . qnum($projectid) . " ORDER BY id DESC");
while ($query_array = pdo_fetch_array($query)) {
    $xml .= "<feeditem>";
    $xml .= add_XML_value("date", $query_array["date"]);
    $xml .= add_XML_value("buildid", $query_array["buildid"]);
    $xml .= add_XML_value("type", $query_array["type"]);
    $xml .= add_XML_value("description", $query_array["description"]);
    $xml .= "</feeditem>";
}
$xml .= add_XML_value("admin", $User->IsAdmin());
$xml .= add_XML_value("role", $role);
$xml .= "</cdash>";
// Now doing the xslt transition
generate_XSLT($xml, "viewFeed");
开发者ID:rpshaw,项目名称:CDash,代码行数:31,代码来源:viewFeed.php

示例8: add_XML_value

$xml .= add_XML_value("buildtime", date("D, d M Y H:i:s T", strtotime($build_array["starttime"] . " UTC")));
$xml .= "</build>";
$xml .= "<updates>";
// Return the status
$status_array = pdo_fetch_array(pdo_query("SELECT status,revision,priorrevision,path\n                                  FROM buildupdate,build2update AS b2u WHERE buildupdate.id=b2u.updateid AND b2u.buildid='{$buildid}'"));
if (strlen($status_array["status"]) > 0 && $status_array["status"] != "0") {
    $xml .= add_XML_value("status", $status_array["status"]);
} else {
    $xml .= add_XML_value("status", "");
    // empty status
}
$xml .= add_XML_value("revision", $status_array["revision"]);
$xml .= add_XML_value("priorrevision", $status_array["priorrevision"]);
$xml .= add_XML_value("path", $status_array["path"]);
$xml .= add_XML_value("revisionurl", get_revision_url($projectid, $status_array["revision"], $status_array["priorrevision"]));
$xml .= add_XML_value("revisiondiff", get_revision_url($projectid, $status_array["priorrevision"], ''));
// no prior prior revision...
$xml .= "<javascript>";
$updatedfiles = pdo_query("SELECT * FROM updatefile AS uf,build2update AS b2u WHERE uf.updateid=b2u.updateid AND b2u.buildid=" . $buildid . "\n                              ORDER BY REVERSE(RIGHT(REVERSE(filename),LOCATE('/',REVERSE(filename)))) ");
function sort_array_by_directory($a, $b)
{
    return $a > $b ? 1 : 0;
}
function sort_array_by_filename($a, $b)
{
    // Extract directory
    $filenamea = $a['filename'];
    $filenameb = $b['filename'];
    return $filenamea > $filenameb ? 1 : 0;
}
$directoryarray = array();
开发者ID:rpshaw,项目名称:CDash,代码行数:31,代码来源:viewUpdate.php

示例9: generate_subprojects_dashboard_XML

/** Generate the subprojects dashboard */
function generate_subprojects_dashboard_XML($project_instance, $date)
{
    $start = microtime_float();
    $noforcelogin = 1;
    include_once "cdash/config.php";
    require_once "cdash/pdo.php";
    include 'login.php';
    include_once "models/banner.php";
    include_once "models/subproject.php";
    $db = pdo_connect("{$CDASH_DB_HOST}", "{$CDASH_DB_LOGIN}", "{$CDASH_DB_PASS}");
    if (!$db) {
        echo "Error connecting to CDash database server<br>\n";
        return;
    }
    if (!pdo_select_db("{$CDASH_DB_NAME}", $db)) {
        echo "Error selecting CDash database<br>\n";
        return;
    }
    $Project = $project_instance;
    $projectid = $project_instance->Id;
    $homeurl = make_cdash_url(htmlentities($Project->HomeUrl));
    checkUserPolicy(@$_SESSION['cdash']['loginid'], $projectid);
    $xml = begin_XML_for_XSLT();
    $xml .= "<title>CDash - " . $Project->Name . "</title>";
    $Banner = new Banner();
    $Banner->SetProjectId(0);
    $text = $Banner->GetText();
    if ($text !== false) {
        $xml .= "<banner>";
        $xml .= add_XML_value("text", $text);
        $xml .= "</banner>";
    }
    $Banner->SetProjectId($projectid);
    $text = $Banner->GetText();
    if ($text !== false) {
        $xml .= "<banner>";
        $xml .= add_XML_value("text", $text);
        $xml .= "</banner>";
    }
    global $CDASH_SHOW_LAST_SUBMISSION;
    if ($CDASH_SHOW_LAST_SUBMISSION) {
        $xml .= "<showlastsubmission>1</showlastsubmission>";
    }
    list($previousdate, $currentstarttime, $nextdate) = get_dates($date, $Project->NightlyTime);
    $svnurl = make_cdash_url(htmlentities($Project->CvsUrl));
    $homeurl = make_cdash_url(htmlentities($Project->HomeUrl));
    $bugurl = make_cdash_url(htmlentities($Project->BugTrackerUrl));
    $googletracker = htmlentities($Project->GoogleTracker);
    $docurl = make_cdash_url(htmlentities($Project->DocumentationUrl));
    // Main dashboard section
    $xml .= "<dashboard>\n  <datetime>" . date("l, F d Y H:i:s T", time()) . "</datetime>\n  <date>" . $date . "</date>\n  <unixtimestamp>" . $currentstarttime . "</unixtimestamp>\n  <svn>" . $svnurl . "</svn>\n  <bugtracker>" . $bugurl . "</bugtracker>\n  <googletracker>" . $googletracker . "</googletracker>\n  <documentation>" . $docurl . "</documentation>\n  <logoid>" . $Project->getLogoID() . "</logoid>\n  <projectid>" . $projectid . "</projectid>\n  <projectname>" . $Project->Name . "</projectname>\n  <projectname_encoded>" . urlencode($Project->Name) . "</projectname_encoded>\n  <previousdate>" . $previousdate . "</previousdate>\n  <projectpublic>" . $Project->Public . "</projectpublic>\n  <nextdate>" . $nextdate . "</nextdate>";
    if (empty($Project->HomeUrl)) {
        $xml .= "<home>index.php?project=" . urlencode($Project->Name) . "</home>";
    } else {
        $xml .= "<home>" . $homeurl . "</home>";
    }
    if ($CDASH_USE_LOCAL_DIRECTORY && file_exists("local/models/proProject.php")) {
        include_once "local/models/proProject.php";
        $pro = new proProject();
        $pro->ProjectId = $projectid;
        $xml .= "<proedition>" . $pro->GetEdition(1) . "</proedition>";
    }
    if ($currentstarttime > time()) {
        $xml .= "<future>1</future>";
    } else {
        $xml .= "<future>0</future>";
    }
    $xml .= "</dashboard>";
    // Menu definition
    $xml .= "<menu>";
    if (!has_next_date($date, $currentstarttime)) {
        $xml .= add_XML_value("nonext", "1");
    }
    $xml .= "</menu>";
    $beginning_timestamp = $currentstarttime;
    $end_timestamp = $currentstarttime + 3600 * 24;
    $beginning_UTCDate = gmdate(FMT_DATETIME, $beginning_timestamp);
    $end_UTCDate = gmdate(FMT_DATETIME, $end_timestamp);
    // User
    if (isset($_SESSION['cdash'])) {
        $xml .= "<user>";
        $userid = $_SESSION['cdash']['loginid'];
        $user2project = pdo_query("SELECT role FROM user2project WHERE userid='{$userid}' and projectid='{$projectid}'");
        $user2project_array = pdo_fetch_array($user2project);
        $user = pdo_query("SELECT admin FROM " . qid("user") . "  WHERE id='{$userid}'");
        $user_array = pdo_fetch_array($user);
        $xml .= add_XML_value("id", $userid);
        $isadmin = 0;
        if ($user2project_array["role"] > 1 || $user_array["admin"]) {
            $isadmin = 1;
        }
        $xml .= add_XML_value("admin", $isadmin);
        $xml .= add_XML_value("projectrole", $user2project_array['role']);
        $xml .= "</user>";
    }
    // Get some information about the project
    $xml .= "<project>";
    $xml .= add_XML_value("nbuilderror", $Project->GetNumberOfErrorBuilds($beginning_UTCDate, $end_UTCDate, true));
    $xml .= add_XML_value("nbuildwarning", $Project->GetNumberOfWarningBuilds($beginning_UTCDate, $end_UTCDate, true));
//.........这里部分代码省略.........
开发者ID:josephsnyder,项目名称:CDash,代码行数:101,代码来源:index.php

示例10: Banner

        }
        $xml .= "</availableproject>";
    }
    $Banner = new Banner();
    $Banner->SetProjectId($projectid);
    // If submit has been pressed
    @($updateMessage = $_POST["updateMessage"]);
    if (isset($updateMessage)) {
        $Banner->SetText(htmlspecialchars(pdo_real_escape_string($_POST["message"])));
    }
    /** We start generating the XML here */
    // List the available project
    if ($projectid >= 0) {
        $xml .= "<project>";
        $xml .= add_XML_value("id", $Project->Id);
        $xml .= add_XML_value("text", $Banner->GetText());
        if ($projectid > 0) {
            $xml .= add_XML_value("name", $Project->GetName());
            $xml .= add_XML_value("name_encoded", urlencode($Project->GetName()));
        }
        $xml .= add_XML_value("id", $Project->Id);
        $xml .= "</project>";
    }
    $xml .= "</cdash>";
    // Now doing the xslt transition
    generate_XSLT($xml, "manageBanner");
}
// end session OK
?>

开发者ID:rpshaw,项目名称:CDash,代码行数:29,代码来源:manageBanner.php

示例11: add_XML_value

        $xml .= add_XML_value('id', $project_array['id']);
        $xml .= add_XML_value('name', $project_array['name']);
        if ($project_array['id'] == $projectid) {
            $xml .= add_XML_value('selected', '1');
        }
        $xml .= '</availableproject>';
    }
    $Banner = new Banner();
    $Banner->SetProjectId($projectid);
    // If submit has been pressed
    @($updateMessage = $_POST['updateMessage']);
    if (isset($updateMessage)) {
        $Banner->SetText(htmlspecialchars(pdo_real_escape_string($_POST['message'])));
    }
    /* We start generating the XML here */
    // List the available project
    if ($projectid >= 0) {
        $xml .= '<project>';
        $xml .= add_XML_value('id', $Project->Id);
        $xml .= add_XML_value('text', $Banner->GetText());
        if ($projectid > 0) {
            $xml .= add_XML_value('name', $Project->GetName());
            $xml .= add_XML_value('name_encoded', urlencode($Project->GetName()));
        }
        $xml .= add_XML_value('id', $Project->Id);
        $xml .= '</project>';
    }
    $xml .= '</cdash>';
    // Now doing the xslt transition
    generate_XSLT($xml, 'manageBanner');
}
开发者ID:kitware,项目名称:cdash,代码行数:31,代码来源:manageBanner.php

示例12: explode

            $xml .= "</sourcefile>";
        }
        $xml .= "<sourcefile>";
        $xml .= "<name>" . $build_array["sourcefile"] . "</name>";
        $current_file = $build_array["sourcefile"];
    }
    if ($build_array["type"] == 0) {
        $xml .= "<error>";
    } else {
        $xml .= "<warning>";
    }
    $xml .= "<line>" . $build_array["sourceline"] . "</line>";
    $textarray = explode("\n", $build_array["text"]);
    foreach ($textarray as $text) {
        if (strlen($text) > 0) {
            $xml .= add_XML_value("text", $text);
        }
    }
    $xml .= "<sitename>" . $build_array["name"] . "</sitename>";
    $xml .= "<buildname>" . $build_array["buildname"] . "</buildname>";
    if ($build_array["type"] == 0) {
        $xml .= "</error>";
    } else {
        $xml .= "</warning>";
    }
}
if (pdo_num_rows($builds) > 0) {
    $xml .= "</sourcefile>";
}
$xml .= "</cdash>";
generate_XSLT($xml, "buildOverview");
开发者ID:rpshaw,项目名称:CDash,代码行数:31,代码来源:buildOverview.php

示例13: while

while ($projects_array = pdo_fetch_array($projects)) {
    $xml .= '<availableproject>';
    $xml .= add_XML_value('id', $projects_array['id']);
    $xml .= add_XML_value('name', $projects_array['name']);
    if ($projects_array['id'] == $projectid) {
        $xml .= add_XML_value('selected', '1');
    }
    $xml .= '</availableproject>';
}
$xml .= '<dayFrom>' . $dayFrom . '</dayFrom>';
$xml .= '<monthFrom>' . $monthFrom . '</monthFrom>';
$xml .= '<yearFrom>' . $yearFrom . '</yearFrom>';
$xml .= '<dayTo>' . $dayTo . '</dayTo>';
$xml .= '<monthTo>' . $monthTo . '</monthTo>';
$xml .= '<yearTo>' . $yearTo . '</yearTo>';
@($submit = $_POST['Submit']);
// Delete the builds
if (isset($submit)) {
    $begin = $yearFrom . '-' . $monthFrom . '-' . $dayFrom . ' 00:00:00';
    $end = $yearTo . '-' . $monthTo . '-' . $dayTo . ' 00:00:00';
    $sql = 'SELECT id FROM build WHERE projectid=' . qnum($projectid) . " AND\n        parentid IN (0, -1) AND starttime<='{$end}' AND starttime>='{$begin}'\n        ORDER BY starttime ASC";
    $build = pdo_query($sql);
    $builds = array();
    while ($build_array = pdo_fetch_array($build)) {
        $builds[] = $build_array['id'];
    }
    remove_build($builds);
    $xml .= add_XML_value('alert', 'Removed ' . count($builds) . ' builds.');
}
$xml .= '</cdash>';
generate_XSLT($xml, 'removeBuilds');
开发者ID:kitware,项目名称:cdash,代码行数:31,代码来源:removeBuilds.php

示例14: LoginForm

/** Login Form function */
function LoginForm($loginerror)
{
    include "cdash/config.php";
    require_once "cdash/pdo.php";
    include_once "cdash/common.php";
    include "cdash/version.php";
    $xml = begin_XML_for_XSLT();
    $xml .= "<title>Login</title>";
    if (isset($CDASH_NO_REGISTRATION) && $CDASH_NO_REGISTRATION == 1) {
        $xml .= add_XML_value("noregister", "1");
    }
    if (@$_GET['note'] == "register") {
        $xml .= "<message>Registration Complete. Please login with your email and password.</message>";
    }
    if ($loginerror != "") {
        $xml .= "<message>" . $loginerror . "</message>";
    }
    if ($CDASH_ALLOW_LOGIN_COOKIE) {
        $xml .= "<allowlogincookie>1</allowlogincookie>";
    }
    if ($GOOGLE_CLIENT_ID != '' && $GOOGLE_CLIENT_SECRET != '') {
        $xml .= "<oauth2>";
        $xml .= add_XML_value("client", $GOOGLE_CLIENT_ID);
        $xml .= "</oauth2>";
    }
    $xml .= "</cdash>";
    if (!isset($NoXSLGenerate)) {
        generate_XSLT($xml, "login");
    }
}
开发者ID:rpshaw,项目名称:CDash,代码行数:31,代码来源:login.php

示例15: pdo_query

$xml .= '<build>';
$build = pdo_query("SELECT * FROM build WHERE id='{$buildid}'");
$build_array = pdo_fetch_array($build);
$siteid = $build_array['siteid'];
$site_array = pdo_fetch_array(pdo_query("SELECT name FROM site WHERE id='{$siteid}'"));
$xml .= add_XML_value('site', $site_array['name']);
$xml .= add_XML_value('buildname', $build_array['name']);
$xml .= add_XML_value('buildid', $build_array['id']);
$xml .= add_XML_value('buildtime', $build_array['starttime']);
$xml .= '</build>';
// Load coverage file.
$coverageFile = new CoverageFile();
$coverageFile->Id = $fileid;
$coverageFile->Load();
$xml .= '<coverage>';
$xml .= add_XML_value('fullpath', $coverageFile->FullPath);
// Generating the html file
$file_array = explode('<br>', $coverageFile->File);
$i = 0;
// Load the coverage info.
$log = new CoverageFileLog();
$log->BuildId = $buildid;
$log->FileId = $fileid;
$log->Load();
// Detect if we have branch coverage or not.
$hasBranchCoverage = false;
if (!empty($log->Branches)) {
    $hasBranchCoverage = true;
}
foreach ($file_array as $line) {
    $linenumber = $i + 1;
开发者ID:kitware,项目名称:cdash,代码行数:31,代码来源:viewCoverageFile.php


注:本文中的add_XML_value函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。