本文整理汇总了PHP中generate_XSLT函数的典型用法代码示例。如果您正苦于以下问题:PHP generate_XSLT函数的具体用法?PHP generate_XSLT怎么用?PHP generate_XSLT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了generate_XSLT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: Copyright
Copyright (c) 2002 Kitware, Inc. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
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 'login.php';
include "cdash/version.php";
if ($session_OK) {
include_once 'cdash/common.php';
include_once "cdash/ctestparser.php";
set_time_limit(0);
$db = pdo_connect("{$CDASH_DB_HOST}", "{$CDASH_DB_LOGIN}", "{$CDASH_DB_PASS}");
pdo_select_db("{$CDASH_DB_NAME}", $db);
checkUserPolicy(@$_SESSION['cdash']['loginid'], 0);
// only admin
$xml = begin_XML_for_XSLT();
$xml .= "<title>CDash - Backup</title>";
$xml .= "<menutitle>CDash</menutitle>";
$xml .= "<menusubtitle>Backup</menusubtitle>";
$xml .= "<backurl>user.php</backurl>";
$xml .= "</cdash>";
// Now doing the xslt transition
generate_XSLT($xml, "manageBackup");
}
// end session
开发者ID:rpshaw,项目名称:CDash,代码行数:30,代码来源:manageBackup.php
示例3: pdo_query
}
$result = pdo_query($query);
if (!$result) {
$xml .= '<db_created>0</db_created>';
die(pdo_error());
}
$query = '';
}
}
}
// Check the version of PostgreSQL
$result_version = pdo_query('SELECT version()');
$version_array = pdo_fetch_array($result_version);
if (strpos(strtolower($version_array[0]), 'postgresql 9.') !== false) {
// For PgSQL 9.0 we need to set the bytea_output to 'escape' (it was changed to hexa)
@pdo_query('ALTER DATABASE ' . $CDASH_DB_NAME . " SET bytea_output TO 'escape'");
}
}
pdo_query('INSERT INTO ' . qid('user') . " (email,password,firstname,lastname,institution,admin) VALUES ('" . $admin_email . "', '" . md5($admin_password) . "', 'administrator', '','Kitware Inc.', 1)");
echo pdo_error();
$xml .= '<db_created>1</db_created>';
// Set the database version
setVersion();
}
}
}
}
$xml .= '</cdash>';
// Now doing the xslt transition
generate_XSLT($xml, 'install');
开发者ID:kitware,项目名称:cdash,代码行数:30,代码来源:install.php
示例4: list
list($usec, $sec) = explode(' ', microtime());
return (double) $sec + (double) $usec * 100000;
}
srand(make_seed_recoverpass());
$password = "";
$max = strlen($keychars) - 1;
for ($i = 0; $i <= $length; $i++) {
$password .= substr($keychars, rand(0, $max), 1);
}
$currentURI = get_server_URI();
$url = $currentURI . "/user.php";
$text = "Hello,\n\n You have asked to recover your password for CDash.\n\n";
$text .= "Your new password is: " . $password . "\n";
$text .= "Please go to this page to login: ";
$text .= "{$url}\n";
$text .= "\n\nGenerated by CDash";
if (cdashmail("{$email}", "CDash password recovery", $text, "From: CDash <" . $CDASH_EMAIL_FROM . ">\nReply-To: " . $CDASH_EMAIL_REPLY . "\nContent-type: text/plain; charset=utf-8\nX-Mailer: PHP/" . phpversion() . "\nMIME-Version: 1.0")) {
$md5pass = md5($password);
// If we can send the email we update the database
pdo_query("UPDATE " . qid("user") . " SET password='{$md5pass}' WHERE email='{$email}'");
add_last_sql_error("recoverPassword");
$xml .= "<message>A confirmation message has been sent to your inbox.</message>";
} else {
$xml .= "<warning>Cannot send recovery email</warning>";
}
}
}
$xml .= "</cdash>";
// Now doing the xslt transition
generate_XSLT($xml, "recoverPassword");
开发者ID:rpshaw,项目名称:CDash,代码行数:30,代码来源:recoverPassword.php
示例5: 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,代码行数:30,代码来源:testOverview.php
示例6: pdo_fetch_array
$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,代码行数:30,代码来源:viewFeed.php
示例7: 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
示例8: dbAdd
}
$xml .= " dbAdd ( false, \"" . $file['filename'] . " Revision: " . $file['revision'] . "\",\"" . $file['diff_url'] . "\",2,\"\",\"1\",\"" . $file['author'] . "\",\"" . $file['email'] . "\",\"" . $file['log'] . "\",\"" . $file['bugurl'] . "\",\"" . $file['bugid'] . "\",\"" . $file['bugpos'] . "\")\n";
}
// Modified files
$xml .= "dbAdd (true, \"Modified files (" . count($locallymodified) . ")\", \"\", 0, \"\", \"1\", \"\", \"\", \"\", \"\", \"\", \"\")\n";
$previousdir = "";
foreach ($locallymodified as $file) {
$directory = $file['directory'];
if ($previousdir == "" || $directory != $previousdir) {
$xml .= " dbAdd (true, \"" . $directory . "\", \"\", 1, \"\", \"1\", \"\", \"\", \"\", \"\", \"\", \"\")\n";
$previousdir = $directory;
}
$xml .= " dbAdd ( false, \"" . $file['filename'] . "\",\"" . $file['diff_url'] . "\",2,\"\",\"1\",\"" . $file['author'] . "\",\"" . $file['email'] . "\",\"" . $file['log'] . "\",\"" . $file['bugurl'] . "\",\"" . $file['bugid'] . "\",\"" . $file['bugpos'] . "\")\n";
}
// Conflicting files
$xml .= "dbAdd (true, \"Conflicting files (" . count($conflictingfiles) . ")\", \"\", 0, \"\", \"1\", \"\", \"\", \"\", \"\", \"\", \"\")\n";
$previousdir = "";
foreach ($conflictingfiles as $file) {
$directory = $file['directory'];
if ($previousdir == "" || $directory != $previousdir) {
$xml .= " dbAdd (true, \"" . $directory . "\", \"\", 1, \"\", \"1\", \"\", \"\", \"\", \"\", \"\")\n";
$previousdir = $directory;
}
$xml .= " dbAdd ( false, \"" . $file['filename'] . " Revision: " . $file['revision'] . "\",\"" . $file['diff_url'] . "\",2,\"\",\"1\",\"" . $file['author'] . "\",\"" . $file['email'] . "\",\"" . $file['log'] . "\",\"" . $file['bugurl'] . "\",\"" . $file['bugid'] . "\",\"" . $file['bugpos'] . "\")\n";
}
$xml .= "</javascript>";
$xml .= "</updates>";
$xml .= "</cdash>";
// Now doing the xslt transition
generate_XSLT($xml, "viewUpdate");
开发者ID:rpshaw,项目名称:CDash,代码行数:30,代码来源:viewUpdate.php
示例9: htmlspecialchars
} else {
$projectname = htmlspecialchars(pdo_real_escape_string($projectname));
$projectid = get_project_id($projectname);
@($date = $_GET["date"]);
if ($date != NULL) {
$date = htmlspecialchars(pdo_real_escape_string($date));
}
// Check if the project has any subproject
$Project = new Project();
$Project->Id = $projectid;
$Project->Fill();
$displayProject = false;
if (isset($_GET["display"]) && $_GET["display"] == "project" || isset($_GET["parentid"]) && $_GET["parentid"] > 0) {
$displayProject = true;
}
if (!$displayProject && !isset($_GET["subproject"]) && $Project->GetNumberOfSubProjects($date) > 0) {
$xml = generate_subprojects_dashboard_XML($Project, $date);
// Now doing the xslt transition
generate_XSLT($xml, "indexsubproject");
} else {
$xml = generate_main_dashboard_XML($Project, $date);
// Now doing the xslt transition
if ($xml) {
if (isset($_GET["parentid"])) {
generate_XSLT($xml, "indexchildren");
} else {
generate_XSLT($xml, "index");
}
}
}
}
开发者ID:josephsnyder,项目名称:CDash,代码行数:31,代码来源: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 .= "<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,代码行数:30,代码来源:buildOverview.php
示例13: add_XML_value
$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,代码行数:30,代码来源: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
$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,代码行数:30,代码来源:viewDynamicAnalysis.php
示例16: LoginForm
/** Login Form function */
function LoginForm($loginerror)
{
include dirname(__DIR__) . '/config/config.php';
require_once 'include/pdo.php';
include_once 'include/common.php';
include 'include/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);
// Google OAuth needs to know the base url to redirect back to
$xml .= add_XML_value('CDASH_BASE_URL', get_server_URI());
$xml .= '</oauth2>';
}
$xml .= '</cdash>';
if (!isset($NoXSLGenerate)) {
generate_XSLT($xml, 'login');
}
}
开发者ID:kitware,项目名称:cdash,代码行数:33,代码来源:login_functions.php
示例17: Copyright
<?php
/*=========================================================================
Program: CDash - Cross-Platform Dashboard System
Module: $Id$
Language: PHP
Date: $Date$
Version: $Revision$
Copyright (c) Kitware, Inc. All rights reserved.
See LICENSE or http://www.cdash.org/licensing/ for details.
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.
=========================================================================*/
require_once dirname(dirname(__DIR__)) . '/config/config.php';
$NoXSLGenerate = 1;
include 'old_index.php';
$xml = generate_index_table();
// Now doing the xslt transition
generate_XSLT($xml, 'index');
开发者ID:kitware,项目名称:cdash,代码行数:22,代码来源:index.php
示例18: ReportLastBuild
$xml .= ReportLastBuild("Experimental", $projectid, $siteid, $projectname, $nightlytime);
$xml .= "</project>";
}
$xml .= "</claimedsite>";
}
// Use to build the site/project matrix
foreach ($claimedsiteprojects as $project) {
$xml .= "<claimedsiteproject>";
$xml .= add_XML_value("id", $project["id"]);
$xml .= add_XML_value("name", $project["name"]);
$xml .= add_XML_value("name_encoded", urlencode($project["name"]));
$xml .= "</claimedsiteproject>";
}
if (@$_GET['note'] == "subscribedtoproject") {
$xml .= "<message>You have subscribed to a project.</message>";
} else {
if (@$_GET['note'] == "subscribedtoproject") {
$xml .= "<message>You have been unsubscribed from a project.</message>";
}
}
// If the user is admin we show all the errors
if ($user_array["admin"]) {
$errorlog = pdo_fetch_array(pdo_query("SELECT count(id) FROM errorlog"));
$xml .= add_XML_value("nerrorlogs", $errorlog[0]);
}
$xml .= "</cdash>";
// Now doing the xslt transition
if (!isset($NoXSLGenerate)) {
generate_XSLT($xml, "user");
}
}
开发者ID:rpshaw,项目名称:CDash,代码行数:31,代码来源:user.php
示例19: switch
switch ($row["status"]) {
case "passed":
$xml .= add_XML_value("status", "Passed");
$xml .= add_XML_value("statusclass", "normal");
break;
case "failed":
$xml .= add_XML_value("status", "Failed");
$xml .= add_XML_value("statusclass", "error");
break;
case "notrun":
$xml .= add_XML_value("status", "Not Run");
$xml .= add_XML_value("statusclass", "warning");
break;
}
if ($project['showtesttime']) {
if ($row["timestatus"] < $project['testtimemaxstatus']) {
$xml .= add_XML_value("timestatus", "Passed");
$xml .= add_XML_value("timestatusclass", "normal");
} else {
$xml .= add_XML_value("timestatus", "Failed");
$xml .= add_XML_value("timestatusclass", "error");
}
}
$xml .= "</build>\n";
}
$xml .= "</builds>\n";
$end = microtime_float();
$xml .= "<generationtime>" . round($end - $start, 3) . "</generationtime>";
$xml .= "</cdash>\n";
generate_XSLT($xml, "queryTests");
开发者ID:rpshaw,项目名称:CDash,代码行数:30,代码来源:queryTests.php
示例20: str_pad
if ($branchCoverageData[0] != $branchCoverageData[1]) {
$file_array[$i] .= '<span class="error">';
} else {
$file_array[$i] .= '<span class="normal">';
}
$file_array[$i] .= str_pad($code, 5, ' ', STR_PAD_LEFT) . "</span>";
} else {
$file_array[$i] .= str_pad('', 5, ' ', STR_PAD_LEFT);
}
}
if (array_key_exists($i, $linecodes)) {
$code = $linecodes[$i];
if ($code == 0) {
$file_array[$i] .= '<span class="error">';
} else {
$file_array[$i] .= '<span class="normal">';
}
$file_array[$i] .= str_pad($code, 5, ' ', STR_PAD_LEFT) . " | " . $line;
$file_array[$i] .= "</span>";
} else {
$file_array[$i] .= str_pad('', 5, ' ', STR_PAD_LEFT) . " | " . $line;
}
$i++;
}
$file = implode("<br>", $file_array);
$xml .= "<file>" . utf8_encode(htmlspecialchars($file)) . "</file>";
$xml .= "</coverage>";
$xml .= "</cdash>";
// Now doing the xslt transition
generate_XSLT($xml, "viewCoverageFile");
开发者ID:rpshaw,项目名称:CDash,代码行数:30,代码来源:viewCoverageFile.php
注:本文中的generate_XSLT函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论