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 -->
<tr>
	<td class="form-title" colspan="3">
示例#2
0
	<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 
}
# End looping over projects
示例#3
0
     case 'sizedesc':
         $filelist = multi_sort($filelist, 'desc', 'filesize');
         break;
     case 'dateasc':
         $filelist = multi_sort($filelist, 'asc', 'filemtime');
         $dirlist = multi_sort($dirlist, 'asc', 'filemtime');
         break;
     case 'datedesc':
         $filelist = multi_sort($filelist, 'desc', 'filemtime');
         $dirlist = multi_sort($dirlist, 'desc', 'filemtime');
         break;
     case 'typeasc':
         $filelist = multi_sort($filelist, 'asc', 'get_ext');
         break;
     case 'typedesc':
         $filelist = multi_sort($filelist, 'desc', 'get_ext');
         break;
     default:
         if (empty($_GET['sort']) or $_GET['sort'] === 'nameasc' or $_GET['sort'] === 'namedesc') {
             /* do nothing */
         } else {
             $status = ' &minus; invalid sorting algorithm: ' . $_GET['sort'];
         }
 }
 /*****************************
  * User-intervened functions *
  *****************************/
 // Javascript hide
 /*
 $body = "\n\t\t" . '<a href="#" id="toggle" onclick="show(\'functions\');">Toggle functions</a>' .
     "\n\t\t" . '<div id="functions">' .
示例#4
0
		</p>
	</fieldset>
</form>

<div id="searchresults">
<?php 
#
#	FIXME: This entire file should probably be moved into display_articles
#
if ($_POST[search]) {
    $allcats = $settingsdatabase->settings['categories'];
    $results = $KAclass->search($_POST[search][terms], $_POST[search][where], $_POST[search][regexp]);
    $resultnumber = count($results);
    if ($resultnumber >= 1) {
        echo '<fieldset><legend>' . i18n("search_header", "<small>,{$resultnumber},</small>") . '</legend>';
        $results = multi_sort($results, "relevance");
        foreach ($results as $date => $info) {
            unset($url);
            unset($cats);
            $cats = explode(", ", $info[category]);
            foreach ($cats as $null => $thiscatid) {
                $thiscatinfo = $allcats[$thiscatid];
                $cats[$null] = $thiscatinfo[name];
            }
            $url = $KAclass->urlconstructor($info, $cats);
            echo '<a href="' . $_SERVER[SCRIPT_NAME] . '/' . $url . '">' . $info[title] . '</a>(' . $info[relevance] . ')<br />';
        }
        echo '</fieldset>';
    }
}
?>
<!-- Add subproject -->
<tr>
	<td class="left" colspan="2">
		<form method="post" action="manage_proj_subproj_add.php">
			<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', ASC);
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 
}
# End looping over projects