當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CProject::hasChildProjects方法代碼示例

本文整理匯總了PHP中CProject::hasChildProjects方法的典型用法代碼示例。如果您正苦於以下問題:PHP CProject::hasChildProjects方法的具體用法?PHP CProject::hasChildProjects怎麽用?PHP CProject::hasChildProjects使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CProject的用法示例。


在下文中一共展示了CProject::hasChildProjects方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: bestColor

 if ($level) {
     $s .= '<tr style="display:none" id="multiproject_tr_' . $row['project_original_parent'] . '_' . $row['project_id'] . '_">';
     $s .= '<div id="multiproject_' . $row['project_original_parent'] . '_' . $row['project_id'] . '">';
 } else {
     $s .= '<tr>';
 }
 $s .= '<td width="65" align="right" style="border: outset #eeeeee 1px;background-color:#' . $row['project_color_identifier'] . '">';
 $s .= '<font color="' . bestColor($row['project_color_identifier']) . '">' . sprintf('%.1f%%', $row['project_percent_complete']) . '</font></td>';
 $s .= '<td align="center">';
 if ($row['project_priority'] < 0) {
     $s .= '<img src="' . w2PfindImage('icons/priority-' . -$row['project_priority'] . '.gif') . '" width=13 height=16>';
 } elseif ($row['project_priority'] > 0) {
     $s .= '<img src="' . w2PfindImage('icons/priority+' . $row['project_priority'] . '.gif') . '"  width=13 height=16>';
 }
 $s .= '</td><td width="40%">';
 $count_projects = $tmpProject->hasChildProjects($row['project_id']);
 if ($level) {
     $s .= str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;', $level - 1);
     $s .= '<img src="' . w2PfindImage('corner-dots.gif') . '" width="16" height="12" border="0">&nbsp;';
     $s .= '<a href="./index.php?m=projects&a=view&project_id=' . $row["project_id"] . '">';
     $s .= nl2br($row['project_description']) ? w2PtoolTip($row['project_name'], nl2br($row['project_description']), true) : w2PtoolTip($row['project_name'], $AppUI->_('No information available'), true);
     $s .= $row["project_name"] . (nl2br($row['project_description']) ? w2PendTip() : '') . '</a>';
 } elseif ($count_projects > 0 && !$level) {
     $s .= w2PtoolTip($row["project_name"], nl2br($row['project_description']) . '<br />' . '<i>' . $AppUI->_('this project is a parent on a multi-project structure') . '</i><br />' . '<i>' . $AppUI->_('click to show/hide its children') . '</i>');
     $s .= '<a href="javascript: void(0);" onclick="expand_collapse(\'multiproject_tr_' . $row["project_id"] . '_\', \'tblProjects\')">';
     $s .= '<img id="multiproject_tr_' . $row["project_id"] . '__expand" src="' . w2PfindImage('icons/expand.gif') . '" width="12" height="12" border="0">';
     $s .= '<img id="multiproject_tr_' . $row["project_id"] . '__collapse" src="' . w2PfindImage('icons/collapse.gif') . '" width="12" height="12" border="0" style="display:none"></a>&nbsp;';
     $s .= '<a href="./index.php?m=projects&a=view&project_id=' . $row["project_id"] . '">' . (nl2br($row['project_description']) ? w2PtoolTip($row['project_name'], nl2br($row['project_description']), true) : '') . $row['project_name'] . (nl2br($row['project_description']) ? w2PendTip() : '') . '</a>' . w2PendTip();
 } else {
     $s .= '<a href="./index.php?m=projects&a=view&project_id=' . $row["project_id"] . '">';
     $s .= nl2br($row['project_description']) ? w2PtoolTip($row['project_name'], nl2br($row['project_description']), true) : w2PtoolTip($row['project_name'], $AppUI->_('No information available'), true);
開發者ID:joly,項目名稱:web2project,代碼行數:31,代碼來源:vw_idx_projects.php

示例2: void

        echo '</tr>';
    }
    ?>
					</table>
		  	</td>
		  </tr>
		<?php 
}
?>
		</table>
	</td>
</tr>
<?php 
//lets add the subprojects table
$canReadMultiProjects = $perms->checkModule('admin', 'view');
if ($project->hasChildProjects() && $canReadMultiProjects) {
    ?>
		<tr>
			<td colspan="2">
				<?php 
    echo w2PtoolTip('Multiproject', 'Click to Show/Hide Structure', true) . '<a href="javascript: void(0);" onclick="expand_collapse(\'multiproject\', \'tblProjects\')"><img id="multiproject_expand" src="' . w2PfindImage('icons/expand.gif') . '" width="12" height="12" border="0"><img id="multiproject_collapse" src="' . w2PfindImage('icons/collapse.gif') . '" width="12" height="12" border="0" style="display:none"></a>&nbsp;' . w2PendTip();
    echo '<strong>' . $AppUI->_('This Project is Part of the Following Multi-Project Structure') . ':<strong>';
    ?>
			</td>
		</tr>
		<tr id="multiproject" style="visibility:collapse;display:none;">
			<td colspan="2" class="hilite">
				<?php 
    require w2PgetConfig('root_dir') . '/modules/projects/vw_sub_projects.php';
    ?>
			</td>
開發者ID:joly,項目名稱:web2project,代碼行數:31,代碼來源:view.php


注:本文中的CProject::hasChildProjects方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。