Exemplo n.º 1
0
function fetch_task_directory($tid)
{
    $sql = 'SELECT did FROM directory WHERE tid=' . $tid . ' ORDER BY did DESC';
    $db_array_did = db_query($sql);
    if (!array_isset($db_array_did)) {
        return FALSE;
    } else {
        $directory_count = count($db_array_did);
        for ($i = 0; $i < $directory_count; $i++) {
            $db_array_directory = fetch_directory_change($db_array_did[$i]['did']);
            $db_array_directory_change[$i] = $db_array_directory[0];
        }
        return $db_array_directory_change;
    }
}
Exemplo n.º 2
0
    //directory name, last commit time, page title, page sub title
    $db_array = fetch_directory_change($d);
    $db_array_dir = fetch_directory($d);
    $directory_name = $db_array[0]['name'];
    $directory_last_update = time_uk($db_array[0]['time']);
    $page_title = $directory_name;
    $page_title_sub = "last commit : [" . $directory_last_update . "]";
    $directory_change_number = count($db_array);
    if ($directory_change_number <= 1) {
        $version_title = "version";
    } else {
        $version_title = "versions";
    }
}
include 'style/header.inc.php';
if (fetch_directory_change($d) == FALSE) {
    ?>
	<div class="alert-message error">
        <a class="close" href="<?php 
    echo $after_login_redirect;
    ?>
">×</a>
        <p><strong>Oops!</strong> Directory not exist or have not any changes, please create before use.</p>
    </div>
	<?php 
} else {
    //directory change history list/table
    ?>
	<h3><?php 
    echo '"' . $directory_name;
    ?>