本文整理汇总了PHP中util_result_column_to_array函数的典型用法代码示例。如果您正苦于以下问题:PHP util_result_column_to_array函数的具体用法?PHP util_result_column_to_array怎么用?PHP util_result_column_to_array使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了util_result_column_to_array函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: result_column_to_array
function result_column_to_array($result, $col = 0)
{
/*
backwards compatibility
*/
return util_result_column_to_array($result, $col);
}
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:7,代码来源:utils.php
示例2: rssProjectCallback
/**
* callback function used during the RSS export
*
* @param array $dataRow array containing data for the current row
* @return string additionnal information added in the RSS document
*/
function rssProjectCallback($dataRow)
{
// $default_trove_cat defined in local.inc
$result = db_query('SELECT trove_cat.fullpath ' . 'FROM trove_group_link, trove_cat ' . 'WHERE trove_group_link.trove_cat_root=' . $GLOBALS['default_trove_cat'] . ' ' . 'AND trove_group_link.trove_cat_id=trove_cat.trove_cat_id ' . 'AND group_id=\'' . $dataRow['group_id'] . '\'');
$return = '';
$return .= ' | date registered: ' . date('M jS Y', $dataRow['register_time']);
$return .= ' | category: ' . str_replace(' ', '', implode(',', util_result_column_to_array($result)));
$return .= ' | license: ' . $dataRow['license'];
return $return;
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:16,代码来源:ProjectRssSearchRenderer.class.php
示例3: getReports_ids
/**
* Retrieve the artifact report list order by scope
*
* @param group_artifact_id: the artifact type
*
* @return array
*/
function getReports_ids()
{
// If user is unknown then get only project-wide and system wide reports
// else get personal reports in addition project-wide and system wide.
$sql = "SELECT report_graphic_id FROM plugin_graphontrackers_report_graphic WHERE ";
if ($this->user_id == 100) {
$sql .= "(group_artifact_id=" . db_ei($this->group_artifact_id) . " AND scope='P') OR scope='S' " . "ORDER BY report_graphic_id";
} else {
$sql .= "(group_artifact_id=" . db_ei($this->group_artifact_id) . " AND (user_id=" . db_ei($this->user_id) . " OR scope='P')) OR " . "scope='S' ORDER BY report_graphic_id";
}
$res = db_query($sql);
return util_result_column_to_array($res);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:20,代码来源:GraphicReportFactory.class.php
示例4: get_trove_sub_projects
function get_trove_sub_projects($cat_id)
{
if (!$cat_id) {
return '';
}
echo '<P>IN SUBPROJECT' . $cat_id;
//return an array of trove categories under $cat_id
$sql = "SELECT trove_cat_id FROM trove_cat WHERE parent IN ({$cat_id})";
$result = db_query($sql);
echo db_error();
$rows = db_numrows($result);
for ($i = 0; $i < $rows; $i++) {
$trove_list = array_merge(get_trove_sub_projects(db_result($result, $i, 0)), $trove_list);
}
return array_merge(util_result_column_to_array($result), $trove_list);
}
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:16,代码来源:populate_foundries.php
示例5: ReportProjectTime
function ReportProjectTime($group_id, $type, $start = 0, $end = 0)
{
$this->Report();
if (!$start) {
$start = mktime(0, 0, 0, date('m'), 1, date('Y'));
}
if (!$end) {
$end = time();
} else {
$end--;
}
if (!$group_id) {
$this->setError('No User_id');
return false;
}
//
// Task report
//
if (!$type || $type == 'tasks') {
$res = db_query("SELECT pt.summary,sum(rtt.hours) AS hours \n\t\t\tFROM rep_time_tracking rtt, project_task pt, project_group_list pgl\n\t\t\tWHERE pgl.group_project_id=pt.group_project_id\n\t\t\tAND pgl.group_id='{$group_id}'\n\t\t\tAND rtt.report_date BETWEEN '{$start}' AND '{$end}' \n\t\t\tAND rtt.project_task_id=pt.project_task_id\n\t\t\tGROUP BY pt.summary\n\t\t\tORDER BY hours DESC");
//
// Category report
//
} elseif ($type == 'category') {
$res = db_query("SELECT rtc.category_name, sum(rtt.hours) AS hours \n\t\t\tFROM rep_time_tracking rtt, rep_time_category rtc, project_task pt, project_group_list pgl\n\t\t\tWHERE pgl.group_id='{$group_id}' \n\t\t\tAND pgl.group_project_id=pt.group_project_id\n\t\t\tAND rtt.project_task_id=pt.project_task_id\n\t\t\tAND rtt.report_date BETWEEN '{$start}' AND '{$end}' \n\t\t\tAND rtt.time_code=rtc.time_code\n\t\t\tGROUP BY rtc.category_name\n\t\t\tORDER BY hours DESC");
//
// Percentage this user spent on a specific subproject
//
} elseif ($type == 'subproject') {
$res = db_query("SELECT pgl.project_name, sum(rtt.hours) AS hours \n\t\t\tFROM rep_time_tracking rtt, project_task pt, project_group_list pgl\n\t\t\tWHERE pgl.group_id='{$group_id}'\n\t\t\tAND rtt.report_date BETWEEN '{$start}' AND '{$end}' \n\t\t\tAND rtt.project_task_id=pt.project_task_id\n\t\t\tAND pt.group_project_id=pgl.group_project_id\n\t\t\tGROUP BY pgl.project_name\n\t\t\tORDER BY hours DESC");
} else {
//
// Biggest Users
//
$res = db_query("SELECT u.realname, sum(rtt.hours) AS hours \n\t\t\tFROM users u, rep_time_tracking rtt, project_task pt, project_group_list pgl\n\t\t\tWHERE pgl.group_id='{$group_id}'\n\t\t\tAND rtt.report_date BETWEEN '{$start}' AND '{$end}' \n\t\t\tAND rtt.project_task_id=pt.project_task_id\n\t\t\tAND pt.group_project_id=pgl.group_project_id\n\t\t\tAND u.user_id=rtt.user_id\n\t\t\tGROUP BY u.realname\n\t\t\tORDER BY hours DESC");
}
$this->start_date = $start;
$this->end_date = $end;
if (!$res || db_error()) {
$this->setError('ReportUserAct:: ' . db_error());
return false;
}
$this->labels = util_result_column_to_array($res, 0);
$this->setData($res, 1);
return true;
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:46,代码来源:ReportProjectTime.class.php
示例6: svn_utils_technician_box
function svn_utils_technician_box($group_id, $name = '_commiter', $checked = 'xzxz', $text_100 = 'None')
{
global $Language;
if (!$group_id) {
return $Language->getText('svn_utils', 'g_id_err');
} else {
$result = svn_data_get_technicians($group_id);
if (!in_array($checked, util_result_column_to_array($result))) {
// Selected 'my commits' but never commited
$checked = 'xzxz';
}
$userids = util_result_column_to_array($result, 0);
$usernames = util_result_column_to_array($result, 1);
// Format user name according to preferences
$UH = new UserHelper();
foreach ($usernames as &$username) {
$username = $UH->getDisplayNameFromUserName($username);
}
return html_build_select_box_from_arrays($userids, $usernames, $name, $checked, true, $text_100, false, '', false, '', CODENDI_PURIFIER_CONVERT_HTML);
}
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:21,代码来源:svn_utils.php
示例7: db_query
/**
* MSPGetProjects
* Return the projects by user.
*
* @author Luis Hurtado [email protected]
* @param session_hash User session
* @return Groups User groups
* @date 2005-01-19
*
*/
function &MSPGetProjects($session_hash)
{
if (!session_continue($session_hash)) {
$array['success'] = false;
$array['errormessage'] = 'Could Not Continue Session';
}
$group_res = db_query("SELECT groups.group_id FROM groups NATURAL JOIN user_group WHERE user_id='" . user_getid() . "' AND project_flags='2'");
$group_ids =& util_result_column_to_array($group_res, 'group_id');
$groups =& group_get_objects($group_ids);
return $groups;
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:21,代码来源:msp.php
示例8: db_query
/**
* getGroups - get an array of groups this user is a member of.
*
* @return array Array of groups.
*/
function &getGroups()
{
$sql = "SELECT group_id\n\t\t\tFROM user_group\n\t\t\tWHERE user_id='" . $this->getID() . "'";
$res = db_query($sql);
$arr =& util_result_column_to_array($res, 0);
return group_get_objects($arr);
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:12,代码来源:User.class.php
示例9: support_header
$category_str = '';
}
//build page title to make bookmarking easier
//if a user was selected, add the user_name to the title
//same for status
support_header(array('title' => 'Browse Support Requests' . ($_assigned_to ? ' For: ' . user_getname($_assigned_to) : '') . ($_status && $_status != 100 ? ' By Status: ' . support_data_get_status_name($_status) : '')));
//now build the query using the criteria built above
$sql = "SELECT support.priority,support.group_id,support.support_id,support.summary," . "support_category.category_name,support_status.status_name," . "support.open_date AS date,users.user_name AS submitted_by,user2.user_name AS assigned_to_user " . "FROM support,support_category,support_status,users,users user2 " . "WHERE users.user_id=support.submitted_by " . " {$status_str} {$assigned_str} {$category_str} " . "AND user2.user_id=support.assigned_to " . "AND support_category.support_category_id=support.support_category_id " . "AND support_status.support_status_id=support.support_status_id " . "AND support.group_id='{$group_id}'" . $order_by;
/*
creating a custom technician box which includes "any" and "unassigned"
*/
$res_tech = support_data_get_technicians($group_id);
$tech_id_arr = util_result_column_to_array($res_tech, 0);
$tech_id_arr[] = '0';
//this will be the 'any' row
$tech_name_arr = util_result_column_to_array($res_tech, 1);
$tech_name_arr[] = 'Any';
$tech_box = html_build_select_box_from_arrays($tech_id_arr, $tech_name_arr, '_assigned_to', $_assigned_to, true, 'Unassigned');
/*
Show the new pop-up boxes to select assigned to and/or status
*/
echo '<H2>Browse Support Requests by</H2>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="6"><FORM ACTION="' . $PHP_SELF . '" METHOD="GET">
<INPUT TYPE="HIDDEN" NAME="group_id" VALUE="' . $group_id . '">
<INPUT TYPE="HIDDEN" NAME="set" VALUE="custom">
<TR><TD><b>Assigned User:</b></TD><TD><b>Status:</b></TD><TD><b>Category:</b></TD></TR>
<TR><TD><FONT SIZE="-1">' . $tech_box . '</TD><TD><FONT SIZE="-1">' . support_status_box('_status', $_status, 'Any') . '</TD>' . '<TD><FONT SIZE="-1">' . support_category_box($group_id, $name = '_category', $_category, 'Any') . '</TD>' . '<TD><FONT SIZE="-1"><INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Browse"></TD></TR></FORM></TABLE>';
//echo "<p>$sql\n";
$result = db_query($sql, 51, $offset);
if ($result && db_numrows($result) > 0) {
echo '
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:31,代码来源:browse_support.php
示例10: db_query
function &user_get_objects_by_name($username_arr)
{
$res = db_query("SELECT user_id FROM users WHERE user_name IN ('" . implode($username_arr, '\',\'') . "')");
$arr =& util_result_column_to_array($res, 0);
return user_get_objects($arr);
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:6,代码来源:GFUser.class.php
示例11: sendAttachNotice
/**
* sendAttachNotice - contains the logic to send out email attachement followups when a message is posted.
*
* @param int attach_id - The id of the file that has been attached
*
* @return boolean success.
*/
function sendAttachNotice($attach_id)
{
if ($attach_id) {
$ids =& $this->Forum->getMonitoringIDs();
//
// See if there is anyone to send messages to
//
if (!count($ids) > 0 && !$this->Forum->getSendAllPostsTo()) {
return true;
}
$body = "\nRead and respond to this message at: " . "\n" . util_make_url('/forum/message.php?msg_id=' . $this->getID()) . "\nBy: " . $this->getPosterRealName() . "\n\n";
$body .= "A file has been uploaded to this message, you can download it at: " . "\n" . util_make_url('/forum/attachment.php?attachid=' . $attach_id . "&group_id=" . $this->Forum->Group->getID() . "&forum_id=" . $this->Forum->getID()) . "\n\n";
$body .= "\n\n______________________________________________________________________" . "\nYou are receiving this email because you elected to monitor this forum." . "\nTo stop monitoring this forum, login to " . $GLOBALS['sys_name'] . " and visit: " . "\n" . util_make_url('/forum/monitor.php?forum_id=' . $this->Forum->getID() . '&group_id=' . $this->Forum->Group->getID() . '&stop=1');
$extra_headers = "Return-Path: <noreply@" . $GLOBALS['sys_default_domain'] . ">\n";
$extra_headers .= "Errors-To: <noreply@" . $GLOBALS['sys_default_domain'] . ">\n";
$extra_headers .= "Sender: <noreply@" . $GLOBALS['sys_default_domain'] . ">\n";
$extra_headers .= "Reply-To: " . $this->Forum->getReturnEmailAddress() . "\n";
$extra_headers .= "Precedence: Bulk\n" . "List-Id: " . $this->Forum->getName() . " <forum" . $this->Forum->getId() . "@" . $GLOBALS['sys_default_domain'] . ">\n" . "List-Help: " . util_make_url('/forum/forum.php?id=' . $this->Forum->getId()) . "\n" . "Message-Id: <forumpost" . $this->getId() . "@" . $GLOBALS['sys_default_domain'] . ">";
$parentid = $this->getParentId();
if (!empty($parentid)) {
$extra_headers .= "\nIn-Reply-To: " . $this->Forum->getReturnEmailAddress() . "\n" . "References: <forumpost" . $this->getParentId() . "@" . $GLOBALS['sys_default_domain'] . ">";
}
$subject = "[" . $this->Forum->getUnixName() . "][" . $this->getID() . "] " . util_unconvert_htmlspecialchars($this->getSubject());
if (count($ids) != 0) {
$sql = "SELECT email FROM users WHERE status='A' AND user_id IN ('" . implode($ids, '\',\'') . "')";
$bccres = db_query($sql);
}
($BCC =& implode(util_result_column_to_array($bccres), ',')) . ',' . $this->Forum->getSendAllPostsTo();
$User = user_get_object($this->getPosterID());
util_send_message('', $subject, $body, "noreply@" . $GLOBALS['sys_default_domain'], $BCC, 'Forum', $extra_headers);
return true;
}
return false;
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:41,代码来源:ForumMessage.class.php
示例12: plugin_tracker_permission_fetch_selection_field
function plugin_tracker_permission_fetch_selection_field($permission_type, $object_id, $group_id, $html_name = "ugroups[]", $html_disabled = false, $selected = array())
{
$html = '';
// Get ugroups already defined for this permission_type
if (empty($selected)) {
$res_ugroups = permission_db_authorized_ugroups($permission_type, $object_id);
$nb_set = db_numrows($res_ugroups);
} else {
$res_ugroups = $selected;
$nb_set = count($res_ugroups);
}
// Now retrieve all possible ugroups for this project, as well as the default values
$sql = "SELECT ugroup_id,is_default FROM permissions_values WHERE permission_type='{$permission_type}'";
$res = db_query($sql);
$predefined_ugroups = '';
$default_values = array();
if (db_numrows($res) < 1) {
$html .= "<p><b>" . $GLOBALS['Language']->getText('global', 'error') . "</b>: " . $GLOBALS['Language']->getText('project_admin_permissions', 'perm_type_not_def', $permission_type);
return $html;
} else {
while ($row = db_fetch_array($res)) {
if ($predefined_ugroups) {
$predefined_ugroups .= ' ,';
}
$predefined_ugroups .= $row['ugroup_id'];
if ($row['is_default']) {
$default_values[] = $row['ugroup_id'];
}
}
}
$sql = "SELECT * FROM ugroup WHERE group_id=" . $group_id . " OR ugroup_id IN (" . $predefined_ugroups . ") ORDER BY ugroup_id";
$res = db_query($sql);
$array = array();
while ($row = db_fetch_array($res)) {
$name = util_translate_name_ugroup($row[1]);
$array[] = array('value' => $row[0], 'text' => $name);
}
if (empty($selected)) {
if ($nb_set) {
$res_ugroups = util_result_column_to_array($res_ugroups);
} else {
$res_ugroups = $default_values;
}
}
$html .= html_build_multiple_select_box($array, $html_name, $res_ugroups, 8, false, util_translate_name_ugroup('ugroup_nobody_name_key'), false, '', false, '', false, CODENDI_PURIFIER_CONVERT_HTML, $html_disabled);
return $html;
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:47,代码来源:tracker_permissions.php
示例13: frs_display_release_form
function frs_display_release_form($is_update, &$release, $group_id, $title, $url)
{
global $frspf, $frsrf, $frsff;
$hp =& Codendi_HTMLPurifier::instance();
if (is_array($release)) {
if (isset($release['date'])) {
$release_date = $release['date'];
}
$release = new FRSRelease($release);
}
if ($is_update) {
$files = $release->getFiles();
if (count($files) > 0) {
for ($i = 0; $i < count($files); $i++) {
if (!$frsff->compareMd5Checksums($files[$i]->getComputedMd5(), $files[$i]->getReferenceMd5())) {
$GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('file_admin_editreleases', 'md5_fail', array(basename($files[$i]->getFileName()), $files[$i]->getComputedMd5())));
}
}
}
}
file_utils_admin_header(array('title' => $GLOBALS['Language']->getText('file_admin_editreleases', 'release_new_file_version'), 'help' => 'frs.html#delivery-manager-administration'));
echo '<H3>' . $hp->purify($title, CODENDI_PURIFIER_CONVERT_HTML) . '</H3>';
$sql = "SELECT * FROM frs_processor WHERE (group_id = 100 OR group_id = " . db_ei($group_id) . ") ORDER BY rank";
$result = db_query($sql);
$processor_id = util_result_column_to_array($result, 0);
$processor_name = util_result_column_to_array($result, 1);
foreach ($processor_name as $key => $value) {
$processor_name[$key] = $hp->purify($value, CODENDI_PURIFIER_JS_QUOTE);
}
$sql = "SELECT * FROM frs_filetype ORDER BY type_id";
$result1 = db_query($sql);
$type_id = util_result_column_to_array($result1, 0);
$type_name = util_result_column_to_array($result1, 1);
$url_news = get_server_url() . "/file/showfiles.php?group_id=" . $group_id;
echo '<script type="text/javascript">';
echo "var processor_id = ['" . implode("', '", $processor_id) . "'];";
echo "var processor_name = ['" . implode("', '", $processor_name) . "'];";
echo "var type_id = ['" . implode("', '", $type_id) . "'];";
echo "var type_name = ['" . implode("', '", $type_name) . "'];";
echo "var group_id = " . $group_id . ";";
echo "var relname = '" . $GLOBALS['Language']->getText('file_admin_editreleases', 'relname') . "';";
echo "var choose = '" . $GLOBALS['Language']->getText('file_file_utils', 'must_choose_one') . "';";
echo "var browse = '" . $GLOBALS['Language']->getText('file_admin_editreleases', 'browse') . "';";
echo "var local_file = '" . $GLOBALS['Language']->getText('file_admin_editreleases', 'local_file') . "';";
echo "var scp_ftp_files = '" . $GLOBALS['Language']->getText('file_admin_editreleases', 'scp_ftp_files') . "';";
echo "var upload_text = '" . $GLOBALS['Language']->getText('file_admin_editreleases', 'upload') . "';";
echo "var add_file_text = '" . $GLOBALS['Language']->getText('file_admin_editreleases', 'add_file') . "';";
echo "var add_change_log_text = '" . $GLOBALS['Language']->getText('file_admin_editreleases', 'add_change_log') . "';";
echo "var view_change_text = '" . $GLOBALS['Language']->getText('file_admin_editreleases', 'view_change') . "';";
echo "var refresh_files_list = '" . $GLOBALS['Language']->getText('file_admin_editreleases', 'refresh_file_list') . "';";
echo "var release_mode = '" . ($is_update ? 'edition' : 'creation') . "';";
if ($is_update) {
$pm = PermissionsManager::instance();
$dar = $pm->getAuthorizedUgroups($release->getReleaseID(), FRSRelease::PERM_READ);
$ugroups_name = array();
foreach ($dar as $row) {
$ugroups_name[] = util_translate_name_ugroup($row['name']);
}
echo "var ugroups_name = '" . implode(", ", $ugroups_name) . "';";
echo "var default_permissions_text = '" . $GLOBALS['Language']->getText('file_admin_editreleases', 'release_perm') . "';";
} else {
echo "var default_permissions_text = '" . $GLOBALS['Language']->getText('file_admin_editreleases', 'default_permissions') . "';";
}
echo '</script>';
//set variables for news template
$relname = $GLOBALS['Language']->getText('file_admin_editreleases', 'relname');
if (!$is_update) {
echo '<p>' . $GLOBALS['Language']->getText('file_admin_editreleases', 'contain_multiple_files') . '</p>';
}
?>
<FORM id="frs_form" NAME="frsRelease" ENCTYPE="multipart/form-data" METHOD="POST" ACTION="<?php
echo $url;
?>
" CLASS="form-inline">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="<? echo $GLOBALS['sys_max_size_upload']; ?>">
<input type="hidden" name="postReceived" value="" />
<?php
if ($release->getReleaseId()) {
echo '<input type="hidden" id="release_id" name="release[release_id]" value="' . $release->getReleaseId() . '" />';
}
?>
<TABLE BORDER="0" width="100%">
<TR><TD><FIELDSET><LEGEND><?php
echo $GLOBALS['Language']->getText('file_admin_editreleases', 'fieldset_properties');
?>
</LEGEND>
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="2">
<TR>
<TD>
<B><?php
echo $GLOBALS['Language']->getText('file_admin_editpackages', 'p_name');
?>
:</B>
</TD>
<TD>
<?php
$res =& $frspf->getFRSPackagesFromDb($group_id);
$rows = count($res);
if (!$res || $rows < 1) {
//.........这里部分代码省略.........
开发者ID:rinodung,项目名称:tuleap,代码行数:101,代码来源:file_utils.php
示例14: db_query
if (!is_dir($groupdir_prefix)) {
@mkdir($groupdir_prefix, 0755, true);
}
if (!isset($homedir_prefix)) {
// this should be set in local.inc
${$homedir_prefix} = '/home';
}
if (!is_dir($homedir_prefix)) {
@mkdir($homedir_prefix, 0755, true);
}
$res = db_query("SELECT distinct users.user_name,users.unix_pw,users.user_id\n\tFROM users,user_group,groups\n\tWHERE users.user_id=user_group.user_id \n\tAND user_group.group_id=groups.group_id\n\tAND groups.status='A'\n\tAND user_group.cvs_flags IN ('0','1')\n\tAND users.status='A'\n\tORDER BY user_id ASC");
$err .= db_error();
$users =& util_result_column_to_array($res, 'user_name');
$group_res = db_query("SELECT unix_group_name, (is_public=1 AND enable_anonscm=1 AND type_id=1) AS enable_pserver FROM groups WHERE status='A' AND type_id='1'");
$err .= db_error();
$groups = util_result_column_to_array($group_res, 'unix_group_name');
//
// this is where we give a user a home
//
foreach ($users as $user) {
if (is_dir($homedir_prefix . "/" . $user)) {
} else {
@mkdir($homedir_prefix . "/" . $user);
}
system("chown {$user}:" . USER_DEFAULT_GROUP . " " . $homedir_prefix . "/" . $user);
}
//
// Create home dir for groups
//
foreach ($groups as $group) {
//test if the FTP upload dir exists and create it if not
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:homedirs.php
示例15: callback
function callback($data_row)
{
$sql = "SELECT trove_cat.fullpath " . "FROM trove_group_link,trove_cat " . "WHERE trove_group_link.trove_cat_root=18 " . "AND trove_group_link.trove_cat_id=trove_cat.trove_cat_id " . "AND group_id={$data_row['group_id']}";
$result = db_query($sql);
$ret = ' | date registered: ' . date('M jS Y', $data_row['register_time']);
$ret .= ' | category: ' . str_replace(' ', '', implode(util_result_column_to_array($result), ','));
return $ret . ' | license: ' . $data_row['license'];
}
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:8,代码来源:index.php
示例16: setDates
function setDates($result, $column)
{
$arr =& util_result_column_to_array($result, $column);
for ($i = 0; $i < count($arr); $i++) {
$this->labels[$i] = date('M d', $arr[$i]);
}
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:7,代码来源:Report.class.php
示例17: html_build_select_box
function html_build_select_box($result, $name, $checked_val = "xzxz", $show_100 = true, $text_100 = '', $show_any = false, $text_any = '', $show_unchanged = false, $text_unchanged = '', $purify_level = CODENDI_PURIFIER_CONVERT_HTML, $show_unknown_value = true)
{
global $Language;
/*
Takes a result set, with the first column being the "id" or value
and the second column being the text you want displayed
The second parameter is the name you want assigned to this form element
The third parameter is optional. Pass the value of the item that should be checked
The fourth parameter is an optional boolean - whether or not to show the '100 row'
The fifth parameter is optional - what to call the '100 row' defaults to none
*/
// Position default values for special menu items
if ($text_100 == '') {
$text_100 = $Language->getText('global', 'none');
}
if ($text_any == '') {
$text_any = $Language->getText('global', 'any');
}
if ($text_unchanged == '') {
$text_unchanged = $Language->getText('global', 'unchanged');
}
return html_build_select_box_from_arrays(util_result_column_to_array($result, 0), util_result_column_to_array($result, 1), $name, $checked_val, $show_100, $text_100, $show_any, $text_any, $show_unchanged, $text_unchanged, $purify_level, $show_unknown_value);
}
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:27,代码来源:html.php
示例18: util_result_column_to_array
function &getTaskClosed()
{
return util_result_column_to_array($this->res, 8);
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:4,代码来源:ReportUserAct.class.php
示例19: permission_display_selection_frs
function permission_display_selection_frs($permission_type, $object_id = null, $group_id)
{
$html = '';
// Get ugroups already defined for this permission_type
$res_ugroups = permission_db_authorized_ugroups($permission_type, $object_id);
$nb_set = db_numrows($res_ugroups);
// Now retrieve all possible ugroups for this project, as well as the default values
$sql = "SELECT ugroup_id,is_default FROM permissions_values WHERE permission_type='" . db_es($permission_type) . "'";
$res = db_query($sql);
$predefined_ugroups = '';
$default_values = array();
if (db_numrows($res) < 1) {
$html .= "<p><b>" . $GLOBALS['Language']->getText('global', 'error') . "</b>: " . $GLOBALS['Language']->getText('project_admin_permissions', 'perm_type_not_def', $permission_type);
return $html;
} else {
while ($row = db_fetch_array($res)) {
if ($predefined_ugroups) {
$predefined_ugroups .= ' ,';
}
$predefined_ugroups .= $row['ugroup_id'];
if ($row['is_default']) {
$default_values[] = $row['ugroup_id'];
}
}
}
$sql = "SELECT * FROM ugroup WHERE group_id=" . db_ei($group_id) . " OR ugroup_id IN (" . $predefined_ugroups . ") ORDER BY ugroup_id";
$res = db_query($sql);
$array = array();
while ($row = db_fetch_array($res)) {
$name = util_translate_name_ugroup($row[1]);
$array[] = array('value' => $row[0], 'text' => $name);
}
$html .= html_build_multiple_select_box($array, "ugroups[]", $nb_set ? util_result_column_to_array($res_ugroups) : $default_values, 8, false, util_translate_name_ugroup('ugroup_nobody_name_key'), false, '', false, '', false);
$html .= '<p>' . $GLOBALS['Language']->getText('project_admin_permissions', 'admins_create_modify_ug', array("/project/admin/editugroup.php?func=create&group_id={$group_id}", "/project/admin/ugroup.php?group_id={$group_id}"));
echo $html;
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:36,代码来源:permissions.php
示例20: ugroup_db_list_tracker_ugroups_for_user
/** Return array of ugroup_id for all user-defined ugoups that user is part of
* and having tracker-related permissions on the $group_artifact_id tracker */
function ugroup_db_list_tracker_ugroups_for_user($group_id, $group_artifact_id, $user_id)
{
$sql = "SELECT distinct ug.ugroup_id FROM ugroup ug, ugroup_user ugu, permissions p " . "WHERE ugu.user_id=" . db_ei($user_id) . " AND ug.group_id=" . db_ei($group_id) . " AND ugu.ugroup_id=ug.ugroup_id " . " AND p.ugroup_id = ugu.ugroup_id " . " AND p.object_id LIKE '" . db_ei($group_artifact_id) . "%' " . " AND p.permission_type LIKE 'TRACKER%'";
return util_result_column_to_array(db_query($sql));
}
开发者ID:pdaniel-frk,项目名称:tuleap,代码行数:7,代码来源:ugroup_utils.php
注:本文中的util_result_column_to_array函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论