<?php require_once "mantis_config.php"; $mantis = new PHPXMLRPCClient(); $mantis->createClient($web_path_to_mantis_xmlrpc . "mantisserver.php", $domain); $mantis->setXMLRPCDebug(0); global $project_id, $task_id, $mantis_url; $AppUI->savePlace(); /* $titleBlock = new CTitleBlock( 'Mantis', 'mantis_logo_button.gif', $m, "$m.$a" ); $titleBlock->show(); */ $project_id = ""; if (!empty($_REQUEST['project_id'])) { $project_id = $_REQUEST['project_id']; } $userid = $AppUI->user_id; $query1 = "SELECT user_username FROM users WHERE user_id = '{$userid}' "; $result1 = mysql_query($query1) or die(mysql_error()); while ($row1 = mysql_fetch_array($result1, MYSQL_NUM)) { $username = $row1[0]; } $query2 = "SELECT contact_email FROM contacts WHERE contact_id = '{$userid}' "; $result2 = mysql_query($query2) or die(mysql_error()); while ($row2 = mysql_fetch_array($result2, MYSQL_NUM)) { $email = $row2[0]; } function show_issue($summary, $bugid, $username, $email) { $mantispath = dPgetConfig('mantis_path'); $parm = $username;
require_once "mantis_config.php"; $forward_link = ""; if ($_POST["project_id"] == "" || $_POST["project_id"] == 0) { $forward_link = "m=mantis"; } else { $forward_link = "m=projects&a=view&project_id=" . $_POST["project_id"]; } if (count($_POST["bugs"]) == 0 || $_POST["bug_action"] == "") { $AppUI->redirect($forward_link); die; } if (($_POST["project_id"] == "" || $_POST["project_id"] == 0) && $_POST["bug_action"] == "task") { $AppUI->redirect($forward_link); die; } $mantis = new PHPXMLRPCClient(); $mantis->createClient($web_path_to_mantis_xmlrpc . "mantisserver.php", $domain); $mantis->setXMLRPCDebug(0); if ($_POST["bug_action"] == "task") { foreach ($_POST["bugs"] as $b) { $mantis->resetRequest(); $mantis->setFunction("MantisRPC"); $mantis->addArg(array($mantis_user, $mantis_pass)); $mantis->addArg("getMantisBugById"); $mantis->addArg($b); $bug = $mantis->call(); if (ERROR::isError($bug)) { die($bug->getErrstr()); } $obj = new CTask(); $obj->task_id = false;
<?php require_once "mantis_config.php"; if ($_GET["project_id"] == "") { $AppUI->redirect("m=projects"); die; } $forward_link = "m=projects&a=view&project_id=" . $_GET["project_id"]; $mantis = new PHPXMLRPCClient(); $mantis->createClient($web_path_to_mantis_xmlrpc . "mantisserver.php", $domain); $mantis->setXMLRPCDebug(0); $query = "SELECT project_name, project_description FROM projects WHERE project_id='" . $_GET["project_id"] . "'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); $project_name = $row["project_name"]; $project_description = $row["project_description"]; $mantis->resetRequest(); $mantis->setFunction("MantisRPC"); $mantis->addArg(array($mantis_user, $mantis_pass)); $mantis->addArg("project_create"); $mantis->addArg($project_name); $mantis->addArg($project_description); $mantis->addArg("10"); $bug = $mantis->call(); if (ERROR::isError($bug)) { die($bug->getErrstr()); } $AppUI->redirect($forward_link); die;