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


PHP project_get_all_rows函数代码示例

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


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

示例1: access_has_any_project

/**
 * Check whether the user has the specified access level for any project project
 * @param int $p_access_level integer representing access level
 * @param int|null $p_user_id integer representing user id, defaults to null to use current user
 * @return bool whether user has access level specified
 * @access public
 */
function access_has_any_project($p_access_level, $p_user_id = null)
{
    # Short circuit the check in this case
    if (NOBODY == $p_access_level) {
        return false;
    }
    if (null === $p_user_id) {
        $p_user_id = auth_get_current_user_id();
    }
    $t_projects = project_get_all_rows();
    foreach ($t_projects as $t_project) {
        if (access_has_project_level($p_access_level, $t_project['id'], $p_user_id)) {
            return true;
        }
    }
    return false;
}
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:24,代码来源:access_api.php

示例2: form_security_field

<tr>
	<td colspan="7">
		<form method="post" action="manage_proj_subproj_add.php">
			<?php 
echo form_security_field('manage_proj_subproj_add');
?>
			<input type="hidden" name="project_id" value="<?php 
echo $f_project_id;
?>
" />
			<select name="subproject_id">
<?php 
$t_all_subprojects = project_hierarchy_get_subprojects($f_project_id, true);
$t_all_subprojects[] = $f_project_id;
$t_manage_access = config_get('manage_project_threshold');
$t_projects = project_get_all_rows();
$t_projects = multi_sort($t_projects, 'name', ASCENDING);
foreach ($t_projects as $t_project) {
    if (in_array($t_project['id'], $t_all_subprojects) || in_array($f_project_id, project_hierarchy_get_all_subprojects($t_project['id'])) || !access_has_project_level($t_manage_access, $t_project['id'])) {
        continue;
    }
    ?>
				<option value="<?php 
    echo $t_project['id'];
    ?>
"><?php 
    echo string_attribute($t_project['name']);
    ?>
</option>
<?php 
}
开发者ID:kaos,项目名称:mantisbt,代码行数:31,代码来源:manage_proj_edit_page.php

示例3: ERP_custom_function_print_projects_option_list

function ERP_custom_function_print_projects_option_list($p_sel_value)
{
    $t_all_projects = project_get_all_rows();
    $t_projects_sorted = array();
    foreach ($t_all_projects as $t_project_key => $t_project) {
        $t_projects_sorted[$t_project_key] = $t_project['name'];
    }
    natcasesort($t_projects_sorted);
    foreach ($t_projects_sorted as $t_project_id => $t_project_name) {
        echo '<option value="' . $t_all_projects[$t_project_id]['id'] . '"';
        check_selected((array) $p_sel_value, (int) $t_all_projects[$t_project_id]['id']);
        echo '>' . ($t_all_projects[$t_project_id]['enabled'] == FALSE ? '* ' : NULL) . string_attribute($t_all_projects[$t_project_id]['name']) . '</option>' . "\n";
    }
}
开发者ID:mikemol,项目名称:EmailReporting,代码行数:14,代码来源:config_api.php

示例4: process_imap_mailbox

 private function process_imap_mailbox()
 {
     $this->_mailserver = new Net_IMAP($this->_mailbox['hostname'], $this->_mailbox['port']);
     if ($this->_mailserver->_connected === TRUE) {
         $t_loginresult = $this->mailbox_login();
         if (!$this->pear_error('Attempt login', $t_loginresult)) {
             // If basefolder is empty we try to select the inbox folder
             if (is_blank($this->_mailbox['imap_basefolder'])) {
                 $this->_mailbox['imap_basefolder'] = $this->_mailserver->getCurrentMailbox();
             }
             if ($this->_mailserver->mailboxExist($this->_mailbox['imap_basefolder'])) {
                 if ($this->_test_only === FALSE) {
                     // There does not seem to be a viable api function which removes this plugins dependability on table column names
                     // So if a column name is changed it might cause problems if the code below depends on it.
                     // Luckily we only depend on id, name and enabled
                     if ($this->_mailbox['imap_createfolderstructure'] == ON) {
                         $t_projects = project_get_all_rows();
                         $t_hierarchydelimiter = $this->_mailserver->getHierarchyDelimiter();
                     } else {
                         $t_projects = array(0 => project_get_row($this->_mailbox['project_id']));
                     }
                     foreach ($t_projects as $t_project) {
                         if ($t_project['enabled'] == ON) {
                             $t_project_name = $this->cleanup_project_name($t_project['name']);
                             $t_foldername = $this->_mailbox['imap_basefolder'] . ($this->_mailbox['imap_createfolderstructure'] ? $t_hierarchydelimiter . $t_project_name : NULL);
                             // We don't need to check twice whether the mailbox exist incase createfolderstructure is false
                             if (!$this->_mailbox['imap_createfolderstructure'] || $this->_mailserver->mailboxExist($t_foldername) === TRUE) {
                                 $this->_mailserver->selectMailbox($t_foldername);
                                 $t_ListMsgs = $this->_mailserver->getListing();
                                 if (!$this->pear_error('Retrieve list of messages', $t_ListMsgs)) {
                                     while ($t_Msg = array_shift($t_ListMsgs)) {
                                         $t_isDeleted = $this->isDeleted($t_Msg['msg_id']);
                                         if ($this->pear_error('Check email deleted flag', $t_isDeleted)) {
                                             $t_isDeleted = FALSE;
                                         }
                                         if ($t_isDeleted === TRUE) {
                                             // Email marked as deleted. Do nothing
                                         } else {
                                             $t_emailresult = $this->process_single_email($t_Msg['msg_id'], (int) $t_project['id']);
                                             if ($t_emailresult === TRUE) {
                                                 $t_deleteresult = $this->_mailserver->deleteMsg($t_Msg['msg_id']);
                                                 $this->pear_error('Attempt delete email', $t_deleteresult);
                                             }
                                         }
                                     }
                                 }
                             } elseif ($this->_mailbox['imap_createfolderstructure'] === TRUE) {
                                 // create this mailbox
                                 $this->_mailserver->createMailbox($t_foldername);
                             }
                         } else {
                             $this->custom_error('Project is disabled: ' . $t_project['name']);
                         }
                     }
                 }
             } else {
                 $this->custom_error('IMAP basefolder not found');
             }
         }
         //$t_mailbox->expunge(); //disabled as this is handled by the disconnect
         // mail_delete decides whether to perform the expunge command before closing the connection
         $this->_mailserver->disconnect((bool) $this->_mail_delete);
     } else {
         $this->custom_error('Failed to connect to the mail server');
     }
 }
开发者ID:JeromyK,项目名称:EmailReporting,代码行数:66,代码来源:mail_api.php

示例5: removeCustomField

 function removeCustomField($p_field_name)
 {
     $t_field_id = custom_field_get_id_from_name($p_field_name);
     $t_projects = project_get_all_rows();
     foreach ($t_projects as $t_row) {
         custom_field_unlink($t_field_id, $t_row['id']);
     }
 }
开发者ID:CarlosPinedaT,项目名称:agileMantis,代码行数:8,代码来源:class_commonlib.php


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