<td>
		<?php 
        echo string_display_links($t_project['description']);
        ?>
	</td>
</tr>
<?php 
    }
    $t_subprojects = project_hierarchy_get_subprojects($t_project_id, true);
    if (0 < count($t_projects) || 0 < count($t_subprojects)) {
        array_unshift($t_stack, $t_projects);
    }
    if (0 < count($t_subprojects)) {
        $t_full_projects = array();
        foreach ($t_subprojects as $t_project_id) {
            $t_full_projects[] = project_get_row($t_project_id);
        }
        $t_subprojects = multi_sort($t_full_projects, $f_sort, $t_direction);
        array_unshift($t_stack, $t_subprojects);
    }
}
?>
</table>
<br />

<!-- GLOBAL CATEGORIES -->
<a name="categories" />
<div align="center">
<table class="width75" cellspacing="1">

<!-- Title -->
Example #2
0
	</td>
	<td width="20%">
		<?php 
    echo lang_get('description');
    ?>
	</td>
	<td width="20%">
		<?php 
    echo lang_get('actions');
    ?>
	</td>
</tr>

<?php 
    foreach ($t_subproject_ids as $t_subproject_id) {
        $t_subproject = project_get_row($t_subproject_id);
        $t_inherit_parent = project_hierarchy_inherit_parent($t_subproject_id, $f_project_id, true);
        ?>
<tr <?php 
        echo helper_alternate_class();
        ?>
>
	<td>
		<a href="manage_proj_edit_page.php?project_id=<?php 
        echo $t_subproject['id'];
        ?>
"><?php 
        echo string_display($t_subproject['name']);
        ?>
</a>
	</td>
Example #3
0
 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');
     }
 }
Example #4
0
function project_get_field($p_project_id, $p_field_name, $p_trigger_errors = true)
{
    $row = project_get_row($p_project_id, $p_trigger_errors);
    if (isset($row[$p_field_name])) {
        return $row[$p_field_name];
    } else {
        if ($p_trigger_errors) {
            error_parameters($p_field_name);
            trigger_error(ERROR_DB_FIELD_NOT_FOUND, WARNING);
        }
    }
    return '';
}
Example #5
0
}
$t_bug = bug_get($id);
?>

<div class="ch-box-lite ch-box-error">
    <h2>Bug ID:<?php 
echo $id;
?>
</h2>
</div>
<div class="ch-box-lite">
    <h2>Basic Info</h2>
    <div class="ch-box-info">
        <h4>Project:
<?php 
$t_project = project_get_row($t_bug->project_id);
echo $t_project['name'];
?>
        </h4>
        <div style="padding-left: 10px;">
<?php 
echo $t_project['description'];
?>
        </div>
    </div>
    <table class="ch-datagrid" summary="">
        <thead>
        <tr>
            <th scope="col">Platform</th>
            <th scope="col">VersionName</th>
            <th scope="col">PhoneBrand</th>